halkyon/packages/halkyon_base_server/migrations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 7aee78bd87
feat(base,app,learn,todo,train,meditate): agent accounts with tokens
ADR 0044's step 6a (D42, D43, D45): accounts for programs, such as AI
assistants, that an identified person makes from the Profile.

halkyon_base keeps them on the instance's register, which its members
ask: an agent is an account (agent_account: its owner, its name, its
public keys, set by itself once) with one token (agent_token: 32
random bytes, kept as their SHA-256 alone, shown once). agents.create,
mine, newToken, revoke, delete and setKeys serve its owner;
agentSignIn.signIn exchanges the token for an ordinary server-side
session of a day, with the scopes identified and agent, at most 60
sign-ins an hour from a network. Revoking a token or making a new one
ends the agent's sessions; a token unused for 90 days lapses in every
service's pruning. Up to 5 agents a person, where the operator didn't
switch them off (AGENTS=off; said on the privacy page and in
instance.basics). An agent makes no agents, creates or owns no shared
space, is invited and raised as a Viewer alone, is never handed a
space on, is named no operator and granted no assistants; each refusal
has its test. Deleting a person deletes their agents first; an agent's
public profile names whose agent it is.

In the apps, every Profile has an Agents card (halkyon_app's
AgentsSection): made with a name and a handle, its token shown once to
copy, a new token, the token taken back, deleted. Learn's Share sheet
marks an agent among the members and offers it no role above Viewer.

The migrations, the module's and each host's (Learn, Meditate, Todo,
Train), are additive alone: CREATE TABLE "agent_account" with a unique
index on "agentId" (one row an agent account) and one on "ownerId" (a
person's agents, and deleting them with the person), and CREATE TABLE
"agent_token" with unique indexes on "agentId" (one token an agent)
and "tokenHash" (the sign-in finds the token by its hash). No existing
table is touched, so the server before the deploy keeps working on the
migrated database.

Whats-New: Make agents in your Profile: accounts for programs such as AI assistants, which sign in with a token and see only what you share with them.
Whats-New-De: Leg in deinem Profil Agenten an: Konten für Programme wie KI-Assistenten, die sich mit einem Token anmelden und nur sehen, was du mit ihnen teilst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-11 19:56:13 +01:00
..
20261019115750898 halkyon_base: a Serverpod module for sign-in, accounts and instance basics 2026-10-19 14:29:28 +02:00
20261019200558685 refactor(profile): handles and profiles move into halkyon_base 2026-10-22 18:11:07 +02:00
20261019202835333-deletion-notices feat(accounts): one account across an instance's services (ADR 0016) 2026-10-22 18:11:07 +02:00
20261020111123780-passwords feat(auth): a password with TOTP on the register, and resets 2026-10-22 18:11:10 +02:00
20261020124836165-sessions-ended feat(auth): change the password and the recovery phrase while signed in 2026-10-23 14:12:40 +02:00
20261020185619505-recovery-proof-key fix(auth)!: the recovery phrase is proved by a key of its own 2026-10-23 14:12:43 +02:00
20261020194005842-second-factor-waits fix(auth): codes wait after ten wrong in a row, and the owner is told 2026-10-23 14:12:44 +02:00
20261020204618337-session-code-tries fix(auth): a session's wrong codes end the session, not the account's codes 2026-10-23 14:12:47 +02:00
20261020211224310-email-code-purpose fix(auth): a code by mail serves only what it was asked for 2026-10-23 14:12:48 +02:00
20261021100319502-session-ended-warning feat(auth): a session ended for its wrong proofs warns its owner 2026-10-23 14:12:51 +02:00
20261021110159448-second-factor-paths fix(auth): codes after the recovery phrase count apart from the password's 2026-10-23 14:12:52 +02:00
20261021134802955-reset-hold-outs fix(auth): a hold-out moves a reset on only by its own time, and a reset lives 30 days at most 2026-10-23 14:12:59 +02:00
20261023181809816-oidc-module refactor(base): SimpleLogin's forwarding page on the OpenID Connect module (ADR 0023) 2026-10-24 09:17:47 +02:00
20261023192912859-simplelogin-keys feat(base): SimpleLogin accounts' keys without SRP, signing up in one call (ADR 0020, step 3) 2026-10-24 09:17:48 +02:00
20261025135744270-waiting-accounts feat(base)!: sign-ups as the operator says, waiting accounts, operators (ADR 0021, step 1) 2026-10-26 07:17:05 +01:00
20261025165102522-assistants feat(base,learn,todo): the operator's assistants, and the instance's privacy page (ADR 0021, step 2) 2026-10-26 07:17:06 +01:00
20261026140329453-assistant-budgets feat(base)!: one budget per person for all their assistants, the effort each takes, the operator's lists by page 2026-10-26 16:21:53 +01:00
20261110225132890-file-store refactor(base,learn): people's files kept by halkyon_base 2026-11-11 01:19:28 +01:00
20261111091525523-shared-spaces feat(base,learn): spaces people share, kept by halkyon_base 2026-11-11 10:54:19 +01:00
20261111100053843-shared-space-keys feat(base,app,keys): keys of shared spaces, sealed to each member 2026-11-11 11:35:42 +01:00
20261111145608468-shared-space-key-roll feat(base,app,learn): a shared space's key rolls once a member goes 2026-11-11 16:57:49 +01:00
20261111170118451-shared-space-invitations feat(base,app,learn): invitations to shared spaces by mail and by link 2026-11-11 18:36:21 +01:00
20261111182634082-agents feat(base,app,learn,todo,train,meditate): agent accounts with tokens 2026-11-11 19:56:13 +01:00
migration_registry.txt feat(base,app,learn,todo,train,meditate): agent accounts with tokens 2026-11-11 19:56:13 +01:00