Commit Graph
1492 Commits
Author SHA1 Message Date
sam fd75c29cbb docs(agents): make the gate gate the commit
Two rules added to the quality-gate step, both learned by getting them wrong
tonight.

The gate must gate the commit: one conditional chain, so its exit status is what
decides whether the commit runs. Written as separate statements on one command
line it is decorative, because nothing reads its status but the operator -- the
failure is discovered after it has already been pushed.

And never assert a gate result that was not just produced on that exact tree. A
commit message outlives the tree it describes and is read by people who were not
there; if the tree has moved, describe the change and let the run speak.

AGENTS.md is a symlink to this file, so the edit belongs here.
2026-09-22 15:19:59 +10:00
sam 03847dadfb fix(state): carry event attribution across the state-store boundary
The live path recorded actor_id, actor_kind and principal_id as empty while the
actor was named inside the event's detail text. The daemon records the event and the
State Store holds it, and the contract between them did not carry the three fields,
so the columns were empty by the time anything could query them. An audit query
reading actor_id found nothing and "who approved this" meant parsing a
human-readable string -- the transient, unqueryable attribution this work exists to
replace.

The in-process test passed throughout because it used the local store and never
crossed that hop. The new test runs the same insert through the local adapter AND a
bufconn-backed gRPC client and asserts the columns on both, so the two paths cannot
disagree again.

Verified: task check exit 0 on this tree; the new test passes in both modes. The
grpc mode is reasoned to have failed before this change -- the field did not exist on
the contract, so it could not be set or read -- but that is inference from the
mechanism, not a run I performed against the old code.
2026-09-22 15:13:55 +10:00
sam 19ee3ac8af chore(release): archied v1.37.0 2026-09-22 15:05:30 +10:00
sam 60f04a351a feat(curator): definition-driven engine with tool-carrying passes
Phase 1 of dynamic curator definitions (archie-core-trnd.1):

- ToolBuilder implementation resolves declared tool names from the
  daemon's process-wide tool registry, returning exactly the declared
  set and failing closed on an unknown name.
- curatorLLMRunner now carries ChatRequest.Tools and MaxSteps into
  core.GenerateOptions and widens ChatResult with the executed tool
  calls so a pass can attribute its actions.
- One generic DefinitionEngine interprets a Definition (Manifest +
  name/enabled/instructions): its pass composes instructions with the
  built declared tool set, runs the model loop, and records an action
  per tool invocation.
- [[curators]] config definitions carry the Manifest shape verbatim plus
  name/enabled/instructions; a definition missing interval is refused,
  never defaulted.
- Idle curators are observable: the runtime logs a debug line when Check
  reports not-due.
2026-09-22 15:05:24 +10:00
sam debeb869bb fix(webui): send a refused browser to sign in, and drop an unused method
Two loose ends from the sign-in work, both mine.

A browser that cannot authenticate now goes to the provider when this instance has
a sign-in flow, instead of being shown the shared-token paste page -- a page that
cannot help it, because the token it would paste is not what this instance accepts.
A refusal that signing in again cannot fix, a suspended identity, is still answered
rather than redirected: sending someone back to a provider that already authenticated
them would hide the reason they were refused.

ProviderSession.Expired is removed. Nothing called it, and it must not: expiry is
the verifier's check, and a second opinion about whether a token is still good is
exactly the sort of near-duplicate that drifts from the authority it copies. The
browser path re-runs the flow when verification refuses, which is one rule rather
than two.

Verified: task check exit 0 on this tree.
2026-09-22 15:02:27 +10:00
sam 79f521b65b feat(webui): let a person sign in and act as themselves
The last gap in the identity boundary: enabling a provider used to lock browsers
out, because nothing could turn a sign-in into the credential the dashboard already
verifies. Now a browser completes the authorization code flow with PKCE and the
identity reaching the request context is the person who signed in.

The audience is requested AT THE AUTHORIZATION ENDPOINT, not only at the token
endpoint. Infra measured that a provider asked otherwise returns the audience empty,
and this dashboard then refuses a perfectly valid token -- a failure that reads as a
signing fault and is actually a missing query parameter. A test asserts the
parameter is present, so it cannot quietly go missing.

The flow is the libraries': discovery, the code exchange, PKCE generation and the
challenge transformation are go-oidc and x/oauth2, so archie writes no protocol. The
token returned by the exchange is verified through the SAME Verifier a presented
token goes through, and the identity is then resolved through the same rule -- one
Resolve now shared by Authenticate and the callback, so a browser sign-in cannot be
accepted on terms a presented token would be refused on.

Archie still issues no session. The callback stores the PROVIDER's token in an
HttpOnly cookie and every later request re-verifies it, so what archie holds cannot
outlive the provider's own decision. The callback checks the state it issued, and
expires the state and PKCE verifier cookies on use.

The sign-in routes mount on the bypass mux because they are how a caller becomes
authenticated; gating them behind the credential they obtain would make signing in
impossible. The client secret is never a flag: -oidc-client-secret-env names the
environment variable holding it, so it cannot reach a process listing or a log line.
No client id means no sign-in route and token verification is unaffected, which is
what an agent-only deployment wants.

Evidence, produced by driv·ng the flow rather than the seam:
internal/webui/api_tasks_actor_test.go's TestBrowserSignInRecordsTheSignedInPerson
walks sign-in -> callback -> cookie -> action and asserts the recorded actor is the
signed-in person with human_approved. TestCallbackRefusesAMismatchedState asserts a
replayed state is refused before any credential is verified.
internal/infrastructure/oidc/flow_test.go runs the real flow against a test
provider's own authorize and token endpoints, asserting the audience parameter, the
PKCE challenge, a successful exchange, and a refused wrong verifier.

Verified: task check exit 0 on this tree.
2026-09-22 14:59:03 +10:00
sam 0d6989e02c test(deploy): only require a version path where one is missing 2026-09-22 14:55:27 +10:00
sam e2df486d60 ci(deploy): derive the commit by dereferencing the ref, and stop stamping bare dev
Two defects, both from consuming a ref's object id as if it were a commit.

1. IMMUTABLE IDENTITY. Both images published only `:latest`, so a deployed
   artifact could not be traced to a commit or restored. Each build now also
   publishes `sha-<commit>`. The commit is NOT `github.sha`: on a tag push that
   is the ref's object id, and every release tag in this repo is annotated —
   measured, 80 of 80 archied/v* and archie/v* tags are tag objects (archied/
   v1.36.0 points at 6720bc42 and dereferences to c25f8d39). So the new step
   resolves `git rev-parse "${GITHUB_REF}^{commit}"` and the tags use that.
   Annotated tags are the right thing for the producer to create; the consumer
   stops guessing rather than the tag type being downgraded.

