Commit Graph
3227 Commits
Author SHA1 Message Date
sam 804d306f75 fix(daemon): skip issue intake when the routed workflow is disabled (#1913)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was successful
pollNATS queued every discovered issue and let the pin path park it with
'workflow triage is disabled'. Now, after the TaskByIssue existence check
and before PublishTask, the label-routed workflow is resolved against the
active definitions and checked against the identity org's enablement, the
same filter dispatchOrgBindings applies to armed bindings. A disabled
route logs one Info line and returns false without acknowledging, so the
issue is rediscovered on a later poll and picked up if the workflow is
re-enabled. Read failures of org, definitions or enablement log a Warn
and fall through to publishing; no routable definition keeps the current
publish behaviour. processNATSTask's park path is unchanged.
2026-11-13 00:42:40 +11:00
sam 98941c20a0 fix(controlplanestore): legacy channel settings drop the retired models key on migration (#1903)
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-12 23:12:57 +11:00
sam fe8afb18d0 fix(gateway): a failed chat turn shows plain wording, not the provider's error (#1902)
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
ci/woodpecker/push/deploy Pipeline was canceled
2026-11-12 23:11:07 +11:00
sam 6a7f8b4847 Merge pull request 'feat(ui): show the page context tag above the chat composer (#1854)' (#1897) from feat/1854-page-context-tag into main
ci/woodpecker/push/deploy Pipeline failed
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
Reviewed-on: #1897
2026-11-12 11:59:14 +00:00
sam 1c5915f521 feat(ui): show the page context tag above the chat composer (#1854)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 4m23s
2026-11-12 22:57:21 +11:00
sam 864240fd61 Merge pull request 'feat(ui): attach tasks to a chat message with # (#1861)' (#1893) from feat/1861-task-context-picker into main
ci/woodpecker/push/deploy Pipeline is pending
deploy / archied-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
Reviewed-on: #1893
2026-11-12 11:50:55 +00:00
sam 1730938e03 Merge branch 'main' into feat/1861-task-context-picker
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 9m53s
2026-11-12 11:50:37 +00:00
sam 2a73a37d27 Merge pull request 'feat(chat): copy a conversation as Markdown from the More menu (#1884)' (#1894) from feat/1884-copy-markdown into main
ci/woodpecker/push/deploy Pipeline is pending
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
Reviewed-on: #1894
2026-11-12 11:50:30 +00:00
sam 4694406434 Merge branch 'main' into feat/1884-copy-markdown
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 3m55s
2026-11-12 11:50:19 +00:00
sam b8c394767c Merge pull request 'feat(chat): link #N in replies to tasks that exist (#1882)' (#1895) from feat/1882-task-chips into main
ci/woodpecker/push/deploy Pipeline is pending
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
Reviewed-on: #1895
2026-11-12 11:50:09 +00:00
sam 604d615d7a Merge pull request 'feat(ui): pin the chat dock to a side edge (#1853)' (#1896) from feat/chat-dock-pin into main
ci/woodpecker/push/deploy Pipeline is pending
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
Reviewed-on: #1896
2026-11-12 11:49:57 +00:00
sam 77db59141c feat(ui): pin the chat dock to a side edge (#1853)
ci/woodpecker/pr/quality Pipeline was canceled
Quality / check (pull_request) Successful in 16m15s
2026-11-12 22:48:41 +11:00
sam eabd7c8884 feat(chat): copy a conversation as Markdown from the More menu (#1884)
Quality / check (pull_request) Canceled after 1m25s
ci/woodpecker/pr/quality Pipeline was canceled
2026-11-12 22:47:26 +11:00
sam 7ffbf0435c feat(chat): link #N in replies to tasks that exist (#1882)
ci/woodpecker/pr/quality Pipeline was canceled
Quality / check (pull_request) Successful in 16m18s
2026-11-12 22:46:22 +11:00
sam 8082e200f2 test(e2e): chat composer check follows the combobox role and the # task picker (#1861)
Quality / check (pull_request) Canceled after 2m16s
ci/woodpecker/pr/quality Pipeline was canceled
2026-11-12 22:45:14 +11:00
sam b234a85090 feat(ui): attach tasks to a chat message with # (#1861) 2026-11-12 22:43:41 +11:00
sam 37ea698a28 Merge pull request 'feat(ui): move desktop navigation into the topbar breadcrumb (#1880)' (#1891) from feat/topbar-nav into main
deploy / plan (push) Successful in 25s
ci/woodpecker/push/deploy Pipeline failed
deploy / gate (push) Failing after 9m22s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
Reviewed-on: #1891
2026-11-12 11:34:09 +00:00
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