Commit Graph
3210 Commits
Author SHA1 Message Date
sam bc429cd351 Merge branch 'main' into feat/topbar-nav
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 10m53s
2026-11-12 11:33:48 +00:00
sam 75044ee4c0 Merge pull request 'fix(chat): open More menu, keep Send after mic error, per-session drafts (#1862, #1878, #1879)' (#1890) from fix/chat-dock-bugs into main
deploy / plan (push) Successful in 9s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 46s
ci/woodpecker/push/deploy Pipeline was canceled
Reviewed-on: #1890
2026-11-12 11:33:13 +00:00
sam 914a5f9b03 Merge branch 'main' into fix/chat-dock-bugs
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 4m9s
2026-11-12 11:33:06 +00:00
sam a7a411bd4b Merge pull request 'chore(runtime): delete Kit and external agent harness support (#1877)' (#1887) from chore/delete-kit-harness into main
deploy / plan (push) Successful in 34s
ci/woodpecker/push/deploy Pipeline failed
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 5m2s
Reviewed-on: #1887
2026-11-12 11:27:20 +00:00
sam 9ac8a60999 Merge branch 'main' into chore/delete-kit-harness
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 4m5s
2026-11-12 11:27:07 +00:00
sam 04975db9a1 feat(ui): move desktop navigation into the topbar breadcrumb (#1880)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline is pending
2026-11-12 21:53:31 +11:00
sam b97eb45275 style(staterpc): drop a blank line left by the removal
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 8m16s
2026-11-12 21:42:27 +11:00
sam 658a4cb50e chore(runtime): remove code left dead by the Kit removal (#1877)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was canceled
Drops Client.TaskPrincipalForCredential and the principal_id field only
it read, Reporter.ReportToolCall, Pool.EnsureImage and Pool.Instance,
and the binding cipher's exported domain API. Clears the remaining
harness references from the audit target kinds, docs and comments.
2026-11-12 21:42:17 +11:00
sam 5a98c313e0 fix(chat): open More menu, keep Send after mic error, per-session drafts (#1862, #1878, #1879)
ci/woodpecker/pr/quality Pipeline was canceled
Quality / check (pull_request) Canceled after 7s
2026-11-12 21:34:56 +11:00
sam f92c5b4536 chore(runtime): delete Kit and external agent harness support (#1877)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Canceled after 7m39s
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.
2026-11-12 21:29:05 +11:00
sam c54d328f0d feat(store): run services as a non-superuser role and name every connection (#1857)
Every service connected to PostgreSQL as the database owner, which is a
superuser, so anything that compromised an app process owned the cluster, and
every connection reached the server with an empty application_name, so
pg_stat_activity could not say which service a session belonged to.

Split the DB credential into two login roles and name every pool:

- archie_migrator owns public and its objects and runs goose. Migrations run
  on a short-lived pool opened from the new migration_database_url, before the
  serving pool opens. It is not a superuser.
- archie_runtime serves requests with SELECT, INSERT, UPDATE, DELETE, sequence
  USAGE/SELECT and function EXECUTE only. It has no CREATE privilege, so it
  cannot change the schema.
- Every pool sets application_name: archie-state-store, archie-gateway, and a
  -migrate / -recovery / -schema / -provision suffix on the transient
  administrative connections. Existing one-URL installs keep working: an
  absent migration_database_url falls back to database_url and the migration
  runs on the serving pool exactly as before.

Provisioning is a new idempotent `archie-state-store provision` subcommand: it
needs an admin URL the services never hold (database owner or superuser),
creates or reconciles both roles, hands every public-schema object to the
migration role, revokes PUBLIC's CREATE on public, sets row-level grants, and
sets the migration role's default privileges so tables future migrations
create are usable without a hand-run grant. It stores SCRAM verifiers, refuses
superuser roles, and verifies the boundary before committing.

install.sh now provisions the bundled path and separates the credentials: the
superuser password the Compose database is created with lives only in a
compose-only postgres.env, while the env file the units load holds the
non-superuser PGPASSWORD. A bundled install that predates the split is
upgraded in place: the roles are created, the superuser password is rotated
out of the env file, and config.toml is moved to the runtime and migration
URLs. External databases keep their operator-managed credential; the
deployments README documents the one-shot provision command.

setup writes both bundled URLs, dev:postgres provisions the dev database, the
e2e stack provisions its throwaway server, and the deployment templates point
at the two roles.
2026-11-11 03:12:54 +11:00
sam 161e8f95bf perf(store): share one control-plane version read across all watchers (#1858)
The control-plane Watch was a 250 ms database poll per subscription: an idle instance ran about 180 transactions a second (archied 14 streams, gateway 5, dashboard 26), almost all sequential scans of the small resources table. The State Store now keeps one shared view of every stored resource version, read once per 250 ms window and reused by every Watch stream; a stream reads its own resource only when its kind's version advanced, so idle database work is one read per interval for the whole process whatever the subscriber count.

The watch contract is unchanged: resume from AfterVersion, no missed update (versions are monotonic per org and kind), the immediate seed probe, the same 250 ms latency bound (streams wake on the same window boundary), and a store error still ends the stream with Unavailable so the clients' existing reconnect backoff applies.
2026-11-11 03:03:37 +11:00
sam c155bb24ba fix(taskactions): record the retention rule for archived task children (#1859)
Archiving deletes the task row but deliberately keeps its child rows:
execution history, usage and the dispatch ledger are records about the work,
not attachments to the row. Nothing recorded that rule, so the kept rows had no
parent row to explain them and no query could say what happened to an archived
task.

Record the rule in the archive event's data. The kind is protected from audit
retention and already projects into the audit feed, so that event is the
archived-task record: it names the kept child sets and leaves event rows to the
instance's per-kind retention.
2026-11-11 02:59:20 +11:00
sam 0033933a58 perf(store): index the six unindexed foreign keys (#1860)
Postgres does not index the referencing side of a foreign key, so deleting or updating a parent row scanned the child table once per referencing row for the six keys that had no matching index: identity aliases and subjects, org memberships and agents, installed package requirements, and the task a handoff came from. Migration 0074 adds one supporting index per key; the foreign-key integrity checks on the restored snapshot pass, with every one of the 17 constraints now covered.
2026-11-11 02:49:37 +11:00
sam a9aacab79d docs(agents): push every commit as soon as it is made
deploy / archied-image (push) Successful in 50s
deploy / dist-zip (push) Skipped
deploy / plan (push) Successful in 8s
ci/woodpecker/push/deploy Pipeline was successful
deploy / gate (push) Successful in 8m5s
deploy / agent-image (push) Skipped
2026-11-11 02:48:29 +11:00
sam dcc12582ce feat(audit): set per-kind event retention from the instance (#1856)
deploy / plan (push) Successful in 35s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / gate (push) Canceled after 25s
ci/woodpecker/push/deploy Pipeline was canceled
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.
2026-11-11 02:31:46 +11:00
sam 4728c8c253 feat(usage): report model usage per org with identity and cost (#1855)
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.
2026-11-11 02:15:29 +11:00
sam 255e0c7ee0 feat(chat): titles read the reply too, and session memory sees what it already holds
deploy / plan (push) Successful in 7s
deploy / archied-image (push) Successful in 30s
ci/woodpecker/push/deploy Pipeline was successful
deploy / gate (push) Successful in 7m39s
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-11 00:10:00 +11:00
sam bc16b74c93 fix(prompts): correct the product guide, and make chat replies scannable and honest about their own history
deploy / plan (push) Successful in 8s
ci/woodpecker/push/deploy Pipeline was successful
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 5m8s
2026-11-11 00:04:43 +11:00
sam 44237b448b refactor(prompts): every model prompt is a file in internal/prompts
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / plan (push) Successful in 6s
ci/woodpecker/push/deploy Pipeline was canceled
deploy / gate (push) Canceled after 2m58s
2026-11-11 00:01:43 +11:00
sam e5e968780f fix(chat): the conversation picker reads as the panel's title, and titles name the subject, not the mood
ci/woodpecker/push/deploy Pipeline was successful
deploy / gate (push) Successful in 7m24s
deploy / agent-image (push) Skipped
deploy / archied-image (push) Canceled after 38s
deploy / plan (push) Successful in 9s
deploy / dist-zip (push) Canceled after 0s
2026-11-10 23:53:24 +11:00
sam 31578e8857 fix(ui): label the conversation picker, centre Send on the composer line, say Archie is waiting when no task runs
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 57s
deploy / plan (push) Successful in 46s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-10 23:51:47 +11:00
sam f3f90f3224 fix(chat): a stopped turn shows in its conversation, and the composer field draws no box of its own
deploy / plan (push) Successful in 8s
ci/woodpecker/push/deploy Pipeline was successful
deploy / archied-image (push) Successful in 58s
deploy / dist-zip (push) Skipped
deploy / gate (push) Successful in 7m41s
deploy / agent-image (push) Skipped
2026-11-10 23:33:30 +11:00
sam 8aa3540fa7 fix(ui): outline toggle groups mark the selected segment inside its border
deploy / plan (push) Successful in 7s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 3m19s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-10 23:29:58 +11:00
sam 52549c1bab fix(dashboard): the workflow picker's menu opens below it instead of over it
deploy / plan (push) Successful in 9s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 47s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-10 23:28:55 +11:00
sam f7c3e1788c fix(dashboard): keep the workflow picker's label beside its value and one font on attention rows
deploy / plan (push) Successful in 9s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 3m40s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-10 23:24:59 +11:00
sam 5ea115746c fix(dashboard): blocked tasks say what they need, and a provider refusal names its fix
deploy / plan (push) Successful in 6s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 5m37s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-10 23:19:29 +11:00
sam 12a25faf31 Merge pull request 'ci: build release binaries once and stop recompiling archied' (#1852) from ci/release-build-once into main
deploy / plan (push) Successful in 12s
deploy / gate (push) Successful in 10m7s
deploy / agent-image (push) Skipped
deploy / archied-image (push) Successful in 2m13s
deploy / dist-zip (push) Skipped
Reviewed-on: #1852
2026-11-10 11:42:32 +00:00
sam c9a8e21759 Merge branch 'main' into ci/release-build-once
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 12m5s
2026-11-10 11:41:17 +00:00
sam 28a6ac8b98 fix(ui): the token revoke dialog runs the revoke it was opened for
deploy / plan (push) Successful in 8s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 3m33s
2026-11-10 22:37:59 +11:00
sam 73860b26d2 ci(woodpecker): build once, keep Go's caches, fetch archied for the canary
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was canceled
The same changes as the Actions workflows: a release gate runs
`task check dist` and the dist step only packages; canary and promote copy
archied out of archied:edge instead of compiling it.

The gate and the pull-request check keep Go's module, build and lint caches
on the host, in separate directories so a pull request cannot write into the
cache a release build reads.

Fixes: notes wait for the signed release and carry the prerelease flag;
the canary clones with tags, which its rollback needs to diff migrations;
release puts HEAD on main before `task release`, which refuses anything else.
2026-11-10 10:57:59 +00:00
sam 9ca3432f8e ci(canary): take archied from the published edge image
canary and promote compiled archied from source on every run, the canary
every fifteen minutes. Both now copy the binary out of archied:edge, which
deploy already published for main.

The canary keeps its checkout: a rollback diffs the migrations between two
release tags. Promotion never reads the repository, so it drops its own.
2026-11-10 10:57:06 +00:00
sam 1b53c5787e ci(deploy): build the release binaries once, in the gate
A release gate runs `task check dist`, uploads dist/, and dist-zip packages
that instead of installing Go and Node and compiling the tree again.

plan resolves the commit and version once for the image jobs. agent-image is
skipped outside a release. dist-zip waits for archied-image. The image jobs
share one builder that is never removed, so the Dockerfiles' cache mounts
survive between runs.

Also: Node 24 in the gate like everywhere else, govulncheck pinned, and the
release notes carry the prerelease flag.
2026-11-10 10:56:55 +00:00
sam b509397e8d build: add task dist, build the dashboard once, cache Go in image builds
`task dist` builds the binaries release.json names into dist/ with the
compiler flags `build` uses, so after the gate has built bin/ it only links.
`build` is now static (CGO_ENABLED=0), like what ships.

`ui` runs once per task invocation: check built the dashboard, then build's
dependency built it again under the Go steps that embed it.

Both Dockerfiles compile with cache mounts for Go's module and build caches.
2026-11-10 10:56:12 +00:00
sam 721e6332ed fix(chat): show a failed turn's error in a reopened conversation 2026-11-10 21:56:06 +11:00
sam cc49fecc77 fix(egress): default base URL for the gemini-interactions provider class (#457) 2026-11-10 21:56:06 +11:00
sam c3e64e5485 chore(release): v1.62.0
deploy / gate (push) Successful in 6m49s
deploy / plan (push) Successful in 8s
deploy / archied-image (push) Successful in 2m36s
deploy / agent-image (push) Successful in 3m15s
deploy / dist-zip (push) Successful in 5m9s
v1.62.0
2026-11-10 09:48:01 +00:00
sam 13ec693726 fix(gateway): let a streamed chat turn finish after its stream closes (#1848)
deploy / plan (push) Successful in 7s
deploy / gate (push) Successful in 7m49s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 2m24s
2026-11-10 20:14:04 +11:00
sam e3ffefdc7d fix(identity): use System as the one root identity and record who created every task (#1851)
deploy / plan (push) Successful in 25s
deploy / gate (push) Successful in 7m57s
deploy / agent-image (push) Successful in 21s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 2m12s
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.
2026-11-10 20:01:16 +11:00
sam 04798b990a docs(changelog): notes for the changes since 1.61.3
deploy / plan (push) Successful in 8s
deploy / gate (push) Successful in 8m52s
deploy / agent-image (push) Successful in 24s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 3m25s
2026-11-10 19:28:08 +11:00
sam 0e889977c0 fix(archied): resolve merge, close and issue tools through the repository's connection (#1847)
deploy / plan (push) Successful in 6s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 2m50s
2026-11-10 19:25:15 +11:00
sam 47e3d8d837 Merge pull request 'Expose all task actions in the task detail header (archie)' (#1846) from feat/1000000000000000-expose-all-task-actions-in-the-task-detail-header into main
deploy / plan (push) Successful in 6s
deploy / gate (push) Successful in 7m43s
deploy / agent-image (push) Successful in 14s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 2m27s
Reviewed-on: #1846
2026-11-10 06:54:28 +00:00
archie 9a9629400e Expose all task actions in the task detail header (archie)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 13m0s
2026-11-10 16:54:00 +11:00
sam 0525edd3bb fix(postgres): blocker-changed marks only the org whose resource changed (#1839)
deploy / gate (push) Successful in 8m39s
deploy / plan (push) Successful in 7s
deploy / agent-image (push) Canceled after 2s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Failing after 13m38s
2026-11-09 14:40:58 +11:00
sam 82313e4af5 feat(state-store): flag parked tasks when the resource their blocker names changes (#1839) 2026-11-09 14:40:58 +11:00
sam e34941b1eb fix(workflow): record a close refused for open dependencies instead of parking (#1845) 2026-11-09 14:40:58 +11:00
sam 67c9b7a00a fix(workflow): publish a baseline repair as a PR before the task continues (#1844)
Dependents now wait for the baseline gate to pass on the base branch
instead of a specific branch merging.
2026-11-09 14:40:58 +11:00
sam 20ffe63367 fix(worktree): object-not-found match tolerates a successful push
deploy / plan (push) Successful in 8s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 1m47s
2026-11-09 14:40:19 +11:00
sam bcbd09fc08 fix(workflow): a budget stop in a parallel branch asks to continue and resumes the branch (#1838) 2026-11-09 14:37:22 +11:00
sam a3fdbddfc0 fix(worktree): match object-not-found by message too, as push transports may flatten it (#1843) 2026-11-09 14:37:18 +11:00