2. NO BARE dev STAMP. `[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION=dev` made a
   main build indistinguishable from any other, and is why a release's stamping
   looked transient: the next commit to main republished :latest as plain `dev`.
   The fallback is now `dev+<short sha>`, so an unreleased build is identifiable
   and visibly not a release. The warning at the gate now states the consequence
   it previously only implied.

Scope: this file only. Nothing else in the checkout was touched.
2026-09-22 14:53:04 +10:00
sam ec0f17a7ad feat(update): let every host binary report its version, and refuse skew
The updater is component-driven: it compares the daemon and agent versions and
acts only when they differ, so a host whose individual binaries disagree looks
healthy. Carina ran a hand-installed archie-messaging 1.35.0 against a 1.30.0
state store and crash-looped on an RPC the older store does not serve, while
the updater reported "no approved component changes; nothing to install".

The reason a comparison was impossible: three of the six host binaries carried
no version at all. archie-ui, archie-messaging and archie-playbooks did not link
internal/app/archied, so the release ldflags never reached them; the gateway and
state store linked the variable but exposed no flag. Only archied could say what
it was.

- internal/buildinfo carries Version, stamped by all three build sites: the
  zip, install.sh, and the updater itself.
- Every host binary answers -version ("<name> <version>"). archied's existing
  two-line output is unchanged, because something parses it.
- archie-update-install reads each installed binary before it can report
  "nothing to install" and refuses, naming every binary that disagrees with the
  daemon's version; after an install it verifies the same set against the
  release it just installed, so a binary the release did not rebuild is skew
  rather than success.
- TestDistZipShipsEveryHostCommand pins stamping across the three build sites
  and requires each cmd/ to report, so a seventh command cannot arrive unstamped.
2026-09-22 14:52:18 +10:00
sam 8e4e353805 feat(identity): attribute a task action to the identity that acted
The transport could carry an actor and nothing filled it. It does now, so a
dashboard approval is recorded as the person whose credential verified, and an
agent's token is recorded as the agent's action -- for an agent, agent_approved;
for a person, human_approved; and for a caller whose identity archie could not
verify, task_approved, which claims nothing about who did it.

The actor travels the path the action takes: webui reads it from the request
context the middleware resolved, carries it in the gateway request, the daemon
passes it through the in-process adapter, and the NATS request body carries it to
the service that records it. Scope stays separate from actor at every hop, because
scope is which task a caller may touch and the actor is who touched it.

A chat channel's bound identity is an actor too: a bot acting on its own channel's
task is recorded as an agent's action rather than a person's, via ActorFromScope,
whose empty kind is what keeps it out of human_approved. The agent-facing
task_action tool passes that identity and never input["identity"].

The UI process's credential check is now filled by endpoint references rather than
by configuration: -oidc-issuer and -oidc-audience on archie-ui, two URLs the
process already understands the shape of, with the verifier built in Run because
cmd/ parses flags and nothing else. The UI package still never reads config, and a
configured provider that cannot be reached fails boot rather than falling back to
the gate that names nobody.

Evidence for this change, stated as measured: go build ./... and go vet ./... are
clean, and every package this touches passes -- webui, domain/taskactions,
infrastructure/taskactions, infrastructure/gatewayrpc, gateway, app/archieui,
app/archied, domain/messaging, channels/telegram, cmd/archie-ui. task check could
not be run to completion: it fails in cmd/archie-messaging on an untracked
internal/buildinfo package another lane has in flight, which is not this change and
was left untouched. The end-to-end flip is covered in
internal/webui/api_tasks_actor_test.go: a person's credential produces a record
naming that person with human_approved, an agent's produces agent_approved, an
unverified request produces task_approved with no actor, and a request carrying
forged actor fields cannot name one.
2026-09-22 14:52:10 +10:00
sam d9d11bb872 test(webui): use a request context in the identity check tests
The noctx linter refuses httptest.NewRequest, which carries no context. The
requests these tests build are the ones an authenticated caller sends, so they
belong on a real context rather than a background one.
2026-09-22 14:46:16 +10:00
sam 9dc1a085c8 feat(webui): verify a provider credential on a request path
The verifier was a library nothing called. A request now carries a credential or
is refused: webui.Server.Authenticate resolves a presented bearer token to the
identity that may act, and requireIdentity attaches it to the request context.
With a provider configured that check replaces the shared token, so every request
resolves to a named identity or is refused; with none, the shared-token gate stays
for a loopback instance.

Nothing about the caller is read from the request. The subject comes from the
credential the provider signed and the identity is the record that subject is bound
to, which is what makes attribution possible at all: a caller cannot assert who it
is, it can only present what the provider gave it. A test sends an
X-Archie-Identity header and an actor field in the body alongside a valid token and
asserts the resolved identity is still the credential's.

Refusals follow HTTP's own distinction: absent or unverifiable credentials are 401
and name the scheme, while a credential that verified for an identity that may not
act is 403. Each is covered, because a refusal path with no test is a path nobody
has watched refuse.

The two state-store RPCs the dashboard needs to resolve a subject exist:
ResolveIdentitySubject and BindIdentitySubject, with the client implementing
identity.SubjectBinding (a narrower contract than Repository, so the administrative
facade keeps its shape) and the server answering Unavailable rather than pretending
when a process has no binding store.

chat.proto carries the actor for the next step: actor_id, actor_kind and
principal_id on ApplyOperatorTaskActionRequest, regenerated here. The transport can
now carry an attribution and nothing fills it yet, which is why the dashboard still
records task_approved rather than a human attribution.

Not wired in production yet, and worth stating plainly: dep.Authenticate is a seam
nothing sets, because the dashboard is served only by the UI process and that
process is documented to take endpoint references only -- there is deliberately no
config.Config in it. OIDC settings must therefore arrive as flags there, which is an
existing design boundary I did not want to cross unilaterally. config.Oidc exists
so the daemon-side wiring has somewhere to read from.

Verified: task check exit 0 after this commit; focused webui run records the
resolution and all four refusals.
2026-09-22 14:43:20 +10:00
sam 3d6accd7e9 feat(install): write a unit for every host service
install.sh built and installed five host binaries but wrote only
archied.service, so a fresh install ran one of five services and the updater
refused its own first update for units the installer never created
(archie-core-enow). The runbook stood in as the mechanism, which is the
hand-written step that let a messaging binary and unit drift apart
(archie-core-1c01).

