Removes the Kit task-tool result shim (and with it the MCP go-sdk
dependency), the messaging enable/disable/restart helpers and channel
rebuild closures nothing calls since channels became extensions, the
unused messaging capability, ephemeral and text-fallback types, and
single stragglers in telemetry, releaseupdate, skill, storepkg and
webui. The egress sandbox relay stays for #1867.
Cookies took Secure from r.TLS, which is nil behind a proxy that terminates
TLS, so sign-in cookies went out without it. Every dashboard cookie now goes
through one builder that reads the scheme the way the origin check does.
The worktree reset and the agent worker's chown walk use os.Root, so a
symlink swapped in mid-walk can't point them outside the worktree.
gosec runs in golangci-lint, tests included. G104, G115, G204 and G304 are
excluded in config; each remaining finding is fixed or suppressed at the site
with its reason.
Chat handlers returned raw contract errors to the browser, which can
carry SQL fragments, gRPC status details or host paths. Each 5xx and
transport failure now answers with a plain sentence in the gateway's
wording and logs the real cause through the injected logger's
ErrorContext. The SSE error frame on stream-open failure gets the same
treatment. Safe 400 validation messages and the 404 'session not found'
are unchanged.
Archie runs its own agent loop only. Removes Kit resolution and launch,
the harness runner and adapters, the setup terminal and sandbox view,
harness secrets and OAuth capture (table dropped in migration 0075), the
task-tools contract that only Kit containers reached, and the
sandbox-kit-spec dependency. Agent profiles carry image and tools only.
The egress proxy keeps the model-session path; the sandbox relay code
stays for #1867.
The retention sweep applied one window to a code-fixed allowlist, and the
largest event kind (agent transcripts) was outside it, so the events table
grew whatever the instance set. The audit-retention document now takes
per-kind overrides, the dashboard offers each prunable kind its own window
from the server's list, and a kind without an override follows the default.
A security kind is refused where the document is written, and the sweep cuts
each kind at its own cutoff in one bounded, locked transaction.
Model usage was recorded per call and never read, so an org could not see
what it spent. Add the read side:
- model_usage carries identity_id. Task calls take it from the task row,
chat and curator calls from the calling principal carried in the usage
record, so an outbox replay keeps its attribution. Existing task rows are
backfilled from tasks.
- StatsService.UsageTotals sums the caller org's rows by UTC day, source,
provider, model and identity. The org comes from the principal, with no
org parameter, so cross-org reads do not exist.
- GET /api/usage prices tokens at the catalog's list rate, netting cache
hits, and reports calls to unpriced models as tokens only. The published
catalog view now carries each model's cost.
- A new org Usage page behind a read_usage grant: admin and owner only,
with a 7, 30 or 90 day range, totals, the daily series, and model, source
and identity breakdowns. The org shell keeps it on the caller's own org.
Drop the bot_user-derived root identity and the empty-identity sentinel. System
polls forge connections and owns instance-level work; a polled task stores the
polling identity, task_queued and work_request_submitted carry task id, actor
and principal, and an empty task identity is refused. Migration 0072 moves
empty tasks.identity, the identity-grants root key and the old root's
connection permits to System so a re-poll dedups.
Same pattern as the bindings pilot: eventTypesAPI (registers unconditionally,
list answers enabled:false without a store), mappingsAPI and sourcesAPI
(constructed only when their store is configured, 503 stub otherwise).
Shared helpers unsignedSources/recentRefusals/listedIn stay on Server; the
dispatch-ledger handler stays shared for captures/tasks. task check green.
Pilot for one-module-per-resource: bindingsAPI owns the /api/bindings*
routes and their handlers, constructed only when the binding store is
configured; a 503 stub mounts the same routes otherwise, preserving the
old not-configured answers. Handlers move off *Server unchanged in
behavior; the shared dispatch-ledger handler stays on Server for the
captures/tasks routes. task check green.
The canary now authenticates as a dedicated service-account identity in the
system org whose only grant is access.CalaryGrantPolicy: read the signal
endpoints (chat update, alerts, logs, tasks), read and write the
update-settings resource, and trigger an update install. CANARY_TOKEN no
longer carries instance admin; DEPLOY_TOKEN stays CI-only.
- authorize: POST /api/chat/update/install and /defer map to
update on Object::"update" (dashboard) instead of run on any workflow,
so the grant can cover installs without granting workflow runs
- accounts: active service-account identities may authenticate with bearer
tokens (CanAct), not just users
- new POST /api/identities/{id}/tokens (behind manage_identities) mints a
token for a named non-user identity; new AccountService RPC
BindIdentityPersonalToken backs it remotely, refusing user-kind targets,
with the caller recorded as audit actor
- engine tests pin the grant's exact allow/deny surface
RELEASING.md documents the one-time setup. task check passes on this tree.
- one shared UpdateStateDir() resolver for daemon and dashboard, instead of
two copies that could drift
- the recovery path for a committed/rolled-back journal writes
installed.json too, so a crash after the outcome phase cannot lose the
install record
- JudgeCanaryNow is the explicit signals-only entry point for promoting
without the window, replacing the zero-install-time sentinel
- canary version comparisons use IssuedAt, matching Promote's replay rule,
so semver/issued-at divergence cannot wedge check red; queuedBehind
reuses the judgeable predicate instead of a looser check
- promote prints the channel/pin; promote.yml cancels superseded runs
- canary card: no duplicated elapsed rendering, channel row waits for the
settings resource instead of showing a default, agent fallback '?'
- rehearsal script bounds its docker build/push/run calls
task check passes on this tree.
The canary window now counts from when a release is installed on the host
(installed.json / installed_at in the update snapshot), not from the
statement's issued_at, and 'release canary check' judges the release the
canary actually runs via its exact-pin tag instead of the moving next tag.
A newer release on next queues behind the one being judged instead of
restarting the clock, so stable moves once per release.
New subcommands: canary status (read-only state, signals, verdict), canary
promote (promote now when hard checks pass), canary unpin (back to next),
and start -force. A held/pinned canary is verified installable every check
and a stranded pin fails the run red instead of looking green. Rollback
pre-flight checks stable's zip and agent image digests before pinning.
Relative signals are judged whenever both windows carry minimum data, so a
breach rolls back mid-window; promote still needs the full window unless
the operator promotes early (new promote.yml workflow_dispatch). The window
is configurable via -window / CANARY_WINDOW.
Also: dashboard canary status card (ui), and task canary:rehearse, a local
end-to-end rehearsal of publish -> canary start -> status -> check ->
promote against a throwaway registry and host.
task check passes; rehearsal run green (REHEARSE_EXIT=0).
The loop runner hooks every model call and tool call and reports ordered,
redacted, clipped entries. Each is persisted as an agent_transcript task
event through InsertEvent, left out of the timeline read, and served per
attempt at /api/tasks/{id}/transcript. The step run view shows it with Trace.
The bundled internal/channels/telegram package (17 files) is deleted; the
channel now ships as archipelago/channels/telegram, launched by archiemessaging
through the existing channel-extension machinery. An existing [chat.telegram]
config enables it with the same keys: the token stays a secret reference
(token_ref) the host resolves, allowed_user_ids and show_tool_calls map onto
extension settings. Per-org bots compose the same extension per org from the
org's credential binding. Reload support is now derived from a channels.Reloader
interface instead of a *telegram.Gateway assertion. The five host-only seams
(/update, release announcements, running versions, in-place show_tool_calls,
reload) are dropped from the channel and need a contract home or deletion.
Add [access].denial_retention (default 90 days, matching the audit-retention
seed) wired through config defaults and validation; the State Store sweeps
denial records older than the configured age hourly via the new
access.DenialPruner / PruneDenials store query. The dashboard gains
GET /api/access/denials (read_audit-gated, so org admins/owners see their
org's records; the store scopes by the credential's org) and an
/org/denials page backed by a Pinia store.