• v0.9.0 5ee7cf665f

    v0.9.0
    All checks were successful
    / secrets-scan (gitleaks 8.28.0, all refs, redacted) (push) Successful in 5s
    / test (linux/amd64, full suite) (push) Successful in 1m33s
    / build linux/amd64 (push) Successful in 1m5s
    / build darwin/amd64 (push) Successful in 1m11s
    / build windows/amd64 (push) Successful in 1m10s
    / build darwin/arm64 (push) Successful in 1m10s
    / build linux/arm64 (push) Successful in 59s
    / build windows/arm64 (push) Successful in 59s
    / release (six binaries + checksums.txt, tag pushes only) (push) Successful in 1m4s
    Stable

    assistant released this 2026-11-16 14:54:35 +01:00 | 479 commits to dev since this release

    v0.9.0 — Server-auth: the C door opens

    The posture first, plainly — narrowed to two clauses, because
    the third is retired: the wire this release carries is an
    internal surface, not a contract. It exists because the
    CLI is its client and for nothing else: no stability is
    promised, it may change in any release without notice, and
    building against it is unsupported — a public, documented API
    for third-party tools is carved later from a stable shape,
    never the reverse. skuld serve still binds loopback by
    default
    , the wider bind the operator's explicit act, never a
    default, never incidental — and no longer an unprotected one:
    v0.8.0 shipped that wider bind with no protection and said so
    ("you own the exposure until auth lands in v0.9.0"); the
    exposure is now owned behind machine-token authentication,
    demanded on every endpoint
    — registration and the catch-all
    included, no route exempt. v0.8.0's "no authentication" clause
    is superseded on the schedule it named. This is the
    server-mode arc's second slice (core → auth → client →
    migration): the C door opens.

    The model in one reading: the server authenticates machines,
    and agents stay self-declared
    . Every request presents a
    machine token (Authorization: Bearer); every mutating request
    carries a required actor field — the --as self-declaration
    riding authenticated traffic — which the server records and
    never judges
    : no roster evaluation exists server-side (the
    thin wire keeps business rules with the caller), so one token
    serves every declared name and the owner gates evaluate on the
    declaration exactly as in local mode. The token value is
    opaque — sk_ plus 43 base64url characters of 32
    crypto/rand bytes, fixed 46, decoding to nothing — and the
    server stores only its SHA-256 digest: validation is
    digest-then-lookup, no token-value comparison exists anywhere,
    and a stolen or backed-up data root carries no usable
    credentials. With the demand, audit rows begin: every
    server-side state change appends {subject, actor, at, fact}
    rows — the authenticated machine and the declared agent as
    distinct fields, never merged — accumulating with no read
    surface yet (backlog: item-activity-log, which must answer
    audit in both modes). The trust boundary is stated, not
    hidden: a machine token is owner-equivalent — its holder
    may declare any rostered name, owners included — so tokens
    live only on machines trusted as the Principal (owned,
    harness-hosted, single-tenant), never on ephemeral runners or
    shared boxes; the environment that breaks that assumption is
    the documented trigger for reopening the model toward
    per-agent credentials, not a shape machine tokens quietly
    absorb — and the five guards this round lands (token
    records carry class and subject; audit carries both identities
    distinct; opaque class-agnostic values; no actor name in the
    token; the header orthogonal to the actor field — each
    verified individually) exist so that credential class, if it
    ever arrives, is an addition, never a rewrite. The proof stays
    executable: the store conformance suite — 74 clauses — passes
    unchanged over HTTP through the middleware (the harness
    composes the full authenticated stack), the authenticated wire
    adding no behavior and losing none — and a live end-to-end
    probe walks the operator's whole story against real
    processes: the first machine issued cold, the first project
    registered and the first fact committed over the wire under
    that token, both 401s (anonymous, dead value) proven on the
    paths beside it.

    Upgrading: no dependency changes — bbolt v1.5.0 and pflag
    v1.0.10 stand exactly as v0.8.0 shipped them — and local mode
    is untouched in behavior, the suite green tree-wide (20
    packages). The round arrives for operators running serve as
    new verbs and a new first motion: machine administration
    is host-local at the console — skuld machines issue|list|remove|rotate [--data <dir>] — its gate operator
    presence (whoever can run a process against the data root
    is the operator), held to a cold cadence: a running
    serve holds machines.db and audit.db (the data root's
    two new files, opened at startup, loud on corruption), so the
    verbs refuse fast on the file lock — stop, administer, start.
    Bootstrap needs no exception and admits none: a fresh server
    serves nothing until its operator issues the first machine,
    and that machine's client registers the first project — no
    not-yet-tokened path exists, wire or console. A v0.8.0 data
    root under this binary demands tokens from its first restart,
    so the upgrade motion is the same trio: stop, issue, start. A
    container-hosted server reaches the verbs through the
    container runtime or a run pointed at the store — operating
    instructions, not protocol surface; the machines help carries
    them. On each working machine, skuld token store <base-url>
    files the received token in the OS-user account (file 0600,
    directory 0700, outside every repository, one entry per
    server), reading it on stdin — argv and shell history stay
    clean; skuld token list and token remove administer the
    entries (origins render, values never); SKULD_TOKEN serves
    scripted contexts alone; and the environment and the store
    both holding a differing token is a typed client-side refusal
    (E_TOKEN_CONFLICT, exit 1) — no precedence rule, no silent
    preference, no request sent.

    What shipped

    • The middleware — the demand on every endpoint —
      «machine-token demand on every endpoint»
      (agent-authentication.md), «authenticated surface»
      (server-mode.md): a new server-side component (authn)
      composed at the serve root, wrapping the whole protocol —
      authentication precedes the wire, the wire precedes the
      engine. The exempt set is empty: every route — reads,
      the snapshot, the commit, the control plane's registration,
      the machine self-surface, the catch-all alike — demands a
      token. Registration holds the demand with no exemption
      (ruled 2026-11-16: no not-yet-tokened path exists, so a
      fresh server registers nothing until its operator issues
      the first machine); an unknown path answers the auth
      rejection before the malformed one, so an unauthenticated
      probe learns the demand before it learns which route. The
      credential rides Authorization: Bearer <value>: absent or
      unparsable is E_NO_TOKEN; a well-formed value the
      registry does not know — never issued, or issued and since
      removed — is E_UNKNOWN_TOKEN, the same answer for both.
      They render as the envelope's fourth family, auth, at
      HTTP 401
      carrying WWW-Authenticate: Bearer — a status
      bucket the envelope did not have — and the v0.8.0
      closed-set lesson extends verbatim: a new auth-level code
      joins three places together (protocol.md's family
      sentences, the audited domain catalogue, the envelope's
      authCodes closed set), under a pin test generalized to
      fail on any drift.
    • The token model — opaque values, digest records, the
      machine registry
      — «opaque class-agnostic token values»,
      «token records carry class and subject», «no actor name in
      the token», «token validity is its registry record»,
      «machine registry» (agent-authentication.md; ADR-023): one
      mint function produces sk_ + 43 base64url characters of
      32 crypto/rand bytes — fixed 46 characters, decodable to
      nothing, no class parameter in its signature, no name in
      the record's schema; the format is the class seam, so a
      future credential class mints through it
      indistinguishably. The registry is machines.db, its own
      bbolt file under the data root beside registry.db (the
      registry pattern repeated: each server-global fact its own
      file): key the 32-byte SHA-256 digest of the value —
      the server never stores the value — and the record
      {class, subject, created_at} in the canonical JSON every
      engine shares. Validation is digest-then-lookup: no
      token-value comparison exists anywhere to make
      constant-time, a stolen data root carries no usable
      credentials (digests are one-way), and value-uniqueness is
      key-uniqueness, mechanical. Validity is the record's
      current value and nothing else — no expiry, no lifetime,
      no revocation list; removal ends the machine and its token,
      rotation replaces the value with the record intact, never
      two valid values.
    • The declared actor — identity stays self-declared —
      «agent identity stays self-declared», «auth header
      orthogonal to the actor field», «owner-equivalent token»,
      «authorization capped at the owner flag»
      (agent-authentication.md): every mutating request — commit,
      registration, rotation — carries a required,
      grammar-checked actor field, and the two channels never
      substitute for each other: the token rides the header alone
      (the middleware reads only the header), the declaration the
      body field alone (the handlers read only the field) — a
      token in the actor field authenticates nothing; a bad token
      under a rostered name is an auth rejection; a valid token
      under an unrostered name is a roster rejection, the
      client's to render. The server records the declaration and
      never judges it — the owner gates stay with the caller over
      store data, exactly local mode's discipline over an
      authenticated transport — so the token's whole grant is the
      choice of declared name. The owner-equivalence boundary is
      restated where an operator reads it (the serve help):
      issue only on machines trusted as the Principal.
    • The registry's two faces — console administration, wire
      self-surface
      — «host-local token issuance», «console-only
      registry administration», «machine self-view on the wire»,
      «token rotation» (agent-authentication.md; ADR-025 final,
      ADR-026): administration is host-local and console-only —
      the four skuld machines verbs against the data root; no
      wire verb exists for it whatever token or declared name a
      request presents. Subjects are operator-chosen names (a
      machine, in the registry's sense, is its name, not
      hardware — one box may hold several entries, per-OS-user
      naming the convention, no server-enforced syntax); the full
      listing lives at the console alone, digests never render,
      and issuance prints the fresh value exactly once. The
      wire's registry surface is the caller's own entry alone:
      GET /machine returns the authenticated machine's own
      record — structurally alone, not a filtered collection: no
      other entry, not even a count, crosses — and POST /machine/rotate is parameterless, so rotating
      another's entry is not expressible on the wire: one
      transaction deletes the old digest key and puts the fresh
      one, the record untouched, the new value returned once
      — the only moment a value crosses the wire, over the
      channel the incumbent just authenticated — and the old
      value rejects E_UNKNOWN_TOKEN on the next request under
      it. Console rejections E_MACHINE_NAME,
      E_DUPLICATE_MACHINE, E_UNKNOWN_MACHINE join the audited
      catalogue (CLI discipline, exit 1).
    • The audit ledger — rows begin — «minimal audit rows»,
      «audit distinguishes subject from actor», «audit accumulates
      without a read surface», «audit rows never migrate between
      modes» (agent-authentication.md; ADR-024): audit.db, one
      server-level append-only ledger under the data root (the
      audit's question is trust-boundary-wide — its subject is a
      server-level machine and its scenarios cross projects),
      ULID-keyed rows in canonical JSON carrying exactly
      {subject, actor, at, fact} and nothing more — the fact
      named by its address, the same one-key-per-fact addressing
      the engines use (items/<code>, agents/<name>,
      registry/<acronym>, machines/<subject>, …), one row per
      applied op, a commit's row-set landing together in one
      transaction. The actor's meaning is carriage-determined —
      the declared agent name over the wire; the fixed role
      marker operator, never a rostered name, at the console —
      the subject the machine concerned either way, no origin
      mark, no fifth fact. Three append seams, single and
      visible: commit, registration, machine writes (console acts
      and wire rotation alike). Reads append nothing; rejected
      requests append nothing. Rows are records, not state — they
      append after the fact commits, so a crash in the gap leaves
      a bounded recording gap announced loudly in serve's log,
      never a false row, never a landed commit re-reported
      failed (proven by failure injection: a refusing ledger,
      zero rows, every answer standing). No verb, endpoint or
      query reads a row; local mode has no audit.db, and
      export and import never carry one.
    • The client half — the OS-user token store and the
      conflict-refusing resolver
      — «client token store keyed by
      base URL», «env-var token resolution», «token-source
      conflict refusal» (agent-authentication.md; ADR-025, its
      original resolution order superseded by ADR-026):
      <UserConfigDir>/skuld/tokens.json — file 0600, directory
      0700, atomic temp-and-rename writes, corrupt reads loud,
      never a silent reset — one opaque string per normalized
      origin
      (scheme and host folded, the path stripped, the
      scheme-default port elided: http://Host:8420/ and
      http://host:8420 are one entry), the value and nothing
      else — the store never grows a class dimension. Three
      project-less verbs: skuld token store <base-url> reads
      the token on stdin; token list renders origins, never
      values; token remove drops an entry (a clean, truthful
      no-op on an absent origin). Resolution is a validation,
      not a preference
      : SKULD_TOKEN (set and non-empty) and
      the store entry are the two sources — exactly one present,
      or both in agreement, authenticates; both present and
      differing is E_TOKEN_CONFLICT, a typed client-side
      refusal (the CLI-raised set, exit 1) naming both sources
      and the remedy — no request sent, no precedence rule
      anywhere. The rule lives in one pure, table-tested
      resolver; its end-to-end pin rides the client epic
      (v0.10.0), which consumes store and resolver unchanged —
      httpstore already carries its identity seam
      (WithIdentity(token, actor)).
    • The proof — executable, as ever — the conformance suite
      green 74/74 over HTTP through the middleware (the
      harness composes the full stack: a seeded test machine, its
      registry and ledger, authn.Wrap), the contract untouched;
      the five guards verified individually — the self-view
      renders exactly the own record even with other machines
      seeded, raw ledger rows show subject ≠ actor in exactly
      four fields, minted values carry no class, project or
      actor substrings, the mint's types accept no name, and the
      middleware reads only the header — and the adversarial
      probes are green under -race: six-way concurrent
      self-rotations of one machine resolve as exactly one
      winner with exactly one audit row, every loser holding a
      dead value; a rotation racing a commit never yields a
      third answer, and every landed commit keeps its rows
      though its credential died mid-flight. The tester's live
      flow walks the operator's story end to end against real
      processes: issue cold, serve, register over the wire,
      commit a fact with the actor field, self-view 200,
      anonymous E_NO_TOKEN and dead-value E_UNKNOWN_TOKEN on
      the paths beside — and the cold-cadence refusals land
      fast, naming machines.db.

    The round, in brief

    One epic, four tasks, one lane (v0.9.0), sequential. The
    shaping pair landed on dev first: server-auth-frs (529a5c9 —
    agent-authentication.md's 18 FRs; server-mode.md's «no
    authentication in the first cut» rewritten in place as
    «authenticated surface», the stale pointers swept) and
    server-auth-adrs (137d3db — ADR-023 (the token model, digest
    records, the middleware in front of every endpoint), ADR-024
    (the server-level audit ledger) and ADR-025 (issuance
    carriage, the client store, the token sources), plus the four
    auth component docs). Mid-round, the Principal's 2026-11-16
    rulings closed the design's open corners: the spec grew to 22
    FRs (d94dadf) and ADR-026 folded the rulings verbatim into
    the landed design (b6ef978) — issuance final host-local, the
    registry's wire self-surface, console-only administration
    with the operator marker, rotation as pure replacement, the
    conflict refusal superseding ADR-025's original order. Then
    the code in two halves: server-authn-middleware (PR #51,
    merge d9981e9 — the wire half: the middleware, the auth
    family at 401, the required actor, the self-surface, the
    audit seams, the generalized pin, the adversarial probe suite
    riding the branch) and server-token-issuance (PR #52, merge
    14c727f — the console half: the registry's admin surface with
    direct unit tests, the machines and token verbs, the
    conflict-detecting resolver, the live probes). One
    corrections batch followed the reviews (4ba7ad3 — authn.md's
    context accessor and the origin path-stripping wording, the
    built code the arbiter both times), the lane retired after
    the final merge, and local mode closes the round untouched —
    every gate green: full suite (20 packages), gofmt, vet,
    -race.

    Downloads