- install.sh writes archie-state-store.service, archie-gateway.service,
  archie-ui.service and archie-messaging.service alongside archied.service,
  with the contents the runbook used to tell an operator to paste, and starts
  all five with the store first.
- deployments/systemd-user-service.md no longer carries the unit contents; it
  names the units, explains why each exists, and points at
  systemctl --user cat and drop-ins for inspection and overrides.
- The updater's unmanaged-unit refusal now reads as a safety net for a host
  that drifted rather than the normal path.
2026-09-22 14:41:38 +10:00
sam 323870a9f6 fix(release): build and guard every host service the installers manage
install.sh built five of the six host commands, omitting archie-messaging, and
scripts/archie-update-install's guard only checked that every listed service had
a unit -- never that every host unit was listed. A v1.30.0 updater with the old
list therefore neither backed up nor restarted the messaging service, leaving a
hand-installed binary running under an otherwise updated host (archie-core-1c01,
archie-core-1faq).

- install.sh builds archie-messaging, and its summary names it.
- The updater refuses when a host unit this release ships is not in
  GATEWAY_SERVICES, naming it, alongside the existing refusal for a listed
  service with no unit.
- TestDistZipShipsEveryHostCommand -- the name deploy.yml:255 already promised --
  now pins all four lists to cmd/: the zip's build loop, the zip's copy list,
  install.sh's build loop, and the updater's GATEWAY_BINARIES/GATEWAY_SERVICES.

A fresh install still seeds only archied.service; that gap is tracked separately
as archie-core-enow.
2026-09-22 14:38:10 +10:00
sam 179c1c8e8f fix(identity): derive the caller the way the provider issues tokens
Infra decoded real tokens from both clients, and two of the three facts changed
this code.

A machine token carries NO sub at all: it names its caller by client_id, and the
identity is that client. A person's token carries sub, the provider's stable
identifier for the person. The subject is now derived explicitly -- sub when
present, else client_id -- and a verified token asserting neither is refused
rather than accepted as an anonymous caller, because accepting it would let any
token the provider ever signed act as whoever the binding happened to hold. A
machine identity is therefore per client registration, one identity per client,
which is what makes per-agent identity a configuration decision rather than a code
change.

Scopes are read from either claim shape. The standard is a space-delimited scope
string and this provider also emits an scp array; reading only one shape yields no
scopes at all, which is worse than reading none deliberately.

The audience-at-authorisation-endpoint trap is pinned by a test: a token minted
without the requested audience arrives with aud empty, and the audience check
refuses it. That refusal is correct and the fix is the request the human flow
builds, not a weaker check here -- a test now fails if anyone weakens it.

The PRD records both as constraints: a person's client and an agent's client are
registered separately because a shared registration collapses the distinction the
attribution rests on, and a person's token requests the audience at the
authorisation endpoint as well as the token endpoint.

Verified: task check exit 0; internal/infrastructure/oidc passes, including
subject derivation for both token shapes and every refusal.
2026-09-22 14:37:58 +10:00
sam a7d6f71d5a feat(identity): verify provider tokens and attribute task actions to their actor
Two halves of one boundary: a credential resolves to an identity, and an action
records which identity acted and whose authority it used.

resource server. internal/infrastructure/oidc verifies a provider-issued bearer
token against the provider's published keys, using an OSS OIDC library: archie
compares no signature, validates no claim and rotates no key itself, holds no
client secret and issues no session, so a compromised archie cannot mint an
identity. Audience is required rather than optional -- a token minted for another
service must not authenticate here -- and discovery happens at construction, so an
unreachable provider is a startup failure rather than a request-time surprise.

identity.Authenticate is the single place a credential becomes an identity, and it
refuses in four distinguishable ways: no credential presented, a credential that
did not verify (wrong key, expired, wrong issuer, wrong audience, malformed), a
verified subject with no identity bound to it, and an identity that may not act.
The order is deliberate: verification happens before any field of the token is
used, so nothing an unverified token carries can select an identity. A suspended
identity is refused even though its credential verified, because suspension is
archie's decision and must not depend on the provider withdrawing a token.

The binding is the second bridge beside the legacy-name alias: identity_subjects
keys (issuer, subject) so the same subject string from another issuer is a
different caller, and rebinding moves a subject so two identities can never claim
one provider subject. The contract Authenticate needs is SubjectResolver, narrower
than Repository, so a consumer that only authenticates does not take the whole
identity CRUD surface -- and staterpc.Client, which asserts Repository, does not
need a new RPC to satisfy it.

attribution. taskactions now records two identities per action: the acting
identity and the authorising principal, both on the event row as new columns added
through the existing migration table. The rule that the bug turned on is enforced
by the event kind describing the actor: a person's approval is human_approved, an
agent's is agent_approved, and an action with no verified actor is task_approved,
a task-level event that credits nobody. An agent acting under a person's standing
approval records itself as the actor and that person as the principal, so
"approved by came from me" is answerable from the record rather than asserted.
Scope and actor are separated: scope decides which task a caller may touch and is
never promoted into an actor, because the dashboard's credential is a shared token
and possession of it is not evidence that a person was at the keyboard.

That last point is a deliberate fidelity trade, and the reason the transport is
not wired: the dashboard action path passes no actor yet, so dashboard approvals
are now recorded as task_approved rather than claimed as a human's. Recording
nothing false is the requirement; naming the human verifiably needs the dashboard
to authenticate a token and resolve it, which needs two new state-store RPCs
(ResolveIdentitySubject, BindIdentitySubject) -- the next piece, not a rewrite:
the verifier is a one-method interface, so introspection would be a second
implementation of it.

Verified: task check exit 0; focused runs recorded in the handoff. Opaque
authelia_at_ tokens were inspected rather than assumed and cannot be verified
against public keys; infra is configuring access_token_signed_response_alg RS256
on the archie client, with audience https://archie.catlow.cloud and issuer
https://auth.catlow.cloud.
2026-09-22 14:34:16 +10:00
sam 06800c621a fix(release): attribute packaging and installer changes to archied 2026-09-22 14:28:27 +10:00
sam c25f8d3956 chore(release): archied v1.36.0 2026-09-22 14:22:21 +10:00
sam dd7cb8b16f chore: ignore local development certificates
An mkcert-generated private key was created in the repository root while
setting up a secure context for local WebMCP work. It was untracked and
unignored, so any 'git add -A' would have committed it; the key now lives in
~/.config/archie/tls and these patterns keep the next one out.
2026-09-22 14:11:55 +10:00
sam 2cb2275eb6 docs(prds): settle identity for users, agents and external agents
One identity record covers users, agents, external agents, service accounts and the
system. Authentication is delegated to the estate's OIDC provider and attribution
stays archie's. Nothing that verifies a credential, issues a session, stores a
password or checks a permission is built here, per Sam's hard requirement that
authentication and authorisation are OSS archie integrates.

Authelia is the only provider, because the estate already runs it in front of the
dashboard and it issues credentials for both kinds of caller: authorization code
for humans and client_credentials for machines, whose subject is the client's own
identifier. Each agent is its own client, so two agents are distinguishable in the
audit trail and revocable separately. SPIFFE/SPIRE is rejected on operational fit
rather than quality: it is adopted and its attestation is strictly stronger, but it
adds a control plane archie does not have and answers a threat archie does not face
while its agents run in containers the operator launches.

internal/domain/identity survives and is not replaced by the provider's directory,
because it carries what the directory does not: lifecycle, bindings and
attribution. archie owns the subject binding that ties an identity to the provider
subject asserting it -- the same bridge identity_aliases already provides from a
legacy name -- plus the lifecycle, the attribution and the identity audit trail. It
owns no credential, password, session, token, signing key or permission rule.

How an agent proves who it is: it presents a token the provider issued to its own
client, archie validates it against the provider's published keys and takes the
subject as the acting identity, so an agent holds the secret and archie holds only
public keys. A WebMCP tool call cannot be a proof of agent identity and cannot be
made one -- a page can invoke its own tools, so an agent's call and a page script's
call arrive identically and the difference does not exist on the wire. It is
attributed to the identity the request presented with its source as a hint, and it
never records that an agent acted or that a human approved. Agent-initiated action
therefore arrives on a surface that carries a credential.

Task actions gain both attributions: the acting identity, derived from the
credential and never from a supplied string, and the authorising principal whose
authority the action used. The event kind describes the actor, so
KindHumanApproved is recorded only when a human acted; an agent acting under a
standing approval records itself as actor and the human as authorising principal.
An action with no authorising principal is unattributed rather than attributed to
the actor's own authority, and the review gate's approver is the approval's
authorising principal, not the surface they used.

External agents are first-class: the same record, kind service_account, bound to
its own provider client, at the cost of a client registration and a secret to
rotate per peer. Authorisation is deferred: no engine, no policy language, no
decision point, with the credential's scopes as the only input; the decision point
goes behind a single archie interface when per-skill limits are needed.

The PRD is a development-audience page, so it regenerates dev-docs.json to 69
pages. Verified: task check exit 0, including docs:prds.
2026-09-22 14:10:55 +10:00
sam 2b0439b181 docs(webui): note the mkcert fix for local WebMCP testing
The header's secure-context note no longer reads as a dead end: 127.0.0.1 is
already a secure context, and mkcert gives a LAN address or hostname a
locally-trusted certificate, so a plain-HTTP origin is a configuration gap with
a known local fix. Production terminates TLS in front of the dashboard.
2026-09-22 14:07:40 +10:00
sam 9b90c4a38b docs(webui): record that WebMCP calls are not agent-attributable
A WebMCP tool call cannot be attributed to an agent: the page can invoke its own
tools with executeTool, so an agent's call and a page script's call reach the
server identically. A durable record can honestly say only that the actor was
the signed-in identity and the source was webmcp -- a hint, not proof -- and
must never claim a human approved. Real agent attribution needs the agent to
authenticate with its own credential, which is the A2A work where an agent is
an Identity.
2026-09-22 14:03:56 +10:00
sam ea81f5053e docs(webui): record the WebMCP deployment and error-shape traps
The module header now records the two ways the tools go silently missing: a
secure context is required, so a plain-HTTP dashboard exposes nothing even with
the origin-trial flag, and archie-ui embeds ui/dist, so rebuilding the bundle is
not deploying it and a stale process reports the tools as absent. It also
records that executeTool flattens a thrown execute error into a generic
UnknownError, which is why the confirm guard is pinned by a unit test rather
than by a browser run.
2026-09-22 14:00:42 +10:00
sam 5d2dc3d4ca feat(webui): require explicit confirm on WebMCP recovery tools
The three recovery tools now carry a required `confirm: true`, rejected before
the API is touched when absent. It is a deliberate-action signal, not a
security control -- an agent can pass it trivially, and the module header says
so. Its value is making the model state intent rather than reaching for a
mutation mid-sentence.

The module headers also record two things this work learned the hard way: the
API's three string/object shape traps (inputSchema and executeTool's input and
result are JSON strings, not objects), and the advisory status of the
annotations -- Chrome 152's getTools() reports only readOnlyHint and
untrustedContentHint and drops consequentialHint, and a page-invoked
executeTool gates nothing. Nothing here is enforced by the browser. The tools
run in the signed-in operator's session and cannot exceed that operator's
rights; that is the security model.
2026-09-22 13:57:31 +10:00
sam 2cb2b0c638 feat(webui): publish WebMCP tools for the dashboard
Register the dashboard's own tools with document.modelContext so an in-page
agent can read tasks, events, and daemon health, and recover a stuck task:
list_tasks, get_task, recent_events and daemon_health (read-only), plus
retry_task, stop_task and cancel_task (consequential). The human review gate
(approve/reject) and the destructive verbs (abandon/archive) are deliberately
not exposed.

Every tool calls the same ui/src/lib/api.ts client the interface calls, so the
agent and the UI exercise one set of endpoints, one CSRF header and one error
shape. Registration is framework-agnostic (lib/webmcp.ts machinery,
lib/webmcp-tools.ts list, lib/archie-webmcp.ts the api binding) and no-ops when
document.modelContext is absent, which it is outside the WebMCP origin trial.
Tools returning agent, operator or inbound content carry untrustedContentHint;
only the recovery actions carry consequentialHint.

Verified in system Chrome 152 with --enable-features=WebMCP: seven tools listed
with schemas and annotations, all four read-only tools executed against the live
dashboard, and the flagless run mounts the dashboard with no exception.
2026-09-22 13:53:41 +10:00
sam 85e27e3778 docs(prds): cement A2A as the agent-to-agent protocol
Sam's decision, recorded as requirements rather than options. A2A carries
agent-to-agent work: discovery of what a remote agent offers, delegation of a unit
of work, progress on it, and the artifacts it produces. MCP stays the tool layer --
the two are complementary, and internal/tools/provider already registers MCP
providers as optional capabilities. A2A rides archie's existing transports, which
the protocol permits: its canonical data model is Protocol Buffer messages and it
defines a gRPC binding, so archie speaks it over the gRPC and NATS it already runs.

The boundaries are requirements. internal/domain/messaging stays the human and
channel layer, because a Conversation is a ChannelID and a ThreadID and its
participants are people. internal/agentexec stays the daemon-to-worker execution
protocol, whose Request, Result, gate and budget policy A2A never carries. A2A is
an edge protocol that composes with both.

The load-bearing decision, and the one that constrains everything downstream:
archie's work lifecycle is MAPPED to A2A's, not expressed in it. An A2A task is a
view over archie's own task, and archie's status stays the record of truth. Three
gaps make the mapping partial, and each is a fact A2A's states cannot hold: A2A's
terminal states describe what the agent did, while archie's merged and rejected
describe what a forge did afterwards; pr_open hands work to a human reviewer, while
A2A's input-required means the CLIENT must send more input; and declined, parked
and dead are outcomes of archie's own policy. Adopting A2A's state names as the
persisted task status is rejected outright -- it would migrate the task store and
drop the forge outcomes that tell a caller whether the work was accepted.

An A2A agent is an Identity: the actor archie persists, versions and scopes
credentials to. A persona is prompt text with no endpoint; an agent container is
task-scoped and ephemeral; the daemon is the process that serves the identity. The
Gateway serves the card for the identity it is configured as, over the gRPC
binding's Get Agent Card operation, and the card is derived -- skills from the
catalog, identity from configuration, capabilities from what the process already
advertises -- never hand-written, and carries no secret.

archie is a server first, because the work a peer would delegate exists only inside
archie. An inbound call is authenticated at the transport by the bearer-token
interceptor the Gateway already applies: A2A carries no identity in its payload, so
the transport credential is the identity. Authorization is per skill, which is
A2A's own model. Task-scoped grants are not A2A credentials -- reusing one would let
a peer act with a worker's authority -- and the dashboard's authentication gates an
operator interface, not an agent endpoint.

The new PRD is a development-audience page, so it regenerates the development
artifact rather than the public one: dev-docs.json goes to 68 pages and
docs.json is unchanged.

Verified: task check exit 0, including docs:prds, and both docsite checks.
2026-09-22 13:45:06 +10:00
sam a75df5eb0c feat(docs): split the published set by audience, public and development
The site's sidebar held the landing page and one guide next to seventeen
architecture records, the migration register, the review procedure and five
PRDs. Nothing there is secret -- every development page may be read by anyone --
but a reader who wants to know what Archie is and how to point an event at it
was meeting contributor material with no signal that it was not for them.

One source tree now yields two sets: public (index, guides/) under /docs/, and
development (architecture/, prds/) under /dev/, each with its own artifact and
its own derived sidebar. archive/, inspiration/, news/ and the credential notes
stay out of both, unchanged.

Selective PRD publication is gone rather than carried over. It existed only
because settled architecture cites PRDs and a link to a held-back target fails
the generator, so five PRDs published to keep those citations alive; with both
halves of every such citation in the development set, the exception has no work
left to do. Both sets are generated in one pass over one url map, so a citation
that crosses between them resolves to the base its target is served under, and
the refusal now fires only for a target genuinely in neither set.

Widening the set exposed a scanner bug worth its own note: the link regex
matched `Resolve[T](i, src, exportPath)` inside a code span and refused the page
for a link to `i,`. Code spans and fenced blocks are now skipped, because what a
renderer draws as a link is the only thing this tool may rewrite or refuse a
page for.

docs/prds/public-and-dev-docs.md records the decision. Draft: the three choices
in it are the maintainer's, the write-up is not yet reviewed.
2026-09-22 13:41:13 +10:00
sam 54ee79553f docs(site): describe archie as an event-driven agent platform
The landing page still opened with "archied is a resident daemon that polls a
forge", which is wrong twice over. A deployment is a set of contracted services,
not one process, and a forge is one event source among several: signed webhooks
from any sender and chat-channel messages reach the same playbook routing that a
GitHub or Gitea issue does. GitHub/Gitea was the first case, not the shape of the
product.

The intro now leads with the event path (event -> playbook -> workflow in an
isolated worktree) and says outright that sources, their fields, and the workflows
they reach are configuration rather than code. "What runs where" names the actual
services and which contract each owns. The stray "Work arrives as events." line
went with it, since the intro now states that.

Claims are held to what ships: module actions load and type-check but are not
dispatched yet, so the page promises one outcome per event, not a fan-out.
2026-09-22 13:24:23 +10:00
sam cb789023c1 fix(build): stamp installtype.buildType on every dev-build command
task build already stamped archied, archie-gateway and archie-agent with
installtype.buildType=binary, but archie-state-store, archie-ui and
archie-messaging were built unstamped. A binary built by task build is
then permanently un-updatable: releaseupdate.Service.Install refuses on
installtype.Unknown.

Add the same stamp to the three missing go build commands and pin the
contract with a root-level deployment test that fails when any go build
line under the build task's cmds targets ./cmd/<name> without the stamp,
naming the offending command.
2026-09-22 13:20:11 +10:00
sam 457ad8843e docs(site): drop the internal-invariant clause from the landing intro
The intro stated per-task sandbox and credential isolation and daemon-owned
git to a reader who has no reason to act on it. Keep the event framing; the
enforcement detail stays in What runs where and ARCHITECTURE.md.

Regenerate docs/data/generated/docs.json with task docs:artifact.
2026-09-22 13:06:51 +10:00
sam 1b54a18e43 feat(docs): emit the canonical public-docs artifact the app renders
MkDocs retires and the Astro app becomes the only public site, so the artifact is
the product and the Markdown stays the source -- the split tools/newsgen already
states for releases. tools/docsite walks the published set and writes
docs/data/generated/docs.json: every page's directory-style url, title, section and
raw Markdown body, plus the sidebar tree derived from the layout.

Three things the artifact has to get right, each of which was wrong in a draft:

- LINKS. The published pages carry relative .md links that MkDocs rewrote at build
  time and nothing else will. Each is rewritten to the target page's url using the
  same function that builds urls, so a link and its target cannot disagree; anchors
  and scheme-qualified links pass through; assets resolve by the same rule and none
  are referenced.
- FRAGMENTS. A link can resolve to a page and still be broken, because a fragment
  matching no heading lands the reader at the top of a long document. Each is
  checked against the target's headings, by the slug rule a table of contents uses.
- REFUSAL. A link whose target the set holds back, or whose fragment matches no
  heading, fails the generator naming the file, the line and the target. This found
  three citations from settled architecture pointing at two PRDs the blanket prds/*
  exclusion withheld -- links that were already 404s on the published site, so the
  exclusion broke citations rather than withholding drafts. Both targets are now
  published, for a reason distinct from the three ratified PRDs already published.

The published set moves out of mkdocs.yml into the generator with its reasons: a
renderer reading the artifact cannot see why a page is absent. docs/data/generated
is accounted for by docsgen's generatedArtifacts, which now names this file beside
contracts.json -- one ownership registry for the directory rather than one per
writer, so neither tool reports the other's artifact as unaccounted.

docs:artifact regenerates; docs:artifact:check reproduces into memory and fails on
drift without touching the tree, wired into task check beside news:check. The
existing docs:site target is MkDocs and was left alone -- a first attempt at that
name silently ran MkDocs and produced nothing.

Verified: task check exit 0, docs:artifact:check reporting 23 pages. The artifact
carries 23 pages, no archive/ inspiration/ or news/ entry, and the five PRDs the
set declares. Coverage: the published set and its count, url derivation, the nav
tree, both refusal paths, and check's no-write guarantee.
2026-09-22 12:44:18 +10:00
sam fa517fb49e docs(site): serve the site under /docs on the offloaded.dev apex
The apex is becoming the application; the documentation stays on the same
hostname under a path rather than moving to a subdomain that does not
exist. site_url has to agree with where the site actually serves, or every
canonical link and the sitemap point at the application instead.
2026-09-22 12:10:59 +10:00
sam 460722f251 chore(release): archied v1.35.0 archie v1.35.0 2026-09-22 09:52:14 +10:00
sam 3f2a3294d9 docs(eda): record the shipped action-playbook rules and stale claims 2026-09-22 09:51:40 +10:00
sam f498f593c9 fix(eda): authoritative module ids and stricter action load errors 2026-09-22 09:41:31 +10:00
sam 85a671491f fix(eda): tie module results to checker and tighten action ids 2026-09-22 09:22:45 +10:00
sam 966d587638 docs(prds): approve the multi-action playbooks design 2026-09-22 09:02:36 +10:00
sam 826f87e414 feat(eda): wire action playbooks through loader and module schemas
Pass 2 of archie-core-nx30. Pass 1 typed each prior action's result in
the CEL env; this pass wires that typing through the loader, module
schemas, and daemon, and removes the now-redundant id classifier.

Loader shape (D2): one playbook is exactly one workflow action
(unchanged) OR one or more module actions; the shapes never mix. Mixed,
unsupported, or zero actions fail the load naming the playbook.
playbook.Load now takes a KindSchemas source (a small interface this
package defines, satisfied by *module.ModuleRegistry) so playbook grows
no module import. Callers: bootstrap.loadEDAPlaybooks passes b.modules;
daemon and playbook tests pass module.New().

Per-playbook env (D3): each action's when and args values compile against
an env built from the PRIOR actions' ids typed by their kinds' Result
structs (expr.NewEnv(DeclaredResult{ID,Type})). event stays dyn. An
undeclared id, a forward reference, or a field the kind's Result lacks is
a compile-time undefined-field error.

Args schema (D4): an args key the kind's Args struct does not define
fails the load. An args VALUE whose compiled type mismatches the field
type is left as a named gap (not cheap without leaking cel-go type kinds
into playbook and handling dyn reads); a wrong-typed value still surfaces
at module invoke, not load.

D1: Store.Dispatch routes workflow playbooks only, so an action playbook
cannot hijack the definition pin. bootstrap.loadEDAPlaybooks logs a
visible Warn (not debug) for each loaded action playbook naming it and
stating it does not execute yet.

D5: ModuleRegistry.Invoke is deliberately schema-agnostic (the stored
invoker is type-erased and returns map[string]any). The map-to-Result
marshalling belongs in the coordinator named by the doc, which is the
t2db.31 run path and out of scope here.

Classifier enumeration (E) and verdict, all proven for a typed action
playbook via CEL (expr.NewEnv with a declared log.Result id):

  unknown id                        CEL compile (undefined field)       -> delete unknownActionReference
  literal map index actions["x"]    CEL compile (no _[_] overload)      -> covered
  computed index actions[key]       CEL compile (undeclared 'key')      -> covered
  dynamic index actions[event.name] CEL compile (no _[_] overload)      -> covered
  "x" in actions                    CEL compile (no @in overload)       -> covered
  size(actions)                     CEL compile (no size overload)      -> covered
  actions.all(...)                  CEL compile (not a range)           -> covered
  actions == {}                     CEL compile (no _==_ overload)      -> covered
  bare actions                      compiles; KEPT classifier           -> retained resolvable check

unknownActionReference is deleted; actionReferences/ActionReferences are
kept solely for the bare-actions spelling CEL does not reject.
2026-09-22 09:02:33 +10:00
sam 6b7c123782 feat(eda): type per-playbook action results in CEL env
Declare `actions` as a per-playbook object type with one field per
declared prior action id, each typed by that kind's Go Result struct
(multi-action-playbooks.md D3). A data-driven types.Provider exposes
lower-cased Result fields to the checker, so a result-field typo, an
undeclared id, or a dynamic actions read is a compile-time rejection.
Evaluation still reads an ordinary map value; no custom ref.Val adapter
is needed.

NewEnv now takes the declared results (an empty set is valid); `event`
stays dyn. The playbook loader keeps its current single-action boundary,
so its zero-declared-results env is unchanged and playbook.go needed no
call-site edit. Two playbook tests are updated to assert the new
compile-time rejection semantics.
2026-09-22 08:47:48 +10:00
sam bfdb88a60e docs(prds): design the first non-workflow position and typed action results 2026-09-22 08:28:26 +10:00
sam b703c3663b feat(messaging): route a channel reload, and refuse one that cannot reload
archie-core-np7l's service half -- the reload action and its truthful refusal. The
request surface that carries the instruction from the dashboard is its own change,
because it is its own object with its own lifetime (the reasoning is recorded in
docs/architecture/migration-decisions.md).

Service.ReloadChannel routes to the channel's own seam rather than reimplementing
it: the telegram front-end re-reads its token and allowlist, which is what its own
/restart path calls. A channel that cannot reload is refused with a reason instead
of accepted and ignored, because the dashboard offers the action on the strength of
the capability the descriptor declares, and an accepted-then-nothing reload is a
lie the operator cannot see through.

The capability and the action now come from one source. Before this a descriptor
declared ReloadSupported by NAME, so a channel could announce reload support and
have nothing behind it; reloadable() decides both, and the descriptor test builds
a real gateway with a seam rather than a fake named "telegram".

Verified: task check exit 0. Coverage: the refusal names the reason for a channel
that declares no support and for an unknown channel; the service reaches telegram's
own reload seam and the re-read config lands; and the declaration and the action
cannot drift, which is asserted by reloading every composed channel and requiring
the refusal specifically to be "does not support reload" -- a declared reload may
still fail on the configuration it re-reads, and that is a different fact.
2026-09-22 08:15:32 +10:00
sam 96aa05c470 fix(archieui): let the boundary guard permit a contract-backed channel reader
The UI boundary test forbade wiring Server.Channels, and it was right about what
the field used to hold: a live *status.Manager is a runtime handle this process has
no business owning. It now holds a reader over the State Store's channel-status
contract, which is the same shape as the Mappings, Bindings and ApplyStatus fields
the guard already expects to be wired. The distinction it draws is the handle, not
the name, so the assertion moves with the field and says why.

Also adopts task fmt's rewrite of the reader's status construction: go fix drops
the explicit embedded Descriptor, and formatter output is law here.
2026-09-22 08:10:01 +10:00
sam d6f526ce4f feat(state): carry channel lifecycle from the Messaging Service to the dashboard
archie-core-8cda.6.8's carrier. The service now records channel lifecycle and has
nowhere to put it: /api/channels answered with nothing because
webui.Server.Channels had no production source, and reload answered 501 for the
same reason. This adds the surface the register decided on, following the split
archie-core-ymut established for config snapshots -- a pair of administrative RPCs
whose writer is one process and whose reader is the UI -- and wires both ends.

Wire and store: PutChannelStatus / ListChannelStatus, with ChannelStatus carrying
id, name, state, detail, configured, reload_supported and observed_at. The store
holds one row per channel and replaces the reported set, so a channel the reporter
no longer mentions is deleted rather than left standing as a stale "running"; an
empty report clears the table, because hosting no channels is a fact worth
reporting. A row without an id is refused: it could never be replaced or removed
by a later report.

Writer: the service publishes on every lifecycle transition through a coalescing
signal -- a burst of transitions is one write, since a reader only wants the latest
state of every channel -- plus a start-up report and a final report after shutdown,
so a stopped service leaves the store honest. A failed write is logged and retried
on the next signal; the dashboard losing channel state is worth a warning and never
worth failing a channel start over.

Reader: webui.Server.Channels becomes a source rather than a concrete manager, and
webui.RemoteChannelStatus reads the store the way RemoteConfigView reads the config
snapshot. A store it cannot reach reports nothing rather than a stale "running",
and a state the reader does not recognise is carried through rather than dropped.

The contract's own index gains the group in the same change that adds the RPCs --
a surface the grouped table does not list is one nobody finds -- and the count moves
to 51. The register records why the surface is the State Store rather than a
resource kind, and why reload gets its own surface rather than a field here: reading
status must not be able to retrigger an action, a transient request is not
distinguishable from state once anything polls it, and it would invert the
writer/reader relationship the precedent establishes.

Verified: task check exit 0. New coverage: the store's replace-the-set semantics
and its refusal of an id-less row, the reader's mapping including an unknown state,
and the publisher's start-up, transition and final reports.
2026-09-22 08:04:44 +10:00
sam fb265f2ad0 feat(messaging): record channel lifecycle, and decide its surface
archie-core-8cda.6.8's producer half. The service handed every channel an empty
channels.Lifecycle{}, so starting, running, failed and stopped were recorded
nowhere and internal/channels/status.Manager -- which has had MarkStarting,
MarkRunning, MarkDegraded, MarkFailed, MarkStopped and Snapshot all along -- had no
production writer at all. The channels have always reported: all three call
ReportStarting and ReportRunning on whichever lifecycle they are given.

Each composed channel now gets its own report into a manager keyed by channel, so
one channel's failure marks only itself; a channel that cannot start is marked
failed with its reason rather than only logged, and a channel that returns is
marked stopped. Service.ChannelStatus is the producer a dashboard surface reads.

Left open deliberately: the cross-process carrier, and reload's direction.
docs/architecture/migration-decisions.md records the shape by the precedent the
contract already establishes -- archie-core-ymut's config snapshot is "the one
surface whose writer is the daemon and whose reader is the UI process", a pair of
administrative RPCs deny-by-default under authorizesTaskScopedCall -- and names
what that settles: channel state is runtime state rather than a settings document,
so it does not belong among the ControlPlaneService's validated resource kinds; the
UI already dials the State Store and pumps its cursor, so no new transport is
needed; and the contract PRD's grouped table gains a group in the same change that
adds the RPCs. Reload runs the other way and is left as a named open question
rather than decided by analogy with a status report, because a request queue and a
status report do not have the same lifetime. It also records that 8cda.6.9's
component self-report is the same shape, so the two do not become two homes for
"what a component reports about itself".

Red-proofed: restoring the empty lifecycle fails TestServiceRecordsChannelLifecycle
with "channel webhook never reached running; last report State:configured", so the
test pins the fix rather than the manager's existence.

Verified: task check exit 0.
2026-09-22 07:57:29 +10:00
sam fa1840e646 test(messaging): add the end-to-end channel smoke verification
archie-core-8cda.6.5's remaining half. The gate landed in a7d6cc8c; what was
missing is the verification that the extracted service actually carries a message.

It drives the deployed path -- compose, the real webhook adapter, a real listener,
a real signed HTTP request -- and asserts on what crossed the chat contract as well
as on the reply the caller receives back, which DeliverTo=origin routes through
that contract. The envelope assertions are the three transport facts this channel
must carry, each of which has a reason recorded elsewhere: platform "webhook" is
how the Gateway learns which channel it serves (archie-core-c1qx); SenderID stays
empty because a route path is a source and never a person (archie-core-oyna); and
the route survives as the budget key, so the inbound limit still applies.

Webhook is the only channel a test can own. Telegram needs a bot token and the
Telegram API, email needs SMTP, so neither can be exercised here. The PRD's fourth
criterion asks for a live Telegram round trip "or equivalent channel smoke test",
and this is that equivalent: every step between the POST and the contract is the
deployed code path. The gRPC hop beyond the contract is covered by
internal/infrastructure/gatewayrpc's conformance tests, which run the same client
and server in both local and remote mode.

Red-proofed rather than assumed: signing the request with the wrong secret fails it
with "status = 401, want 200", so the signed path is genuinely exercised rather
than bypassed.

Also carries f39fdd73, the migration register's correction, which was committed
unpushed on purpose so it would ride a code change rather than re-stamp :latest on
its own.

Verified: task check exit 0.
2026-09-22 07:50:26 +10:00
sam f39fdd73a0 docs(architecture): record the messaging severance as it landed
The register described a design written before any measurement existed, and two of
its open questions were answered while landing archie-core-1ng1 -- both by
measuring rather than by preference. The client did not become two packages: the
workflow and persona watches stayed on internal/app/controlplane's Client, which
now embeds the new one, so the daemon's validated watch is still defined once and
the read path still has one implementation. And the vocabulary stayed in
internal/infrastructure/controlplanerpc rather than moving to a domain package,
because it has exactly one consumer and the store-backed side reads the same
definitions through type aliases rather than a copy.

It records what made that safe rather than asserting it: internal/app/controlplane
was the ONLY direct import of the Messaging Service that dragged a banned runtime
-- gatewayrpc, staterpc, applystatus, messaging, configuration, readiness and health
were all clean -- so severing that one dependency sufficed and no third package was
needed. The workflow/task exception the gate carries is recorded too, with the
verification that justifies it rather than the precedent alone.

Two questions stay open and named: whether the store-backed server also leaves
internal/app/ (archie-core-8f4n), and whether internal/domain/workflow's
contract/engine split happens (archie-core-inh6). Promoting the vocabulary to a
domain package is recorded for the day a second consumer appears.

Committed without pushing on purpose: a docs-only push to main republishes :latest
with a dev stamp for no benefit (archie-core-i5nb), so this rides with the next code
change.
2026-09-22 07:28:11 +10:00
sam a7d6cc8c9d refactor(messaging): sever the Messaging Service from the store and workflow runtime
The PRD's deletion gate for the Messaging Service could not pass: go list -deps
./cmd/archie-messaging linked modernc.org/sqlite, internal/store,
internal/domain/workflow and internal/agentexec -- all through one import,
archiemessaging/run.go -> internal/app/controlplane, from which the service used
three symbols. The decision was to sever rather than amend the gate, because a
boundary you whitelist around is no longer a boundary (archie-core-1ng1, recorded
in docs/architecture/migration-decisions.md).

Measured before touching anything: internal/app/controlplane was the ONLY direct
import of the service that dragged those runtimes -- every other one was clean --
so severing this one dependency is sufficient for the gate.

Moved into the new internal/infrastructure/controlplanerpc: the generic resource
client (NewRPCClient, Query), the RuntimeChatConfig projection, the reader
interface (now the exported ResourceReader), the wire sentinels, the status
mapping (now ClientError), and the channel-settings document with its decode --
ChannelSettings, TelegramSettings, WebhookChannelSettings, EmailSettings,
RateLimitSettings, ChannelDuration, DecodeRenamingLegacyKeys.

internal/app/controlplane keeps the store-backed server, the Definition registry,
every kind's seed/validator/Normalize, the schema derivation, and its
resource-specific reads and watches. Its Client embeds the new one, so the read
path has one implementation while the workflow, persona and cronstore reads stay
with the processes that already link those engines. The documents are type-aliased
back into this package so the store-backed side reads them by the names it has
always used: one definition, not a copy on each side of the boundary.

The gate is now enforced by cmd/archie-messaging/architecture_test.go, measuring
the linked binary against the PRD's banned list, with one exception checked in
both directions: internal/domain/workflow/task, the Task status and view
vocabulary whose own dependency set holds none of the banned runtimes. The UI gate
carries the same entry for the same reason, and the fleet skill names it as the
precedent.

Verified: task check exit 0. The gate was red-proofed twice -- banning
internal/channels fails it, and removing the workflow/task exception fails it --
so neither the loop nor the exception is decorative.
2026-09-22 07:26:55 +10:00
sam 5adb19947c docs(architecture): record the Phase 4 messaging severance plan
archie-core-8cda.6's fourth criterion cannot pass: the PRD's deletion gate for the
Messaging Service does not exist, and the check it names reports four banned
packages linked -- modernc.org/sqlite, internal/store, internal/domain/workflow and
internal/agentexec -- all through one import, archiemessaging/run.go ->
internal/app/controlplane, from which the service uses three symbols. The decision
is to sever rather than amend the gate, because a boundary you whitelist around is
no longer a boundary.

This records the plan before any implementation: what moves (every kind constant,
the channel-settings vocabulary and its decode, the generic client, the persona
watch, the workflow-settings document), what stays and why (the store-backed server
and Definition registry, WorkflowDefinitionsClient and stepRegistry,
WatchWorkflowExecutionSettings because decodeSettings returns and validates
workflow.ExecutionSettings, the schedules document because a domain vocabulary may
not import infrastructure, the schema derivation), and where the pieces go
(internal/domain/controlplane for the vocabulary,
internal/infrastructure/controlplanerpc for the client, mirroring gatewayrpc and
staterpc).

Four decisions are named rather than taken, so archie-core-8cda.6.5 does not
inherit them: whether the server also leaves internal/app/; where
WatchWorkflowExecutionSettings lives, given it cannot share a package with the
client the Messaging Service imports; whether internal/domain/workflow's
contract/engine split happens and when; and whether archied's watches move with the
client. Both existing consumers keep compiling, and the Messaging Service's
dependency set loses all four banned packages.

Verified: task check exit 0, docs-only change, docs:check and docs:prds green.
2026-09-22 07:17:06 +10:00
sam 2ae831abd7 chore(release): archied v1.34.0 2026-09-22 07:14:25 +10:00
sam 17b2e2a5cb feat(webui): give the dashboard an actionable auth failure state
An unauthenticated document request answered with a plain-text 401 -- and
index.html, the bundle and every asset sit behind requireToken -- so a
bookmarked or bare URL was a dead end: the dashboard's own authentication
banner could never load to explain it. Document requests now get a
self-contained 401 page whose one-field form reuses the ?t= exchange, so a
pasted token sets the cookie and the redirect lands on the dashboard. A
rejected token re-renders the page with the reason instead of answering a
document with text.

API and event-stream callers keep the plain-text 401: classifyActionError maps
it to "session-expired", and an EventSource error body is never seen.

The auth banner gains a Retry that re-runs the reads which report their own
401s, so a recovered session clears it without a document reload. The retry is
extracted to lib/session-retry.ts with an in-flight guard and unit tests.
2026-09-22 07:13:48 +10:00