Compare commits

..
1035 Commits
Author SHA1 Message Date
sam 6a3bf5a71a refactor(governance): open role identifiers and guard policy lockout with Cedar (#2017)
deploy / plan (push) Successful in 3s
deploy / gate (push) Failing after 8m2s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
Carried policy lockout guard from internal/app/statestore/policy_guard.go.
2026-11-18 02:29:06 +11:00
sam 0218e4ec89 feat(governance): move identity, org and Cedar access engine into governance (#2017)
Copied from internal/domain/identity, internal/domain/org, internal/domain/access, internal/infrastructure/access and internal/infrastructure/postgres.
2026-11-18 02:09:29 +11:00
sam ce70d4f3ee feat(runs): workflow documents take today's step shape, references and when (#2039)
A step is id/type/settings with when and on_failure; the five kinds become
the types agent.run (inline mission), connector.action, approval.wait,
run.notify and workflow.sleep. Documents declare inputs, repository,
instructions, identity and profile; references are {{ task|inputs|steps }}
checked at save. Any number of approval steps, each asking only about what
was held since; actions still held at the end are put to people before the
run finishes. Triggers are refused for a workflow they can't start, and the
workflows API lists, reads and saves documents beside a step-type catalog.

Copied from internal/domain/workflow: definition.go, step_refs.go,
step_flow.go's checks, control_steps.go's when parser, vocabulary.go and
task/interface.go. stableid moves to internal/platform.
2026-11-17 18:43:45 +11:00
sam 83613d902a docs: format the docs 2026-11-17 17:53:58 +11:00
sam 1026d5e3b6 feat(httpapi): the API is described by an OpenAPI document generated with Huma (#2028)
Every /api operation is registered with Huma behind one admin-token
middleware, served at /api/openapi.json with a docs page at /api/docs,
and committed as api/openapi.yaml, which task check keeps current.
2026-11-16 20:05:05 +11:00
sam ee4c3f9c16 docs(agents): old code moves into its module; a rewrite or a deletion needs a verdict in the move map (#1977) 2026-11-16 15:52:21 +11:00
sam 21de660ae1 test(system): the rotation fixture uses a listen address without an IP (#2026) 2026-11-16 13:48:07 +11:00
sam 52b027955b feat(connectors): a secret setting is resolved through its engine before the extension starts (#2026) 2026-11-16 13:46:48 +11:00
sam e2917420fb feat(ui): the dashboard edits every control-plane setting (#2026) 2026-11-16 13:45:20 +11:00
sam c226c4f686 feat(system): bootstrap values are read-only and the admin token rotates into the config (#2026) 2026-11-16 13:45:18 +11:00
sam 9e2cf252ac feat(judgement): the Controls API reports each guard's judge, its standing and its eval date (#2026) 2026-11-16 13:45:18 +11:00
sam 9fe446a426 feat(governance): the agent model names a credential and answers a test call (#2026) 2026-11-16 13:45:15 +11:00
sam 20d81258ac feat(events): sources, triggers and filtered events are listed for the dashboard (#2026) 2026-11-16 13:45:15 +11:00
sam 053ed58c08 feat(connectors): an extension declares the settings it reads, and each accepted package is listed (#2026) 2026-11-16 13:45:12 +11:00
sam 546e5cd6ef refactor(ui): hard rules and change-request rules are Controls, not Policies, which stays the access model (archie #1977) 2026-11-16 13:23:09 +11:00
sam 2f802e04a4 Merge branch 'worktree-agent-a1bd90c329b751a72' 2026-11-16 12:06:07 +11:00
sam 124d2033fc feat(guard): a judge record keeps the request, response, path, status and latency of every model call 2026-11-16 12:06:05 +11:00
sam 46372b51d5 feat(runs,ui): the trail shows each model request and response, connector calls and delivery attempts
The run trail exposes the model request the journal recorded and its finish reason. Each model and tool step opens a Request and a Response, and each decision lists the connector calls behind it. The composer lists each delivery attempt with its outcome and response.
2026-11-16 12:06:05 +11:00
sam db36d853ce feat(deliveries): every attempt keeps its response, its error and how long it took
A delivery.attempts row is written with the success or failure the store already records. The composer API returns the connector attempts that carry each message, so the dashboard can show each attempt's outcome and response.
2026-11-16 12:06:05 +11:00
sam 4b97ac5841 feat(audit): a connector call keeps the request core sent and the response it received
Resolve, target facts, invoke, lookup, deliver and parse record the protobuf wire messages as JSON on the context recorder the owning module supplies. Credentials are redacted and a body over 1 MiB keeps its prefix, full length and SHA-256. Judgement stores the resolve and target facts in the decision body and appends the executed invoke to it.
2026-11-16 12:06:05 +11:00
sam e909aee155 refactor(ui): the Unmatched page lives at /unmatched, matching the nav label (#1994) 2026-11-16 12:06:04 +11:00
sam 564339e1aa feat(events,runs): an event keeps the payload it arrived in, and every model call records the request it sent via ai-sdk v0.8.1 (audit requirement) 2026-11-16 11:54:50 +11:00
sam e45fee9bc9 fix(runs): a held action is described to the agent as waiting for approval, not a person's 2026-11-16 11:48:05 +11:00
sam 4cdb5996c5 feat(guard): a model judge's answer, basis and eval standing are recorded in every verdict, clean answers included (audit requirement) 2026-11-16 11:12:15 +11:00
sam 4657ff2646 fix(runs): a workflow summary names approval, not a person, as what holds an action (#2008) 2026-11-16 10:09:59 +11:00
sam 703d5376bb feat(ui): the Unmatched page shows each group's draft with its summary, dry-run trail and publish (#2008) 2026-11-16 10:05:51 +11:00
sam dd80500e7a feat(drafts): a draft bundles trigger, workflow and policy with a summary and a dry run, and publishes them (#2008) 2026-11-16 10:05:51 +11:00
sam 1e21aa975d refactor(runs): a workflow is a stored document of agent, action, wait-for-approval, notify and sleep steps, and investigate ships as one; dry mode judges without executing (#2008) 2026-11-16 10:05:51 +11:00
sam 66b63260e9 feat(events): a group's stored events can be replayed, and a trigger saved, through the module's API (#2008) 2026-11-16 10:05:17 +11:00
sam 470015483e feat(judgement): a dry decision is recorded apart, counts toward nothing and never executes a changing action, and a draft's policy can overlay the set in force (#2008) 2026-11-16 10:05:17 +11:00
sam 42f0688f84 feat(pg): tables for stored workflow documents, dry runs and drafts (#2008) 2026-11-16 10:05:04 +11:00
sam b6f7059212 feat(storepkg,ui): a package can declare a multi-line text setting (#2006) 2026-11-16 09:56:10 +11:00
sam 88afd1ebc9 feat(guard,runs): a guard is shown the agent's diagnosis and the evidence it read before proposing an action (#2006) 2026-11-16 09:55:14 +11:00
sam a4a4e97f07 feat(judgement): a target's owner is looked up from the connectors at decision time, and an unknown owner is a finding that sends the request to the default owner (#1991) 2026-11-16 09:49:33 +11:00
sam 4bc0d54341 refactor(governance): check escalation deadlines in their own function, keeping validate under the complexity limit (#1985) 2026-11-16 09:44:30 +11:00
sam dabe0b4f7c refactor(approvals): judgement's change-request rules route an approval, and without a connector it goes to the channels (#1985) 2026-11-16 09:42:23 +11:00
sam 28733c8522 feat(approvals,runs): an unanswered approval escalates step by step and then expires, a discarded approval never counts, and a change-request seam routes and withdraws (#1985) 2026-11-16 09:42:23 +11:00
sam 4b1ae4babf feat(governance): each escalation step has its own deadline, and the path skips anyone below the authority an action needs (#1985) 2026-11-16 09:42:23 +11:00
sam 50b75f6987 feat(events): unmatched events are grouped by source, type and key fields, and Archie's own deliveries never group (#1994) 2026-11-16 09:42:23 +11:00
sam 0c8b673615 refactor(archie): build the policy sets in their own constructor so Run stays within its statement limit 2026-11-16 09:40:26 +11:00
sam ef62dcc97a feat(judgement): impact, provenance, timing and cost guards from data, with business hours, blackouts and action budgets as settings (#1988) 2026-11-16 09:38:34 +11:00
sam 82cfc1de5b feat(judgement): hard rules and change-request rules as versioned Cedar policy sets (#1989) 2026-11-16 09:38:07 +11:00
sam 983f462740 fix(governance): the settings and people responses no longer fail to encode on an unsupported json tag 2026-11-16 05:23:38 +11:00
sam 46edda9961 refactor(runs): one conclude step ends an investigation, keeping Investigate under the complexity limit 2026-11-16 05:21:48 +11:00
sam 3dcc8da0de fix(runs): find an unattended action's effect under the agent loop's key, which names the agent 2026-11-16 05:19:14 +11:00
sam a2972ac5d6 feat(governance,approvals): people with verified identities, default owner, escalation path and attempts per run; an answer from an unverified identity is refused (#2007) 2026-11-16 05:18:39 +11:00
sam 85e6f8eb40 feat(runs): an action started before a crash is reported unknown on resume and never run again, and the owner is told (archie #2015) 2026-11-16 05:18:05 +11:00
sam 55077620bb feat(judgement,connectors): guard extension contract; every running guard judges with the built-ins and records its name and digest (archie #1986) 2026-11-16 05:17:58 +11:00
sam 400699cfbb feat(runs): a run is pinned to the workflow version it started with and fails clearly when it changed (archie #2014) 2026-11-16 05:04:30 +11:00
sam a0385a56c7 feat(memory,runs,governance): remember each target's incidents, cite them in a run, and propose a root-cause fix after K with one cause (archie #1993) 2026-11-16 05:04:15 +11:00
sam 22aee72679 feat(judgement,approvals,governance,ui): a class earns a raise after N approvals and drops on denial or failure; a freeze holds changing actions (#2004) 2026-11-16 05:03:24 +11:00
sam ff58c8e39b fix(approvals): a request shows the action's exact input, and an answer reads 'via' its channel (archie #1984) 2026-11-16 04:51:22 +11:00
sam 25007e8316 feat(runs): an agent that describes an action without calling it gets one more turn to call it (archie #1999) 2026-11-16 04:39:49 +11:00
sam b9dd744f8c fix(pg): number the action classes migration after the schedules one, so it applies in order (archie #2003) 2026-11-16 04:37:11 +11:00
sam a91df7ec1f feat(judgement,approvals,ui): action classes are records with a level, history and reset; the precedent guard reads the class level (#2003) 2026-11-16 04:35:12 +11:00
sam 5712c9c4e6 feat(events,approvals): triggers fire on an interval, and an expired approval is escalated on every channel (archie #1992) 2026-11-16 04:33:28 +11:00
sam 1f5163092b feat(runs,approvals,ui): a run's trail joins each action's verdicts, approval and effect, and the run view shows them in order (archie #1996) 2026-11-16 04:33:27 +11:00
sam 4e1f1b3c4d feat(connectors): an accepted package can be removed, and a secret engine credentials still use is refused (archie #2013) 2026-11-16 04:31:29 +11:00
sam 1b8eb362d2 fix(prompts): the agent calls a lookup it would recommend instead of ending on it (archie #1999) 2026-11-16 04:24:38 +11:00
sam 7903a0e225 feat(connectors,deliveries,events): channels are connectors that deliver and listen; messages retry from their rows, and answers arrive as events (archie #1984, #1985) 2026-11-16 04:22:52 +11:00
sam 3a700cddfa fix(connectors,runs): an approved action runs as judged however its input was re-encoded, and one that can't be confirmed is reported as unknown (archie #1985, #1990) 2026-11-16 04:08:15 +11:00
sam 0238f247e5 feat(approvals): a held action is asked of a person, and the run waits for the answer (archie #1985, #1999)
An action judgement holds at propose and wait is no longer a dead end. The
new approvals module owns the request: it binds to the decision and the
action's digest, so an answer covers the action the person was shown and
nothing else, and it settles once. The answer wakes the run, which judges the
action again and runs it only as the approval allows: a refusal still refuses,
an altered input runs nothing, and a judgement that came back worse runs
nothing on that approval.

The composer carries the request as a message with the request id and its
deadline, and its answer is a message too, so the trail shows what was asked
and what was answered. A request nobody answers inside its deadline is settled
as expired and nothing runs.

How long a request waits is an organisation setting, edited in the dashboard
and stored in milliseconds, because a Postgres interval scans as text. A run
pins the deadline it started with, like its model.

An agent that proposes the same action twice is asked about it once, and the
notification says when the investigation proposed nothing at all.
2026-11-16 02:21:06 +11:00
sam e594ec3780 chore: cleanup unused files 2026-11-16 02:04:45 +11:00
sam 200c6d0928 fix(prompts): the investigate prompt tells the agent to call the action it recommends (archie #1999)
It also said its tools only read, which stopped being true when actions became tools. Judgement decides whether an action runs, so calling one is the proposal.
2026-11-16 01:39:32 +11:00
sam 0dbf241106 feat(judgement): the weakest-link decision, and executing only what was judged (#1986, #1989, #1990, #1988)
A new judgement module assesses one concrete action: hard rules refuse before
any guard runs; every guard sets a ceiling and the action runs at the lowest;
a guard that fails, panics or gives no ceiling holds it at propose and wait;
an advisory verdict is recorded and sets no ceiling. Reversibility and
Precedent (the fresh-install class default) are the first guards. Every
decision is recorded with its verdicts and class, and the run's trail lists
them. Agent tools now offer connector actions too: each call is assessed and
executed only as decided and only with the judged input, and a held action
comes back to the agent as a failed call naming its level and findings.
Tools gain Resolve, so an MCP server's declared effect reaches judgement.
2026-11-16 01:05:29 +11:00
sam af753290e7 chore(deps): ai-sdk v0.8.0 2026-11-16 00:54:21 +11:00
sam a6644c20cd fix(connectors): accepting a connector writes an empty tool list, not NULL
Since the MCP migration made accepted.tools NOT NULL, the connector and secret
engine accept path never set it, so re-accepting any connector failed with a
not-null violation.
2026-11-16 00:44:02 +11:00
sam 4877362223 fix(runs): a step hands back its value as recorded, so a resumed agent doesn't diverge from its journal (#1977)
Killing the binary mid-investigation and restarting it failed the run: the
first model request after the resume didn't match the recorded one. The tool
schemas pinned in a step reached the live attempt as written but the resume
as stored, and both the v2 encoder (compacting raw JSON) and jsonb (reordering
keys) rewrite them. Step now returns the decoded recorded value on the live
path too, and runs.steps.output is json, which keeps the text as written.
2026-11-16 00:36:19 +11:00
sam 0335872701 docs(deliveries): deliveries is transport; approvals own the request and its answer 2026-11-16 00:28:29 +11:00
sam eb9d470ba8 fix(runs): the forecast figure is in hours, so the model doesn't convert it (archie #2005) 2026-11-16 00:16:14 +11:00
sam a3d32e92e5 feat(runs): the investigate prompt names the labels and the figure (archie #2005)
An alert about a filesystem carries instance and mountpoint, and those are the
labels the forecast query needs, so the prompt names both and gives the query
that answers what an operator asks: the seconds until the disk is full, from
predict_linear and deriv over the same window. A negative figure is the
filesystem not filling, which the prompt says to report as that rather than as
a time.
2026-11-16 00:13:13 +11:00
sam deb3865d75 chore: use generic host names in a deploy comment and test labels 2026-11-16 00:13:04 +11:00
sam 6d97f62929 fix(runs,pg): grant the runtime role on sequences, and read a missing result as null (archie #2005)
Two faults stopped an investigation from finishing on staging.

The runtime role was granted DML on every table but nothing on sequences, so
the first table keyed by a serial (deliveries.messages) failed its insert with
"permission denied for sequence messages_seq_seq", failing the run at its
notification step.

A run that failed has no result, and a step with no output is recorded as NULL;
the rows were read straight into jsontext.Value, which can't hold NULL, so the
trail API answered 500 for exactly the runs and steps that needed reading. The
reads coalesce to JSON null instead.

Verified on staging after deploying: the same run's trail reads back.
2026-11-16 00:09:46 +11:00
sam 18d1e07a21 fix(dashboard): one pattern serves the page and the API catch-all (archie #2005)
The dashboard registered "/api/" and then "GET /", which ServeMux refuses:
"GET /" names fewer methods than "/api/" but a more general path, so a binary
with the dashboard built in panicked on start. Staging went down on the deploy
that first shipped both.

One handler behind one pattern decides instead: an unclaimed /api/ path is a
JSON 404, the page is read-only, and everything else is a route inside the SPA.

The test reproduces the panic against the old routing, and pins what each path
answers.
2026-11-16 00:05:02 +11:00
sam cf249d7643 feat(connectors): MCP servers as a fourth accepted package, with their declared tools offered to agents (archie #2005)
An investigation needs Prometheus's own metrics, and Prometheus publishes an
MCP server, so the connectors module now runs MCP servers as published instead
of wrapping them: a stdio binary in its own user and network namespace with an
egress allow-list, or an HTTP endpoint dialled through declared egress.

Acceptance names the transport, the tools it permits, and the credential slots
that resolve into the server's environment (stdio) or Authorization header
(HTTP). Each permitted tool is declared as a lookup, or as an action with its
effect; a tool the server lists but the acceptance doesn't name is never
offered, and a declared tool the server doesn't list fails the start rather
than going silently missing. Declared tools reach agents beside connector
lookups through the same declaration and the same call path, with the server's
own input schema, under a name no connector can take: an accepted name runs one
package.

A server that fails to start, exits or stops answering is reported by readiness
and reconnected with backoff. Tool calls carry a deadline, results are capped,
and an error result fails its call with the server's own text rather than the
run.

The investigate prompt now asks for a time-until-full figure from
`predict_linear` through the metrics server instead of an estimate from raw
points.

The old core MCP path stays for now: the legacy gateway and task containers
still read config.Tools.MCPServers, so it goes with them.
2026-11-15 23:43:39 +11:00
sam 66220e1752 feat(runs,deliveries): the decision trail, the composer channel, and the dashboard that shows them (#1996, #1984)
GET /api/runs/{id} assembles a run's trail from rows already kept: the event
and trigger that started it, each workflow step, and each model and tool call
from the agent's journal. Investigations end by notifying their findings on
the composer, whose messages are read from a cursor with a live stream that
only says when to read. The binary serves its own SPA entry, archie.html,
calling only the new API. The investigate prompt now treats the event as a
claim to check against what it measures.
2026-11-15 23:36:42 +11:00
sam 93c9eb51f3 fix(deploy): let the staging container confine extensions in user and network namespaces
Docker's default seccomp profile refuses the clone the extension host
confines with, so a connector that declares egress couldn't start. The profile
is Docker's default plus that clone, limited to the user and network
namespace flags.
2026-11-15 22:21:03 +11:00
sam e787a79af4 feat(connectors): credentials sealed with age, and secret engines that resolve them (#1977, #1982)
Credentials are typed (machine, age), write-only through the API and sealed
to the age identity in the bootstrap config. A field holds a value or names a
secret engine key; connectors and engines are accepted with credential slots
that resolve into their Configure secrets. The secret engine contract gains
secrets so an engine can receive its own key.
2026-11-15 22:14:26 +11:00
sam 777b17acf7 chore(deps): pin ai-sdk v0.7.0 2026-11-15 21:59:09 +11:00
sam 02df83ccb7 feat(runs): the in-process agent loop, checkpointed as run steps, and the investigate workflow (#1977, #1889)
The agent model is an organisation setting in the new governance module.
Every model and tool call is a journal step, so a killed run resumes without
repeating either. Agents are offered connector lookups and read-only actions
only, until judgement exists.
2026-11-15 21:49:53 +11:00
sam 68d81fbbd0 refactor: the single binary uses encoding/json/v2 and jsontext (#1977) 2026-11-15 18:11:37 +11:00
sam 75c3d2b096 style(events): gofumpt the event view 2026-11-15 18:07:57 +11:00
sam e898acedc8 fix(events): the events API returns a JSON view, not the row struct (#1980) 2026-11-15 18:07:28 +11:00
sam b89d9e0f05 feat(events): hear Alertmanager through its connector: verified intake, dedupe, links, triggers that start runs (#1980, #1978) 2026-11-15 18:05:38 +11:00
sam 58858f0d92 feat(connectors): the connector contract and its confined extension host (#1979) 2026-11-15 17:24:31 +11:00
sam 8b64ab0afe refactor(runs): Step, Sleep and Wait are generic methods on the run context (#1977) 2026-11-15 17:17:09 +11:00
sam e8366683a9 feat(runs): durable run engine with step checkpoints and lease-fenced writes (#1977) 2026-11-15 17:14:05 +11:00
sam 99a3d675a8 chore(deploy): staging stack for the single binary on nebula (#1998) 2026-11-15 17:05:53 +11:00
sam a69a0ea942 feat(archie): the single binary's skeleton: bootstrap config, migrations under an advisory lock, health (#1977) 2026-11-15 16:59:21 +11:00
sam 9cd31e48ca fix(openshell): sandboxes install scoped npm packages; egress endpoints allow encoded slashes (#1864) 2026-11-15 00:12:07 +11:00
sam 998c72f8d3 fix(agentworker): the agent works from its worktree, so a resumed stage in an OpenShell sandbox finds the repository 2026-11-15 00:07:29 +11:00
sam 7a311a3c74 fix(taskactions): a person's own action no longer reads 'no authorising principal'; delegated ones say on whose behalf 2026-11-15 00:04:06 +11:00
sam e78cb1e63e fix(webhookguard): token counts in task logs keep their value; secrets under token keys stay redacted (#1720) 2026-11-14 23:42:46 +11:00
sam 14e2474a49 feat(ui): workflow list shows triggers, steps, last run and delivery with an inline enabled switch; the workflow page header carries them too 2026-11-14 23:11:38 +11:00
sam 86192e8053 chore(ui): remove unused components, exports and helpers 2026-11-14 23:09:57 +11:00
sam 990cd9408c chore(gatewayrpc): remove the session-store RPCs no client called 2026-11-14 23:09:57 +11:00
sam c7ce32df3e feat(ui): split Workflows into a list page and a workflow page 2026-11-14 22:49:36 +11:00
sam 5d620461fe fix(openshell): sandboxes reach the embedded broker by the services host, and may open /dev/null and /proc (#1864) 2026-11-14 22:06:09 +11:00
sam 411632548c fix(openshell): a sandbox that fails to start reports its last log lines (#1864) 2026-11-14 21:59:42 +11:00
sam a262151cb9 fix(daemon): park pr_open tasks on permanent forge resolution failures (#1975) 2026-11-14 20:09:19 +11:00
sam a8d1de8b5e fix(prompts): mark forge-authored text as untrusted data (#1976) 2026-11-14 20:09:19 +11:00
sam 9f830db510 fix(daemon): publish polled issues only from authors with write access (#1830)
The issue poller published title and body of every labelled or assigned
issue to the agent. It now keeps only write-access authors, failing closed
when the forge cannot answer. The filter moves to forge.WriterIssues,
shared with the issue_list tool.
2026-11-14 18:31:54 +11:00
sam 80129b7dd6 fix(webui): capture list narrows to the requested workspace in the store query (#1335) 2026-11-14 15:29:36 +11:00
sam 48c28b36ba fix(gateway): bound task titles in the /tasks and /agents listings (#1076) 2026-11-14 15:29:36 +11:00
sam c5382a8476 fix(webui): a personal token create that fails is revoked and bounded under the dashboard timeout (#1717) 2026-11-14 15:08:37 +11:00
sam eed9101d5b fix(ui): agent profile fields say what they accept and what empty means (#1875) 2026-11-14 15:08:37 +11:00
sam cdfdf3a756 fix(e2e): workflow checks drive the reworked step cards (#1966)
A duration field with an id now takes its accessible name from its label
instead of a fixed 'Duration' aria-label.
2026-11-14 15:05:53 +11:00
sam 1d329bad35 fix(daemon): reclaim idle task clones hourly, not only on a full volume (#1814) 2026-11-14 15:05:53 +11:00
sam f5c566bcab fix(logging): redact secrets from shipped task log entries (#1720) 2026-11-14 15:05:53 +11:00
sam 90090922e1 fix(archied): the Docker egress proxy and relay do not start under the OpenShell runtime (#1973) 2026-11-14 14:22:29 +11:00
sam a8f1fc9ea3 fix(openshell): keyless model providers get an egress rule on their base URL's host and port (#1972) 2026-11-14 14:22:29 +11:00
sam a9621b91cd fix(archiemessaging): enabling or disabling a channel extension applies without a restart (#1586) 2026-11-14 14:20:37 +11:00
sam c7fabbee25 fix(archiegateway): curators resolve the default chat model per pass, not at boot (#1818) 2026-11-14 14:20:37 +11:00
sam b7b6078939 fix(ui): chat suggestions leave out prompts already asked in the conversation 2026-11-14 12:27:17 +11:00
sam 39bfde195c fix(ui): opening the chat window keeps the minimised bar's width 2026-11-14 12:20:47 +11:00
sam 67ae6afec1 fix(ui): the floating chat window follows the page when the browser pans to the focused input 2026-11-14 12:18:44 +11:00
sam b314968328 fix(ui): the floating chat window stays above a tablet's on-screen keyboard 2026-11-14 12:16:08 +11:00
sam 432e6280d6 feat(ui): the minimised chat composer is wider and taller, with larger text 2026-11-14 12:14:02 +11:00
sam 236d0b678a fix(ui): a task row's action error clears when the task changes status (#1872) 2026-11-14 12:11:04 +11:00
sam 5f45cdebb5 fix(daemon): reconcile PR state through the repository's org connection (#1872) 2026-11-14 12:03:40 +11:00
sam bfe28f6750 fix(taskactions): a refused merge tells the operator why, not the forge's error chain (#1872) 2026-11-14 12:03:40 +11:00
sam 44a7d59acf fix(daemon): log why a task's forge could not be resolved (#1872) 2026-11-14 11:56:53 +11:00
sam 7148579544 fix(controlplanestore): the container runtime document stores egress_hosts (#1967) 2026-11-14 11:37:16 +11:00
sam 6eea6aaffa fix(ui): egress hosts is a one-host-per-line text area (#1967) 2026-11-14 11:33:13 +11:00
sam dc4cd29c83 fix(ui): a host list inserted from the keyboard clipboard splits into separate egress hosts (#1967) 2026-11-14 11:29:29 +11:00
sam 87ed8a2e15 fix(ui): egress hosts add on blur and paste; Docker-only container fields hide under OpenShell (#1967) 2026-11-14 11:24:28 +11:00
sam 855e8ceb3b fix(ui): the minimised chat composer docks at the bottom of the screen 2026-11-14 11:18:22 +11:00
sam 7a9f507e2d test(e2e): chat-dock-layout uses the v2 stored layout shape (#1964) 2026-11-14 04:09:20 +11:00
sam 104854da2a fix(ui): accessibility check targets the New task dialog; keep focus outlines on dock handles (#1963) 2026-11-14 04:09:20 +11:00
sam 3225396cf1 fix(agent): pass the State Store CA base64-encoded; the OpenShell gateway rejects newlines in the environment (#1864) 2026-11-14 04:04:16 +11:00
sam 811cab57ac fix(openshell): short random sandbox names the gateway accepts (#1864) 2026-11-14 04:04:15 +11:00
sam 3a965e2a4f feat(nats): an external broker defers logins to archie through auth callout (#1866)
Task containers log in with their run credential on an external broker and
reach only their own subjects, decided by the embedded broker's authenticator.
The broker token is never put in a container environment.
2026-11-14 04:04:15 +11:00
sam 7d664d7efb fix(archied): label OpenShell gateway providers and sweep leftovers at boot (#1970) 2026-11-14 04:04:15 +11:00
sam 92fbcd7a28 fix(ui): the topbar section crumb names the destination on detail pages (#1880) 2026-11-14 04:03:46 +11:00
sam 5edf58fd68 fix(daemon): reconcile and merge tasks whose PR was merged on the forge (#1872)
ListOpenPRs dropped org_id, so the reconciler resolved the forge and
worktrees in the default org instead of the task's own and skipped the
task silently. Select the org, log a skipped task, and let the Merge
action succeed when the forge reports the PR already merged.
2026-11-14 04:01:31 +11:00
sam da1795c597 feat(egress): Docker task containers reach allowed hosts through the egress proxy (#1967)
The task session carries containers.egress_hosts and the profile's remote MCP
hosts, and the container gets ProxyEnv with the relay exempt from the proxy so
the State Store and NATS dials bypass it. A host the session lists exactly may
resolve to a private address; wildcard and any-host matches may not.
egress_hosts moves from openshell to containers, as it applies to both runtimes.
2026-11-14 04:01:31 +11:00
sam a18a4f7500 fix(controlplanestore): refuse workflow writes that drop a workflow an intake route names (#1962) 2026-11-14 03:58:15 +11:00
sam 7ab209fa7e fix(sdnotify,staterpc): log with the request context so lines carry a trace id (#1936) 2026-11-14 03:57:07 +11:00
sam 97fbc35ee4 fix(modelloop): log each model call and tool call as it finishes (#1850) 2026-11-14 03:55:29 +11:00
sam 7d6f22d227 fix(daemon): a per-task stop interrupts a resumed run reacquiring capacity (#1937) 2026-11-14 03:51:03 +11:00
sam 0451545220 fix(ui): clearing an agent profile field no longer leaves an unsaved change (#1874) 2026-11-14 03:48:04 +11:00
sam 5c02207d48 feat(openshell): connect to a gateway that requires mutual TLS (#1864) 2026-11-14 03:41:24 +11:00
sam e784adbd7a chore: the OpenShell SDK is a direct dependency 2026-11-14 03:34:31 +11:00
sam d3678869d2 feat(archied): OpenShell tasks get model keys through gateway providers (#1864) 2026-11-14 03:33:36 +11:00
sam 6c287b48e6 fix: return write-side close errors; the gate checks unhandled errors 2026-11-14 03:31:46 +11:00
sam bbd3c39ef1 feat(ui): container runtime page edits the OpenShell services host and egress hosts (#1864) 2026-11-14 03:28:42 +11:00
sam 2096ae8267 feat(openshell): each sandbox's network policy admits only what its task needs (#1864, #1967)
Runtimes now take a task launch: image, mounts, env, the daemon's NATS
and State Store with the task's credentials, its model providers and the
hosts its tools may reach. Docker addresses them through the egress relay
as before. An OpenShell sandbox reaches NATS and the State Store over
plain TCP, the model providers with their credential bound, and the
task's remote MCP hosts and the allowed package registries; services
addressed by IP or loopback are named by the configured services host,
since sandbox policy admits only DNS names.
2026-11-14 03:24:37 +11:00
sam a1ec538a87 feat(openshell): task agents can run as OpenShell sandboxes (#1864)
Container runtime policies gain a runtime (docker or openshell) and the
OpenShell gateway's address, workspace and token, set on the container
runtime page and applied on restart. The OpenShell backend creates a
sandbox per task with the worktree and volumes bound in, reports when
the agent exits or outlives its maximum uptime, deletes the sandbox on
release, and sweeps this instance's leftovers at boot. Storage volumes
are created attachable to OpenShell sandboxes.
2026-11-14 03:07:57 +11:00
sam 45b9295cb7 refactor(daemon): tasks run through a TaskRuntime; the Docker pool is its first backend (#1864) 2026-11-14 02:58:26 +11:00
sam e7d3ed72e4 fix(container): task containers run on their own sandbox network behind the egress relay (#1867)
Each task container now gets an internal bridge with no host address,
shared only with the egress relay. NATS, the State Store and the model
proxy are reached through the relay's ports; a loopback State Store is
forwarded to the host gateway. The network is removed with the task, and
boot sweeps any a previous daemon left. The per-task State Store relay on
the host bridge is gone.
2026-11-14 00:14:21 +11:00
sam 82f5afaa6d feat(ui): History is the workflow's YAML editor, marking changes since the picked version; the YAML tab goes
A never-run workflow's Runs view shows one empty state. Browser checks open the editor through History; the stale parts are #1966.
2026-11-13 23:49:46 +11:00
sam 2f95dfb67d fix(ui): a failed step restart names the run and step it was for 2026-11-13 23:32:14 +11:00
sam fb732974f5 fix(ui): canvas zoom controls float in the canvas corner instead of taking a row 2026-11-13 23:32:14 +11:00
sam 81c59d7fac fix(chat): touch drags the minimised bar from anywhere, as a mouse does 2026-11-13 23:26:58 +11:00
sam a2b82b4c25 fix(chat): the dock drags, resizes and swipes through vueuse; touch can move the minimised bar 2026-11-13 23:24:30 +11:00
sam 21dfb56e50 refactor(ui): the phone uses the topbar crumbs; the sidebar sheet goes 2026-11-13 22:21:17 +11:00
sam 41f44c43a1 feat(workflow): issue routing is a control-plane setting edited in the dashboard (#1959)
Label to workflow rules and a default workflow are the intake-routes
resource: ordered, case-insensitive, first rule wins, seeded with bug to
tdd, feature to feasibility, default triage. A write naming an undefined
workflow or an empty label is refused. The daemon reads it through the
workflow definitions client when pinning a task and at intake.

The kind indirection only carried this routing, so it is removed: the
per-kind NATS subjects (every consumer already bound archie.task.>) are
one subject, the envelope and playbook triggers lose their kind, and
x-intake-routes is dropped. The dashboard gets an Issue routing page
under Automation; the trigger card reads the same setting.
2026-11-13 20:28:52 +11:00
sam ca4b039cb4 feat(workflow): serve step type titles with the step vocabulary (#1961)
Each step type declares its title beside its factory and settings; the
control plane serves it in x-step-types, and the dashboard reads it instead
of a hand-written TYPE_TITLES table. Parallel and switch are YAML shapes, not
registered types, so their titles stay with the graph.
2026-11-13 20:26:27 +11:00
sam 841c6aea16 feat(workflow): serve which workflows start each one; the trigger card stops re-deriving it (#1960) 2026-11-13 18:01:33 +11:00
sam fb330f350d fix(ui): workflow list uses Progress; tooltip essays go; instructions lead workflow settings (#1957) 2026-11-13 17:56:13 +11:00
sam 6516477b20 feat(ui): workflow canvas fills the editor; cards say what they are; one step menu for pointer, keyboard and touch (#1954) 2026-11-13 17:54:29 +11:00
sam 9d8e4f68ab fix(ui): step cards use the shared stage status words; new step areas reach the insert menu (#1956) 2026-11-13 17:48:48 +11:00
sam 3653376221 feat(ui): workflow header shows Publish only with a draft; enabling moves to the list (#1955) 2026-11-13 17:46:43 +11:00
sam 925365b245 refactor(ui): one input spec type and parser for workflow inputs and outputs (#1958) 2026-11-13 14:42:10 +11:00
sam 5b3ae6abde refactor(ui): fold one-consumer workflow files into their consumers; move shared ones out (#1958) 2026-11-13 14:40:01 +11:00
sam ecf4e6b95a fix(ui): trigger forms show the server's binding status and load what they read (#1951) 2026-11-13 14:35:24 +11:00
sam 6a17951a3a fix(ui): workflow list menus sit in their row, a new workflow is listed at once, moving a step opens nothing (#1952) 2026-11-13 14:32:46 +11:00
sam 0cfa701f5c fix(ui): one run dialog for a workflow; a disabled Run says why (#1953, #1952) 2026-11-13 14:30:25 +11:00
sam a5ba2c994f feat(ui): one Runs view for a workflow, built on the run list the canvas uses (#1950, #1953) 2026-11-13 14:28:27 +11:00
sam 5e9e551fbb fix(ui): stale workflow responses no longer overwrite newer ones (#1949) 2026-11-13 14:24:22 +11:00
sam 5810c49260 fix(ui): failed workflow reads no longer look like empty data (#1948) 2026-11-13 14:22:52 +11:00
sam e2df9cbd0a fix(ui): workflow editor fields no longer drop input (#1947) 2026-11-13 14:19:29 +11:00
sam 806c82bda3 fix: guard workflow names against blanks and collisions
- refuse blank or duplicate spec names and duplicate step ids, with inline errors
- offer a payload path for every array item in event previews, not just the first three
- trim multiline step settings and apply them on change
2026-11-13 14:16:22 +11:00
sam 39929b9e48 fix(ui): discarding or restoring over unpublished workflow changes asks first (#1945) 2026-11-13 14:04:02 +11:00
sam f4b7652ae7 fix(ui): a workflow draft changed elsewhere is never overwritten silently (#1944) 2026-11-13 14:01:35 +11:00
sam 1def83a43f fix(ui): a workflow link isn't replaced before the list loads 2026-11-13 13:56:12 +11:00
sam 6d54952cbb docs: an epic's children are linked as dependencies, not labelled 2026-11-13 13:54:28 +11:00
sam 757c3016ae fix(ui): Enter in a workflow field no longer publishes (#1943) 2026-11-13 13:51:50 +11:00
sam a0ee8e3f2e refactor(ui/copy): one unresponsive entry in common, no empty catalogues, no em dashes 2026-11-13 13:43:11 +11:00
sam 3eb976ef83 fix(ui/workflows): failures read from the error catalogue 2026-11-13 13:41:32 +11:00
sam 47a340bf79 fix(ui/org): failures read from the error catalogue 2026-11-13 13:41:32 +11:00
sam cdd636d5aa fix(ui/captures): failures read from the error catalogue 2026-11-13 13:41:31 +11:00
sam 4c54d250f6 fix(ui/tasks): failures read from the error catalogue 2026-11-13 13:41:23 +11:00
sam f9ac9229d5 fix(ui/chat): failures read from the error catalogue 2026-11-13 13:41:23 +11:00
sam 0d9e2d1cd8 feat(ui): error catalogue and describeError; dropped connections read as network copy 2026-11-13 13:33:39 +11:00
sam e389e1a21e fix(ui): Escape on the chat rename dialog closes the dialog only 2026-11-13 13:30:19 +11:00
sam 73e32f016a fix(ui): a workflow with no runs says so instead of showing a dash 2026-11-13 13:27:10 +11:00
sam 6b7f6f2731 fix(ui): the open workflow is in the URL, so chat knows which one you mean 2026-11-13 13:26:05 +11:00
sam f5be0d60dd fix(ui): chat prompts hide until a model is connected and scroll as one row 2026-11-13 13:19:29 +11:00
sam 851cb78b04 fix(chat): a failed turn reads as a plain sentence, shown as an error 2026-11-13 13:16:11 +11:00
sam f183a397cb fix(ui): slash palette at label size with descriptions under each command 2026-11-13 13:12:17 +11:00
sam f49ba6bd66 feat(ui): topbar crumb menus open on hover 2026-11-13 13:07:31 +11:00
sam 8dba4e6dec feat(ui): topbar chat button; a docked chat hides when minimised 2026-11-13 13:05:42 +11:00
sam c26eeda939 feat(ui): organisations are created and opened from Instance settings 2026-11-13 13:03:43 +11:00
sam e6a2a16bba fix(ui): the command palette opens on Ctrl+K only 2026-11-13 13:00:46 +11:00
sam 6cc8107ebb fix(ui): Ctrl+/ toggles chat only; the palette opens on a bare slash 2026-11-13 12:58:12 +11:00
sam 8c3464163d fix(ui): centre the minimised chat bar on one line 2026-11-13 12:55:11 +11:00
sam 8d89f47d6b fix(ui): space the topbar controls and keep the alert count off the avatar 2026-11-13 12:53:23 +11:00
sam 260732f400 feat(ui): rework the chat dock header and empty state; fix resize tracking 2026-11-13 12:52:16 +11:00
sam 55e477794e fix(dev): task dev uses embedded NATS regardless of the installed config 2026-11-13 12:10:46 +11:00
sam 3ff1649322 chore(ui): add spotnote for element-level UI feedback in dev 2026-11-13 12:00:05 +11:00
sam bdc457d11e refactor(daemon): identity, org and access checks are their own gate (#1934) 2026-11-13 04:20:41 +11:00
sam 500d02be78 fix(daemon): the task bus is its own type; a cancelled run stops waiting for its slot (#1932) 2026-11-13 04:17:46 +11:00
sam 0cd9cefd76 refactor(daemon): binding dispatch is its own type (#1930) 2026-11-13 04:15:14 +11:00
sam 0a770ed171 refactor(daemon): PR review scanning and reactions are their own type (#1933) 2026-11-13 04:13:36 +11:00
sam 0d13b919da refactor(daemon): issue polling is its own type (#1931) 2026-11-13 04:12:29 +11:00
sam 63a1750936 refactor(daemon): drop nil paths production never takes; one file per cluster (#1929) 2026-11-13 04:08:55 +11:00
sam d0118756d7 refactor(gateway): the turn owner ID is made once by the composition root (#1928) 2026-11-13 03:57:05 +11:00
sam f4c304cfba refactor: log through the injected logger with context; NATS handlers root in the registering context (#1927) 2026-11-13 03:56:12 +11:00
sam afaea346ee refactor(access): authorization takes the caller's context instead of a stored one (#1925) 2026-11-13 03:54:05 +11:00
sam 68e8552f0d fix: log NATS ack and nak failures instead of discarding them (#1924) 2026-11-13 03:52:38 +11:00
sam b25676b612 fix: check Docker conflicts, push errors and RPC status by type, not message text (#1923) 2026-11-13 03:47:34 +11:00
sam 60c0f19e63 fix(forge): a close refused for open dependencies is a typed error across the boundary (#1922) 2026-11-13 03:47:34 +11:00
sam 65e6bafb23 fix(tools): the path jail is a value each tool set owns, not a process global (#1921) 2026-11-13 03:47:34 +11:00
sam 1c191b4ee0 refactor(config): service registry is a static map, not init() registration (#1926) 2026-11-13 03:47:34 +11:00
sam 892ed291b9 refactor(mcp): use the official MCP Go SDK for the client
Deletes the hand-written internal/tools/mcp client and transports. The
provider talks to an SDK ClientSession over CommandTransport,
StreamableClientTransport or SSEClientTransport, and reconnects when the
server exits. The http transport now keeps a real streamable session
instead of stateless POSTs. Sampling goes through one adapter, since the
SDK marks it deprecated (SEP-2577). message_endpoint is removed: the
SSE transport takes the POST URL from the server's endpoint event.
2026-11-13 03:44:55 +11:00
sam c5f24ec914 chore: delete code no binary reaches
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.
2026-11-13 03:33:32 +11:00
sam aefb4e486b chore(deps): update Go modules 2026-11-13 03:20:22 +11:00
sam 7c7129eefb docs(agents): say how tests are written 2026-11-13 03:16:15 +11:00
sam db346b159d fix(webui): mark cookies Secure behind a TLS proxy; run gosec in the gate (#1919)
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.
2026-11-13 03:16:15 +11:00
sam a3d4b751b9 ci: pin every action to a commit SHA (#1919) 2026-11-13 03:16:15 +11:00
sam f3a379add1 ci(promote): pass the version through env, not into the script 2026-11-13 03:03:30 +11:00
sam d7741d6088 docs(agents): name priorities critical, high, medium and low 2026-11-13 02:56:00 +11:00
sam 27df64f8b0 docs(agents): use the in-progress and deferred labels 2026-11-13 02:55:10 +11:00
sam 8890c9ac3e docs(agents): describe the p0-p3 and bare type labels 2026-11-13 02:53:48 +11:00
sam fb281c192a docs(agents): keep a lighter push-back rule 2026-11-13 02:45:35 +11:00
sam fc6f614408 docs(agents): drop the December rule, loosen two decision rules, correct the services table 2026-11-13 02:44:48 +11:00
sam 40526b077f ci(deploy): drop comments from the release workflow (#1917) 2026-11-13 02:37:20 +11:00
sam 061227708d chore(release): remove the canary, release news, changelog and Woodpecker pipelines (#1917) 2026-11-13 02:35:59 +11:00
sam a04fd3834d Merge pull request 'chore(workflow): remove the needs block (#1888)' (#1916) from chore/1888-remove-workflow-needs into main
deploy / plan (push) Successful in 26s
ci/woodpecker/push/deploy Pipeline failed
deploy / gate (push) Failing after 8m36s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
Reviewed-on: #1916
2026-11-12 15:31:42 +00:00
sam a4fbaaf84c Merge branch 'main' into chore/1888-remove-workflow-needs
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 4m50s
2026-11-12 15:31:30 +00:00
sam 606da1aee5 chore(workflow): remove the needs block (#1888)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 3m8s
2026-11-13 02:11:22 +11:00
sam 228f17d98a Merge pull request 'feat(chat): float the chat dock anywhere on screen (#1904)' (#1912) from feat/1904-chat-dock-float into main
deploy / plan (push) Successful in 7s
ci/woodpecker/push/deploy Pipeline failed
deploy / gate (push) Failing after 7m36s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
Reviewed-on: #1912
2026-11-12 14:23:35 +00:00
sam 3c1ecc8087 Merge remote branch feat/1904-chat-dock-float into the rebased head
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 2m47s
2026-11-13 01:17:25 +11:00
sam 29e263ab23 feat(chat): float the chat dock anywhere on screen (#1904)
The chat dock is now a free-floating window on desktop-width screens:
the header drags it to any position, all eight edges and corners resize
it by pointer and keyboard (role=separator with aria-orientation and
valuenow), and Left / Float / Right controls in the header switch
modes explicitly. Dragging near a side edge shows the pinned split
preview and commits on release; minimising leaves the bar in place and
draggable; Ctrl+/ toggles the window. The layout persists under
archie.chat.dock.v2, migrating and removing the old archie.chat.dock
key. Phone width keeps the full-width bottom bar.
2026-11-13 00:47:07 +11:00
sam fbc9ed21e7 Merge pull request 'fix(daemon): skip issue intake when the routed workflow is disabled (#1913)' (#1915) from fix/1913-intake-skip-disabled into main
ci/woodpecker/push/deploy Pipeline failed
deploy / plan (push) Successful in 7s
deploy / gate (push) Failing after 8s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
Reviewed-on: #1915
2026-11-12 13:44:06 +00:00
sam 76be7b87b2 Merge branch 'main' into fix/1913-intake-skip-disabled
Quality / check (pull_request) Successful in 8m11s
2026-11-12 13:43:34 +00:00
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 782daf8bbb Merge pull request 'fix(chat): anchor the More popover outside the tooltip chain (#1862)' (#1914) from fix/1862-more-menu into main
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
Reviewed-on: #1914
2026-11-12 13:42:32 +00:00
sam 5baef8805d Merge branch 'main' into fix/1862-more-menu
ci/woodpecker/pr/quality Pipeline was canceled
Quality / check (pull_request) Failing after 5m19s
2026-11-12 13:42:04 +00:00
sam 82ca9613c7 fix(chat): anchor the More popover outside the tooltip chain (#1862)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was canceled
Nested inside TooltipTrigger as-child, PopoverTrigger's PopperAnchor ref
resolved to a component object instead of the button, so the popover never
became positioned and its content stayed parked off-screen at
translate(0, -200%): the menu opened in state only, invisible to the user.
Wrapping the tooltip in an explicit PopoverAnchor makes the anchor the real
button element, so the menu renders beside it. The tooltip (accessible name
More), the menu items, and the rename/branch dialog are unchanged.

Adds ui/test/chat-more-menu.test.ts, a browser behaviour check (vite dev
server + headless Chrome over CDP, API mocked in-page) that fails on the old
nesting with the menu at (0, -526) and passes with it in the viewport; it
skips when no Chrome binary is installed.
2026-11-13 00:40:53 +11:00
sam 4e9745d5c6 feat(chat): float the chat dock anywhere on screen (#1904)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 10m29s
The chat dock is now a free-floating window on desktop-width screens:
the header drags it to any position, all eight edges and corners resize
it by pointer and keyboard (role=separator with aria-orientation and
valuenow), and Left / Float / Right controls in the header switch
modes explicitly. Dragging near a side edge shows the pinned split
preview and commits on release; minimising leaves the bar in place and
draggable; Ctrl+/ toggles the window. The layout persists under
archie.chat.dock.v2, migrating and removing the old archie.chat.dock
key. Phone width keeps the full-width bottom bar.
2026-11-13 00:30:52 +11:00
sam ea64d84696 Merge pull request 'feat(chat): page-aware suggested prompts beside the composer, sent on click (#1905, #1906)' (#1911) from feat/1905-1906-chat-suggestions into main
deploy / gate (push) Canceled after 3m40s
ci/woodpecker/push/deploy Pipeline failed
deploy / plan (push) Successful in 10s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
Reviewed-on: #1911
2026-11-12 13:26:20 +00:00
sam 2bec268b29 Merge branch 'main' into feat/1905-1906-chat-suggestions
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 11m7s
2026-11-12 13:26:03 +00:00
sam 5b282c9efe Merge pull request 'feat(chat): surface streamed model thinking in the dashboard (#1907)' (#1910) from feat/1907-chat-thinking 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: #1910
2026-11-12 13:25:51 +00:00
sam 7b295df8ff feat(chat): page-aware suggested prompts beside the composer, sent on click (#1905, #1906)
ci/woodpecker/pr/quality Pipeline is pending
Quality / check (pull_request) Canceled after 0s
The suggestion strip moves out of the empty transcript into the composer,
above the field, so prompts stay reachable without scrolling to the top and
show in the collapsed bar where there is room (hidden below the md breakpoint
in the collapsed bar, wrapping when expanded on a phone). Clicking a prompt
calls sendMessage({ textOverride }), which sends at once while no turn runs
instead of filling the composer. Prompt sets are keyed off the current route
name, the same identity the page tag uses: task detail (naming the open task),
tasks, events, workflows, schedules, settings, and a default set. The empty
transcript keeps its logo and no longer owns the fixed prompt list; the dead
prompt re-emit in ChatTranscript is removed.
2026-11-13 00:25:18 +11:00
sam 607bfddd0e Merge branch 'main' into feat/1907-chat-thinking
Quality / check (pull_request) Successful in 12m49s
2026-11-12 13:24:24 +00:00
sam 779b036d95 Merge pull request 'fix(webui): sanitise dashboard chat error responses (#1908)' (#1909) from fix/1908-webui-chat-errors into main
deploy / plan (push) Successful in 46s
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
Reviewed-on: #1909
2026-11-12 13:23:30 +00:00
sam 27e997e0d9 Merge branch 'main' into fix/1908-webui-chat-errors
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Successful in 4m40s
2026-11-12 13:23:15 +00:00
sam 433ea390a6 feat(chat): render the live turn's thinking in the dashboard (#1907)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was successful
Reasoning frames accumulate into streamingTurn.reasoning and the live row
shows them in a collapsible Thinking trace built from the components/ui
trace pattern, with a spinning icon and shimmering title while no reasoning
has arrived yet. A turn that produces no reasoning renders no trace, and
reasoning never leaks into the reply text.
2026-11-13 00:21:27 +11:00
sam ff8615b090 feat(gateway): stream model reasoning as reasoning chat events (#1907)
The ai-sdk FullStream drain moves from the archiegateway composition into
internal/gateway (DrainStreamParts), next to the TurnStream it feeds, and
gains a StreamPartReasoningDelta case: each reasoning delta is forwarded on
the new optional ReasoningStream method, which localChatStream turns into a
ChatEvent{Kind: "reasoning", Text: delta} on the same stream. done/error
semantics are unchanged, and the FullStream is still drained to close when no
stream is attached.
2026-11-13 00:21:23 +11:00
sam 14da38b9b7 fix(webui): sanitise dashboard chat error responses (#1908)
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.
2026-11-13 00:10:22 +11:00
sam 017a1d56e2 Merge pull request 'fix(ui): size page layouts by container width, not viewport (#1892)' (#1899) from fix/1892-container-queries into main
Reviewed-on: #1899
2026-11-12 12:15:05 +00:00
sam af02cbe832 Merge branch 'main' into fix/1892-container-queries 2026-11-12 12:14:54 +00:00
sam 38d9cca84a Merge pull request 'test(e2e): chat dock browser checks (#1886)' (#1901) from test/1886-chat-dock-checks into main
Reviewed-on: #1901
2026-11-12 12:14:40 +00:00
sam cdae23d7e9 Merge branch 'main' into test/1886-chat-dock-checks 2026-11-12 12:14:32 +00:00
sam 1ae6d39680 Merge pull request 'feat(chat): unseen reply counts and phone dock (#1883, #1885)' (#1898) from feat/1883-1885-chat-dock into main
Reviewed-on: #1898
2026-11-12 12:13:56 +00:00
sam 07e4e8f727 Merge branch 'main' into feat/1883-1885-chat-dock 2026-11-12 12:13:43 +00:00
sam 98941c20a0 fix(controlplanestore): legacy channel settings drop the retired models key on migration (#1903) 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) 2026-11-12 23:11:07 +11:00
sam 3f092c0704 test(e2e): chat dock browser checks (#1886) 2026-11-12 23:08:02 +11:00
sam f156150a8b fix(ui): size page layouts by container width, not viewport (#1892) 2026-11-12 23:05:31 +11:00
sam 9dd55646bb feat(chat): count unseen replies and follow the phone keyboard (#1883, #1885) 2026-11-12 23:03:14 +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
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) 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
Reviewed-on: #1893
2026-11-12 11:50:55 +00:00
sam 1730938e03 Merge branch 'main' into feat/1861-task-context-picker 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
Reviewed-on: #1894
2026-11-12 11:50:30 +00:00
sam 4694406434 Merge branch 'main' into feat/1884-copy-markdown 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
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
Reviewed-on: #1896
2026-11-12 11:49:57 +00:00
sam 77db59141c feat(ui): pin the chat dock to a side edge (#1853) 2026-11-12 22:48:41 +11:00
sam eabd7c8884 feat(chat): copy a conversation as Markdown from the More menu (#1884) 2026-11-12 22:47:26 +11:00
sam 7ffbf0435c feat(chat): link #N in replies to tasks that exist (#1882) 2026-11-12 22:46:22 +11:00
sam 8082e200f2 test(e2e): chat composer check follows the combobox role and the # task picker (#1861) 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
Reviewed-on: #1891
2026-11-12 11:34:09 +00:00
sam bc429cd351 Merge branch 'main' into feat/topbar-nav 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
Reviewed-on: #1890
2026-11-12 11:33:13 +00:00
sam 914a5f9b03 Merge branch 'main' into fix/chat-dock-bugs 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
Reviewed-on: #1887
2026-11-12 11:27:20 +00:00
sam 9ac8a60999 Merge branch 'main' into chore/delete-kit-harness 2026-11-12 11:27:07 +00:00
sam 04975db9a1 feat(ui): move desktop navigation into the topbar breadcrumb (#1880) 2026-11-12 21:53:31 +11:00
sam b97eb45275 style(staterpc): drop a blank line left by the removal 2026-11-12 21:42:27 +11:00
sam 658a4cb50e chore(runtime): remove code left dead by the Kit removal (#1877)
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) 2026-11-12 21:34:56 +11:00
sam f92c5b4536 chore(runtime): delete Kit and external agent harness support (#1877)
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 2026-11-11 02:48:29 +11:00
sam dcc12582ce feat(audit): set per-kind event retention from the instance (#1856)
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 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 2026-11-11 00:04:43 +11:00
sam 44237b448b refactor(prompts): every model prompt is a file in internal/prompts 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 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 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 2026-11-10 23:33:30 +11:00
sam 8aa3540fa7 fix(ui): outline toggle groups mark the selected segment inside its border 2026-11-10 23:29:58 +11:00
sam 52549c1bab fix(dashboard): the workflow picker's menu opens below it instead of over it 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 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 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
Reviewed-on: #1852
2026-11-10 11:42:32 +00:00
sam c9a8e21759 Merge branch 'main' into ci/release-build-once 2026-11-10 11:41:17 +00:00
sam 28a6ac8b98 fix(ui): the token revoke dialog runs the revoke it was opened for 2026-11-10 22:37:59 +11:00
sam 73860b26d2 ci(woodpecker): build once, keep Go's caches, fetch archied for the canary
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 2026-11-10 09:48:01 +00:00
sam 13ec693726 fix(gateway): let a streamed chat turn finish after its stream closes (#1848) 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)
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 2026-11-10 19:28:08 +11:00
sam 0e889977c0 fix(archied): resolve merge, close and issue tools through the repository's connection (#1847) 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
Reviewed-on: #1846
2026-11-10 06:54:28 +00:00
archie 9a9629400e Expose all task actions in the task detail header (archie) 2026-11-10 16:54:00 +11:00
sam 0525edd3bb fix(postgres): blocker-changed marks only the org whose resource changed (#1839) 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 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
sam 70eef0ec99 fix(secretengine): report a full volume as an environment failure, not a bad credential (#1842) 2026-11-09 14:37:17 +11:00
sam 96236b6186 fix(worktree): rebuild the mirror and retry once when a push hits a missing object (#1843) 2026-11-09 14:37:17 +11:00
sam e75d5c8ade fix(store): a restart re-queues a running task at its interrupted step and parks it after 3 restarts (#1841) 2026-11-09 14:36:08 +11:00
sam f44db54948 fix(archied): the watchdog heartbeat proves liveness and a stalled run loop reports degraded readiness (#1840)
State Store calls the daemon makes without a deadline now get one.
2026-11-09 14:36:08 +11:00
sam 44b52c54c0 build(agent): bake task into the agent image so the repository gate never fetches it per run 2026-11-09 14:27:18 +11:00
sam ec79c8123e fix(worktree): TestAwaitSpace recovery rows get a deadline a loaded host cannot run out 2026-11-09 14:27:18 +11:00
sam 4b0adac674 fix(daemon): open the task log before the workflow-identity check so its parks are logged 2026-11-09 13:55:19 +11:00
sam dc2c3b983f feat(workflow): a budget continuation resumes at the stopped step with its conversation (#1832) 2026-11-09 12:44:01 +11:00
sam e3dc7fc2e9 fix(issuerpc): list only issues opened by users with write access (#1830)
Adds Issue.Author to the forge contract; the daemon drops issues from
authors without write access and fails the listing closed when the forge
cannot answer.
2026-11-09 12:43:44 +11:00
sam 2ae471398b test(gatewayrpc): an unreachable secret engine answers Unavailable 2026-11-09 12:39:32 +11:00
sam 6437c8009c fix(gatewayrpc): secret check reports an unreachable engine as unavailable, not as a missing key 2026-11-09 12:39:12 +11:00
sam f9b6077595 fix(ui): Dismiss all tooltip opens below so the unread badge stays visible (#1837) 2026-11-09 09:41:50 +11:00
sam 00f62a5772 fix(configuration): startup setting descriptions in sentence case saying what a change needs (#1836) 2026-11-09 09:41:50 +11:00
sam 3db75f9e28 fix(postgres): drop the removed schedules kind's apply status so archied is not degraded (#1834) 2026-11-09 09:41:50 +11:00
sam f27e9853cc test(workflow): budget stop asks to continue and resumes on approval (#1832) 2026-11-09 09:41:46 +11:00
sam 561863613f feat(workflow): agent.run asks to continue when it reaches its step budget (#1832) 2026-11-09 09:41:46 +11:00
sam fce5fab2a1 feat(ui): workflow row actions, throttled live reloads, toolbar and layout fixes (#1833) 2026-11-09 09:41:39 +11:00
sam 3b840d7847 fix(daemon): drop PR review activity from authors without write access (#1830)
Adds a forge HasWriteAccess call; the review scan publishes only
collaborators' reviews and comments, and issue_list marks forge text
as untrusted.
2026-11-09 09:41:39 +11:00
sam 8e5d4e8061 fix(worktree): rebuild the repo mirror when a refresh fails on a corrupt mirror (#1831) 2026-11-09 09:41:39 +11:00
sam c98666d6b7 fix(worktree): stale-clone reclaim keeps clones with uncommitted or unpushed work (#1829) 2026-11-09 09:41:33 +11:00
sam 055f2da9cd fix(daemon): reclaim stale task clones when the work volume is full; clean up dead tasks too (#1829) 2026-11-09 09:41:33 +11:00
sam fd14b8d358 fix(ui): toast on workflow enable/disable; editor toolbar wraps instead of crushing the run picker and Publish 2026-11-09 09:26:40 +11:00
sam 2365e5ede9 fix(archied): model catalog load no longer reverts control-plane execution budgets to the file's 2026-11-09 09:24:51 +11:00
sam c9248a251a fix(releaseupdate): label the daemon release row Services, not Gateway 2026-11-09 09:08:39 +11:00
sam eb4b2fab5a fix(ui): dashboard shows five tasks needing attention, not every one 2026-11-09 09:05:47 +11:00
sam e0eb1dfdb7 fix(workflow): refuse an output named result beside an agent.run result capture at save time (#1384) 2026-11-09 09:04:17 +11:00
sam 031291a4bf fix(daemon): clone free-space floor is 1 GiB, not 5; clones share the mirror's objects 2026-11-09 09:00:46 +11:00
sam 618b22db15 fix(releaseupdate): canary ignores task alerts, which the park rate already judges 2026-11-09 08:56:22 +11:00
sam fc50b026cf docs(deployments): name the release pipeline, not one CI system's file 2026-11-09 08:39:08 +11:00
sam e9f5d136b4 build(ui): drop the unused vue-sonner and vue-flow/controls dependencies 2026-11-09 08:35:44 +11:00
sam 403d5f8427 refactor: drop the unused access.PolicySource and the stale playbooks usage word 2026-11-09 08:35:44 +11:00
sam 5539835dd6 docs(deployments): agent image tags match the Woodpecker pipeline; drop the missing publish.sh 2026-11-09 08:35:25 +11:00
sam b16dd6add4 refactor: delete unreferenced Go code (embedding contract, PolicySource, embedded changelog, ignored webui file) and the stale playbooks usage word 2026-11-09 08:35:25 +11:00
sam a053d98d7c refactor(kit): update capability types to use spec constants and add test for known capabilities 2026-11-09 08:32:56 +11:00
sam f5a04ce8c5 refactor(archiegateway): own the chat task profiles; archied built a task creator it never read 2026-11-09 08:32:28 +11:00
sam 9616dd72ce refactor(playbook): drop the directory loader and docs left by the playbooks command 2026-11-09 07:53:02 +11:00
sam 6871abd7ee chore(lint): guard the messaging service's contract boundary with depguard instead of a test 2026-11-09 07:51:10 +11:00
sam 32fcbf1a2b chore(lint): guard the dashboard's daemon boundary with depguard instead of a test 2026-11-09 07:50:15 +11:00
sam 632ceb0f85 refactor: archieplaybooks is not required for some time now, webui is where playbooks are defined 2026-11-09 07:46:30 +11:00
sam 5414405ceb ci(woodpecker): add the Woodpecker pipelines that replace the Actions workflows
quality, deploy, release, canary and promote move to .woodpecker/. The
Gitea Actions files stay in place until the maintainer removes them, so
both paths are live for now.

deploy keeps its shape (plan -> gate -> images -> signed release) in one
workflow because Woodpecker shares nothing between workflows: the plan
env file, the built zip and the agent image digest pass through the
workspace. The gate drives the host daemon through the Go client with the
socket mounted, and the images are built with buildx so the digest the
release statement pins comes from --metadata-file.

Two behavioural changes: the userns preflight is gone (a docker-backend
step cannot create unprivileged user namespaces, and no test needs one),
and the zip is no longer published as a CI artifact (Woodpecker has none);
it ships through the OCI release, which is what install.sh reads.
2026-11-09 07:02:11 +11:00
sam cdbdbbc72d chore(release): v1.61.3 2026-11-08 15:47:31 +00:00
sam 2a04abb84e docs(ui): note the merged agent-profiles and harness settings page 2026-11-09 02:09:58 +11:00
sam 98f5af3eef refactor(ui): merge the harness settings page into agent profiles
The harness page's setup terminal targets the Kit agent profiles, so the
two pages were two halves of one flow split across routes: with no Kit
profile the harness page dead-ended in a disabled 'No profiles
configured' select while the place to create one sat on another page.

/settings/agent-profiles now carries the profiles editor and a 'Harness
sign-in' section (setup terminal plus the credential-bindings sign-in
table), and /settings/harness redirects to it. The bindings re-read when
a terminal session ends so a fresh capture shows immediately, and a
null-seeded agent-profiles document now renders the empty state instead
of a bare add form. The gateway page registry names the merged page.
2026-11-09 02:03:20 +11:00
sam d1b1bac4fb fix(presence): list only running agents; a finished task's agent is not stale 2026-11-09 01:53:42 +11:00
sam 45b368af2e docs(agentexec): drop history and refactoring narration from comments 2026-11-09 01:45:07 +11:00
sam 0f6448c048 refactor(agentexec): delete unused runner injection seams, ServeCaptureMCP, an unreachable approval branch and orphan fixtures 2026-11-09 01:43:53 +11:00
sam b15858adc9 fix(agentexec): clip tool detail on a rune boundary, stop resuming without a session, keep captures when the ready marker fails, log with context 2026-11-09 01:41:46 +11:00
sam 1ef576ca7b fix(agentexec): run gate commands as the harness user and reap the process group after each invocation 2026-11-09 01:40:10 +11:00
sam 50cb0b4276 fix(agent): point toolchains at their cache volumes so pnpm's store stays out of the worktree (#1815) 2026-11-09 01:35:18 +11:00
sam 472478cf83 refactor(state): delete the unused ArmedBindingsForSource RPC and query 2026-11-09 01:22:02 +11:00
sam 90c7d137fb fix(ui): embed only the Latin IBM Plex subsets, woff2 only 2026-11-09 01:21:07 +11:00
sam 2d51cf5106 perf(daemon): dispatch captured events every second instead of every poll_interval; match bindings in memory 2026-11-09 01:19:50 +11:00
sam 1167f8a51e docs: add the Archie mark, wordmark, app icon and social card; show the wordmark in the README 2026-11-09 01:11:08 +11:00
sam 17e6e66e72 refactor(archied): delete the file-configured forge webhook receiver; forge webhooks arrive through event capture (#1817) 2026-11-09 00:50:00 +11:00
sam fa76f4c994 fix(worktree): sign and attribute agent commits at push; forge git credentials (#1816, #1817) 2026-11-09 00:11:54 +11:00
sam 21a523bd35 fix(gateway): report why curators are disabled instead of never reporting 2026-11-09 00:11:03 +11:00
sam db377380a0 perf(ui): load route pages on demand 2026-11-09 00:05:39 +11:00
sam 81fcea7a03 fix(ui): keep blocked tasks out of pinned activity alerts 2026-11-09 00:05:39 +11:00
sam 011d22c24c fix(ui): read board and alerts once on load, not again on the first stream connect 2026-11-09 00:05:39 +11:00
sam 83c8614418 fix(statestore): start service health grace at boot, not at a peer's last report 2026-11-09 00:05:39 +11:00
sam ac98b68bda feat(archied): connection commit identity and SSH commit signing (#1816) 2026-11-09 00:05:32 +11:00
sam ad63692781 fix(archied): sign connection commits with the connection account (#1815) 2026-11-08 23:57:40 +11:00
sam 090b220d25 fix(ui): label resolved alerts in the activity feed 2026-11-08 23:56:41 +11:00
sam 514219b6a5 chore: ignore the pnpm store agents create in the worktree 2026-11-08 23:53:17 +11:00
sam 6a5ba67cf5 ci: keep the golangci-lint cache between quality runs 2026-11-08 23:34:33 +11:00
sam c09ece6064 fix(webui): hash, cache and gzip dashboard assets 2026-11-08 23:32:25 +11:00
sam 43ba64684e fix(webui): start a fresh event stream at recent activity, not the whole events table 2026-11-08 23:29:40 +11:00
sam 67fa57008e fix(ui): read alerts once per event burst, not once per replayed event 2026-11-08 23:21:06 +11:00
sam 074ebbd931 fix(chat): keep long turns alive, record and log why a turn failed (#1813) 2026-11-08 23:03:04 +11:00
sam 10d23e3e06 fix(ui): compare live reloads structurally instead of serialising them (#1812) 2026-11-08 23:01:10 +11:00
sam 6a4e1964f6 refactor(chat): one send path, drop POST /api/chat/message 2026-11-08 18:34:26 +11:00
sam 5939ef6ff1 fix(postgres): write no audit row when retention prunes nothing (#1810) 2026-11-08 17:27:30 +11:00
sam 1d9eff6529 fix(ops): log cancelled contexts at debug, one reconnect line per outage (#1809) 2026-11-08 17:27:30 +11:00
sam 6ae7f319cb fix(staterpc): log the cause of run credential lookup failures (#1808) 2026-11-08 17:27:30 +11:00
sam 260e9fc46e fix(agentworker): stop reporting task worker presence (#1807) 2026-11-08 17:27:30 +11:00
sam 52b5740c39 fix(daemon): cap tasks per issue poll and wait for disk before cloning (#1805) 2026-11-08 17:26:00 +11:00
sam d11a0cd245 fix(workflow): one baseline fix per repository revision, drop download noise from gate output (#1806) 2026-11-08 17:23:21 +11:00
sam 860b2c85e0 fix(taskstate): retry transient parks with backoff, escalate when exhausted (#1804) 2026-11-08 17:19:14 +11:00
sam af7577625f refactor(messaging): store Telegram's connection in extension-settings (#1802) 2026-11-08 17:12:59 +11:00
sam 617a312ed5 ci(deploy): cancel superseded main deploys, never a release (#1801) 2026-11-08 17:11:56 +11:00
sam a7d202fb04 ci: drop comments from workflow scripts 2026-11-08 17:11:56 +11:00
sam 2a52508a5d fix(build): install protoc-gen-go and protoc-gen-go-grpc in the agent image
The in-container baseline task check failed at proto:check because buf
generate could not find either plugin on PATH, parking every task at
gate.repository.
2026-11-08 17:11:49 +11:00
sam 98fb9dfddf feat(workflow): task, workflow, step and model attributes on run, step and agent spans (#1803) 2026-11-08 17:00:42 +11:00
sam 64bb195700 perf(ui): mount row action dialogs only while open and keep unchanged live reloads (#1798) 2026-11-08 16:55:59 +11:00
sam c8a46fd9e7 ci: drop comments from workflow files 2026-11-08 16:55:03 +11:00
sam 93db9a6395 feat(extensions): typed extension settings (number, boolean, duration, list, select) 2026-11-08 16:14:23 +11:00
sam 89808d0719 fix(extensions): list settings a version no longer declares and save only once they are removed 2026-11-08 16:07:42 +11:00
sam ef99b7d74e fix(extensions): keep an extension's settings across removal and keys a version drops 2026-11-08 16:05:19 +11:00
sam 62ddbea0c1 fix(messaging): show a configured Telegram whose extension is not installed 2026-11-08 16:00:29 +11:00
sam b548cabcbf refactor(publicnet): one public-address dial guard for webhooks, attachments and web fetch (#1795) 2026-11-08 15:52:39 +11:00
sam 8f37cc79cd feat(channels): package-declared channel settings on an instance Channels page (#1796) 2026-11-08 15:48:43 +11:00
sam 031521550a fix(ui): keep unchanged rows across live reloads on the dashboard and workflows (#1798) 2026-11-08 15:09:06 +11:00
sam 3b67ef746f Merge pull request 'fix(daemon): claim and fetch tasks only while the dispatcher has room' (#1799) from fix/1797-claim-within-capacity into main 2026-11-08 03:53:07 +00:00
sam 18838105f0 ci(quality): run on pull requests only; deploy gates main 2026-11-08 14:50:29 +11:00
sam d70596f4bf Merge branch 'main' into fix/1797-claim-within-capacity 2026-11-08 03:45:21 +00:00
sam a9878c329d Merge pull request 'fix(ui/tasks): keep unchanged rows across live reloads' (#1800) from fix/1798-task-list-stable-rows into main
Reviewed-on: #1800
2026-11-08 03:45:13 +00:00
sam 558659bcf4 test(daemon): adopt go fix's promoted-field literal (#1797) 2026-11-08 03:37:54 +00:00
sam 00e7603932 fix(ui/tasks): keep unchanged rows across live reloads (#1798) 2026-11-08 03:32:08 +00:00
sam 33f7323eb0 fix(daemon): claim and fetch tasks only while the dispatcher has room (#1797) 2026-11-08 03:29:25 +00:00
sam 184038a918 fix(webui): link tasks to their repository connection's forge 2026-11-08 06:42:38 +11:00
sam 8cb76092b6 chore(release): v1.61.2 2026-11-08 06:30:16 +11:00
sam 49d7619ba3 fix(daemon): claim a requeued backlog without a poll wait per task 2026-11-08 06:24:54 +11:00
sam ae53e83ff3 chore(release): v1.61.1 2026-11-08 06:04:33 +11:00
sam ef84e18f46 fix(ui): a new canvas workflow names the agent it runs as (#1622) 2026-11-08 05:49:40 +11:00
sam cf1be16763 fix(controlplane): repair a stored workflow collection that no longer validates (#1622) 2026-11-08 05:49:40 +11:00
sam cc8428643a fix(gatewayrpc): sniff the head of URL-only attachments (#1672) 2026-11-08 05:40:27 +11:00
sam 70251ff3ce chore(release): v1.61.0 2026-11-08 04:59:28 +11:00
sam 76dc34a17c fix(distribution): trust the rotated catalogue signing key (#1790) 2026-11-08 04:54:32 +11:00
sam a6a0c7c11e fix(archied): say why the canary can't compare migrations 2026-11-08 03:05:29 +11:00
sam f759387eb7 chore: ignore the fleet run directory 2026-11-08 02:48:29 +11:00
sam 21b3591da1 fix(e2e+ui): e2e checks for the audit's failure classes, and the gaps they caught (#1767)
loading-errors now forces each list API (/api/tasks, /api/captures,
/api/event-types, /api/tokens, /api/access/policies) to fail and asserts
the page shows its error surface, never its empty-state copy.
accessibility gains two static-route sweeps: every input/textarea/select/
button must have an accessible name, and every keyboard focus stop's
indicator (ring var, outline, shadow or focus border) must clear 3:1
against the background behind it. phone-overflow sweeps every static
route at 390x844 for horizontal scroll. The sweeps caught real gaps,
fixed here: the DurationInput amount input had no accessible name and
its unit select no focus indicator, and TabsContent and CodeBlockContent
were focusable with outline-none and no ring. The stale 'Sections' list
selector now matches the nav landmark.
2026-11-07 17:08:10 +11:00
sam e9937ded6b fix(ui): a failed answer keeps the question card and its filled-in answer (#1728)
answerAsk now clears the pending question only after api.chatAnswer
accepts it, and resolves whether it did. On failure the new askError ref
carries the message, shown on the card as a ReadError whose Retry resends
the last answer; ChatAskCard keeps the typed reply until acceptance and
routes every choice button through the same path, and the questionnaire
submits through the card so its answers are retryable too. askError resets
on turn start, on a new ask, and on conversation switch.
2026-11-07 01:23:10 +11:00
sam bd1acdd0cc fix(ui): switching conversation detaches the running turn (#1729)
selectSession now bumps a session epoch and aborts the in-flight stream
before switching, and the transcript read is applied only if the session is
still current. sendMessage captures the epoch at turn start: a detached turn
stops reading, cancels the reader, and writes no messages, streamingTurn or
session id; only the turn still owning the abort controller clears isSending,
so it cannot unlock the composer for a turn running in the new conversation.
2026-11-07 01:20:49 +11:00
sam a2c6341544 fix(ui): policy form opens blank on New, id read-only when editing, dirty draft asks first (#1730)
New policy now resets the draft instead of reusing the open policy's, so
Save cannot overwrite the policy that happens to be open. The id input is
readonly while editing a persisted policy, so a rename can no longer write
a second policy. New/Edit/Cancel route through openForm, which asks for
confirmation before discarding a dirty draft.
2026-11-07 01:16:48 +11:00
sam cb3372ac76 fix(ui): terminal palette is theme tokens, switches live (#1739)
--terminal-bg/fg/cursor/selection are defined per theme in style.css
(dark keeps the deep well, light gets a paper inset) and exposed as
bg-terminal. Both xterm surfaces (SetupTerminal, SandboxView) read them
via lib/terminalTheme and re-apply on every data-theme flip, so the
theme switch is live; the raw #0b0f14/#e6edf3/#264f78 hex is gone.
2026-11-07 01:13:41 +11:00
sam 48e605a545 fix(ui): dead tokens replaced or deleted — text-ok, --radius-lg, real surface (#1740)
text-success was not a token (now text-ok) in ChatToolCall and BindEvent;
var(--radius) is undefined (now var(--radius-lg)) in input-group and Sonner;
Sonner's hsl(var(--popover) / 0.9) wrapped a hex (now a plain hex); the
undefined cn-font-heading class is deleted from the nine title components.
2026-11-07 01:06:42 +11:00
sam 9a4e59f0e0 fix(ui): tab, toggle, input and idle-text contrast meet their targets (#1741)
Inactive tab labels use text-fg-muted instead of foreground/60 (was
4.1:1). The selected toggle/toggle-group segment gains a sage-deep ring
(5.3:1 light, 3.9:1 dark) instead of the near-invisible muted fill.
--input rises to 3.6:1 (light) and 3.5:1 (dark) on the card; dark --idle
rises to 5.1:1 on --accent. Values computed against the style.css tokens.
2026-11-07 01:03:19 +11:00
sam 820beda72f fix(ui): empty states wait for the first read to settle (#1742)
Skills, curators, QuickTask's workflow list, the alerts bell and the
extensions catalogue now show a loading state until the first read
settles, then the data, the error, or the empty state. Draft-backed lists
(agent profiles, playbooks, credential bindings) show their empty state
only once the draft exists, not beside the load error.
2026-11-07 00:54:25 +11:00
sam c6f70de82d fix(ui): settings pages show a skeleton or the error until their draft loads (#1743)
New settings/KindGate renders the store's per-kind loading/error state
where the form would be: a skeleton while loading, ReadError with Retry
on a failed read. Wired into Tools, SystemModels, SystemRepos,
SchedulingPolicy, ContainerRuntime, OrgAlerts, Instructions, Plugins,
SystemTasks, UpdateSettings, IdentityGrants, OrgModels, Channels and
Authentication pages, which no longer render blank until the draft
exists.
2026-11-07 00:42:28 +11:00
sam f37f6e2453 fix(ui): one error presentation with Retry across the dashboard (#1744)
New components/ui ReadError (destructive Alert + message + optional Retry)
is now the single read-error presentation, used by Versions, Services,
Canary, OrgAccess, Denials, Tokens, Audit, Extensions, Harness and the
Status page (one page-level error instead of one per card). PanelError is
the same alert for task panels, and TasksState's error kind, the attempts
panel and the task-log pane all offer Retry. Org policy save errors sit
beside the Save button instead of at the page top.
2026-11-07 00:33:49 +11:00
sam f7a999e317 fix(ui): failed task pages keep rows with an inline error; refreshes don't flash (#1745)
A failed Load more or live refresh sets moreError beside the Load more
button instead of replacing the table; only a first-load failure takes
the table down. The no-match empty state says search covers loaded rows
when more pages exist. refreshAll keeps attempts/events (keep=true) and a
failed task-list read keeps the last known list, so panels no longer
flash to loading on every live update.
2026-11-07 00:25:36 +11:00
sam 45494d5b43 fix(ui): logs page error no longer flickers, live entries pruned, unavailable clears (#1746)
readError is cleared only by a successful read instead of at the start of
every 5 s refresh, so an outage shows a steady error beside the stale
lines. liveEntries is pruned past 1500 (the list shows 1000) so the map
cannot grow unbounded. streamState leaves "unavailable" as soon as live
entries flow again.
2026-11-07 00:22:40 +11:00
sam 9ca9545847 fix(ui): alert state is shared; a failed dismiss keeps the alert and says why (#1747)
use-alerts.ts now holds the alerts/failed refs at module scope (wired once),
so the bell and the dashboard card see the same list. dismiss removes the
alert only after the server confirms; on failure it stays and the reason
shows in the bell. dismissAll reports any rejection and reloads.
2026-11-07 00:19:31 +11:00
sam fa14e7da80 fix(ui): chat failures are shown where they happen and leave the real state (#1748)
Mic permission failure shows an inline alert; setModel only switches on
server confirmation and reverts + reports in the transcript on failure;
a failed session refresh after a turn no longer becomes a retryable turn
error; a voice clip during a turn queues instead of dropping; blocked
localStorage falls back to a per-load channel id; a failed install offers
Retry/Not now again; rename/branch use a labelled Dialog instead of
window.prompt; a failed cancel is reported; a stopped turn no longer
blocks transcript reloads.
2026-11-07 00:17:44 +11:00
sam 12eea5eee3 fix(ui): destructive actions confirm via AlertDialog, naming the item (#1749)
Delete policy, remove member, revoke token, remove passkey and delete
source now open the shared AlertDialog confirmation that names the item,
matching the binding/mapping/event-type deletes that already confirmed.
2026-11-07 00:11:16 +11:00
sam ef623f6c68 fix(ui): rows keep table semantics; first-cell link/button is the focus target (#1750)
DataTable, ActivityRow, LiveActivityCard's group row and CaptureRow no
longer put role=link/button, tabindex or aria-label on the <tr>. The row
keeps its mouse click handler; the first cell carries a real RouterLink
(DataTable rowLink) or button with the accessible name, so keyboard and
screen-reader users get a focus target and rows keep row/cell semantics.
The live-activity group row's disclosure button and open button are now
siblings, not nested.
2026-11-07 00:00:41 +11:00
sam ee2d19d011 fix(ui): real heading structure and a nav landmark for the sidebar (#1751)
CardTitle and EmptyTitle take an as prop (default h2) and render through
component :is, so card and empty-state titles are headings; Section passes
as="h2" under the page's h1. The sidebar menu list now sits in
<nav aria-label="Sections">.
2026-11-06 23:56:34 +11:00
sam 53c6b3e413 fix(ui): disabled reasons and truncated values reachable without hover (#1752)
Disabled New run and task-row buttons now carry their reason in a Tooltip
on a focusable wrapper (disabled buttons cannot take focus), and New run
says when the task list has not loaded. Truncated values (binding filter
and failure reason, activity rows, live alerts, event-type rule summaries,
source URLs, mapping field paths) are focusable spans whose full text is in
a Tooltip. The org switcher has distinct loading ('…' tile, 'Loading…')
and failed ('!' tile, 'Organisations unavailable') states.
2026-11-06 23:52:25 +11:00
sam d58125c0bc fix(ui): combobox pattern for the slash palette, named palette input, bound labels (#1753)
The composer textarea is now role=combobox with aria-expanded,
aria-controls and aria-activedescendant wired to the slash palette's
listbox ids. CommandInput has an accessible name. FieldLabels without a
control beside them are bound: for/id on selects, inputs, switches and
duration inputs across channels, curators and schedules pages, and
role=group + aria-labelledby/aria-label on the TagsInput, secret-ref and
rule row groups.
2026-11-06 23:47:41 +11:00
sam 029198ff61 fix(ui): generation-guard the remaining async loads and polls (#1754)
Schedules, command palette, skills, repos, services, secret engines,
captures, event types, curators, sources, channels, mappings (list and
preview), dispatch links and workflow history now capture a generation
at request start and drop their writes unless still latest — the guard
logs/state.ts already used. A failed schedules poll keeps the last good
rows beside the inline error instead of replacing the table, and a
failed skills/secret-engines poll no longer clears the list.
2026-11-06 23:40:03 +11:00
sam 0b08fc5242 fix(ui): harness setup terminal reports the real failure and can be reopened (#1755)
A websocket that never opened stays "failed" — onclose no longer
overwrites it with "closed", so the terminal says "Could not open the
setup terminal." instead of "The terminal session ended.". The terminal
emits ended when its session closes, and HarnessPage resets terminalOpen
on it (plus a Close terminal button), so reopening starts a fresh session
instead of requiring a page reload. The harness load failure now has a
Retry button.
2026-11-06 23:34:38 +11:00
sam 93609c7ab3 fix(ui): eleven small dashboard state bugs from the audit (#1756)
Install disables when no installable snapshot; retention hours is empty
until loaded instead of showing 0; the audit Action field carries all
comma-separated actions; saving a view over an existing name asks first;
"Password changed" is a notice, not a destructive alert; "Sign in
again" appears only on an expired session (classifyActionError) on
account, authentication and create-account; sign-out failure sets the
store error instead of an unhandled rejection; the workflow identity
select shows the seeded agent without writing it into the YAML;
unparseable durations show an inline error instead of snapping back;
CardAccordion keys items by id; curator add() explains a no-op.
2026-11-06 23:31:47 +11:00
sam 461d3dc1f7 fix(ui): phone-width overflows in the audit's flagged rows, with an e2e check (#1757)
Grants rows and toggle groups wrap with a smaller phone label; the token
form wraps and its input flexes; the sources name column caps at full
width and its action buttons wrap; the rule-editor condition row wraps
with a full-width phone select; the payload tree indents less and breaks
long JSON leaves; the topbar instance badge truncates; org agent rows
keep Assign inline and move Rename/Suspend/Retire into a MoreMenu. New
e2e check phone-overflow.cjs visits these views at 390x844 with seeded
data and asserts no horizontal scroll.
2026-11-06 23:23:16 +11:00
sam 94f79177a2 fix(ui): adopt the type scale across components/ui and pages (#1758)
components/ui and the pages now use only the style.css scale:
text-[0.8rem]→text-label, text-[0.625rem]→text-micro, text-base/text-sm→
text-label (rows and controls), text-xs→text-caption (captions and
secondary text), text-lg/text-xl/text-2xl→text-title (panel and page
titles). Rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps
Tailwind steps as the issue allows. 196 files, class-token swaps only.
2026-11-06 23:07:46 +11:00
sam 9169e9db09 fix(ui): hand-rolled cards, headings, captions and empties use components/ui (#1759)
Captions move from text-xs to the text-caption type-scale token across
the workflow/bind/schedule editors and curator card. The task page title
uses PageHeader's h1 classes. Hand-rolled boxes become Card (token
reveal, recovery code, pending extension update) or CodeView (install
progress); the startup-settings key/value table becomes MetadataList;
the harness empty row becomes TableEmpty; 'No tokens/dispatches/inputs/
removed' states become Empty; the step-editor problem line becomes a
destructive Alert. The risky-row danger tint in ToolsPage and
SystemReposPage now uses SettingRow tone="danger" instead of a
hand-written before: overlay (DANGER_ROW deleted).
2026-11-06 23:03:10 +11:00
sam 0d0cd09124 fix(ui): known lists use Select/TagsInput fed by the server catalogue (#1760)
Token lifetimes use Select instead of NativeSelect. Credential bindings
pick service from the store's credentialServices and organisation from
the org list (empty = default, via a sentinel). Curator and agent-profile
tools are TagsInput instead of comma text; curator model is a Select of
the configured providers' models from /api/config's catalog. Org and
system model pages pick provider class from the catalog's classes, and
SystemModelsPage's local CLASSES list is deleted. Chat model choice is a
Select of the server-served model list instead of a button row.

Left as free text because no server source exists: policy object kind,
curator memory engine, update channel labels, connection type default,
container default, step titles (x-step-types carries no titles).
2026-11-06 22:51:21 +11:00
sam 0dc5bf9a9b fix(ui): times honour the Appearance zone, one duration formatter everywhere (#1761)
lib/format.ts gains shortTime(value, zone) and becomes the home of the
single duration() formatter (moved from timeline-event.ts, which
re-exports it so the stage rail and duration.test.ts are unchanged).
LogTable's time column, audit's From/To chips and chat session titles now
format in the zone chosen under Appearance instead of the browser's.
StepNode, schedule runDuration, labels formatMs and ChatToolCall all
delegate to duration(), removing the "12ms" vs "12 ms" vs "under 1 s"
split.
2026-11-06 22:21:45 +11:00
sam ca107f6977 fix(ui): failed draft save is retried, then shown — never dropped silently (#1731)
persistDraft retried only while draftState.saving was true, but
settings.replace clears saving in its finally before resolving false, so
the retry branch could never run and a failed putDraft vanished. It now
retries on a bounded schedule (5 attempts, 500ms apart) regardless of the
saving flag, and on final failure sets localError so the editor's alert
says the draft was not saved while the edit stays in the editor. The
alert also reads the draft store's own error (workflows.draftState.error)
instead of only the definitions store's.
2026-11-06 22:09:56 +11:00
sam 4dad1415e6 fix(ui): workflow reads keep their error instead of showing empty (#1732)
Triggers: a failed bindings/schedules read surfaces as an error with
Retry in TriggerSettings instead of "Manual runs only." Run stages: a
failed attempts read sets stagesError, shown with Retry above the canvas
instead of a bare canvas. Bind form: failed reads show an error with
Retry rather than empty pickers, and save refuses to mappingUpdate an
existing mapping unless the bindings list actually loaded. History: a
failed revisions read shows the error with Retry in the revision list,
and "No recorded changes" appears only after a successful read.
2026-11-06 22:06:25 +11:00
sam 5bf0a696c6 fix(ui): failed reads show an error with Retry, not an empty view (#1733)
Chat: a failed conversation load sets sessionError, shown in the
transcript with Retry instead of the empty invitation (it no longer goes
to statusText in the settings popover). Command palette: failed task or
workflow reads render a "Couldn't load … — Retry" item in that group.
Denials: the table no longer shows "No denials recorded" under an
error. Mapping form: failed captures/event-types reads show an error row
with Retry instead of "No captured events yet." or a silently empty
select. Channels: a failed status read keeps the last badges and shows
an error with Retry. Sources: read failures are separate from write
failures, shown with Retry, and a loaded-but-empty list gets an empty
state.
2026-11-06 22:01:03 +11:00
sam 7a8d948fcb fix(ui): drop stale async responses with a generation guard (#1734)
TasksPage load/loadMore, use-task-run keyedLoad, TaskLogs loadOlder and
EventsPage loadCounts now each capture a generation at request start and
drop their writes unless they are still the latest request, the same
guard logs/state.ts already uses. dropCaches also stales every in-flight
keyed read, so a 30s timeout's null can no longer overwrite a newer
successful response, and the task-log pager no longer writes a page
fetched under the old attempt or filter.
2026-11-06 21:52:55 +11:00
sam d90f7d48d0 fix(ui): step card header is a keyboard-operable button, Edit in its menu (#1735)
The step header in StepNode.vue was a div with @click and no role, so a
step could not be opened from the keyboard, and Edit existed only in the
right-click canvas menu. The header now renders as a real <button> (with
aria-expanded) whenever the step can toggle, so Tab/Enter/Space open it;
while renaming it stays a div so the rename input is not nested inside a
button. The actions menu trigger moved to an absolute overlay at the
card's top-right (same spot as before, with a matching spacer in the
header row) and gained an Edit item that toggles the step, matching the
canvas context menu.
2026-11-06 21:48:55 +11:00
sam c5a43f21aa fix(ui): accessible names on fields that had only placeholders (#1736)
Step editor fields (lead, compact rows, long/YAML textareas and the
compact boolean switch), the org policy editor (policy id, level,
workspace id, object kind/id, Cedar textarea), the binding constant
value input, the log search and the channel tags inputs now each carry
an aria-label. On TagsInput the aria-label moved from the root div,
where screen readers never reach it, onto the actual TagsInputInput.
2026-11-06 21:43:23 +11:00
sam d3fbb0842f fix(ui): focus rings at full strength for 3:1 contrast (#1737)
The shared components used focus-visible:ring-ring/50 (and the base
outline-ring/50), which measured 2.1:1 on light and 2.4:1 on dark --
under the 3:1 WCAG 2.4.11/1.4.11 requires. All ring-ring and outline-ring
tokens in ui/src now render at full strength (5.3:1 light, 5.7:1 dark),
matching the :focus-visible outline floor in style.css.
2026-11-06 21:39:37 +11:00
sam dafd426316 fix(ui): startup failure is a centred panel that retries on its own (#1738)
When /api/auth/status fails, App.vue now shows a centred card with the
logo, a plain 'Can't reach Archie' statement and the detail in a
destructive Alert (role=alert), and retries the read every 5s until it
succeeds instead of offering only a manual Retry link. errorMessage in
api.ts only reads text/plain bodies, so a proxy's HTML error page no
longer passes through as the detail; other content types fall back to
the status line.
2026-11-06 21:36:17 +11:00
sam bec374aa92 ci(quality): stop installing ripgrep and setting sysctl from the gate (#1710)
The check job now runs on the archie-quality self-hosted runner under an
unprivileged user, so the sudo apt-get install and sudo sysctl steps fail,
exactly as the deploy gate did before 3b372b4a. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
2026-11-06 21:30:33 +11:00
sam 85b21578d8 ci(release): name the missing DEPLOY_TOKEN before checkout, and list what a mirror needs
Refs #1788
2026-11-05 00:33:18 +11:00
sam 03c25e7214 docs(workflow): say repo.commit never runs the checkout's git hooks
Refs #1792
2026-11-05 00:26:20 +11:00
sam c30624a59e feat(workflow): a handoff starts a separate linked run of the next workflow (#1791) 2026-11-03 20:56:03 +11:00
sam 3cf025fb4a fix(worktree): mirror fetch follows moved tags and rewritten branches 2026-11-03 10:00:04 +11:00
sam 81b784876b fix(ui): live task updates refresh in place instead of flashing the loading state 2026-11-03 09:51:43 +11:00
sam 6c42f64bfa chore(release): v1.60.0 2026-11-03 09:51:30 +11:00
sam d74216c6b7 docs(changelog): curator issue tools (#1770) 2026-11-03 09:43:45 +11:00
sam 0b7ce448ab fix(e2e): checks follow the sidebar navigation; trim stray button and caption whitespace (#1789) 2026-11-03 09:35:19 +11:00
sam 2fb8c09a00 refactor(webui): extract the workflows module (#1778) 2026-11-03 08:39:40 +11:00
sam 0442f1849f refactor(webui): extract the audit module and its export guards (#1778) 2026-11-03 08:38:22 +11:00
sam cf049797b0 refactor(webui): extract the schedules and alerts modules (#1778) 2026-11-03 08:37:15 +11:00
sam 18e6fe6af6 refactor(webui): extract the chat module and its ask/file state (#1778) 2026-11-03 08:36:09 +11:00
sam e8a84d3e41 refactor(webui): extract the control-plane and logs modules (#1778) 2026-11-03 08:34:51 +11:00
sam c5f4541cbf refactor(webui): extract the access policies and denials module (#1778) 2026-11-03 08:33:46 +11:00
sam 369e5038ca refactor(webui): extract the identities and tokens module (#1778) 2026-11-03 08:32:44 +11:00
sam 66862a1bab refactor(webui): extract the orgs resource module (#1778) 2026-11-03 08:28:36 +11:00
sam 25dcdb2d19 refactor(webui): extract the extensions resource module (#1778) 2026-11-03 08:22:02 +11:00
sam 1830a89898 refactor(webui): extract the harness resource module (#1778) 2026-11-03 08:17:12 +11:00
sam 6e718e165a feat(curator): issue_list and issue_create tools via the daemon (#1770) 2026-11-03 08:12:05 +11:00
sam 0a37b551f5 refactor(webui): extract the tasks resource module (#1778) 2026-11-03 08:06:56 +11:00
sam 864b87faa6 refactor(webui): extract event-types, mappings and sources modules (#1778)
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.
2026-11-03 07:42:50 +11:00
sam d55d8580cf refactor(webui): extract the bindings resource module (#1778)
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.
2026-11-03 07:01:12 +11:00
sam 63229d1711 refactor(storecontract): assert every store interface at its implementation (#1781)
Complete the var _ storecontract.X = (*T)(nil) sweep so each of the 31
contract interfaces is compiler-checked against at least one adapter:
postgres.Store (19), postgres.EDA (11, consolidated into edastore.go),
staterpc.Client (29). Removes the scattered single-line assertions from
harness_secrets.go, edastore_eventtypes.go, sources.go, run_credentials.go.
task check green.
2026-11-03 06:24:09 +11:00
sam 56044476fc chore(release): v1.59.0 2026-11-03 06:15:09 +11:00
sam 796bfd0045 docs(changelog): forge extensions gain CreateIssue 2026-11-03 02:43:25 +11:00
sam abcb72a76a feat(curator): dry-run self-intake pass with run inspection tools (#1770)
Curators could only reach the workflow/integration tools; there was no way
to survey task runs. Adds run_list/run_events to the shared registry
(guarded as read on task kind), attaches the instance's acting principal
to curator model calls so guarded tools authorize, and records a pass's
final text as a pass.summary action so the report is inspectable. Ships a
dry-run self-intake definition in dev.toml/config.example.toml declaring
only those two tools, so it cannot file issues yet.
2026-11-03 02:35:06 +11:00
sam 443a7a501b refactor(storecontract): split the store contract into topical files (#1781)
Pure move: one 624-line storecontract.go becomes storecontract.go
(package doc + composed TaskStore), task.go, capture.go, binding.go,
mapping.go, source.go, status.go, resource.go, credentials.go and
errors.go. The package remains the single seam; no declaration changed
(verified line-identical against HEAD). task check green.
2026-11-03 02:27:57 +11:00
sam 88e86776e8 feat(forge): add CreateIssue to the forge contract (#1770)
Issue-level writes could comment and close but not open an issue, so no
curator or workflow stage can file its own work yet. Adds the rpc to
proto/forge/v1, regenerates the contracts, and threads it through the
domain interface, forgerpc client/server (comment permission, like
CloseIssue), forgeext, and the archipelago SDK + gitea/github plugins.
2026-11-03 02:04:56 +11:00
sam e10bb161fe docs(prds): mark the self-development ADR as decided, not built (#1769) 2026-11-03 01:52:06 +11:00
sam 3b525b7482 docs(prds): mark the self-development ADR as record, not mechanism (#1769) 2026-11-03 01:50:54 +11:00
sam c2cc10ebfa docs(prds): record the self-development loop decision (#1769) 2026-11-03 01:36:31 +11:00
sam 2f8076d7f8 fix(access): forbid clause scopes the canary grant against its developer role (#1727)
Service accounts created through the identities API are assigned the
developer role in the request's org, whose shipped policy permits read and
write across the org -- the permit alone did not scope the canary. Install a
matching org-canary-grant-forbid policy (access.CanaryGrantForbidPolicy) that
negates exactly the permit's surface for the canary identity; a forbid wins
within the level, so the role can no longer widen access. Engine tests pin
the surface with the principal carrying the developer role, and the
rehearsal now proves it live: the scoped token gets 403 on /api/access/policies
and 200 on /api/chat/update, and the full canary loop runs on it.

task check passes; task canary:rehearse green (REHEARSE_EXIT=0).
2026-11-02 06:23:38 +11:00
sam c180a2debb feat(access): scoped canary grant replaces instance-admin CANARY_TOKEN (#1727)
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.
2026-11-02 06:03:41 +11:00
sam 5356745968 fix(releaseupdate): address review findings on the #1725 canary change
- 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.
2026-11-02 02:45:26 +11:00
sam 5b5059615b feat(releaseupdate): judge the installed release, window from install (#1725)
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).
2026-11-02 01:15:29 +11:00
sam bca1f3b412 chore(release): v1.58.1 2026-11-02 00:27:14 +11:00
sam 3af96fd818 fix(daemon): watch the task intake loop too and name the stalled loop 2026-11-02 00:26:50 +11:00
sam 1043982529 fix(daemon): stamp each run-loop cycle so the systemd watchdog keeps beating 2026-11-02 00:22:24 +11:00
sam 6abfe32540 chore(release): v1.58.0 2026-11-01 23:55:55 +11:00
sam 1f9807a99c fix(ui/chat): give the collapsed composer its own card and reserve its height (#1719) 2026-11-01 23:11:01 +11:00
sam b2edf1fa8b build(ui): reinstall Trace and Collapsible with the shadcn-vue CLI 2026-11-01 23:05:18 +11:00
sam bb897e76b8 Merge pull request 'feat(agentexec): record each agent run's transcript and show it per step (#1718)' (#1724) from claude/intelligent-tereshkova-5422da into main
Reviewed-on: #1724
2026-11-01 11:43:32 +00:00
sam 07062352b4 Merge branch 'main' into claude/intelligent-tereshkova-5422da 2026-11-01 11:43:20 +00:00
sam 856c15858b feat(ui): replace the top bar navigation with the sidebar-07 block (#1723) 2026-11-01 22:09:54 +11:00
sam 69a46249cc feat(webui): draw each transcript entry with its Trace pattern (#1718)
Record the model's reasoning parts. The step run view shows reasoning as a
Thought row, shell calls as a terminal, the gate as a test run, web_fetch as a
source, finish as the verdict, and each fan-out branch as a subagent.
2026-11-01 22:09:53 +11:00
sam 6f10ecc04f feat(agentexec): record each agent run's transcript and show it per step (#1718)
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.
2026-11-01 22:09:53 +11:00
sam d6ca6a72a5 build(ui): build the dashboard in CI and the Taskfile instead of committing ui/dist 2026-11-01 22:07:36 +11:00
sam 243832fee6 docs(ui): add components with the shadcn-vue CLI, not by hand 2026-11-01 21:47:54 +11:00
sam e8c2c844a8 ci: skip setup-go caching on the self-hosted runner (#1716) 2026-11-01 21:21:09 +11:00
sam 6220387ed6 fix(install): restart running services on reinstall (#1716) 2026-11-01 17:59:05 +11:00
sam efd3eb2854 fix(releaseupdate): wait for the canary to offer a release before installing (#1716) 2026-11-01 02:55:31 +11:00
sam c78063eba0 chore(release): v1.57.0 2026-11-01 02:26:01 +11:00
sam 0e931485a0 docs(releaseupdate): use contractions in the release and canary text (#1716) 2026-10-31 22:18:57 +11:00
sam 1bf536d4ab docs(releaseupdate): rewrite the canary comments in plain English (#1716) 2026-10-31 22:11:04 +11:00
sam 2181b5fd08 ci(deploy): move the images' :latest only when a release is promoted (#1716) 2026-10-31 21:48:10 +11:00
sam a4a7c96da6 feat(releaseupdate): publish to next and promote to stable only after a canary evaluation (#1716) 2026-10-31 21:39:32 +11:00
sam a7f6e517ad ci(release): cut releases from [Unreleased] by workflow dispatch (#1716) 2026-10-31 21:30:33 +11:00
sam 812d9004a7 feat(webui): keep the Model setup step open until the provider credential resolves (#1045) 2026-10-31 20:04:06 +11:00
sam ebc6dd67e6 fix(setup): offer the bundled database as an explicit choice on a re-run (#1388)
With an existing database_url, setup prefilled the URL, so a blank answer
kept it and the bundled socket database was unreachable without typing its
URL. The re-run database step now presents a choice menu: keep the existing
URL (still the default), switch to the bundled database (socket URL plus a
generated PGPASSWORD written to the env file), or enter a different URL.
Fresh installs and -database-url are unchanged; a blank answer anywhere
still keeps the existing URL. Pinned at the setup API level with fake
prompter/sink: TestRunParamsDatabaseChoice.
2026-10-31 20:03:33 +11:00
sam 949457689c chore(release): v1.56.0 2026-10-31 19:26:43 +11:00
sam 0cb035555f ci(deploy): link the published packages to the repository 2026-10-31 19:19:49 +11:00
sam a5974d0ea0 ci(deploy): one v* release stream; drop the legacy per-component tags 2026-10-31 19:14:48 +11:00
sam 1ea15462c0 feat(messaging): run Telegram as an archipelago channel extension (#1399)
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.
2026-10-31 18:19:21 +11:00
sam 9d8f364af1 feat(releaseupdate): signed OCI distribution sources for releases and the catalogue (#1715) 2026-10-31 18:18:43 +11:00
sam c87b0c31e1 chore(tools): sign cloud environment commits with an SSH key 2026-10-31 14:57:01 +11:00
sam c5802cf86d fix(releaseupdate): load the env file beside the config so update install gets the database password from a shell (#1431) 2026-10-31 14:40:41 +11:00
sam 4f2338810b chore(tools): install go 1.27.3 in the cloud setup script
go.mod moved to 1.27.3 for the crypto/x509 advisory govulncheck reports; the
setup script still installed 1.27.2.
2026-10-31 14:39:58 +11:00
sam f8da67348c feat(webui): org-scoped schedules for non-system orgs (#1639 #1051 #49) 2026-10-31 14:25:24 +11:00
sam 003771ca48 feat(access): denial retention knob, State Store sweep and dashboard denials page (#1842)
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.
2026-10-31 14:23:31 +11:00
sam f7926cde15 fix(deps): go 1.27.3 and x/net 0.62.0 to clear govulncheck
The deploy gate's govulncheck step failed on the first run that reached it, for
two real findings: crypto/x509 in the standard library, fixed in go1.27.3, and
golang.org/x/net v0.61.0, reached from webfetch.htmlToText calling html.Parse,
fixed in v0.62.0. govulncheck now reports none.
2026-10-31 01:05:27 +11:00
sam 3a05b3ecd0 fix(ui): show stream state at phone width and serve sections from the sheet below lg (#1261 #1386) 2026-10-31 00:47:38 +11:00
sam 6031a7a14b ci(deploy): run the gate from the Taskfile, not an inlined copy (#1580)
deploy.yml inlined its own sequence, which drifted weaker than `task check`:
no db:check, news:check or ui:check, so a release could ship stale sqlc
output, a stale ui/dist, or release notes that disagree with CHANGELOG.md,
and the dashboard suite ran outside the gate without its type check.

The release now runs `task check TEST_FLAGS=-count=1`: same definition, the
full uncached suite including the Docker-backed tests -short skips. quality.yml
already invoked the Taskfile, so both pipelines now share one gate.
2026-10-31 00:37:26 +11:00
sam ad9ec16844 test(egress): delete the test-only ResolverFunc adapter and its tests (#1671) 2026-10-31 00:36:37 +11:00
sam 3977eaad68 fix(workflow): make the repository optional for the triage workflow (#1578) 2026-10-31 00:36:10 +11:00
sam 3b6de96782 docs(deploy): name the registry each agent-image path publishes to
The pinning section said CI republished ghcr.io on every push to main. CI
publishes git.catlow.cloud, and only for a release tag; ghcr is where the
hand-run tools/publish.sh writes, which is the reference the default names.

A release zip pins a digest on a registry an anonymous pull cannot reach, and
[containers].registry_auth -- the setting that fixes it -- was documented
nowhere. Documented there, beside the pin.

Also corrected: every shipped profile does not pin the image, and the section
link omitted its number so it matched no heading.
2026-10-31 00:35:49 +11:00
sam decc86fd08 ci(quality): stop caching the pnpm store
setup-node's cache save fails on this runner -- the pnpm store path it computes
does not exist at post-step time, which marks the job failed after the gate has
already passed. Run 19 proved it: 0 lint issues, ui/dist matched, no task failure,
then 'Path Validation Error' and exit 1.
2026-10-30 01:44:56 +11:00
sam 5485dc4690 chore(workflow): finish dropping the unread step-type catalogue accessors (#1014)
Manager.StepTypes and Providers had no reader; the catalogue they were meant
to feed is not missing -- Registry/Settings serve it as x-step-types in the
workflow-definitions schema, read by the dashboard workflow editor and the
gateway's workflow_step_types tool. Remove the write-only providers field
the accessor deletion left behind, and pin that production reader in
controlplanerpc so a dropped schema extension fails the gate.
2026-10-30 01:31:36 +11:00
sam 57865b51f4 fix(forge): return SetStateLabel failures to the caller
A failed state-label change was dropped at three points: the forge.Forge
interface returned nothing, forgeext logged the extension's gRPC error
instead of returning it, and the forgerpc client and server discarded the
response error. SetStateLabel now returns an error on the interface and on
NoopForge, forgeext propagates the extension's error, and the forgerpc
server carries it in the response envelope while the client returns it,
matching the other forgerpc handlers.

The proto is unchanged: a gRPC error rides the status and
SetStateLabelResponse is already an empty message.

TestSetStateLabelFailureReachesTheCaller pins the full chain: an extension
whose SetStateLabel RPC fails, through forgeext and the forgerpc
client/server, to the caller receiving the error.

Refs #280
2026-10-30 00:58:07 +11:00
sam 0a1aa8b3c2 fix(prreview): classify comment lines against the diff before posting 2026-10-30 00:35:36 +11:00
sam 7c8114bc55 fix(curator): grant the definition engine its model runner
Registry.filter stripped the LLM capability whenever a manifest declared
no tools, skills, memory or conversation capabilities, but
DefinitionEngine.Pass always calls the model. An instruction-only custom
curator therefore registered healthy and then failed every pass with
'no model runner is bound'. The definition engine is inherently agentic,
so the filter now keeps the model runner for it while every other
capability service stays bound only when declared.

Adds tests reproducing the instruction-only pass through the
registry/engine path and pinning that the registrar view for an
instruction-only manifest exposes the model but no tools, skills,
memory or conversations.

Closes #1132
2026-10-30 00:22:50 +11:00
sam aa57377c7f fix(staterpc): make model usage writes durable through a State Store outage
A failed RecordUsage was logged and dropped, losing chat, title, sampling
and curator usage that cannot be rebuilt from events. The staterpc Client
now keeps a bounded local outbox: a failed write is queued and retried with
backoff (1s doubling to 1m, 10s per attempt) until the store accepts it, so
records land once the store recovers. The queue is capped at 1024 records;
an overflow is refused so the caller logs the drop. The sampling usage
write is bounded to 5s so a dead store cannot hold a model call.
2026-10-30 00:06:38 +11:00
sam 8aa65bc7b4 fix(workflow): close a budget-stopped stage with its findings as the outcome 2026-10-30 00:06:38 +11:00
sam a781fde566 fix(catalogue): sign an issue time and refuse a replayed older catalogue 2026-10-30 00:06:38 +11:00
sam 3b372b4a91 ci(deploy): stop installing ripgrep and setting sysctl from the gate
The deploy gate runs on a self-hosted runner under an unprivileged user, so the
sudo apt-get install and sudo sysctl steps fail. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
2026-10-29 23:57:23 +11:00
sam 066522cf5d ci(quality): run the gate on the archie-quality runner
The check job asked for the self-hosted label. The repository's only runner,
archie-quality, is online but carries just its own custom label, so run 17 has
been queued since it was pushed. Name the runner instead of a label nothing
offers.
2026-10-29 23:30:43 +11:00
sam ec9bf5feb2 docs: track work in Gitea issues instead of beads
Every one of the 1709 tracker issues was created in Gitea and checked field by
field against its source record: title, body, state, label set, assignee,
comments, dependency edges and epic label. All 1729 beads are closed, citing the
issue that carries each one, and .beads is removed.

Three differences are deliberate: Gitea truncates titles at 253 characters, so
three long titles keep their full text in the issue body; Gitea refuses a mutual
dependency, so five symmetric relates-to links exist in one direction; issue 497
carries its fix from e3b1103f.
2026-10-29 23:22:35 +11:00
sam dfb37fb4f2 Merge origin/main: README update 2026-10-29 23:00:09 +11:00
sam 86c2909a57 Update README.md 2026-10-29 22:54:26 +11:00
sam b5482857f8 fix(forge): accept invitations only to configured repositories
The GitHub forge extension accepted every pending repository
invitation, so any GitHub user could add archie's account to a
repository by sending an invitation. AcceptInvitations now carries the
connection's configured repositories and the extension leaves an
invitation to anything else pending.
2026-10-28 23:57:44 +11:00
sam 0c137d9319 refactor(fsutil): consolidate nine copies of the atomic write helper
Nine packages each had their own write-temp-then-rename helper with
slightly different behaviour (some synced, some did not; some created
the parent directory, some did not; modes and temp-file patterns
varied). They are replaced by one fsutil.WriteFileAtomic that always
syncs before rename, creates the parent directory, and takes the file
mode as a parameter.
2026-10-28 00:48:59 +11:00
sam 59827b19bd fix(controlplane): reject userinfo and query in notify_webhook
A webhook URL with embedded credentials or a query string can leak
secrets through logs, proxies and referrer headers. The task policy
validator now refuses both.
2026-10-28 00:36:33 +11:00
sam 34179f0f9f ci(deploy): publish images and releases to Gitea
The deploy workflow now targets git.catlow.cloud: images push to the
Gitea registry and the distribution zip publishes as a release on
sam/archie through the Gitea API, both authenticated with one
DEPLOY_TOKEN PAT (write:packages + write:repository scopes).
2026-10-27 23:20:54 +11:00
sam 9c193aeebb fix(staterpc): log internal identity errors through the service logger with request context 2026-10-27 20:54:41 +11:00
sam 1cd8955d23 docs(agents): errors surface through OpenTelemetry, not global slog 2026-10-27 20:51:52 +11:00
sam 004e38b8eb fix(staterpc): record internal identity errors on the request span instead of slog 2026-10-27 20:51:46 +11:00
sam c5991a560e fix(staterpc): give token revoke its own audit request ID and log internal identity errors 2026-10-27 20:50:18 +11:00
sam 04ce0f9056 feat(identity): name, lifetime and last-used on personal API tokens 2026-10-27 15:37:44 +11:00
sam e5cb0ac00b fix(ui): copy and dismiss a new API token 2026-10-27 15:31:13 +11:00
sam abe4c488cf fix(archied): recover an orphaned update journal while running, not only at boot 2026-10-27 15:24:04 +11:00
sam 973541f344 fix(gatewayrpc): refuse an inbound attachment whose bytes contradict its declared type 2026-10-27 15:23:48 +11:00
sam 3c4b7b5877 fix(workflow): keep a stopped stage's notes in the parked detail 2026-10-27 15:22:42 +11:00
sam 8fbfb3c99f fix(ui): show the last update's outcome on Settings > Status and present install as staged 2026-10-27 15:18:52 +11:00
sam 3b33d164c7 test(e2e): per-run report.html, fix stale workflow-logic and audit-runtime, add org selector, org pages, setup, recovery, readiness and schedule-trigger checks 2026-10-27 11:44:23 +11:00
sam 292597660f fix(webui): skip the open-card reframe while the workflow canvas is hidden 2026-10-27 11:44:23 +11:00
sam ba3a26af3c fix(postgres): carry org, park class and park blocker on task list rows so a parked task's recovery link shows 2026-10-27 11:44:23 +11:00
sam 4bb473c0b0 fix(webui): resolve a selected org's workspaces as the caller, wire selection into gateway and harness, and let a member start tasks in the org they selected 2026-10-27 11:06:18 +11:00
sam c3d49cbc6c feat(webui): park model credential failures with a recovery link, add Model setup step, readiness badges, and move audit to the organisation 2026-10-27 11:06:18 +11:00
sam e831edb005 feat(webui): act in a selected organisation the caller is a member of, enforced at the dashboard and the State Store 2026-10-27 11:06:18 +11:00
sam 3db2654188 feat(webui): derive the setup checklist from the caller's organisation and drop the optional chat channel step 2026-10-27 10:47:14 +11:00
sam afdb4b203f feat(daemon): park repository, credential and forge-extension failures with a recovery link on the task list 2026-10-27 10:47:14 +11:00
sam 6f57d38669 feat(webui): offer each organisation page only to callers its API write allows, and move appearance to the account menu 2026-10-27 10:47:14 +11:00
sam d60995af43 fix(orgs): layer only the fields an org document sets, retry alerts on a failed lookup, and key chat sessions by org 2026-10-27 10:38:00 +11:00
sam 472d9d8b10 feat(messaging): run a channel per organisation and deliver only through the owner's 2026-10-27 10:38:00 +11:00
sam 11b89354a6 feat(alerts): send each organisation's alerts to its own webhook 2026-10-27 10:38:00 +11:00
sam 8150df8d81 feat(scheduling): resolve the issue discovery rule per organisation 2026-10-27 10:38:00 +11:00
sam b8e080301c fix(postgres): let every org read a built-in mapping so a non-system org can arm a schedule trigger 2026-10-27 10:13:03 +11:00
sam 2d87e9f587 fix(applystatus): report only the instance's own copy so another org's read cannot overwrite it 2026-10-27 10:08:24 +11:00
sam 749baa3e5d fix(scheduling): fire a schedule's capture into its owning organisation 2026-10-27 10:03:29 +11:00
sam 90deba8472 fix(gateway): chat /cancel declines through the task-action service so the run stops 2026-10-27 10:00:54 +11:00
sam 9498fad064 fix(webui): report a workflow's running count and last status from its own runs 2026-10-27 02:52:38 +11:00
sam 6ca5c7f851 fix(release): ship archie-agent beside archied so Kit runs have one to mount 2026-10-27 02:49:31 +11:00
sam dfce3360b2 test(orgs): hold the agent-assignment contract the Agents tab reads 2026-10-27 02:45:35 +11:00
sam 58629ea03a fix(webui): keep the instance settings out of another org's reach 2026-10-27 02:44:33 +11:00
sam 5b3b88ed3d fix(taskfile): install dashboard deps before the parallel gate scans the tree 2026-10-27 02:41:38 +11:00
sam 62dbac9247 fix(archied): refuse an unknown subcommand instead of starting a second daemon 2026-10-27 02:40:41 +11:00
sam a8aad28239 fix(ui): give the topbar its own surface and a filled active tab 2026-10-27 02:13:27 +11:00
sam 9d633855f4 fix(ui): use the Archie mark in chat empty state and sign-in gate 2026-10-27 02:01:32 +11:00
sam 56ac50931e fix(ui): drop cycling names from the logo 2026-10-27 01:57:00 +11:00
sam 3e437d4275 chore: remove dashboard-v2, archived out of tree 2026-10-27 01:54:05 +11:00
sam c9951c085c feat(dashboard-v2): tasks page from table-filter template 2026-10-27 01:47:42 +11:00
sam 59c6f0e4c0 fix(dashboard-v2): fail loudly when 5174 is taken 2026-10-27 01:37:38 +11:00
sam 9460f51e07 Merge remote-tracking branch 'origin/main' 2026-10-27 01:29:45 +11:00
sam 3ac5b97706 fix(ui): larger all-sage mark in the topbar (#1859) 2026-10-27 01:12:19 +11:00
sam 1add0fca32 feat(dashboard-v2): Archie motion mark on login, mark favicon 2026-10-27 01:10:24 +11:00
sam 0d8c48cbf4 Merge remote-tracking branch 'origin/main' 2026-10-27 01:06:12 +11:00
sam e41b7606d6 feat(ui): new Archie mark, shared sage accent, theme follows the OS (#1858) 2026-10-27 01:04:15 +11:00
sam ad2ceaaec2 fix(dashboard-v2): remove duplicated api opener 2026-10-27 00:19:58 +11:00
sam c3b636bf72 feat(dashboard-v2): show instance, offer SSO when advertised 2026-10-27 00:19:20 +11:00
sam 98acd6aad0 chore(dashboard-v2): lock TanStack Query 5.104.5 2026-10-27 00:16:40 +11:00
sam 8f7743c73d fix(dashboard-v2): gate session on status user, add favicon 2026-10-27 00:15:49 +11:00
sam 60a19ab15e feat(dashboard-v2): TanStack Query plus session state 2026-10-26 23:53:48 +11:00
sam dc1e45ff82 feat(dashboard-v2): sign in on 401 via login template page 2026-10-26 23:52:12 +11:00
sam 5fefd1902f fix(dashboard-v2): require StyleX ^0.19 per core peer range 2026-10-26 23:44:18 +11:00
sam 45ed5b2faf feat(dashboard-v2): verify build, commit lockfile and generated theme 2026-10-26 23:44:01 +11:00
sam f0fac7899f chore(dashboard-v2): drop stub lockfile from offline install 2026-10-26 23:41:00 +11:00
sam c7e12b56d0 feat(dashboard-v2): scaffold Astryx app with system status slice 2026-10-26 23:40:47 +11:00
sam 087aa45349 test(e2e): split overloaded checks, standardize screenshots 2026-10-26 22:57:15 +11:00
sam 4cc22ac5e0 refactor(ui): audit leftovers use Alert, Item, CodeView and Tooltip
Inline error paragraphs become destructive Alerts, divided record lists
become Item rows, the redirect URI box uses CodeView, and icon-button
title hints use Tooltip. Native titles remain on truncated values and on
disabled controls.
2026-10-26 22:35:47 +11:00
sam 7f0ecaa192 build: move the dashboard and e2e packages from npm to pnpm 2026-10-26 22:15:26 +11:00
sam a203cbc03b refactor(ui): Empty, Spinner and Label replace hand-built equivalents 2026-10-26 22:11:39 +11:00
sam 17c07a31fe build(ui): update dependencies within range 2026-10-26 22:00:33 +11:00
sam 87100c4aba build(ui): add vue-sonner and the Sonner component 2026-10-26 21:58:02 +11:00
sam 5498c97e3d fix(ui): e2e checks match the current dashboard; trim stray label whitespace, keep Home/End in suggest input 2026-10-26 20:59:48 +11:00
sam 3ff6867e84 refactor(ui): raw buttons, details and hr use Button, Collapsible and Separator 2026-10-26 20:00:57 +11:00
sam 7c050eef14 refactor(ui): block error messages use Alert 2026-10-26 19:59:00 +11:00
sam d98abad8bb feat(archied): raise an alert when container max uptime is under the task limit 2026-10-26 19:48:09 +11:00
sam 9e92beb4cc fix(ui): agent profile tools commit on change so commas can be typed 2026-10-26 19:46:56 +11:00
sam ca597c3678 feat(ui): suggest input on Combobox replaces datalists, RadioGroup for task pickers
Also records the combobox and radio-group components added in 63476393.
2026-10-26 19:45:18 +11:00
sam 63476393d7 feat(ui): settings pages edit through TanStack Form with shadcn-vue Field
Each control-plane kind has one store-owned TanStack form, so edits survive
navigation and the save bar submits every dirty section. Shared editors emit
new values, map entries are written whole, unset resources stay null, and the
container runtime page warns when max uptime is under the task limit.
2026-10-26 19:17:03 +11:00
sam 9d930436c5 refactor(ui): delete unused SegmentBar 2026-10-26 18:52:55 +11:00
sam be0f6f5ab7 fix(gateway): name a plan wait's workflow from its run, not the next one
workflow.approve pre-writes the task's workflow column with the workflow
that runs once approved, so task_list named a workflow that had not
started while the task's own log named the one that produced the plan.
Chat now names the compiled workflow through the pinned definition for a
plan wait, matching the log.
2026-10-26 18:32:25 +11:00
sam 66daa071a5 fix(configuration): raise the default max uptime above the task limit 2026-10-26 18:32:25 +11:00
sam ca44b9e6bb fix(archied): bound task titles in chat notifications 2026-10-26 18:32:25 +11:00
sam da7efa3f4e fix(ui): keep the chat dock open across navigation
Clicking any navigation control counted as an outside click, so the dock
collapsed on every route change and the conversation disappeared. Hide and
Escape remain the only ways to collapse it.

The e2e accessibility check referenced the removed outside-click launcher and
the old Close chat label; both now use the dock's real controls.
2026-10-26 18:28:32 +11:00
sam 4de8882ef5 fix(gateway): require a remote check before claiming branch or PR state
The chat agent read only its local checkout, so an unfetched workspace made it report that no task branch or PR existed and that shipped UI code did not exist. Add a core rule: refresh from the remote or check the forge before describing branches, commits, pull requests or the default branch, and say the answer is local-only when it cannot.
2026-10-26 18:28:32 +11:00
sam c00a90c9ca fix(workflow): report a parked run's outcome as the task's status
A run that parked left tc.Outcome empty, so the taskrun response carried an
empty status and the daemon logged 'taskrun run recorded no outcome' for a run
that had recorded one, then retried the park it could not apply.

Record the outcome once the parked transition lands, so a budget stop and every
other park surface with the reason the run parked.
2026-10-26 18:28:32 +11:00
sam c4c50ea70d fix(gateway): cap task_spawn titles and carry instructions into the body 2026-10-26 18:24:47 +11:00
sam c578c8e954 fix(taskactions): let the operator chat act on every task, like the dashboard
A chat profile bound to the operator identity passed a strict scope to the
action gate, so it refused root-owned tasks whose identity is the daemon's
empty sentinel (task 22: belongs to "", not "d898c8c8-..."). The dashboard
acts with a nil scope and the chat read paths already treat the operator as
acting across identities, so the write gate was the only surface that disagreed.

Exempt the operator identity from the scope comparison and share that rule with
the chat adapters that had their own copy.
2026-10-26 18:24:47 +11:00
sam e85719f2d2 fix(controlplanerpc): attribute chat workflow drafts so saves succeed 2026-10-26 18:24:46 +11:00
sam 4dca007003 fix(container): report a crashed container's panic line and log its stderr 2026-10-26 18:24:46 +11:00
sam d7d1bd4556 fix(workflow): record the own-PR flag after the review stages that allocate it
StagePRReviewAndOpenPR set tc.prReview.ownPR before the decision stages ran,
but intake allocates tc.prReview, so every implement run dereferenced a nil
state at repo.open-pr and the agent container panicked with exit code 2
before opening the pull request.
2026-10-26 18:07:01 +11:00
sam dc26daeebe fix(daemon): issue poll and PR passes report failed items to the scheduler 2026-10-26 17:24:55 +11:00
sam f727d54d75 feat(ui): schedules table, runs page and Schedule trigger
Schedules list as a table with enable, run now, edit, duplicate, delete and
view runs; built-ins only enable, retime and run. The runs page links each
run's tasks through its capture's dispatches. The Start node gains a Schedule
trigger that picks or creates a schedule and binds the schedule source to the
workflow. Times show in a per-browser display zone set under Appearance; the
cron time zone and run retention are edited on the Schedules page.
2026-10-26 00:57:52 +11:00
sam 6f8371a7bf feat(workflow): message.send step delivers text through archied's messaging client 2026-10-26 00:56:07 +11:00
sam fff689312d feat(archied): run daemon maintenance as built-in schedules 2026-10-26 00:51:53 +11:00
sam b701f60a99 feat(scheduling): schedules and runs in the State Store with grid timing and run history
Schedules leave the schedules control-plane resource for State Store tables
behind a ScheduleService contract. A run is claimed per schedule slot, missed
slots fire once, the next run stays on the schedule's grid, cron is read in the
schedule-settings time zone, and failed runs are recorded and advance. Three
failures in a row raise a schedule.failing alert. A fired run records a
schedule-fired capture. Run history is pruned by age and count.

Removes the chat and spawn-task runners, the dangerous-payload guard and the
old schedules settings page.
2026-10-26 00:49:24 +11:00
sam 6ba6a595b8 feat(eda): capture schedule firings on a reserved source for bindings 2026-10-26 00:38:55 +11:00
sam 6cd9c4a7d8 feat(daemon): built-in maintenance jobs and idle mirror pruning
Cycle's maintenance passes become a BuiltinJobs list for the scheduler to
seed as locked schedules. Mirrors use a file lock shared by every Manager
and held across refresh and clone, so pruning cannot race a clone.
2026-10-26 00:37:25 +11:00
sam 816ce2e1f8 fix(extension): log go-plugin output through the service slog logger 2026-10-26 00:25:37 +11:00
sam 19570ad4bb fix(logging): route ui, messaging and playbook logs through the service log 2026-10-26 00:18:39 +11:00
sam 5212a4d913 build(deps): bump ai-sdk to v0.6.0, nats.go, oras-go, go-jose and indirect deps 2026-10-26 00:18:39 +11:00
sam 46f0643cf5 fix(webui): name API spans after their route 2026-10-25 23:42:44 +11:00
sam 656feab2a4 refactor(logging): log with the caller's context so records carry trace ids 2026-10-25 23:30:01 +11:00
sam 0611e00330 feat(llm): trace model and tool calls via ai-sdk v0.5.0 2026-10-25 23:19:40 +11:00
sam 128d5e0a82 feat(agent): export container spans over NATS through archied 2026-10-25 23:17:34 +11:00
sam c6187b7c23 feat(servicekit): OpenTelemetry tracer provider and RPC propagation 2026-10-25 23:11:03 +11:00
sam afd6669877 fix(memory): rotate a full section's oldest records to history 2026-10-25 23:10:15 +11:00
sam 7bf007bb58 test(e2e): wait for audit dialogs to close 2026-10-25 23:05:27 +11:00
sam 92a74e4b7d test(e2e): wait for audit dialogs to close 2026-10-25 23:04:56 +11:00
sam 0880e6a01c feat(natsrpc): propagate trace context across NATS and into task runs 2026-10-25 23:03:55 +11:00
sam 4a889991bd test(e2e): audit page browser check 2026-10-25 23:00:44 +11:00
sam 89bb4eb46b fix(audit): filter count aliases outside the projection and clean identity detail 2026-10-25 23:00:44 +11:00
sam f3c7555195 test(e2e): browser check for the audit page 2026-10-25 22:56:18 +11:00
sam 79f3895923 feat(logging): stamp trace and span ids on log records 2026-10-25 22:55:57 +11:00
sam 837cd91501 refactor(controlplane): move the store-backed server out of internal/app 2026-10-25 22:49:27 +11:00
sam 5112ce896b fix(channelext): bound the extension broker server with service limits 2026-10-25 22:46:47 +11:00
sam 7715d6b23b fix(audit): close the feed union and repair denied and retention controls 2026-10-25 22:42:00 +11:00
sam 373032e330 fix(audit): gate resource history, harden export, scope legacy keys and catalog 2026-10-25 22:39:34 +11:00
sam 6a69fb760a fix(audit): harden export, scope history and derive feed targets 2026-10-25 22:39:22 +11:00
sam 4cc7573b27 fix(ui): gate audit retention, resolve export time on click, merge live updates 2026-10-25 22:33:31 +11:00
sam 1d7fd6aab3 fix(ui): gate audit retention, resolve export at click, merge live updates 2026-10-25 22:32:59 +11:00
sam c04a18d387 feat(ui): audit page with server filters, live tail, export and revert 2026-10-25 22:14:53 +11:00
sam abf485b9ef fix(ui): address audit page review findings 2026-10-25 22:14:33 +11:00
sam 0245c4e455 fix(webui): link audit task targets to the task detail 2026-10-25 22:09:31 +11:00
sam fa00f74af5 fix(ui): enforce the retention minimum beside the hours field 2026-10-25 22:09:25 +11:00
sam 2f9ed7adca fix(webui): link audit task targets to task detail 2026-10-25 22:09:25 +11:00
sam 4f2e1c3687 fix(ui): send explicit export range and whole-hour retention 2026-10-25 22:09:25 +11:00
sam 2d2ca156d8 feat(ui): unified audit page with server filters and live tail 2026-10-25 22:09:25 +11:00
sam f8c3dbedf2 fix(webui): allow an all-time audit export 2026-10-25 22:05:40 +11:00
sam 17354de8fe fix(webui): treat the epoch export start as any time 2026-10-25 22:05:34 +11:00
sam 7066a6fd46 feat(webui): audit feed API, export and read_audit grant 2026-10-25 22:02:03 +11:00
sam 20595a70b4 feat(webui): audit feed API, export and read_audit grant 2026-10-25 22:01:02 +11:00
sam 568f7adf52 fix(storage): mount a task's object mirror read-only into its container 2026-10-25 21:58:25 +11:00
sam 74e34fb07a perf(worktree): clone tasks from a shared per-repository mirror 2026-10-25 21:55:20 +11:00
sam e6d765d233 feat(state): audit retention resource and observability sweep 2026-10-25 21:53:29 +11:00
sam 4250a31ff9 fix(state): retain product-read events and normalise audit retention 2026-10-25 21:53:19 +11:00
sam ad19271c6c fix(archied): drop a cached extension binary when its start fails 2026-10-25 21:47:31 +11:00
sam b774b68ed4 perf(archied): reuse running forge extension instances and materialized binaries 2026-10-25 21:46:51 +11:00
sam 8eaf7b00c3 fix(daemon): drain tasks in their own loop, not on the poll tick 2026-10-25 21:45:57 +11:00
sam 59eecd956d feat(state): apply audit retention to observability events 2026-10-25 21:42:38 +11:00
sam e2f9388071 feat(state): unified org-scoped audit feed and AuditService 2026-10-25 21:37:56 +11:00
sam 6c095e5ac6 fix(state): resolve identity audit org in one statement 2026-10-25 21:37:50 +11:00
sam 274acfe6f5 fix(state): attribute identity events to the subject's single org 2026-10-25 21:35:19 +11:00
sam f1eda629a8 feat(state): audit access reset, org, membership and EDA writes 2026-10-25 21:33:28 +11:00
sam 5602534ba9 fix(state): serialise source writes and keep binding workspaces audited 2026-10-25 21:33:08 +11:00
sam bc9b9952cd fix(state): classify audit coverage rows and keep unknown identity orgs private 2026-10-25 21:25:55 +11:00
sam 7f5a73d97d fix(state): close residual audit coverage gaps 2026-10-25 21:24:50 +11:00
sam 02a4ac0629 fix(state): harden the audit feed against audit findings 2026-10-25 21:23:52 +11:00
sam ab78f5c909 feat(state): org-scoped audit feed contract and read model 2026-10-25 21:23:52 +11:00
sam c9c552a1bd feat(state): audit access resets, org and EDA writes 2026-10-25 21:10:38 +11:00
sam c24b055cf3 feat(state): audit package and harness secret writes 2026-10-25 21:10:08 +11:00
sam 72052fe186 fix(postgres): skip unchanged authority in package audit 2026-10-25 21:10:02 +11:00
sam 0f14378363 fix(postgres): correct package and secret audit coverage 2026-10-25 21:03:00 +11:00
sam 551220eccc feat(postgres): audit package and harness secret writes 2026-10-25 21:00:27 +11:00
sam 287f8d71dd refactor(staterpc): one file per State Store service 2026-10-25 21:00:19 +11:00
sam 390e89aefb fix(state): correct audit backfill scoping and policy write races 2026-10-25 20:59:04 +11:00
sam 18e21661b2 feat(state): shared audit write helper for domain tables 2026-10-25 20:49:47 +11:00
sam 8af19c79f4 feat(state): org-scoped audit trail and complete policy write audit 2026-10-25 20:49:20 +11:00
sam b7cda2b2fe build: keep the agent image context to what compiles it
A trailing-slash pattern in .dockerignore matches only the context root, so
node_modules/ never excluded ui/node_modules -- 200MB shipped to the builder
for a Go compile. The issue tracker's Dolt directory was never listed at all.
Every line here either bloats the context or invalidates the COPY layer for
nothing: 467MB transferred per build, 320kB now.
2026-10-25 20:47:24 +11:00
sam c86b8659e5 build: stamp the agent image with the checkout's version
The container build was the one build path that could not learn a version: the
build context excludes .git, so it has to be passed in, and nothing passed one
-- Compose handed the Dockerfile no build args, so every locally built agent
answered "dev" while the daemon reported the tag. The Taskfile now derives the
version from git describe once, for both the host binaries and the image, and
task image:agent passes it through.

docker compose build agent also failed outright: the service named the image by
digest, and Compose refuses to tag a digest. The build-only service names it by
tag now; what a task container runs is still pinned in the daemon's own
[containers] image.
2026-10-25 20:24:27 +11:00
sam de3b41b70d fix(messaging): read a voice clip's container instead of believing its type
The dashboard upload names its own attachment type, so the check that ran on
it only compared two declarations the sender wrote. A browser can label any
bytes audio/ogg, and the transcriber keys on the attachment type alone, so the
bytes went to the operator's provider regardless.

When the bytes are present the container decides: Ogg, WebM/Matroska, mp4/m4a,
wav, flac and mp3 are the containers a clip is recorded in, and anything else
claimed to be speech is refused before it reaches a transcriber. Magic numbers
rather than http.DetectContentType, which reports application/octet-stream for
the WebM every browser but Safari records.
2026-10-25 20:17:30 +11:00
sam 5aa0aead4d chore(proto): drop the one-off service-deletion exception 2026-10-25 19:54:47 +11:00
sam 0dae907dad refactor(state)!: split StateStoreService into per-domain services
One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
2026-10-25 19:54:27 +11:00
sam 59e3de62db feat(ui): marketplace grouped by surface, searchable, with install state
The marketplace was one long list of filled Install buttons with the raw
surface name beside each version. Packages now group under Forges, Channels,
Secret engines and the rest, as cards in a two-column grid with a search
box. Installed packages stay listed, marked installed or offering their
update.
2026-10-25 19:45:28 +11:00
sam 6c2ab54f65 fix(ui): offer an extension update only when the catalogue has one
An installed extension showed its own version and an Update button whether
or not the catalogue pinned anything newer, so a published update was
invisible. The row now offers 'Update to <version>' when the catalogue's
digest differs from the installed one and no update is already pending.
2026-10-25 18:55:20 +11:00
sam be47311883 docs: map the services and development commands in CLAUDE.md 2026-10-25 18:15:14 +11:00
sam 1e9659c7a2 fix(messaging): say what the inbound media check actually checks
The check compares two declarations; it never reads the bytes, so it cannot
tell whether a file is what its content type says. The comment and the test
row claiming otherwise have gone, and so has an allowance letting a video
carry an image type, which no producer emits.

A caller that named the attachment type itself -- a browser upload -- must now
also state a content type, since the previous empty-type escape made the check
optional there. The Telegram declared-size rule is deleted: the shared check
runs first with the same ceiling, so only the rule on the bytes actually
received can still fire.
2026-10-25 18:13:30 +11:00
sam ca73d02804 chore: bump beads version to 1.3.2 2026-10-25 18:11:33 +11:00
sam 5f827b6e19 fix(messaging): refuse an inbound attachment whose type contradicts its content
A declared MIME type decides what the Gateway does with a file: a voice note is
transcribed, an image goes to a model. Both acceptance points took that claim
from the caller unchecked -- the dashboard's voice upload and every Telegram
attachment -- so a file could be used as something it is not.

ValidateInbound refuses a type outside the shared vocabulary, content over the
size ceiling, and a MIME type that contradicts the attachment type, with an
error the caller sees: a dashboard upload is a 400, a Telegram file gets a
chat reply instead of a silent drop.
2026-10-25 18:05:34 +11:00
sam 7d9c40d79d fix(workflow): review a task's own pull request as a comment
GitHub refuses REQUEST_CHANGES from a pull request's author, so a blocking
finding on the PR a task opened lost every finding. The retry's identical
refusal is now reported once, and forge errors drop the gRPC framing.
2026-10-25 17:57:20 +11:00
sam 33da08bce5 feat(ui): task log opens newest first 2026-10-25 17:41:21 +11:00
sam f2b8681611 refactor(workflow): stop assuming a human decides
An approval, ask or park can be resolved by an operator, a rule, a
classifier or automatically, so the vocabulary stops naming a person:

- step type human.approve -> workflow.approve
- park class needs_human -> needs_decision (ParkNeedsDecision)
- event kinds human_* -> operator_*
- alert kind task.needs_human -> task.needs_decision
- status grouping "needs you" -> "needs attention"

0061 rewrites the stored values, including the approval step type in the
workflow-definitions resource and each task's pinned definition, with the
digest recomputed so resumed tasks still match.
2026-10-25 17:31:16 +11:00
sam fc609171ca docs: clarify reviewer in implement finish summary 2026-10-25 17:20:13 +11:00
sam 2399da1f8d docs(workflow): name no human approver in the plan document 2026-10-25 17:19:06 +11:00
sam d699b9afba feat(workflow): approve a PRD as one structured document
The prd step returns the PRD as structured fields and human.approve takes
them as its document. The plan text every surface reads and the approval
card's layout are both rendered from that one document, so what the human
approves is what the implement workflow is handed. Replaces the separately
generated OpenUI view, which could drift from the plan.
2026-10-25 16:53:17 +11:00
sam 7a03e003a1 docs(ui): drop the local deploy sequence from the shared rules 2026-10-25 16:53:17 +11:00
sam 340223de2e feat(modelloop): run a step's tool calls in parallel as each tool's classification allows 2026-10-25 16:45:34 +11:00
sam 54697c6e17 feat(curator): add and remove curators live; definition updates touch only changed curators 2026-10-25 16:45:34 +11:00
sam 18eed1fb96 fix(webui): refuse change captures whose file entries have the wrong key set 2026-10-25 16:45:34 +11:00
sam 55c201e7c1 fix(builtin): send_file resolves symlinks before the confinement check 2026-10-25 16:45:34 +11:00
sam 54a78175b4 feat(workflow): render a PRD's generated view on the plan approval card
agent.run gains views: the agent may return an OpenUI Lang view of its
answer through an optional view tool, read as steps.<id>.view. human.approve
stores it as the task's plan_view, and the approval card renders it with
the dashboard's own components, falling back to the plan text when there
is no view or it does not parse. The feasibility prd step uses it.
2026-10-25 16:33:04 +11:00
sam cae19ca42e fix(ui): name and link the identity a parked reason names 2026-10-25 16:24:03 +11:00
sam d4558c15d3 test(daemon): a task start parks transient when the policy chain is unavailable 2026-10-25 16:23:16 +11:00
sam 75c1dbf83c fix(access): check the policy version before each decision
archied, archie-ui and the tool gateway re-read the stored policies on a 30s
ticker, so a forbid written seconds earlier did not stop a run. One
instance-wide revision now moves inside the transaction of every policy write,
and a decision reads it first and rebuilds the engine only when it moved.

A version read that fails, or a policy list that fails after a bump, refuses
with ErrChainUnavailable instead of standing on the last chain, so three call
sites now treat unavailable as availability rather than denial: dispatch leaves
the capture for the next cycle, a task start parks transient, and the tool
gateway reports the tool as unavailable.
2026-10-25 16:21:01 +11:00
sam 536155752c test(egress): a recording session performs no central tool call 2026-10-25 16:02:46 +11:00
sam 958561d255 feat(egress): record a test run's deliveries instead of sending them
A test run used to suppress only forge and push writes, which named one
destination among many. Deliveries now have one seam: TaskContext.Deliveries
records each as "would ..." and performs none, and a recording egress
session does the same for a Kit run's HTTP writes and central tool calls,
answering them synthetically. Provider hosts stay live, since model traffic
is how a test run reads. Native containers have no proxy (archie-core-n8d3).
2026-10-25 16:01:06 +11:00
sam 7cd62232ef feat(webui): add WebMCP task actions 2026-10-25 15:47:59 +11:00
sam 32b73c3a28 fix(store): post open chat task states once after the posted-status migration 2026-10-25 02:46:43 +11:00
sam b0137d6181 fix(daemon): archied --once drains until callees of a waiting call finish 2026-10-25 02:46:16 +11:00
sam a776de8b8f fix(archied): post each reportable status a chat task reaches, recorded by status not by flag 2026-10-25 02:42:31 +11:00
sam b577b02eb6 feat(archied): tell the chat when its task opens a pull request 2026-10-25 02:39:34 +11:00
sam b006b1c943 fix(ui): long log messages wrap inside the table 2026-10-25 02:23:29 +11:00
sam 4241dbf817 fix(ui): log table shows component on the Logs page and a bordered sticky header 2026-10-25 02:21:57 +11:00
sam 0ccd1793e3 fix(ui): the log table header sticks to the log frame 2026-10-25 02:20:29 +11:00
sam 29aad11bed fix(ui): sticky log table header and bounded stage and service columns 2026-10-25 02:19:05 +11:00
sam 6e33004ef2 feat(ui): the Logs page uses the task log's table 2026-10-25 02:17:35 +11:00
sam afca2c164f fix(ui): singular field count in the task log 2026-10-25 01:24:21 +11:00
sam c7e2160582 fix(ui): metadata labels size to their content and wrap in table details 2026-10-25 01:22:59 +11:00
sam 849e24757d feat(ui): task logs as a table with expandable fields 2026-10-25 01:21:21 +11:00
sam e143362479 fix(ui): centre the plan in the approval card 2026-10-25 00:50:16 +11:00
sam 4146600579 fix(ui): put the approval card in the task page's main column 2026-10-25 00:46:18 +11:00
sam a04afe8d4e fix(ui): size the approval card to its text so the answers sit beside it 2026-10-25 00:38:02 +11:00
sam 550bb60691 fix(ui): hold the plan to a readable line length 2026-10-25 00:36:45 +11:00
sam df54db239d fix(ui): plain text for the plan's title on the approval card 2026-10-25 00:17:27 +11:00
sam de532ca299 fix(ui): approve a plan from a card that holds the plan and both answers 2026-10-25 00:16:10 +11:00
sam d7fc4e1fe9 feat(archied): post approval requests to the chat that started the task 2026-10-24 23:59:25 +11:00
sam e8a60c4abd refactor!: waiting_human becomes waiting_approval, with the approval kind on each task 2026-10-24 23:45:20 +11:00
sam 1f8a9964c1 fix(ui): show the plan and Approve/Reject on a task waiting for approval 2026-10-24 23:35:31 +11:00
sam aabe8f7a80 fix(archied): post dashboard chat task outcomes into the conversation through the gateway 2026-10-24 23:22:11 +11:00
sam fe9bdefc62 fix(workflow): keep the failing lines when clipping gate output 2026-10-24 23:18:23 +11:00
sam 205d0ec976 feat(archied): update agent-image sets the image new tasks run 2026-10-24 23:16:13 +11:00
sam e9ecc84064 docs(config): cut the setup template to the settings that start the services 2026-10-24 22:26:33 +11:00
sam 3b7193c207 refactor!: remove the diff-size cap and its gate.diff-size step 2026-10-24 22:19:23 +11:00
sam 84cb0eb3fd build(agent): golangci-lint 2.14.0, which reads Go 1.27.3 export data 2026-10-24 22:00:30 +11:00
sam d9fda2338f test(secretengine): skip the host launch test where the kernel refuses namespaces 2026-10-24 21:54:04 +11:00
sam 64acc0e97a fix(ui): mount a fresh canvas menu at each right-click 2026-10-24 21:50:23 +11:00
sam 8d2307d12d fix(ui): close the canvas menu for a tick before reopening it at the pointer 2026-10-24 21:48:29 +11:00
sam 8c128592bd fix(ui): show full repo names and reopen the canvas menu at a new right-click 2026-10-24 21:46:12 +11:00
sam 39430d78ae Revert "fix(messaging): mask secrets embedded in chat tool arguments"
This reverts commit 9c9aefd296.
2026-10-24 20:56:31 +11:00
sam 9c9aefd296 fix(messaging): mask secrets embedded in chat tool arguments 2026-10-24 20:53:27 +11:00
sam e63489829e fix(ui): show non-text tool arguments as key: value pairs 2026-10-24 20:51:59 +11:00
sam 87bc53c278 feat(chat): show each tool call where it happened in the reply 2026-10-24 20:48:43 +11:00
sam 5bdf68594d fix(messaging): show tool argument values in chat, redacting only sensitive keys 2026-10-24 20:46:29 +11:00
sam f6988916d8 feat(gateway): record how long each chat tool call took and show it per row 2026-10-24 20:44:40 +11:00
sam aaccbcf984 fix(ui): show a chat tool run as N tool calls with one status row per call 2026-10-24 20:31:51 +11:00
sam f9e3c4eaa4 fix(ui): summarise a chat tool run as one line instead of per-tool counts 2026-10-24 20:30:27 +11:00
sam 97195bf2ac chore(workflow): say in a review post failure whether it carried inline comments 2026-10-24 18:27:17 +11:00
sam c787db7e07 chore(workflow): log where a review's comments are placed before posting 2026-10-24 18:18:54 +11:00
sam 12b5022a4f fix(workflow): repost a review without inline comments when the forge refuses their placement 2026-10-24 18:07:14 +11:00
sam 8c98f20f0e build(deps): bump ai-sdk to v0.3.2 for DeepSeek forced tool choices 2026-10-24 17:48:24 +11:00
sam 9e334c3627 fix(ui): let command rows shrink to their column 2026-10-24 17:45:36 +11:00
sam 66f06a1878 fix(ui): stop wide setting controls from stretching the row past its card 2026-10-24 17:29:12 +11:00
sam 6d7f341de5 fix(workflow): post review findings outside the diff in the review body instead of inline 2026-10-24 17:27:35 +11:00
sam 7973feceb0 fix(tools): compare protos against an export of main so the gate runs as any user 2026-10-24 17:27:34 +11:00
sam 8ccac46fc9 fix(ui): size the command list to its setting row 2026-10-24 17:18:05 +11:00
sam b70e791fed fix(ui): keep command fields to the row width 2026-10-24 17:16:55 +11:00
sam 1a57aa7216 fix(ui): edit gate and tooling commands as shell-quoted lines instead of argument chips 2026-10-24 17:15:41 +11:00
sam 102355aba5 fix(daemon): park a pushing workflow before it runs when its identity may not push, with a link to the connection 2026-10-24 17:06:25 +11:00
sam 9a08048744 fix(archied): stop retrying task outcomes for a channel messaging does not have 2026-10-24 17:02:50 +11:00
sam 793569f6e1 refactor(ui): build the task list on DataTable with sortable columns and row links 2026-10-24 13:29:57 +11:00
sam ffafc3a989 fix(ui): add a warn alert variant and fit org and model forms on phones 2026-10-24 13:26:35 +11:00
sam 951acb8088 refactor(ui): build settings, org, task, workflow and dashboard pages from the shared components 2026-10-24 12:34:29 +11:00
sam afc0c0319b fix(ui): merge type-scale sizes with colours and put the column picker in the header 2026-10-24 12:21:48 +11:00
sam 522dfa5703 feat(ui): add the shared design-system components and type scale 2026-10-24 12:20:01 +11:00
sam 332e444397 fix(ui): lay out appearance preferences as setting rows 2026-10-24 12:15:52 +11:00
sam 959e1e0520 fix(ui): shorten the missing-snapshot notice 2026-10-24 11:47:16 +11:00
sam d8572e17e6 fix(ui): cut copy that restates what a value is 2026-10-24 11:46:38 +11:00
sam b2f720cc2b feat(ui): split agents from services, choose status columns, open reasons from the state badge 2026-10-24 11:45:57 +11:00
sam c7fc55a0ef fix(ui): group consecutive chat tool calls and simplify the chat controls 2026-10-24 11:45:57 +11:00
sam e84dd0f7e2 fix(ui): give service problems room and drop rows and bars with nothing to say 2026-10-24 11:41:48 +11:00
sam 1624353b2b fix(readiness): name only the filesystems over their limit 2026-10-24 11:41:48 +11:00
sam 5e7b51710c fix(ui): trim the task page and draw a run's pinned definition on the canvas 2026-10-24 11:39:55 +11:00
sam 97466ad27d refactor(daemon): name a taskrun failure's cause in one place 2026-10-24 11:32:16 +11:00
sam 90c5f5075a fix(daemon): leave a task running when only the daemon is stopping 2026-10-24 11:30:45 +11:00
sam 4e97975862 fix(archieui): reach the sandbox and setup terminal on the daemon's listener 2026-10-24 11:24:49 +11:00
sam 64e398112f fix(container): keep agent output out of the exit reason 2026-10-24 02:28:01 +11:00
sam 2a5b50346c fix(ui): keep page controls clear of the chat dock and hide synthetic issue numbers 2026-10-24 02:25:26 +11:00
sam 6ff09f92a5 fix(releaseupdate): a development build names no release to compare 2026-10-24 02:25:25 +11:00
sam 07c8bf310d fix(daemon): say how an agent container ended when it dies mid-task 2026-10-24 02:25:25 +11:00
sam dc6c4826bc fix(ui): fold the workflow title into the toolbar band on desktop 2026-10-24 02:17:53 +11:00
sam d915a24f4d fix(webui): compare a describe build's release, not its raw version, for drift 2026-10-24 02:17:53 +11:00
sam 267528efba fix(ui): use the shared settings card on account, authentication, instructions and channels pages 2026-10-24 00:03:21 +11:00
sam ad827e34bb test(kitrun): drop the WorkerEnv wiring test 2026-10-22 17:39:37 +11:00
sam 69b8c482c1 fix(config): read a model alias's provider the way the resolver does 2026-10-22 17:39:13 +11:00
sam aac77950f2 fix(configuration): keep named instances under the archie- namespace 2026-10-22 17:38:40 +11:00
sam 614ab1e6fa fix(workflow): require triage's workflow when a code change is needed 2026-10-22 17:37:33 +11:00
sam 2e6c493487 fix(config): give a non-system org only the aliases its policy resolves 2026-10-22 17:36:24 +11:00
sam 2ca7c9b2b9 fix(daemon): relay a loopback State Store with external NATS, and only for the task's container 2026-10-22 17:35:24 +11:00
sam b395eec893 fix(archiegateway): confine non-operator chat identities to their own tasks 2026-10-22 17:32:55 +11:00
sam 5675284b08 fix(controlplane): keep an org's own provider credential reference 2026-10-22 17:31:54 +11:00
sam cbe998b598 Merge pull request #1818 from samcharles93/fix/triage-non-code-path
fix(triage): let a task that needs no code change be classified
2026-10-22 13:52:18 +11:00
sam fc0dd41092 fix(triage): let a task that needs no code change be classified
The classify result required a workflow, and the capture tool rejects an empty
required string on the agent's single allowed call. A task needing no code
change has no workflow to name, so the classification failed instead of
closing the task -- the non-code path could never complete.

Require only what every classification has: whether a change is needed and the
reasons. Name the workflow required-when-true in its description, guard the
handoff on needs_code_change rather than relying on the finish step having
ended the run first, and comment the reasons before closing so the reporter
sees why nothing was built.
2026-10-22 13:50:47 +11:00
sam 2f8d375692 Merge pull request #1817 from samcharles93/fix/repo-tooling-stage
feat(workflow): install a repository's declared tooling before its gate
2026-10-21 23:11:52 +11:00
sam 8ed814cbf7 feat(workflow): install a repository's declared tooling before its gate 2026-10-21 23:11:16 +11:00
sam 852dd4f6c7 Merge pull request #1815 from samcharles93/fix/model-provider-credential-ref
fix(staterpc): carry each model provider's credential reference
2026-10-20 07:13:44 +11:00
sam 88514a444b fix(staterpc): carry each model provider's credential reference
The State Store wire described a provider's class, base URL and key variable
but never where its key lives, so every provider reached the daemon
credential-less. A task then built its runtime with no key: the egress session
had nothing to bind and the agent parked on 'APIKey is required'.

Carry api_key_engine and api_key_key alongside the provider. They are a
reference, not a secret; the key is still resolved daemon-side and never
travels to a container.
2026-10-20 07:10:58 +11:00
sam e33adbb12f Merge pull request #1814 from samcharles93/fix/egress-provider-secret-ref
fix(egress): bind a task's model providers from their api_key_ref
2026-10-20 06:57:31 +11:00
sam ae178f1be0 fix(egress): bind a task's model providers from their api_key_ref
A container task parked when a provider carried an api_key_env but no
credential binding named after it, even though the task's models never
reached that provider. Egress pre-bound every provider the instance
configures and ignored api_key_ref, so the credentials an operator stores in
provider-settings were never used.

A task's config now carries only the providers its model aliases resolve to,
each with the variable its credential is read from: the operator's
api_key_env, or a name derived from the provider when its credential is a
secret reference. modelEgress resolves that reference once for the session
and the proxy substitutes the session's key for the sentinel, so the
container still holds no key. A provider that only declares an env var keeps
resolving through its org credential binding.
2026-10-20 06:56:38 +11:00
sam d1b7a21b9b Merge pull request #1813 from samcharles93/fix/default-org-providers
fix(controlplane): resolve the default org's providers with its aliases
2026-10-20 03:44:53 +11:00
sam bf4fde5f7d fix(config): keep the resolved aliases when an org supplies none 2026-10-20 03:44:21 +11:00
sam 6194a51ed0 fix(controlplane): resolve the default org's providers with its aliases 2026-10-20 03:44:21 +11:00
sam 4847fb0b77 Merge pull request #1811 from samcharles93/fix/container-state-store-reachability
fix(daemon): give a task container a reachable State Store endpoint
2026-10-20 03:25:36 +11:00
sam fd241a59cc Merge pull request #1810 from samcharles93/fix/agent-empty-status-parks
fix(daemon): park a task whose agent reported no status
2026-10-20 03:24:38 +11:00
sam 0f0f048380 Merge pull request #1812 from samcharles93/fix/messaging-session-save
fix(gateway): save a messaging session instead of requiring web visibility
2026-10-20 03:24:00 +11:00
sam 974c93498a fix(gateway): save a messaging session instead of requiring web visibility 2026-10-20 03:12:40 +11:00
sam 92bc0f692f fix(daemon): give a task container a reachable State Store endpoint 2026-10-20 03:12:21 +11:00
sam 7b2af3348d fix(daemon): park a task whose agent reported no status
runViaAgent logged the agent's reply status and returned, so a task whose
agent could not persist its own outcome (empty status, State Store down)
stayed running with no park reason while the run read as complete.

A status the task cannot reach from running now parks it, quoting the
status and naming the condition.
2026-10-20 03:10:33 +11:00
sam 89cbbfc871 fix: chat streaming blocking the UI. extensions not showing accepted policies once accepted. (#1809)
* fix(ui): show an extension's accepted authority after it is accepted

* fix(ui): keep a chat reply's streamed text when the turn is stopped or fails

* feat(ui): queue chat messages sent while a turn runs
2026-10-19 18:53:13 +11:00
sam e955c45ba8 fix(egress): name the denied target when refusing a tunnel CONNECT (#1808) 2026-10-19 07:50:58 +00:00
sam 1ed8d4f543 fix(archiegateway): create the chat workspace before enabling its tools 2026-10-19 11:15:20 +11:00
sam 19e5dcd9d0 fix(gateway): chat acts as the control-plane operator and sees every task 2026-10-19 11:12:34 +11:00
sam caafdb266f feat(webui): scope cookies to the instance and show non-default instance names 2026-10-19 10:17:05 +11:00
sam 412d73e7e1 feat(install): install and update a named instance side by side 2026-10-19 10:16:49 +11:00
sam 76c0e4dd1b fix(container): scope agent containers, volumes and the egress relay to the instance 2026-10-19 10:15:47 +11:00
sam b8b223c87c feat(configuration): name the instance with ARCHIE_INSTANCE and scope default paths by it 2026-10-19 10:12:48 +11:00
sam 9d3ea208ef docs(news): regenerate release notes from the changelog 2026-10-19 10:05:23 +11:00
sam 5a55196572 docs: edit guides, PRDs and security notes, regenerate release news 2026-10-19 10:04:36 +11:00
sam 35e9d5d64e feat(ui): wrap the YAML editor at the pane or a set print width, with an appearance setting 2026-10-19 09:41:03 +11:00
sam b47f768076 feat(ui): scroll past the end of the YAML editor and history diff, with an appearance setting 2026-10-19 09:34:32 +11:00
sam 6630b0c9bf fix(ui): clear the chat on /new, show the copy action on hover, fold settings into the bar's menu 2026-10-19 09:01:44 +11:00
sam 1b2a8eec7c feat(chat): ask several questions in one interaction with ask_questions
A turn can pose a questionnaire (single and multiple choice, free text,
skippable) and read the answers back, rendered in the chat with the
shadcn-vue questionnaire. The gateway contract gains a questionnaire ask and a
can_question capability; answers travel as a JSON object keyed by question name
and are checked against the questions that were asked.
2026-10-19 03:30:47 +11:00
sam 31da6dc7c2 feat(ui): show a capture's changed files as a folder tree 2026-10-19 03:24:03 +11:00
sam d873cb5476 feat(ui): chat tool calls, approvals and suggestions on shadcn-vue's trace, item and button patterns 2026-10-19 03:19:07 +11:00
sam 5179bc81b7 fix(ui): anchor each question in the chat transcript and keep the live reply as the row its message takes 2026-10-19 03:13:12 +11:00
sam 26e3d2bff2 feat(ui): fade the chat's borders in when it opens and close it on an outside click 2026-10-19 03:09:57 +11:00
sam 61ee5fd3a7 feat(ui): dock the chat at the bottom of every page and keep a skeleton while a conversation loads 2026-10-19 03:01:12 +11:00
sam 0eecc95aac feat(ui): one chat panel on every page; the workflow editor syncs its draft around a turn
Replaces the separate Build with Archie bar and its per-workflow channel, so
every conversation belongs to the account and is listed on every device, and
the command palette is the same everywhere.
2026-10-19 02:56:23 +11:00
sam 3bb8f73c6a feat(ui): offer only conversation commands in the workflow editor's chat 2026-10-19 02:53:06 +11:00
sam 890361468d fix(ui): stop clipping the slash palette above the Build with Archie bar 2026-10-19 02:47:22 +11:00
sam 889856aa81 feat(ui): Build with Archie runs on the chat system, floats over the canvas and keeps its conversation
Each workflow has its own persisted conversation, rendered like the chat panel.
The canvas and YAML go read-only while Archie works instead of inert. The code
block highlighter loads Go and TOML and drops jsx, tsx and vue.
2026-10-19 02:43:54 +11:00
sam 63adbc71ef feat(ui): code blocks and chat messages from shadcn-vue's code-block, message and bubble 2026-10-19 02:22:42 +11:00
sam d876c150eb refactor(ui): one key/value list for a task's inputs, outputs and details, sized to its content 2026-10-19 02:10:46 +11:00
sam 3202386eaa feat(ui): list a task's inputs and outputs as separate sections of one card 2026-10-19 02:07:26 +11:00
sam eade816ee0 fix(webui): return an interrupted stage's cause and show it in a warning tone 2026-10-19 02:05:45 +11:00
sam f9861d3ea5 fix(ui): drop the duplicate start time from a task's stages 2026-10-19 01:59:47 +11:00
sam 580108dd7f fix(ui): frame the task page's attempts, stages, details and inputs, and fit the run tabs on a phone 2026-10-19 01:56:38 +11:00
sam 30105666e2 fix(ui): show a parked task's error once and wrap long log lines on a phone 2026-10-19 01:47:34 +11:00
sam 8d0d707d3e fix(postgres): repin parked and queued tasks that still name the root identity 2026-10-19 01:45:48 +11:00
sam c94a943854 fix(ui): improve keyboard access and add headed checks 2026-10-19 01:45:20 +11:00
sam 12685e264d fix(ui): show the agent's name, not its id, in a workflow's Runs as 2026-10-19 01:42:47 +11:00
sam 1e56219bbe fix(ui): label the default credential grants as Default, not Root identity 2026-10-19 01:39:27 +11:00
sam ab43c4e337 fix(archied): stop flagging embedding and transcription aliases as retired models 2026-10-19 01:07:39 +11:00
sam 02d4e162b8 fix(ui): fit phone workflows and allow dynamic handoffs 2026-10-19 01:04:32 +11:00
sam cc4f20ce30 fix(ui): align alert times in a right column and lift the body contrast 2026-10-19 01:02:38 +11:00
sam 10e1207242 fix(ui): date an alert from when it was first raised, not last re-checked 2026-10-19 01:01:19 +11:00
sam 24c3f7e857 feat(ui): show when each alert last fired 2026-10-19 00:43:23 +11:00
sam a76c54d1ac feat(e2e): list checks by default and run all explicitly 2026-10-19 00:38:17 +11:00
sam 9fea68815e fix(ui): one chat toolbar row, compact session actions menu, smaller bubble text 2026-10-19 00:32:56 +11:00
sam 9ff62f2cc4 fix(ui): section icons in the phone menu 2026-10-18 23:53:44 +11:00
sam 3f0fd7409d build(ui): regenerate dashboard 2026-10-18 23:50:32 +11:00
sam bb8f716abd fix(ui): put the workflow overflow menu at the end of the editor toolbar 2026-10-18 23:50:17 +11:00
sam 4201512912 fix(ui): end the switch otherwise edge at a marker in its own column 2026-10-18 23:50:09 +11:00
sam 409b5e6e54 fix(ui): draw no run state on the canvas for a run without a pinned definition 2026-10-18 23:50:03 +11:00
sam 490532643e fix(ui): hide the Runs tab for a never-published workflow 2026-10-18 23:49:55 +11:00
sam b6f4481038 fix(ui): drop the stray dot beside the end insert point 2026-10-18 23:49:50 +11:00
sam 227a991388 fix(ui): move workflow enable toggle into the editor toolbar, tie it to the published version 2026-10-18 23:49:41 +11:00
sam 18bb7b7dcb fix(ui): let the phone canvas fill the height reserved for the chat launcher 2026-10-18 23:49:35 +11:00
sam d40ba948e9 fix(ui): give the mobile workflow picker the header row, drop the duplicate Draft badge 2026-10-18 23:49:17 +11:00
sam 7f5fbe4135 fix(ui): show workflow validation errors on the failing step and link to it 2026-10-18 23:49:09 +11:00
sam 86d4066084 fix(ui): render watched-run actions secondary so Publish stays the toolbar primary 2026-10-18 23:48:58 +11:00
sam 912f5e99ff fix(ui): label run picker statuses with the shared status name 2026-10-18 23:48:47 +11:00
sam 1d4278c5d2 fix(ui): open draft change review only when there are changes 2026-10-18 23:48:42 +11:00
sam 3871b820d9 fix(ui): grey out disabled Publish and give the reason on hover 2026-10-18 23:48:42 +11:00
sam 18d36b00bc fix(ui): dismiss all alerts and show the full alert list 2026-10-18 23:48:42 +11:00
sam 5e62f8311f fix(ui): short run picker label that ellipsises 2026-10-18 23:48:42 +11:00
sam 8e0614436b fix(ui): open the workflow canvas at the top and keep the list within the viewport 2026-10-18 23:47:18 +11:00
sam 68b8e5d00a fix(ui): open validation errors from the indicator and link each to its step 2026-10-18 23:47:14 +11:00
sam a202c280d8 fix(ui): enable Publish only when the draft has changes 2026-10-18 23:47:01 +11:00
sam ff5cab992b fix(postgres): task alert body carries the truncated task title, not a restated title 2026-10-18 23:46:48 +11:00
sam 46f3c881ec fix(ui): fill the viewport instead of a rounded inset frame 2026-10-18 23:46:34 +11:00
sam a54fec0b43 fix(ui): titles on truncated step badge and trigger labels 2026-10-18 23:46:30 +11:00
sam f2a1aedbc2 fix(ui): workflow names in the sans face 2026-10-18 23:46:25 +11:00
sam fbe0742ef6 fix(ui): group run picker and run actions apart from workflow edit actions 2026-10-18 23:46:19 +11:00
sam a0524c0cf3 fix(ui): make the whole alert item open its link 2026-10-18 23:45:54 +11:00
sam bc7f4390b1 fix(ui): bound option select lists to the trigger side and ellipsise labels 2026-10-18 23:45:28 +11:00
sam e5520ae4e5 fix(ui): fade the hidden edges of horizontally scrolling tab rows 2026-10-18 23:45:28 +11:00
sam 06014f4a39 fix(ui): keep OIDC save in its card and make the redirect URI copyable 2026-10-18 23:45:27 +11:00
sam addd9b8f14 fix(ui): give every workflow row the same status line with a titled delivery bar 2026-10-18 23:45:27 +11:00
sam 0d78e26e8d fix(ui): mark the step failing validation on its canvas node 2026-10-18 23:45:27 +11:00
sam bc291255e8 fix(ui): move neighbouring columns aside when a step card opens 2026-10-18 23:45:27 +11:00
sam 5aba9b8707 fix(ui): drop stale alert loads so badge and list agree 2026-10-18 23:45:27 +11:00
sam 6c555adb79 fix(ui): give canvas zoom controls tooltips and larger hit targets 2026-10-18 23:45:27 +11:00
sam 3eca2ef5df fix(ui): step page, workspace, card and canvas surfaces apart 2026-10-18 23:45:26 +11:00
sam 491c1fa683 fix(ui): hide the chat launcher on the workflow page, where the Archie bar is the entry point 2026-10-18 23:45:26 +11:00
sam 4fe217ef0e fix(ui): dim the top bar under the section sheet 2026-10-18 23:45:26 +11:00
sam 872958127a fix(ui): label the no-run picker option as the current definition 2026-10-18 23:45:26 +11:00
sam 32735a2ab1 fix(ui): rename a step to a valid step id 2026-10-18 23:45:26 +11:00
sam f300b96251 fix(ui): anchor the alerts badge beside the bell instead of over it 2026-10-18 23:45:26 +11:00
sam b1d38bb7b7 fix(ui): put the new workflow button on the workflow list 2026-10-18 23:45:26 +11:00
sam 0af9ac496e fix(ui): mark each trigger on the start node with its kind 2026-10-18 23:45:25 +11:00
sam fd30a24079 fix(ui): product logo heads the phone section sheet 2026-10-18 23:45:25 +11:00
sam 0749f45054 fix(ui): outline the workflow toolbar overflow button to match Test and Run 2026-10-18 23:45:25 +11:00
sam 168ddde0dd fix(ui): align branch lane ends and route the unmatched switch path down its own lane 2026-10-18 23:45:25 +11:00
sam 0d6d5e7dd3 fix(ui): one name for the workflow chat bar 2026-10-18 23:45:25 +11:00
sam 27c70d8e24 fix(ui): style notification group labels as panel headings 2026-10-18 23:45:25 +11:00
sam 0275e9e75f fix(ui): one insert chip per earlier step, inserting its summary 2026-10-18 23:45:24 +11:00
sam c618b30013 fix(ui): size the alerts panel to the phone viewport 2026-10-18 23:45:24 +11:00
sam cbb2e823da fix(ui): select the next workflow after deleting one 2026-10-18 23:43:24 +11:00
sam 113da1cd4b docs: the production-readiness goal until 1 December 2026-10-18 23:05:28 +11:00
sam a9ae4ab3f1 docs: forge is one of many inputs or outputs; drop the expired temporary note 2026-10-18 22:57:18 +11:00
sam 3be983c650 docs: a forge is an event source and output destination, not core 2026-10-18 22:55:22 +11:00
sam 7b680f8ac6 fix(ui): icon-only run button matches the 32px icon size 2026-10-18 22:52:19 +11:00
sam b6057a0a11 build(ui): regenerate dashboard 2026-10-18 22:42:51 +11:00
sam 3bebdb2af7 fix(ui): keep the workflows toolbar readable on the 36px ladder
The run selector is the only control that gives up width, and beside the
workflow list it had none left: Open and the run's version move into the one
menu at every width, so the picked run stays readable from 390 to 1440.

Step editor and binding fields take the next rung (h-8) so they match the
selects and switches they sit beside.
2026-10-18 22:42:14 +11:00
sam dd80fcb337 build(ui): regenerate dashboard 2026-10-18 22:29:59 +11:00
sam 2b523fe7e0 fix(ui): burger section sheet at phone width, 36px control scale
The coarse-pointer rule gave every button, link and field a 44px minimum on
touch, which made the phone dashboard look like a toy and pushed the section
strip into overlapping its neighbours. Controls now keep their own size, and
the shared ladder is one step taller (default 36px, sm 32px) so a finger still
hits something. Inputs stay 16px only where iOS would zoom.

Below md the sections move into a sheet with the current page marked; the bar
keeps brand, search, alerts and the operator. Page titles drop to 18px so the
title and its action sit on one centred line.
2026-10-18 22:29:25 +11:00
sam 39e33e75a3 fix(ui): one workflows toolbar row, one menu, no repeat step type
The step editor's More disclosure no longer fills when open, so only the
chevron moves. A step card keeps its type chip only when its title does not
already say it.

The editor header is one toolbar at every width: view tabs left, the run
selector and actions right, and a single menu holding the sections that do
not fit, the run's own actions and the draft's change list. Publish is the
one primary action. Restore replaces Discard draft and the per-workflow
Restore default, which settings owns.

The page header no longer wraps, and run rows on a phone no longer squeeze
the run title.
2026-10-18 22:29:25 +11:00
sam 991b40047a fix(ui): Instructions replaces SOUL in routes and agent pages; terse alerts; missing-key hint 2026-10-18 19:27:11 +11:00
sam 39e44e9da9 build(ui): regenerate dashboard 2026-10-18 15:55:08 +11:00
sam 499898a4fc fix(ui): distinguish loading, failed and empty lists, one role label set, en dash for no value 2026-10-18 15:54:31 +11:00
sam de7571f91e fix(ui): keep the chat launcher and Archie bar clear of controls and the canvas
Reserve bottom space for the floating launcher at phone width, drop the
duplicate provider class and the setup guidance sentence, give the source
and model rows room to size, place the Archie bar below the canvas, use the
shared Empty on the not-found page, and let the org overview list titles.
2026-10-18 15:54:31 +11:00
sam fd8d2c1941 fix(ui): one text colour scale, Empty for page empty states, token requests through api 2026-10-18 15:03:44 +11:00
sam e953fc8891 fix(ui): trim workflow and log captions, select components for event binding 2026-10-18 15:02:00 +11:00
sam b9d28418e8 fix(ui): tighten tasks page prose and phone layout 2026-10-18 15:02:00 +11:00
sam 3f46d2ec33 fix(ui): trim settings prose, inline switches, wrap narrow add forms 2026-10-18 15:02:00 +11:00
sam 81f1be388e fix(ui): trim view captions and empty-state copy in org, accounts, curators and skills
Drop captions that restated headings, cut the duplicate Policies card title,
use the Select component for account roles, let org agent actions wrap on
phone width, and use em-free placeholders.
2026-10-18 15:02:00 +11:00
sam 4b921227c5 fix(ui): trim view prose, en dash placeholders, collapse fixed grids on phones
Drop empty-state essays that repeated their titles, the harness native select
becomes the Select component, and the binding and source forms collapse to one
column below sm. Issue-ID and history narration removed from comments.
2026-10-18 15:02:00 +11:00
sam c0bd7bb6a3 fix(ui): drop history narration and em dashes from chat and dashboard comments 2026-10-18 15:02:00 +11:00
sam 0cec2ec16d docs(ui): record the presentation rules 2026-10-18 14:57:50 +11:00
sam 7120cf52a2 fix(ui): check step names drop the repeated gate 2026-10-18 13:20:52 +11:00
sam cc9151425f fix(ui): plus-only new workflow; restore default workflows moves to task settings 2026-10-18 13:18:21 +11:00
sam c744928e07 fix(ui): the workflow switch needs no Enabled label 2026-10-18 13:15:53 +11:00
sam 6529613496 fix(ui): drop the log and change-file status captions 2026-10-18 13:14:52 +11:00
sam 010c8b28dd docs(ui): no captions that describe the view 2026-10-18 13:10:26 +11:00
sam 198702010f fix(ui): drop captions that only describe the view 2026-10-18 13:09:55 +11:00
sam ffffaa9fe6 fix(ui): put the Archie bar under the canvas on phones so it cannot cover a step 2026-10-18 13:04:43 +11:00
sam 90b7d28627 fix(ui): pick the workflow and the revision from a select on narrow screens
The workflow list scrolled sideways off a phone screen and the history grid
pushed the diff off it. Below lg the list becomes a header select with the
draft badge; below md the revision list becomes a select above a full-width
diff, with the two canvases stacked.
2026-10-18 12:32:32 +11:00
sam d8b4e04861 fix(ui): keep the YAML gutter aligned on phones and fit the editor to a phone viewport
The gutter printed one number per source line while the text layer wrapped,
so every line after a long one was numbered wrong. The textarea no longer
wraps: the gutter, the highlight layer and the textarea share one row per
line and scroll together on both axes.

Below md the section tabs that do not fit collapse into one menu that sets
the same tab, and the actions share one right-aligned row. The canvas is
sized to the viewport left on a phone, frames a graph or card wider than the
canvas instead of clipping its edges, and clears the chat launcher.
2026-10-18 12:32:21 +11:00
sam 8c1756d312 fix(ui): scale touch targets to the pointer, not the window width
A coarse-pointer-only floor keeps switches, tab triggers and scrolled nav
strips from being deformed on a phone, and the topbar reveals the current
section after a route change.
2026-10-18 12:32:10 +11:00
sam 5989f0b45f fix(ui): finish an Archie turn across tab switches and name map entries in the settings review 2026-10-18 02:52:49 +11:00
sam 846626fabf feat(gateway): read instructions and access policies from the workflow tools
settings_get now reads three more kinds:
- soul, the instruction text layered into a workflow run;
- task-policy, the diff cap and alert delivery settings;
- org-model-policy, which models an org may use.

None of them holds a secret value: task-policy's notify_secret and the
secrets elsewhere in the readable kinds are SecretRef references (engine and
key), never the resolved value.

access_policies_list is new: the caller org's Cedar policies (id, level,
scope, text), and the instance policies when the caller owns the instance,
which is what the dashboard lists for the same read. It is guarded as
access.ActionRead on access.KindPolicy, the check the dashboard makes.
IntegrationSource gained Policies, implemented over the State Store's
ListPolicies.

workflow_get now says how its instructions field layers: after the
instance's and the organisation's, before the repository's.
2026-10-18 02:39:25 +11:00
sam 7768fa808d fix(gateway): workflow and integration tools ask the access policies as their caller 2026-10-18 02:35:59 +11:00
sam 39c3c47ea2 feat(gateway): workflow and integration tools for chat and Kit harnesses alike 2026-10-18 02:32:30 +11:00
sam f5770fdc6e fix(workflows): lock the editor while Archie writes the draft 2026-10-18 02:29:12 +11:00
sam b4595bf8bb feat(workflows): iterate on a workflow's draft with Archie from the canvas 2026-10-18 02:27:41 +11:00
sam 8e3711b73c feat(workflows): edits save as a draft and reach the running workflow only on publish 2026-10-18 02:21:54 +11:00
sam 55deeaa88c feat(ui): revert single changes in settings and workflow review 2026-10-18 02:18:23 +11:00
sam f10199f0b6 feat(ui): workflow canvas cards expand in place instead of side panels 2026-10-18 01:59:09 +11:00
sam eb6aaca1f5 feat(credentials): grant credential services to dashboard identities, chosen from pickers 2026-10-18 00:43:31 +11:00
sam 9167c861d6 fix(postgres): run stored workflows that name the root identity as the seeded agent 2026-10-18 00:29:14 +11:00
sam 2d1bbb6e6a feat(tasks): a work request's description is optional 2026-10-18 00:24:42 +11:00
sam d82e316f9b fix(ui): keep a numeric workflow input as text so the run form does not crash 2026-10-18 00:08:41 +11:00
sam 33f5290015 feat(instructions): layer instance, organisation, workflow and repository instructions into every agent stage 2026-10-17 23:42:39 +11:00
sam aa1e2ca660 feat(kit): central tools for harnesses through the egress proxy and gateway task-tool RPCs 2026-10-17 23:42:37 +11:00
sam 86600c3884 build(ui): commit the dist assets the accordion and connection fixes changed 2026-10-17 23:16:22 +11:00
sam c6c7a44c5b fix(ui): show a connection's saved forge and identities; selection data lives in the stores 2026-10-17 23:05:14 +11:00
sam 0652ded616 fix(ui): let accordion content overflow sideways so row tints keep their margin 2026-10-17 23:02:31 +11:00
sam 2d3b6d0d87 fix(ui): pad tinted setting rows so the tint is not clipped 2026-10-17 22:58:58 +11:00
sam b25263308b feat(repos): access check reports the operations the agent can perform 2026-10-17 22:58:01 +11:00
sam 1410fbc565 fix(ui): drop redundant connection labels and hints 2026-10-17 22:26:31 +11:00
sam c72c443090 feat(ui): choose a connection's permitted identities from the identity list 2026-10-17 22:07:27 +11:00
sam 6f29790b76 feat(ui): choose a connection's forge type from the enabled forge extensions 2026-10-17 22:06:13 +11:00
sam d936609188 build(taskfile): rebuild binaries when embedded files change 2026-10-17 21:56:25 +11:00
sam 8aa59bdb51 fix(postgres): allow the agent org upgrade phase 2026-10-17 21:55:42 +11:00
sam f0eee80ab7 fix(staterpc): derive harness secret org from caller grants 2026-10-17 21:44:08 +11:00
sam 7f9486fff1 refactor(servicekit): stop linking the State Store and control plane into archie-messaging 2026-10-17 17:22:53 +11:00
sam e9f45eeb8b feat(ui): default the workflow's run-as identity to the seeded agent 2026-10-17 17:21:58 +11:00
sam 127e5e70a0 build(taskfile): drop unused tasks and share the dev State Store wait 2026-10-17 17:21:10 +11:00
sam 334787c140 fix(install): name the required Go version when its toolchain is unavailable 2026-10-17 17:19:08 +11:00
sam 2cdf3b2c85 build(dev): serve the dev State Store over TLS on the Docker bridge so task containers reach it 2026-10-17 17:19:08 +11:00
sam bf14695eab feat(workflow): pr-review submits REQUEST_CHANGES on blocking findings and lists unanchored ones in the review body 2026-10-17 17:17:48 +11:00
sam a4da914994 fix(identity): emit RFC 4122 shaped stable IDs and migrate stored ones 2026-10-17 17:16:20 +11:00
sam fefbe19011 fix(archiemessaging): announce READY after channels bind; run notifying units as Type=notify 2026-10-17 17:15:34 +11:00
sam a2ade2ee42 fix(config): treat a [[curators]] entry without enabled as on 2026-10-17 17:15:34 +11:00
sam 2e7158a760 fix(workflow): remove the pr-review snapshot when any phase ends the run 2026-10-17 17:14:31 +11:00
sam 1cd0ed22f5 refactor(curator): rename SessionSummary to SessionRef 2026-10-17 17:12:52 +11:00
sam db982f2d93 refactor(workflow): drop the root identity alias from workflow definitions 2026-10-17 17:09:37 +11:00
sam 44a10943c3 feat(webui): link parked tasks to the page that fixes their blocker 2026-10-17 17:08:24 +11:00
sam 055e0250bd feat(identity): seed a narrow agent identity and run shipped workflows as it 2026-10-17 17:04:43 +11:00
sam 48dc39a3d5 fix(ui): 44px touch targets on narrow and coarse-pointer viewports 2026-10-17 17:01:27 +11:00
sam f45ea9e0aa feat(workflow): configure review precision and approval on the review.pr step 2026-10-17 17:00:55 +11:00
sam ab16bc673d fix(releaseupdate): run the release's watchdog and bound control-plane calls 2026-10-17 17:00:04 +11:00
sam 7b504f9ed6 refactor(archied): discover issues through organisation connections 2026-10-17 13:38:46 +11:00
sam 9d7287c647 feat(taskactions): retry a parked task on the current workflow definition 2026-10-17 13:35:12 +11:00
sam c80d4750a8 feat(archied): dispatch every organisation's schedules 2026-10-17 10:19:32 +11:00
sam e579b908f3 chore(postgres): delete unused queries 2026-10-17 10:17:14 +11:00
sam 01acb97f96 chore: delete code no binary or test reaches 2026-10-17 10:14:26 +11:00
sam 7986ccb3f7 fix(workflow): clip park details within the store cap and share the diff-rule blocking level 2026-10-17 10:11:07 +11:00
sam e452451926 fix(ui): state credential and connection status without internal service names 2026-10-17 10:10:03 +11:00
sam 9b7e7fc221 refactor(postgres): split lifecycle exit side effects out of Apply 2026-10-17 10:10:02 +11:00
sam 42ba637935 fix(postgres): keep every organisation an active owner 2026-10-17 10:07:45 +11:00
sam 6aced84146 fix(daemon): open model egress only for workflows with a model step 2026-10-17 10:03:12 +11:00
sam 05987f04e2 feat(daemon): execute and verify organisation repository connections 2026-10-17 09:32:39 +11:00
sam 32642af4a9 feat(ui): give organisation, instance and account clear homes
The Access area mixed organisation, instance and personal settings under
one name. Split them: /org is the organisation's own area (members,
identities, connections, models, schedules, playbooks), /settings is
instance administration only, and personal security stays in the account
menu. Setup checklist steps now link to the page that fixes them.
2026-10-17 09:01:41 +11:00
sam 62ee8a0381 fix(controlplane): name a migrated connection for its host
The seeded root connection was called "Instance forge", which names two
archie concepts an operator never chose. Name it for the host it points at
instead.
2026-10-17 08:59:57 +11:00
sam 30216dd367 fix(e2e): build stack with release metadata 2026-10-17 08:47:05 +11:00
sam cbc4cf309d fix(webui): bind task requester to authenticated principal 2026-10-17 08:42:08 +11:00
sam 4217a50874 fix(ui): connections copy states the field, not the model
Drop the sentence explaining that the credential is a reference and that an
identity with no entry is not granted: both lectured at the operator instead of
labelling the field. The external account needs no hint, the forge type keeps
one line saying where the value comes from, and the identity button reads the
way the credential-grants control already does.
2026-10-17 03:25:30 +11:00
sam a8a27eb4a4 fix(ui): clarify connection permission guidance 2026-10-17 03:24:20 +11:00
sam 8410271fdb feat(ui): configure forge connections in the dashboard
A Connections page under Settings lists the organisation's forge connections:
host, forge type, the reference to the credential (never its value), the
external account it belongs to, and the operations each execution identity may
perform through it. The chat agent's page registry names the page too.
2026-10-17 03:20:17 +11:00
sam fe97e92dd2 fix(daemon): execute dashboard identities with scoped authority 2026-10-17 03:13:30 +11:00
sam 9ab0121af0 feat(archied): a rotated connection reaches the next operation
The connections kind joins the live resource watches. On a new revision
archied re-resolves the instance forge from the settings it just published and
replaces every holder of the client: the boot forge, the worktree token, the
daemon's root forge and the root task RPC servers, which are now returned from
registration so a task that is already connected asks the new credential
rather than the one the process booted with.

This commit also carries the execution-identity agent's concurrent edits to
these three files, which the shared working tree had not committed yet.
2026-10-17 03:09:43 +11:00
sam 6132c12835 feat(controlplane): the instance forge is its root connection
Layering reads forge-connections and takes the root connection for the
instance's own forge, keeping the file's webhook intake and secret, which are
instance infrastructure rather than an account. A document with no root
connection disables the forge instead of falling back to a credential the
operator may have withdrawn.
2026-10-17 03:07:09 +11:00
sam cb48a27d16 feat(controlplane): organisation forge connections
A connection is an organisation's own resource: the forge host, the
credential reference and the external account it belongs to. It records a
reference, never a token value, and names per execution identity the
operations that identity may perform through it.

The file's [forge] sections seed it: the root's becomes the root connection
and each identity's own forge becomes a connection only that identity may
use, so the migration keeps exactly the grants the file expressed.
2026-10-17 03:05:01 +11:00
sam 3953a3a06c refactor(ui): move personal tokens and instance authentication out of Access
Personal API tokens are the signed-in operator's, and the instance URL and
OIDC providers are the instance's, so neither belongs under the organisation
Access area. Tokens render in the account page and Authentication moves to
Settings; the old paths redirect.
2026-10-17 02:41:24 +11:00
sam 139338cf34 docs(prompts): define organisation automation handoff 2026-10-17 02:25:32 +11:00
sam 41cd938748 fix(ui): repair settings editing and workflow diagnostics 2026-10-16 23:55:58 +11:00
sam 3229de9b3b fix(e2e): recover reliable local stack startup 2026-10-16 22:25:49 +11:00
sam dcc201e7bb fix(tasks): limit titles and display descriptions 2026-10-16 21:50:13 +11:00
sam 1b8abd3509 chore(release): v1.55.0
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
2026-10-16 03:57:48 +11:00
sam 7ebf842c5c feat(agent): frame the default SOUL around event-driven automation 2026-10-16 03:57:08 +11:00
sam 74699fcd21 refactor: remove personas
Personas were a misread requirement: SOUL is the chat identity and
identities are per action. The selected persona's prompt never reached the
model. Drops the resource, /personality, the chat selector, the settings
page and ChatService.SetPersona, and deletes stored persona documents.
2026-10-16 03:57:08 +11:00
2008 changed files with 162742 additions and 85538 deletions

No files matched your search

-89
View File
@@ -1,89 +0,0 @@
# Dolt database (managed by Dolt, not git)
dolt/
embeddeddolt/
proxieddb/
# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
.exclusive-lock
# Daemon runtime (lock, log, pid)
daemon.*
# Push state (runtime, per-machine)
push-state.json
# Lock files (various runtime locks)
*.lock
# Credential key (encryption key for federation peer auth — never commit)
.beads-credential-key
# Local version tracking (prevents upgrade notification spam after git ops)
.local_version
proxied_server_client_info.json
# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect
# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock
# Workspace operation gate (internal/workspacegate): physical-root gate
# files live beside the guarded root inside .beads (e.g. dolt.gate.lock)
*.gate.lock*
export-state/
export-state.json
last_pull
# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm
# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity
# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml)
dolt-pprof/
# Corrupt backup directories (created by bd doctor --fix recovery)
*.corrupt.backup/
# issues.jsonl is deliberately TRACKED (see export.git-add in config.yaml).
# Dolt remains the authoritative store and GitHub the external issue surface;
# the tracked export exists so issue state is readable and recoverable from a
# plain git clone, without a Dolt server. Removing it from this file is what
# tracks it -- do NOT add a "!issues.jsonl" negation, which would override the
# fork protection in .git/info/exclude (see the note at the end of this file).
#
# Backups stay local: they are point-in-time copies of the same data.
backup/
# Per-project environment file (Dolt connection config, GH#2520)
.env
# Legacy files (from pre-Dolt versions)
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.
# config.yaml
-85
View File
@@ -1,85 +0,0 @@
# Beads - AI-Native Issue Tracking
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
## What is Beads?
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
## Quick Start
### Essential Commands
```bash
# Create new issues
bd create "Add user authentication"
# View all issues
bd list
# View issue details
bd show <issue-id>
# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done
# Sync with Dolt remote
bd dolt push
```
### Working with Issues
Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Sync-ready**: Uses Dolt remotes for backup and team sharing
## Why Beads?
✨ **AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs
🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way
🔧 **Git Integration**
- Dolt-native sync via bd dolt push / bd dolt pull
- Branch-aware issue tracking
- Dolt-native three-way merge resolution
## Get Started with Beads
Try Beads in your own projects:
```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
# Initialize in your repo
bd init
# Create your first issue
bd create "Try out Beads"
```
## Learn More
- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
---
_Beads: Issue tracking that moves at the speed of thought_ ⚡
-82
View File
@@ -1,82 +0,0 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags
# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
# issue-prefix: ""
# Use no-db mode: JSONL-only, no Dolt database
# When true, .beads/issues.jsonl is the only local store
# no-db: false
# Enable JSON output by default
# json: false
# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255
# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
# actor: ""
# Optional JSONL sidecar for explicit agent/tool interaction audit records.
# Issue history is always recorded in the database and is visible with
# bd history <id> --events; this only controls .beads/interactions.jsonl.
# audit:
# enabled: false
# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false
# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo
# Dolt-native backup (periodic backup for off-machine recovery)
# This is full database backup only. Cross-machine sync uses Dolt remotes.
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-backups
# git-push: false # Disable git push (backup locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)
# Optional JSONL auto-export for viewers, interchange, and issue-level migration.
# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl.
# Use relative paths under .beads/ for JSONL import/export filenames.
export:
auto: false
path: issues.jsonl
interval: 60s
# issues.jsonl/interactions.jsonl are .gitignore'd local-only files --
# Dolt (synced via sync.remote) is the source of truth. Leave auto off
# and git-add off; do not re-track these in git.
git-add: false
import:
path: issues.jsonl
# Integration settings (access with 'bd config get/set')
# Non-secret keys (stored in the database):
# - jira.url, jira.project
# - linear.team_id
# - github.org, github.repo
#
# Secret keys (stored in this file but prefer env vars to avoid git exposure):
# - linear.api_key → use LINEAR_API_KEY env var instead
# - github.token → use GITHUB_TOKEN env var instead
sync.remote: "git+https://github.com/samcharles93/archie-core.git"
dolt:
shared-server: false
auto-commit: "on"
audit:
enabled: true
agent:
profile: team-maintainer
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-checkout "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'post-checkout' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run post-checkout "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.2.2 ---
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run post-merge "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'post-merge' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run post-merge "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.2.2 ---
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-commit "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'pre-commit' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run pre-commit "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.2.2 ---
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run pre-push "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'pre-push' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run pre-push "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.2.2 ---
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env sh
# --- BEGIN BEADS INTEGRATION v1.2.2 ---
# This section is managed by beads. Do not remove these markers.
if command -v bd >/dev/null 2>&1; then
export BD_GIT_HOOK=1
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
_bd_used_perl=0
if command -v timeout >/dev/null 2>&1; then
timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
elif command -v gtimeout >/dev/null 2>&1; then
gtimeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
elif command -v perl >/dev/null 2>&1; then
_bd_used_perl=1
perl -e 'alarm shift; exec @ARGV' "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
else
echo >&2 "beads: hook 'prepare-commit-msg' running without timeout; install coreutils or perl to enable BEADS_HOOK_TIMEOUT"
bd hooks run prepare-commit-msg "$@"
_bd_exit=$?
fi
if [ $_bd_exit -eq 124 ] || { [ $_bd_used_perl -eq 1 ] && [ $_bd_exit -eq 142 ]; }; then
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
_bd_exit=0
fi
if [ $_bd_exit -eq 3 ]; then
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
_bd_exit=0
fi
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
fi
# --- END BEADS INTEGRATION v1.2.2 ---
-8
View File
@@ -1,8 +0,0 @@
{
"database": "dolt",
"backend": "dolt",
"dolt_mode": "embedded",
"dolt_database": "archie_core",
"project_id": "e8a66150-1f5f-42d2-8653-dcf8463cef74",
"last_bd_version": "1.2.2"
}
+6 -1
View File
@@ -10,7 +10,12 @@
bin/
dist/
docs/
node_modules/
tmp/
.playwright-mcp/
# A trailing-slash pattern matches only the context root, so this is written to
# match a node_modules at any depth: ui/node_modules alone is 200MB and the
# agent image compiles Go, which needs none of it.
**/node_modules/
# Stray host-built binaries committed at the repo root.
/archied
+134 -317
View File
@@ -1,27 +1,11 @@
# Builds and pushes the archied and archie-agent images to GHCR on every
# merge to main. Mirrors .gitea/workflows/deploy.yml, which remains the
# production build path against git.catlow.cloud until that's cut over.
name: deploy
on:
push:
branches: [main]
tags: ["archied/v*", "archie/v*", "v*"]
tags: ["v*"]
# Rapid successive pushes to main (a release commit right after its
# preceding fix, say) previously queued a full gate+build for each one,
# several minutes apiece, with no caching -- so a burst of pushes left
# three deploys racing in parallel for the same runner capacity. Only the
# last one's images matter (each job pushes its image tags), so cancel a
# superseded run rather than let it fight for resources it can't use.
#
# Keyed on the commit, not github.ref: a release push lands main and its
# tag in one go, both pointing at the same commit -- on.push matches
# branches and tags both, so a single release push otherwise fires
# redundant builds of identical content that a ref-keyed group can't see
# as the same work.
concurrency:
group: deploy-${{ github.sha }}
group: deploy-${{ github.ref }}
cancel-in-progress: true
permissions:
@@ -29,40 +13,44 @@ permissions:
packages: write
jobs:
gate:
plan:
runs-on: self-hosted
outputs:
archied_version: ${{ steps.release_tag.outputs.archied_version }}
sha: ${{ steps.release_tag.outputs.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- name: Resolve the release
id: release_tag
run: |
echo "archied_version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
echo "sha=$(git rev-parse "${GITHUB_REF}^{commit}")" >> "$GITHUB_OUTPUT"
gate:
needs: plan
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
# Read the release from the commit, not from github.ref. One release
# push carries main and both tags at the same SHA, and only one of
# those refs survives the concurrency group, so a ref-derived version
# is whatever won the race. The tag at HEAD is the same either way.
- name: Resolve archied tag at HEAD
id: release_tag
run: |
version="$(git tag --points-at HEAD --list 'archied/v*' --list 'v*' | sed -e 's|^archied/v||' -e 's|^v||' | sort -V | tail -1)"
echo "archied_version=$version" >> "$GITHUB_OUTPUT"
if [ -n "$version" ]; then
echo "archied release at HEAD: $version"
else
echo "no release tag at HEAD; distribution zip will be skipped"
fi
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version-file: go.mod
cache: false
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1
with:
package_json_file: ui/package.json
- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "22"
node-version: "24"
- name: Install quality tools
run: |
@@ -79,292 +67,127 @@ jobs:
git branch main origin/main
fi
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
- name: Verify unprivileged user namespaces
run: unshare --user --map-root-user --net true
# Extensions run in an unprivileged user and network namespace, which
# Ubuntu 24.04 runners forbid through AppArmor by default.
- name: Allow unprivileged user namespaces
run: |
if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
unshare --user --map-root-user --net true
# The gate's uncached `go test ./...` runs the Docker-backed tests that
# -short skips, and those start a container from alpine:3. A fresh runner
# has no such image, so the suite failed on "No such image: alpine:3".
- name: Pull test container images
run: docker pull alpine:3
- name: Quality gate
env:
RELEASE_VERSION: ${{ needs.plan.outputs.archied_version }}
run: |
# The formatter sequence has one owner: task fmt, which drives go fix
# to a fixpoint and then the configured lint formatters. This step
# used to inline its own single `go fix ./...`, which leaves the
# redundant loop-variable copy that copyloopvar rejects -- the hazard
# of archie-core-wwho, surfacing here as a spurious git-diff failure
# (archie-core-6kda).
task fmt
task check dist TEST_FLAGS=-count=1 VERSION="$RELEASE_VERSION"
git diff --exit-code
bash tools/proto.sh lint
bash tools/proto.sh check
go vet ./...
golangci-lint run ./...
go build ./...
go test ./... -count=1
- name: Vulnerability scan
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
go install golang.org/x/vuln/cmd/govulncheck@v1.9.0
govulncheck ./...
# The dashboard suite runs in CI too, or it only ever runs when
# someone remembers to; the Go steps above never touch it.
- name: Dashboard tests
run: |
npm ci --prefix ui || npm install --prefix ui
npm test --prefix ui
- name: Package the release binaries
# tar keeps the executable bit, which an uploaded artifact drops.
run: tar -cf release-binaries.tar dist
- name: Release tags must match changelogs
run: |
set -e
fail=0
for tag in $(git tag --points-at HEAD); do
case "$tag" in
v*)
ver="${tag#v}"
echo " release tag $tag -> looking for [$ver] in CHANGELOG.md"
grep -q "^## \\[$ver\\]" CHANGELOG.md || {
echo " FAIL: CHANGELOG.md has no [$ver] section"
fail=1
}
;;
archied/v* | archie/v*)
# Legacy per-component tags. History is not re-tagged, and the
# merged CHANGELOG.md carries every component's versions, so the
# section is found there rather than in a component file.
ver="${tag#*/v}"
echo " legacy tag $tag -> looking for [$ver] in CHANGELOG.md"
grep -q "^## \\[$ver\\]" CHANGELOG.md || {
echo " FAIL: CHANGELOG.md has no [$ver] section"
fail=1
}
;;
esac
done
if [ $fail -ne 0 ]; then
echo
echo "A release tag points at this commit but its changelog does not"
echo "describe that version. Run: task release:prepare VERSION=<ver>"
echo "edit the generated notes, then: task release VERSION=<ver>"
exit 1
fi
if ! git tag --points-at HEAD | grep -qE '^(v[0-9]|archied/v|archie/v)' ; then
echo "This commit is not a release, so the images are published as :edge and sha-<sha>; :latest keeps naming the newest release."
fi
- name: Upload the release binaries
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: release-binaries
path: release-binaries.tar
if-no-files-found: error
retention-days: 1
archied-image:
needs: gate
needs: [plan, gate]
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Deliberately 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 — so it names something
# that cannot be checked out. `archied/v1.36.0` is an instance: it points at
# 6720bc42 (a tag object) and dereferences to commit c25f8d39. The producer
# is right to create annotated tags; the consumer stops guessing.
- name: Resolve the commit this ref points at
id: commit
run: |
sha="$(git rev-parse "${GITHUB_REF}^{commit}")"
echo "sha=$sha" >> "$GITHUB_OUTPUT"
echo "short=${sha:0:12}" >> "$GITHUB_OUTPUT"
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
with:
# One named builder that is never removed, so the Dockerfiles' cache
# mounts are still there on the next run. Removing it at the end of
# a job would take it from under another run that is building.
name: archie-ci
cleanup: false
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Resolve component versions
id: versions
run: |
GATEWAY_TAG="$(git tag --points-at HEAD --list 'archied/v*' | sort -V | tail -1)"
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
# One release stream: a `v*` tag covers the whole release, so it names
# both components' versions. Legacy per-component tags still win where
# they exist, because history is not re-tagged.
RELEASE_TAG="$(git tag --points-at HEAD --list 'v*' | sort -V | tail -1)"
GATEWAY_VERSION="${GATEWAY_TAG#archied/}"
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION="${RELEASE_TAG#v}"
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="${RELEASE_TAG#v}"
# `dev+<sha>` is what a build that is NOT a release reports, and it is
# honest now that such a build no longer publishes :latest: the version
# names the commit it came from, and the sha-<sha> tag makes it
# restorable. Before, this same string reached :latest minutes after a
# release and made the release's own stamping read as dev
# (archie-core-i5nb). (On an untagged push GITHUB_SHA IS the commit —
# the tag case is handled by the dereference above.)
[ -n "$GATEWAY_VERSION" ] || GATEWAY_VERSION="dev+${GITHUB_SHA:0:12}"
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="dev+${GITHUB_SHA:0:12}"
# Keep the raw tag presence separate from the version fallback: a
# LEGACY gateway-only release (archied/v* and no archie/v*) must not
# rebuild the runtime image as dev. A one-stream `v*` release is not
# gateway-only -- one version covers the runtime too -- so it does
# rebuild it, and release_tag is what tells the two apart.
echo "gateway_tag=$GATEWAY_TAG" >> "$GITHUB_OUTPUT"
echo "runtime_tag=$RUNTIME_TAG" >> "$GITHUB_OUTPUT"
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
echo "gateway=$GATEWAY_VERSION" >> "$GITHUB_OUTPUT"
echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT"
# :latest names the newest RELEASE, so only a commit that IS one
# publishes it. A push to main publishes :edge (mutable, newest main)
# and sha-<sha> (immutable) instead. That is what stops a release's
# :latest stamping from being overwritten minutes later by the next
# ordinary commit, which left a host reporting dev and made the update
# path unable to tell current from stale (archie-core-i5nb).
#
# `if` blocks rather than `[ -n "$X" ] && echo`: the latter returns
# non-zero when the test fails, and these steps run under `set -e`.
{
echo "archied_tags<<EOF"
if [ -n "$RELEASE_TAG" ]; then
echo "ghcr.io/samcharles93/archied:latest"
fi
echo "ghcr.io/samcharles93/archied:edge"
echo "ghcr.io/samcharles93/archied:sha-${{ steps.commit.outputs.sha }}"
echo "EOF"
} >> "$GITHUB_OUTPUT"
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
- name: Build and push archied
uses: docker/build-push-action@v6
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
with:
context: .
file: Dockerfile.archied
push: true
tags: ${{ steps.versions.outputs.archied_tags }}
tags: |
git.catlow.cloud/sam/archied:v${{ needs.plan.outputs.archied_version }}
git.catlow.cloud/sam/archied:sha-${{ needs.plan.outputs.sha }}
build-args: |
GATEWAY_VERSION=${{ steps.versions.outputs.gateway }}
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
GATEWAY_VERSION=${{ needs.plan.outputs.archied_version }}
RUNTIME_VERSION=${{ needs.plan.outputs.archied_version }}
cache-from: type=gha,scope=archied
cache-to: type=gha,mode=max,scope=archied
agent-image:
needs: [plan, gate]
outputs:
agent_digest: ${{ steps.agent.outputs.digest }}
needs: gate
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Annotated tags: dereference to the commit, as archied-image does.
- name: Resolve the commit this ref points at
id: commit
run: |
sha="$(git rev-parse "${GITHUB_REF}^{commit}")"
echo "sha=$sha" >> "$GITHUB_OUTPUT"
echo "short=${sha:0:12}" >> "$GITHUB_OUTPUT"
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
with:
# One named builder that is never removed, so the Dockerfiles' cache
# mounts are still there on the next run. Removing it at the end of
# a job would take it from under another run that is building.
name: archie-ci
cleanup: false
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Resolve runtime version
id: versions
run: |
RUNTIME_TAG="$(git tag --points-at HEAD --list 'archie/v*' | sort -V | tail -1)"
RELEASE_TAG="$(git tag --points-at HEAD --list 'v*' | sort -V | tail -1)"
RUNTIME_VERSION="${RUNTIME_TAG#archie/}"
[ -n "$RUNTIME_VERSION" ] || RUNTIME_VERSION="${RELEASE_TAG#v}"
echo "runtime_tag=$RUNTIME_TAG" >> "$GITHUB_OUTPUT"
echo "release_tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT"
echo "runtime=$RUNTIME_VERSION" >> "$GITHUB_OUTPUT"
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
- name: Build and push archie-agent
id: agent
if: steps.versions.outputs.runtime_tag != '' || steps.versions.outputs.release_tag != ''
uses: docker/build-push-action@v6
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/samcharles93/archie-agent:latest
ghcr.io/samcharles93/archie-agent:sha-${{ steps.commit.outputs.sha }}
git.catlow.cloud/sam/archie-agent:v${{ needs.plan.outputs.archied_version }}
git.catlow.cloud/sam/archie-agent:sha-${{ needs.plan.outputs.sha }}
build-args: |
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
RUNTIME_VERSION=${{ needs.plan.outputs.archied_version }}
cache-from: type=gha,scope=archie-agent
cache-to: type=gha,mode=max,scope=archie-agent
# Packages every host-run binary (archied, archie-gateway,
# archie-state-store, archie-ui, archie-messaging) as a
# linux/amd64 zip for a
# non-Docker install. It waits only for the agent image, whose digest
# release.json pins; archie-agent itself never ships as a host binary.
dist-zip:
needs: [gate, agent-image]
# Not gated on github.ref. A release is pushed as main plus both tags at
# one SHA, the concurrency group below collapses those into a single run,
# and the survivor is whichever ref happened to start last -- for
# v1.23.0 that was refs/heads/main, so this job was skipped and no zip
# was ever produced. Resolve the tag from the commit instead of trusting
# the ref that won the race, and skip only when there is genuinely no
# archied tag at HEAD.
if: needs.gate.outputs.archied_version != ''
needs: [plan, gate, archied-image, agent-image]
runs-on: self-hosted
# Least privilege: the workflow default is contents:read, and only this
# job needs to write, to create the Release and attach the zip to it.
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
go-version-file: go.mod
fetch-depth: 0
# The gate built these from the tree it checked; nothing is compiled here.
- name: Download the release binaries
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: release-binaries
- name: Unpack the release binaries
run: tar -xf release-binaries.tar
- name: Resolve archied version
id: version
run: echo "version=${{ needs.gate.outputs.archied_version }}" >> "$GITHUB_OUTPUT"
- name: Build linux/amd64 binaries
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: "0"
run: |
set -e
# Every process in the documented deployment ships in the zip, and
# every one of them carries the archied version it was cut from:
# they are one release, and an operator matching binaries by eye
# needs each to say so.
#
# That claim is load-bearing and this list is the whole of it: the
# v1.30.0 messaging extraction moved Telegram/email/webhook out of
# archied and nothing added archie-messaging here, so a host install
# ran on with a dead Telegram bot and no error anywhere
# (archie-core-1c01). TestDistZipShipsEveryHostCommand fails if this
# list and the copy list below stop matching the commands in cmd/.
ldflags="-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary -X github.com/samcharles93/archie-core/internal/buildinfo.Version=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${{ steps.version.outputs.version }}"
mkdir -p dist
for cmd in $(jq -r '.required_topology.units[]' release.json); do
go build -ldflags "$ldflags" -o "dist/$cmd" "./cmd/$cmd"
done
run: echo "version=${{ needs.plan.outputs.archied_version }}" >> "$GITHUB_OUTPUT"
- name: Assemble distribution zip
id: zip
@@ -372,75 +195,69 @@ jobs:
set -e
name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64"
mkdir -p "$name"
for cmd in $(jq -r '.required_topology.units[]' release.json); do
for cmd in $(jq -r '.required_topology.units[], .required_topology.binaries[]?' release.json); do
cp "dist/$cmd" "$name/"
done
cp deployments/INSTRUCTIONS.md CHANGELOG.md "$name/"
cp deployments/INSTRUCTIONS.md "$name/"
digest='${{ needs.agent-image.outputs.agent_digest }}'
test -n "$digest"
jq --arg image "ghcr.io/samcharles93/archie-agent@$digest" '. + {agent_image: $image}' release.json > "$name/release.json"
# README.md doesn't exist yet in this repo; include it once it does
# rather than fail the release on its absence.
jq --arg image "git.catlow.cloud/sam/archie-agent@$digest" '. + {agent_image: $image}' release.json > "$name/release.json"
[ -f README.md ] && cp README.md "$name/"
zip -r "$name.zip" "$name"
sha256sum "$name.zip" > SHA256SUMS
echo "name=$name" >> "$GITHUB_OUTPUT"
- name: Upload distribution zip
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: ${{ steps.zip.outputs.name }}
path: |
${{ steps.zip.outputs.name }}.zip
SHA256SUMS
path: ${{ steps.zip.outputs.name }}.zip
retention-days: 90
# A Release is what an operator can actually download from; the
# artifact above is reachable only from the run's page, behind an
# Actions login, and expires after 90 days. Until this step existed the
# zip was produced and then stranded -- the only Release on this repo
# (archied/v1.22.0) was created by hand and carries no asset at all.
#
# Attached to the release's v* tag, or the archied tag for a release
# cut before the single release stream.
# --generate-notes is deliberately not used: the changelog section is
# the release's own reviewed prose, and the tag/changelog gate above
# already guarantees it describes this version.
- name: Publish GitHub Release with the distribution zip
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
- name: Publish the signed release
env:
# GITHUB_TOKEN cannot write to another repository.
GH_TOKEN: ${{ secrets.RELEASES_TOKEN }}
ARCHIE_RELEASE_SEED: ${{ secrets.RELEASE_SIGNING_KEY }}
run: |
set -e
version="${{ steps.version.outputs.version }}"
prerelease=false
case "$version" in *-*) prerelease=true ;; esac
./dist/archied release publish -source git.catlow.cloud/sam/archie \
-version "$version" -prerelease="$prerelease" \
-zip "${{ steps.zip.outputs.name }}.zip" \
-agent-image "git.catlow.cloud/sam/archie-agent@${{ needs.agent-image.outputs.agent_digest }}" \
-changelog "https://git.catlow.cloud/sam/archie/releases/tag/v$version"
- name: Publish the Gitea release notes
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
set -e
tag="v${{ steps.version.outputs.version }}"
if ! git ls-remote --exit-code --tags origin "refs/tags/$tag" >/dev/null; then
tag="archied/v${{ steps.version.outputs.version }}"
fi
version="${{ steps.version.outputs.version }}"
# The release body is this version's changelog section, not the whole
# file: from its "## [x.y.z]" heading to the next "## [" heading.
# Extracting rather than inlining keeps the changelog the single
# source of truth, and the tag/changelog gate above has already
# proven that section exists.
prerelease=false
case "$version" in *-*) prerelease=true ;; esac
notes="$(mktemp)"
awk -v hdr="## [$version]" '
index($0, hdr) == 1 { printing = 1 }
printing && /^## \[/ && index($0, hdr) != 1 { exit }
printing { print }
' CHANGELOG.md > "$notes"
if ! [ -s "$notes" ]; then
echo "no [$version] section extracted from CHANGELOG.md" >&2
exit 1
fi
# Idempotent: --clobber replaces the asset and leaves the notes
# alone, so a re-run of this job (a retried or superseded deploy)
# cannot fail on an existing Release or duplicate the zip.
if gh release view "$tag" -R samcharles93/archie-releases >/dev/null 2>&1; then
gh release upload "$tag" -R samcharles93/archie-releases "${{ steps.zip.outputs.name }}.zip" SHA256SUMS install.sh --clobber
else
gh release create "$tag" -R samcharles93/archie-releases \
--title "archied v$version" \
--notes-file "$notes" \
"${{ steps.zip.outputs.name }}.zip" SHA256SUMS install.sh
fi
echo "published $tag with ${{ steps.zip.outputs.name }}.zip"
previous="$(git describe --tags --abbrev=0 --match 'v*' "$tag^" 2>/dev/null || true)"
git log --no-merges --format='- %s' ${previous:+"$previous.."}"$tag" > "$notes"
api="https://git.catlow.cloud/api/v1"
repo="sam/archie"
auth="Authorization: token $DEPLOY_TOKEN"
curl -sf -X DELETE -H "$auth" "$api/repos/$repo/releases/tags/$tag" >/dev/null || true
curl -sf -X POST -H "$auth" -H "Content-Type: application/json" \
-d "$(jq -n --arg tag "$tag" --arg name "Archie v$version" --arg body "$(cat "$notes")" \
--argjson prerelease "$prerelease" \
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: $prerelease}')" \
"$api/repos/$repo/releases" >/dev/null
echo "published release notes for $tag"
- name: Link the packages to this repository
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
for name in archied archie-agent archie; do
curl -sS -o /dev/null -X POST -H "Authorization: token $DEPLOY_TOKEN" \
"https://git.catlow.cloud/api/v1/packages/sam/container/$name/-/link/archie" || true
done
+43
View File
@@ -0,0 +1,43 @@
name: promote
on:
workflow_dispatch:
inputs:
version:
description: "published release to move stable to, such as 1.63.0"
required: true
type: string
concurrency:
group: promote
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
promote:
runs-on: self-hosted
steps:
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
- name: Fetch the release's archied
env:
VERSION: ${{ inputs.version }}
run: |
set -e
image="git.catlow.cloud/sam/archied:v$VERSION"
docker pull -q "$image"
container="$(docker create "$image")"
docker cp "$container:/usr/local/bin/archied" "$RUNNER_TEMP/archied"
docker rm "$container" >/dev/null
- name: Promote to stable
env:
VERSION: ${{ inputs.version }}
run: |
"$RUNNER_TEMP/archied" release promote \
-version "$VERSION" \
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
+17 -16
View File
@@ -2,8 +2,6 @@ name: Quality
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
@@ -14,28 +12,26 @@ concurrency:
jobs:
check:
runs-on: self-hosted
runs-on: archie-quality
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
- name: Verify extension namespace support
run: |
if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
unshare --user --map-root-user --net true
- name: Verify unprivileged user namespaces
run: unshare --user --map-root-user --net true
- uses: actions/setup-go@v5
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1
with:
package_json_file: ui/package.json
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "24"
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Install quality tools
run: |
@@ -44,8 +40,13 @@ jobs:
go install mvdan.cc/gofumpt@v0.11.0
bash tools/proto.sh install
sudo apt-get update
sudo apt-get install -y --no-install-recommends ripgrep
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: ~/.cache/golangci-lint
key: golangci-lint-${{ hashFiles('.golangci-version', '.golangci.yml', 'go.sum') }}-${{ github.sha }}
restore-keys: |
golangci-lint-${{ hashFiles('.golangci-version', '.golangci.yml', 'go.sum') }}-
golangci-lint-
- name: Ensure contract baseline ref
run: |
+55
View File
@@ -0,0 +1,55 @@
name: release
on:
workflow_dispatch:
inputs:
release:
description: "major, minor, patch, or an exact version such as 1.57.0"
required: true
default: minor
concurrency:
group: release
permissions:
contents: write
jobs:
cut:
runs-on: self-hosted
steps:
- name: Check DEPLOY_TOKEN is configured
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
if [ -z "$DEPLOY_TOKEN" ]; then
echo "::error::DEPLOY_TOKEN is not set for this repository, so the release cannot push its tag. Set the secret here, or dispatch the release from the Gitea primary."
exit 1
fi
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
ref: main
fetch-depth: 0
token: ${{ secrets.DEPLOY_TOKEN }}
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version-file: go.mod
cache: false
- name: Install Task
run: go install github.com/go-task/task/v3/cmd/task@v3.48.0
- name: Cut the release
env:
RELEASE: ${{ inputs.release }}
run: |
git config user.name "Sam Catlow"
git config user.email "sam@catlow.tech"
task release RELEASE="$RELEASE"
- name: Push the release
run: git push origin "$(git describe --exact-match --match 'v*' HEAD)"
+5 -6
View File
@@ -1,6 +1,7 @@
/archied
/archie-agent
/bin/
/dist/
.task/
*.db
.references/
@@ -25,19 +26,14 @@ config.production.toml
/ui/node_modules/
/ui/.vite/
/ui/*.tsbuildinfo
# ui/dist IS committed: the Go build must not need a Node toolchain.
/ui/dist/
# air live-reload
/.air/
/tmp/
# Beads / Dolt files (added by bd init)
.dolt/
.beads-credential-key
.beads/proxieddb/
*.gate.lock*
.beads/issues.jsonl
.beads/interactions.jsonl
.mcp.json
# gh CLI state (~/.local/state/gh) mistakenly created inside the tree
@@ -52,3 +48,6 @@ __pycache__/
# Local symlink to the archipelago marketplace repo
/archipelago
.agents-run/
/.pnpm-store/
deployments/archie/.build/
+49 -2
View File
@@ -42,6 +42,7 @@ linters:
- errorlint
- fatcontext
- forcetypeassert
- gosec
- makezero
- nilerr
- nilnesserr
@@ -82,8 +83,48 @@ linters:
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "the daemon is another service"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiegateway", desc: "the Gateway is another service"}
- {pkg: "github.com/nats-io", desc: "the State Store serves gRPC only"}
dashboard-service:
files: ["**/internal/webui/**", "**/internal/app/archieui/**", "**/cmd/archie-ui/**"]
deny:
- {pkg: "github.com/samcharles93/archie-core/internal/container", desc: "only the daemon owns containers"}
- {pkg: "github.com/samcharles93/archie-core/internal/agentexec", desc: "only the daemon owns containers"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "the daemon is another service"}
messaging-service:
files: ["**/internal/app/archiemessaging/**", "**/cmd/archie-messaging/**"]
deny:
- {pkg: "github.com/jackc/pgx", desc: "reach the State Store through its contract"}
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure/postgres", desc: "reach the State Store through its contract"}
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure/controlplanestore", desc: "reach the State Store through its contract"}
- {pkg: "github.com/samcharles93/archie-core/internal/domain/workflow", desc: "the workflow engine is the daemon's"}
- {pkg: "github.com/samcharles93/archie-core/internal/agentexec", desc: "agent execution is the daemon's"}
# The single binary replaces the services slice by slice. It never
# imports their packages, so each old path can be deleted outright.
single-binary:
files: ["**/cmd/archie/**", "**/internal/app/archie/**", "**/internal/platform/**", "**/modules/**"]
deny:
- {pkg: "github.com/samcharles93/archie-core/internal/app/archied", desc: "an old service; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/statestore", desc: "an old service; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiegateway", desc: "an old service; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/archiemessaging", desc: "an old service; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/archieui", desc: "an old service; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/app/servicekit", desc: "old service plumbing"}
- {pkg: "github.com/samcharles93/archie-core/internal/daemon", desc: "old service code; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/gateway", desc: "old service code; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/webui", desc: "old service code; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/domain", desc: "old domain code; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/infrastructure", desc: "old infrastructure; move what you need into a module"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/state", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/gateway", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/daemon", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/controlplane", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/messaging", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/logging", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/forge", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/contracts/channel", desc: "an internal service contract being deleted"}
- {pkg: "github.com/samcharles93/archie-core/internal/config", desc: "the single binary has its own bootstrap config"}
- {pkg: "github.com/nats-io", desc: "the single binary has no message bus"}
shared:
files: ["**/internal/app/servicekit/**", "**/internal/app/chattask/**"]
files: ["**/internal/app/servicekit/**"]
deny:
- {pkg: "github.com/samcharles93/archie-core/internal/daemon", desc: "shared code must not pull in a service"}
- {pkg: "github.com/samcharles93/archie-core/internal/webui", desc: "shared code must not pull in a service"}
@@ -114,12 +155,19 @@ linters:
- HACK
- BUG
gosec:
excludes:
- G104 # errcheck covers unchecked errors
- G115 # integer conversions are bounded where they occur
- G204 # running commands is what the tools and workflow steps do
- G304 # file paths come from configuration and confined worktrees
interfacebloat:
max: 8
sloglint:
no-mixed-args: true
key-naming-case: snake
context: scope
exclusions:
generated: lax
@@ -132,7 +180,6 @@ linters:
- ui/node_modules
presets:
- comments
- std-error-handling
- common-false-positives
- legacy
rules:
-4
View File
@@ -1,4 +0,0 @@
# Generated output: only its generator writes it, and the gate byte-checks it.
docs/data/generated/
internal/contracts/
ui/dist/
-2756
View File
File diff suppressed because it is too large. Load diff
+137 -41
View File
@@ -5,16 +5,62 @@ here changes a decision. If a rule stops changing decisions, delete it.
## What this is
**archie-core** is event-driven agentic automation. An event (an issue, PR,
webhook, schedule, chat message) is matched to a workflow, the workflow runs an
agent or tool in an isolated container, and the result lands somewhere for
review or action. A repository is an optional input to a workflow, not the point
of the product.
**archie-core** is event-driven agentic automation. An event (an alert, a
webhook, a schedule, a chat message, an issue) is matched to a workflow, the
workflow runs an agent whose every action is judged before it runs, and the
result lands somewhere for review or action. A repository is an optional input
to a workflow, not the point of the product. A forge is one of many inputs or
outputs; core code never assumes one.
<temporary - this statement must be removed on 2026-10-20"> The product is
unfinished. Many features are half-built, and the codebase carries far more
code, binaries, docs and tooling than it delivers. The job right now is to
finish features and shrink the codebase, not to extend it. </temporary>
## Layout
Main is becoming one binary, `archie`. The design is ARCHITECTURE.md in the
private sam/archie-product repo, and the work is epic #1977. New work goes
there:
- `cmd/archie` parses flags and calls `internal/app/archie`, the composition
root.
- Each module is `modules/<name>/`: an API package and an `internal/` directory
nothing outside the module can import. Modules reach each other only through
API packages, own their schema and tables, and keep no state only in memory.
- `internal/platform/` holds the few leaf packages every module may use.
- The new code never imports the old services' packages (depguard enforces it).
Old code moves: `git mv` it into the module that owns it, then adapt it.
While an old service still imports it, copy it instead, name the source
path in the commit, and delete the old copy with its service.
MIGRATION.md in sam/archie-product gives every old package a destination and
a verdict. Writing a replacement from scratch, or deleting an old package,
needs the maintainer's verdict on its row. Before building anything an old
package already does, read that package and carry its behaviour.
### The services being replaced
The six services below are deleted slice by slice as the binary replaces them,
each only once MIGRATION.md has a verdict for every package it holds. Don't
add features to them; fix them only when a bug blocks work.
Each service is a gRPC contract in `proto/<service>/v1`, generated into
`internal/contracts/<service>/v1`, and one binary in `cmd/` that parses flags
and calls its composition root in `internal/app/<service>`.
| Binary | Serves | Dials |
| --- | --- | --- |
| `archie-state-store` | State Store and Control Plane contracts; owns the task and control-plane tables | PostgreSQL |
| `archie-gateway` | Chat contract; owns the conversation tables | State Store, PostgreSQL |
| `archied` | Daemon contract; scheduling, workflow runs, task containers | State Store, Gateway, Messaging, NATS |
| `archie-messaging` | Messaging contract; external channel frontends | State Store, Gateway |
| `archie-ui` | Dashboard HTTP API (`internal/webui`) and the embedded SPA | State Store, Gateway, Daemon, Messaging |
| `archie-agent` | The worker inside each task container | NATS |
Forge, channel and secret-engine contracts are extension boundaries, not
services: a core binary starts the extension as a plugin process and dials it.
`archied` also runs the State Store's backup and restore during a host update.
`internal/domain` holds behaviour and interfaces; `internal/infrastructure`
implements them. Every instruction sent to a model is a file in
`internal/prompts`, read through that package; never inline a prompt in code.
Dashboard work follows `ui/CLAUDE.md`. Workflow YAML and its step vocabulary
are in `WORKFLOWS.md`; the server catalogue is authoritative.
## Authority
@@ -23,7 +69,7 @@ When sources disagree, the higher one wins:
1. The maintainer's instruction in this session.
2. This file.
3. The code as it is in the tree.
4. Beads issues (`bd show <id>`): the plan for a piece of work.
4. Gitea issues (`tea issues view <n>`): the plan for a piece of work.
5. Everything else (memories, comments, old docs) is a hint. Verify it against
the code before acting on it.
@@ -32,6 +78,11 @@ When sources disagree, the higher one wins:
- **A clear direction is the go-ahead.** Do it in the same turn. Do not restate
the plan, offer options, or ask "shall I proceed?". Stop only for destructive
or outward-facing actions (deleting data, pushing, touching a live host).
- **Push back when it matters.** If a request competes with something clearly
more urgent (a bug that loses work, a failure that shows nothing, a security
gap, a broken setup path), or looks like the wrong call, say so once in a
sentence or two and suggest whether it belongs in the backlog. Then do what
was asked: don't repeat the point or hold work back on your own judgement.
- **Post outside the repo only when told.** Chat, tickets and any external
service get a message only on the maintainer's instruction.
- **Report, don't narrate.** Final replies say what changed, what was verified,
@@ -43,23 +94,22 @@ When sources disagree, the higher one wins:
## How to decide
- **Broken beats new.** A bug that blocks work gets fixed now, with the smallest
change that unblocks it. No design docs and no new mechanism.
- **Cheapest option first.** Before building, name the smallest change that
solves the problem, including changing configuration or deleting something. If
your plan adds a new mechanism (RPC, process, binary, abstraction, config
field, tool) or grows past about 100 lines, stop and assess whether you're
taking the path of least resistance.
- **Broken comes first.** A bug that blocks or loses work goes ahead of new
features. Fix the cause. When that's a bigger job, unblock with a small change
first and file the proper fix rather than stopping there.
- **Cheapest option first.** Before building, consider the smallest change that
solves the problem, including changing configuration or deleting something.
A new mechanism (RPC, process, binary, abstraction, config field, tool) is
fine when it's the right design; say why the smaller option wasn't enough.
- **Delete before adding.** Unused code, dead paths, fallbacks nobody takes and
features nobody runs get removed, not maintained. Solo project, single user:
breaking changes need no compatibility shims.
- **Finish before starting.** Prefer completing a half-built feature end to end
over starting a new one.
- **Services own contracts.** A service is a gRPC contract in
`proto/<service>/v1` and one binary that serves it. Services reach each other
only through those contracts, never through another service's tables or
packages. A new command is a subcommand of an existing binary. A new binary
exists only for a new service or a real process boundary.
- **Modules own their API and tables.** A module reaches another only through
its API package, never its tables or `internal/`. The only real process
boundaries are extensions and the runner. A new command is a subcommand of
`archie`.
- **No compensating tools.** Do not write a linter, checker or generator to
enforce something a simpler design would make unnecessary. Fix the design.
- **A setting must work end to end.** A config field that parses but has no
@@ -78,10 +128,12 @@ When sources disagree, the higher one wins:
`infrastructure` implements `domain` interfaces, `domain` imports neither.
`cmd/` parses flags and calls `app`, nothing else.
- Fix invalid state where it is produced, not with checks where it is consumed.
- Log through the service's injected `*slog.Logger` with the `...Context`
methods, so lines carry the OpenTelemetry trace id. Never the global `slog`.
- If a fix fails twice, throw the block away and rewrite it simply.
- Comments say why, briefly. No migration history, phase names or issue
narration in code.
- Generated files (`ui/dist/`, protobuf, sqlc) are regenerated and committed
- Generated files (protobuf, sqlc) are regenerated and committed
with the change that caused them, never hand-edited.
## Tests
@@ -97,19 +149,37 @@ The default for a change is no new test. Write one only when:
A test that exists must catch a real regression, survive refactoring, run fast,
and be cheap to keep. Never test wiring, constants, defaults, struct shapes,
fakes, or call order. No test opens a real database or needs Docker; test
SQL semantics at the interceptor or domain level with fakes. One table-driven test per behaviour; extend the table
instead of adding a second test. Prefer making an invalid state unrepresentable
to testing that it is rejected. Test helpers live in `_test.go` files only.
fakes, or call order. Prefer making an invalid state unrepresentable to testing
that it is rejected.
How to write one:
- **Prove it.** Run the new test against the code before the fix and see it
fail. A test that passes either way proves nothing: delete it. When a bug
can't be reproduced deterministically (a race, say), fix it with an API that
rules it out and don't add a test.
- **One table per behaviour.** Extend the table instead of adding a second test.
Name the test after the behaviour, and say in its comment what regression it
guards.
- **Same gate as production.** Tests pass golangci-lint, gosec included, with no
exclusions for test files. Fix what the linter finds. A fixture that has to
look like a secret (a key the redaction must catch, a URL with a password the
parser must reject) uses a plainly fake value and a `//nolint:gosec` saying
what it tests.
- **Isolated.** Use `t.TempDir()` and `t.Setenv`, never host state. A test that
commits with git sets `GIT_CONFIG_GLOBAL` to `os.DevNull`. No test opens a
real database or needs Docker: test SQL semantics at the interceptor or domain
level with fakes. Files are written `0o600`, or `0o700` for a script.
- **Shared setup in helpers.** When several tests repeat the same setup, put it
in a helper in a `_test.go` file, never in production code.
## Invariants
These protect users. Do not weaken them without the maintainer's say-so.
- Failure stays local. Any service may crash, restart or be absent without
losing accepted work or taking another service down. Callers retry, degrade
and report the dependency as unhealthy; they never exit because a peer is
missing, and work is acknowledged only once it is durable.
- A crash loses no accepted work, and a restart resumes every run. Work is
acknowledged only once it is durable. A missing dependency is reported
unhealthy and retried, never a reason to exit.
- The model never runs git. Commits and pushes go through the daemon.
- The daemon's own credentials never enter an agent container. Containers get
task-scoped grants that are revoked when the task ends.
@@ -127,9 +197,18 @@ task build # binaries into bin/
task test # go test -short ./...
task ui # dashboard into ui/dist
task check # the gate
go test -short ./internal/domain/workflow -run TestName # one test
task dev # every service + Vite at http://localhost:5173, from deployments/dev.toml
task e2e:up # seeded local stack; task e2e:check -- all runs the browser checks
```
Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
`task proto:generate`, `task db:generate` and `task openapi:generate` write
the committed generated output for `proto/`, `internal/infrastructure/postgres/`
and `api/openapi.yaml`; `task check` runs their check variants and rejects stale
output. The e2e stack is not part of the gate.
Requires Go 1.27, Task, golangci-lint, Node, pnpm and Docker. Adopt `task fmt` and
`go fix` output as-is.
- `task check` gates the commit: `task check && git commit ...`. Never claim a
@@ -137,28 +216,45 @@ Requires Go 1.27, Task, golangci-lint, Node/npm and Docker. Adopt `task fmt` and
run, say what you did verify.
- Commit finished work without asking. Stage only your own paths and commit in
the same command. Conventional Commits scoped by package, short messages. Push
only when told.
every commit as soon as it is made; a local-only commit is not acceptable.
- Never commit binaries, build output, scratch files or `.references/`. Scratch
goes in `/tmp`.
- Runtime config lives at `${XDG_CONFIG_HOME:-~/.config}/archie/config.toml`.
Nothing in the working tree is read at runtime. Systemd is optional.
- Releases: `RELEASING.md`.
## Issues (beads)
## Issues (Gitea)
Work is tracked in `bd`, never in Markdown TODO files.
Work is tracked as issues on the primary remote, never in Markdown TODO files.
GitHub is a read-only mirror; do not open, close or comment there.
```bash
bd ready | bd show <id> | bd update <id> --claim | bd close <id>
tea issues list -r sam/archie --state open --labels critical
tea issues view 497
tea issues edit 497 --add-labels in-progress --add-assignees sam
tea comment 497 "what changed, and what was run"
tea issues close 497
```
- An issue is the plan: what is wrong or wanted, and how you know it is done.
Keep it to that.
- Bead state syncs through Dolt (`bd dolt push/pull`, only when told), not git.
Never commit `.beads/` exports.
- No host names, IPs, paths, PIDs or credentials in any bead: they are
published.
- File follow-up work you find as a bead. Do not fix it in passing.
- Labels carry state: a type (`bug`, `feature`, `task`, `chore`, `epic`,
`decision`, `discovery`), a priority (`critical`, `high`, `medium`, `low`), `in-progress`
and `deferred`. Open/closed is the issue state, not a label.
- An epic's children are its dependencies: link each one as it is filed (Gitea
MCP `issue_write` `add_dependency`, the epic `blocked_by` the child), plus any
real blocker between children. No `epic/<slug>` label; the dependencies are
the link, and the only place the web UI shows an epic's children.
- `tea` drops labels on `issues create` and `edit --add-labels`. Label through
the Gitea MCP connector, by label ID: it resolves names from the first 50
labels only.
- Cite the issue number in commits and comments.
- `tea issues list --labels` silently ignores an unknown name and returns every
issue. Check the count is plausible before trusting a filtered list.
- The API caps `limit` at 50 regardless of what you pass.
- No host names, IPs, paths, PIDs or credentials in an issue: the text outlives
the change that wrote it.
- File follow-up work you find as an issue. Do not fix it in passing.
## Changing this file
+34 -6
View File
@@ -2,16 +2,21 @@
# Pre-installs system tools agents can't install themselves (no apt, no sudo).
# Language packages are installed at runtime via uv/npm/go.
#
# Build: docker build -t archie-agent:latest .
# Build: task image:agent (or docker build --build-arg RUNTIME_VERSION=<ver>)
# A build that names no version stamps none, and the agent reports dev.
# ── builder ──
FROM golang:1.27-trixie AS builder
ARG RUNTIME_VERSION=dev
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
# Cache mounts keep modules and compiled packages on the build daemon; without
# them COPY . . makes every commit a cold compile.
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY . .
RUN CGO_ENABLED=0 go build \
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 go build \
-ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
-o /usr/local/bin/archie-agent ./cmd/archie-agent/
@@ -54,9 +59,15 @@ ENV GOPATH="/go"
# /go/bin must be on PATH or anything `go install` puts there is unreachable.
ENV PATH="/usr/local/go/bin:/go/bin:${PATH}"
ARG GOLANGCI_LINT_VERSION=2.13.2
ARG GOLANGCI_LINT_VERSION=2.14.0
ARG GOFUMPT_VERSION=0.11.0
ARG BUF_VERSION=1.72.0
# Pinned to the versions tools/proto.sh installs; buf generate shells out to them.
ARG PROTOC_GEN_GO_VERSION=1.36.11
ARG PROTOC_GEN_GO_GRPC_VERSION=1.6.2
# Repository gates run `task`; fetching it per run parks the task when the
# download fails.
ARG TASK_VERSION=3.54.0
RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" \
| tar -xz -C /usr/local/bin --strip-components=1 \
@@ -65,7 +76,12 @@ RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${G
"https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VERSION}/gofumpt_v${GOFUMPT_VERSION}_linux_amd64" && \
curl -fsSL -o /usr/local/bin/buf \
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-Linux-x86_64" && \
chmod +x /usr/local/bin/gofumpt /usr/local/bin/buf
curl -fsSL "https://github.com/go-task/task/releases/download/v${TASK_VERSION}/task_linux_amd64.tar.gz" \
| tar -xz -C /usr/local/bin task && \
chmod +x /usr/local/bin/gofumpt /usr/local/bin/buf && \
GOBIN=/usr/local/bin go install "google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION}" && \
GOBIN=/usr/local/bin go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GEN_GO_GRPC_VERSION}" && \
go clean -cache -modcache
# ── Python via uv ─────────────────────────────────────────────────────
ARG PYTHON_VERSION=3.14
@@ -73,7 +89,19 @@ RUN curl -fsSL https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:${PATH}"
RUN uv python install --default "${PYTHON_VERSION}" && rm -rf /root/.cache/uv
# Point each toolchain at its cache volume (internal/storage). Unset, pnpm puts
# its store on the worktree's filesystem, inside the repository the agent commits.
ENV GOMODCACHE=/data/cache/go/mod \
GOCACHE=/data/cache/go/build \
npm_config_cache=/data/cache/node \
npm_config_store_dir=/data/cache/pnpm \
DENO_DIR=/data/cache/deno \
BUN_INSTALL_CACHE_DIR=/data/cache/bun \
PIP_CACHE_DIR=/data/cache/pip \
UV_CACHE_DIR=/data/cache/pip \
CARGO_HOME=/data/cache/cargo
COPY --from=builder /usr/local/bin/archie-agent /usr/local/bin/archie-agent
# The daemon injects NATS_URL and, when configured, NATS_TOKEN.
# The daemon injects NATS_URL.
ENTRYPOINT ["archie-agent"]
+15 -3
View File
@@ -1,14 +1,27 @@
# archied — the archie daemon
# Run via docker compose alongside NATS.
FROM node:24-trixie-slim AS dashboard
WORKDIR /src/ui
RUN corepack enable
COPY ui/package.json ui/pnpm-lock.yaml ui/pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY ui/ ./
RUN pnpm run build
FROM golang:1.27-trixie AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
# Cache mounts keep modules and compiled packages on the build daemon; without
# them COPY . . makes every commit a cold compile.
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY . .
COPY --from=dashboard /src/ui/dist ./ui/dist
ARG GATEWAY_VERSION=dev
ARG RUNTIME_VERSION=dev
RUN CGO_ENABLED=0 go build \
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 go build \
-ldflags "-X github.com/samcharles93/archie-core/internal/buildinfo.Version=${GATEWAY_VERSION} -X github.com/samcharles93/archie-core/internal/buildinfo.Runtime=${RUNTIME_VERSION} -X github.com/samcharles93/archie-core/internal/installtype.buildType=container" \
-o /usr/local/bin/archied ./cmd/archied/
@@ -22,6 +35,5 @@ ARG RUNTIME_VERSION=dev
LABEL org.opencontainers.image.version="${GATEWAY_VERSION}"
LABEL cloud.catlow.archie.runtime-version="${RUNTIME_VERSION}"
COPY CHANGELOG.md /usr/share/archie/CHANGELOG.md
ENTRYPOINT ["archied"]
+7 -4
View File
@@ -1,6 +1,9 @@
[![Quality](https://github.com/samcharles93/archie-core/actions/workflows/quality.yml/badge.svg)](https://github.com/samcharles93/archie-core/actions/workflows/quality.yml)
# Archie
<h1>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/brand/archie-wordmark-dark.svg">
<img alt="Archie" src="assets/brand/archie-wordmark.svg" height="56">
</picture>
</h1>
**Event-driven Agentic Automation**
@@ -103,7 +106,7 @@ or a hosted provider API key.
1. **Install.**
```bash
curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash
curl -fsSL https://offloaded.dev/install.sh | bash
```
It downloads the latest release, verifies its checksum, installs the five
+43 -123
View File
@@ -1,136 +1,56 @@
# Releasing
One release stream. `CHANGELOG.md` carries every release section, one generated
page per version describes it, and one tag names the release. A release is one
version covering whatever changed; the components' entries are labelled sections
inside it (`### archied`, `### archie-agent`), not separate numbers or separate
pages.
The host bundle ships five processes (`archied`, `archie-gateway`,
`archie-state-store`, `archie-ui`, `archie-messaging`), and
one version covers all of them. `archie-agent`, the per-task sandboxed runtime,
ships as a container image and its changes are the `## [version]` release's
`### archie-agent` section.
`tools/release.sh` decides which commits a release carries from the package
closure of **every shipped binary**, not from commit-message guessing: a change
to a package only the messaging service, state store, playbook runner or UI
links still lands in the changelog. Read its header comment for how it
partitions commits and enforces `main`-only, clean-tree releases.
## What justifies a version
`task release:preview VERSION=X.Y.Z` shows exactly what would land, before
anything is written. A commit set that justifies no version produces no version:
`release.sh` exits **3** with "nothing to release" rather than inventing one, so
a pipeline can finish green without tagging.
Most sessions touch the gateway side (daemon, gateway, web UI, chat, messaging)
and leave the agent runtime alone. That is no longer a per-component `skip`
decision — one version covers the release — but a runtime code change being
merged to `main` is still not the same as it being in production: the
`archie-agent` image is rebuilt by the release, and a host that runs the agent
must pull the new image (`docker compose pull agent`) to get it.
## What the notes are for
**Release notes describe the reader's experience of what shipped.** The test is
the reader, not whether a sentence is negative:
- A capability that **never existed** leaves no expectation to correct, so a
note about it reads as a feature to someone who never had the thing — out.
- **The implementation's journey** — what was rebuilt, what a guard finally
covers, what a browser API refuses to surface — is not the reader's experience
either — out.
- A capability that **shipped but is not yet wired** _is_ the reader's
experience, so it belongs, worded as a caveat on the capability and paired
with the behaviour that compensates for it.
Design constraints and withheld capabilities are not release news.
Do not apply this mechanically: deleting a caveat a reader needs misleads them,
which is the failure this rule exists to prevent.
One `v*` tag names a release. One version covers every process in the host
bundle (`archied`, `archie-gateway`, `archie-state-store`, `archie-ui`,
`archie-messaging`) and the `archie-agent` image. Nothing is released from a
laptop.
## Cutting a release
```bash
task release:preview VERSION=1.3.0 # preview what would land
task release:prepare VERSION=1.3.0 # write the section into CHANGELOG.md, uncommitted
# edit CHANGELOG.md -- generated notes are a starting point, not the release
task release VERSION=1.3.0 # commit + annotated tag
git push --atomic origin main v1.3.0 # both refs or neither
task release:publish VERSION=1.3.0 # images to GHCR, zip to archie-releases
```
The source repository is private, so releases are published to the public
`samcharles93/archie-releases` repository, where `install.sh` and the
updater find them. `release:publish` builds from a clean worktree of the tag
and needs `gh` and `docker` logged in with write access to that repository
and to GHCR.
`release:prepare` emits bare commit subjects; they are a starting point. Rewrite
them to say what a reader gets, per "What the notes are for" above.
Pushing is a separate, explicit step — never push without confirming first (see
the repo's general "check before doing anything hard to reverse" rule). The
deploy workflow reads tags pointing at `HEAD`; pushing the commit without its
tag gets images stamped `dev`, which is why the push names the tag and is
`--atomic`.
### After a release, `main` and the working branch have diverged
The release commit lands on `main` — `tools/release.sh` refuses to run anywhere
else — while the working branch keeps advancing. So after every release, `main`
is ahead by exactly that commit and the branch is ahead by however far it has
moved: **neither tip is an ancestor of the other**, and `--ff-only` fails in
both directions. That refusal reads as "the tree is not ready" when in fact the
tree is fine.
Merge the release commit into the branch first, so any conflict is resolved on
the branch, where it is reversible and nobody is reading the tip:
```bash
git merge main # on the branch
git merge --ff-only <branch> # then, in whichever worktree holds main
```
Confirm which worktree holds `main` with `git worktree list` before the
`--ff-only`. A detached worktree sitting at the same commit will accept it and
move nothing, which looks like success.
Dispatch the **release** workflow (`.github/workflows/release.yml`) with
`major`, `minor`, `patch` or an exact version. It runs `task release` on
`main`, which refuses a dirty tree or an existing tag and then tags `vx.y.z`,
and pushes the tag with `DEPLOY_TOKEN`. A push made with the job token
wouldn't start other workflows, so the user token is what lets the tag start
the deploy.
## What a release publishes
Tagging one version produces, from a single `deploy` run:
The tag push runs `deploy.yml`:
- **Container images** — `ghcr.io/samcharles93/archied:latest` and
`ghcr.io/samcharles93/archie-agent:latest`. The runtime image is rebuilt by
the release, so runtime commits merged to `main` do not reach a running
sandbox until the host pulls the new image.
- **`:latest` names the newest release, not the newest commit.** A push to
`main` that is not a release publishes `archied:edge` (mutable, tracking
`main`) and `archied:sha-<commit>` (immutable) instead, so a release's
`:latest` stamping is not overwritten minutes later by the next ordinary
commit. A host that runs releases follows `:latest`; a host that tracks `main`
follows `:edge`.
- **A GitHub Release with a distribution zip** — `dist-zip` builds every process
the reference deployment runs (`archied`, `archie-gateway`,
`archie-state-store`, `archie-ui`, `archie-messaging`) for
linux/amd64, packs them with `deployments/INSTRUCTIONS.md` and `CHANGELOG.md`,
and attaches the zip to the Release. The Release body is that version's
`## [version]` section of `CHANGELOG.md`.
- **Gate.** `task check dist TEST_FLAGS=-count=1` and `govulncheck`. The
binaries the zip ships are built in the same run, so nothing is compiled
again after the gate.
- **Images.** `archied:v<version>` and `archie-agent:v<version>`, plus
`sha-<commit>` tags. `:latest` moves only on promotion.
- **The signed release.** `archied release publish` signs a statement
(version, issued_at, zip digest, agent image by digest) with
`RELEASE_SIGNING_KEY` and pushes it with the distribution zip to
`git.catlow.cloud/sam/archie` as `v<version>` and `next`. It never moves
`stable`.
- **The release page** on Gitea, listing the commit subjects since the
previous tag. The statement links to it.
The zip is also uploaded as an Actions artifact, but that is a backup copy:
artifacts expire after 90 days and need an Actions login to download. The
Release asset is the durable, operator-reachable one.
Actions run the workflow from the tagged commit, so a fix to `deploy.yml`
reaches a release only if it is an ancestor of the tag. Cut a new release
rather than committing the fix on top of a tagged one.
## Gate
## Promote
CI (`deploy.yml`) runs `task check` before building images, then verifies any
release tag at `HEAD` has a matching `[version]` section in `CHANGELOG.md`. A
tag with no changelog entry is a hard failure. No tags at `HEAD` is a warning,
not a failure — images get stamped `dev`.
Dispatch the **promote** workflow (`.github/workflows/promote.yml`) with a
`version`. It retags `stable` to that release and moves the `archied` and
`archie-agent` images' `:latest` to it. Promotion refuses a prerelease and a
release issued before the one `stable` names, the same replay rule hosts
enforce. The same thing by hand:
One consequence worth knowing when a release commit needs amending: GitHub
Actions runs the workflow **from the commit that triggered it**, so a fix to
`deploy.yml` only takes effect for a release if it is an ancestor of the tagged
commit. Delete and re-cut the tag (`git tag -d`, `task release`) rather than
committing the fix on top of an already-tagged release.
```bash
archied release promote -version 1.63.0 \
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
```
## Secrets
| Name | Used by |
|---|---|
| `DEPLOY_TOKEN` | release, deploy, promote: the registry push, the tag push and the package links |
| `RELEASE_SIGNING_KEY` | deploy: signs the release statement |
+144 -177
View File
@@ -2,42 +2,13 @@ version: "3"
vars:
BIN_DIR: "bin"
# The version a build reports: the nearest tag with the distance and commit,
# or a bare commit when the checkout has no tags (a shallow clone). A build
# should not answer "dev" only because the caller did not name a version.
VERSION:
sh: git describe --tags --always --dirty 2>/dev/null | sed 's/^v//' || echo dev
tasks:
default:
desc: List available tasks
cmds:
- task --list
setup:
desc: Install the pinned tooling and dependencies a checkout needs
cmds:
# Report what this task cannot install for you, so a missing Go, Node or
# Docker fails here by name rather than somewhere inside the gate.
- |
set -eu
missing=
for tool in go task node npm docker; do
command -v "$tool" >/dev/null 2>&1 || missing="$missing $tool"
done
if [ -n "$missing" ]; then
echo "warning: not installed (AGENTS.md, Build and gate):$missing" >&2
fi
# The pin is one file, read here and by .github/workflows, so the linter
# running locally and the one running the gate cannot drift apart.
- |
set -eu
want=$(cat {{.ROOT_DIR}}/.golangci-version)
have=$(golangci-lint --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
if [ "$have" = "${want#v}" ]; then
echo "golangci-lint $want already installed"
else
echo "installing golangci-lint $want (have: ${have:-none})"
GOBIN="$(go env GOPATH)/bin" go install "github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$want"
fi
- task: proto:install
- task: ui:deps
fmt:
desc: Fix and format Go source with the gate's configured formatters
cmds:
@@ -93,21 +64,23 @@ tasks:
- task: db:generate
- git diff --exit-code -- internal/infrastructure/postgres/postgresdb
openapi:generate:
desc: Write the API's OpenAPI document to api/openapi.yaml
cmds:
- mkdir -p api
- go run ./cmd/archie openapi > api/openapi.yaml
openapi:check:
desc: Regenerate the OpenAPI document and reject uncommitted differences
cmds:
- task: openapi:generate
- git diff --exit-code -- api/openapi.yaml
proto:check:
desc: Regenerate contracts and reject uncommitted generated differences
cmds:
- bash tools/proto.sh check
news:
desc: Regenerate the release data artifacts from the changelog
cmds:
- go -C tools run -mod=readonly ./newsgen --repo-root ..
news:check:
desc: Verify the committed release notes match the changelog
cmds:
- go -C tools run -mod=readonly ./newsgen check --repo-root ..
vet:
desc: Run go vet
cmds:
@@ -117,23 +90,6 @@ tasks:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
- task: lint:tools
lint:tools:
desc: Run golangci-lint over the tools module
dir: tools
cmds:
- golangci-lint run ./...
vuln:
desc: Scan for known vulnerabilities (requires network access)
cmds:
- govulncheck ./...
deadcode:
desc: Report unreachable production functions (advisory)
cmds:
- go run golang.org/x/tools/cmd/deadcode@latest -test=false ./cmd/...
ui:deps:
desc: Install dashboard dependencies
@@ -142,33 +98,25 @@ tasks:
run: once
dir: ui
cmds:
- npm ci --no-audit --no-fund
- pnpm install --frozen-lockfile
ui:
desc: Build the dashboard into ui/dist (committed; the Go build embeds it)
desc: Build the dashboard into ui/dist, which the Go build embeds
# check builds the dashboard and then build depends on it again; a second
# build empties ui/dist under the Go steps that embed it.
run: once
dir: ui
deps: [ui:deps]
cmds:
- npm run build
ui:check:
desc: Rebuild the dashboard into a temporary directory and reject a stale ui/dist
deps: [ui:deps]
cmds:
- bash tools/uidist.sh check
- pnpm run build
test:ui:
desc: Test and type-check the dashboard
dir: ui
deps: [ui:deps]
cmds:
- npm test
- npm run typecheck
webhook:send:
desc: Send a test event to the dashboard's capture intake (--help for kinds)
cmds:
- bash tools/webhook-send.sh {{.CLI_ARGS}}
- pnpm test
- pnpm run typecheck
bench:prreview:
desc: Run the PR review benchmark on the configured models and write docs/benchmarks/pr-review-*.md (-- -model ALIAS -judge-model REF; --help for flags)
@@ -179,8 +127,27 @@ tasks:
desc: Run development services and Vite at http://localhost:5173
deps: [dev:daemon, dev:gateway, dev:messaging, dev:state-store, dev:dashboard, dev:ui]
dev:tls:
desc: Issue the development CA and service certificates deployments/dev.toml names
status:
- test -f tmp/dev-tls/archie-ui.pem
cmds:
- |
# Task containers reach the State Store over the Docker bridge, which
# services may only do over TLS.
set -eu
d=tmp/dev-tls
mkdir -p "$d"
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
-subj /CN=archie-dev-ca -keyout "$d/ca-key.pem" -out "$d/ca.pem" 2>/dev/null
for s in archied archie-gateway archie-messaging archie-state-store archie-ui; do
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 3650 \
-subj "/CN=$s" -addext "subjectAltName=DNS:$s" -addext extendedKeyUsage=serverAuth,clientAuth \
-CA "$d/ca.pem" -CAkey "$d/ca-key.pem" -keyout "$d/$s-key.pem" -out "$d/$s.pem" 2>/dev/null
done
dev:postgres:
desc: Start PostgreSQL and wait for readiness
desc: Start PostgreSQL, wait for readiness, provision the database roles
cmds:
- docker compose up -d postgres
- |
@@ -194,18 +161,31 @@ tasks:
done
echo "postgres did not become healthy within 60s" >&2
exit 1
- |
# docker-compose.yml creates the dev database with a superuser named
# archie; provision the least-privilege roles deployments/dev.toml
# points at. Idempotent, so this also upgrades a volume created before
# the role split.
go run ./cmd/archie-state-store provision \
-admin-url "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable" \
-runtime-url "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable" \
-migration-url "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
dev:wait-state:
internal: true
cmds:
- |
# Services read their settings from the State Store at boot and exit
# if it is not up yet, so wait for its port ([services.state] in
# deployments/dev.toml).
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
exit 1
dev:daemon:
desc: Run archied with live reload
cmds:
- |
# The daemon and Gateway read their settings from the State Store at
# boot and exit if it is not up yet; it starts only once PostgreSQL
# is healthy, so wait for its port ([services.state] in
# deployments/dev.toml) first.
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
exit 1
- task: dev:wait-state
- air -build.args_bin="-config-overlay,deployments/dev.toml"
dev:dashboard:
@@ -215,35 +195,28 @@ tasks:
dev:state-store:
desc: Run the State Store with development PostgreSQL
deps: [dev:postgres]
deps: [dev:postgres, dev:tls]
cmds:
- go run ./cmd/archie-state-store -config-overlay deployments/dev.toml
dev:gateway:
desc: Run the development Gateway
cmds:
- |
# The daemon and Gateway read their settings from the State Store at
# boot and exit if it is not up yet; it starts only once PostgreSQL
# is healthy, so wait for its port ([services.state] in
# deployments/dev.toml) first.
for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done
echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2
exit 1
- task: dev:wait-state
- go run ./cmd/archie-gateway -config-overlay deployments/dev.toml
dev:messaging:
desc: Run the development Messaging Service
cmds:
- for _ in $(seq 1 120); do nc -z 127.0.0.1 9091 && exit 0; sleep 1; done; echo "state store did not come up on 127.0.0.1:9091 within 120s" >&2; exit 1
- task: dev:wait-state
- go run ./cmd/archie-messaging -config-overlay deployments/dev.toml
dev:ui:
desc: Run Vite (requires the dashboard backend)
dir: ui
cmds:
- npm install --no-audit --no-fund
- npm run dev
- pnpm install
- pnpm run dev
e2e:up:
desc: Start the local stack without Docker (PostgreSQL 18, services, Vite) and seed it
@@ -257,33 +230,20 @@ tasks:
- bash e2e/stack.sh stop
e2e:check:
desc: Run the browser checks against the running e2e stack (-- --record VERSION for release evidence)
desc: List browser checks; use -- all or -- CHECK to run, add --headed to watch
cmds:
- node e2e/run.cjs {{.CLI_ARGS}}
dev:mobile:
desc: Serve the dashboard on your LAN (token-protected) for phone viewing
deps:
- ui
cmds:
- cmd: |
IP=$(hostname -I | awk '{print $1}')
TOKEN_FILE="${XDG_DATA_HOME:-$HOME/.local/share}/archie/web-token"
go run ./cmd/archie-ui -listen 0.0.0.0:8484 -token-file "$TOKEN_FILE" &
UI_PID=$!
sleep 2
TOKEN=$(cat "$TOKEN_FILE" 2>/dev/null)
URL="http://$IP:8484/?t=$TOKEN"
echo "Phone URL: $URL"
echo "$URL" | qrencode -t ANSIUTF8
trap "kill $UI_PID 2>/dev/null" EXIT
wait $UI_PID
build:
desc: Build archie services and agent binaries
deps: [ui]
# Static, like the binaries a release ships, so `dist` reuses these
# compiled packages and only links again.
env:
CGO_ENABLED: "0"
vars:
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default "dev"}}'
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default "dev"}}'
GATEWAY_VERSION: '{{.GATEWAY_VERSION | default .VERSION}}'
RUNTIME_VERSION: '{{.RUNTIME_VERSION | default .VERSION}}'
SERVICE_LDFLAGS: >-
-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary
-X github.com/samcharles93/archie-core/internal/buildinfo.Version={{.GATEWAY_VERSION}}
@@ -291,6 +251,12 @@ tasks:
sources:
- Taskfile.yml
- "**/*.go"
# Files the binaries embed.
- "internal/**/*.sql"
- "internal/**/*.yaml"
- "internal/**/*.json"
- "internal/**/*.tpl"
- "internal/**/*.md"
- go.mod
- go.sum
- "ui/dist/**"
@@ -301,93 +267,94 @@ tasks:
- "{{.BIN_DIR}}/archie-ui"
- "{{.BIN_DIR}}/archie-messaging"
- "{{.BIN_DIR}}/archie-agent"
- "{{.BIN_DIR}}/archie"
cmds:
# One flag set for every service, matching the release workflow, so each
# binary reports the same version.
- for: [archied, archie-gateway, archie-state-store, archie-ui, archie-messaging]
- for: [archie, archied, archie-gateway, archie-state-store, archie-ui, archie-messaging]
cmd: go build -trimpath -ldflags "{{.SERVICE_LDFLAGS}}" -o {{.BIN_DIR}}/{{.ITEM}} ./cmd/{{.ITEM}}
- go build -trimpath -ldflags "-X github.com/samcharles93/archie-core/internal/app/agentworker.version={{.RUNTIME_VERSION}} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary" -o {{.BIN_DIR}}/archie-agent ./cmd/archie-agent
test:
desc: Run short Go tests with caching
dist:
desc: Build the linux/amd64 binaries a release ships into dist/ (VERSION=1.2.3; needs jq)
deps: [ui]
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: "0"
vars:
DIST_LDFLAGS: >-
-X github.com/samcharles93/archie-core/internal/installtype.buildType=binary
-X github.com/samcharles93/archie-core/internal/buildinfo.Version={{.VERSION}}
-X github.com/samcharles93/archie-core/internal/buildinfo.Runtime={{.VERSION}}
-X github.com/samcharles93/archie-core/internal/app/agentworker.version={{.VERSION}}
cmds:
- go test -short ./...
# release.json names what a release ships, so the zip and this build
# cannot disagree. The compiler flags match `build`, so after the gate
# has built bin/ this only links.
- |
set -eu
mkdir -p dist
for cmd in $(jq -r '.required_topology.units[], .required_topology.binaries[]?' release.json); do
go build -trimpath -ldflags "{{.DIST_LDFLAGS}}" -o "dist/$cmd" "./cmd/$cmd"
done
test:full:
desc: Run the whole Go test suite uncached, including the wall-clock-bound tests
test:
desc: Run Go tests; the release gate passes TEST_FLAGS=-count=1
cmds:
- go test ./... -count=1
- go test {{.TEST_FLAGS | default "-short"}} ./...
image:agent:
desc: Build the agent image stamped with this checkout's version
# Compose owns the image build; this only supplies the version, which a
# plain `docker build` has no way to learn from a context that excludes .git.
cmds:
- RUNTIME_VERSION={{.VERSION}} docker compose build agent
check:
desc: Run the full quality gate
# Finish mutations before starting parallel checks.
cmds:
# Node packages land under ui/, which `go test ./...` walks: installing
# them while the parallel checks scan the tree makes a lockfile update
# delete Go sources mid-walk. Install first, then fan out. Every Go step
# embeds ui/dist, so the dashboard is built before any of them.
- task: ui
- task: fmt
- task: proto:check
- task: db:check
- task: openapi:check
- task: check:readonly
check:readonly:
internal: true
deps:
- task: proto:lint
- task: news:check
- task: vet
- task: lint
- task: build
- task: test
- task: test:ui
- task: ui:check
release:preview:
desc: "Show the release notes that would be generated (VERSION=1.2.0)"
cmds:
- tools/release.sh --version {{.VERSION}} --dry-run
requires:
vars: [VERSION]
release:prepare:
desc: Prepare changelog notes for editing (VERSION=1.2.0)
cmds:
- tools/release.sh --version {{.VERSION}} --prepare
requires:
vars: [VERSION]
release:
desc: Commit and tag the prepared release (VERSION=1.2.0)
cmds:
- tools/release.sh --version {{.VERSION}} --tag
desc: "Tag main as a release (RELEASE=major|minor|patch|1.2.3)"
requires:
vars: [VERSION]
release:publish:
desc: Push the images and publish the pushed tag to the public releases repository (VERSION=1.2.0)
vars: [RELEASE]
cmds:
- tools/publish.sh {{.VERSION}}
requires:
vars: [VERSION]
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BIN_DIR}}
docker-build:
desc: Build the archie-agent sandbox image
cmds:
- docker compose build agent
docker-up:
desc: Start the optional external NATS service via docker compose
cmds:
- docker compose up -d nats
docker-down:
desc: Stop the docker compose stack
cmds:
- docker compose down
docker-logs:
desc: Follow the NATS container logs
cmds:
- docker compose logs -f nats
- |
set -euo pipefail
die() { echo "release: $*" >&2; exit 1; }
[ "$(git rev-parse --abbrev-ref HEAD)" = main ] || die "releases are cut from main"
[ -z "$(git status --porcelain)" ] || die "the working tree is dirty"
last="$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || true)"
IFS=. read -r major minor patch <<<"${last#v}"
case "{{.RELEASE}}" in
major) version="$((major + 1)).0.0" ;;
minor) version="$major.$((minor + 1)).0" ;;
patch) version="$major.$minor.$((patch + 1))" ;;
*) version="$(echo "{{.RELEASE}}" | sed 's/^v//')" ;;
esac
echo "$version" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?$' || die "$version is not a version"
! git rev-parse -q --verify "refs/tags/v$version" >/dev/null || die "v$version already exists"
git tag -a "v$version" -m "v$version"
echo "tagged v$version"
+54 -16
View File
@@ -46,7 +46,6 @@ steps:
| `outputs` | mapping | Named, typed results the run writes once each (same shape as inputs). A required output the run never writes parks it. A calling workflow reads them. |
| `profile` | text | The container profile (`[containers.profiles]`) the run's agents use. Resolved when the task is dispatched. |
| `identity` | text | The identity every run acts as, whatever started it. Empty runs as the starter. |
| `needs` | mapping | Harness capabilities the run requires: `captures` (bool), `gate_retries` (number). Declared outputs imply `captures`. |
## A step
@@ -71,7 +70,7 @@ Any string setting may contain `{{ path }}`, replaced when the step runs:
| `task.repository` | `owner/name`. |
| `task.kind` | What the task came from, as prose: `GitHub issue` or `chat-originated task`. |
| `task.issue`, `task.pr` | Issue and pull request numbers. |
| `task.plan` | The plan a `human.approve` step handed over (an approved PRD). |
| `task.plan` | The plan a `workflow.approve` step handed over (an approved PRD). |
| `task.review` | The review comments a remediation round addresses. |
| `inputs.<name>` | A declared input; an undeclared one is refused at save. |
| `steps.<id>.summary` | What an earlier step reported, e.g. an agent's finish summary or a gate's output. |
@@ -108,7 +107,7 @@ it. Parallel steps do not nest, and need at least two branches.
### How a run ends
A run ends at the first step that sets an outcome: `workflow.finish`,
`workflow.handoff`, `human.approve`, `repo.open-pr`, `repo.commit` with
`workflow.handoff`, `workflow.approve`, `repo.open-pr`, `repo.commit` with
`if_empty: complete`, or `review.reply`. A run that reaches the end of its steps
completes, with the last step's summary as its detail. A step that fails parks
the run unless it continues on failure.
@@ -156,6 +155,15 @@ _needs a repository._
| `push` | bool | Push the branch after committing. |
| `reference` | `Fixes` \| `Implements` \| `Refs` | How the commit links to the task issue. |
Hooks never run. The commit is created by go-git, which ignores `.git/hooks`
and `core.hooksPath`, and the agent never runs git, so `pre-commit`,
`commit-msg` and `prepare-commit-msg` in the checkout are inert files. A
repository whose rules live only in a hook — a formatter, a secret scanner,
commitlint, a DCO trailer — gets a commit that does not satisfy them: the run
reports success and the pull request fails the check afterwards. Put the same
commands in `command.run` or the repository gate, which both run in the task
container before this step.
### `repo.open-pr`
_needs a repository._
@@ -173,6 +181,18 @@ _needs a repository._
|---|---|---|
| `branch` | `fresh` \| `task` | fresh starts a new branch from the base; task resumes the branch this task pushed. |
### `repo.tooling`
_needs a repository._
No settings. It runs the repository policy's `tooling` commands, in order, in
the task worktree — the installs a gate needs and the container does not ship
(protoc plugins, linters, generators). A repository that declares none installs
nothing and the step succeeds. Place it after `repo.prepare` and before any
`gate.*` step: a failing install fails the step with the command and its output
and says the gate did not run, so a missing toolchain is not read as a red
repository.
### `gate.diff-rules`
_needs a repository._
@@ -181,12 +201,6 @@ _needs a repository._
|---|---|---|
| `rules` | list of mapping | Patterns the change must not match. |
### `gate.diff-size`
_needs a repository._
No settings.
### `gate.repository`
_needs a repository._
@@ -211,13 +225,30 @@ _runs without a repository._
| `body` | text | The comment text. |
| `on` | `issue` \| `pr` | Comment on the issue or the pull request. Empty means issue. |
### `human.approve`
### `message.send`
_runs without a repository._
Sends text to one chat on a messaging channel the workflow's organisation owns,
and a package's workflow may not send. A test run records the message instead
of sending it.
| Setting | Type | Meaning |
|---|---|---|
| `channel` | text | The messaging channel to send through. |
| `chat_id` | text | The channel's identifier for the chat. |
| `text` | text | The message. References are filled in. |
A scheduled message is a schedule bound to a workflow whose only step is
`message.send`.
### `workflow.approve`
_runs without a repository._
| Setting | Type | Meaning |
|---|---|---|
| `plan` | text | What the human decides on; the next workflow reads it as task.plan. |
| `plan` | text | What the operator decides on; the next workflow reads it as task.plan. |
| `then` | text | The workflow the task runs once approved. |
### `review.pr`
@@ -262,7 +293,7 @@ _runs without a repository._
| Setting | Type | Meaning |
|---|---|---|
| `detail` | text | What the operator reads about the outcome. |
| `status` | `completed` \| `parked` \| `waiting_human` \| `declined` | How the run ends. Empty means completed. |
| `status` | `completed` \| `parked` \| `waiting_approval` \| `declined` | How the run ends. Empty means completed. |
### `workflow.handoff`
@@ -283,14 +314,21 @@ expressions that limit which files the rule applies to.
## What starts a workflow
- **Issues**, by label: `bug` runs `tdd`, `feature` runs `feasibility`, anything
else runs `triage`, which classifies it and hands off.
- **Issues**, by label: the Issue routing setting lists label to workflow rules
(first match wins) and a default for the rest. It starts as `bug` runs
`tdd`, `feature` runs `feasibility`, anything else runs `triage`, which
classifies it and hands off.
- **Event bindings**: a webhook source mapped onto a workflow and its inputs
(Events page).
- **Playbooks**: a trigger (issue kind and labels) and actions that dispatch
- **Schedules**: each firing is captured on the reserved `schedule` source as
a `Schedule fired` event (`schedule_id`, `name`, `scheduled_for`,
`fired_at`). A schedule trigger is a binding on that source using the
`schedule-fired` mapping, filtered to one `schedule_id`. A firing starts at
most one task per binding.
- **Playbooks**: a trigger (issue labels) and actions that dispatch
workflows.
- **Other workflows**: `workflow.call` (a child run), `workflow.handoff` (the
same task, requeued), `human.approve` (once approved).
same task, requeued), `workflow.approve` (once approved).
- **By hand**: the New task form, or Run on the Workflows page.
The canvas Start node lists the triggers of each workflow.
+3451
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect width="512" height="512" rx="112" fill="#0e0f10"/><g fill="#51a580" transform="translate(96 96) scale(13.333) translate(-0 -0)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g></svg>

After

Width:  |  Height:  |  Size: 319 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#51a580"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></svg>

After

Width:  |  Height:  |  Size: 194 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 630"><rect width="1200" height="630" fill="#0e0f10"/><svg x="320" y="209.6153846153846" width="560" height="150.76923076923077" viewBox="-4 21.4 312 84"><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#e8e6e1" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg><g fill="#a8a59f" transform="translate(224.91199999999998 460.38461538461536)"><path transform="translate(0.00 0)" d="M18.70-23.73L18.70-21.22L11.15-21.22L11.15 0L8.30 0L8.30-21.22L0.75-21.22L0.75-23.73"/><path transform="translate(19.45 0)" d="M5.61 0L2.89 0L2.89-25.16L5.61-25.16L5.61-14.69L5.75-14.69Q6.39-16.18 7.57-17.07Q8.74-17.95 10.71-17.95Q13.43-17.95 15.01-16.20Q16.59-14.45 16.59-11.25L16.59 0L13.87 0L13.87-10.78Q13.87-13.12 12.87-14.31Q11.87-15.50 9.89-15.50Q8.81-15.50 7.82-15.15Q6.83-14.79 6.22-14.04Q5.61-13.29 5.61-12.17"/><path transform="translate(38.76 0)" d="M9.49 0.41Q7.11 0.41 5.34-0.73Q3.57-1.87 2.58-3.93Q1.60-5.98 1.60-8.77Q1.60-11.56 2.58-13.62Q3.57-15.67 5.34-16.81Q7.11-17.95 9.49-17.95Q11.83-17.95 13.53-16.85Q15.23-15.74 16.15-13.80Q17.07-11.87 17.07-9.38L17.07-8.09L4.45-8.09L4.45-7.28Q4.45-5 5.83-3.49Q7.21-1.97 9.66-1.97Q11.32-1.97 12.56-2.75Q13.80-3.54 14.48-5L16.42-3.60Q15.57-1.84 13.77-0.71Q11.97 0.41 9.49 0.41M9.49-15.67Q8.02-15.67 6.89-14.99Q5.75-14.31 5.10-13.11Q4.45-11.90 4.45-10.37L4.45-10.13L14.14-10.13L14.14-10.51Q14.14-12.07 13.57-13.23Q12.99-14.38 11.93-15.03Q10.88-15.67 9.49-15.67"/><path transform="translate(57.43 0)" d=""/><path transform="translate(65.45 0)" d="M17.17-2.38L17.17 0L15.64 0Q14.55 0 13.87-0.46Q13.19-0.92 12.89-1.73Q12.68-2.24 12.61-2.86L12.44-2.86Q11.90-1.26 10.56-0.42Q9.21 0.41 7.38 0.41Q4.59 0.41 3.04-1.02Q1.50-2.45 1.50-4.90Q1.50-6.56 2.31-7.70Q3.13-8.84 4.78-9.44Q6.43-10.03 8.98-10.03L12.44-10.03L12.44-11.76Q12.44-13.63 11.42-14.62Q10.40-15.61 8.30-15.61Q6.73-15.61 5.64-14.89Q4.56-14.18 3.84-12.99L2.21-14.52Q2.92-15.91 4.49-16.93Q6.05-17.95 8.43-17.95Q11.59-17.95 13.38-16.39Q15.16-14.82 15.16-12.04L15.16-2.38L17.17-2.38M12.44-5.10L12.44-7.99L8.84-7.99Q6.53-7.99 5.44-7.31Q4.35-6.63 4.35-5.34L4.35-4.62Q4.35-3.33 5.30-2.62Q6.26-1.90 7.82-1.90Q9.18-1.90 10.22-2.33Q11.25-2.75 11.85-3.49Q12.44-4.22 12.44-5.10"/><path transform="translate(83.61 0)" d="M17.68 1.94Q17.68 3.74 16.73 4.91Q15.78 6.09 13.89 6.65Q12 7.21 9.18 7.21Q6.46 7.21 4.74 6.70Q3.03 6.19 2.24 5.22Q1.46 4.25 1.46 2.89Q1.46 1.46 2.21 0.65Q2.96-0.17 4.25-0.51L4.25-0.88Q3.50-1.26 3.09-1.85Q2.69-2.45 2.69-3.33Q2.69-4.66 3.54-5.36Q4.39-6.05 5.71-6.39L5.71-6.53Q4.15-7.28 3.28-8.67Q2.41-10.06 2.41-11.90Q2.41-13.70 3.23-15.06Q4.05-16.42 5.54-17.19Q7.04-17.95 9.01-17.95Q9.96-17.95 10.79-17.78Q11.63-17.61 12.34-17.27L12.34-17.58Q12.34-18.60 12.82-19.26Q13.29-19.92 14.38-19.92L17-19.92L17-17.54L13.67-17.54L13.67-16.42Q14.62-15.61 15.15-14.45Q15.67-13.29 15.67-11.90Q15.67-Line truncated

After

Width:  |  Height:  |  Size: 20 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#e8e6e1" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="currentColor" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="currentColor" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 21.40 312 84" role="img" aria-label="Archie"><title>Archie</title><g fill="#51a580" transform="translate(-7.7555555555555555 18.56666666666667) scale(3.8777777777777778)"><path d="M2 21h4l8-18h-4z"/><path d="M14.9 5.03 22 21h-4l-5.1-11.47z"/><path d="M10.47 15h3.06l1.11 2.5H9.36z"/></g><path fill="#1f1f1d" d="M99.76 68L99.76 100L86.96 100L86.96 47.80L99.76 47.80L99.76 58.60L100.26 58.60Q100.96 55.80 102.61 53.35Q104.26 50.90 107.11 49.35Q109.96 47.80 114.06 47.80L116.86 47.80L116.86 59.90L112.86 59.90Q108.56 59.90 105.61 60.75Q102.66 61.60 101.21 63.35Q99.76 65.10 99.76 68M145.86 101.20Q134.26 101.20 128.01 93.80Q121.76 86.40 121.76 73.80Q121.76 61.30 128.01 53.95Q134.26 46.60 145.86 46.60Q153.76 46.60 158.91 50.10Q164.06 53.60 166.36 59.80L155.86 64.50Q154.96 61.20 152.46 59.05Q149.96 56.90 145.86 56.90Q140.56 56.90 137.86 60.25Q135.16 63.60 135.16 69.20L135.16 78.70Q135.16 84.10 137.86 87.50Q140.56 90.90 145.86 90.90Q150.36 90.90 152.91 88.55Q155.46 86.20 156.86 82.70L166.66 87.40Q164.16 94.30 158.81 97.75Q153.46 101.20 145.86 101.20M188.36 100L175.56 100L175.56 26L188.36 26L188.36 56.50L188.86 56.50Q190.46 52.30 193.91 49.45Q197.36 46.60 203.46 46.60Q211.46 46.60 215.81 51.95Q220.16 57.30 220.16 67L220.16 100L207.36 100L207.36 68.30Q207.36 62.80 205.36 59.95Q203.36 57.10 198.76 57.10Q196.16 57.10 193.76 58.05Q191.36 59 189.86 60.85Q188.36 62.70 188.36 65.50M239.76 40.20Q235.86 40.20 234.06 38.35Q232.26 36.50 232.26 33.80L232.26 31.80Q232.26 29 234.06 27.20Q235.86 25.40 239.76 25.40Q243.66 25.40 245.46 27.20Q247.26 29 247.26 31.80L247.26 33.80Q247.26 36.50 245.46 38.35Q243.66 40.20 239.76 40.20M246.16 100L233.36 100L233.36 47.80L246.16 47.80M280.96 101.20Q273.26 101.20 267.76 97.85Q262.26 94.50 259.31 88.35Q256.36 82.20 256.36 73.80Q256.36 65.60 259.26 59.45Q262.16 53.30 267.56 49.95Q272.96 46.60 280.56 46.60Q288.76 46.60 294.01 50.20Q299.26 53.80 301.81 59.75Q304.36 65.70 304.36 72.90L304.36 77.10L269.66 77.10L269.66 78.40Q269.66 84 272.86 87.50Q276.06 91 282.36 91Q287.06 91 290.16 88.95Q293.26 86.90 295.66 83.90L302.56 91.60Q299.36 95.90 293.81 98.55Q288.26 101.20 280.96 101.20M280.76 56.20Q277.36 56.20 274.86 57.75Q272.36 59.30 271.01 62.05Q269.66 64.80 269.66 68.40L269.66 69.20L291.06 69.20L291.06 68.30Q291.06 64.60 289.86 61.95Q288.66 59.30 286.36 57.75Q284.06 56.20 280.76 56.20"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

-9
View File
@@ -1,9 +0,0 @@
package configtemplate
import _ "embed"
// Changelog is the verbatim contents of CHANGELOG.md, so a binary carries the
// release notes for the version it was built as.
//
//go:embed CHANGELOG.md
var Changelog string
+25 -62
View File
@@ -3,6 +3,7 @@ package main
import (
"context"
"encoding/base64"
"errors"
"flag"
"fmt"
@@ -16,21 +17,11 @@ import (
"github.com/samcharles93/archie-core/internal/app/agentworker"
"github.com/samcharles93/archie-core/internal/infrastructure/egress"
"github.com/samcharles93/archie-core/internal/logging"
)
type workerRunner func(context.Context, agentworker.Settings, *slog.Logger) error
// runHold blocks until signalled and exits 0. It is the keepalive for a Kit
// container that runs no worker: the agent binary is archie's own and is
// mounted into every Kit, so the container needs no binary the image may not
// ship, and holds no environment of its own.
func runHold() int {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
<-ctx.Done()
return 0
}
func main() {
os.Exit(run())
}
@@ -40,35 +31,39 @@ func run() int {
}
func runCommand(args []string, getenv func(string) string, stderr io.Writer, runWorker workerRunner) int {
if len(args) > 0 && args[0] == "hold" {
return runHold()
}
if len(args) > 0 && args[0] == "relay" {
return runRelay(args[1:], stderr, agentworker.RunRelay)
}
if len(args) > 0 && args[0] == "mcp" {
return runMCP(args[1:], stderr, agentworker.RunCaptureMCP)
}
flags := flag.NewFlagSet("archie-agent", flag.ContinueOnError)
flags.SetOutput(stderr)
natsURLFlag := flags.String("nats-url", "", "NATS server URL (defaults to NATS_URL)")
stateStoreURLFlag := flags.String("state-store-url", "", "State Store gRPC target (defaults to STATE_STORE_URL; required -- the legacy NATS storerpc path is deleted)")
stateStoreTokenFlag := flags.String("state-store-token", "", "State Store bearer token (defaults to STATE_STORE_TOKEN)")
showVersion := flags.Bool("version", false, "print the version and exit")
if err := flags.Parse(args); err != nil {
if errors.Is(err, flag.ErrHelp) {
return 0
}
return 2
}
// The release and its updater read this line to prove a shipped
// archie-agent belongs to the release being installed.
if *showVersion {
fmt.Printf("archie-agent %s\n", agentworker.Version())
return 0
}
natsURL, natsToken := natsConnectionSettings(*natsURLFlag, getenv)
natsURL := *natsURLFlag
if natsURL == "" {
fmt.Fprintln(stderr, "error: -nats-url or NATS_URL is required")
natsURL = getenv("NATS_URL")
}
if natsURL == "" {
_, _ = fmt.Fprintln(stderr, "error: -nats-url or NATS_URL is required")
flags.Usage()
return 1
}
log := slog.New(slog.NewJSONHandler(stderr, nil))
log := slog.New(logging.WithTrace(slog.NewJSONHandler(stderr, nil)))
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
@@ -77,7 +72,7 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
stateStoreURL = getenv("STATE_STORE_URL")
}
if stateStoreURL == "" {
fmt.Fprintln(stderr, "error: -state-store-url or STATE_STORE_URL is required (the legacy NATS storerpc path is deleted)")
_, _ = fmt.Fprintln(stderr, "error: -state-store-url or STATE_STORE_URL is required (the legacy NATS storerpc path is deleted)")
flags.Usage()
return 1
}
@@ -86,12 +81,17 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
stateStoreToken = getenv("STATE_STORE_TOKEN")
}
stateStoreCA, err := base64.StdEncoding.DecodeString(getenv("STATE_STORE_CA_BASE64"))
if err != nil {
_, _ = fmt.Fprintf(stderr, "error: STATE_STORE_CA_BASE64: %v\n", err)
return 1
}
if err := runWorker(ctx, agentworker.Settings{
NATSURL: natsURL,
NATSToken: natsToken,
StateStoreTarget: stateStoreURL,
StateStoreToken: stateStoreToken,
StateStoreCA: []byte(getenv("STATE_STORE_CA")),
StateStoreCA: stateStoreCA,
ModelProxy: getenv(egress.ModelProxyEnv),
ModelProxyHosts: egress.ParseHosts(getenv(egress.ModelProxyHostsEnv)),
ModelProxyCA: getenv(egress.ModelProxyCAEnv),
@@ -101,14 +101,6 @@ func runCommand(args []string, getenv func(string) string, stderr io.Writer, run
return 0
}
func natsConnectionSettings(flagURL string, getenv func(string) string) (url, token string) {
url = flagURL
if url == "" {
url = getenv("NATS_URL")
}
return url, getenv("NATS_TOKEN")
}
type relayServer func(ctx context.Context, forwards map[string]string) error
// runRelay is the sandbox egress relay: the container on both a sandbox's
@@ -142,43 +134,14 @@ func runRelay(args []string, stderr io.Writer, serve relayServer) int {
return 2
}
if len(forwards) == 0 {
fmt.Fprintln(stderr, "error: at least one -forward is required")
_, _ = fmt.Fprintln(stderr, "error: at least one -forward is required")
flags.Usage()
return 1
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := serve(ctx, forwards); err != nil {
fmt.Fprintln(stderr, "error:", err)
return 1
}
return 0
}
type mcpServer func(ctx context.Context, specPath, capturesPath string) error
// runMCP serves a stage's capture tools to a harness over stdio. The
// harness starts it, so it runs as the harness user and holds no secrets.
func runMCP(args []string, stderr io.Writer, serve mcpServer) int {
flags := flag.NewFlagSet("archie-agent mcp", flag.ContinueOnError)
flags.SetOutput(stderr)
spec := flags.String("spec", "", "JSON file listing the stage's capture tools")
captures := flags.String("captures", "", "file accepted capture calls are appended to")
if err := flags.Parse(args); err != nil {
if errors.Is(err, flag.ErrHelp) {
return 0
}
return 2
}
if *spec == "" || *captures == "" {
fmt.Fprintln(stderr, "error: -spec and -captures are required")
flags.Usage()
return 1
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := serve(ctx, *spec, *captures); err != nil {
fmt.Fprintln(stderr, "error:", err)
_, _ = fmt.Fprintln(stderr, "error:", err)
return 1
}
return 0
+7 -4
View File
@@ -19,10 +19,13 @@ import (
func main() { os.Exit(run()) }
func run() int {
// A leading non-flag argument selects a recovery subcommand; anything else,
// A leading non-flag argument selects a subcommand; anything else,
// including no arguments at all, serves the State Store contract. An
// unrecognised word is refused rather than ignored, so a mistyped recovery
// command never leaves an operator watching a server start instead.
// unrecognised word is refused rather than ignored, so a mistyped command
// never leaves an operator watching a server start instead.
if args := os.Args[1:]; statestore.IsProvisionArgs(args) {
return statestore.RunProvision(context.Background(), args[1:], os.Stdout, os.Stderr)
}
if args := os.Args[1:]; statestore.IsAccessResetArgs(args) {
return statestore.RunAccessReset(context.Background(), args[2:], os.Stderr)
}
@@ -36,7 +39,7 @@ func run() int {
flag.StringVar(&options.Listen, "listen", "", "state store gRPC listen address (defaults to [services.state].listen, else 127.0.0.1:9090)")
flag.StringVar(&options.ReadyAddr, "ready-addr", "", "optional readiness HTTP listen address (e.g. 127.0.0.1:9091)")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "usage: archie-state-store [flags] # serve the State Store gRPC contract\n\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h | access reset -h\n\n")
_, _ = fmt.Fprintf(flag.CommandLine.Output(), "usage: archie-state-store [flags] # serve the State Store gRPC contract\n\ndatabase roles: archie-state-store provision -h\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h | access reset -h\n\n")
flag.PrintDefaults()
}
flag.Parse()
+7 -7
View File
@@ -47,7 +47,7 @@ the daemon boots with, which names the database.
// 1 the operation failed, 2 the command line was wrong.
func runRecovery(args []string, stdout, stderr io.Writer) int {
if len(args) == 0 {
fmt.Fprint(stderr, recoveryUsage)
_, _ = fmt.Fprint(stderr, recoveryUsage)
return 2
}
command := args[0]
@@ -55,14 +55,14 @@ func runRecovery(args []string, stdout, stderr io.Writer) int {
switch command {
case statestore.RecoveryBackup, statestore.RecoveryRestore, statestore.RecoveryValidate, statestore.RecoveryRollback:
default:
fmt.Fprintf(stderr, "archie-state-store: unknown command %q\n\n", command)
fmt.Fprint(stderr, recoveryUsage)
_, _ = fmt.Fprintf(stderr, "archie-state-store: unknown command %q\n\n", command)
_, _ = fmt.Fprint(stderr, recoveryUsage)
return 2
}
flags := flag.NewFlagSet("archie-state-store "+command, flag.ContinueOnError)
flags.SetOutput(stderr)
flags.Usage = func() { fmt.Fprint(stderr, recoveryUsage) }
flags.Usage = func() { _, _ = fmt.Fprint(stderr, recoveryUsage) }
flags.StringVar(&options.Out, "out", "", "snapshot file backup writes")
flags.StringVar(&options.From, "from", "", "snapshot file restore reads")
flags.StringVar(&options.Kind, "kind", "", "control-plane resource kind rollback replays")
@@ -80,15 +80,15 @@ func runRecovery(args []string, stdout, stderr io.Writer) int {
return 2
}
if flags.NArg() > 0 {
fmt.Fprintf(stderr, "archie-state-store %s: unexpected argument %q\n", command, flags.Arg(0))
_, _ = fmt.Fprintf(stderr, "archie-state-store %s: unexpected argument %q\n", command, flags.Arg(0))
return 2
}
summary, err := statestore.RunRecovery(context.Background(), options)
if err != nil {
fmt.Fprintf(stderr, "archie-state-store %s: %v\n", command, err)
_, _ = fmt.Fprintf(stderr, "archie-state-store %s: %v\n", command, err)
return 1
}
fmt.Fprintln(stdout, summary)
_, _ = fmt.Fprintln(stdout, summary)
return 0
}
-41
View File
@@ -1,41 +0,0 @@
// This file enforces the dashboard's process boundary
// (docs/prds/external-agent-harness.md, "Session contract", Transport): the
// dashboard must not link the container or daemon internals, because only the
// daemon owns containers. Go imports are atomic, so a single reference
// relinks a runtime, and the boundary holds only while something re-measures
// it. archie-core-h3s0 names this check; it was purged with the test suite and
// is restored here.
package main
import (
"context"
"os/exec"
"strings"
"testing"
"time"
)
func TestDashboardDoesNotLinkContainerRuntime(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
out, err := exec.CommandContext(ctx, "go", "list", "-deps", ".").Output()
if err != nil {
t.Fatalf("go list -deps .: %v", err)
}
linked := map[string]bool{}
for line := range strings.SplitSeq(strings.TrimSpace(string(out)), "\n") {
linked[line] = true
}
for _, pkg := range []string{
"github.com/samcharles93/archie-core/internal/container",
"github.com/samcharles93/archie-core/internal/app/archied",
"github.com/samcharles93/archie-core/internal/agentexec",
} {
t.Run(pkg, func(t *testing.T) {
if linked[pkg] {
t.Errorf("cmd/archie-ui links %s: only the daemon owns containers", pkg)
}
})
}
}
-1
View File
@@ -34,7 +34,6 @@ func run() int {
flag.StringVar(&options.OidcRedirectURL, "oidc-redirect-url", "", "callback URL registered at the provider (path must be /oauth2/callback)")
flag.StringVar(&options.Gateway.Target, "gateway-target", "", "archie-gateway gRPC address (defaults to [services.gateway].target)")
flag.StringVar(&options.State.Target, "state-target", "", "archie-state-store gRPC address (defaults to [services.state].target)")
flag.StringVar(&options.Harness.Target, "harness-target", "", "archied harness session gRPC address (defaults to [services.harness].target); empty leaves the setup terminal unwired")
flag.DurationVar(&options.DependencyTimeout, "dependency-timeout", 0, "per-dependency readiness probe timeout (default 5s)")
flag.DurationVar(&options.EventPollInterval, "event-poll-interval", 0, "how often the activity feed polls the State Store for new events (default 1s)")
// BoolFunc rather than BoolVar so an unset flag stays distinguishable
+53
View File
@@ -0,0 +1,53 @@
// Command archie is the single Archie binary. It parses flags and hands over to
// the composition root.
package main
import (
"context"
"flag"
"fmt"
"os"
"os/signal"
"syscall"
"github.com/samcharles93/archie-core/internal/app/archie"
"github.com/samcharles93/archie-core/internal/buildinfo"
)
func main() {
if err := run(); err != nil {
fmt.Fprintln(os.Stderr, "archie:", err)
os.Exit(1)
}
}
func run() error {
configPath := flag.String("config", archie.DefaultConfigPath(), "path to the bootstrap config file")
newIdentity := flag.Bool("new-age-identity", false, "print a new age identity for age_identity and exit")
showVersion := buildinfo.RegisterVersionFlag("archie")
flag.Usage = func() {
_, _ = fmt.Fprintln(flag.CommandLine.Output(), "usage: archie [flags]\n archie openapi print the API's OpenAPI document")
flag.PrintDefaults()
}
flag.Parse()
showVersion()
if *newIdentity {
return archie.NewAgeIdentity(os.Stdout)
}
switch flag.Arg(0) {
case "":
case "openapi":
doc, err := archie.Document()
if err != nil {
return err
}
_, err = os.Stdout.Write(doc)
return err
default:
return fmt.Errorf("unknown command %q", flag.Arg(0))
}
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
return archie.Run(ctx, *configPath)
}
+29 -15
View File
@@ -2,32 +2,46 @@
package main
import (
"fmt"
"os"
"strings"
"github.com/samcharles93/archie-core/internal/app/archied"
"github.com/samcharles93/archie-core/internal/app/archieplaybooks"
"github.com/samcharles93/archie-core/internal/app/prbench"
)
const commandUsage = "usage: archied [flags] # run the daemon; archied -h lists the flags\n" +
"subcommands: setup, update, release, status, prbench"
func main() {
args := os.Args[1:]
os.Exit(run(os.Args[1:]))
}
func run(args []string) int {
// The setup generator is dispatched before the daemon's flags are
// parsed: it writes a first-run config.toml and must not touch the
// store, NATS, or the running daemon's configuration.
if archied.IsSetupArgs(args) {
os.Exit(archied.RunSetup(args[1:], os.Stdin, os.Stdout, os.Stderr))
return archied.RunSetup(args[1:], os.Stdin, os.Stdout, os.Stderr)
}
if len(args) > 0 && args[0] == "update" {
os.Exit(archied.RunUpdate(args[1:], os.Stdout, os.Stderr))
if len(args) > 0 {
switch args[0] {
case "update":
return archied.RunUpdate(args[1:], os.Stdout, os.Stderr)
case "release":
return archied.RunRelease(args[1:], os.Stdout, os.Stderr)
case "status":
return archied.RunStatus(args[1:], os.Stdout, os.Stderr)
case "prbench":
return prbench.Main(args[1:], os.Stdout, os.Stderr)
}
// A word that is not a subcommand is refused rather than ignored: a
// stale `archied update-topology` would otherwise start a second
// daemon under the running one's feet.
if !strings.HasPrefix(args[0], "-") {
fmt.Fprintf(os.Stderr, "archied: unknown command %q\n%s\n", args[0], commandUsage)
return 2
}
}
if len(args) > 0 && args[0] == "status" {
os.Exit(archied.RunStatus(args[1:], os.Stdout, os.Stderr))
}
if len(args) > 0 && args[0] == "prbench" {
os.Exit(prbench.Main(args[1:], os.Stdout, os.Stderr))
}
if len(args) > 0 && args[0] == "playbooks" {
os.Exit(archieplaybooks.Run(args[1:], os.Stderr))
}
os.Exit(archied.Run())
return archied.Run()
}
+79 -468
View File
@@ -1,505 +1,116 @@
# archie configuration
#
# archied configuration
# This file starts the services. Everything else (forge connections, models,
# providers, chat, tools, containers, repositories, policies) is edited in the
# dashboard, and a saved value there overrides the same setting here.
#
# Secrets are NOT stored here: each one is a {engine, key}
# reference resolved through a secrets engine at startup.
# The built-in "env" engine reads key as an environment variable name.
# Every other engine (bws, sops, vault, age) is an extension installed from
# the archipelago marketplace and enabled through the control plane.
# Secrets are never written here: each is a {engine, key} reference. The
# built-in "env" engine reads key as an environment variable.
# work_dir = "~/.local/share/archie/work" # default
# state_dir = "~/.local/share/archie" # default; embedded NATS store, task logs, disk probe
# The PostgreSQL connection archie-state-store, archied and archie-gateway
# serve from. Required: each fails closed without it.
# `docker compose up -d postgres` starts a matching local postgres:18 with this
# default URL.
# database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
# skills_dir = "~/.local/share/archie/skills" # SKILL.md search path; defaults under work_dir when unset
# The URL the services connect as: a least-privilege role, created by
# `archie-state-store provision`. migration_database_url is the role that owns
# the schema and runs migrations; when it is absent, database_url does both,
# which is what a single-role install does.
# database_url = "postgres://archie_runtime:secret@localhost:5432/archie?sslmode=disable"
# migration_database_url = "postgres://archie_migrator:secret@localhost:5432/archie?sslmode=disable"
# work_dir = "~/.local/share/archie/work"
# state_dir = "~/.local/share/archie"
poll_interval = "60s"
label = "archie"
bot_user = "vectis-labs-archie"
# 0 switches the cap off; omit the key to take the built-in default (400).
diff_cap_lines = 400
# org = "acme" # empty means the default org (a single-operator install's one identity)
# granted_credentials = ["openai"] # credential@1 services the root identity may resolve (see [containers.credentials])
# how many operator-triggered retries a parked task gets
# before it moves to dead (global default; set per-repo to
# override). Enforced by the dashboard's retry action.
# max_retries = 3
[forge]
# The name of an installed, enabled forge package (archipelago: forge/github, forge/gitea), or "none".
# Install and enable it from the Extensions page, then restart archied.
type = "github"
host = "https://github.com"
token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }
# How forge issues become work:
# "poll" – re-discover issues each poll_interval (default)
# "webhook" – react to GitHub webhook events the moment they arrive
# "both" – webhook plus the poll as a backstop
# intake = "poll"
# Required when intake is "webhook" or "both": the shared secret configured
# on the GitHub webhook, and the host:port the receiver listens on. On
# GitHub, set the webhook's Content type to application/json (the UI
# default) -- the alternate form-encoded delivery is not supported.
# Webhook intake is single-identity, and that is enforced: with [[identities]]
# configured this combination is REJECTED at startup rather than silently
# downgraded to polling. The receiver binds one secret and one dispatch
# predicate, so it could only judge another identity's events by the wrong
# rules. Either drop the [[identities]] blocks, or keep intake = "poll" and
# let each identity poll.
# webhook_secret = { engine = "env", key = "ARCHIE_WEBHOOK_SECRET" }
# webhook_addr = "0.0.0.0:8645"
# intake, webhook_secret and webhook_addr exist only here. Set on a
# [identities.forge] entry they are REJECTED for the same reason: nothing
# reads them, so the identity would silently keep polling. Serving webhook
# intake per identity is a pending migration, not a setting.
# [[identities]] runs more than one bot identity from a single daemon, each
# with its own forge account and repository membership. Runtime settings
# are shared and edited through the control plane. Intake
# settings are rejected per identity, and [forge].intake = "webhook"/"both"
# is rejected alongside [[identities]]. Minimal shape:
# [[identities]]
# name = "personal" # required; namespaces logs/events/NATS subjects
# bot_user = "your-bot" # required
# forge = { type = "github", host = "https://github.com", token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN_PERSONAL" } }
# org = "acme" # empty inherits the shared org (empty = default)
# granted_credentials = ["openai"] # credential@1 services this identity may resolve (see [containers.credentials])
[dispatch]
# Can be of "assignee", "label", or "either"
# this sets the method archie uses to pick up tasks.
trigger = "assignee"
trigger = "assignee" # "assignee", "label" or "either"
ack_reaction = "eyes" # "off" for none
# Optionally set a reaction to show that archie has picked up a task.
# setting this to "off" disables the pickup reactions.
ack_reaction = "eyes"
[models] # role -> ai-sdk runtime ref (used by agent workflows)
[models]
triage = "openai/gpt-5.4"
planner = "openai/gpt-5.4"
builder = "openai/gpt-5.4"
# `reviewer` runs the adversarial self-review stage and operator-triggered PR
# reviews. Omitted, it falls back to `builder`.
# reviewer = "openai/gpt-5.4"
# `embedding` is optional: it powers in-process embedding consumers
# (curators first). Unset, or a credential that fails to resolve, degrades
# to the capability reporting unavailable -- archied still starts.
# embedding = "openai/text-embedding-3-small"
# `transcription` is optional: it turns Telegram voice notes into text before
# the turn is dispatched, behind a "[voice transcription]" marker. Read by
# archie-messaging. Unset, or a provider that does not resolve, leaves the
# voice note as its media placeholder -- the turn still runs.
# transcription = "openai/whisper-1"
# [providers.openai]
# class = "openai"
# api_key = { engine = "env", key = "OPENAI_API_KEY" }
[providers.ollama]
class = "ollama"
# [chat]
# `operator` is the display name of user. It is
# passed to the chat agent as runtime metadata, which means it is sent to the
# configured model provider on every turn -- leave it unset to tell the agent
# nothing about who is running it.
# operator = "John Smith"
# `workspace` roots the chat agent's file and shell tools (read, write, edit,
# shell, grep, find). If unser, the tools aren't registered.
# Set it to let the agent read, modify and execute inside that directory
# choose it deliberately
# workspace = "~/.local/share/archie/workspace"
# `max_steps` caps the model/tool round-trips in a single chat turn
# (default 100). This is a task budget, not a safety limit.
# max_steps = 100
# Let read/write/edit/find/grep tools reach absolute paths outside the
# workspace jail. Relative paths still resolve against workspace.
# The shell tool is never confined, so a jail only pushes the agent into
# using shell for everything, losing truncation, line numbering, and
# read-before-write protection. Enable when the agent needs to work
# cross-filesystem (disk ops, system edits, etc.). Grant deliberately.
# unrestricted_filesystem = true
# Render each completed tool call inline in the reply, naming the tool and one
# line of its result, before the answer built from them. Off by default: it is
# there to make a wrong tool choice visible from the chat, at the cost of
# narrating every internal step. Applies to every chat channel -- Telegram
# and the web dashboard both read this one setting.
# show_tool_calls = true
# Optional interactive-chat catalog. /provider groups these references by
# their first path segment, and /model shows only the selected provider's
# entries. When omitted, Archie uses the distinct refs in [models].
# models = [
# "openai/gpt-5.6-sol",
# "openrouter/openai/gpt-5.6-sol",
# ]
# [chat.telegram]
# The bot token from @BotFather, resolved through a configured secret engine.
# token = { engine = "bws", key = "TELEGRAM_BOT_TOKEN" }
# Email and the generic inbound webhook are archipelago channel extensions
# (channels/email, channels/webhook): install, accept and enable them from the
# Extensions page, with their settings there.
# Per-(channel, sender) inbound rate limiting, shared by every chat channel:
# Telegram keys by numeric user ID, email by SMTP from address, webhook by
# its configured route path -- a source, not a person, so it reaches the
# limiter as a transport-only budget key rather than as an identity. Off by
# default -- both fields must be set to a positive value.
#
# This section is the seed for the Channel settings resource. The Web UI owns
# the value a running deployment limits with (restart-required), so edit it
# there rather than here; a stored value is not overwritten by this file.
# [chat.rate_limit]
# window = "1m"
# max_requests = 20
# External MCP tools are launched and managed by Archie's MCP client. A
# command of "npx" gets a persistent package cache under work_dir
# (top of this file) automatically, so a daemon restart reuses it instead
# of re-resolving and re-downloading the package from the npm registry
# every time. This does not cover a package's own separate downloads (e.g.
# a Playwright/Puppeteer-based server fetching a browser binary from a CDN
# via its postinstall script) -- consult that package's own env vars for
# those.
# Most MCP servers are single-threaded and get one tools/call at a time.
# parallel_tool_calls = true (default false) drops that serialization for
# this server only, for a server whose own implementation handles
# concurrent requests. It never affects another configured server.
# [[tools.mcp_servers]]
# name = "desktop-commander"
# transport = "stdio"
# command = "npx"
# args = ["-y", "@wonderwhy-er/desktop-commander@0.2.46", "--no-onboarding"]
# work_dir = "/path/to/workspace"
# parallel_tool_calls = false
# archied's own liveness surface, always on. GET /healthz and /health answer
# 200 once the daemon is serving (503 while it is still booting), and
# /health/detailed reports the readiness probes. This is what the update
# watchdog polls after restarting archied to decide whether the release came
# up or has to be rolled back, so it stays separate from the dashboard's
# /healthz: the dashboard can be switched off, and it runs as its own process
# in the extracted UI topology.
[health]
listen = "127.0.0.1:8485"
# Bounds one readiness probe's call into a service the daemon depends on but
# does not own (the Gateway), so a hung dependency degrades that probe instead
# of stalling the whole report. Omit for the default; a negative value leaves
# only the caller's own deadline in force.
# dependency_timeout = "5s"
# Web dashboard and API: task board, activity stream, chat, config,
# memory, SSE events. Served as an embedded SPA with a full REST
# and streaming API. Auth is token-based for non-loopback addresses;
# loopback binds (127.0.0.1, ::1, localhost) skip auth automatically.
#
# The dashboard is served by the
# standalone archie-ui process, not by archied: this listen address is what
# archie-ui binds, and archied runs no dashboard listener at all. Run
# `archie-ui -config <same config.toml>` alongside the other services.
[web]
listen = "127.0.0.1:8484"
# Trust X-Forwarded-Proto and X-Forwarded-Host headers when validating Origin
# on mutating requests (CSRF protection).
#
# Off by default. When false, the expected Origin scheme is derived directly
# from the daemon's own network connection (http unless TLS is terminated by
# archied directly). Setting this to true causes archied to respect the
# X-Forwarded-Proto header sent by a reverse proxy (e.g. Traefik, Caddy, Nginx).
#
# SECURITY WARNING: Enable ONLY when archied is deployed behind a trusted
# reverse proxy that strips or overwrites any client-supplied X-Forwarded-*
# headers. Enabling this on a directly exposed daemon allows untrusted
# clients to spoof the Origin scheme and bypass CSRF protection.
# trust_forwarded_headers = false
# Where archied writes its logs. Without file set, output goes only to
# stderr -- which under systemd means journald holds the sole copy, and
# running by hand leaves no record at all. Setting file gives a durable
# copy independent of the supervisor, and is what lets the dashboard show
# history from before it connected. Both stderr and the file get output
# unless quiet is set.
# [log]
# file = "~/.local/share/archie/logs/archied.log"
# max_size_mb = 20 # rotate once the file exceeds this; 0 uses the default (20)
# keep = 5 # rotated files to retain; 0 uses the default (5)
# level = "info" # "debug" | "info" | "warn" | "error"
# quiet = false # true suppresses stderr once a file is configured
# The built-in file-backed memory engine (internal/domain/memory +
# internal/infrastructure/memory) is always on -- nothing here is required
# to get memory at all. engine selects among the domain/memory engine
# family; "builtin" (the default, same as leaving it unset) is the only
# one implemented so far.
# [memory]
# engine = "builtin" # "builtin" is the only engine implemented so far
# Operator alerts (parked tasks, failed runs, unhealthy services, missing
# credentials) are listed in the dashboard. Archie also POSTs each raised and
# resolved alert as JSON to the webhook: wire it to n8n, email, Slack, or any
# HTTP endpoint. Failed deliveries are retried and recorded on the alert.
[notify]
# webhook = "https://n8n.example.com/webhook/archie"
# min_severity = "warning" # info, warning or action: the lowest severity delivered
# secret = {engine = "env", key = "ARCHIE_NOTIFY_SECRET"} # signs X-Archie-Signature (HMAC-SHA256)
[budgets]
max_steps = 60
wall_clock = "30m" # one agent call
wall_clock = "30m" # one agent call
gate_max_failures = 5
task_wall_clock = "4h" # a whole task run; keep containers.max_uptime at or above it
task_wall_clock = "4h" # a whole task run
[health]
listen = "127.0.0.1:8485"
# dependency_timeout = "5s"
# Trace export. Without an endpoint nothing is exported.
# [telemetry]
# endpoint = "127.0.0.1:4317" # OTLP/gRPC collector
# insecure = false # plaintext to the collector
# ca_file = "" # PEM bundle verifying the collector
# sample_ratio = 1.0 # share of new traces recorded
# headers = { authorization = "Bearer ..." }
[web]
listen = "127.0.0.1:8484" # "off" disables the dashboard
# trust_forwarded_headers = false # only behind a proxy you control
[services.gateway]
target = "127.0.0.1:8585"
# listen = "127.0.0.1:8585"
[services.state]
target = "127.0.0.1:9090"
# listen = "127.0.0.1:9090"
# TLS: every gRPC hop between services uses certificates from your own CA
# (step-ca, cert-manager, Vault, openssl). Each process loads
# cert_dir/<service>.pem and cert_dir/<service>-key.pem, whose DNS SAN is its
# service name: archied, archie-gateway, archie-messaging, archie-state-store,
# archie-ui. Every peer must chain to ca_file. Certificates are reloaded when
# they change. Without [tls], services may only listen on and dial loopback
# addresses, task containers cannot reach the State Store, and the harness
# setup terminal is off.
# [tls]
# ca_file = "/etc/archie/tls/ca.pem"
# cert_dir = "/etc/archie/tls"
# Services selects contract adapters at composition time.
[services.gateway]
target = "127.0.0.1:8585" # archie-gateway's gRPC address (always remote once set)
# listen = "127.0.0.1:8585" # The address archie-gateway BINDS. Read only by the
# # archie-gateway process; every client ignores it. Defaults
# # to the target above, so a default deployment's client and
# # server cannot drift onto different ports. Set it when the
# # host already owns that port.
[services.state]
target = "127.0.0.1:9090" # REQUIRED. The State Store gRPC address archied and
# # archie-gateway dial. They own no task data
# # in-process: the standalone archie-state-store process
# # owns it in PostgreSQL. An empty target is a startup error.
# listen = "127.0.0.1:9090" # The address archie-state-store BINDS. Read only by that
# # process; every client ignores it. Defaults to the target
# # above, so a default deployment's client and server cannot
# # drift onto different ports. Move it when a port is already
# # taken on the host.
# The daemon's harness session contract: the dashboard's setup terminal opens
# a PTY into an ephemeral Kit container over it. Both ends are optional and
# the dashboard's setup terminal degrades to 503 without them: the daemon
# serves the contract only when [tls] is configured, and archie-ui dials it
# only when a target is set.
# [services.harness]
# target = "127.0.0.1:8587" # The address archie-ui dials. Empty leaves the
# # setup terminal unwired.
# NATS is the sole autonomous workflow handoff. mode changes only where the
# broker runs; every workflow still runs in a managed task container:
# "embedded" – in-process nats-server (the default; no external server)
# "external" – connect to url
# Leave the section absent to run embedded.
# [nats]
# mode = "embedded" # "embedded" | "external"
# url = "nats://localhost:4222" # required when mode = "external"
# token_env = "NATS_TOKEN" # optional external-server credential; embedded generates one per start
# mode = "embedded" # or "external" with url
# url = "nats://localhost:4222"
# token_env = "NATS_TOKEN" # external: the archie-callout user's password
# callout_issuer_seed_env = "NATS_CALLOUT_SEED" # external: account nkey seed; the broker's auth_callout issuer is its public key
# Unbound webhook capture: POST /webhooks/capture/{source} accepts and
# stores any inbound payload archie doesn't yet have a binding for, so it can
# be inspected and mapped later.
# Stored in the same PostgreSQL database as tasks, not NATS -- capture has one
# writer and one (human, dashboard) reader, so it doesn't need JetStream's
# fan-out/replay machinery. All fields default when the section is absent;
# capture is on by default.
#
# The receiver is mounted by the
# archie-ui process, which projects these same values from this file; the
# daemon's binding-dispatch loop consumes captures from the shared State
# Store. Leave this section here even if you do not edit it: both processes
# read it.
# [capture]
# retention = "168h" # 7 days; prune-on-write deletes anything older
# max_events = 5000 # row cap, pruned on every insert regardless of age
# max_body_bytes = 262144 # 256 KiB; larger POSTs are rejected with 413
# rate_per_second = 1.0 # per-remote-address token bucket
# rate_burst = 5
# [log]
# file = "~/.local/share/archie/logs/archied.log"
# level = "info"
# The cron/scheduling ticker engine: how often scheduled jobs are checked,
# how many may run at once, and how long one may run. The engine polls a job
# store for what is due and dispatches each due job to the delivery it names
# -- so nothing here schedules anything by itself, it only tunes the timing.
# Absent is valid: every field defaults independently, and a section naming
# only one of them still gets the defaults for the other two.
#
# Zero (or absent) takes the default named below. A NEGATIVE value is a
# startup error, not a clamp: running something other than what was written
# is how a misconfiguration stays invisible. Zero cannot mean "off" here for
# the same reason it cannot in [tools.tool_policy] -- it is indistinguishable
# from an unset key.
# [scheduling]
# interval = "60s" # tick cadence: how often due jobs are checked.
# # Absent/zero means 1m. The finest granularity a
# # cron-style schedule needs, and polling a local
# # job store that often costs nothing.
# max_parallel = 4 # caps simultaneous parallel-pool runs, so a store
# # reporting many jobs due at once (the first tick
# # after long downtime, typically) cannot launch an
# # unbounded fan-out. Absent/zero means 4. It does
# # not bound the sequential pool, which is one by
# # definition.
# job_timeout = "1h" # bounds one run. Absent/zero means 1h. A job that
# # has not finished in an hour is stuck, and leaving
# # it in flight would suppress every later run of the
# # same job forever.
# events_sink = "none" # "bus" publishes each run and failure on the event
# # stream, which is what the dashboard timeline reads;
# # "none" (the default, same as leaving it unset)
# # leaves the engine unobservable -- a scheduled run
# # has no task or chat turn behind it, so with no
# # sink nothing anywhere records that it fired.
# # Any other value is a startup error, so a typo
# # cannot silently turn observability off.
# Playbook-binding at-rest encryption: [bindings].encryption_key resolves a
# 32-byte high-entropy key through the secret registry (engine + key) and seals
# each binding's HMAC secret in the bindings.secret column with AES-256-
# GCM. When the key is absent,
# binding secrets are stored as plaintext (the pre-t2db.7 behaviour) -- enabling
# encryption does not retroactively encrypt existing rows, which stay plaintext
# until they are edited. Rotation: after changing encryption_key, retain the
# previous material in previous_encryption_keys so rows sealed under the old
# key still decrypt, then drop it once no row references it. A reload that
# changes these keys requires a daemon restart.
# [bindings]
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
# previous_encryption_keys = [ { engine = "env", key = "ARCHIE_BINDING_KEY_OLD" } ]
# encryption_key = { engine = "env", key = "ARCHIE_BINDING_KEY" }
# Docker sandbox execution of archie-agent is mandatory for autonomous
# workflows. Omit this section to use the default image, lifetimes, and pull
# policy; the options below show the available overrides. If Docker or
# the image is unavailable, chat and the dashboard still start while tasks
# park explicitly; archied never falls back to a host agent loop.
# [containers]
# image = "ghcr.io/samcharles93/archie-agent:latest"
# max_concurrency = 4 # optional cap; 0/absent means no global cap
# max_uptime = "60m" # container lifetime cap
# volume_ttl = "72h" # max age for persistent repo volumes and Git clone caches
# pull_policy = "missing" # "missing" or "always"
#
# A private registry needs a credential the daemon sends on pull (an
# anonymous pull always answers 401 there, whatever the policy). The value is
# a Docker registry.AuthConfig JSON document -- {"username":"bot","password":"..."}
# ("identitytoken"/"registrytoken" are alternatives; "serveraddress" is
# optional and defaults to the image's registry). Unset means anonymous pulls,
# exactly as before this key existed; a reference that cannot be resolved
# warns and pulls anonymously rather than failing the daemon.
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" }
#
# Agent profiles a workflow selects with `profile: <name>`. A workflow that
# names none runs under [containers].image with every tool.
# Once the State Store holds container policies, edit profiles in the
# dashboard (Settings, Advanced); a stored set replaces the file's.
# [containers.profiles.network-investigator]
# image = "archie-agent-net:local" # docker compose build agent-net; empty uses [containers].image
# tools = [] # allowlist over MCP, script and plugin tools; empty allows all
# A Kit profile runs every agent stage on an external CLI packaged as a Kit v3
# image: one workload Kit or published Kit set (which merges a workload with
# its mixins), pinned by digest.
# [containers.profiles.claude]
# kit = "docker/claude-code-kit@sha256:<digest>"
# adapter = "claude-code" # claude-code, codex, pi, omp or copilot; empty runs without capture tools or usage
#
# Credential bindings map a Kit's credential@1 service name to a secret. A
# binding alone grants nothing -- an identity resolves it only when its own
# org matches and the service is in its granted_credentials
# ([[identities]] above). Once the State Store holds it, edit bindings in the
# dashboard (Settings, Advanced); a stored set replaces the file's.
# [[containers.credentials]]
# service = "openai"
# org = "acme" # empty means the default org
# secret = {engine = "env", key = "OPENAI_API_KEY"}
# Access records: how long a recorded access denial is kept before the State
# Store's sweep deletes it. Zero means 90 days.
# [access]
# denial_retention = "2160h"
# At least one [[repos]] entry is required before archied will poll
# anything -- it is deliberately left commented rather than shipped active:
# an active example here validates as a normal, working repo (owner/name are
# only checked for non-empty), so archied would silently start polling a
# repository that doesn't exist. archied setup does not write this section
# ([[repos]] is an array of tables, which the text-patching setup uses
# cannot target) -- add at least one entry by hand.
#
# [[repos]]
# owner = "your-github-username"
# name = "todo"
# base = "main"
# ecosystem = "go" # "go", "python", "node", "rust", or "custom"
# # Override the ecosystem defaults when needed:
# # preflight = [["go", "version"]]
# # test_glob = "*_test.go"
# protect = ["_templ.go"]
# gate = [
# ["templ", "generate", "./components/"],
# ["go", "vet", "./..."],
# ["go", "build", "./..."],
# ["golangci-lint", "run"],
# ["go", "test", "./...", "-count=1"],
# ]
# # allow_concurrent = true # let the daemon run multiple tasks for this repo at once instead of
# # FIFO-serializing them; only safe when concurrent worktrees won't collide
# # (e.g. different base branches or packages per task). Still bounded by
# # [containers].max_concurrency globally.
# # persistent_storage = true # reuse a per-repo Docker volume and Git object cache until volume_ttl
# # max_retries = 5 # per-repo override of the global max_retries above
# Where releases and the extension catalogue come from on a new instance: an
# OCI repository and the base64 ed25519 key it signs with. Blank is the
# official source. Once stored, change them in the dashboard settings.
# [distribution]
# releases = "registry.example/owner/archie"
# releases_key = "base64 public key"
# catalogue = "registry.example/owner/archipelago/catalogue"
# catalogue_key = "base64 public key"
# ── Tools ───────────────────────────────────────────────────────────────────
# Limits on what a tool may return. These bound how much of the context window
# one tool call can spend: the workspace file tools truncate themselves, but
# skill bodies and MCP server results otherwise arrive whole.
#
# Zero (or absent) takes the default. A NEGATIVE value disables the limit --
# zero cannot mean "off" because it is indistinguishable from an unset key.
# [tools.tool_policy]
# max_result_chars = 50000 # cap on one tool result; -1 for no cap
# spill_dir = "" # unset by default, which truncates oversized results
# # inline. When set, a result over the cap is written
# # here in full and the model is handed the path.
# # It MUST be inside chat.workspace: the read tool
# # refuses paths outside it, so a spill anywhere else
# # is a reference the model cannot open -- worse than
# # truncating. Startup warns if it is outside.
# # Task agents work in their own worktree and cannot
# # read it at all; they always truncate.
# The web_fetch tool: retrieve a URL and return readable text.
# [tools.web_fetch]
# enabled = true # set false to withdraw the tool entirely
# timeout = "30s"
# max_bytes = 2000000
# allow_private_networks = false
# # Off by default, and worth leaving off. archied's own dashboard, NATS and
# # the Docker API answer on loopback and private addresses, and the URL to
# # fetch arrives through chat -- an untrusted path, since a forge issue body
# # or an inbound email can be quoted into a turn. The address is checked at
# # dial time rather than on the URL string, so a public name that resolves to
# # a private address is refused too. Turn this on only for a homelab endpoint
# # you intend Archie to reach.
# The generate_video tool: text-to-video via MiniMax's API. Off by default,
# unlike web_fetch -- this spends real API credits per call, so it needs an
# explicit opt-in and a working key before it is registered at all.
# [tools.minimax]
# enabled = true
# api_key = { engine = "env", key = "MINIMAX_API_KEY" }
# base_url = "" # override the API host; leave unset in normal operation
# # Generation is synchronous from the model's point of view: the tool call
# # blocks until MiniMax reports the video ready or failed, which can take
# # several minutes. The result is a hosted URL delivered through whatever
# # channel supports gateway.MediaSender (Telegram today); channels without
# # that support get the URL as a plain link in the reply text instead.
# Long-running agent loops that maintain memory, skills and — in dry run —
# file follow-up issues from recent runs. Definitions are data: the server
# validates them and the gateway applies them live.
# [[curators]]
# name = "self-intake"
# interval = "1h"
# tools = ["run_list", "run_events", "issue_list"]
# instructions = """
# You are archie's self-intake curator, in dry run. Each pass: list recent
# task runs with run_list, inspect anything parked or failed with run_events,
# check issue_list for each repo so nothing already open is repeated, then
# report candidate follow-up issues, each tied to the run that produced it.
# Do not create issues.
# """
# To let it file: add "issue_create" to tools and tell it to file each
# candidate (citing the run) instead of only reporting it.
+20 -24
View File
@@ -1,8 +1,6 @@
# Running this distribution
This archive contains five linux/amd64 binaries:
Each service owns its data and reaches the others only through their gRPC
This archive holds the linux/amd64 binary for each service. Each service owns its data and reaches the others only through their gRPC
contracts (or NATS, for task actions):
| Service | Owns | Reaches |
@@ -13,25 +11,28 @@ contracts (or NATS, for task actions):
| `archie-messaging` | the Telegram, email and webhook channel connections | Gateway; State Store for channel settings |
| `archie-ui` | the dashboard and the webhook capture receiver | Gateway; State Store |
`archied playbooks lint` checks playbook binding YAML before it reaches the
daemon, and `archied playbooks serve` is its language server for editors.
Without `archie-messaging` the channels are simply absent, so it needs a unit
of its own (`deployments/systemd-user-service.md`).
`archie-agent` (the per-task sandboxed runtime) is **not** in this archive —
it only ever runs inside the Docker container `archied` spawns per task, never
as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
`archie-agent` (the per-task sandboxed runtime) has no unit of its own. The
agent image is a separate thing, pulled for the containers `archied` spawns
per task: `[containers].image` defaults to
`git.catlow.cloud/sam/archie-agent:latest`, while this archive's `release.json`
pins the digest the release published. Set `[containers].registry_auth` when
that reference is on a registry that needs a login -- see
`deployments/systemd-user-service.md#6-pinning-the-archie-agent-image`.
## Quickstart
1. Pick a starting configuration. The full set of annotated templates lives
in this repository's `deployments/` directory on GitHub
(<https://github.com/samcharles93/archie-core/tree/main/deployments>) —
(<https://offloaded.dev>) —
`standalone.toml` (no forge, the simplest start),
`single-forge-github.toml`, `multi-forge-github-gitea.toml` and
`docker-nats-stack.toml` cover the common cases. Every one needs
PostgreSQL 18 at `database_url`. Copy whichever fits to:
`single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs
PostgreSQL 18 with the `archie_migrator` and `archie_runtime` roles created
once by `archie-state-store provision` (see `deployments/README.md`);
`docker compose up -d postgres` plus that command gives the local default.
Copy whichever fits to:
```bash
mkdir -p ~/.config/archie
@@ -61,13 +62,7 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
4. For a persistent, 24/7 deployment instead of a foreground run, follow the
systemd user-unit runbook:
<https://github.com/samcharles93/archie-core/blob/main/deployments/systemd-user-service.md>.
## Verifying an install
`archied playbooks lint -dir <playbooks-dir>` validates playbook binding YAML
against the same schema `archied` loads at startup — run it against your
playbooks directory before pointing `archied` at it.
<https://offloaded.dev>.
## Version
@@ -85,10 +80,11 @@ an install (or an upgrade across v1.30.0) needs its unit as well -- see
### Native self-update
Install on Settings → Status runs `archied update install -version X`, which
downloads the release's Linux/amd64 zip and verifies it against `SHA256SUMS`
before unpacking it. Every host binary in the zip must report `X`. It then pulls
the agent image `release.json` pins by digest, backs up the database to
Install on Settings → Status runs `archied update install -version X` against
the release source in the update settings. It fetches release `vX`, refuses it
unless the source's key signed its statement, and downloads the Linux/amd64 zip
only if it hashes to the digest that statement names. Every host binary in the
zip must report `X`. It then pulls the agent image the statement pins by digest, backs up the database to
`db.pre-update.dump` in the state directory, stages the new binaries beside the
live ones and hands the transaction to `archied update watchdog` in a process of
its own (a transient systemd user unit). Nothing that runs changes until the
+32 -4
View File
@@ -7,9 +7,6 @@ This directory contains configuration templates and guides for different deploym
- **[`single-forge-github.toml`](./single-forge-github.toml)**:
Standard single-forge deployment managing multiple GitHub repositories under a single bot account and GitHub token.
- **[`multi-forge-github-gitea.toml`](./multi-forge-github-gitea.toml)**:
Multi-identity deployment running GitHub and a self-hosted Gitea instance simultaneously with distinct bot accounts, tokens, and repository sets.
- **[`standalone.toml`](./standalone.toml)**: start here. Event-driven
automation with no forge or repositories, local Ollama models, loopback
services and no tokens.
@@ -45,7 +42,9 @@ systemctl --user start archied
Start order does not matter: a service waits for its peers and reports them as
degraded meanwhile. Every template needs PostgreSQL 18 at `database_url`;
`docker compose up -d postgres` provides the default one.
`docker compose up -d postgres` provides the default server. Its two login
roles are created once per database by `archie-state-store provision` -- see
[Database roles](#database-roles).
The State Store service (`archie-state-store`) owns the task data in the
PostgreSQL database `database_url` names and serves the `StateStore` gRPC
@@ -57,6 +56,35 @@ gateway address, because a container cannot reach the host's loopback. A
non-loopback address needs `[tls]` certificates from your own CA; see
`config.example.toml`.
## Database roles
The services do not connect as the database owner. `archie-state-store
provision` creates, or reconciles, two login roles in an existing PostgreSQL
database and hands the schema to one of them:
- `archie_migrator` owns the schema and its objects and runs the goose
migrations;
- `archie_runtime` may read and write rows (SELECT, INSERT, UPDATE, DELETE,
sequence USAGE, function EXECUTE) and has no CREATE privilege, so it cannot
change the schema.
Run it once per database with a role allowed to create roles and take ownership
of the schema (the database owner or a superuser), then point the templates at
the two roles: `database_url` is the runtime URL and `migration_database_url`
the migration one. The command is idempotent, so re-running it after an upgrade
reconciles objects a migration added.
```bash
archie-state-store provision \
-admin-url "postgres://owner:secret@db:5432/archie" \
-runtime-url "postgres://archie_runtime:secret@db:5432/archie" \
-migration-url "postgres://archie_migrator:secret@db:5432/archie"
```
The bundled installer and `task dev` run this for you. A configuration with only
`database_url` keeps working exactly as before: that one role applies the
schema and serves, which is what an install that has not split the roles does.
## Running the dashboard
The dashboard is served by the standalone UI Service (`archie-ui`), not by
+42
View File
@@ -0,0 +1,42 @@
name: archie
services:
archie-db:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: archie
POSTGRES_USER: archie_owner
POSTGRES_PASSWORD: ${ARCHIE_OWNER_PASSWORD:?}
ARCHIE_APP_PASSWORD: ${ARCHIE_APP_PASSWORD:?}
volumes:
- ./postgres:/var/lib/postgresql
- ./initdb:/docker-entrypoint-initdb.d:ro
networks: [internal]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U archie_owner -d archie"]
interval: 5s
timeout: 3s
retries: 20
archie:
image: gcr.io/distroless/static-debian12:nonroot
restart: unless-stopped
command: ["/archie/archie", "-config", "/archie/config.toml"]
# Docker's default seccomp profile plus the one clone the extension host
# needs to confine an extension in its own user and network namespace.
security_opt:
- seccomp=./seccomp.json
volumes:
- ./bin/archie:/archie/archie:ro
- ./config.toml:/archie/config.toml:ro
- ./extensions:/archie/extensions:ro
ports:
- "${ARCHIE_BIND:?}:8080"
networks: [internal]
depends_on:
archie-db:
condition: service_healthy
networks:
internal: {}
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/env bash
# Deploys the single binary's stack to a host over ssh: deploy.sh root@staging-host.
# The first run creates the secrets on the host; they never leave it.
set -euo pipefail
target=${1:?usage: deploy.sh user@host [bind-address:port]}
bind=${2:-}
here=$(cd "$(dirname "$0")" && pwd)
repo=$(cd "$here/../.." && pwd)
dir=/root/archie
version=$(git -C "$repo" describe --tags --always --dirty)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -C "$repo" -trimpath \
-ldflags "-X github.com/samcharles93/archie-core/internal/buildinfo.Version=$version" \
-o "$here/.build/archie" ./cmd/archie
ssh "$target" "mkdir -p $dir/bin $dir/initdb $dir/extensions"
scp -q "$here/compose.yml" "$target:$dir/compose.yml"
scp -q "$here/seccomp.json" "$target:$dir/seccomp.json"
scp -q "$here/initdb/01-roles.sh" "$target:$dir/initdb/01-roles.sh"
scp -q "$here/.build/archie" "$target:$dir/bin/archie.new"
ssh "$target" BIND="$bind" DIR="$dir" bash -s <<'REMOTE'
set -euo pipefail
cd "$DIR"
chmod 755 initdb/01-roles.sh
mv bin/archie.new bin/archie && chmod 755 bin/archie
if [ ! -f .env ]; then
[ -n "$BIND" ] || { echo "first deploy needs a bind address, e.g. 10.0.0.1:8099" >&2; exit 1; }
umask 077
printf 'ARCHIE_OWNER_PASSWORD=%s\nARCHIE_APP_PASSWORD=%s\nARCHIE_BIND=%s\n' \
"$(openssl rand -hex 24)" "$(openssl rand -hex 24)" "$BIND" > .env
fi
if [ ! -f config.toml ]; then
set -a; . ./.env; set +a
umask 077
cat > config.toml <<CONFIG
listen = "0.0.0.0:8080"
[database]
url = "postgres://archie_app:${ARCHIE_APP_PASSWORD}@archie-db:5432/archie?sslmode=disable"
owner_url = "postgres://archie_owner:${ARCHIE_OWNER_PASSWORD}@archie-db:5432/archie?sslmode=disable"
CONFIG
chown 65532:65532 config.toml
fi
# The admin token guards /api/. Only its hash goes in the config, as a
# top-level key, so it must come before the [database] table.
if ! grep -q '^admin_token_sha256' config.toml; then
umask 077
openssl rand -hex 32 | tr -d '\n' > admin-token
hash=$(sha256sum admin-token | cut -d' ' -f1)
sed -i "1i admin_token_sha256 = \"$hash\"" config.toml
chown 65532:65532 config.toml
fi
# The age identity seals the credentials Archie keeps. It is made here and
# never leaves the host; back it up, or credentials die with it.
if ! grep -q '^age_identity' config.toml; then
umask 077
identity=$(bin/archie -new-age-identity)
sed -i "1i age_identity = \"$identity\"" config.toml
unset identity
chown 65532:65532 config.toml
fi
docker compose up -d --remove-orphans
docker compose up -d --force-recreate archie
REMOTE
echo "deployed $version to $target"
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
# Runs once, on an empty data directory. The owner (POSTGRES_USER) runs
# migrations; archie_app is the runtime role and holds no DDL rights.
set -eu
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" \
-v app_password="$ARCHIE_APP_PASSWORD" <<'SQL'
CREATE ROLE archie_app LOGIN PASSWORD :'app_password';
GRANT CONNECT ON DATABASE archie TO archie_app;
SQL
File diff suppressed because it is too large. Load diff
+39 -6
View File
@@ -9,29 +9,62 @@
# [web] entirely.
# `task dev` runs archie-state-store against this overlay, and the State Store
# fails closed without a PostgreSQL URL. This must reach the `postgres`
# fails closed without a PostgreSQL URL. These must reach the `postgres`
# service in docker-compose.yml, which `task dev` brings up first via
# dev:postgres -- keep the URL and that service in agreement.
# dev:postgres -- keep them and that service in agreement. dev:postgres also
# provisions the two roles: the services serve as archie_runtime and migrate
# as archie_migrator, while the Compose-created archie role is only the
# admin that created them.
bot_user = "archie-dev"
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
[web]
listen = "127.0.0.1:8484"
# The installed config may point [nats] at the optional external broker, which
# `task dev` never starts. An explicit empty url overrides it, so the daemon
# runs the embedded broker as in the e2e stack; the broker binds the host
# gateway, which task containers reach.
[nats]
mode = "embedded"
url = ""
# `task dev` runs archie-state-store via dev:state-store, which passes no
# -listen, so the listen below is the port the store binds. It must agree with
# the target: these two lines are the only place that pair is stated. Move them
# when a port is already taken on the host -- before the
# listen key existed the collision could only be worked around by hand-writing
# a matching target and passing -listen, and it read as a code fault.
#
# Task containers dial the target over the Docker bridge gateway, so the store
# listens on every interface and [tls] (issued by `task dev:tls`) is required.
[services.state]
target = "127.0.0.1:9091"
listen = "127.0.0.1:9091"
target = "172.17.0.1:9091"
listen = "0.0.0.0:9091"
[tls]
ca_file = "tmp/dev-tls/ca.pem"
cert_dir = "tmp/dev-tls"
# `task dev` runs archie-gateway via dev:gateway, which also passes no -listen:
# the listen below is what it binds. Stated explicitly so the value archie-ui
# dials is visible next to the State Store one.
[services.gateway]
target = "127.0.0.1:8585"
listen = "127.0.0.1:8585"
listen = "127.0.0.1:8585"
[services.daemon]
target = "127.0.0.1:8587"
listen = "127.0.0.1:8587"
# Dry-run self-intake curator (#1770): surveys recent runs and reports
# candidate follow-up issues as pass summaries; declares no issue-creating
# tool, so it cannot file. Needs a chat model configured to run at all.
[[curators]]
name = "self-intake"
interval = "1h"
tools = ["run_list", "run_events", "issue_list"]
instructions = """
You are archie's self-intake curator, in dry run. Each pass: list recent task runs with run_list, inspect anything parked or failed with run_events, check issue_list for each repo so nothing already open is repeated, then report candidate follow-up issues — concrete, each tied to the run that produced it. Do not create issues; this pass reports only (no issue-creating tool is declared, so it cannot). End your reply with the report.
"""
+13 -7
View File
@@ -13,13 +13,15 @@
poll_interval = "60s"
bot_user = "archie"
diff_cap_lines = 0
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
# `docker compose up -d postgres` provides the local default; point it at
# your own Postgres 18 server otherwise. The services serve as archie_runtime
# and migrations run as archie_migrator; create both once with
# `archie-state-store provision -h` (deployments/README.md).
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
[services.gateway]
target = "127.0.0.1:8585"
@@ -57,16 +59,20 @@ mode = "external"
# The pinned Compose-network gateway is reachable from both the host daemon
# and the task containers it launches on archie-core_default.
url = "nats://172.19.0.1:4222"
token_env = "NATS_TOKEN"
callout_issuer_seed_env = "NATS_CALLOUT_SEED"
[containers]
network = "archie-core_default"
# Pin your own registry's tag/digest -- never deploy against a bare
# ":latest" reference, which can change under a running deployment with no
# warning. See deployments/systemd-user-service.md#pinning-the-archie-agent-image
# for the pinning convention this repo follows for its own GHCR image.
# warning. See deployments/systemd-user-service.md#6-pinning-the-archie-agent-image
# for the pinning convention this repo follows for its own agent image.
image = "git.example.com/you/archie-agent:v1.21.0" # or "@sha256:..." for a production digest pin
max_concurrency = 4
max_uptime = "60m"
# Must outlast the whole-task limit (default 4h), or the reaper ends a run the
# task budget would have parked.
max_uptime = "5h"
# "missing": pull only when the image is absent locally. "always" against a
# private registry answers 401 because the daemon sends no credentials, so
# refresh the agent by hand: docker compose pull agent
-102
View File
@@ -1,102 +0,0 @@
# ==============================================================================
# Multi-Forge (GitHub + Gitea) Deployment Example
#
# Runs GitHub and a self-hosted Gitea instance simultaneously.
# Each [[identities]] entry defines its own forge, token, and repository list.
# Each identity runs in an isolated background goroutine and worktree directory.
# ==============================================================================
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
[services.gateway]
target = "127.0.0.1:8585"
# The State Store gRPC service owns the PostgreSQL task data; archied and
# archie-gateway dial it and never open those tables themselves.
# This deployment runs the agent in containers, so the target is the Docker
# bridge gateway (172.17.0.1) the container can reach. A non-loopback address
# needs [tls]; see config.example.toml.
[services.state]
target = "172.17.0.1:9090"
[models]
triage = "openai/gpt-6-luna"
planner = "openai/gpt-6-luna"
builder = "openai/gpt-6-luna"
[providers.openai]
class = "openai"
api_key_env = "OPENAI_API_KEY"
[nats]
mode = "embedded"
[containers]
# Pinned to a verified digest -- archie-agent has no published semver tag
# yet (CI only pushes :latest). See
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
pull_policy = "missing"
[budgets]
max_steps = 60
wall_clock = "30m"
# ------------------------------------------------------------------------------
# Identity 1: GitHub Bot
# ------------------------------------------------------------------------------
[[identities]]
name = "github-bot"
bot_user = "archie-github"
bot_email = "archie-github@users.noreply.github.com"
[identities.forge]
type = "github"
host = "https://github.com"
token = { engine = "env", key = "ARCHIE_GITHUB_TOKEN" }
[identities.dispatch]
trigger = "assignee"
ack_reaction = "eyes"
[[identities.repos]]
owner = "my-org"
name = "github-repo-one"
ecosystem = "go"
[[identities.repos]]
owner = "my-org"
name = "github-repo-two"
ecosystem = "node"
# ------------------------------------------------------------------------------
# Identity 2: Self-Hosted Gitea Bot
# ------------------------------------------------------------------------------
[[identities]]
name = "gitea-bot"
bot_user = "archie-gitea"
bot_email = "archie-gitea@example.com"
[identities.forge]
type = "gitea"
host = "https://gitea.example.com"
token = { engine = "env", key = "ARCHIE_GITEA_TOKEN" }
[identities.dispatch]
trigger = "label"
ack_reaction = "eyes"
[[identities.repos]]
owner = "internal-team"
name = "gitea-repo-alpha"
ecosystem = "go"
[[identities.repos]]
owner = "internal-team"
name = "gitea-repo-beta"
ecosystem = "python"
+10
View File
@@ -0,0 +1,10 @@
jetstream { store_dir: /data }
http_port: 8222
authorization {
users: [{ user: "archie-callout", password: $NATS_TOKEN }]
auth_callout {
issuer: $NATS_CALLOUT_ISSUER
auth_users: ["archie-callout"]
}
}
+9 -7
View File
@@ -8,14 +8,16 @@
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# The State Store's PostgreSQL connection (PostgreSQL 18, required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
# `docker compose up -d postgres` provides the local default; point it at
# your own Postgres 18 server otherwise. The services serve as archie_runtime
# and migrations run as archie_migrator; create both once with
# `archie-state-store provision -h` (deployments/README.md).
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
poll_interval = "60s"
label = "archie"
bot_user = "archie-bot"
bot_email = "archie-bot@users.noreply.github.com"
diff_cap_lines = 400
# The Gateway Service owns conversational state and serves ChatContract over
# gRPC. Run archie-gateway alongside archied and archie-ui (the dashboard
@@ -54,9 +56,9 @@ mode = "embedded"
[containers]
# Pinned to a verified digest -- archie-agent has no published semver tag
# yet (CI only pushes :latest). See
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
# yet (a release publishes :latest and :sha-<commit>). See
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
pull_policy = "missing"
[budgets]
+6 -3
View File
@@ -15,9 +15,12 @@ bot_user = "archie"
work_dir = "~/.local/share/archie/work"
state_dir = "~/.local/share/archie" # NATS store, task logs
# PostgreSQL 18 connection (required).
# `docker compose up -d postgres` provides this local default; point it at
# your own Postgres 18 server otherwise.
database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
# `docker compose up -d postgres` provides the local default; point it at
# your own Postgres 18 server otherwise. The services serve as archie_runtime
# and migrations run as archie_migrator; create both once with
# `archie-state-store provision -h` (deployments/README.md).
database_url = "postgres://archie_runtime:archie@127.0.0.1:5432/archie?sslmode=disable"
migration_database_url = "postgres://archie_migrator:archie@127.0.0.1:5432/archie?sslmode=disable"
[services.gateway]
target = "127.0.0.1:8585"
+43 -28
View File
@@ -54,7 +54,7 @@ Open the dashboard to configure the organisation, workspace and first administra
Complete setup before exposing it publicly; remote access requires an HTTPS reverse proxy.
**Auth note:** `archie-ui` authenticates to the Gateway, State Store and
harness with its `[tls]` certificate (`archie-ui.pem`) from `config.toml`.
daemon with its `[tls]` certificate (`archie-ui.pem`) from `config.toml`.
For supervision, `GET /healthz` on `[web].listen` is the process's liveness
probe (token-free by design); the authenticated readiness surface lives at
@@ -134,9 +134,10 @@ Compose service or host `archie-agent` binary is required.
Docker must be installed and reachable by the service user. With no explicit
broker or container settings, Archie defaults `containers.image` to
`ghcr.io/samcharles93/archie-agent:latest`. Every profile shipped in
`deployments/` overrides that default with a pinned reference -- see
[Pinning the archie-agent image](#pinning-the-archie-agent-image) below. An
`git.catlow.cloud/sam/archie-agent:latest`. `single-forge-github.toml` and
`docker-nats-stack.toml` override that default with a pinned reference
(`standalone.toml` and `dev.toml` leave it) -- see
[Pinning the archie-agent image](#6-pinning-the-archie-agent-image) below. An
explicit equivalent, pinned the same way, is:
```toml
@@ -144,7 +145,7 @@ explicit equivalent, pinned the same way, is:
mode = "embedded"
[containers]
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
pull_policy = "missing"
```
@@ -168,36 +169,42 @@ fall back to a host model loop.
## 6. Pinning the archie-agent Image
`ghcr.io/samcharles93/archie-agent:latest` is a moving target: every push to
`main` that touches the runtime's package closure re-publishes it
(`.github/workflows/deploy.yml`), so `latest` can change under a running
deployment with no warning and no way to reproduce a prior build.
The release pipeline publishes
`git.catlow.cloud/sam/archie-agent` as `:v<version>` and `:sha-<commit>` when
the commit carries a release tag; an ordinary push to `main` publishes nothing
for the agent image, and `:latest` moves only when a release is promoted. A
distribution zip pins the image its own release
published, by digest, in `release.json`, and `archied update install` pulls
exactly that.
As of this writing, `archie-agent` has **no published semantic-version tag**
-- CI only pushes `:latest` to GHCR (`archied` is versioned independently per
`RELEASING.md`, but that versioning is not yet reflected as a registry tag for
the agent image). Until CI publishes one, the only reproducible reference is
a content digest, resolved once and pinned explicitly:
To pin by hand, prefer the version tag for readability, or a digest where you
need byte-for-byte reproducibility (a tag can be overwritten, a digest cannot):
```toml
[containers]
image = "ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090"
image = "git.catlow.cloud/sam/archie-agent:v<version>"
# or
image = "git.catlow.cloud/sam/archie-agent@sha256:<digest>"
```
This is the digest `latest` resolved to on 2026-09-05. Digest pinning is the
strongest option for production: it is immutable and independently
verifiable (`docker manifest inspect ghcr.io/samcharles93/archie-agent@sha256:...`),
at the cost of being opaque in a config file a human is meant to edit --
resolve a fresh digest deliberately (`docker pull ...:latest` followed by
`docker inspect --format '{{index .RepoDigests 0}}'`) rather than editing this
one in place expecting it to track new releases.
A reference on a registry that needs a login needs the credential in
`[containers].registry_auth` -- the release's own
`git.catlow.cloud/sam/archie-agent` digest is one, since an anonymous pull
cannot reach it:
If/when CI starts publishing a semantic-version tag for `archie-agent`
(e.g. `ghcr.io/samcharles93/archie-agent:v1.21.0`), prefer that tag for
day-to-day config readability, and reserve digest pinning for deployments
that need byte-for-byte reproducibility guarantees a tag alone cannot give
(tags are mutable pointers; a compromised or accidentally-overwritten tag
still resolves, a digest cannot).
```toml
[containers]
registry_auth = {engine = "env", key = "ARCHIE_REGISTRY_AUTH"}
```
The secret resolves to a Docker `AuthConfig` JSON document: the object
`docker login` stores under `auths`, without the surrounding map, and with a
personal access token that can read the package as the password --
`{"username":"<user>","password":"<token>"}`. Put it in
`~/.config/archie/env` as `ARCHIE_REGISTRY_AUTH` so it stays out of
`config.toml`. The field is file-owned and settled at boot, so a change takes
effect on restart; a value that cannot be read logs a warning and pulls
anonymously, which is the failure the task reports as a capability error.
The bundled update adapter snapshots the configured `[containers].image` before
rebuilding it and restores that image if the restarted daemon fails its health
@@ -218,11 +225,19 @@ docker compose up -d nats
[nats]
mode = "external"
url = "nats://172.19.0.1:4222"
token_env = "NATS_TOKEN"
callout_issuer_seed_env = "NATS_CALLOUT_SEED"
[containers]
network = "archie-core_default"
```
The broker defers every login to archied (NATS auth callout), so a worker logs
in with its run credential and reaches only its own task's subjects. Generate
an account nkey (`nk -gen account -pubout`), export its seed as
`NATS_CALLOUT_SEED` for archied and its public key as `NATS_CALLOUT_ISSUER` for
Compose, and set `NATS_TOKEN` to the same value in both.
The daemon hands workers the URL its own client connected to. The Compose
service name is not resolvable from the native host, and localhost inside a
worker is the worker itself; the pinned network gateway is reachable from both.
+22 -15
View File
@@ -8,7 +8,7 @@
# Embedded NATS is the normal deployment and needs no Compose service.
# State Store DB: docker compose up -d postgres
# External broker: docker compose up -d nats
# Build worker: docker compose build agent
# Build worker: task image:agent (stamps this checkout's version)
# Profile image: docker compose build agent-net
# Stop external: docker compose down
# Logs: journalctl --user -u archied -f (the daemon)
@@ -19,8 +19,9 @@ services:
# The standalone archie-state-store process's database. PostgreSQL 18 is
# the required minimum and target; `postgres.Open` refuses anything older.
# `task dev` brings this up before the State Store via dev:postgres. The
# credentials and database name below are the dev default mirrored by
# deployments/dev.toml's database_url -- change both together.
# This superuser is the dev database's admin: `task dev` runs archie-state-store
# provision after first start to create the least-privilege roles the
# mirroring deployments/dev.toml URLs name -- change them together.
postgres:
image: postgres:18
environment:
@@ -45,19 +46,19 @@ services:
nats:
image: nats:2.14-alpine3.22
# The client port is published on every interface (agent containers reach
# it over the bridge), so it refuses to start without a token. Set
# NATS_TOKEN here and name the same value in [nats] token_env.
entrypoint:
- sh
- -c
- '[ -n "$$NATS_TOKEN" ] || { echo "NATS_TOKEN is required" >&2; exit 1; }; exec nats-server -js -m 8222 --auth "$$NATS_TOKEN"'
# it over the bridge), so it defers every login to archied. Set NATS_TOKEN
# (name it in [nats] token_env) and NATS_CALLOUT_ISSUER, the public key of
# the account nkey seed named in [nats] callout_issuer_seed_env.
command: ["-c", "/etc/nats/nats.conf"]
environment:
NATS_TOKEN: ${NATS_TOKEN:-}
NATS_TOKEN: ${NATS_TOKEN:?NATS_TOKEN is required}
NATS_CALLOUT_ISSUER: ${NATS_CALLOUT_ISSUER:?NATS_CALLOUT_ISSUER is required}
ports:
- "4222:4222" # client
- "127.0.0.1:8222:8222" # monitoring (http://localhost:8222)
volumes:
- nats_data:/data
- ./deployments/nats-callout.conf:/etc/nats/nats.conf:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8222/healthz"]
@@ -75,7 +76,7 @@ services:
# "Started", which reads like a crash loop. Naming the service explicitly
# still works without activating the profile:
#
# docker compose build agent (also: task docker-build)
# docker compose build agent
# docker compose pull agent -- plain `pull` skips profiled services
#
# Routine freshness is handled by the daemon, which pulls this image per
@@ -86,10 +87,16 @@ services:
build:
context: .
dockerfile: Dockerfile
# Pinned to a verified digest -- archie-agent has no published semver
# tag yet (CI only pushes :latest). See
# deployments/systemd-user-service.md#pinning-the-archie-agent-image.
image: ghcr.io/samcharles93/archie-agent@sha256:870f1b1357979cfea23fccacb24166ebeb9ab321708ef2c2b218a763ed99b090
# Stamped into the agent so the version it reports is the one the rest of
# the install reports. `task image:agent` passes this checkout's version;
# a bare `docker build` passes nothing and the agent answers dev.
args:
RUNTIME_VERSION: ${RUNTIME_VERSION:-dev}
# A tag, not the digest: Compose refuses to build an image it is told to
# name by digest. The digest a task container actually runs is pinned in
# the daemon's own [containers] image, so nothing here decides it. See
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
image: git.catlow.cloud/sam/archie-agent:latest
# ── example agent profile image ─────────────────────────────────────
# The agent image plus network lookup tools, for a workflow that names
+19 -9
View File
@@ -1,8 +1,12 @@
# Generating a GitHub Token for Archie Core
This guide walks you through creating a GitHub Personal Access Token (PAT) for Archie Core.
This guide walks you through creating a GitHub Personal Access Token (PAT) for
Archie Core.
> **Important**: Archie Core requires a **Classic Personal Access Token** (starts with `ghp_...`). Fine-grained PATs currently lack necessary scope permissions for Git HTTP push operations, repository invitation acceptance, and cross-repository operations needed by the orchestrator.
> **Important**: Archie Core requires a **Classic Personal Access Token**
> (starts with `ghp_...`). Fine-grained PATs currently lack necessary scope
> permissions for Git HTTP push operations, repository invitation acceptance,
> and cross-repository operations needed by the orchestrator.
---
@@ -11,23 +15,29 @@ This guide walks you through creating a GitHub Personal Access Token (PAT) for A
Archie Core uses the GitHub API to:
1. Poll assigned or labelled issues (`archie:queued`).
2. Update issue labels as tasks transition (`archie:working`, `archie:pr`, `archie:parked`).
2. Update issue labels as tasks transition (`archie:working`, `archie:pr`,
`archie:parked`).
3. Post status comments and emoji reactions.
4. Create branches, commit code changes, and open Pull Requests for human review.
4. Create branches, commit code changes, and open Pull Requests for review.
---
## Step-by-Step Instructions: Creating a Classic Token
1. Navigate to [GitHub Settings → Developer Settings → Tokens (classic)](https://github.com/settings/tokens).
1. Navigate to
[GitHub Settings → Developer Settings → Tokens (classic)](https://github.com/settings/tokens).
2. Click **Generate new token** → **Generate new token (classic)**.
3. Set the **Note**: `Archie Core` (or your bot's name).
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for dedicated bot accounts).
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for
dedicated bot accounts).
5. Select the required scope:
- **`repo`** (Full control of private repositories — required for polling, commenting, pushing branches, and opening PRs).
- **`workflow`** (Optional — required if Archie needs to update GitHub Actions workflows).
- **`repo`** (Full control of private repositories — required for polling,
commenting, pushing branches, and opening PRs).
- **`workflow`** (Optional — required if Archie needs to update GitHub
Actions workflows).
6. Scroll to the bottom and click **Generate token**.
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to see it again!
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to
see it again!
---
+34 -37
View File
@@ -1,16 +1,15 @@
# Building your first playbook binding
This walks through the whole no-code path the event-capture epic promises:
point an external app's webhook at archie, see the real payload it sends,
map the fields you care about, bind them to a workflow, and watch the next
matching event turn into a task -- no code, no redeploy, no restart.
This walks through the whole no-code path the event-capture epic promises: point
an external app's webhook at archie, see the real payload it sends, map the
fields you care about, bind them to a workflow, and watch the next matching
event turn into a task -- no code, no redeploy, no restart.
## 1. Create a source and send a test event
Open **Events → Inspector** and click **New source**. Archie shows the
source's URL and signing secret once; copy both. Point the external app's
webhook at that URL. Send one real
event however is easiest for a first test, e.g.:
Open **Events → Inspector** and click **New source**. Archie shows the source's
URL and signing secret once; copy both. Point the external app's webhook at that
URL. Send one real event however is easiest for a first test, e.g.:
```bash
curl -X POST http://localhost:8484/webhooks/capture/sentry \
@@ -18,25 +17,25 @@ curl -X POST http://localhost:8484/webhooks/capture/sentry \
-d '{"issue": {"title": "NullPointerException in checkout"}, "level": "error"}'
```
This event isn't signed yet, so it's captured but marked **unauthenticated**
-- visible for you to design against, but incapable of triggering anything: an unauthenticated event can never match a binding.
This event isn't signed yet, so it's captured but marked **unauthenticated** --
visible for you to design against, but incapable of triggering anything: an
unauthenticated event can never match a binding.
## 2. Inspect the captured payload
Open the dashboard's **Event inspector** (`/captures`). Your test event
appears there with its real body -- this is schema-by-example: you're
looking at an actual payload from the actual sender, not guessing at a
schema in advance.
Open the dashboard's **Event inspector** (`/captures`). Your test event appears
there with its real body -- this is schema-by-example: you're looking at an
actual payload from the actual sender, not guessing at a schema in advance.
## 3. Map the fields you care about
Open **Field mappings** (`/mappings`) → **New mapping**. Pick your captured
event from the dropdown, then click through its payload tree on the right --
every key and value is clickable. Clicking a value binds it as a field
(name, JSON path, and an inferred type you can change). Add whichever fields
your workflow needs (e.g. the issue title), mark the ones that must be
present as **Required**, hit **Preview** to confirm they resolve correctly
against the real payload, then **Save**.
every key and value is clickable. Clicking a value binds it as a field (name,
JSON path, and an inferred type you can change). Add whichever fields your
workflow needs (e.g. the issue title), mark the ones that must be present as
**Required**, hit **Preview** to confirm they resolve correctly against the real
payload, then **Save**.
## 4. Create the binding
@@ -46,20 +45,20 @@ Open **Playbook bindings** (`/bindings`) → **New binding**:
- **Source** -- the same `<source>` segment from step 1 (e.g. `sentry`).
- **Field mapping** -- the one you just saved.
- **Workflow** -- which registered workflow should run on a match.
- **Repo pin** (optional) -- leave both blank to use the single configured
repo; set owner/repo explicitly if you run a multi-repo deployment.
- **Shared secret** -- a real secret (16+ bytes), never `test1234`. The
sender signs every request body with this via HMAC-SHA256 so archie can
tell a genuine event from anyone who finds the URL.
- **Repo pin** (optional) -- leave both blank to use the single configured repo;
set owner/repo explicitly if you run a multi-repo deployment.
- **Shared secret** -- a real secret (16+ bytes), never `test1234`. The sender
signs every request body with this via HMAC-SHA256 so archie can tell a
genuine event from anyone who finds the URL.
Save. The binding starts in **draft** -- nothing fires yet.
## 5. Approve it
A **draft** or freshly-**edited** binding needs an explicit human approval
before it can ever match a live event -- this is deliberate, not a missing
step: an operator authoring a binding is a considered act, an event arriving
is not, and nothing should self-arm. Click **Approve**. Status becomes **armed**.
A **draft** or freshly-**edited** binding needs explicit approval before it can
ever match a live event -- this is deliberate, not a missing step: an operator
authoring a binding is a considered act, an event arriving is not, and nothing
should self-arm. Click **Approve**. Status becomes **armed**.
## 6. Fire it for real
@@ -77,16 +76,14 @@ curl -X POST http://localhost:8484/webhooks/capture/sentry \
-d "$BODY"
```
This event is captured as **authenticated**, matched against your armed
binding, and dispatched into a new task through the exact same
gate/worktree/sandbox pipeline every other task goes through. Check
the **Tasks** page; a new task should appear, its body built from the fields
your mapping resolved.
This event is captured as **authenticated**, matched against your armed binding,
and dispatched into a new task through the exact same gate/worktree/sandbox
pipeline every other task goes through. Check the **Tasks** page; a new task
should appear, its body built from the fields your mapping resolved.
## Editing a live binding
Any edit to an armed binding -- even a typo fix -- drops it back to
**pending_approval** automatically. This can't be bypassed by editing; it
has to be re-approved. When editing, leave the **Shared secret** field blank
to keep the existing secret; only fill it in if you're deliberately
rotating it.
**pending_approval** automatically. This can't be bypassed by editing; it has to
be re-approved. When editing, leave the **Shared secret** field blank to keep
the existing secret; only fill it in if you're deliberately rotating it.
-24
View File
@@ -1,24 +0,0 @@
# PR review benchmark
```
task bench:prreview
```
Reviews the 38 runnable Martian pull requests once each at `deep` depth with
the production pipeline, judges the posted comments against the golden
comments in `internal/app/prbench/martian.json`, and writes
`docs/benchmarks/pr-review-<timestamp>.md` (recall per PR, overall recall,
precision, models, archie version). Commit that file with the run.
- Models come from the config at `~/.config/archie/config.toml`: the reviewer
and judge both default to its `default` alias. Override with
`task bench:prreview -- -model ALIAS_OR_PROVIDER/MODEL -judge-model ALIAS_OR_PROVIDER/MODEL`.
Pick a judge other than the reviewer's model for an independent judgement.
Aliases set only in the dashboard are not in the file; pass a
`provider/model` ref instead.
- Pull requests are public, so no credential is needed. `GH_TOKEN` or
`GITHUB_TOKEN`, if set, only raises the GitHub API rate limit.
- `-problems ID,ID` runs a partial smoke run; its report says it is not the
acceptance run. A full run reports PASS when nothing failed and golden
micro-recall is at least 0.70.
- It is not part of `task test` and posts nothing to any pull request.
-200
View File
@@ -1,200 +0,0 @@
{
"/news/archie/1.0.0/": "/news/1.0.0/",
"/news/archie/1.1.0/": "/news/1.1.0/",
"/news/archie/1.10.0/": "/news/1.10.0/",
"/news/archie/1.11.0/": "/news/1.11.0/",
"/news/archie/1.11.1/": "/news/1.11.1/",
"/news/archie/1.12.0/": "/news/1.12.0/",
"/news/archie/1.13.0/": "/news/1.13.0/",
"/news/archie/1.14.0/": "/news/1.14.0/",
"/news/archie/1.15.0/": "/news/1.15.0/",
"/news/archie/1.16.0/": "/news/1.16.0/",
"/news/archie/1.16.1/": "/news/1.16.1/",
"/news/archie/1.17.0/": "/news/1.17.0/",
"/news/archie/1.17.1/": "/news/1.17.1/",
"/news/archie/1.18.0/": "/news/1.18.0/",
"/news/archie/1.19.0/": "/news/1.19.0/",
"/news/archie/1.19.1/": "/news/1.19.1/",
"/news/archie/1.19.10/": "/news/1.19.10/",
"/news/archie/1.19.2/": "/news/1.19.2/",
"/news/archie/1.19.3/": "/news/1.19.3/",
"/news/archie/1.19.4/": "/news/1.19.4/",
"/news/archie/1.19.5/": "/news/1.19.5/",
"/news/archie/1.19.6/": "/news/1.19.6/",
"/news/archie/1.19.7/": "/news/1.19.7/",
"/news/archie/1.19.8/": "/news/1.19.8/",
"/news/archie/1.19.9/": "/news/1.19.9/",
"/news/archie/1.2.0/": "/news/1.2.0/",
"/news/archie/1.20.0/": "/news/1.20.0/",
"/news/archie/1.21.0/": "/news/1.21.0/",
"/news/archie/1.22.0/": "/news/1.22.0/",
"/news/archie/1.23.0/": "/news/1.23.0/",
"/news/archie/1.24.0/": "/news/1.24.0/",
"/news/archie/1.25.0/": "/news/1.25.0/",
"/news/archie/1.26.0/": "/news/1.26.0/",
"/news/archie/1.27.0/": "/news/1.27.0/",
"/news/archie/1.28.0/": "/news/1.28.0/",
"/news/archie/1.29.0/": "/news/1.29.0/",
"/news/archie/1.3.0/": "/news/1.3.0/",
"/news/archie/1.3.1/": "/news/1.3.1/",
"/news/archie/1.30.0/": "/news/1.30.0/",
"/news/archie/1.31.0/": "/news/1.31.0/",
"/news/archie/1.32.0/": "/news/1.32.0/",
"/news/archie/1.32.1/": "/news/1.32.1/",
"/news/archie/1.33.0/": "/news/1.33.0/",
"/news/archie/1.34.0/": "/news/1.34.0/",
"/news/archie/1.35.0/": "/news/1.35.0/",
"/news/archie/1.36.0/": "/news/1.36.0/",
"/news/archie/1.37.0/": "/news/1.37.0/",
"/news/archie/1.37.1/": "/news/1.37.1/",
"/news/archie/1.38.0/": "/news/1.38.0/",
"/news/archie/1.39.0/": "/news/1.39.0/",
"/news/archie/1.4.0/": "/news/1.4.0/",
"/news/archie/1.4.1/": "/news/1.4.1/",
"/news/archie/1.40.0/": "/news/1.40.0/",
"/news/archie/1.41.0/": "/news/1.41.0/",
"/news/archie/1.41.1/": "/news/1.41.1/",
"/news/archie/1.41.2/": "/news/1.41.2/",
"/news/archie/1.42.0/": "/news/1.42.0/",
"/news/archie/1.43.0/": "/news/1.43.0/",
"/news/archie/1.44.0/": "/news/1.44.0/",
"/news/archie/1.44.1/": "/news/1.44.1/",
"/news/archie/1.45.0/": "/news/1.45.0/",
"/news/archie/1.46.0/": "/news/1.46.0/",
"/news/archie/1.47.0/": "/news/1.47.0/",
"/news/archie/1.47.1/": "/news/1.47.1/",
"/news/archie/1.47.2/": "/news/1.47.2/",
"/news/archie/1.47.3/": "/news/1.47.3/",
"/news/archie/1.48.0/": "/news/1.48.0/",
"/news/archie/1.48.1/": "/news/1.48.1/",
"/news/archie/1.49.0/": "/news/1.49.0/",
"/news/archie/1.49.1/": "/news/1.49.1/",
"/news/archie/1.49.2/": "/news/1.49.2/",
"/news/archie/1.49.3/": "/news/1.49.3/",
"/news/archie/1.49.4/": "/news/1.49.4/",
"/news/archie/1.5.0/": "/news/1.5.0/",
"/news/archie/1.50.0/": "/news/1.50.0/",
"/news/archie/1.50.1/": "/news/1.50.1/",
"/news/archie/1.51.0/": "/news/1.51.0/",
"/news/archie/1.51.1/": "/news/1.51.1/",
"/news/archie/1.52.0/": "/news/1.52.0/",
"/news/archie/1.53.0/": "/news/1.53.0/",
"/news/archie/1.54.0/": "/news/1.54.0/",
"/news/archie/1.54.1/": "/news/1.54.1/",
"/news/archie/1.54.2/": "/news/1.54.2/",
"/news/archie/1.54.3/": "/news/1.54.3/",
"/news/archie/1.6.0/": "/news/1.6.0/",
"/news/archie/1.7.0/": "/news/1.7.0/",
"/news/archie/1.8.0/": "/news/1.8.0/",
"/news/archie/1.9.0/": "/news/1.9.0/",
"/news/archie/1.9.1/": "/news/1.9.1/",
"/news/archie/1.9.10/": "/news/1.9.10/",
"/news/archie/1.9.11/": "/news/1.9.11/",
"/news/archie/1.9.2/": "/news/1.9.2/",
"/news/archie/1.9.3/": "/news/1.9.3/",
"/news/archie/1.9.4/": "/news/1.9.4/",
"/news/archie/1.9.5/": "/news/1.9.5/",
"/news/archie/1.9.6/": "/news/1.9.6/",
"/news/archie/1.9.7/": "/news/1.9.7/",
"/news/archie/1.9.8/": "/news/1.9.8/",
"/news/archie/1.9.9/": "/news/1.9.9/",
"/news/archied/1.0.0/": "/news/1.0.0/",
"/news/archied/1.1.0/": "/news/1.1.0/",
"/news/archied/1.10.0/": "/news/1.10.0/",
"/news/archied/1.11.0/": "/news/1.11.0/",
"/news/archied/1.11.1/": "/news/1.11.1/",
"/news/archied/1.12.0/": "/news/1.12.0/",
"/news/archied/1.13.0/": "/news/1.13.0/",
"/news/archied/1.14.0/": "/news/1.14.0/",
"/news/archied/1.15.0/": "/news/1.15.0/",
"/news/archied/1.16.0/": "/news/1.16.0/",
"/news/archied/1.16.1/": "/news/1.16.1/",
"/news/archied/1.17.0/": "/news/1.17.0/",
"/news/archied/1.17.1/": "/news/1.17.1/",
"/news/archied/1.18.0/": "/news/1.18.0/",
"/news/archied/1.19.0/": "/news/1.19.0/",
"/news/archied/1.19.1/": "/news/1.19.1/",
"/news/archied/1.19.10/": "/news/1.19.10/",
"/news/archied/1.19.2/": "/news/1.19.2/",
"/news/archied/1.19.3/": "/news/1.19.3/",
"/news/archied/1.19.4/": "/news/1.19.4/",
"/news/archied/1.19.5/": "/news/1.19.5/",
"/news/archied/1.19.6/": "/news/1.19.6/",
"/news/archied/1.19.7/": "/news/1.19.7/",
"/news/archied/1.19.8/": "/news/1.19.8/",
"/news/archied/1.19.9/": "/news/1.19.9/",
"/news/archied/1.2.0/": "/news/1.2.0/",
"/news/archied/1.20.0/": "/news/1.20.0/",
"/news/archied/1.21.0/": "/news/1.21.0/",
"/news/archied/1.22.0/": "/news/1.22.0/",
"/news/archied/1.23.0/": "/news/1.23.0/",
"/news/archied/1.24.0/": "/news/1.24.0/",
"/news/archied/1.25.0/": "/news/1.25.0/",
"/news/archied/1.26.0/": "/news/1.26.0/",
"/news/archied/1.27.0/": "/news/1.27.0/",
"/news/archied/1.28.0/": "/news/1.28.0/",
"/news/archied/1.29.0/": "/news/1.29.0/",
"/news/archied/1.3.0/": "/news/1.3.0/",
"/news/archied/1.3.1/": "/news/1.3.1/",
"/news/archied/1.30.0/": "/news/1.30.0/",
"/news/archied/1.31.0/": "/news/1.31.0/",
"/news/archied/1.32.0/": "/news/1.32.0/",
"/news/archied/1.32.1/": "/news/1.32.1/",
"/news/archied/1.33.0/": "/news/1.33.0/",
"/news/archied/1.34.0/": "/news/1.34.0/",
"/news/archied/1.35.0/": "/news/1.35.0/",
"/news/archied/1.36.0/": "/news/1.36.0/",
"/news/archied/1.37.0/": "/news/1.37.0/",
"/news/archied/1.37.1/": "/news/1.37.1/",
"/news/archied/1.38.0/": "/news/1.38.0/",
"/news/archied/1.39.0/": "/news/1.39.0/",
"/news/archied/1.4.0/": "/news/1.4.0/",
"/news/archied/1.4.1/": "/news/1.4.1/",
"/news/archied/1.40.0/": "/news/1.40.0/",
"/news/archied/1.41.0/": "/news/1.41.0/",
"/news/archied/1.41.1/": "/news/1.41.1/",
"/news/archied/1.41.2/": "/news/1.41.2/",
"/news/archied/1.42.0/": "/news/1.42.0/",
"/news/archied/1.43.0/": "/news/1.43.0/",
"/news/archied/1.44.0/": "/news/1.44.0/",
"/news/archied/1.44.1/": "/news/1.44.1/",
"/news/archied/1.45.0/": "/news/1.45.0/",
"/news/archied/1.46.0/": "/news/1.46.0/",
"/news/archied/1.47.0/": "/news/1.47.0/",
"/news/archied/1.47.1/": "/news/1.47.1/",
"/news/archied/1.47.2/": "/news/1.47.2/",
"/news/archied/1.47.3/": "/news/1.47.3/",
"/news/archied/1.48.0/": "/news/1.48.0/",
"/news/archied/1.48.1/": "/news/1.48.1/",
"/news/archied/1.49.0/": "/news/1.49.0/",
"/news/archied/1.49.1/": "/news/1.49.1/",
"/news/archied/1.49.2/": "/news/1.49.2/",
"/news/archied/1.49.3/": "/news/1.49.3/",
"/news/archied/1.49.4/": "/news/1.49.4/",
"/news/archied/1.5.0/": "/news/1.5.0/",
"/news/archied/1.50.0/": "/news/1.50.0/",
"/news/archied/1.50.1/": "/news/1.50.1/",
"/news/archied/1.51.0/": "/news/1.51.0/",
"/news/archied/1.51.1/": "/news/1.51.1/",
"/news/archied/1.52.0/": "/news/1.52.0/",
"/news/archied/1.53.0/": "/news/1.53.0/",
"/news/archied/1.54.0/": "/news/1.54.0/",
"/news/archied/1.54.1/": "/news/1.54.1/",
"/news/archied/1.54.2/": "/news/1.54.2/",
"/news/archied/1.54.3/": "/news/1.54.3/",
"/news/archied/1.6.0/": "/news/1.6.0/",
"/news/archied/1.7.0/": "/news/1.7.0/",
"/news/archied/1.8.0/": "/news/1.8.0/",
"/news/archied/1.9.0/": "/news/1.9.0/",
"/news/archied/1.9.1/": "/news/1.9.1/",
"/news/archied/1.9.10/": "/news/1.9.10/",
"/news/archied/1.9.11/": "/news/1.9.11/",
"/news/archied/1.9.2/": "/news/1.9.2/",
"/news/archied/1.9.3/": "/news/1.9.3/",
"/news/archied/1.9.4/": "/news/1.9.4/",
"/news/archied/1.9.5/": "/news/1.9.5/",
"/news/archied/1.9.6/": "/news/1.9.6/",
"/news/archied/1.9.7/": "/news/1.9.7/",
"/news/archied/1.9.8/": "/news/1.9.8/",
"/news/archied/1.9.9/": "/news/1.9.9/"
}
-497
View File
@@ -1,497 +0,0 @@
[
{
"version": "1.54.3",
"date": "2026-10-16",
"body": "### archied\n\n- Chat can help write a workflow: it reads your workflows and the step catalog, writes a definition, and checks it the same way saving does, fixing what the check reports. It does not save; paste the YAML it gives you into the editor's YAML view and save there."
},
{
"version": "1.54.2",
"date": "2026-10-16",
"body": "### archied\n\n- Tool calls from Gemini models (Interactions API) receive their arguments intact. Any tool that takes arguments, such as `dashboard_navigate` in chat, failed with \"invalid character '{' after top-level value\".\n\n### archie-agent\n\n- Agent steps on Gemini models (Interactions API) pass tools their arguments intact instead of failing to decode them."
},
{
"version": "1.54.1",
"date": "2026-10-16",
"body": "### archied\n\n- Update checks, `archied update install` and `install.sh` find releases at `github.com/samcharles93/archie-releases`, so a host can update again. A host on 1.54.0 or earlier still looks in the old place and has to be upgraded to 1.54.1 by hand once."
},
{
"version": "1.54.0",
"date": "2026-10-16",
"body": "**Upgrade note:** services now authenticate each other with TLS certificates from your own CA instead of shared tokens. Before upgrading a host whose services listen on anything but loopback (any host running agent containers), issue a certificate per service (`archied`, `archie-gateway`, `archie-messaging`, `archie-state-store`, `archie-ui`, each with its name as the DNS SAN and both server and client auth), add `[tls] ca_file` and `cert_dir` to `config.toml`, and remove every `target_token`, the `*_TOKEN` service variables and the `--token`/`--*-token` flags, including archie-ui's `-token` and `-token-file`. A unit that still passes a removed flag fails to start. See `config.example.toml`.\n\n### archied\n\n- Services authenticate each other with mutual TLS. Each process presents `<cert_dir>/<service>.pem`, peers must chain to `ca_file`, and a caller is identified by its certificate rather than by what it claims. Renewed certificates are picked up without a restart. Without `[tls]`, services listen on and dial loopback only. The harness setup terminal requires `[tls]`.\n- Every gRPC service caps the streams a connection holds, times out stalled handshakes, releases a dead client's streams, and drains for at most 10 seconds on shutdown. Messaging exits when its listener fails instead of staying up without delivering.\n- The dashboard has user accounts. First run opens browser setup for the organisation, workspace and first administrator; people then sign in with a password, a passkey or your identity provider, and account administration lives under Access. The shared dashboard token is gone; reach the dashboard remotely through an HTTPS reverse proxy.\n- `archied update install` updates a host in one transaction: it verifies the release, stages every binary, pulls the agent image by digest and backs up the database, then restarts the services in order and rolls everything back if archied is not healthy for two minutes.\n- Each workflow runs as the identity it declares, checked on every attempt along with the identity that started it. A workflow that declares none is refused, a called workflow runs as its caller's declared identity, and shipped workflows run as the instance root.\n- Test-run a workflow draft before saving it, with forge and push writes suppressed and recorded per step. The History tab lists a workflow's revisions, diffs them as YAML and on the canvas, restores one into the editor, and shows which revision each run used.\n- Start a task from the dashboard. The dashboard home shows activity and setup, and a running task has a read-only Sandbox tab that follows its container.\n- The topbar's Jump to is a command palette, settings lists open as accordions that wait for a new item to be saved, and history restores land as a draft applied from the save bar.\n- Labels, hints, alerts and empty states say what is wrong and what to do, without tutorial or marketing prose.\n- Org isolation is tighter: harness secrets, identity writes, principals, playbook dispatch and model selections in chat stay in the caller's org, instance settings are written by the system org only, and creating a source or reloading a channel is authorized against the target.\n- Binding dispatch claims its capture and enqueues the task atomically, so a capture cannot start two runs, and the run-time workflow check sees the binding event's signature and address.\n- Service-unhealthy alerts count their grace from the last report and also cover a service that went silent, and a restart no longer clears an alert still inside its grace. An invalid stored access policy raises an alert until it validates.\n- A failed cancel of a called workflow no longer leaves the caller running, retention spares captures still waiting to be dispatched, and EDA playbooks load and report at start instead of on first dispatch.\n- Chat model selection works again for provider models.\n\n### archie-agent\n\n- Each run acts as its workflow's declared identity.\n- A task snapshot carries only the model limits its aliases resolve to.\n- A build step's \"no changes\" result comes from its writable stages and clears once a commit lands.\n- Test runs suppress forge and push writes and record what they would have done.\n- The default persona is a reporting-focused identity prompt, without the one-question limit in chat."
},
{
"version": "1.53.0",
"date": "2026-10-11",
"body": "### archied\n\n- Every organisation's data is its own. Chats, tasks, events, transitions, steps, tool calls, run statistics, event sources, event types, mappings, bindings and agent memory are read and written in the org that owns them, and a request can no longer write into another org. Rows written before orgs existed move to their owner's org on upgrade.\n- An instance admin decides what each org may reach: the models it can use, and whether it may register providers under its own credentials. Org Settings gains a Models tab and instance Models gains Org access. The system org is never restricted; another org uses nothing until it is granted.\n- Models are addressed by alias. Aliases replace model roles, one resolver serves every purpose (agent steps, implement, PR review, MCP sampling, chat, embedding, transcription), and an unknown alias fails instead of falling back to a default. The step editor and the chat picker offer aliases, and a workflow naming one that does not exist is refused when saved.\n- Chat sessions belong to one org; a chat resolves its models in the caller's org and is billed to it, and a task run from chat posts its outcome back to that chat.\n- Add a member by provider subject, or by email as a placeholder that the first sign-in the provider vouches for claims.\n- The workflow canvas authors parallel branches as lanes, adds a switch step that runs the case matching a reference, and edits a call's interface. A step shows its role, its number and its run trace.\n- The workflows list shows each workflow's running count and latest run result, the canvas reveals its data-edge handles on hover, and restoring a version asks for confirmation.\n- Store packages can auto-update: a package given the policy is moved to the catalogue's newest digest by a State Store ticker. An update asking for more authority than was accepted waits as a pending update with the running version untouched; approving it accepts the new authority, and a rollback restores the previous version with the authority accepted against it.\n- Model provider keys never enter an agent container: the runtime reaches its providers through the egress proxy, which holds the keys. A task's own credential can no longer replace the workflow definition its run is pinned to, and a package workflow's triggers, tools and forge calls are bounded by the authority accepted for the package.\n- The dashboard warns when it is reachable from off-host over plain HTTP, and the wildcard listen address counts as off-host rather than loopback. Instance health, logs, config and identities, the setup checklist and the skill catalogue are system-org only, and API requests are refused until the access chain has loaded.\n- `/approve` reaches Telegram; the router served it but nothing published it.\n- A worktree a killed container left root-owned is taken back by the daemon, and a PR review's benchmark runner works again on configured models and public PRs.\n- An unserved `/api` path returns 404 instead of the dashboard page, and an input group's select no longer loses clicks to its addon.\n\n### archie-agent\n\n- The runtime reaches model providers through the egress proxy, so provider keys stay out of the container.\n- Agent steps resolve model aliases and their own org's models and credentials, failing on an unknown alias instead of falling back.\n- A switch step runs the case matching its reference.\n- A call waiting on another step is reconciled from durable steps, so it resumes after a daemon restart rather than stranding."
},
{
"version": "1.52.0",
"date": "2026-10-09",
"body": "### archied\n\n- The harness page's setup terminal opens a real session: it starts an ephemeral container from a Kit profile, runs the CLI's own login and captures the OAuth tokens at the provider's token endpoint. Point the dashboard at the daemon with `[services.harness].target` and a `HARNESS_TOKEN` and it stops answering 503; the terminal is created at your browser's size. Takeover of a live task is not in this release.\n- A credential's token endpoint is refused when the run is not granted that service, instead of proxy-ing the provider's real tokens into the container.\n- Settings → Profiles, Credential bindings and Playbooks are editable from the dashboard, and curator definitions can be changed and applied without a restart.\n- Settings say whether each one applies live or needs a restart, show what is consuming resources, and report whether an apply landed.\n- Status shows each service's dependency checks, the agent workers and the broker.\n- The Logs page reads recent logs from every service, not just the daemon.\n- Captures and webhook sources are scoped to the org that owns them: the list, retention and delivery authorization all act in the right org, and a workflow definition resolves in its own org.\n- Chat settings are attributed to the signed-in user, and Settings → Tokens explains when a personal token cannot be created.\n- A channel enabled after Archie started works immediately; a channel that fails on its own recovers; a failed channel is no longer reported as enabled, and stored channel settings no longer save duplicate or unnormalized values.\n- The task table sorts, the command palette no longer scrolls sideways or loses its highlight, unknown routes render a not-found page, and configuration reload failures are shown instead of passing silently.\n- A scheduled job whose payload names a dangerous command is refused.\n- A disabled model provider is never served from the ambient API key.\n- `generate_video` is backed by ai-sdk's MiniMax video provider.\n- A dashboard token is no longer written to the startup log.\n\n### archie-agent\n\n- `workflow.call`: a call is keyed on its declared step path, its key is freed once the callee reaches a terminal state, and a caller waiting on a callee releases its capacity instead of holding it.\n- `command.run` honours step retry and `on_failure`.\n- A value passed between steps keeps its declared type, and optional result booleans are enforced only when the workflow declares them.\n- Capture tools have their results checked against the declared schema.\n- A single-cycle run waits for its in-flight tasks before exiting, and identity tasks inherit live settings.\n- Kit containers run Docker's init as PID 1, so orphaned processes are reaped instead of accumulating inside a long task."
},
{
"version": "1.51.1",
"date": "2026-10-08",
"body": "### archied\n\n- Chat with OpenAI's gpt-6 models (gpt-6-luna and the rest) works with tools; a turn failed with \"Function tools with reasoning_effort are not supported\"."
},
{
"version": "1.51.0",
"date": "2026-10-08",
"body": "### archied\n\n- A secret engine enabled after Archie started (Bitwarden, for example) now supplies its keys straight away; providers that depended on it no longer stay disabled until a restart.\n- The dashboard chat has a microphone button: record a voice message and it is transcribed like a Telegram voice note. It shows only when a `transcription` model role is set under Settings → Models.\n- A file Archie sends in the dashboard chat is a download link for an hour, instead of a note that it can't be delivered.\n- Typing `/model` or `/personality` on its own in the dashboard chat offers the choices as buttons."
},
{
"version": "1.50.1",
"date": "2026-10-08",
"body": "### archied\n\n- When an update is rolled back, the log names the health check that failed instead of only \"unhealthy\"."
},
{
"version": "1.50.0",
"date": "2026-10-08",
"body": "### archied\n\n- Tools that need your approval ask for it again, and Archie can ask you a question or offer choices mid-reply. Since the services were split these never reached Telegram or the dashboard: approval-gated tools failed and questions were never asked.\n- The dashboard chat shows approvals as Approve / Always this session / Deny, choices as buttons, and questions with a reply field.\n- `/update` in the dashboard chat lists what's available with Install and Not now.\n- Settings → Status → Versions installs the update it shows; its Install button sent an empty request."
},
{
"version": "1.49.4",
"date": "2026-10-07",
"body": "### archied\n\n- Settings → Status and Settings → Extensions are split into tabs instead of one long page; the Versions table's status column ends at the card's edge.\n- Tools & MCP has one \"Add MCP server\" button; the transport is chosen in the form, and an unnamed new server is not an unsaved change.\n- Settings → Repositories shows the add field when no repositories are configured, instead of a blank page.\n- The unsaved-changes bar always rests at the bottom of the window."
},
{
"version": "1.49.3",
"date": "2026-10-07",
"body": "### archied\n\n- Settings → Status → Versions shows the Gateway as \"Update available\" with an Install button when a newer release exists; it read \"Unknown\" with no way to install. The Runtime row stays \"Unknown\" until an agent task has run.\n- The release channel buttons sit at the Updates card's right edge instead of mid-row."
},
{
"version": "1.49.2",
"date": "2026-10-07",
"body": "### archied\n\n- Carries the 1.49.0 and 1.49.1 changes, whose builds were never published. The update check reads GitHub releases directly and still offers only releases with a verifiable linux-amd64 zip."
},
{
"version": "1.49.1",
"date": "2026-10-07",
"body": "### archied\n\n- When the dashboard session expires, the page returns to the sign-in screen instead of showing errors on every page until a manual refresh."
},
{
"version": "1.49.0",
"date": "2026-10-07",
"body": "### archied\n\n- Extensions that declare no egress hosts (vault, email, gitea) reach the network again; only packages that declare their hosts are confined to them. The Accept dialog shows \"network: unrestricted\" for the rest.\n- The update check finds releases itself, and reuses a found release for ten minutes so repeated checks stay under GitHub's rate limit."
},
{
"version": "1.48.1",
"date": "2026-10-07",
"body": "### archied\n\n- **Settings → Status → Updates** now chooses only the release channel (stable, prereleases, or a pinned version). Update checks and installs always run the `archie-update-*` scripts installed beside the binaries; the dashboard can no longer set the command that runs."
},
{
"version": "1.48.0",
"date": "2026-10-07",
"body": "### archied\n\n- **Settings → Status → Updates** edits the update check and install commands. They default to the `archie-update-*` scripts installed beside the binaries, so a zip install shows **Install** on the Versions card with nothing configured. The `update_check_command` and `update_install_command` keys under `[chat.telegram]` are no longer read; remove them from `config.toml`.\n- `archie-update-install` run from a shell now reads `~/.config/archie/env`, so the pre-update backup of the bundled database no longer fails with `no password supplied`. Run it with `--auto` to install the newest release."
},
{
"version": "1.47.3",
"date": "2026-10-07",
"body": "### archied\n\n- **Settings → Extensions**: **Accept** in the authority review now accepts the extension, and **Remove** removes it. Both previously closed the dialog without doing anything."
},
{
"version": "1.47.2",
"date": "2026-10-06",
"body": "### archied\n\n- **Events → Inspector** now lists your capture sources with their real URLs and a **New source** button, replacing the `/webhooks/capture/<source>` placeholder. Sources no longer sit on the Bindings tab."
},
{
"version": "1.47.1",
"date": "2026-10-06",
"body": "### archied\n\n- The bundled PostgreSQL has no network and publishes no port: the services reach it through its Unix socket under `~/.local/share/archie/postgres`, so it no longer collides with another PostgreSQL on 5432. Leaving the database question blank in `archied setup` selects it.\n- The installer does not start the services when the bundled PostgreSQL fails to start; it names the command to read its logs.\n- On hosts that restrict unprivileged user namespaces (Ubuntu 23.10+), the installer prints an AppArmor profile allowing them for the Archie binaries only."
},
{
"version": "1.47.0",
"date": "2026-10-06",
"body": "### archied\n\n- Install with one command: `curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash` downloads this release, verifies its checksum and runs `archied setup`. `--from-source` builds a checkout instead.\n- `archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`.\n- The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume.\n- The release zip carries `docker-compose.yml`.\n- Extensions need unprivileged user namespaces, which Ubuntu 23.10 and later restrict. Allow them for the Archie binaries with an AppArmor profile; from the next release the installer prints it. Do not disable the restriction system-wide.\n- fix(app): assign the temp-file close result on the error path\n- fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers\n- fix(forge): refuse a review line number that does not fit an int\n- fix(storepkg): mask the tar mode to the permission bits before narrowing\n- fix(webui): navigate the Events chain once, not twice\n- feat(tools): fail the gate when docs cite a path that no longer exists\n- fix(webhookguard): verify uppercase-hex HMAC signatures\n- fix(configuration): make bot_user required, defaulted, and named\n- feat(workflow): add the command.run step type\n- fix(controlplane): an absent MCP server field inherits the file value\n- fix(build): restore the go fix fixpoint, and give the formatter one owner\n- fix(archied): restore contextcheck directives and drop unused adapter\n- feat(secretengine): serve secret engines as go-plugin extensions\n- refactor(statestore): own package for the State Store service; access reset moves to archie-state-store\n- refactor(archied): gateway owns model work; daemon drops chat runtime, tools, memory and curators\n- refactor(archiegateway): own package for the Gateway service\n- fix(services): services wait for peers instead of exiting; restarted broker keeps its endpoint\n- refactor(archieplaybooks): fold archie-playbooks into archied playbooks lint|serve\n- refactor(agentrun): agent stage contract moves to the domain layer\n- refactor(agentexec): model loop moves to agentexec/modelloop\n- fix(configuration): bindings encryption keys must use the env engine\n- feat(storepkg): fetch packages from any registry, plain HTTP on loopback only\n- feat(webui): install, accept and enable extensions from the dashboard\n- feat(presence): every service re-stamps a presence record in the State Store\n- refactor(plugin): delete Yaegi daemon plugins and plugin_dir\n- refactor(module): the log action is built in; delete the module loader and reconciler\n- refactor(skill): delete Yaegi skill scripts and the run_go_script tool\n- refactor(examples): the firewall workflow moves to archipelago\n- feat(presence): services card on the status page and archied status\n- feat(archiemessaging): verify update reports against archied's presence and restore release announcements\n- fix(configuration): an overlay stands in for a missing config file; dev overlay is complete\n- feat(access): edit org, workspace and object policies from the dashboard; refuse owner lockout\n- feat(access): instance network rules at the capture receiver; policies reload without a restart\n- feat(staterpc): attribute State Store calls to the calling service; policy audit records it\n- feat(controlplane): playbooks and agent profiles install from packages; the daemon reads eda-playbooks live\n- feat(forgeext): forge surface served by extensions; forge.type names the installed package\n- refactor(forge): github and gitea leave core; webhooks parse in the forge extension\n- feat(staterpc): the State Store derives org and actor from the principal archie-ui forwards\n- feat(channelext): chat channels served by extensions; messaging runs the enabled ones\n- refactor(channels): webhook and email run only as extensions; their channel settings go\n- feat(skills): skill packages project into a skills resource the gateway reads live\n- fix(gatewayrpc): sender_id and rate_limited cross the chat wire\n- fix(controlplane): change history names kinds and reads only the caller's org\n- feat(contracts)!: requests no longer name their org; the State Store derives it from the caller\n- feat(identity): personal API tokens, created and revoked from the dashboard, act as their owner\n- fix(archieui): a sign-in provider outage is a health issue, not a startup failure\n- feat(staterpc): one run credential per task, kept in the State Store, authorizes its store calls and its push\n- fix(forgerpc): forge calls need the run credential and reach only the run's own repository\n- feat(controlplane): identity credential grants edited from the dashboard and applied live\n- feat(daemon): a workflow that names an identity runs asLine truncated
},
{
"version": "1.46.0",
"date": "2026-10-02",
"body": "### archied\n\n- feat(workflow): declared workflow outputs for wait:true callers\n- feat(prreview): the operator-approval gate is PRReview's own stage-list entry\n- feat(staterpc): carry the review gate and re-review rounds, with one guarded response write\n- feat(prreview): the gate records the review it holds and posts the operator's answer\n- feat(taskactions): one approval path answers the review gate from every surface\n- feat(webui): the dashboard answers the review gate, including a re-review's instructions\n- feat(daemon): resolve the producing identity's org before publishing work\n- feat(webui): block invalid settings and show a field's former value\n- fix(workflow): derive a declared output's captures need for profile selection\n- fix(storepkg): validate every declared authority grant at the package descriptor\n- feat(archied): refresh the model catalog at runtime\n- feat(mcp): answer server-initiated sampling from the chat model\n- feat(container): send registry auth on image pull\n- feat(messaging): retract ephemeral replies after their TTL\n- feat(messaging): transcribe Telegram voice notes\n- fix(egress): take a run's credential kind from its binding, not the Kit\n- feat(webui): a live-apply setting reads as applied, never as a restart\n- feat(webui): the dashboard reads harness bindings and opens the setup terminal\n- feat(gateway): list the harness page in the dashboard page registry\n- feat(webui): the harness settings page and its setup terminal\n- fix(workflow): park environment gate failures without dispatching a builder\n- feat(messaging): adapter-facing clarify, picker and approval contract\n- feat(gateway): gate admin slash commands by sender policy\n- feat(plugins): load plugin and secret-engine files without a restart\n- fix(workflow): deliver the feasibility PRD to the forge issue\n- fix(messaging): report the daemon version this process was built from\n- fix(messaging): carry an inbound attachment's bytes to the gateway turn\n- fix(daemon): resume a retry whose worktree is gone\n- fix(archied): omit the max-token bound on reasoning-class models\n- fix(logging): file a task log record under its own event time\n- fix(control-plane): unify validation for the domain-managed kinds\n- feat(webui): let the operator choose the retry worktree mode\n- feat(agent): seed a starter SOUL and upgrade only untouched templates\n- feat(controlplane): add the writable review-settings resource\n- fix(messaging): transcribe voice notes on the model-owning side of the boundary\n- fix(messaging): gate the boundary on config reads, not only package links\n- feat(messaging): restart only the channel whose settings changed\n- feat(container): apply container-runtime-policies live\n- feat(tools): reconcile MCP servers and tool settings live\n- feat(messaging): add a per-turn interactive carrier for clarify and picker\n- feat(gateway): offer ask_user when the turn's channel can carry a question\n- feat(telegram): carry clarify and picker through the text fallback\n- fix(webui): pin the dashboard validators to the control plane's\n- refactor(agent): drop the SOUL upgrade branch with no shipped template\n- feat(agentworker): answer MCP sampling from the task's model\n- fix(workflow): bind the remediate worktree before the builder runs\n- fix(config): carry max_retries into the worker TaskConfig snapshot\n- fix(agentworker): supply the guardrail engine to every task run\n\n### archie-agent\n\n- feat(workflow): declared workflow outputs for wait:true callers\n- feat(prreview): the operator-approval gate is PRReview's own stage-list entry\n- feat(staterpc): carry the review gate and re-review rounds, with one guarded response write\n- feat(prreview): the gate records the review it holds and posts the operator's answer\n- feat(taskactions): one approval path answers the review gate from every surface\n- fix(workflow): derive a declared output's captures need for profile selection\n- fix(storepkg): validate every declared authority grant at the package descriptor\n- feat(mcp): answer server-initiated sampling from the chat model\n- feat(container): send registry auth on image pull\n- feat(messaging): retract ephemeral replies after their TTL\n- feat(messaging): transcribe Telegram voice notes\n- fix(egress): take a run's credential kind from its binding, not the Kit\n- fix(workflow): park environment gate failures without dispatching a builder\n- feat(messaging): adapter-facing clarify, picker and approval contract\n- feat(plugins): load plugin and secret-engine files without a restart\n- fix(workflow): deliver the feasibility PRD to the forge issue\n- fix(messaging): carry an inbound attachment's bytes to the gateway turn\n- fix(daemon): resume a retry whose worktree is gone\n- fix(logging): file a task log record under its own event time\n- fix(control-plane): unify validation for the domain-managed kinds\n- feat(webui): let the operator choose the retry worktree mode\n- fix(messaging): transcribe Line truncated
},
{
"version": "1.45.0",
"date": "2026-09-30",
"body": "### archied\n\n- fix(eda): reject a result map missing a field or needing a conversion\n- feat(eda): per-org workflow enable/disable gating bindings\n- feat(telegram): carry inbound media through the chat turn\n- fix(prsource): use a CodeQL-recognised containment guard when extracting archives\n- feat(store): key control-plane resources by (org, kind)\n- fix(store): refuse resource keys the audit key cannot disambiguate\n- fix(daemon): resume the task branch before container acquisition\n- feat(webui): show attachment metadata in the session transcript\n- feat(webui): name a workflow's declared inputs on the work-request form\n- feat(controlplane): carry the caller org from the request principal\n- fix(webui): the workflow handlers act in the caller's org\n- feat(kitrun): render the OAuth credential file with sentinels\n- feat(store): record accepted package authority against the pin\n- fix(workflow): the own-PR flow no longer parks on the operator-approval gate\n- feat(gateway): a TTL-bounded dedup gate for redelivered platform messages\n- feat(egress): capture the OAuth scope set and carry it to the harness secret\n- feat(kitrun): render the OAuth scopes and omit an uncaptured primary key\n- feat(store): project installed package contributions into org resources\n- feat(gateway): coalesce rapid-fire text events into one turn\n- fix(config): expand plugin, module and skills dirs like every other operator path\n- fix(webui): drop the config schema's editability advert\n- feat(webui): events counts, YAML reading, log rows and dashboard filters\n\n### archie-agent\n\n- feat(eda): per-org workflow enable/disable gating bindings\n- feat(telegram): carry inbound media through the chat turn\n- fix(prsource): use a CodeQL-recognised containment guard when extracting archives\n- feat(store): key control-plane resources by (org, kind)\n- feat(controlplane): carry the caller org from the request principal\n- feat(kitrun): render the OAuth credential file with sentinels\n- feat(store): record accepted package authority against the pin\n- fix(workflow): the own-PR flow no longer parks on the operator-approval gate\n- feat(egress): capture the OAuth scope set and carry it to the harness secret\n- feat(kitrun): render the OAuth scopes and omit an uncaptured primary key\n- feat(store): project installed package contributions into org resources"
},
{
"version": "1.44.1",
"date": "2026-09-29",
"body": "### archied\n\nTwo fixes to tasks that could not get past their workflow definition.\n\n- **Approving a task no longer parks it again.** A task requeued under a\n different workflow kept the previous run's definition pinned, so the worker\n refused to compile the dispatch — it named `feasibility` while the row named\n `implement` — and the task parked immediately, identically on every further\n approval, which left `decline` as the only working operator action.\n The daemon now re-pins whenever the pinned definition's id disagrees with the\n task's workflow. A pin that is present, digest-valid and id-consistent is\n still a strict no-op, so an operator's own definition override survives a\n dispatch unchanged.\n- **A shipped workflow definition now reaches an existing install.** A stored\n seed was consulted only for a resource the store did not already hold, so a\n document that changed in the build never reached a database an earlier\n release had seeded. For workflow definitions that is a total outage rather\n than a stale setting: the collection validates as one document, so a stored\n step type this build no longer has failed every task's pin, whatever workflow\n the task named — and the documented recovery, removing the resource and\n restarting, wrote nothing either, because the store answered the seed's known\n request ID from a history that outlives the resource. A seed now refreshes a\n kind it wrote the newest revision of and re-creates a resource that is gone,\n while an operator's own replacement is never undone.\n\n### archie-agent\n\nThe runtime image is rebuilt with this release and links the shared workflow\npackage carrying the definition-id helper above. Hosts that run agent\ncontainers need `docker compose pull agent` after updating to pick it up."
},
{
"version": "1.44.0",
"date": "2026-09-29",
"body": "### archied\n\nArchie can now review pull requests.\n\n- **Reviews on request and by watch.** Ask in chat or on the dashboard work form, add a repository to the watch list, or just let archie review its own PRs before it opens them. Review intensity follows a depth dial (quick/standard/deep) classified from the size of the change, and every finished review passes a verification layer — coverage-gap and cross-finding consistency checks — before it is produced.\n- **No forge credential reaches the review sandbox.** The daemon prefetches the pull request's data and rebuilds its source snapshot over the forge's HTTP API, so the agent container works from an isolated copy with no read access to the repository's credentials.\n- **Reviews stop at the operator gate before posting.** `review.precision_gate` / `approve_before_post` decide whether a finished review posts itself or parks for operator approval. With this release the parked state is a stop sign, not a checkpoint: the approve/reject/re-review responses behind the gate are not wired yet, and the gate's settings are not yet editable in the dashboard (configure them in `config.toml`). A parked review sits until that follow-up lands.\n- The adversarial self-review pass archie previously ran before opening its own PRs is superseded by this pipeline and has been removed.\n- Hardened harness input handling: harness identifiers are bounded to integer types.\n\n### archie-agent\n\nThe runtime image is rebuilt with this release; it links the shared pr-review workflow packages behind the reviews above. Hosts that run agent containers need `docker compose pull agent` after updating to pick it up."
},
{
"version": "1.43.0",
"date": "2026-09-28",
"body": "### archied\n\n- **Organisations.** Tasks, identities and settings now belong to an org. An\n existing install is upgraded into a default org when the State Store first\n starts; the upgrade resumes if interrupted. Task de-duplication is scoped\n per org and identity.\n- **Access policies are enforced** at the dashboard, the API and task\n dispatch, with shipped roles and a rule that nothing crosses between orgs.\n Denials are recorded and reported on the health page. If a policy locks\n you out, `archied access reset --org <org>` (or `--instance`) on the State\n Store host restores the shipped defaults.\n- **Workflows can call workflows** with a `workflow.call` step. Inputs and\n call cycles are checked when the workflow is saved, and the caller waits\n on the callee's result.\n- **Runs record each step.** A run's stages and agent calls are stored as\n steps, the task detail page reads them, and stopping a task or archiving\n it goes through one cancel path. After a crash, steps left running are\n marked interrupted. Archiving a task removes its worktree.\n- **Model roles, repositories, scheduling policy, providers and agent\n profiles apply without a restart.**\n- **Kit harness profiles:**\n - `kit` is now one digest-pinned reference, a workload Kit or a published\n Kit set, not a list. **Rewrite `kit = [...]` in `config.toml` or the\n agent-profiles settings as the single reference**; a list no longer\n loads. Compose mixins by publishing a Kit set.\n - OAuth logins are handled on the host: the egress proxy refreshes tokens,\n stores them encrypted, and gives the container only placeholders.\n - A Kit's skills request mounts `skills_dir` read-only, and its\n instructions file (such as `CLAUDE.md`) is written beside the workspace,\n which is now `/archie/workspace`.\n - A run still cannot be granted the credential a Kit needs, so a Kit that\n requires one is refused at launch.\n- Rate-limited webhook deliveries get `429`.\n- `archie-gateway` and `archie-state-store` report ready to systemd.\n\n### archie-agent\n\n- Runs workflow calls, records its steps and agent calls, and runs Kit\n harness stages under the profile's Kit."
},
{
"version": "1.42.0",
"date": "2026-09-26",
"body": "### archied\n\n- **The dashboard is rebuilt on a new Graphite theme.** Settings moved to its\n own sidebar with one save flow across every page (Channels, Tools & MCP,\n Scheduling policy, Personas and Schedules, Identities, Plugins, Container\n runtime, and a History of past changes). The top bar, Dashboard, Workflows,\n task detail, the New task dialog and the Events page are all new: Dashboard\n leads with what needs you, a run's stage rail and detail panels sit\n side by side, Workflows shows per-workflow stats including completed runs,\n and Events states capture status with a copyable capture endpoint. Live\n updates share one stream and reopen after a drop instead of going quiet.\n- **Settings changes are audited.** A field-level audit table records who\n changed what, with a view on each settings page.\n- **A task can carry a whole-run wall-clock limit**, separate from a stage's\n own budget.\n- **A run that makes no changes now ends as completed and its worktree is\n cleaned up**, rather than left in a state Workflows didn't count.\n- **Abandoning a task no longer closes its forge issue.** Only the workflow's\n own terminal outcomes do that now.\n- **A task whose container exits before the worker replies is parked**\n instead of left running with no way to finish.\n- **A worktree still holding uncommitted work is kept**, rather than reset,\n when its task reaches a terminal state.\n- **A provider's stored settings no longer get corrupted with a process-local\n placeholder in place of your configured secret reference**, and archied\n rejects a stored value shaped like one on the way back in.\n- **Kit v3 harness profiles.** A `[containers.profiles.<name>]` entry can now\n name a Kit v3 image (`kit = [...]`, pinned by digest) instead of a plain\n container image, running the task's agent stages on an external CLI --\n Claude Code, Codex, Pi, OMP or GitHub Copilot CLI -- inside an isolated\n sandbox network. This release lands the daemon-side plumbing (egress\n proxy, sandbox network, credential injection points); it does not yet ship\n a way to grant a run's identity the credential a Kit needs, so a Kit\n requiring one is refused at launch until a later release adds it.\n- `task dev` now starts the State Store and waits for it before the rest of\n the stack.\n- Every service binary the installer builds is stamped with its version.\n\n### archie-agent\n\n- Carries the same task-lifecycle fixes as archied above (no-change runs,\n parking on an early container exit, and the abandon/forge-issue fix), plus\n the Kit v3 harness runner: a stage can now drive an external CLI\n headlessly, read output from Claude Code, Codex, Pi, OMP or GitHub Copilot\n CLI, and serve it capture tools over MCP.\n- Claude's cached tokens are counted as prompt tokens, matching the built-in\n agent loop's accounting."
},
{
"version": "1.41.2",
"date": "2026-09-25",
"body": "### archied\n\n- **`/update` no longer offers an old runtime.** The runtime has shipped under\n the release version since the version streams merged, but the update check\n still read the retired runtime tags, so a current host was offered runtime\n 1.35.0 as an update. Do not approve that offer on 1.41.1; update to 1.41.2\n instead.\n- **`/version` reports the runtime version.** Binaries from the release zip\n showed `Runtime: dev`."
},
{
"version": "1.41.1",
"date": "2026-09-25",
"body": "### archied\n\n- **First published build of 1.41.0.** The 1.41.0 tag produced no release\n artifacts; 1.41.1 carries everything listed under 1.41.0 below, including\n the PostgreSQL 18 requirement and the removed config keys."
},
{
"version": "1.41.0",
"date": "2026-09-25",
"body": "### archied\n\n- **Archie now stores everything in PostgreSQL 18, and `database_url` is\n required.** Tasks, events, captures, bindings, settings and chat\n conversations are served from the database `database_url` names; the State\n Store, archied and the Gateway refuse to start without it, and refuse a\n server older than PostgreSQL 18. `docker compose up -d postgres` starts a\n matching local database with the default URL in `config.example.toml`.\n- **Existing SQLite data is not carried over.** This release reads no SQLite\n file and ships no importer, so an upgraded install starts with empty task,\n event and conversation history. `db_path` is gone; `state_dir` (default\n `~/.local/share/archie`) now holds the embedded NATS store and task logs.\n- **Backups are whole-database snapshots.** `archie-state-store backup` and\n `restore` work on the PostgreSQL database through `pg_dump`/`pg_restore`,\n which must be on `PATH`. There is no automatic schema rollback: the way back\n from an upgrade is restoring the snapshot taken before it.\n- **Events carry a type, and bindings pick one.** Archie infers an event type\n from captured payloads; the Inspector shows proposed and unidentified\n events and lets you name them. Mappings are per event type and show how\n many captures they match, a source can feed several bindings, and a binding\n chooses an event type plus an optional filter. An unidentified event does\n not dispatch.\n- **Sources own webhook signing.** Each source gets a UUIDv7 path and its own\n signing secret, or can be explicitly approved to accept unsigned events. A\n new binding starts pending approval.\n- **EDA playbooks can run module actions and take workflow inputs.** Action\n playbooks run at most once per event through the dispatch ledger, a binding\n can pass inputs to its workflow, the repository is optional, and a workflow\n can name an agent profile. `archie-playbooks lint -eda-dir` checks a\n directory, and `archie-playbooks serve` publishes the same findings to your\n editor as a language server.\n- **Config keys removed.** `[agent]`, `[oidc]`, `[image]`,\n `containers.enabled`, `db_path`, and the `token_env` form of `[forge]`,\n `[artifacts]` and `[chat.telegram]` no longer exist. Write each credential as\n `token = { engine = \"env\", key = \"NAME\" }`. A leftover key is reported at\n startup as unrecognised rather than failing the load.\n- **Dashboard.** Old `#/path` links and the `/captures`, `/mappings` and\n `/bindings` addresses no longer redirect; use the Events page tabs. The live\n stream moved to `/api/stream`, so reloading `/events` serves the page.\n\n### archie-agent\n\n- The Postgres-backed wire formats, event types and workflow inputs are part\n of this image; a host that runs the agent should `docker compose pull agent`\n to pick it up."
},
{
"version": "1.40.0",
"date": "2026-09-23",
"body": "### archied\n\n- **Every park now says what kind of intervention it needs.** A parked task\n is classified as `needs you` (a decision or fix only an operator can\n supply), `transient` (an environment problem -- container pool, storage,\n transport -- retry once it is fixed), or `terminal` (the repository or\n identity cannot act; retrying cannot succeed). The class shows beside the\n Parked badge on the dashboard, so \"needs you\" reads as a request rather\n than a failure.\n- **Operator retries and review-remediation rounds now have separate\n budgets.** An operator's manual retries no longer draw down the rounds\n Archie may spend addressing review feedback on its pull requests, and a\n round-cap park no longer makes a later retry re-park immediately.\n- **`latest` now names the newest release. A push to `main` that is not a\n release publishes `edge` and `sha-<commit>` instead. A host that was\n following `main` by pulling `latest` stops advancing at this release --\n switch it to `edge` to keep tracking `main`, or leave it on `latest` to\n follow releases.**\n\n### archie-agent\n\n- The park-classification wire format is part of this image; a host that\n runs the agent should `docker compose pull agent` to pick it up."
},
{
"version": "1.39.0",
"date": "2026-09-23",
"body": "### archied\n\n- **Archie now acts on review comments left on its own pull requests.** A\n requested-changes review (or a standalone comment) on a PR Archie opened\n dispatches a remediation run: the smallest change that satisfies the\n feedback, committed to the same PR branch and answered in the review\n thread. Approved reviews never remediate, each reaction is its own round,\n and the exchange is bounded by the repo's `max_retries` before Archie stops\n and says so on the PR.\n- **The task run page is a master-detail view.** The run's stage rail and\n detail panels sit beside the run list, so one run's timeline is visible\n without leaving the page.\n- **Live activity groups related updates instead of stacking them by event\n kind**, so a burst of progress on one task reads as one story, and the\n stage filter resets when you switch attempts.\n- Contrast fixes on the info and subtle text tokens clear WCAG AA.\n\n### archie-agent\n\n- The review-reaction remediation path is part of this image; a host that\n runs the agent should `docker compose pull agent` to pick it up."
},
{
"version": "1.38.0",
"date": "2026-09-23",
"body": "### archied — Event capture, mappings and bindings are PocketBase records\n\n- **Captured events, field mappings and playbook bindings live in PocketBase\n collections instead of SQLite tables.** They are ordinary records, which is\n what lets a binding be changed at runtime rather than by editing a database.\n- **A read-only operator surface over the task database ships with the State\n Store** (`archie-state-store -admin-addr`). It serves view collections over\n tasks, transitions, events, identities and resources, and refuses\n `/api/backups` and `POST /api/sql`, so it cannot rewrite state or hand out the\n database file.\n- **A binding cannot go live without approval.** It moves draft → pending\n approval → armed; one binding per source is enforced on insert, on edit and\n on approval; and an edit always returns it to pending approval. A secret left\n blank on an edit keeps the stored one rather than disarming a live binding.\n- **The workspace code-search indexer is gone.** No deployment configured it,\n and it was one more resident writer over the workspace.\n\n### archied — Editing a binding or a mapping shows on the activity stream\n\n- **A dashboard edit no longer needs a manual refresh.** A successful binding or\n mapping write announces itself on the same activity path a captured event\n already uses. The announcement carries the record id and the action and the\n dashboard refetches the record, so the signal cannot go stale.\n\n### archied — Cron schedules fire\n\n- **A cron job computes its next run and fires.** Until this release a cron\n schedule was accepted at creation and then refused at run time with\n `ErrScheduleUnsupported`, so a cron job never ran.\n- **The dialect is PocketBase's, and it differs from Vixie cron on one point.**\n Day-of-month and day-of-week are combined with AND rather than Vixie's OR, so\n `0 0 1 * 1` means Monday the 1st, not \"the 1st, or any Monday\". The\n `@daily`-style macros behave as usual. An expression that can never match,\n such as `0 0 30 2 *`, is rejected instead of being left to run forever.\n\n### archied — Tool calls are queryable\n\n- **Every completed tool call is a row in the `tool_calls` collection**, not\n only a line in the on-disk task log. The row carries the task, the attempt,\n the tool, its result or its error, and when it ran.\n- **A failed projection never fails the task.** The event is the record and the\n collection is a transcript of it, so a copy that could not be written is\n logged and counted rather than propagated.\n\n### archied — A task whose identity no longer resolves parks instead of acting as root\n\n- **A task naming an identity archie no longer knows — renamed, retired or\n removed in the control plane — no longer falls back to the root forge's\n credential.** It parks with the reason recorded. A task arriving over NATS\n with such an identity is refused before it is enqueued. A task with no\n identity is the single-identity root path and is unchanged.\n\n### archied — The PR review is published as a readable artifact\n\n- **A completed review is rendered to markdown and published to the\n collaborative editor**, so a person reads it and comments on it instead of\n reading a wall of text in a pull-request comment.\n- **Publishing never fails the review.** With `[artifacts] base_url` unset the\n sender is not constructed and publishing is a log line; a publish that fails\n is logged with its status and the same review is republished the next time it\n completes. Set `[artifacts] token` (or `WORKSPACE_INGEST_TOKEN`) to enable it.\n\n### archied — The activity feed no longer depends on row ids being monotonic\n\n- **The feed's resume cursor is opaque, and a malformed or pre-upgrade cursor\n degrades to \"from the beginning\" rather than failing the stream.** One\n consequence on upgrade: a browser holding a cursor issued before this release\n replays the backlog once.\n\n### archie-agent\n\n- **The runtime image is rebuilt by this release, and a host must pull it**\n (`docker compose pull agent`). The shared State Store contract changed shape\n in the sections above — task and event-capture id fields are strings now — and\n the two halves are versioned together, so an agent image built before this\n release does not speak to the new State Store. There are no agent behaviour\n changes of its own in this release."
},
{
"version": "1.37.1",
"date": "2026-09-22",
"body": "### archied — A recorded event names the actor in its own fields\n\n- **Event attribution survives the trip to the State Store.** The acting\n identity, its kind, and the authorising principal are carried on the event\n itself, so an audit query finds the actor in its own fields rather than only in\n the event's prose. An approval taken through the dashboard is the case that\n exposed the gap.\n\n### archied — A chat reply that contains code renders the way it was written\n\n- **A code fence closes only on a run of the same character that is at least as\n long as the one that opened it.** A four-backtick fence, a tilde fence, or a\n reply that wraps its own code in a longer fence now arrives as code instead of\n as a broken language tag or paragraphs of leaked text.\n\n### archied — A tool call is one line with its own icon\n\n- **A tool call takes a single line instead of a label plus a fenced block.**\n Telegram draws a fenced block as a full code widget — language header, copy\n button and panel — and the block parser inserts a spacer before it, so a\n handful of calls filled the screen to show a few word counts. Each call now\n shows the icon its own tool declares, and a tool that declares none renders\n without one.\n- **The status word prints only when the outcome is not success.** Every tool\n line previously read \"done\", including the ones that had not finished.\n\n### archied — Runtime dependencies updated\n\n- **Runtime dependencies updated**, including the OpenID Connect and OAuth\n libraries."
},
{
"version": "1.37.0",
"date": "2026-09-22",
"body": "### archied — A request is attributed to the identity that made it\n\n- **A browser can sign in, and an action taken through it records the person.** The dashboard validates a\n provider-issued token, resolves it to an identity, and attaches it to the request; the task-action record\n then names the actor. `Authenticate` and the sign-in callback share one resolver, so a browser sign-in\n cannot be accepted on terms a presented token would be refused on.\n- **archie issues no session.** The callback stores the provider's own token in an HttpOnly cookie and every\n later request re-verifies it, so nothing archie holds can outlive the provider's decision and there is no\n session table to expire, revoke or get wrong.\n- **The event kind describes the actor.** A person's approval records `human_approved` as that person; an\n agent's records `agent_approved`; an action with no authorising principal records `task_approved` with the\n attribution fields **empty**. Nothing is credited to an identity that did not act, and an unattributed\n action is recorded as unattributed rather than guessed.\n- The acting identity is derived from the presented credential and **never** from a request field: a body\n carrying `actor`, `actor_id`, `identity` and an `X-Archie-Actor` header still cannot choose it.\n\n### archied — A host install now works, and an update refuses a host it cannot keep consistent\n\n- `install.sh` writes and enables **all five** host units; previously it seeded only `archied.service`, so a\n fresh host ran one service of five and an operator applied the rest by hand from a runbook. The runbook is\n a description again: it names the units and points at `systemctl --user cat`.\n- **Every host binary reports its version**, and the updater reads all of them **before it can report\n \"nothing to install\"**. A host whose binaries disagree is refused, naming each one: a newer messaging\n binary beside an older state store crash-loops against a service the older store does not serve, and that\n install previously looked healthy from the updater's point of view.\n- The packaged, installer and updater command lists are pinned by a test, so a service added to one and not\n the others fails the gate instead of shipping a partial install.\n\n### archied — A release image can be traced to a commit\n\n- The publish step derives the commit by **dereferencing the ref** rather than reading `github.sha`, because\n every release tag in this repository is annotated and a tag's object id is not a commit. An immutable\n `sha-<commit>` tag is published alongside `:latest`, and a build with no release tag is stamped\n `dev+<short sha>` rather than a bare `dev` that identified nothing.\n\n### archied — Curator definitions are data, not a second registry\n\n- Curator definitions may come from configuration or code and run through **one** engine into the existing\n registry — no parallel authority and no second config reader. A definition declares its tools, and an\n unknown tool name fails rather than widening the set silently."
},
{
"version": "1.36.0",
"date": "2026-09-22",
"body": "### archied — The dashboard declares tools an in-browser agent can call\n\n- The dashboard registers **seven WebMCP tools**. Read-only: `list_tasks`, `get_task`,\n `recent_events`, `daemon_health`. Recovery: `retry_task`, `stop_task`, `cancel_task`. An agent\n operating the dashboard now reads structured state and recovers stuck work instead of scraping the\n UI.\n- Every tool wraps the same `ui/src/lib/api.ts` client the dashboard itself calls, so an agent and a\n person exercise one path rather than two.\n- `archie-ui` cannot be attributed to the agent that called it: a page can invoke its own tools, so an\n agent's call and a page script's call reach the server identically. Tools therefore record the\n signed-in identity and a source, and **never** that an agent acted.\n\n### archied — Binaries built by the development build task can be updated\n\n- `task build` passed the `installtype` stamp for three of six commands, so `archie-messaging`,\n `archie-state-store` and `archie-ui` were built without it. An unstamped binary reports `unknown`\n and the self-update path **refuses rather than guesses**, which is how an operator ends up unable to\n update with `install type is unknown` and no way forward. All six are stamped now, and a test reads\n the build task and fails naming any command line that omits it."
},
{
"version": "1.35.0",
"date": "2026-09-22",
"body": "### archied — The Messaging Service is severed from the store and workflow runtime\n\n- `cmd/archie-messaging` no longer links `modernc.org/sqlite`, `internal/store`,\n `internal/domain/workflow` or `internal/agentexec`. All four arrived through a single import of\n `internal/app/controlplane`; the client half now lives in\n `internal/infrastructure/controlplanerpc`, and the app package keeps the server, the registry, the\n seeds, the validators and the schema derivation.\n- The resource documents are type-aliased back into the app package, so there is one definition read\n under two names rather than a copy per side.\n\n### archied — Channel lifecycle reaches the dashboard\n\n- The Messaging Service reports each channel's state, recorded **per channel**: one channel's failure\n marks only itself, a channel that cannot start is marked failed **with its reason** rather than only\n logged, and one that returns is marked stopped. `internal/channels/status.Manager` reports each channel's state.\n- `PutChannelStatus`/`ListChannelStatus` carry that to the dashboard, following the config-snapshot\n split. The store **replaces the reported set**, so a channel the reporter stops mentioning is\n deleted rather than left as a stale `running`; an empty report clears the table, because hosting no\n channels is a fact worth reporting; and an id-less row is refused, since it could never be replaced\n or removed by a later report.\n- `Service.ReloadChannel` routes to the channel's own seam and refuses a channel that cannot reload\n with a reason rather than accepting and ignoring it. `ReloadSupported` was previously declared **by\n name**, so a channel could advertise reload with nothing behind it; one function now decides both.\n\n### archied — Action playbooks: a second playbook shape, with typed results\n\n- A playbook is now one of two shapes: a **workflow playbook** (exactly one `workflow` action,\n unchanged) or an **action playbook** (one or more `module` actions in order). A playbook does not\n mix them.\n- `args` and `when` share one compilation path and one evaluation context, and `actions.<id>` is typed\n by the kind that action runs, so a misspelled result field, an unknown id, a map index, `in`, a\n comprehension, or a shape-foreign key (`kind` on a `workflow` action, `workflow` on a `module`\n action) is a **load failure** rather than a dispatch failure.\n- **Action playbooks load but do not run yet.** Routing arrives with the first side-effecting\n position; the daemon warns at load rather than accepting them silently.\n- The CEL environment is built per playbook, because result typing depends on the ids a playbook\n declares.\n- `ModuleRegistry.DecodeResult` turns a kind's flat map result into its typed `Result` before a later\n expression reads it. Without it a typed read evaluated against a shape the run never produces, and\n so silently read null.\n\n### archie-agent\n\nThe sandboxed runtime links the same shared packages as archied, so this release carries the\nchannel-lifecycle store contract and the stricter action-load errors with it:\n\n- The channel-status store contract (`PutChannelStatus`/`ListChannelStatus`) and its replace-the-set\n semantics.\n- Authoritative module ids and stricter action load errors: a misspelled result field, an unknown id,\n or a dynamic `actions` read now fails the playbook load rather than the dispatch.\n\narchied and archie-agent move together in this release."
},
{
"version": "1.34.0",
"date": "2026-09-22",
"body": "### archied — Dashboard: an actionable authentication failure state\n\n- An unauthenticated **document** request now receives a self-contained HTML page with a\n paste-the-token form, instead of plain text. Previously the whole dashboard -- `index.html`, the\n bundle and every asset -- sat behind the token check, so a bookmarked bare URL returned a\n `text/plain` \"unauthorised: open the dashboard URL archied logged at startup\", the SPA never ran,\n and none of the dashboard's existing failure surfaces were reachable at all.\n- The response is still **401**, with `Cache-Control: no-store` and a CSP. It is deliberately not a\n 200: a login page served as success would be cacheable, would read as healthy to anything that\n checks status alone, and a shared cache could hand it to the wrong person.\n- API and stream callers are unaffected. `application/json`, `*/*` and `text/event-stream` requests\n keep the plain-text 401, with a test pinning that split so an XHR or an `EventSource` reconnect can\n never start receiving a page.\n- The auth banner gains a **Retry** action that re-runs the dashboard's bootstrap reads, so a\n recovered session is actionable without a browser-level reload. It deliberately does not re-drive\n the SSE stream, which already reports its own reconnect state.\n- The page's guidance stays generic: it points at the dashboard URL the daemon logs rather than\n naming where the token is stored, so the HTTP layer is not coupled to the token file's location."
},
{
"version": "1.33.0",
"date": "2026-09-22",
"body": "### archied — EDA: playbook action arguments are compiled at load (J2)\n\n- A playbook action may now declare `args`, compiled as CEL expressions when the playbook loads.\n `args` and `when` share one compilation path and one evaluation context, so an expression written\n for one works in the other.\n- **Behaviour change:** an `args` expression that does not compile is a **load failure**, not a\n runtime miss — the same reject-at-load rule already applied to a binding collision and to an\n unknown `actions.<id>`. In practice, a daemon loading a playbook with a malformed `args` block\n fails at startup rather than part-way through a dispatch.\n- Compiling several arguments now reports the **first** bad key deterministically (keys are sorted).\n Previously it ranged a map, so the reported bad key could differ between runs and the failure was\n not reproducible.\n- `args` is deliberately **inert** for now: parsed, compiled and stored, but no shipped position\n consumes it yet. A consumer arrives with the first side-effecting position.\n\n**Not yet decided:** how an `args` evaluation failure behaves at dispatch. The `when` predicate rule\n(error, skip, log) does not obviously transfer, because `args` is data rather than a predicate, and\nsilently skipping an action whose arguments failed to evaluate would be a silent failure of exactly\nthe kind this release train has been removing. It currently propagates the error to the caller, and\nthat asymmetry is documented at the code. Ratifying it against a real consumer is tracked separately."
},
{
"version": "1.32.1",
"date": "2026-09-22",
"body": "### archied — Host packaging: `archie-messaging` now ships and updates\n\n- `cmd/archie-messaging` is included in the distribution zip, and `scripts/archie-update-install`\n installs and restarts it.\n- **Why this mattered.** v1.30.0 moved Telegram, email and webhook out of `archied` and into\n `archie-messaging`, but nothing packaged the new binary. A host install that upgraded across\n v1.30.0 therefore ran on with **no messaging process at all**: `archied` logged that it stopped\n serving the telegram gateway, nothing replaced it, and Telegram stayed dead — with no error\n logged anywhere, because nothing was failing. The process simply did not exist.\n- The host component set was enumerated in four places — the zip's build loop, the zip's copy list,\n the installer's service list, and the installer's binary list — and `archie-messaging` was missing\n from all four. The duplication was the defect: a single test now derives the host-run commands\n from `cmd/` and asserts that all four lists agree with it, so adding or extracting a process fails\n until it is packaged.\n- `deployments/systemd-user-service.md` gains the messaging unit. That is load-bearing rather than\n cosmetic: the updater refuses an update when a service unit is missing and tells the operator to\n create one from that document, which previously had nothing to offer.\n\n**Upgrade note:** a host that reached v1.30.0 without a messaging unit has been running with no\nTelegram, email or webhook. Updating to this release installs and starts `archie-messaging`."
},
{
"version": "1.32.0",
"date": "2026-09-22",
"body": "### archied — EDA: playbook action ids, and a dispatch idempotency ledger\n\n- **Action ids (J1).** Every action a later action references must now carry an `id`. Ids are\n validated at load -- unique and stable-identifier-shaped -- and a `when`/`args` expression\n naming an unknown `actions.<id>` is a **load failure**, not a runtime miss, the same\n reject-at-load rule already applied to a binding collision.\n- **Reference classification is strict at load.** A map-index reference (`actions[expr]`), a\n non-literal index, and a reference to an unknown prior id are all rejected when the playbook\n loads; references are classified by identifier versus static access, and the when-compilation\n helper is shared between the load-time and runtime paths.\n- **Dispatch idempotency ledger.** A `playbook_dispatches` row records a dispatch against\n `(playbook_id, playbook_version, event_id, action_id)`, written with `INSERT OR IGNORE` and\n surfaced through the shared `store.ErrAlreadyDispatched` sentinel. Module, channel and forge\n action positions are therefore at-most-once, which is what unblocks the side-effecting\n positions that were previously rejected at load.\n- **The ledger is wired into production.** `stateStoreDeps` constructs `Deps.PlaybookDispatcher`,\n so the ledger RPCs no longer answer `Unavailable` in a running daemon. This defect was found\n by the pre-release review of this change rather than by its tests.\n\n**Behaviour change:** a playbook whose actions reference `actions.<id>` without declaring that\nid, declare a duplicate id, or index `actions` with a non-literal value now fails to load\ninstead of failing at dispatch time.\n\n### archie-agent\n\nThe sandboxed runtime links `storecontract` and `staterpc`, so it carries the dispatch-ledger\ncontract alongside archied:\n\n- The shared `store.ErrAlreadyDispatched` sentinel now describes both dedup ledgers --\n `binding_dispatches` per `(binding_id, capture_id)`, and `playbook_dispatches` per\n `(playbook_id, playbook_version, event_id, action_id)`. Each is an at-most-once guarantee.\n- `RecordPlaybookDispatch` is part of the store contract the runtime builds against.\n\narchied and archie-agent move together in this release."
},
{
"version": "1.31.0",
"date": "2026-09-22",
"body": "### archied — Dashboard replaced: Preact -> Vue 3 + shadcn-vue\n\nThe dashboard is now a Vue 3 application built on shadcn-vue. This is the\nlarge piece of this release; it touches every page.\n\n- History routing, a grouped topbar built from components, the violet palette\n with self-hosted Geist, and a command palette with live tasks.\n- Chat is a FAB-opened panel that behaves like a chat window and scrolls its\n transcript with `MessageScroller`.\n- Task actions and dangerous approvals are deliberate; the task detail page is\n a single head strip with honest states; the run page settles its head around\n an attempts pager, which is hidden for zero or one attempt.\n- Appearance and System navigation were refined, with a four-column appearance\n grid on wide screens.\n- A copy pass removed redundant tails and restating descriptions, empty states\n derive their own titles, and a stuck log read surfaces as an error rather\n than eternal loading.\n- The capture pane is bound to the list it sits beside and reads beside it,\n not over it.\n\n### archied — Events is one page with three tabs\n\n- Inspector, Bindings and Mappings are now tabs of a single **Events** page.\n- The nav entry is always live, the tabs prune by capability, and the three old\n paths survive as bookmarks that redirect to their tab.\n- Tab selection lives in one module (`ui/src/events/tab-selection.ts`) that the\n page uses, rather than a copy of it.\n- `feat(tools)`: a capture-intake sender exists for exercising the Events\n surfaces.\n\n### archied — The channel travels with the message\n\n`SessionSource.Platform` -- the first component of the session natural key, and\nthe column `GetByChannel` filters on -- was a constant `\"web\"`, because one\nRouter serves every channel and named itself after its own. Two things followed:\nthe per-user identity policy was real code that no production call site reached\nwith a real channel name, and a curator pass's write to agent-user memory could\nnot be read back by the turn that wrote it, because that turn resolved no\n`UserID`.\n\n- The frontends now name the channel they carry (`telegram`, `email`,\n `webhook`, `web`), the channel rides the message, and the Gateway stamps the\n session from it -- falling back to its own name when a sender names none,\n which is what every existing row holds.\n- Identity resolution reads the platform off the inbound, so `carriesPersonIdentity`\n decides something in production: telegram and email resolve a person, the\n dashboard and a webhook resolve nothing, and an unknown platform fails closed.\n- **Behaviour change:** a chat whose active session came from `/new` or\n `/branch` re-resolves once, because session lookup now filters on the\n channel's real name. A chat without `/new` re-resolves onto the same\n deterministic id and heals silently.\n- Deliberately unchanged: `TurnRunnerConfig.Channel` still keys tool\n availability, so no channel gains or loses a tool in this release.\n\n### archied — Control plane: runtime administration, history, and derived schemas\n\n- The State Store's gRPC server now carries runtime administration, and each\n process reports which settings version it is running; the dashboard shows it.\n- Resource history is exposed so edits can be reviewed and rolled back, and\n resource schemas are derived from the documents they describe -- the document\n editor reads the derived schema (labels from `title`, `format: duration` ->\n `1m0s`, hints from `doc`), and the abandoned schema-driven card is deleted.\n- A live settings replacement is checked before it is switched to, the daemon's\n state surfaces are folded into one boot step, and a SIGHUP reload re-applies\n database-owned settings.\n- Forge intake settings that nothing reads are now rejected at load.\n\n### archied — Configuration: judged where it is owned\n\n- The runtime config overlay is deleted; database-owned settings are judged at\n the layer that owns them rather than on the file load path.\n- A file overlay no longer drops the fields it omits inside a map entry, and a\n kind with no stored value leaves the file's value in force.\n- The default config path is resolved in one place, and the channel document\n has its own shape.\n\n### archied — State Store: offline backup, restore, validate and rollback\n\n- New offline backup / restore / validate / rollback path.\n- `validate` runs boot's own gate; it no longer replaces the database, reads a\n kind the store does not hold as its seed, or touches the daemon's log.\n- The recovery control-plane server is built on the shared step vocabulary.\n\n### archied — Workflow: one step vocabulary and a `gate.diff-rules` replacement\n\n- The step vocabulary is owned by a family manager registered at each\n composition root, replacing `.archie/gate.go` with `gate.diff-rules`, which\n fails closed on a change it never read.\n- Workflow roots are pinned and the dead vocabulary is rLine truncated
},
{
"version": "1.30.0",
"date": "2026-09-20",
"body": "### archied — Messaging Service extraction completed\n\nTelegram, email and webhook no longer run inside the daemon. They run in\n`archie-messaging` and reach the daemon through the Gateway's `ChatContract`\nover gRPC; the daemon builds no channel and no `gateway.Router` (#899).\n\n- The operator surface is re-wired in the extracted service: `/update` (built\n from its own `[chat.telegram]` commands), the update-report relay, the\n `show_tool_calls` projection, and `/restart`'s config reload, which\n re-resolves the token and allowlist from this service's own file and refuses\n a reload that resolves to an empty token.\n- `/version` is sourced from the Gateway through a new `ChatSnapshot.Version`\n field. `cmd/archie-messaging` deliberately takes no version ldflags, so it\n cannot report a partial upgrade as a matched one.\n- Channel configuration is validated at composition, so a configured-but-\n invalid front-end fails the service instead of being silently dropped.\n- The inbound rate limiter moves to the Gateway, which now owns the only\n Router and is therefore the one place a per-sender budget can apply to every\n channel's turns.\n\n`RunningVersions` and `ReleaseAnnouncements` are deliberately left unwired:\nboth need a component's real running version, and the only versions this\nprocess can obtain are another binary's stamps. See\n`docs/architecture/migration-decisions.md`.\n\n### archied — Configuration\n\n- `diff_cap_lines = 0` now switches the cap off, as the dashboard and the\n workflow step have always documented. It was a plain `int`, so the defaults\n pass could not tell an absent key from an explicit `0` and rewrote both to\n 400 -- the documented way to disable the cap was unreachable. **Behaviour\n change:** a config that set `0` was silently getting 400 and will now get no\n cap.\n- The same ambiguity was failing open per identity: `configForIdentity`\n assigned the identity's value unconditionally, so an identity that merely\n omitted `diff_cap_lines` overwrote the shared cap with the zero value and\n disabled the safety rail entirely. An identity now overrides only when it\n sets the key.\n- A diff-cap park no longer tells the operator to \"approve manually\". A parked\n task's actions are retry, abandon and reject, so there is no approve path out\n of diff-cap; it now names the two things that work.\n- `[health].dependency_timeout` makes the daemon's readiness probe timeout\n configurable, matching the extracted services.\n\n### archied — Chat rendering\n\n- `/status` and `/tasks` are line-oriented reports but separated lines with a\n plain newline, which is CommonMark's soft wrap: the Telegram renderer joined\n them into one run-on paragraph. The renderer implements CommonMark's hard\n line break and the reports use it. Ordinary prose still soft-wraps.\n- A park reason is capped to its first line in the `/tasks` list. It carries\n whatever the failing stage reported, which for a lint gate is a whole tool\n log; unbounded, one parked task pushed every other task out of the reply. The\n full reason is unchanged on the task, in `task_list` and on the dashboard.\n\n### archied — Review\n\n- Review findings are posted as line-anchored PR comments with suggested fixes,\n and a suggestion must be single-line -- GitHub applies a multi-line suggestion\n only up to its first line, silently corrupting the file (#891).\n- The remediate workflow handles PR review comments and requested changes.\n\n### archied — /status health surface\n\n`/status` reports the live broker connection and the last-known outcome of this\nprocess's chat-model calls, alongside the queue depth and runtime block (#892).\n\n- A provider error is flattened and capped, so a multiline or oversized error\n cannot break the one-line-per-fact layout.\n- Concurrent model calls no longer reorder: the completion time is taken before\n the lock, so the newer outcome wins rather than whichever goroutine stored\n last.\n- Curator model calls are recorded too. They bypass the chat path, so a daemon\n whose only recent model traffic was curator work reported \"no calls attempted\n yet\" while the provider was demonstrably reachable.\n- Title generation does not record health. It runs detached under its own\n bound and its error is swallowed, so a cosmetic timeout was overwriting the\n line with \"failed\".\n\n**Known limitation:** the container, poll and channel sections cannot render.\nThose facts live in the daemon, but the only Router lives in the Gateway\nprocess, which has no container pool and no poll loop. The command description\nsays what actually appears; restoring the rest needs a cross-process health\ncontract.\n\n### archied — Dashboard and containers\n\n- The served lifecycle vocabulary reaches an already-painted page, the page\n registry matches the routes, and the build verifies `ui/dist` is fresh\n instead of never looking at it (#890, #898).\n- The containLine truncated
},
{
"version": "1.29.0",
"date": "2026-09-19",
"body": "### archied — Security\n\n- `google.golang.org/grpc` bumped past `v1.84.0` to patch\n [GO-2026-6443](https://pkg.go.dev/vuln/GO-2026-6443), a server panic via a\n missing `:authority`/`Host` header reachable through `archied`'s gRPC\n gateway server. No stable release carries the fix yet, so this pins the\n pre-release commit that does (`v1.85.0-dev.0.20260825072537-93e31b48545e`)\n until `grpc-go` cuts `v1.85.0`.\n\n### archied — Memory engine unification\n\nOne memory engine, addressed by four typed scopes (global, agent, user,\nagent-user), replaces the two disconnected stores that previously existed:\na chat-tool-written store nothing ever read back, and a curator-written store\nwith no scope model.\n\n- `internal/domain/memory` is a CRUD contract (`Create`/`Get`/`Query`/`List`/\n `Update`/`Forget`/`Revisions`) with retained revisions; updates supersede\n rather than overwrite, so a crash mid-write leaves a recoverable extra\n history entry, never a lost prior state (#886).\n- The chat turn reads its subject's scopes synchronously before the prompt is\n built, rendering recalled records into a `<memory>` block; a failing or\n panicking engine degrades to no memory block rather than failing the turn\n (#887).\n- The model writes memory through four id-addressed tools\n (`memory_create`/`update`/`delete`/`list`), scoped to the turn's own\n resolved identity -- the model chooses the scope kind, never the ids, so it\n has no path to write into another user's memory (#888).\n- The session curator now derives the agent-user scope from the session's own\n user-role messages, instead of keying facts by a session id that stops\n meaning anything once the session ends.\n- A channel with no resolvable user (dashboard, webhook) reads and writes only\n global and agent scope; a webhook's route path is never treated as a user\n identity.\n- Fixed a review finding on the read path: the per-scope record limit was\n being applied as one shared total across all scopes rather than per scope,\n and the rendered block's byte cap was checked before template escaping\n rather than after, letting the escaped block exceed it.\n\n### archied — Work intake\n\n- feat(workintake): define review reaction envelope\n- feat(workintake): authorize review reactions by owned PR\n\n### archied — Cleanup\n\n- Deleted the unwired plugin capability-host health surface\n (`Host.Health`/`Host.Manifests`/`ModuleStatus`) and the `Module.Health`\n chain it fed -- including the `mcp`/`builtin` tool-provider health\n implementations and their aggregation in `tools/provider.Registry` -- none\n of which had ever had a production caller (#882).\n\n### archie-agent\n\n- The sandboxed runtime picks up the review-reaction envelope and its\n owned-PR authorization, so an agent can only react to reviews on pull\n requests it opened itself.\n- `google.golang.org/grpc` bumped past `v1.84.0` to patch\n [GO-2026-6443](https://pkg.go.dev/vuln/GO-2026-6443) (shared dependency\n with `archied`; the pre-release commit is pinned pending a stable\n `v1.85.0`)."
},
{
"version": "1.28.0",
"date": "2026-09-19",
"body": "### archied — Task detail and attempt attribution\n\n- New per-run task detail page, showing each attempt's own events, changes and\n configuration rather than a single merged view.\n- Events, changes and config are attributed to the attempt that produced them;\n `Event` carries `attempt` and `ReadTaskLogRequest` carries `stage`.\n- The task detail page remounts when the task id changes, so switching tasks\n does not leave the previous one's data on screen.\n\n### archied — Configuration\n\n- Services are keyed by name through a registry, so the State Store and Gateway\n listen addresses are configurable rather than fixed.\n- A partial overlay no longer clears the fields it omits — an overlay that set\n one key was wiping the rest.\n- The Services map is cloned on publish, so an overlay can no longer mutate the\n snapshot other readers are holding.\n- The service context is enforced at registration.\n\n### archied — Logging and park reasons\n\n- A parked run's reason is recorded in its own attempt log, in both the daemon\n and the workflow, so \"why did this park?\" is answerable from the task itself.\n- `TaskRegistry.Write` takes the caller's context.\n\n### archied — Worktrees and containers\n\n- Retries recover from path-type conflicts instead of failing opaquely, and the\n underlying cause is no longer masked.\n- The worktree is handed back on every sandbox exit.\n- A container's max-uptime reaper is cancelled on release, the cap stays active\n through the grace period, and teardown is claimed once rather than by\n cancelling a timer.\n\n### archied — Daemon and startup\n\n- Every identity's forge and repos are swept at startup, including the root\n forge.\n- A cancelled startup is no longer reported as an exhausted sweep budget; an\n exhausted budget names itself as the cause.\n\n### archied — Other\n\n- `grep` can use the workspace codesearch index.\n- Forge labels are matched when namespaced, so label-driven routing works for\n namespaced labels.\n- Triage is given criteria for choosing between workflows, and a workflow is\n required when a code change is needed.\n- The Telegram adapter restart callback is wired into the chat router.\n- The `ARCHIE_REACTIONS` fan-out stream is provisioned and bounded by age.\n- `archie-ui` exits cleanly when graceful shutdown overruns its deadline.\n- The dashboard's event pump retries priming until the State Store answers.\n- The update writer emits the agent version sidecar with a real newline.\n- The UI finishes its Preact port; the imperative DOM layer is deleted.\n- Collection fields decoded over the State Store gRPC contract are never nil\n slices, so an empty collection marshals as `[]` rather than `null`.\n\n### archie-agent\n\n- The sandboxed runtime picks up the attempt-attribution contract, so the events\n and changes an agent produces are recorded against the attempt that produced\n them.\n- `grep` can use the workspace codesearch index.\n- A worktree is handed back on every sandbox exit, and container teardown is\n claimed once — a released container's reaper is cancelled rather than\n re-firing during the grace period.\n- Retries recover from worktree path-type conflicts instead of failing\n opaquely.\n- A parked workflow run records its park reason in its own log.\n- Triage criteria distinguish the workflows, and a workflow is required when a\n code change is needed.\n- Namespaced forge labels match when routing by kind.\n- The `ARCHIE_REACTIONS` fan-out stream is provisioned.\n- Collection fields decoded over the State Store gRPC contract are never nil\n slices, so an empty collection marshals as `[]` rather than `null`."
},
{
"version": "1.27.0",
"date": "2026-09-17",
"body": "### archied — Dashboard task logs\n\n- Task logs are readable from the dashboard again, through a new State Store\n read contract (`ReadTaskLog`, `StreamTaskLogContent`) rather than the UI\n process reaching into the daemon's log files. Wired server-side by the\n standalone state-store process.\n- Added `GET /api/tasks/{id}/logs/download`, serving an attempt's raw log as a\n `task-<id>-attempt-<n>.log` attachment.\n- A process that cannot read logs and an attempt that recorded no log are now\n distinguishable (\"cannot read\" answers 503, \"no log\" answers 404) instead of\n both rendering as a claim about a configuration setting.\n\n### archied — Telegram output\n\n- Tool results are summarised rather than quoted: a search reports how many\n matches came back, a truncated result reports the tool's own total. The\n renderer no longer states a count it computed from its own truncated sample.\n- Repeated successful tool calls collapse into one counted entry.\n- The tool-activity block is capped to a third of the live frame, keeps the\n newest lines, and marks what it dropped with a `+N earlier` indicator. Every\n line that fits is kept.\n- Every clamped answer marks its cut with an ellipsis, including the opening\n frame, which previously appeared to begin mid-sentence.\n- An error response from the log download no longer ships as a `.log` file.\n\n### archied — Readiness and shutdown\n\n- The disk probe reports per-filesystem results and checks the root filesystem\n as well as the work directory, so a full root is no longer invisible.\n- A path shared by several disk targets keeps the strictest requirement any\n target places on it, so an optional target can no longer mask a required one.\n- The shutdown-watchdog test no longer races the Go scheduler, which was\n intermittently failing the quality gate and parking work unrelated to it.\n\n### archied — Other\n\n- Messages persist the channel-native sender id.\n- go-telegram/bot bumped to v1.27.0, fixing a streaming bug where the multipart\n body could not be replayed and `sendMessage`/`editMessageText` failed until\n the connection dropped.\n\n### archie-agent\n\n- The per-task runtime picks up the new State Store task-log read contract, so\n the sandboxed agents share one log-reading path with the daemon and the\n dashboard."
},
{
"version": "1.26.0",
"date": "2026-09-17",
"body": "### archied\n\n- fix(webui): publish per-identity forges so multi-identity task rows keep their links\n- feat(config): add [scheduling] config block\n- feat(configuration): translate [scheduling] into scheduling.EngineConfig\n- feat(cronevents): adapt the events bus to scheduling.Sink\n- fix(webui): count every chat front-end in the published projection\n- fix(scheduling): respect configuration ownership\n- feat(ratelimit): wire per-identity inbound rate limiting into the gateway\n- fix(tools): judge the rm guard by base name so absolute paths cannot bypass it\n- fix(store): keep an empty binding secret empty so a partial edit cannot erase it\n- fix(archied): stop advertising review_pr when no reviewer can run\n- fix(daemon): carry kind/label routing bindings to the process that routes\n- feat(configuration): add archied setup, the caller the first-run flow was built for\n- fix(configuration): stop letting a secret value be set from the command line\n- feat(configuration): let setup reference a secret without carrying its value\n- fix(archied): disable a provider whose credential is missing instead of refusing to boot\n- refactor(install): install.sh delegates config generation, and tests stop reading hand-written configs\n- fix(daemon): guard binding dispatch loop against nil dispatcher/creator\n- fix(webui): enforce CSRF/origin gate on binding and mapping mutations\n- fix(secret): recover a panicking secret engine instead of crashing\n- fix(config): deep-copy Image.Hosted/Image.Local in Config.Clone\n- fix(email): stop dropping the first paragraph of plain-text bodies\n- fix(logging): keep the live descriptor open across a failed rotation\n- feat(configuration): report config keys no decode target consumed\n- feat(archied): warn at boot when the config file has unrecognised keys\n- feat(archied): wire the scheduling ticker engine at boot\n- fix(agentworker): wire configured tool-result policy into worker's LoopRunner\n- refactor(staterpc): delete the superseded single-token auth interceptor\n- refactor(memory): delete the unreachable <memory> fence scrubber\n- fix(channels): delete unreachable Telegram webhook delivery mode\n- fix(gateway): delete unwired Router.Dangerous approval path\n- refactor(gateway): delete orphaned SessionState goal/steer/queue machinery\n- refactor(archied): delete the daemon's unused webui.Server and UI adapters\n- refactor(tools): delete unreachable dispatch/gating engine\n- feat(channels): wire chat.webhook route config through to the gateway\n- refactor(tools): delete unreachable AST-based tool discovery\n- refactor(tools): delete unused plugin-tool registration API from builtin.Registry\n- feat(channels): wire ConfigSchema/ValidateConfig into a startup validation loop\n- refactor(state): delete the dead IncrementRetryCount RPC (breaking change, accepted)\n- fix(curator): populate PassInput.Since with the prior pass time\n- fix(memory): install the threat scanner the composition root never wired\n- fix(staterpc): preserve marshal_error marker in eventDataJSON\n- fix(gate): validate finding level and share the blocking threshold\n- fix(scheduling): record a completed run so a recurring job stops re-firing every tick\n- fix(releaseupdate): don't treat empty available as deferred\n- fix(tools/provider/mcp): preserve MCP binary tool results for delivery\n- refactor(gateway): share sensitive-key markers with webhookguard\n- refactor(daemon): remove unreachable SQLite poll/drain path\n- refactor(tools/mcp): delete unreachable MCP adaptation path\n- fix(taskactions): resolve max_retries from the task's owning identity\n- fix(daemon): forward configured MCP servers to task agents\n- refactor(skill): delete dead Discover/DiscoverPlugins/Skill path\n- refactor(skillbuild): delete dead AugmentRegistry path\n- fix(builtin): bound read/edit filesystem work by DefaultToolTimeout\n- refactor(binding): delete dead Matcher.Overlaps method\n- refactor(forge): delete dead CreateIssue surface\n- fix(mcp): cancel in-flight SSE reconnect on Stop\n- fix(container): enforce MaxUptime lifetime cap with a timer\n- refactor(store): use taskstate status constants in SQL\n- fix(ui): unbreak binding approve and the two deletes, and centralise the client\n- fix(tools): stop testing on the text of other files, and ungate contractaudit\n- refactor(forge): delete the unwired RepliesAfter surface\n- refactor(config): delete the two decoded-but-unread policy fields\n\nThis release is dominated by dead-code removal and the completion of the\nscheduling capability. Roughly half the commits delete surfaces that no longer\nhad a caller: the unreachable SQLite poll/drain path, the unwired MCP\nadaptation path, the AST-based tool discovery, the superseded single-token auth\ninterceptor, and several dead forge and binding methods. The\n`IncrementRetryCount` State Store RPC is gone with them -- a breaking change to\nthe wire contract, accepted because nothing called it.\n\nThe cron/scheduling epic lands iLine truncated
},
{
"version": "1.25.0",
"date": "2026-09-15",
"body": "### archied\n\n- fix(update): resolve releases without a checkout, and fail loudly when it cannot\n- fix(update): back up the task store the daemon actually uses, or refuse\n- fix(update): build each component from its own approved release tag\n\nComponents are independently versioned, so the newest `archied/v*` and\n`archie/v*` tags usually sit on different commits. The installer required both\ntags to resolve to one commit whenever both components changed, which refused\nevery update once the two newest releases diverged -- a deployment stuck on\n1.22.0 could not take any update. Each component now builds from its own\napproved tag.\n\n### archie-agent\n\n- chore: no user-facing changes; versioned so the 1.25.0 release tags both\n components at the same commit"
},
{
"version": "1.24.0",
"date": "2026-09-12",
"body": "### archied\n\nMakes 1.23.0 deployable. That release split archied into separate processes,\nbut the self-updater still installed only the `archied` binary and restarted\nonly `archied.service`, so updating to it left the State Store, Gateway and UI\non the previous release. archied cannot boot without a reachable State Store,\nso the update failed its health check and rolled back. Update to this release\nrather than to 1.23.0.\n\nIf your host does not yet run the four units in\n`deployments/systemd-user-service.md`, create them first: the updater now\nrefuses, naming what is missing, instead of installing binaries onto a host it\nwould leave broken.\n\n- fix(update): install and cycle every process in the release\n- fix(telegram): stop the relay corrupting identifiers and code\n\nAlso in this release, though outside the version-stamped package closure:\n\n- ci(deploy): produce a complete distribution zip on every release. No zip was\n built for v1.23.0 at all, and the zip omitted `archie-ui`."
},
{
"version": "1.23.0",
"date": "2026-09-12",
"body": "### archied\n\nArchied is no longer a single process. The State Store (`archie-state-store`)\nnow owns `archie.db` outright, the Gateway serves its contract over\nauthenticated gRPC, and the dashboard ships as a standalone UI Service\n(`archie-ui`). Upgrading is not a binary swap: these processes must be running\nand addressable before `archied` will start clean. See `deployments/` for the\nsupported profiles.\n\n### archied — Service decomposition\n\n- feat(contracts): add gateway service seams and protobuf toolchain\n- feat(gateway): extract ChatContract service\n- feat(gateway): delete in-process ChatContract path, make remote the only mode\n- feat(gateway): authenticate the gRPC contract and allow off-loopback listeners\n- fix(gateway): drop services.gateway.mode, remote is the only transport\n- feat(state-store): generalize storerpc as the State Store gRPC contract (#770)\n- feat(state-store): stand up archie-state-store binary and own archie.db (#771)\n- refactor(state-store): migrate capture/mapping/binding consumers to State Store (#772)\n- refactor(state-store): migrate workflow/intake/task lifecycle consumers to State Store (#773)\n- refactor(state-store): cut daemon/Gateway over to the remote State Store (#774)\n- fix(state-store): task-scope container credentials, stream large capture lists, validate Update\n- feat(archieui): standalone UI process over remote Gateway and State Store\n- refactor(archied): cut the dashboard over to the archie-ui process\n- refactor(ui): sever the archie-ui binary from every daemon runtime package\n- refactor(archied): move the update relay to the process that owns updates\n- refactor(archied): move webhook capture intake to the process that owns work intake\n- feat(archieui): mount the capture intake receiver over the State Store\n- refactor(workflow): relocate Task/Status/Source and define workflow.Store (#754)\n- refactor(store): move the producer-owned contracts to internal/contracts/store/v1\n- feat(messaging): migrate gateway session persistence onto domain types\n- feat(gateway): flip channel boundary onto messaging.Message\n\n### archied — Pull request review\n\n- feat(gateway): operator-triggered PR review with selectable reviewer model\n- feat(forge): pull request review read surface (ListReviews/ListReviewComments/ReplyToReview)\n- feat(workflow): surface adversarial review findings on the PR body\n- feat(workflow): review calibration, checked properties and style nits out of contract\n- fix(archied): share one PR reviewer across channels; harden forge and worktree\n- fix(workflow): order findings before footer; test the report stash\n\n### archied — Dashboard\n\n- feat(webui): render configuration from a published snapshot\n- feat(staterpc): carry the dashboard's configuration snapshot\n- refactor(webui): take configuration off the dashboard server\n- feat(webui): report which dashboard sections a process can serve\n- feat(webui): deliver live dashboard events by polling the State Store cursor\n- feat(webui): route dashboard task actions through the Gateway contract\n- feat(gateway): give the dashboard operator its own task-action contract\n- feat(webui): add /health and /health/detailed readiness endpoints (#717)\n- fix(webui): distinguish refused vs broken task actions, handle 401 (#753)\n\n### archied — Daemon, gateway and workflow\n\n- feat(archied): add shutdown watchdog that force-exits a hung graceful shutdown (#716)\n- feat(archied): serve the daemon's own health endpoint\n- feat(drain): honour external drain marker with instantiation epoch (#718)\n- feat(gateway): wire progressive tool disclosure (bridge tools)\n- feat(gateway): render workspace, managed repos and operator into chat env\n- feat(gateway): add session_transcript tool for full JSON export\n- feat(gateway): consolidate task actions and repair daemon default path\n- feat(eda): thread Playbook ID/Version and DispatchInput task identity\n- feat(worktree): Resume re-syncs a worktree onto its branch tip\n- fix(staterpc): attach the bearer token to State Store streams\n- fix(archieui): resolve service tokens from env, without requiring a config file\n- fix(archied): initialize conversation persistence on daemon startup\n- fix(archied): preserve channel turn ledger with remote gateway\n- fix(gateway): share NATS and session ownership\n- fix(update): probe the dashboard's real address after a self-update\n- fix(store): migrate binding owner and repo columns\n\n### archie-agent\n\nThe agent runtime now reaches task state through the State Store gRPC contract\n(`STATE_STORE_URL`/`STATE_STORE_TOKEN`, injected by the daemon) instead of the\nNATS `storerpc` transport, which is deleted. Credentials handed to a task\ncontainer are scoped to that task rather than being the daemon's own token.\nRunning a 1.23.0 daemon against an older agent image will not work; rebuild or\npull the `archie-agent` image with this release.\n\n- feat(state-store): generalize storerpc as the StateLine truncated
},
{
"version": "1.22.0",
"date": "2026-09-03",
"body": "### archied\n\n- feat(telegram): support secret refs for bot tokens (#705)\n- fix(update): make daemon rollback schema-safe (#704)\n- fix(archied): preserve ephemeral gateway ports (#707)\n- fix(webui): bound log limit parsing and add endpoint regression coverage (#706)\n- fix(deps): upgrade x/crypto to v0.56.0 for security fixes (#708)"
},
{
"version": "1.21.0",
"date": "2026-09-03",
"body": "### archied\n\n- feat(workflow): make kind-to-workflow routing YAML-overridable\n- feat(workflow): route arbitrary forge labels to workflows via playbook YAML\n- feat(workflow): load kind/label bindings from multiple playbook directories\n- fix(extract): regenerate stale Yaegi symbol tables; fix wfextract directive\n- feat(eda): Module position first slice -- registry + side-effect-free log kind\n- feat(eda): CEL expression environment (compile/validate at load, evaluate at dispatch)\n- feat(eda): playbook document + event coordinator, single-action workflow-kind dispatch\n- fix(skillcurator): document and scope the intentional nilerr in reviewOne\n- fix(binding): add Owner/Repo pin, fixing multi-repo dispatch\n- feat(webui): bindings dashboard UI; fix app-wide Preact render regression\n- fix(binding): split ValidateForUpdate so edits can preserve the secret\n- refactor(ui): extract Pill to ui/src/base/, closing archie-core-mlro\n- refactor(eda): extract helpers to satisfy cyclop/gocognit gates\n- fix(webui): stretch HEALTH row cards to equal height\n- fix(eda): make playbook key collision reporting deterministic\n- fix(gateway): split /status (health) and /tasks (work) apart\n\n### archie-agent\n\n- feat(workflow): make kind-to-workflow routing YAML-overridable\n- feat(workflow): route arbitrary forge labels to workflows via playbook YAML\n- feat(workflow): load kind/label bindings from multiple playbook directories\n- fix(extract): regenerate stale Yaegi symbol tables; fix wfextract directive\n- feat(eda): Module position first slice -- registry + side-effect-free log kind\n- feat(eda): playbook document + event coordinator, single-action workflow-kind dispatch\n- fix(binding): add Owner/Repo pin, fixing multi-repo dispatch\n- fix(binding): split ValidateForUpdate so edits can preserve the secret\n- refactor(eda): extract helpers to satisfy cyclop/gocognit gates\n- fix(eda): make playbook key collision reporting deterministic"
},
{
"version": "1.20.0",
"date": "2026-09-03",
"body": "### archied\n\n- fix: baseline gate repair (go test ./... -count=1)\n- fix(logging): propagate bound slog attrs to wrapped handler in FeedHandler\n- feat(image): define provider-neutral image capability contract and config\n- fix(channels): call MarkRunning once a channel is actually up\n- fix(workflow): stop discarding baseline-fix commits as 'no changes'\n- fix(webui): wire the Logs page to per-task attempt-log detail\n- fix(workflow): net cache hits from token totals, trim gate-retry output\n- feat(workflow): dynamic triage instead of defaulting every task to implement\n- fix(gateway): stop SOUL from forging the prompt invariant tags\n- fix(curator): stop curator actions from serializing a zero timestamp\n- feat(webui): hand-author the configuration field descriptor catalog\n- feat(webui): attach the config field schema to GET /api/config\n- feat(webui): render scalar config sections generically from the schema\n- feat(webui): surface allow_concurrent/max_retries/review_enabled on the repositories card\n- feat(webui): inline editing for per-repo allow_concurrent/max_retries/review_enabled\n- feat(webui): playbook bindings -- matcher + mapping + workflow, HMAC-gated\n- fix: resolve golangci-lint funlen, nilerr, and empty branch issues\n- feat(store): encrypt playbook binding secrets at rest\n- feat(webhook): harden captured payload redaction\n- fix(store): satisfy makezero when building cipher payload\n- feat(webui): refactor chat module to Preact component and add unit tests\n\n### archie-agent\n\n- fix: baseline gate repair (go test ./... -count=1)\n- fix(logging): propagate bound slog attrs to wrapped handler in FeedHandler\n- feat(image): define provider-neutral image capability contract and config\n- fix(workflow): stop discarding baseline-fix commits as 'no changes'\n- fix(workflow): net cache hits from token totals, trim gate-retry output\n- feat(workflow): dynamic triage instead of defaulting every task to implement\n- feat(webui): playbook bindings -- matcher + mapping + workflow, HMAC-gated\n- feat(store): encrypt playbook binding secrets at rest\n- fix(store): satisfy makezero when building cipher payload"
},
{
"version": "1.19.10",
"date": "2026-09-02",
"body": "### archied\n\n- feat(curator): session-memory curator reference implementation"
},
{
"version": "1.19.9",
"date": "2026-09-02",
"body": "### archied\n\n- feat(memory): typed memory engine contract, registry, and registrar\n- feat(memory): builtin engine implementing the domain/memory contract\n- feat(config): config surface for memory engine selection\n- feat(daemon): wire the domain/memory engine registry at boot\n- feat(curator): bind curators to memory engines\n- fix(config): reject memory.provider instead of silently ignoring it\n- feat(curator): skill curator reference implementation\n\n### archie-agent\n\n- feat(config): config surface for memory engine selection"
},
{
"version": "1.19.8",
"date": "2026-09-02",
"body": "### archied\n\n- fix(update): drop dev-facing wording from the unconfirmed-update message\n- fix(telegram): stop adjacent rich blocks from rendering glued together\n- fix(telegram): send undelivered-media fallback after finalize as its own message"
},
{
"version": "1.19.7",
"date": "2026-09-02",
"body": "### archied\n\n- fix(logging): make Tail/Page allocation bound explicit for CodeQL\n\n### archie-agent\n\n- fix(logging): make Tail/Page allocation bound explicit for CodeQL"
},
{
"version": "1.19.6",
"date": "2026-09-02",
"body": "### archied\n\n- fix(build): stamp gatewayVersion/runtimeVersion in the right package"
},
{
"version": "1.19.5",
"date": "2026-09-01",
"body": "### archied\n\n- feat(webui): dashboard-aware chat — Archie sees the page, points you there\n- fix(telegram): drop retry_after bandaid, bump go-telegram/bot to v1.24.0\n- feat(curator): track and expose recent activity per curator\n- fix: go.mod bumped to 1.27.0 and stupid tests removed\n- refactor: remove unnecessary AI-generated scaffolding\n- refactor: go modernisation fixes\n- refactor: remove unused Operator param.\n- fix(gateway): fix broken system prompt template and scrub real telegram ID from tests\n- fix(plugin): add missing CLAUDE.md reference to plugin engine rule\n- fix(app): repoint archied wiring contract test at internal/app/archied\n- refactor(agentexec): use ai-sdk NewTypedTool for pluginToolSet and scriptToolSet\n- fix(config): standardize Provenance to pointer receivers (recvcheck)\n- refactor(lint): reduce cyclomatic/cognitive complexity in tools, workflow, webui\n- fix(app): repoint capability-host wiring contract test at internal/app/archied\n- refactor(lint): extract more helpers to clear nestif/gocyclo findings\n- refactor(lint): split AgentStage.Stage into resolveModel/buildRequest/handleResult\n- refactor(lint): split TurnRunner.Run and dispatchLocal further\n- refactor(lint): extract markdownBlockParser and list/quote helpers in richblocks.go\n- refactor(lint): extract Apply/findWalkVisitor helpers; go fix modernization\n- fix(lint): noctx fixes and dead-code cleanup\n- feat(workflow): adversarial self-review stage before PR open\n\n### archie-agent\n\n- feat(tasks): allow rejecting a task from any non-terminal state\n- feat(tasks): serve the lifecycle presentation catalog from /api/task-meta\n- fix: go.mod bumped to 1.27.0 and stupid tests removed\n- refactor: go modernisation fixes\n- refactor: remove unused Operator param.\n- fix(plugin): add missing CLAUDE.md reference to plugin engine rule\n- fix(app): repoint archied wiring contract test at internal/app/archied\n- refactor(agentexec): use ai-sdk NewTypedTool for pluginToolSet and scriptToolSet\n- refactor(lint): reduce cyclomatic/cognitive complexity in tools, workflow, webui\n- fix(app): repoint capability-host wiring contract test at internal/app/archied\n- refactor(lint): extract more helpers to clear nestif/gocyclo findings\n- refactor(lint): split AgentStage.Stage into resolveModel/buildRequest/handleResult\n- refactor(lint): extract Apply/findWalkVisitor helpers; go fix modernization\n- fix(lint): noctx fixes and dead-code cleanup\n- feat(workflow): adversarial self-review stage before PR open"
},
{
"version": "1.19.4",
"date": "2026-08-28",
"body": "### archied\n\n- refactor(telegram): render replies as structured rich blocks"
},
{
"version": "1.19.3",
"date": "2026-08-28",
"body": "### archied\n\n- feat(tasks): serve the lifecycle presentation catalog from /api/task-meta\n- feat(dashboard): render task actions, statuses and filters from the server catalog"
},
{
"version": "1.19.2",
"date": "2026-08-28",
"body": "### archied\n\n- feat(tasks): allow rejecting a task from any non-terminal state"
},
{
"version": "1.19.0",
"date": "2026-08-28",
"body": "### archied\n\n- feat(logging): cursor pagination and filtering for task_logs\n- build(deps): upgrade github.com/samcharles93/ai-sdk to v0.1.29"
},
{
"version": "1.18.0",
"date": "2026-08-28",
"body": "### archied (released 2026-08-25)\n\n- Fix concurrent chat-turn claims so SQLite writer contention no longer leaks as `SQLITE_BUSY`.\n- Make task timelines operationally useful with stage outcomes, durations, retry context, and durable per-stage token economics.\n- Return canonical repository, issue, and pull-request URLs for each task's owning GitHub or Gitea identity.\n- Preserve per-identity commit attribution and real model context limits across daemon-to-worker dispatch.\n\n### archie-agent\n\n- feat(logging): cursor pagination and filtering for task_logs\n- build(deps): upgrade github.com/samcharles93/ai-sdk to v0.1.29"
},
{
"version": "1.19.1",
"date": "2026-08-27",
"body": "### archied\n\n- fix(telegram): keep Markdown headings/lists as blocks and strip Markdown on plain fallback"
},
{
"version": "1.17.1",
"date": "2026-08-25",
"body": "### archied\n\n- fix(update): remove source checkout dependency\n- fix(gateway): make UUIDv7 session references unambiguous"
},
{
"version": "1.17.0",
"date": "2026-08-25",
"body": "### archied\n\n- fix(webui): add nil receiver guard to Server.trustForwardedHeaders\n- fix(chat): restore transcript and update replay\n\n### archie-agent\n\n- Compact task history against the selected model's real context capacity without imposing a token cap.\n- Preserve completed steps and billed usage when a later provider call fails; failed compaction now keeps the original history and continues.\n- Persist detailed agent-stage usage through the daemon-owned store before lossy live event fan-out.\n- Apply configured or forge-derived author and committer identity to sandboxed task commits."
},
{
"version": "1.16.1",
"date": "2026-08-25",
"body": "### archie-agent\n\n- fix(agentworker): reconcile task clone ownership after commits"
},
{
"version": "1.16.0",
"date": "2026-08-25",
"body": "### archied\n\n**The agent can hand you a file, and the dashboard works behind a reverse\nproxy.** Media delivery was fetch-by-URL only, so a file the agent produced\nlocally — a transcript, a log dump, a screenshot — was passed to Telegram as\na URL it could not fetch: the send did nothing and reported success. The new\n`send_file` tool plus upload-by-reader delivery closes that, and every layer\nthat cannot deliver now says so rather than staying silent. Dashboard\nmutations behind a TLS-terminating proxy were refused as cross-origin;\nforwarded headers are now honoured, but only under an explicit opt-in that is\noff by default.\n\n- feat(telegram): deliver a local file as an uploaded attachment, choosing\n upload-by-reader or fetch-by-URL per attachment; `send_file` resolves paths\n under the same confinement policy the read tool applies, so sending cannot\n reach what reading cannot\n- feat(gateway): `task_action` chat tool for operator task management —\n abandon, archive, retry, stop, cancel, approve and reject from chat, on the\n same action path and state machine as the dashboard\n- fix(webui): validate mutation `Origin` against the effective external\n scheme and host. `X-Forwarded-Proto`/`-Host` are honoured only when\n `web.trust_forwarded_headers` is set, which is off by default and safe only\n behind a proxy that overwrites or strips untrusted forwarded headers\n- fix(webui): report a local file the dashboard chat cannot upload as\n undelivered instead of dropping the event, which had reproduced the exact\n silent non-delivery `send_file` was built to end\n- fix(daemon): detach terminal state transitions and cleanup from a cancelled\n context, so a stopped task still records its outcome\n\n### archie-agent\n\n**Version realigned with `archied`.** This release jumps from 1.9.9 to 1.16.0\nto put the two components on matching numbers; there are no 1.10-1.15 agent\nreleases. It clears the accumulated runtime backlog in one cut rather than\nbundling it as a rider on a later change, so the list below spans several\nweeks of work rather than one session's.\n\nHighlights:\n\n- feat(nats): run an embedded server when no external NATS is configured, and\n expose the embedded broker to managed task workers\n- feat(deployment): default to managed NATS workers; the daemon requires a\n full-task worker handoff and the legacy in-process, subprocess and\n single-stage execution paths are gone\n- feat(forge): GitHub webhook receiver for immediate issue dispatch, with\n dedup regression proof; unbound webhook events are stored retention-bounded\n- feat(webui): payload field mapping -- bind JSON paths to named fields and\n preview before saving\n- feat(scheduling): ticker engine with configurable interval and pools\n- feat(storage): persist agent project state\n- feat(agent): stamp archie-agent's build and report it back to the daemon\n- feat(tools): `generate_video` via MiniMax, gated behind config, and\n `MultimodalResult.URLs` for remote-hosted media\n- feat(workflow): define the adversarial-review findings contract\n\nFixes:\n\n- fix(worktree): bind publication to dispatch grants; reset retries to a\n pristine base; reject diffs without a merge base; clean untracked files when\n `.git` is a gitdir file; post-push metadata resilience, cancellation and\n branch naming\n- fix(container): persist the npm cache for per-task MCP servers\n- fix(agentexec): recover omitted finish calls\n- fix(agentworker): move JSONL decode into storage, unblocking CI\n- fix(telegram): compact tool output and drop turn caps\n- fix(webui): give dashboard-initiated updates a phase-2 report; restore the\n provider gate and dashboard token accounting\n- refactor: remove dead `BasePlatformAdapter` code and legacy execution paths\n\nShared with archied 1.16.0 (these packages are in both closures):\n\n- feat(telegram): send local files as uploads, not fetchable URLs\n- fix(webui,sendfile): close three holes the adversarial review found\n- fix(webui): validate mutation Origin against the effective external scheme"
},
{
"version": "1.15.0",
"date": "2026-08-24",
"body": "### archied\n\n**Autonomous workflows now have exactly one production execution path.** Every\ntask is handed complete to a scoped `archie-agent` container over core NATS;\n`archied` no longer runs an agent loop in-process. Embedded NATS is the\ndefault and generates a per-start token, binding to the resolved Docker bridge\nso managed workers can reach it; external NATS changes only broker placement.\nThe legacy `[agent]` section and `containers.enabled` still decode for\nmigration but can no longer select an execution path, and a reloaded\n`nats.url` is logged as requiring a restart. Operators upgrading from a\n`agent.mode = inprocess` configuration get the managed-worker topology\nautomatically; see `deployments/` for the supported profiles.\n\n- feat(nats): expose the embedded broker to managed task containers behind a\n generated per-start credential\n- fix(daemon): park before worktree access when the container pool or task\n transport is unavailable, rather than silently executing locally\n- refactor(agentexec): remove the in-process, subprocess and single-stage\n execution paths\n- fix(worktree): report a successful push as successful even when writing\n local upstream tracking metadata afterwards fails, so a published branch no\n longer parks the task as failed\n- fix(worktree): honour context cancellation in `CommitAll`, so a cancelled\n task can no longer stage or commit\n- fix(daemon): remove the worktree when a task completes with no changes,\n which previously leaked a full clone per no-change task; parked worktrees\n are still retained for post-mortems\n- fix(worktree): derive the branch prefix from the issue title before falling\n back to labels, matching the documented contract\n- fix(worktree): clean untracked files when `.git` is a gitdir file\n- fix(agentexec): recover agents that end a turn without the required finish\n call\n- feat(scheduling): ticker engine with a configurable interval and pools\n- fix(telegram): keep tool-call context when compacting tool output (#609)\n- feat(workflow): add the adversarial-review findings contract, where only a\n confirmed finding blocks and \"review found nothing\" is distinct from\n \"review did not run\" (contract only; no review stage runs yet)"
},
{
"version": "1.14.0",
"date": "2026-08-23",
"body": "### archied\n\n- fix(telegram): compact tool output and drop turn caps\n- fix(update): install only approved components"
},
{
"version": "1.13.0",
"date": "2026-08-23",
"body": "### archied\n\n- fix(telegram): render tool progress as bounded code blocks"
},
{
"version": "1.12.0",
"date": "2026-08-23",
"body": "### archied\n\n- fix(webui): give dashboard-initiated updates a phase-2 report\n- feat(agent): stamp archie-agent's build and report it back to the daemon\n- feat(releaseupdate): enrich components with install type and reference\n- feat(webui): surface per-component update status on /api/version and Configuration"
},
{
"version": "1.11.1",
"date": "2026-08-23",
"body": "### archied\n\n- fix(update): wire Telegram personas and survive callback cancellation\n- fix(webui): theme the Workflows 'Start work' form controls"
},
{
"version": "1.11.0",
"date": "2026-08-23",
"body": "### archied\n\n- feat(forge): make webhook intake observable and deduplicate concurrent delivery\n- fix(telegram): preserve code fences across message splits\n- fix(gateway): replay completed-duplicate turns with their tool activity\n- feat(storage): persist agent project state across sessions\n- fix(container): persist npm cache for per-task MCP servers\n- fix(worktree): bind publication to dispatch grants, reset retries to a pristine base, and reject diffs without a merge base\n- feat(media): deliver generated media through Telegram with link fallback in the dashboard\n- feat(tools): generate videos through MiniMax, gated by provider configuration"
},
{
"version": "1.10.0",
"date": "2026-08-22",
"body": "### archied\n\n- feat(forge): GitHub webhook receiver for immediate issue dispatch\n- feat(webhookguard): shared HMAC, rate-limit, and redaction mechanics\n- feat(nats): run an embedded server when no external NATS is configured\n- feat(capture): store unbound webhook events, retention-bounded\n- feat(webui): event inspector -- see captured payloads in the dashboard\n- feat(webui): payload field mapping -- bind JSON paths to named fields, preview before saving\n- fix(webui): stop the capture live-event notification duplicating payloads into the unbounded events table\n- fix(update): verify an update took effect instead of trusting the report (#530)\n- fix(daemon): refuse to poll on an empty label-trigger match (#529)\n- fix(gateway): stop persona from asserting unverified claims as fact (#528)\n- fix(gateway): stop ClaimTurn's insert-race branch losing its own retry read\n- fix: restore provider gate and dashboard token accounting\n- fix: address simple findings from a repo-wide golangci-lint sweep"
},
{
"version": "1.9.11",
"date": "2026-08-19",
"body": "### archied\n\n- fix(mcp): persist npx package cache across daemon restarts"
},
{
"version": "1.9.10",
"date": "2026-08-19",
"body": "### archied\n\n- feat(update): `/update` now streams live progress while an update installs, reports a clear version summary (previous/installed, daemon/agent) once the build succeeds, and automatically rolls back and reports the outcome if the restarted daemon fails its post-update health check"
},
{
"version": "1.9.9",
"date": "2026-08-18",
"body": "### archied\n\n- fix(telegram): drain live renderer in concurrency test\n\n### archie-agent\n\n- chore: no user-facing changes"
},
{
"version": "1.9.8",
"date": "2026-08-17",
"body": "### archied\n\n- chore: no user-facing changes\n\n### archie-agent\n\n- chore: no user-facing changes"
},
{
"version": "1.9.7",
"date": "2026-08-17",
"body": "### archied\n\n- chore: no user-facing changes\n\n### archie-agent\n\n- chore: no user-facing changes"
},
{
"version": "1.9.6",
"date": "2026-08-16",
"body": "### archied\n\n- fix(update): stamp install type and bound retry backoff\n\n### archie-agent\n\n- chore: no user-facing changes"
},
{
"version": "1.9.5",
"date": "2026-08-16",
"body": "### archied\n\n- refactor(archied): decompose the daemon bootstrap into phased wiring (no behaviour change; splits the ~950-line run() into focused setup phases so complexity linting passes)\n- refactor(archied): extract the config overlay boot helper and thread context through chat gateway setup\n- refactor(tools): split the read executor and flatten nested config/tool fallback logic to lower complexity\n- fix(tools): avoid predeclared `max` names\n- fix(email): use context-aware test networking\n- fix(indexing): remove the unused code search test runner\n- fix(tests): use contexts and type assertions in overlay and gateway tests\n- docs(architecture): document the memory engine family\n\n### archie-agent\n\n- refactor: decompose the daemon bootstrap into phased wiring (no behaviour change; complexity-driven restructure)\n- refactor(tools): split the read executor and flatten nested config/tool fallback logic to lower complexity\n- fix(tools): avoid predeclared `max` names"
},
{
"version": "1.9.4",
"date": "2026-08-15",
"body": "### archied\n\n- feat(gateway): polish /status command response format\n- fix(telegram): preserve URL boundaries in responses\n\n### archie-agent\n\n- chore: no user-facing changes"
},
{
"version": "1.9.3",
"date": "2026-08-15",
"body": "### archied\n\n- fix(webui): scroll selected command into view on keyboard navigation\n- fix(logging): resolve error attrs to their message string, not {}\n- feat(agentexec,workflow): surface tool calls on the task timeline\n\n### archie-agent\n\n- fix(logging): resolve error attrs to their message string, not {}\n- fix(agentworker): back off before refetching a nak'd stage message\n- feat(agentexec,workflow): surface tool calls on the task timeline"
},
{
"version": "1.9.2",
"date": "2026-08-15",
"body": "### archied\n\n- fix(worktree): force checkout so retry recovers from a dirty worktree\n\n### archie-agent\n\n- fix(worktree): force checkout so retry recovers from a dirty worktree"
},
{
"version": "1.9.1",
"date": "2026-08-15",
"body": "### archied\n\n- fix(agentworker): forward workflow events across the NATS worker boundary\n- fix(webui): filter turn_completed noise from the Live Activity SSE feed\n- feat(releaseupdate): stamp install type at build time, fail closed on unknown\n\n### archie-agent\n\n- fix(agentworker): forward workflow events across the NATS worker boundary"
},
{
"version": "1.9.0",
"date": "2026-08-15",
"body": "### archied\n\n- fix(webui): style tool-call failure from a structured field, not a string prefix\n- fix(config,webui): make show_tool_calls one cross-channel setting\n- fix(telegram): guarantee no message is stranded on gateway stop/restart\n- fix(telegram): use NewRequestWithContext to satisfy noctx\n- refactor(webui): decompose handleSSE to cut cognitive complexity\n\n### archie-agent\n\n- fix(agent): resolve git dubious-ownership in sandbox containers\n- feat(agent): mark the mounted worktree as a git safe directory\n- fix(agent): route git safe.directory setup through markWorktreeSafe\n- feat(chat): show tool calls inline and stream replies into one message\n- refactor(agent): move worker runtime into application layer\n- fix(config,webui): make show_tool_calls one cross-channel setting"
},
{
"version": "1.8.0",
"date": "2026-08-15",
"body": "### archied\n\n- feat(archied): add -version so the installed build can be read from a shell\n- fix(webui): rebuild the Configuration page layout so values stop colliding\n- fix(webui): size Configuration key/value lists to their own content\n- fix(webui): keep Configuration rows full width, hug only the label column\n- fix(webui): cap and centre the Configuration page instead of its lists\n- fix(webui): preserve encoded redirect path characters\n- feat(chat): show tool calls inline and stream replies into one message\n- fix(chat): harden inline tool call streaming\n- refactor(agent): move worker runtime into application layer\n- fix(telegram): harden live-reply delivery against /stop and multi-byte content\n- fix(telegram): keep tool activity visible and mark failed/empty turns\n- fix(config): de-duplicate disabled-forge predicate, export ForgeDisabled"
},
{
"version": "1.7.0",
"date": "2026-08-10",
"body": "### archied\n\n- fix(build): install ripgrep where grep.go actually needs it on PATH\n- fix(webui): Send button no longer passes its click event to sendMessage\n- feat(webui): Enter sends, Shift+Enter inserts a newline\n- fix(chat): stop showing raw 501 banner for unconfigured update-check\n- fix(chat): give chat page a real height budget instead of a floor\n- fix(workflow): carry gate output into the baseline park error\n- feat(logging): add a per-task log sink\n- feat(agentexec): publish agent-side logs to the task's system subject\n- feat(daemon): consume agent system logs into per-task sinks and the dashboard feed\n- feat(webui,gateway): add /api/tasks/{id}/logs endpoint and task_logs chat tool\n- refactor(gateway): persist conversations in sqlite\n- refactor(store): replace legacy persistence with SQLite\n- fix(webui): tighten configuration KV row spacing\n- fix(gateway): harden session recovery paths\n- refactor(daemon,webui): make Daemon.Cfg and webui.Server.Cfg reload-safe\n- feat(config): SIGHUP-triggered reload with requires-restart warnings\n- fix(config): share one config Holder between daemon and dashboard; re-apply model catalog on reload\n- fix(config): complete the reloadable allowlist and pin it against ForTask\n- feat(config): runtime config overlay store, PATCH /api/config, and the `--no-config-overlay` recovery flag\n- feat(webui): inline config editing on the Configuration page\n- feat(config): surface overlay state, shadowed keys, and per-row reset\n- fix(config): close review blocker on the PATCH path; deep-copy snapshots; atomics for shared state\n- fix(config): preserve nil slices in Clone to avoid spurious reload warnings"
},
{
"version": "1.4.0",
"date": "2026-08-10",
"body": "### archied (released 2026-07-31)\n\n- fix(secrets): wire provider credentials through engines\n\n### archie-agent\n\n- feat(gateway): tool-approval gate, session tools for chat, and /delete command\n- feat(gateway): make chat turns durable and idempotent\n- feat(webui): lifecycle-safe task controls with atomic retry and archive\n- feat(logging,workflow): daemon log feed and executable workflow registry\n- fix(store,gateway): taskstate constants and mobile jump-to search\n- feat(webui,gateway): wire config, channel, log-feed, and work-intake seams\n- fix(build): install ripgrep where grep.go actually needs it on PATH\n- fix(workflow): carry gate output into the baseline park error\n- feat(logging): add a per-task log sink\n- feat(agentexec): publish agent-side logs to the task's system subject\n- feat(daemon): consume agent system logs into per-task sinks and the dashboard feed\n- feat(webui,gateway): add /api/tasks/{id}/logs endpoint and task_logs chat tool\n- refactor(store): replace legacy persistence with SQLite\n- refactor(daemon,webui): make Daemon.Cfg and webui.Server.Cfg reload-safe\n- feat(config): SIGHUP-triggered reload with requires-restart warnings\n- feat(config): surface overlay state, shadowed keys, and per-row reset\n- fix(config): close review blocker on the PATCH path; deep-copy snapshots; atomics for shared state\n- fix(config): preserve nil slices in Clone to avoid spurious reload warnings"
},
{
"version": "1.6.0",
"date": "2026-08-09",
"body": "### archied\n\n- feat(gateway): tool-approval gate, session tools for chat, and /delete command\n- fix(webui): close open-redirect in dashboard token-exchange handler\n- feat(gateway): make chat turns durable and idempotent\n- feat(webui): lifecycle-safe task controls with atomic retry and archive\n- feat(config,channels): format-neutral config resolution and truthful channel state\n- feat(logging,workflow): daemon log feed and executable workflow registry\n- fix(store,gateway): taskstate constants and mobile jump-to search\n- feat(webui,gateway): wire config, channel, log-feed, and work-intake seams\n- fix(ui): hide inactive chat command menu"
},
{
"version": "1.5.0",
"date": "2026-08-08",
"body": "### archied\n\n- feat(curator): engine family contract, registry, and runtime\n- feat(curator): trigger accounting — primary-input wake path\n- feat(setup): interactive setup steps with a TTY-gated prompter\n- feat(webui): rebuild the dashboard and add chat\n- feat(daemon): identity-scoped isolation plus gateway session titles and /delete\n- feat(logging): optional rotating log file\n- feat(configuration): export Validate for the setup flow\n- fix(gateway): durable message identity with a SQLite store\n- fix(gateway): consistent message ordering and paged search\n- fix(gateway): stop /compress destroying history it should have kept\n- fix(gateway): do not answer a redelivered message twice\n- fix(gateway): claim the session slot before writing it, not after\n- fix(gateway): keep /topic off from poisoning the session cache\n- fix(gateway): resolve the most recently active session, not an arbitrary one\n- fix(gateway): give branch-inherited messages their own identity\n- fix(gateway): make both backends agree on newest-first\n- fix(store): honour the transition guard in production persistence\n- fix(store): move ID counters away from the reserved metadata namespace\n- fix(store): surface task timestamps and tag the summary structs\n- fix(telegram): pause the update loop when rate limited\n- fix(memory): fail startup on an unusable memory directory\n- fix(tools): let an optional provider fail without taking the daemon down\n- fix(tools): report a cancelled find walk as an error, not empty results\n- fix(worktree): name the missing forge credential when a push fails\n- fix(tomlwrite): recognise table headers carrying a trailing comment\n- fix: close the duplicate-work loop and the dead paths around it\n- perf(tools): drop the embedded ripgrep binaries\n- refactor: one definition of what approving or declining a task means\n- refactor: move workflow into its own domain"
},
{
"version": "1.3.0",
"date": "2026-08-08",
"body": "### archied (released 2026-07-31)\n\n- fix(memory): replace framework-specific names with generic equivalents\n- feat: unify provider and model selection\n\n### archie-agent\n\n- feat(curator): engine family contract, registry, and runtime\n- feat(curator): trigger accounting — primary-input wake path\n- feat(logging): optional rotating log file\n- feat(daemon): identity-scoped isolation\n- fix(secrets): wire provider credentials through engines\n- fix(store): surface task timestamps and tag the summary structs\n- fix(tools): let an optional provider fail without taking the daemon down\n- fix(tools): report a cancelled find walk as an error, not empty results\n- fix(worktree): name the missing forge credential when a push fails\n- fix: close the duplicate-work loop and the dead paths around it\n- perf(tools): drop the embedded ripgrep binaries\n- refactor: one definition of what approving or declining a task means\n- refactor: move workflow into its own domain"
},
{
"version": "1.4.1",
"date": "2026-07-31",
"body": "### archied\n\n- fix(catalog): match SDK provider fallback"
},
{
"version": "1.3.1",
"date": "2026-07-31",
"body": "### archied\n\n- fix(telegram): omit empty model picker markup"
},
{
"version": "1.2.0",
"date": "2026-07-31",
"body": "### archied\n\n- feat: add MCP client capabilities to archied and archie-agent\n- fix: handleSummary ignores errors from WorkflowStats/StageStats/TokensByDay\n- feat: establish Archie identity and use stable callback tokens\n- refactor(telegram): keep one model selector command\n- fix: handleSSE silently swallows EventsSince backlog fetch errors\n- fix: Transition() ignores `from` status guard, allowing lost updates\n- fix: skillscript.Run ignores context, cannot be canceled/timed out\n- feat(telegram): report installed component versions\n- feat(telegram): add approved component updates\n- fix: LoadDir: no timeout around Yaegi Eval can hang daemon startup\n- feat(chat): real system prompt for Archie — identity, tools, env\n- feat(indexing): port tau's codesearch workspace index\n- fix(indexing): surface index config properly and stop silent degradation\n- refactor(worktree): replace git shell-out with go-git v6\n- fix(worktreerpc): bound handler contexts and drop the git binary from tests\n- refactor(nats): rebuild as infrastructure/eventbus/nats with real boundaries\n- refactor: route tasks on a typed kind, not forge labels\n- fix(natsrpc): make RegisterAll wait for the server to see subscriptions\n- refactor(config): move loading into infrastructure/configuration\n- fix(telegram): publish all executable session commands in menu and help\n- fix(telegram): publish the restored gateway commands\n- refactor: add internal/eventbus as the broker-neutral messaging contract\n- fix(chat): operator name from config, session wiring, prompt rules\n- feat(tools): lift tau's file and shell tools into the tool registry\n- feat: make /stop cancel the running chat turn\n- fix: kill the whole process group when a shell command is cancelled\n- feat: refuse unrecoverable shell commands\n- feat: make /stop reach running agent tasks\n- fix(chat): temper prompt brevity rules with warmth\n- fix: use errors.Is/As for context errors and cleanup\n- fix(grep): distinguish ripgrep exit 1 from a failed search\n- fix(archied): disable the forge on a missing credential, not the daemon\n- fix: restore /model parsing and close the 6d4e0be autofix audit\n- feat: embed config.example.toml and add comment-preserving TOML writer\n- fix(docker): install unzip and Node 24 so MCP servers can start\n- fix(docker): slim both images and repair unreachable Go tooling\n- fix(container): write the task boot brief under .git\n- fix(telegram): drop pending updates before long polling\n\n### archie-agent\n\n- feat: add MCP client capabilities to archied and archie-agent\n- fix: Transition() ignores `from` status guard, allowing lost updates\n- fix: skillscript.Run ignores context, cannot be canceled/timed out\n- fix: LoadDir: no timeout around Yaegi Eval can hang daemon startup\n- fix(indexing): surface index config properly and stop silent degradation\n- refactor(worktree): replace git shell-out with go-git v6\n- fix(worktreerpc): bound handler contexts and drop the git binary from tests\n- refactor(nats): rebuild as infrastructure/eventbus/nats with real boundaries\n- refactor: route tasks on a typed kind, not forge labels\n- fix(natsrpc): make RegisterAll wait for the server to see subscriptions\n- refactor(config): move loading into infrastructure/configuration\n- refactor: add internal/eventbus as the broker-neutral messaging contract\n- feat(tools): lift tau's file and shell tools into the tool registry\n- feat: make /stop cancel the running chat turn\n- fix: kill the whole process group when a shell command is cancelled\n- feat: refuse unrecoverable shell commands\n- feat: make /stop reach running agent tasks\n- fix: use errors.Is/As for context errors and cleanup\n- fix(grep): distinguish ripgrep exit 1 from a failed search\n- fix(docker): slim both images and repair unreachable Go tooling\n- fix(container): write the task boot brief under .git"
},
{
"version": "1.1.0",
"date": "2026-07-27",
"body": "### archied\n\n- feat: add the Telegram gateway with persistent sessions, topic-thread support, streamed rich replies, typing indicators, and Markdown rendering\n- feat: add `/spawn`, `/approve`, and `/cancel` for chat-driven task control\n- feat: provide a comprehensive `/help` guide whose command list stays aligned with Telegram's published menu and Archie's executable command surface\n- feat: add `/provider` and provider-filtered `/model` selectors that switch the provider and model used by subsequent live chat turns\n- feat: include the active provider and full model reference in `/status`\n- feat: notify authorized Telegram users once when a newly tagged component release is installed\n- feat: add `/restart` to reload and relaunch the Telegram gateway without interrupting in-flight daemon tasks\n- feat: add deny-by-default Telegram sender authorization and native command-menu publication\n- feat: connect Desktop Commander through Archie's managed MCP client so chat can use workspace file and process tools\n- feat: add multi-identity daemon configuration, persona routing, an email channel, and webhook platform support\n- feat: add durable task, session, message, and memory persistence\n- feat: add memory synchronization, prefetch, context scrubbing, threat scanning, and built-in memory tools\n- feat: add tool guardrails, classification, budgets, availability filtering, and disclosure controls\n- feat: add feature-based YAML configuration with `conf.d` overlay loading\n- feat: add typed secret-engine registration and Yaegi extension support\n- fix: reject unknown slash commands locally instead of allowing the LLM to fabricate command behavior\n- fix: publish Telegram commands to default, private-chat, and group-chat scopes so stale commands inherited with the bot token cannot shadow Archie's menu\n- fix: drain the SDK's full event stream so streamed Telegram replies cannot deadlock\n- fix: use standard newline-delimited JSON framing for MCP stdio clients\n- fix: make MCP stdio shutdown and timeout handling race-safe\n- fix: restore legacy `[forge].token_env` compatibility and required container environment passthrough\n- fix: make the agent-container Docker network explicitly configurable\n\n### archie-agent\n\n- feat: add streamed agent execution with typed message events\n- feat: add MCP client transports and managed tool-provider discovery\n- feat: add memory context scrubbing and normalized memory tool schemas\n- feat: add plugin metadata extraction from `metadata.archie.plugins`\n- feat: add configurable container networking for daemon-launched runtimes\n- fix: preserve valid UTF-8 when clipping runtime output\n- fix: make MCP stdio lifecycle, retries, and timeout handling race-safe\n- fix: enforce a zero-finding lint and vet baseline"
},
{
"version": "1.0.0",
"date": "2026-07-22",
"body": "### archied\n\n- feat: ship the resident forge-polling daemon, deterministic workflow engine, isolated worktrees, quality gates, Gitea integration, Docker/NATS worker split, plugin loading, and skills support\n- feat: publish `archied` and `archie-agent` container images to the Gitea registry\n\n### archie-agent\n\n- feat: ship the isolated agent runtime, NATS RPC boundary, workflow execution, skills, and plugin support\n- feat: publish the `archie-agent` container image to the Gitea registry"
}
]
-394
View File
@@ -1,394 +0,0 @@
# External agent harnesses
**Status:** Approved
**Scope:** the harness model and, in "Session contract", the duplex session
that the setup terminal and the run-scoped live view both use. Code cites
this file for both (`ui/src/harness/SetupTerminal.vue`,
`internal/infrastructure/postgres/queries/harness_secrets.sql`).
## Decision
A workflow stage can run on an external coding-agent CLI instead of the
built-in agent loop: Claude Code, Codex, Pi, OMP, GitHub Copilot CLI, or any
other CLI packaged as a Docker Sandbox Kit v3. Each authenticates with an API
key or the operator's subscription login, and can carry the operator's own
skills, plugins, subagents and instructions.
Two boundaries hold regardless of what the harness does:
- **The real credential never enters the container.** The container sees
sentinel values; archie's egress proxy substitutes the real credential on
outbound requests and performs OAuth refresh on the host.
- **Archie's workflow guarantees are enforced outside the harness.** Git,
protected paths, read-only stages, gates and budgets are checked by archie
around the process and against the worktree afterwards.
## Kits
A harness is packaged as a Kit v3 image: an OCI image whose
`vnd.docker.sandbox.kit.descriptor` manifest annotation declares what the
harness needs. Archie reads descriptors with the published
`github.com/docker/sandbox-kit-spec/v3/spec` package and does not maintain
its own descriptor format. Published Kits run unmodified.
Archie is a partial Kit runtime. It implements these capability types:
| Type | Archie behaviour |
| ------------------- | ----------------------------------------------------------------------------------------- |
| `credential@1` | Proxy-managed only, described below. |
| `network-policy@1` | Enforced by the egress proxy. |
| `volume@1` | A Docker volume keyed by WorkflowExecution, deleted with it. |
| `lifecycle@1` | Install and startup hooks run on container create. |
| `agent-sessions@1` | The headless `prompt` and `resume` invocations for the stage. |
| `agent-skills@1` | The operator's skills store (`skills_dir`), mounted read-only whatever the Kit asks. |
| `agent-context@1` | The workload's profile file beside the workspace, indexing each Kit's guidance. |
| `resources@1` | Container CPU and memory limits. |
Every other type fails closed: a required entry refuses the launch, an
optional one is skipped and recorded on the step. `credential@1` with
`passthrough: true` and any credential for a forge service are refused.
The operator's own setup (plugins, subagents, instructions, settings) is a
mixin Kit, published with the harness Kit as a Kit set: the set merges their
layers into one image. It is versioned image content, rewritten on every
create, never state a run can modify.
## Contract
A harness run is a second implementation of `agentexec.Runner`. It takes the
same `Request` and returns the same `Result`, so workflows, the daemon and
the State Store do not know which runner ran a stage.
`agent-sessions@1` supplies the invocation. Archie supplies, per CLI, an
output adapter that translates the CLI's JSON output stream into
`ToolCallReporter` calls, `Usage` and a session ID. A CLI with no adapter can
run stages with no capture tools, reporting no usage; its token budget falls
back to wall clock.
Workflow definition validation rejects, at load time, a stage whose needs the
selected harness cannot meet: capture tools without an adapter, or a gate
retry without a `resume` verb.
## Selection
A harness is an agent profile. `docs/prds/event-automation.md` defines a
profile as the execution environment a workflow selects; a harness profile
names one Kit pinned by digest, a workload Kit or a published Kit set, in
place of a container image. Archie runs that Kit's image and composes no Kits
itself; a bare mixin is refused. Everything else about profiles
holds: a workflow names its profile, a stage may name a different one, and a
profile holds no secrets.
`archie-agent` builds the stage's runner from the stage's profile: the
ai-sdk agent loop for an image profile, the harness runner for a Kit
profile. Image profiles, and every workflow already written against them,
are unchanged. A Kit profile named by no workflow is a validation error.
A stage naming a different profile than its workflow's is a separate run,
not a mid-container runner switch: a Kit task runs in one container
provisioned for one profile (Container layout), so a stage that needs a
different one is its own callee, started the way `workflow.call` already
starts one (`docs/prds/event-automation.md` "Workflows call workflows"),
with its own agent profile resolved off its own task row. This needs no
mechanism beyond `workflow.call` plus per-task profile resolution
(`daemon.pinTaskProfile`), both of which already treat every task's
profile independently of any caller's -- see
`TestWorkflowCallerConformance` (staterpc) for the callee's independent
`Workflow` field and `TestWorkflowCallGivesACalleeItsOwnProfile` (daemon)
for the Kit-vs-image runner selection that independence produces.
Profiles are org resources in the State Store, so a Kit profile belongs to
one org, is granted to its workspaces like any profile, and applies without
a restart.
## Organisations
`docs/prds/orgs-and-access.md` is the boundary; a harness adds nothing that
crosses it.
- A Kit profile, its credential bindings and its OAuth tokens belong to one
org. No record is shared between orgs.
- A harness run is a run like any other: it acts as the workflow's identity,
under the run credential issued at dispatch.
- The egress proxy injects a credential only when the run credential carries
the secret the binding names. A Kit that declares a service the identity is
not granted gets no credential: a required one refuses the launch, an
optional one is skipped.
- A Kit's network policy is what the Kit asks for; the identity's network
grants are what the org allows. The proxy enforces the intersection.
- Concurrency slots are counted per binding within its org.
## Credentials
A credential binding maps a Kit's `credential@1` `service` name to an org
secret, which the org grants to identities like any secret. The secret holds
one of:
- **API key:** a value in the org's secret store.
- **OAuth:** tokens captured by the setup terminal, stored in the State Store
under the at-rest envelope of `binding-secret-encryption.md` with its own
domain separator.
The egress proxy resolves the binding for each request against the run
credential. The container gets the Kit's sentinel in the named variable or
credential file. OAuth refresh happens at the proxy, which intercepts the
Kit's `tokenEndpoint`, so a refreshed token is written to the State Store and
never returned to the container.
Runs sharing an OAuth binding share its subscription's rate limit.
`max_concurrent` on the binding (default 1) caps its simultaneous runs. A
stage waiting for a slot is `pending`, not `running`.
## Session contract
A **session** is a duplex PTY into a Kit container the daemon owns. One
concept covers both targets; only the address, the lifetime and the
established egress phase differ.
| | Setup session | Run session (deferred) |
| --- | --- | --- |
| Address | `{org, profile}` | `{org, task, attempt}` |
| Container | ephemeral, from the profile's Kit | the task's running container |
| Purpose | run the CLI's own login so the proxy captures the tokens | watch and optionally take over |
| Lifetime | bounded by the session TTL; the container is removed on close | bounded by the task |
- **Transport.** The daemon serves `harness.v1.HarnessService`, a bidi gRPC
stream, and the dashboard implements its `HarnessTerminal` interface
(`internal/webui`) over that client; the browser's WebSocket route is
unchanged. The contract lives on the daemon because the daemon owns
containers: the dashboard process must not link `internal/container`,
`internal/app/archied` or `internal/agentexec`.
- **Authorisation.** Opening a session is the `update` action on the secret,
decided by the dashboard's authorizer before the route runs
(`internal/webui/authorize.go`). The dashboard then dials the daemon with
the harness service token. The daemon does not re-authorise a human; it
trusts the asserted `{org, profile}` exactly as the task-action RPC trusts
an asserted actor. Because that authority is a shell in a container holding
an org's credential, the harness listener requires `HARNESS_TOKEN` even on
loopback, unlike the State Store's loopback convention.
- **Egress phase.** Token interception is filtered by phase
(`oauth.go`'s `rule.runtime == atRun`), and `EnterRuntime` is one-way. A
setup session therefore follows a run's lifecycle exactly: install hooks at
the install phase, `EnterRuntime` before the shell. A credential whose
token endpoint must be captured declares `phase: runtime`; a credential
capturing at install phase is captured by the install hooks that run before
the switch.
- **Credentials.** Capture is gated: the proxy intercepts a token endpoint
only for a service the session is granted (`Proxy.granted`). A setup session
has no task, so the daemon registers a session grant: its proxy token
resolves to `{org, the Kit's declared credential services the org binds}`.
That is the intersection the `update`-on-secret authorisation covers. The
real token never enters the container: the response is sentinelized and
stored as the org's harness secret.
- **Container discipline.** The setup container runs a keepalive entrypoint
with an empty `Config.Env`; the PTY is an exec as the Kit's harness user
with the harness env and nothing inherited from any worker. No worktree is
mounted. It is acquired through the container pool, so it carries the
`archie-daemon` label, the concurrency cap and the max-uptime reaper; the
session TTL is the smaller bound. Closing revokes the egress session,
removes the sandbox network and the Kit volumes, then releases the
container.
- **Kit unavailable.** The daemon serves the contract only when it has a
container pool and a Kit launcher; otherwise there is no listener, and a
client's refused connection is gRPC's `Unavailable`. The dashboard's
existing failure surface is the honest degrade; `/api/harness`'s `terminal`
field means "a client is configured", not "the daemon can run a Kit".
- **Run target.** `RunTarget{task_id, attempt}` opens a read-only view of a
running task's sandbox; it ships as the peek. The daemon resolves the pair
itself, so the dashboard never learns a container name: the task store says
whether the task is `running` and which attempt is current, and the Kit
launcher names the container `kitrun.TaskContainer(task_id, attempt)` (one
container per attempt, removed when the run ends; volumes remain task-scoped
for retries). A finished or unknown task, a task that is not running, an
attempt other than the running one, or a container that is gone is
`NotFound` with the reason in the message; an unreachable task store or
container engine is `Unavailable`. The view follows the container's stdout
and stderr, including the harness output forwarded by the worker, carries
no stdin and no exec, and
ends when the task's container ends or the client leaves, so it confers no
authority over the container. A read-only tail of the existing per-attempt
logs was rejected: those refresh only on task state changes and are the
daemon's account, not the sandbox's.
Mid-stream failures are shown as a reason in the terminal before it closes.
- **Authorisation.** The dashboard route `GET /api/tasks/{id}/sandbox` is
decided as `read-logs` on the task before the handler runs, so a caller
sees a sandbox exactly when they may read that task's log. The daemon
checks that the task belongs to the asserted org before following output.
- **Grants.** The view takes no grant of its own. The run's egress session
(its proxy token, install then `EnterRuntime`) already belongs to the run
and is revoked by `Launcher.Release` when the task ends; the view reads
after that phase switch and dies with the container.
- **Credentials.** The sandbox holds sentinels, never real credentials:
API keys are `egress.Sentinel` (`credentials.go`), and an OAuth token set
is sentinelised in the response and swapped back by the proxy only on a
granted service's resource host in the matching phase (`oauth.go`,
`injectOAuth`). The proxy runs in the daemon outside the container, so a
shell in the container sees only sentinels.
- **Takeover (interactive PTY into a running task) is out of scope for this
bead.** It needs the dangerous-command authority (`archie-core-sod1`) to
gate it, and that authority is not wired for it: the harness listener has
no approval step; `ToolSetOptions.Approval` in `internal/agentexec/modelloop`
is never set by a caller, so task runs never build approval-required tools;
approvals reach a human only on the chat paths (dashboard ask, Telegram,
Gateway). Takeover would also need an audit record naming the actor, task,
attempt and open/close times, and revocation tied to task end (the exec is
closed with the container). Those follow the setup session's shape
(`harnesssession.Session`, `container.ExecPTY`) once the authority exists.
- **Audit.** Opening and closing a session and a successful capture are
recorded with the asserted org and profile. A run view's open and close are
logged with the task and attempt; it reads output only, so it has no
takeover record.
Each session is the only interactive path into a harness container.
## Egress
Only Kit profiles run on the egress path. An image profile keeps the network
access its identity is granted, because workflows such as a network
investigator need raw DNS, ICMP and arbitrary TCP that no HTTP proxy
carries.
- **Sandbox network.** Each Kit run gets its own internal Docker bridge on
which the host holds no address. Host services, including those listening
on every interface, are unreachable from it by any address.
- **Relay.** One relay container, `archie-agent relay`, sits on the sandbox
networks under a fixed alias and on the host-reachable network. It
forwards three fixed ports, to the proxy, NATS and the State Store, and can
reach nothing else. It holds no secrets.
- **Proxy.** The proxy runs inside `archied`, listening on the host gateway
of the host-reachable network. It terminates TLS with a per-daemon CA
installed into the container at create, identifies the container by a
per-run proxy token, and applies that run's network policy and credential
inject rules. Upstream dials refuse loopback, and refuse internal addresses
unless the policy names the exact IP, so an allowed name cannot resolve
back into the host.
## Container layout
A Kit task runs in one container, from the Kit composition's image, on the
task's sandbox network. The worker and every harness invocation share it;
they are separated by user, not by container, so a run's cost scales with
the run and not with how many agents it fans out to.
- **Worker.** Archie mounts its own `archie-agent` binary read-only and runs
it as the container's entrypoint, as root. It holds the task's NATS and
State Store credentials in its own environment and in root-only files,
runs the workflow, and serves `archie-agent mcp`. The Kit image's
entrypoint is not PID 1.
- **Harness.** Every invocation runs as the Kit's user (the image's `User`,
default uid 1000) with an explicit environment: the Kit's variables, the
proxy environment and the credential sentinels, and nothing inherited from
the worker. That user cannot read the worker's environment or files, or
trace it. Sibling invocations in one run share the user and the worktree.
- **Hooks.** `lifecycle@1` install and startup hooks run as the user each
declares, before the worker accepts work.
- **Mounts.** The task worktree at the Kit's workspace directory, owned by the
Kit's user, and the read-only skills store. Nothing else from the host.
- **Network.** The relay forwards three fixed ports on the sandbox network:
the egress proxy, NATS and the State Store. The worker reaches NATS and the
State Store with its credentials; a harness can open those ports but holds
no credential either accepts.
- **Volumes.** `volume@1` paths persist for the life of the
WorkflowExecution, which covers session resume across gate iterations and
retries. They are not shared between executions.
## Archie tools inside the harness
Capture tools, which are how a stage returns structured results, are served
by `archie-agent mcp`, a stdio MCP server registered through the Kit's MCP
configuration or the adapter's flags. It serves the stage's `CaptureTools`
and the central tools the agent profile's `AllowTools` permits, never the
`workspace` toolset. The runner's `ToolLimits` bound its results; the
harness's own built-in tools are outside archie's limits.
## Enforcement around the harness
| Property | Enforcement |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Model never runs git | No forge credential can be bound. Archie records `HEAD` and every ref before the run; any change fails the step (`failed`, policy class). The workflow commits the stage's changes. |
| Protected paths | A diff touching a `Protection` path fails the step. |
| Read-only stage | Any worktree diff fails the step. |
| Gate | Archie runs the stage's gate after the harness exits. On failure it resumes the session with the gate output, up to the stage's iteration budget. |
| Budget | Archie kills the process on wall-clock timeout, or when streamed usage passes the token budget. |
| Cancellation | Cancelling the step kills the process group, then the container. |
| Egress | Only the proxy is reachable; the Kit's network policy decides the rest. |
Harness settings that deny git or protected paths are added where the CLI
supports them, to save wasted turns. They are never the enforcement.
## Execution tree
A harness run is one `agent` StepExecution. Subagents the harness spawns
internally are not recorded as children. Their usage is included in the
step's `tokens_used` when the adapter reports it.
## Agents never hold a harness
An Agent reaches a harness only by invoking a Workflow whose stage names it.
No Agent tool, chat tool or capability exposes a harness, its setup terminal
or its credential. The stage boundary is what carries the container, the git
and path checks, the gate and the budget; a harness outside a stage has none
of them.
## Out of scope
- Chat through a harness. The gateway chat loop stays on the built-in
runtime.
- `network-policy@2` HTTP method and path rules; a Kit requiring it is
refused.
- Recording the harness's internal subagents as StepExecutions.
- Cost in currency.
- Choosing a harness automatically per task.
## Plan
1. Descriptor resolution with the Kit spec package; capability support
table and fail-closed refusal.
2. Egress proxy: internal network, per-daemon CA, per-container token,
`network-policy@1`.
3. `credential@1`: API-key bindings, sentinel rendering, inject rules.
4. Harness `Runner`: container create with worktree, volumes, lifecycle
hooks and the mounted `archie-agent`; `agent-sessions@1` invocation;
worktree checks for git, protected paths and read-only; budget and
cancellation.
5. Claude Code output adapter; `archie-agent mcp`; gate-and-resume loop.
6. Kit profiles, runner selection from the stage's profile, and definition
validation.
7. OAuth bindings as org secrets: token-endpoint interception, encrypted
storage, per-binding concurrency; dashboard setup terminal.
8. Output adapters for Codex, Pi, OMP and GitHub Copilot CLI.
## Verification
- The same workflow definition completes on `builtin` and on the Claude Code
Kit with the same `Result` shape and captures.
- After `/login` in the setup terminal, the container's credential file holds
only sentinels, the State Store holds the encrypted token, and a task run
authenticates.
- A real API key or OAuth token never appears in the container environment,
filesystem, worktree, task log or event stream.
- A request to a host outside the Kit's runtime allow list fails, including a
direct connection that bypasses the proxy settings.
- A harness instructed to `git commit` fails its step, and the task branch is
unchanged.
- A harness edit to a protected test file fails the step in a TDD fix stage.
- A read-only feasibility stage that writes a file fails.
- A file a run writes into a Kit-managed path such as the CLI's settings file
is gone on the next execution.
- A Kit requiring an unsupported capability is refused at launch with the
capability named.
- A stage with a failing gate resumes the same session with the gate output,
then succeeds or exhausts its iterations.
- Two tasks sharing an OAuth binding with `max_concurrent = 1` run one at a
time; the second waits as `pending`.
- Stopping a run kills the harness process and removes the container.
- A harness invocation cannot read the worker's NATS or State Store
credential from its environment, its files or `/proc`.
- A run fanning out to many agent invocations uses one container.
- A Kit profile in org A cannot be selected, and its binding cannot be
resolved, by a workflow in org B.
- A harness run whose identity is not granted a Kit's required credential is
refused at launch; the proxy never injects a secret outside the run
credential.
- The firewall investigation example runs unchanged on an image profile with
direct network access.
+68
View File
@@ -0,0 +1,68 @@
# Self-development loop: archie develops its own codebase
**Status:** Decided, not yet built (2026-11-03, sam) **Scope:** how archie
persistently takes on development of archie-core itself. This file records a
desired state, not an implementation or a product: nothing below exists unless
the "Built today" section says so. The plan is tracked as epic #1769 with child
issues #1770–#1775. This file is a record, not a mechanism: agents only see what
is in their context, so verify every claim here against the code before acting
on it — where they disagree, the code wins. The boundary below is load-bearing
only where it is enforced (the gate, access control, the daemon's git monopoly)
and stated in `AGENTS.md`; everywhere else this file is a pointer.
## Built today
The machinery the loop will reuse exists: shipped triage/implement/pr-review
workflows, the adversarial self-review stage before a PR opens (epic #1348,
closed), the prbench judge for review quality with its acceptance bar, canary
releases judged on the installed release (releaseupdate), and the curator
engine. What does not exist is the loop itself: no self-intake curator, no
approved-issue auto-run, no judge for diffs, no outcome distillation, no canary
routing specific to self-directed changes.
## Decision
Archie improves its own codebase through a closed loop, built in stages:
1. **Self-intake** (#1770): a curator pass reads run outcomes, step transcripts,
gate failures and alerts, dedupes against open issues, and files new issues.
Archie files its own work; the maintainer approves priority.
2. **Approved-issue loop** (#1771): an approved issue runs the shipped
triage/implement workflows end to end — read-only plan, gated build,
adversarial self-review, daemon commits and opens a green PR. The maintainer
still merges at this stage.
3. **Implementation judge** (#1772): the prbench judge pattern scores diffs,
calibrated against the maintainer's merge decisions; auto-merge applies only
when the gate is green, the review stage is clean, and the judge is above the
calibrated bar.
4. **Outcome distillation** (#1773): a curator turns merged-run postmortems into
proposals for the repo's agent instructions, each added only because it
changes a decision; rules that stop changing decisions are removed.
5. **Canary** (#1774): self-directed changes ship through the canary release
window and are judged on the installed release before promotion. Rollback is
a plain revert, because every self-directed change is one gated commit.
## Boundary
Enforcement lives in the harness, never in the prompt (#1775). Changes to the
commit gate, the invariants in `AGENTS.md`, access control and grant scoping,
the daemon-only git path, and webhook HMAC verification may be proposed by
archie but are never merged by archie — they require a maintainer merge.
Everything else (workflows, curators, memory, docs, the dashboard) is fair game
for the loop.
## Why
Self-improvement degrades when it relies on the model choosing to follow rules.
Gates, scoped grants and the daemon's monopoly on git cannot be argued with; a
prompt can. Keeping quality measurable — a judge bar and a canary verdict as
numbers, tests guarding the protected seams — is what lets the loop widen
without turning the codebase to garbage.
## Consequences
- One issue → one small PR applies doubly to self-directed work: past about 100
lines or any new mechanism, the change stops and reassesses.
- Every self-directed commit cites the issue that authorized it.
- Rule proposals from the distillation curator must name the run that triggered
them, and `AGENTS.md` stays short enough to read in full every session.
+169 -162
View File
@@ -1,18 +1,20 @@
# User authorization boundaries
Archie separates authentication (which person or service is calling) from
permission to act on a resource. This inventory follows the [OWASP
Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)
and [Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html),
permission to act on a resource. This inventory follows the
[OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)
and
[Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html),
including its guidance on attributes and relationships. It describes concrete
enforcement points and their regression tests; it is not a compliance certification.
enforcement points and their regression tests; it is not a compliance
certification.
## Transport and authority
The browser uses HTTP/JSON and SSE to the UI service. The UI service calls
State Store, Gateway, Messaging and Harness through their gRPC contracts.
Only the State Store opens the task/control-plane/account database; Gateway
owns conversation storage. Browser HTTP handlers never open either database.
The browser uses HTTP/JSON and SSE to the UI service. The UI service calls State
Store, Gateway, Messaging and the daemon through their gRPC contracts. Only the
State Store opens the task/control-plane/account database; Gateway owns
conversation storage. Browser HTTP handlers never open either database.
Instance service credentials are administrative authority. They are not user
sessions and must never reach a browser, model, or agent container. A service
@@ -23,21 +25,25 @@ boundary evaluates Cedar before invoking them. Task credentials have a separate,
explicit RPC allowlist and cannot call account or identity administration.
Local service listeners are trusted process boundaries. Loopback is not a
substitute for authentication on a remotely reachable listener. OIDC credentials,
local browser sessions, personal API tokens, service credentials, and task grants
must remain distinct.
substitute for authentication on a remotely reachable listener. OIDC
credentials, local browser sessions, personal API tokens, service credentials,
and task grants must remain distinct.
## Policy and relationship model
`internal/domain/access` defines actions, resources, principals and memberships.
`internal/infrastructure/access` assembles Cedar entities and evaluates the
instance → organization → workspace → object chain. A forbid wins; each applicable
level must permit the operation. Missing or invalid policy chains fail closed.
instance → organization → workspace → object chain. A forbid wins; each
applicable level must permit the operation. Missing or invalid policy chains
fail closed.
The default policies grant actions through scoped roles. Policies can also
restrict a named identity, workspace environment, owner, state, source address,
signature, run or step. HTTP task decisions now include the stored initiating identity and task state; binding decisions include the stored binding state. The HTTP source address is the actual connection peer, not an unverified forwarded header. Membership and resource attributes must come from stored
records or authenticated context, never a request's assertion about itself.
signature, run or step. HTTP task decisions now include the stored initiating
identity and task state; binding decisions include the stored binding state. The
HTTP source address is the actual connection peer, not an unverified forwarded
header. Membership and resource attributes must come from stored records or
authenticated context, never a request's assertion about itself.
Cedar permission is not ownership of another person's private data. Conversation
history, passkeys, recovery codes and personal tokens are bound to the person.
@@ -48,34 +54,35 @@ accounts by unverified email, or create an administrator.
## Enforcement inventory
| Location | Enforcement | Regression evidence |
| --- | --- | --- |
| Browser credential gate: `webui/auth.go`, `accounts.go` | Account session or verified provider identity; shared dashboard token is not a person when accounts are enabled. No API data before authentication. | `TestAccountBoundary`, `TestAccountSessionFailureIsClosed` |
| Browser policy gate: `webui/authorize.go` | Resolve principal from stored identity; evaluate action against stored org/workspace and resource kind before handler. Missing chain refuses. | `TestHTTPPolicyCannotBeBypassed`, `TestAuthorizeRefusesWithoutAChain`, `TestAuthorizeRecord`, `TestTaskAuthorizationUsesStoredAttributes`, `TestAuthorizeCreateIn` |
| Instance-only HTTP surfaces: `webui/instance_only.go`, server route registration | Hide instance-owned configuration and diagnostics from another org; policy still applies first. | `TestInstanceOnlyHidesTheInstanceFromOtherOrgs`, `TestInstanceAdminOrgs` |
| First setup: `webui/accounts.go`, `postgres/accounts.go` | Initial organization, workspace, instance URL, admin identity and password commit together. Transaction lock closes bootstrap after first account; later requests require `manage_members`. | Disposable PostgreSQL smoke verification for bootstrap race and rollback; account policy tests below |
| Account creation: `webui/accounts.go`, `staterpc/accounts.go`, `postgres/accounts.go` | Cedar `manage_members` at HTTP and RPC; target org is authenticated context. New local accounts cannot request owner role. | `TestAccountManagementUsesPolicy`, `TestAccountBoundary` |
| Local passwords and sessions: `identity/password.go`, `postgres/accounts.go` | Argon2id, independent salts, length/common-password checks, generic login refusal, account throttling, session hashes and expiry, revocation on logout/password change/suspension. | `TestPasswordVerification`, `TestAccountBoundary`; disposable PostgreSQL session verification |
| Transport and CSRF: `webui/accounts.go`, `api_tasks.go` | Password/account mutations require HTTPS or localhost development, JSON, custom CSRF header and same-origin requests. Forwarded headers require explicit trusted-proxy configuration. | `TestAuthenticationTransport`, existing mutation security tests |
| Personal account routes: `webui/accounts.go` | Active signed-in person; principal supplied by server. Password change verifies current password. Sensitive authenticator changes require recent sign-in. No caller-supplied target identity. | `TestAccountBoundary` |
| Recovery: `postgres/account_security.go`, `webui/accounts.go` | Fresh authenticated owner generates a hashed, one-use recovery secret. Redemption replaces password and revokes all sessions atomically. No email-existence disclosure. | Disposable PostgreSQL recovery verification |
| Passkeys: `postgres/passkeys.go`, `webui/passkeys.go` | Configured RP origin, browser-bound one-use expiring challenge, verified credential signature and user verification. Enrollment/management belong to caller. Credential counters persist under a row lock. | Disposable browser virtual-authenticator verification; task-grant denial tests |
| OIDC: `infrastructure/oidc`, `archieui/account_oidc.go`, `webui/auth.go` | Discovery and signed ID token with issuer/client audience/expiry, PKCE, state and nonce. Verified subject resolves to active identity. Browser-local session cannot outlive provider token, and provider credential remains checked. | `TestBrowserFlowVerifiesIDToken`, `TestProviderOutageIsUnavailableThenRecovers`, subject-claim tests; no external provider acceptance implied |
| OIDC settings: `webui/accounts.go`, `postgres/authentication.go` | Instance ownership plus policy; recent sign-in for changes. Public URL cannot change while enrolled passkeys would be orphaned. | `TestAccountBoundary`, `TestAuthenticationSettingsRejectUntrustedOrigins` |
| Org membership/workspaces/agent assignment: `webui/api_orgs.go`, `staterpc/orgs.go`, `postgres/orgs.go` | Own org or instance-owner relationship, allowed role vocabulary, membership escalation/last-owner guards, tenant-scoped SQL. | `TestOrgRPCsActInTheCallersOrg`, `TestSetMembershipRefusesUnknownRole`, org HTTP tests |
| Personal API tokens: `webui/api_personal_tokens.go`, `staterpc/personal_tokens.go`, `postgres/personal_tokens.go` | Token owner comes from principal; store only token hash; revoke only caller's binding. | `TestPersonalTokensWithoutPerson`, `TestPersonalTokenOwner` |
| gRPC caller attribution: `rpcidentity/identity.go` | Authenticated service may forward a principal; State Store resolves memberships/org itself. Task grant metadata is stripped. | `TestCallerAttribution` |
| Agent/task gRPC: `staterpc/task_grants.go` | Durable task-scoped grant, explicit allowed RPC and target task, no definition-pin replacement, no account RPCs. | `TestTaskCredentialsCannotManageAccounts`, `TestTaskCredentialCannotReplaceItsPin`, `TestRecordUsageAuthority`, `TestWorkerPresenceAuthority` |
| Chat HTTP: `webui/api_chat.go` | Server stamps sender and person thread; lists/read/turns/cancel/persona verify session ownership. Browser cannot submit another sender identity. | `TestWebChatOwnership`, `TestWebChatSenderCannotBeSuppliedByBrowser`; HTTP deny matrix |
| Chat history, slash commands and model session tools: `gateway/session_store_postgres.go` | Store filters `Get`, `List`, `GetByChannel`; shared read/write guards check person ownership as well as org. A saved session cannot change its conversation source to claim another person's history. Service curation runs without a person principal. | `TestSessionVisibility`; PostgreSQL smoke for history isolation |
| Chat questions/approvals: `webui/api_chat_ask.go` | Waiting question is bound to the initiating person, in addition to its unguessable ID. | `TestChatQuestionBelongsToInitiatingPerson` |
| Chat downloads: `webui/api_chat_files.go` | Offered file token expires and is bound to the initiating person; requests cannot supply a filesystem path. | `TestChatFileDownload` |
| Per-person memory: `archiegateway/chat_identity.go`, gateway memory tools, `sessioncurator` | Verified web sender identity scopes reads/writes. Curator refuses unidentified or mixed participants instead of guessing a person. | Gateway memory and session-curator tests |
| Workflow/task actions: `webui/api_tasks.go`, `domain/taskactions`, `staterpc` | Policy and stored workspace before action; domain transition, authority and durable dispatch guards remain in force. | HTTP deny matrix, task action/domain tests, task grant tests |
| Incoming webhooks: `forge/webhook`, `captureintake`, access delivery engine | Verify HMAC before parsing; derive source/org from stored source; evaluate source delivery policies and egress rules. No browser-user credential is inferred. | Webhook/capture tests, `TestAuthorizeDelivery` |
| Control-plane configuration, secrets, harness and extensions | Browser policy and instance-only restrictions where registered; service contracts carry principal/org; task grants cannot invoke administrative RPCs. | HTTP deny matrix, `TestAdministrationRoutes`, `TestChannelReloadRoute`, `TestConfineHarnessOrg` |
| Live HTTP/SSE and diagnostics | Authenticated policy gate applies before stream creation; org-scoped event reads; instance logs require administrative visibility. | HTTP deny matrix, instance-only tests, `TestServiceLogsRequireInstanceCredential` |
| Background schedules, dispatch, curation | Service/agent authority, not an implicit browser user. Task-scoped grants and org scopes remain distinct from initiating human attribution. | Existing dispatch, grant, memory and org-scope tests |
| Location | Enforcement | Regression evidence |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Browser credential gate: `webui/auth.go`, `accounts.go` | Account session or verified provider identity; shared dashboard token is not a person when accounts are enabled. No API data before authentication. | `TestAccountBoundary`, `TestAccountSessionFailureIsClosed` |
| Browser policy gate: `webui/authorize.go` | Resolve principal from stored identity; evaluate action against stored org/workspace and resource kind before handler. Missing chain refuses. | `TestHTTPPolicyCannotBeBypassed`, `TestAuthorizeRefusesWithoutAChain`, `TestAuthorizeRecord`, `TestTaskAuthorizationUsesStoredAttributes`, `TestAuthorizeCreateIn` |
| Instance-only HTTP surfaces: `webui/instance_only.go`, server route registration | Hide instance-owned configuration and diagnostics from another org; policy still applies first. | `TestInstanceOnlyHidesTheInstanceFromOtherOrgs`, `TestInstanceAdminOrgs` |
| First setup: `webui/accounts.go`, `postgres/accounts.go` | Initial organization, workspace, instance URL, admin identity and password commit together. Transaction lock closes bootstrap after first account; later requests require `manage_members`. | Disposable PostgreSQL smoke verification for bootstrap race and rollback; account policy tests below |
| Account creation: `webui/accounts.go`, `staterpc/accounts.go`, `postgres/accounts.go` | Cedar `manage_members` at HTTP and RPC; target org is authenticated context. New local accounts cannot request owner role. | `TestAccountManagementUsesPolicy`, `TestAccountBoundary` |
| Local passwords and sessions: `identity/password.go`, `postgres/accounts.go` | Argon2id, independent salts, length/common-password checks, generic login refusal, account throttling, session hashes and expiry, revocation on logout/password change/suspension. | `TestPasswordVerification`, `TestAccountBoundary`; disposable PostgreSQL session verification |
| Transport and CSRF: `webui/accounts.go`, `api_tasks.go` | Password/account mutations require HTTPS or localhost development, JSON, custom CSRF header and same-origin requests. Forwarded headers require explicit trusted-proxy configuration. | `TestAuthenticationTransport`, existing mutation security tests |
| Personal account routes: `webui/accounts.go` | Active signed-in person; principal supplied by server. Password change verifies current password. Sensitive authenticator changes require recent sign-in. No caller-supplied target identity. | `TestAccountBoundary` |
| Recovery: `postgres/account_security.go`, `webui/accounts.go` | Fresh authenticated owner generates a hashed, one-use recovery secret. Redemption replaces password and revokes all sessions atomically. No email-existence disclosure. | Disposable PostgreSQL recovery verification |
| Passkeys: `postgres/passkeys.go`, `webui/passkeys.go` | Configured RP origin, browser-bound one-use expiring challenge, verified credential signature and user verification. Enrollment/management belong to caller. Credential counters persist under a row lock. | Disposable browser virtual-authenticator verification; task-grant denial tests |
| OIDC: `infrastructure/oidc`, `archieui/account_oidc.go`, `webui/auth.go` | Discovery and signed ID token with issuer/client audience/expiry, PKCE, state and nonce. Verified subject resolves to active identity. Browser-local session cannot outlive provider token, and provider credential remains checked. | `TestBrowserFlowVerifiesIDToken`, `TestProviderOutageIsUnavailableThenRecovers`, subject-claim tests; no external provider acceptance implied |
| OIDC settings: `webui/accounts.go`, `postgres/authentication.go` | Instance ownership plus policy; recent sign-in for changes. Public URL cannot change while enrolled passkeys would be orphaned. | `TestAccountBoundary`, `TestAuthenticationSettingsRejectUntrustedOrigins` |
| Org membership/workspaces/agent assignment: `webui/api_orgs.go`, `staterpc/orgs.go`, `postgres/orgs.go` | Own org or instance-owner relationship, allowed role vocabulary, membership escalation/last-owner guards, tenant-scoped SQL. | `TestOrgRPCsActInTheCallersOrg`, `TestSetMembershipRefusesUnknownRole`, org HTTP tests |
| Personal API tokens: `webui/api_personal_tokens.go`, `staterpc/personal_tokens.go`, `postgres/personal_tokens.go` | Token owner comes from principal; store only token hash; revoke only caller's binding. | `TestPersonalTokensWithoutPerson`, `TestPersonalTokenOwner` |
| gRPC caller attribution: `rpcidentity/identity.go` | Authenticated service may forward a principal; State Store resolves memberships/org itself. Task grant metadata is stripped. | `TestCallerAttribution` |
| Agent/task gRPC: `staterpc/task_grants.go` | Durable task-scoped grant, explicit allowed RPC and target task, no definition-pin replacement, no account RPCs. | `TestTaskCredentialsCannotManageAccounts`, `TestTaskCredentialCannotReplaceItsPin`, `TestRecordUsageAuthority`, `TestWorkerPresenceAuthority` |
| Chat HTTP: `webui/api_chat.go` | Server stamps sender and person thread; lists/read/turns/cancel/persona verify session ownership. Browser cannot submit another sender identity. | `TestWebChatOwnership`, `TestWebChatSenderCannotBeSuppliedByBrowser`; HTTP deny matrix |
| Chat history, slash commands and model session tools: `gateway/session_store_postgres.go` | Store filters `Get`, `List`, `GetByChannel`; shared read/write guards check person ownership as well as org. A saved session cannot change its conversation source to claim another person's history. Service curation runs without a person principal. | `TestSessionVisibility`; PostgreSQL smoke for history isolation |
| Chat questions/approvals: `webui/api_chat_ask.go` | Waiting question is bound to the initiating person, in addition to its unguessable ID. | `TestChatQuestionBelongsToInitiatingPerson` |
| Chat downloads: `webui/api_chat_files.go` | Offered file token expires and is bound to the initiating person; requests cannot supply a filesystem path. | `TestChatFileDownload` |
| Per-person memory: `archiegateway/chat_identity.go`, gateway memory tools, `sessioncurator` | Verified web sender identity scopes reads/writes. Curator refuses unidentified or mixed participants instead of guessing a person. | Gateway memory and session-curator tests |
| Workflow/task actions: `webui/api_tasks.go`, `domain/taskactions`, `staterpc` | Policy and stored workspace before action; domain transition, authority and durable dispatch guards remain in force. | HTTP deny matrix, task action/domain tests, task grant tests |
| Incoming webhooks: `captureintake`, access delivery engine | Verify HMAC before parsing; derive source/org from stored source; evaluate source delivery policies and egress rules. No browser-user credential is inferred. | Capture tests, `TestAuthorizeDelivery` |
| Control-plane configuration, secrets and extensions | Browser policy and instance-only restrictions where registered; service contracts carry principal/org; task grants cannot invoke administrative RPCs. | HTTP deny matrix, `TestAdministrationRoutes`, `TestChannelReloadRoute` |
| Audit feed: `webui/api_audit.go`, `domain/audit` | `read_audit` on the `audit` resource; org scope and the instance-wide exception come from the authenticated principal, never the query string. Export carries the same grant, needs an explicit range of at most a year, and is rate-limited per identity, one at a time. Redaction runs in the State Store adapter before an entry crosses gRPC. | `TestReadAuditRoleBoundary`, `TestAuditRoutesFollowTheReadAuditRole`, `TestHTTPPolicyCannotBeBypassed`, `TestAuditErrorMapping`, `TestAuditCSVCellNeutralisesFormulas` |
| Live HTTP/SSE and diagnostics | Authenticated policy gate applies before stream creation; org-scoped event reads; instance logs require administrative visibility. | HTTP deny matrix, instance-only tests, `TestServiceLogsRequireInstanceCredential` |
| Background schedules, dispatch, curation | Service/agent authority, not an implicit browser user. Task-scoped grants and org scopes remain distinct from initiating operator attribution. | Existing dispatch, grant, memory and org-scope tests |
The policy HTTP matrix enumerates each registered protected route. It checks
both anonymous refusal and refusal by an explicit Cedar forbid, using the real
@@ -93,8 +100,9 @@ they do not contain user data. `/health/detailed` remains protected.
Personal routes under `/api/account/` require an active signed-in person and
server-derived ownership: password change, recovery-secret generation, passkey
begin/finish/list/delete. They do not require an organization administrator role.
`POST /api/accounts` and `/api/authentication` are administrative policy routes.
begin/finish/list/delete. They do not require an organization administrator
role. `POST /api/accounts` and `/api/authentication` are administrative policy
routes.
## HTTP route inventory
@@ -102,120 +110,119 @@ The following routes are covered by `TestHTTPPolicyCannotBeBypassed` in
`internal/webui/authorization_surfaces_test.go`. `authorize.go` maps each to its
action/resource; the handler may impose a stricter record or instance boundary.
| Method | Route example |
| --- | --- |
| DELETE | `/api/access/policies` |
| DELETE | `/api/bindings/7` |
| DELETE | `/api/event-types/7` |
| DELETE | `/api/extensions/sample` |
| DELETE | `/api/mappings/7` |
| DELETE | `/api/orgs/7/members/sample` |
| DELETE | `/api/sources/sample` |
| DELETE | `/api/tokens/7` |
| GET | `/api/access/policies` |
| GET | `/api/alerts` |
| GET | `/api/authentication` |
| GET | `/api/bindings` |
| GET | `/api/bindings/7` |
| GET | `/api/bindings/7/dispatches` |
| GET | `/api/capabilities` |
| GET | `/api/captures` |
| GET | `/api/captures/7/dispatches` |
| GET | `/api/channels` |
| GET | `/api/chat/file/sample` |
| GET | `/api/chat/sessions` |
| GET | `/api/chat/sessions/7/messages` |
| GET | `/api/chat/sessions/7/turns` |
| GET | `/api/chat/update` |
| GET | `/api/config` |
| GET | `/api/control-plane/apply-status` |
| GET | `/api/control-plane/audit` |
| GET | `/api/control-plane/catalog` |
| GET | `/api/control-plane/resources/sample` |
| GET | `/api/control-plane/resources/sample/history` |
| GET | `/api/curators` |
| GET | `/api/event-types` |
| GET | `/api/extensions` |
| GET | `/api/extensions/catalogue` |
| GET | `/api/harness/bindings` |
| GET | `/api/harness/terminal` |
| GET | `/api/identities` |
| GET | `/api/logs` |
| GET | `/api/mappings` |
| GET | `/api/mappings/7` |
| GET | `/api/orgs` |
| GET | `/api/orgs/7` |
| GET | `/api/orgs/7/members` |
| GET | `/api/orgs/7/workspaces` |
| GET | `/api/secret-engines` |
| GET | `/api/services` |
| GET | `/api/setup` |
| GET | `/api/skills` |
| GET | `/api/sources` |
| GET | `/api/stream` |
| GET | `/api/summary` |
| GET | `/api/task-meta` |
| GET | `/api/tasks` |
| GET | `/api/tasks/7` |
| GET | `/api/tasks/7/attempts` |
| GET | `/api/tasks/7/changes` |
| GET | `/api/tasks/7/debug` |
| GET | `/api/tasks/7/dispatches` |
| GET | `/api/tasks/7/logs` |
| GET | `/api/tasks/7/logs/download` |
| GET | `/api/tasks/7/sandbox` |
| GET | `/api/tokens` |
| GET | `/api/version` |
| GET | `/api/workflows` |
| PATCH | `/api/bindings/7` |
| PATCH | `/api/mappings/7` |
| POST | `/api/accounts` |
| POST | `/api/alerts/7/dismiss` |
| POST | `/api/bindings` |
| POST | `/api/bindings/7/approve` |
| POST | `/api/bindings/7/pause` |
| POST | `/api/bindings/7/resume` |
| POST | `/api/channels/7/reload` |
| POST | `/api/chat/answer` |
| POST | `/api/chat/cancel` |
| POST | `/api/chat/message` |
| POST | `/api/chat/persona` |
| POST | `/api/chat/stream` |
| POST | `/api/chat/update/defer` |
| POST | `/api/chat/update/install` |
| POST | `/api/control-plane/resources/sample/commands/sample` |
| POST | `/api/event-types` |
| POST | `/api/extensions` |
| POST | `/api/extensions/catalogue/sample/install` |
| POST | `/api/extensions/sample/accept` |
| POST | `/api/extensions/sample/approve-update` |
| POST | `/api/extensions/sample/rollback` |
| POST | `/api/extensions/sample/update` |
| POST | `/api/identities` |
| POST | `/api/identities/7/sample` |
| POST | `/api/mappings` |
| POST | `/api/mappings/preview` |
| POST | `/api/orgs` |
| POST | `/api/orgs/7/members` |
| POST | `/api/orgs/7/workspaces` |
| POST | `/api/secret-references/check` |
| POST | `/api/sources` |
| POST | `/api/sources/sample/approve-unsigned` |
| POST | `/api/sources/sample/secret` |
| POST | `/api/sources/sample/signing` |
| POST | `/api/tasks/7/action` |
| POST | `/api/tokens` |
| POST | `/api/work-requests` |
| PUT | `/api/access/policies` |
| PUT | `/api/authentication` |
| PUT | `/api/event-types/7` |
| PUT | `/api/extensions/sample/enabled` |
| PUT | `/api/extensions/sample/update-policy` |
| PUT | `/api/orgs/7/agents/sample` |
| PUT | `/api/orgs/7/members/sample` |
| PUT | `/api/sources/sample/delivery-header` |
| PUT | `/api/sources/sample/name` |
| PUT | `/api/workflows/7/enabled` |
| Method | Route example |
| ------ | ----------------------------------------------------- |
| DELETE | `/api/access/policies` |
| DELETE | `/api/bindings/7` |
| DELETE | `/api/event-types/7` |
| DELETE | `/api/extensions/sample` |
| DELETE | `/api/mappings/7` |
| DELETE | `/api/orgs/7/members/sample` |
| DELETE | `/api/sources/sample` |
| DELETE | `/api/tokens/7` |
| GET | `/api/access/policies` |
| GET | `/api/alerts` |
| GET | `/api/audit` |
| GET | `/api/audit/export` |
| GET | `/api/authentication` |
| GET | `/api/bindings` |
| GET | `/api/bindings/7` |
| GET | `/api/bindings/7/dispatches` |
| GET | `/api/capabilities` |
| GET | `/api/captures` |
| GET | `/api/captures/7/dispatches` |
| GET | `/api/channels` |
| GET | `/api/chat/file/sample` |
| GET | `/api/chat/sessions` |
| GET | `/api/chat/sessions/7/messages` |
| GET | `/api/chat/sessions/7/turns` |
| GET | `/api/chat/update` |
| GET | `/api/config` |
| GET | `/api/control-plane/apply-status` |
| GET | `/api/control-plane/catalog` |
| GET | `/api/control-plane/resources/sample` |
| GET | `/api/control-plane/resources/sample/history` |
| GET | `/api/curators` |
| GET | `/api/event-types` |
| GET | `/api/extensions` |
| GET | `/api/extensions/catalogue` |
| GET | `/api/identities` |
| GET | `/api/logs` |
| GET | `/api/mappings` |
| GET | `/api/mappings/7` |
| GET | `/api/orgs` |
| GET | `/api/orgs/7` |
| GET | `/api/orgs/7/members` |
| GET | `/api/orgs/7/workspaces` |
| GET | `/api/secret-engines` |
| GET | `/api/services` |
| GET | `/api/setup` |
| GET | `/api/skills` |
| GET | `/api/sources` |
| GET | `/api/stream` |
| GET | `/api/summary` |
| GET | `/api/task-meta` |
| GET | `/api/tasks` |
| GET | `/api/tasks/7` |
| GET | `/api/tasks/7/attempts` |
| GET | `/api/tasks/7/changes` |
| GET | `/api/tasks/7/debug` |
| GET | `/api/tasks/7/dispatches` |
| GET | `/api/tasks/7/logs` |
| GET | `/api/tasks/7/logs/download` |
| GET | `/api/tasks/7/sandbox` |
| GET | `/api/tokens` |
| GET | `/api/version` |
| GET | `/api/workflows` |
| PATCH | `/api/bindings/7` |
| PATCH | `/api/mappings/7` |
| POST | `/api/accounts` |
| POST | `/api/alerts/7/dismiss` |
| POST | `/api/bindings` |
| POST | `/api/bindings/7/approve` |
| POST | `/api/bindings/7/pause` |
| POST | `/api/bindings/7/resume` |
| POST | `/api/channels/7/reload` |
| POST | `/api/chat/answer` |
| POST | `/api/chat/cancel` |
| POST | `/api/chat/message` |
| POST | `/api/chat/persona` |
| POST | `/api/chat/stream` |
| POST | `/api/chat/update/defer` |
| POST | `/api/chat/update/install` |
| POST | `/api/control-plane/resources/sample/commands/sample` |
| POST | `/api/event-types` |
| POST | `/api/extensions` |
| POST | `/api/extensions/catalogue/sample/install` |
| POST | `/api/extensions/sample/accept` |
| POST | `/api/extensions/sample/approve-update` |
| POST | `/api/extensions/sample/rollback` |
| POST | `/api/extensions/sample/update` |
| POST | `/api/identities` |
| POST | `/api/identities/7/sample` |
| POST | `/api/mappings` |
| POST | `/api/mappings/preview` |
| POST | `/api/orgs` |
| POST | `/api/orgs/7/members` |
| POST | `/api/orgs/7/workspaces` |
| POST | `/api/secret-references/check` |
| POST | `/api/sources` |
| POST | `/api/sources/sample/approve-unsigned` |
| POST | `/api/sources/sample/secret` |
| POST | `/api/sources/sample/signing` |
| POST | `/api/tasks/7/action` |
| POST | `/api/tokens` |
| POST | `/api/work-requests` |
| PUT | `/api/access/policies` |
| PUT | `/api/authentication` |
| PUT | `/api/event-types/7` |
| PUT | `/api/extensions/sample/enabled` |
| PUT | `/api/extensions/sample/update-policy` |
| PUT | `/api/orgs/7/agents/sample` |
| PUT | `/api/orgs/7/members/sample` |
| PUT | `/api/sources/sample/delivery-header` |
| PUT | `/api/sources/sample/name` |
| PUT | `/api/workflows/7/enabled` |
## Verification limits
@@ -224,9 +231,9 @@ security key or every operating system. An OIDC unit test is not acceptance
against a deployed provider. Disposable PostgreSQL smoke checks verify real SQL
without putting database-dependent tests in the fast unit suite.
Existing anonymous conversations are retained but are not silently assigned to
a new person. Existing service credentials remain privileged; this inventory
does not claim that all internal gRPC methods have independent Cedar gates.
Existing anonymous conversations are retained but are not silently assigned to a
new person. Existing service credentials remain privileged; this inventory does
not claim that all internal gRPC methods have independent Cedar gates.
When changing a user-facing operation, update its inventory entry and its
allow/deny behavior cases. Include another user in the same organization, a
+70 -15
View File
@@ -9,7 +9,7 @@ park, which is useful data for the dashboard.
| --- | --- |
| `stack.sh` | Starts PostgreSQL 18 (port 55432) and the five services as local processes, then Vite on 5173 |
| `seed.sh` | Seeds the stack through the dashboard API; safe to rerun |
| `run.cjs` | Runs `checks/*.cjs` in headless Chromium; screenshots to `out/` |
| `run.cjs` | Runs `checks/*.cjs` in Chromium; screenshots, manifest and `report.html` to `out/<stamp>/` |
| `checks/` | One module per behaviour |
| `results/` | One committed report per release |
@@ -17,45 +17,100 @@ park, which is useful data for the dashboard.
```bash
task e2e:up # build, start everything, seed
task e2e:check # all checks; or: node e2e/run.cjs routes
task e2e:check # list available checks (no stack needed)
task e2e:check -- list # explicitly list checks
task e2e:check -- audit-redirect # one check
task e2e:check -- all # all checks
task e2e:check -- --headed accessibility # watch a check in Chromium
task e2e:check -- --headed all # watch every check
task e2e:down # stop; e2e/stack.sh reset also deletes the data
```
Headless is the default. `--headed` opens visible Chromium and slows browser
actions to 150ms so you can follow them; assertions and saved evidence are the
same in both modes. The terminal prints each check before it starts. Headed mode
requires a graphical desktop.
Nothing reads the installed config: `stack.sh` points the XDG directories at
`${ARCHIE_DEV_DIR:-~/.local/state/archie-dev}` and writes its overlay from
`deployments/dev.toml`. Logs are in its `logs/`. `e2e/stack.sh restart archied`
restarts one service.
restarts one service. Run `task e2e:down` before starting again: startup refuses
occupied service ports and checks that each launched process stays alive.
The first run needs `npm ci --prefix e2e` and `npx --prefix e2e playwright
The seed creates a local test administrator: `operator@example.test`, password
`archie-local-e2e-password`. Use it at `http://localhost:5173`; the browser
checks sign in with the same account. These are test fixtures for this
loopback-only stack. To use an existing test account, set `ARCHIE_E2E_EMAIL`
and `ARCHIE_E2E_PASSWORD` for both seeding and browser checks. Seeding never
resets an existing account or deletes test data.
The first run needs `pnpm install --dir e2e` and `pnpm --dir e2e exec playwright
install chromium`. In the cloud environment, Chromium and Playwright are
preinstalled; run with `NODE_PATH=$(npm root -g)`.
preinstalled; run with `NODE_PATH=$(pnpm root -g)`.
## Release evidence
```bash
node e2e/run.cjs --record v1.54.0
node e2e/run.cjs --record v1.54.0 all
```
writes `results/v1.54.0.md`, the pass or fail of every check for that
release. Commit it with the release. Screenshots stay in `out/`.
writes `results/v1.54.0.md`, the pass, fail or skip of every check for
that release. Commit it with the release. Screenshots stay in `out/`.
## Writing a check
A module in `checks/` exports `async ({ page, go, shot, fail })`. `go(path)`
loads a dashboard route, `shot(label)` saves a screenshot, `fail(msg)` records
a problem without stopping. A throw, a `fail`, or any console or page error
fails the check. Wait for elements, never for `networkidle`: the event stream
never goes idle.
A module in `checks/` exports `async ({ page, go, shot, fail, skip, settled, attach, tolerate })`.
- `go(path)` loads a dashboard route: `waitUntil: 'load'` plus 1200ms.
Wait for elements, never for `networkidle`: the event stream never goes idle.
- `shot(label)` saves `<check>-<kebab>[-<w>x<h>].png` after a short settle,
and records `{file, w, h, check}` in the manifest. The label is slugified,
so `shot('/')` becomes `routes-home.png`; a viewport other than the
1440x900 default adds a suffix (`-390x844`). Repeated labels get `-2`,
`-3`, so every capture is kept.
- `fail(msg)` records a problem without stopping.
- `skip(reason)` stops the check and records a skip: a missing
precondition, never a failure.
- `tolerate(re)` ignores console errors matching `re`, for a response the page is designed to survive.
- `attach(name, data)` saves a non-image artifact as `<check>-<name>`.
- `settled(sel?)` waits for a selector or URL, then settles briefly.
It is the harness-owned wait; checks need no capture wrapper or
ad-hoc sleeps around screenshots.
Each check gets a fresh page at 1440x900 with the login `storageState`;
a check that needs a phone viewport resizes it itself to 390x844.
Those are the only two viewports in use. A throw, a `fail`, or any
console or page error fails the check. One module covers one behaviour;
families share a prefix: `audit-*` for the audit page (redirect,
filters, revert, runtime, views-export, retention-live, phone),
`workflow-*` for the canvas (loading, validation, phone-layout, logic),
`chat-composer` for chat input, `chat-dock-*` for the chat dock (pin, drag-cancel,
layout, resize, drafts, picker, phone).
`routes` loads every static route and flags text with stray leading,
trailing or doubled spaces. `seeded` checks the seed is visible.
`/logs` is visited but skipped by the whitespace lint: log lines are
data, not copy.
## Output
Every run writes `out/<stamp>/` with the screenshots,
`results.json` (the manifest: `{check, ok, ms, problems, artifacts[]}`,
plus `skipped`/`skipReason` for skips) and `report.html`: a self-contained
test record with the commit, totals and one row per check (status, time,
message and that check's artifacts, screenshots inline). `attach(name, data)`
adds a non-image artifact to the current check; a failed check also gets a
`failure` screenshot.
Exits: 0 when every check passes or skips, 1 when any check fails,
2 when the harness itself errors. `ARCHIE_E2E_URL` points the run at
a dashboard other than `http://localhost:5173`.
## Pitfalls
| Symptom | Cause | Fix |
| --- | --- | --- |
| State Store exits: server is older than PostgreSQL 18 | another server answered | `stack.sh` uses port 55432; set `ARCHIE_DEV_PGPORT` if that is taken |
| Work request: repository is not configured | archied reads repository policies only at boot | `seed.sh` restarts it; do the same after changing policies |
| Startup says a port is in use | a stack or another process already owns it | Run `task e2e:down`, then `task e2e:up`; inspect any remaining listener with `ss -ltnp` |
| Your own shell is killed (exit 144) | `pkill -f` matched its own command line | `stack.sh stop` or `restart`, which kill by PID |
| `npx shadcn-vue add` cannot fetch the registry | Node's fetch ignores the cloud agent proxy | `curl` the registry JSON and copy the files |
| Postgres aborts in the cloud | `/tmp/claude-0` is reset to mode 700 | `stack.sh` keeps the root cluster in `/var/lib/archie-dev` |
+176
View File
@@ -0,0 +1,176 @@
// Keyboard and phone access: the task dialog fits and tabs in order, pages
// title correctly, the skip link and palette focus main content, and
// query-only tab switches keep focus where it is. Then the audit's two
// static sweeps (#1767): no unnamed controls on any route, and every keyboard
// focus stop's indicator clears 3:1 against the background behind it.
const assert = require('node:assert/strict');
const { staticRoutes } = require('./helpers/routes.cjs');
module.exports = async ({ page, go, shot, fail, settled, tolerate }) => {
// The extension catalogue 502 is a stack-environment issue, not this check.
tolerate(/extensions\/catalogue/);
await page.setViewportSize({ width: 390, height: 844 });
await go('/tasks');
await page.getByRole('button', { name: 'Jump to', exact: true }).click();
await page.getByRole('option', { name: 'New task', exact: true }).click();
const dialog = page.getByRole('dialog', { name: 'New task' });
await dialog.waitFor();
await settled();
const bounds = await dialog.boundingBox();
assert.ok(bounds.y >= 0 && bounds.y + bounds.height <= 844, 'New task dialog extends outside viewport');
await shot('phone-task-dialog-top');
const start = dialog.getByRole('button', { name: 'Start task', exact: true });
await start.scrollIntoViewIfNeeded();
const button = await start.boundingBox();
assert.ok(button.y >= 0 && button.y + button.height <= 844, 'Start task cannot be reached by scrolling');
await shot('phone-task-dialog');
const close = dialog.getByRole('button', { name: 'Close', exact: true });
await dialog.getByRole('button', { name: 'Cancel', exact: true }).focus();
await page.keyboard.press('Tab');
assert.ok(await close.evaluate(el => el === document.activeElement), 'Close is missing from keyboard tab order');
const closeBounds = await close.boundingBox();
assert.ok(closeBounds.y >= 0 && closeBounds.y + closeBounds.height <= 844, 'Close cannot be reached by keyboard');
await page.keyboard.press('Escape');
for (const [path, title] of [['/tasks', 'Tasks'], ['/events', 'Events'], ['/account', 'Your account'], ['/settings/models', 'Models | Instance'], ['/org/models', 'Models | Organisation']]) {
await go(path);
assert.equal(await page.title(), `${title} | Archie`);
}
await page.keyboard.press('Tab');
const skip = page.getByRole('link', { name: 'Skip to main content', exact: true });
assert.ok(await skip.evaluate(el => el === document.activeElement), 'Skip link is not the first keyboard stop');
await page.keyboard.press('Enter');
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content');
await page.getByRole('button', { name: 'Sections', exact: true }).click();
await page.getByRole('menuitem', { name: 'Tasks', exact: true }).click();
await page.waitForFunction(() => document.activeElement?.id === 'main-content', null, { timeout: 5000 }).catch(() => {});
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content', 'route navigation did not focus main');
await page.getByRole('button', { name: 'Jump to', exact: true }).click();
await page.getByRole('option', { name: 'Events', exact: true }).click();
await page.waitForFunction(() => document.activeElement?.id === 'main-content', null, { timeout: 5000 }).catch(() => {});
assert.equal(await page.evaluate(() => document.activeElement?.id), 'main-content', 'palette navigation did not focus main');
// The conversation panel is only open on some entries to this page; the
// focus check below needs it closed either way.
const hide = page.getByRole('button', { name: 'Hide conversation', exact: true });
if (await hide.count()) await hide.click();
const tab = page.getByRole('tab', { name: /^Map/ });
await tab.click();
assert.ok(await tab.evaluate(el => el === document.activeElement), 'query-only navigation stole focus');
await page.setViewportSize({ width: 1440, height: 900 });
// Unnamed controls: every visible input, textarea, select, button or
// widget role on each static route needs an accessible name (accname
// order: labelledby, label, content, value, placeholder, title).
for (const r of staticRoutes()) {
await go(r);
const unnamed = await page.evaluate(() => {
const name = (el) => {
const by = el.getAttribute('aria-labelledby');
if (by) {
const t = by.split(/\s+/).map((id) => (document.getElementById(id)?.textContent || '')).join(' ').trim();
if (t) return t;
}
const al = el.getAttribute('aria-label');
if (al && al.trim()) return al.trim();
if (el.id) {
const l = document.querySelector(`label[for="${CSS.escape(el.id)}"]`);
if (l && l.textContent.trim()) return l.textContent.trim();
}
const wrap = el.closest('label');
if (wrap && wrap.textContent.trim()) return wrap.textContent.trim();
if (el.tagName === 'BUTTON' || el.getAttribute('role') === 'button' || el.getAttribute('role') === 'tab' || el.getAttribute('role') === 'switch') return el.textContent.trim();
if (el.tagName === 'INPUT') {
const t = (el.getAttribute('type') || 'text').toLowerCase();
if (t === 'submit' || t === 'button' || t === 'reset') return el.value.trim();
if (t === 'image') return (el.getAttribute('alt') || '').trim();
}
return (el.getAttribute('placeholder') || el.getAttribute('title') || '').trim();
};
return [...document.querySelectorAll('button, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [role="checkbox"]')]
.filter((el) => el.type !== 'hidden' && el.getClientRects().length)
.filter((el) => !name(el))
.map((el) => `${el.tagName.toLowerCase()}${el.id ? '#' + el.id : ''}: ${el.outerHTML.slice(0, 120)}`);
});
for (const u of unnamed) fail(`unnamed control on ${r}: ${u}`);
}
// Focus contrast: Tab through each static route; the focused element's
// outline or ring must clear 3:1 against the effective background behind it.
const focusProbe = () => page.evaluate(() => {
const el = document.activeElement;
if (!el || el === document.body || el === document.documentElement) return null;
const cs = getComputedStyle(el);
const parse = (c) => {
c = String(c).trim();
let m = c.match(/rgba?\(([^)]+)\)/);
if (m) {
const p = m[1].split(',').map(Number);
return { r: p[0], g: p[1], b: p[2], a: p.length > 3 ? p[3] : 1 };
}
m = c.match(/^#([0-9a-f]{3,8})$/i);
if (m) {
let h = m[1];
if (h.length === 3 || h.length === 4) h = [...h].map((x) => x + x).join('');
const n = parseInt(h.slice(0, 6), 16);
return { r: (n >> 16) & 255, g: (n >> 8) & 255, b: n & 255, a: h.length === 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1 };
}
return null;
};
const bgBehind = (start) => {
for (let n = start; n; n = n.parentElement) {
const c = parse(getComputedStyle(n).backgroundColor);
if (c && c.a > 0) return c;
}
return { r: 255, g: 255, b: 255, a: 1 };
};
// An outer ring or outline is painted over the parent's background; an
// inset one over the element's own. Score against whichever is higher.
const bgSelf = bgBehind(el);
const bgParent = bgBehind(el.parentElement);
const over = (fg, bg) => {
const a = fg.a + bg.a * (1 - fg.a);
if (a === 0) return { r: 0, g: 0, b: 0 };
return { r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / a, g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / a, b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / a };
};
const lum = (c) => {
const f = (v) => { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); };
return 0.2126 * f(c.r) + 0.7152 * f(c.g) + 0.0722 * f(c.b);
};
const ratio = (c1, c2) => {
const l1 = lum(c1), l2 = lum(c2);
return (Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05);
};
let fg = null;
// The ring lives in --tw-ring-shadow on :focus-visible; read the var
// directly, then fall back to outline, any shadow layer, focus border.
if (el.matches(':focus-visible')) {
const m = cs.getPropertyValue('--tw-ring-shadow').match(/rgba?\([^)]+\)|#[0-9a-f]{3,8}\b/i);
if (m) { const c = parse(m[0]); if (c && c.a > 0) fg = c; }
}
if (!fg && cs.outlineStyle !== 'none' && parseFloat(cs.outlineWidth) > 0) fg = parse(cs.outlineColor === 'currentcolor' ? cs.color : cs.outlineColor);
if (!fg && cs.boxShadow && cs.boxShadow !== 'none') {
for (const m of cs.boxShadow.matchAll(/rgba?\([^)]+\)|#[0-9a-f]{3,8}\b/gi)) {
const c = parse(m[0]);
if (c && c.a > 0) { fg = c; break; }
}
}
if (!fg && el.matches(':focus-visible') && parseFloat(cs.borderTopWidth) > 0) {
const c = parse(cs.borderTopColor);
if (c && c.a > 0) fg = c;
}
const sig = `${el.tagName}#${el.id}:${(el.textContent || '').trim().slice(0, 30)}`;
if (!fg) return { sig, ratio: 0 };
return { sig, ratio: Math.max(ratio(over(fg, bgSelf), bgSelf), ratio(over(fg, bgParent), bgParent)) };
});
for (const r of staticRoutes()) {
await go(r);
let prev = '';
for (let i = 0; i < 40; i++) {
await page.keyboard.press('Tab');
const info = await focusProbe();
if (!info || info.sig === prev) break;
prev = info.sig;
if (info.ratio < 3) fail(`focus indicator under 3:1 on ${r} at ${info.sig} (ratio ${info.ratio.toFixed(2)})`);
}
}
};
+113
View File
@@ -0,0 +1,113 @@
// Audit filters are server-evaluated through the URL contract: search,
// category, time range, back/forward restore, denied, and the actor filter.
const assert = require('node:assert/strict');
const { trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail }) => {
const { requestMatching, waitForUrl } = trackAudit(page);
await go('/org/audit');
const status = await page.evaluate(async () => (await fetch('/api/auth/status')).json());
const actor = status?.user?.id;
assert.ok(actor, 'signed-in identity has no id');
const search = page.getByLabel('Search events', { exact: true });
let request = await requestMatching(
() => search.fill('repository'),
(u) => u.searchParams.get('q') === 'repository',
);
assert.ok(request, 'search issued no matching /api/audit request');
await waitForUrl((u) => u.searchParams.get('q') === 'repository');
assert.equal((await search.inputValue()), 'repository');
await go('/org/audit');
request = await requestMatching(
() => page.getByRole('button', { name: 'Runtime', exact: true }).click(),
(u) => u.searchParams.get('categories') === 'runtime',
);
assert.ok(request, 'category filter issued no matching /api/audit request');
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
assert.equal(
await page.getByRole('button', { name: 'Runtime', exact: true }).getAttribute('aria-pressed'),
'true',
);
// Time: Any time drops the window from the request rather than guessing one.
await page.getByRole('combobox', { name: 'Time range', exact: true }).click();
request = await requestMatching(
() => page.getByRole('option', { name: 'Any time', exact: true }).click(),
(u) => u.searchParams.get('from') === null && u.searchParams.get('categories') === 'runtime',
);
assert.ok(request, 'Any time issued no matching /api/audit request');
await waitForUrl((u) => u.searchParams.get('since') === 'any');
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Any time');
// Back/forward restore the controls the URL describes.
const backRequest = page.waitForRequest(
(r) => {
const u = new URL(r.url());
return u.pathname === '/api/audit' && u.searchParams.get('categories') === 'runtime' && !!u.searchParams.get('from');
},
{ timeout: 8000 },
);
await page.goBack();
await backRequest;
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime' && u.searchParams.get('since') === null);
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Last 30 days');
assert.equal(
await page.getByRole('button', { name: 'Runtime', exact: true }).getAttribute('aria-pressed'),
'true',
'back did not restore the category toggle',
);
const forwardRequest = page.waitForRequest(
(r) => {
const u = new URL(r.url());
return u.pathname === '/api/audit' && u.searchParams.get('categories') === 'runtime' && u.searchParams.get('from') === null;
},
{ timeout: 8000 },
);
await page.goForward();
await forwardRequest;
await waitForUrl((u) => u.searchParams.get('since') === 'any');
assert.equal(await page.getByRole('combobox', { name: 'Time range', exact: true }).innerText(), 'Any time');
// Denied reaches the server through the same URL contract as the other
// filters. It must both update the URL and issue a request.
await go('/org/audit');
const denied = page.getByRole('button', { name: 'Denied', exact: true });
request = await requestMatching(
() => denied.click(),
(u) => u.searchParams.get('outcome') === 'denied',
3000,
);
const deniedUrl = new URL(page.url());
if (!request || deniedUrl.searchParams.get('outcome') !== 'denied') {
await shot('denied');
fail(
`Denied filter did not reach the server: URL ${page.url()} has outcome=${deniedUrl.searchParams.get('outcome') ?? 'absent'}, ` +
`aria-pressed=${await denied.getAttribute('aria-pressed')}, no /api/audit request with outcome=denied`,
);
} else {
assert.equal(await denied.getAttribute('aria-pressed'), 'true');
}
// Advanced actor filter: server-evaluated, in the URL, shown as a chip.
await go('/org/audit');
await page.getByRole('button', { name: 'Filters', exact: true }).click();
const actorInput = page.getByLabel('Actor', { exact: true });
request = await requestMatching(
async () => {
await actorInput.fill(actor);
await actorInput.press('Enter');
},
(u) => u.searchParams.get('actor') === actor,
);
assert.ok(request, 'advanced actor filter issued no matching /api/audit request');
await waitForUrl((u) => u.searchParams.get('actor') === actor);
assert.match(
await page.locator('ul[aria-label="Active filters"] li', { hasText: 'Actor:' }).first().innerText(),
new RegExp(actor),
);
await shot('filters');
await page.keyboard.press('Escape');
};
+42
View File
@@ -0,0 +1,42 @@
// The audit page at phone width: secondary columns collapse, and the list,
// an expanded row and the filters dialog fit without horizontal overflow.
const assert = require('node:assert/strict');
const { trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail, settled }) => {
trackAudit(page);
await page.setViewportSize({ width: 390, height: 844 });
await go('/org/audit');
const assertNoOverflow = async (label) => {
const { scrollWidth, innerWidth } = await page.evaluate(() => ({
scrollWidth: document.documentElement.scrollWidth,
innerWidth,
}));
if (scrollWidth > innerWidth) {
fail(`${label} overflows 390px: documentElement.scrollWidth=${scrollWidth} > innerWidth=${innerWidth}`);
}
};
await page.locator('[data-row-key]').first().waitFor();
await assertNoOverflow('audit list');
assert.equal(
await page.locator('thead th', { hasText: 'Target' }).first().evaluate((el) => getComputedStyle(el).display),
'none',
'secondary columns are still rendered on the phone',
);
await shot('list');
const phoneRow = page.locator('[data-row-key]').first();
await phoneRow.focus();
await page.keyboard.press('Enter');
await settled();
assert.equal(await phoneRow.getAttribute('aria-expanded'), 'true', 'phone row did not expand');
await assertNoOverflow('expanded change set');
await shot('expanded');
await page.getByRole('button', { name: 'Filters', exact: true }).click();
await page.getByRole('dialog').first().waitFor();
await settled();
await assertNoOverflow('advanced filters');
await shot('filters');
};
+50
View File
@@ -0,0 +1,50 @@
// A deep link to the old history route redirects to the audit page keeping
// section, actor, since and the hash, and the feed loads with filter chips.
const assert = require('node:assert/strict');
const { trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail }) => {
const { lastRequest } = trackAudit(page);
await go('/org/audit');
const status = await page.evaluate(async () => (await fetch('/api/auth/status')).json());
const actor = status?.user?.id;
assert.ok(actor, 'signed-in identity has no id');
const deepLink = `/settings/history?section=container-runtime-policies&actor=${encodeURIComponent(actor)}&since=30d#deep`;
await go(deepLink);
assert.match(page.url(), /\/org\/audit\?/, 'history did not redirect to the audit route');
assert.match(page.url(), /section=container-runtime-policies/, 'redirect dropped section');
assert.match(page.url(), new RegExp(`actor=${encodeURIComponent(actor)}`), 'redirect dropped actor');
assert.match(page.url(), /since=30d/, 'redirect dropped since');
assert.match(page.url(), /#deep$/, 'redirect dropped the hash');
const redirected = lastRequest();
assert.ok(redirected, 'the redirect issued no /api/audit request');
assert.equal(redirected.searchParams.get('kind'), 'container-runtime-policies');
assert.equal(redirected.searchParams.get('actor'), actor);
// The feed must be readable before anything below can mean anything. A 500
// here is the whole page: say what the server answered instead of timing out.
const probe = await page.evaluate(async () => {
const response = await fetch('/api/audit?limit=1');
return { status: response.status, body: await response.text() };
});
if (probe.status !== 200) {
await shot('unavailable');
fail(`GET /api/audit returned ${probe.status}: ${probe.body.slice(0, 200)}`);
return;
}
const kindChip = page.locator('ul[aria-label="Active filters"] li', { hasText: 'Kind:' });
await kindChip.first().waitFor({ timeout: 8000 });
assert.match(await kindChip.first().innerText(), /Container runtime policies/, 'kind chip missing its catalog title');
assert.match(
await page.locator('ul[aria-label="Active filters"] li', { hasText: 'Actor:' }).first().innerText(),
new RegExp(actor),
'actor chip missing',
);
await shot('redirect');
await go('/org/audit');
await page.locator('[data-row-key]').first().waitFor();
await shot('desktop');
};
+148
View File
@@ -0,0 +1,148 @@
// Audit retention reads the stored resource, the live tail prepends new rows
// without a reload and holds them behind a button while scrolled away, and a
// retention save persists. The save stays last: it must not stop the rest.
const assert = require('node:assert/strict');
const { trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail, settled }) => {
const { loadCount } = trackAudit(page);
await go('/org/audit');
const resourceResponse = await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`);
assert.equal(resourceResponse.status(), 200, 'audit-retention resource is unreadable');
const retentionResource = await resourceResponse.json();
const retentionHours = (value) => {
const match = String(value || '').match(/^(\d+)h$/);
return match ? Number(match[1]) : 0;
};
const originalHours = retentionHours(retentionResource.resource.value.runtime_event_retention);
const openRetention = async () => {
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
await page.getByRole('menuitem', { name: 'Retention', exact: true }).click();
const dialog = page.getByRole('dialog');
await dialog.waitFor();
await dialog.getByLabel('Runtime event retention (hours)', { exact: true }).waitFor();
return dialog;
};
let retentionDialog = await openRetention();
assert.match(await retentionDialog.innerText(), /Audit retention/);
assert.equal(
await retentionDialog.getByLabel('Runtime event retention (hours)', { exact: true }).inputValue(),
String(originalHours),
'retention dialog did not read the stored resource',
);
await retentionDialog.getByRole('button', { name: 'Cancel', exact: true }).click();
await retentionDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
assert.ok(!(await retentionDialog.isVisible().catch(() => false)), 'Cancel left the retention dialog open');
// ---- live tail -----------------------------------------------------------
await go('/org/audit');
await page.evaluate(() => window.scrollTo(0, 0));
await settled();
const topKey = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
const loadsBeforeWrite = loadCount();
let resource = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
const toggleRetention = async () => {
const current = retentionHours(resource.resource.value.runtime_event_retention);
const next = current === 2160 ? 2161 : 2160;
const written = await page.request.post(
`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention/commands/replace`,
{
headers: { 'X-Archie-CSRF': '1', Origin: new URL(page.url()).origin },
data: { value: { runtime_event_retention: `${next}h` }, expected_version: resource.resource.version },
},
);
const body = await written.text();
assert.equal(written.status(), 200, `retention write answered ${written.status()}: ${body.slice(0, 200)}`);
resource = JSON.parse(body);
};
await toggleRetention();
let liveKey = null;
for (let attempt = 0; attempt < 40; attempt += 1) {
const key = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
if (key !== topKey) {
liveKey = key;
break;
}
await page.waitForTimeout(300);
}
if (!liveKey) {
fail('live tail did not show a new row within 12s of a write');
await shot('live');
} else {
assert.equal(loadCount(), loadsBeforeWrite, 'the live row required a page reload');
assert.match(
await page.locator(`[data-row-key="${liveKey}"]`).innerText(),
/audit-retention/i,
'the live row is not the write that caused it',
);
await shot('live');
}
// Scrolled away, a new event is held behind a button instead of jumping the
// list under the operator.
await page.evaluate(() => window.scrollTo(0, 900));
await settled();
const scrolledTo = await page.evaluate(() => window.scrollY);
assert.ok(scrolledTo > 80, 'the feed is too short to test held new events');
const heldTop = await page.locator('[data-row-key]').first().getAttribute('data-row-key');
await toggleRetention();
const heldButton = page.getByRole('button', { name: /^\d+ new events?$/ }).first();
let held = false;
for (let attempt = 0; attempt < 40; attempt += 1) {
if ((await heldButton.count()) && (await heldButton.isVisible().catch(() => false))) {
held = true;
break;
}
await page.waitForTimeout(300);
}
if (!held) {
fail('held new events did not appear while scrolled away');
await shot('held');
} else {
assert.equal(
await page.locator('[data-row-key]').first().getAttribute('data-row-key'),
heldTop,
'a new row was prepended while the operator was scrolled away',
);
await shot('held');
await heldButton.click();
await page.waitForFunction(
(top) => document.querySelector('[data-row-key]')?.getAttribute('data-row-key') !== top,
heldTop,
{ timeout: 8000 },
).catch(() => {});
await settled();
assert.notEqual(
await page.locator('[data-row-key]').first().getAttribute('data-row-key'),
heldTop,
'showing held events did not prepend the new row',
);
assert.ok((await page.evaluate(() => window.scrollY)) < 10, 'showing held events did not return to the top');
}
// ---- retention: save -----------------------------------------------------
// Kept last: the page error this currently raises must not stop the rest.
await go('/org/audit');
retentionDialog = await openRetention();
const hoursField = retentionDialog.getByLabel('Runtime event retention (hours)', { exact: true });
const beforeSave = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
const beforeHours = retentionHours(beforeSave.resource.value.runtime_event_retention);
const wanted = beforeHours === 2160 ? 2161 : 2160;
await hoursField.fill(String(wanted));
await retentionDialog.getByRole('button', { name: 'Save', exact: true }).click();
await retentionDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
const stillOpen = await retentionDialog.isVisible().catch(() => false);
const afterSave = await (await page.request.get(`${new URL(page.url()).origin}/api/control-plane/resources/audit-retention`)).json();
const afterHours = retentionHours(afterSave.resource.value.runtime_event_retention);
if (stillOpen || afterHours !== wanted) {
await shot('retention-save');
fail(
`retention save did not complete: dialog ${stillOpen ? 'stayed open' : 'closed'}, ` +
`stored retention is ${afterHours}h (wanted ${wanted}h), URL ${page.url()}`,
);
}
};
+69
View File
@@ -0,0 +1,69 @@
// A revertable change set expands to its Before/After diff, offers one Revert
// action whose dialog cancels cleanly, and toggles from the keyboard.
const assert = require('node:assert/strict');
const { DEFAULT_WINDOW_MS, trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail, settled }) => {
trackAudit(page);
await go('/org/audit');
await page.locator('[data-row-key]').first().waitFor();
const from = new Date(Date.now() - DEFAULT_WINDOW_MS).toISOString();
// The feed page size is 100: only rows in this response are rendered.
const feed = await page.evaluate(
async (iso) => (await fetch(`/api/audit?limit=100&from=${encodeURIComponent(iso)}`)).json(),
from,
);
const records = feed.records || [];
assert.ok(records.length, 'the seeded feed is empty');
const changeSet = records.find(
(row) =>
row.target?.kind === 'resource' &&
(row.detail?.fields || []).length > 0 &&
(row.detail?.version ?? 0) > 1,
);
if (!changeSet) {
fail('no revertable settings change set in the feed; cannot exercise the diff or Revert');
return;
}
const row = page.locator(`[data-row-key="${changeSet.id}"]`);
await row.waitFor();
await row.scrollIntoViewIfNeeded();
await row.locator('td').first().click();
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'click did not expand the change set');
const detail = row.locator('xpath=following-sibling::tr[1]');
await detail.getByText('Before:', { exact: false }).first().waitFor();
assert.match(await detail.innerText(), /After:/, 'expanded change set has no after value');
assert.equal(
await detail.getByRole('button', { name: /^Revert \S/ }).count(),
0,
'the audit diff offers a per-field revert',
);
const revertAll = page.getByRole('button', { name: 'Revert', exact: true });
assert.ok((await revertAll.count()) > 0, 'no Revert action on a revertable change set');
await shot('change-set');
await revertAll.first().click();
const dialog = page.getByRole('alertdialog');
await dialog.waitFor();
assert.match(await dialog.innerText(), /Revert this change\?/);
assert.match(await dialog.innerText(), /previous version opens for review/i);
await dialog.getByRole('button', { name: 'Cancel', exact: true }).click();
await dialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
assert.ok(!(await dialog.isVisible().catch(() => false)), 'Cancel left the revert dialog open');
assert.equal(
await page.getByRole('region', { name: 'Unsaved changes' }).count(),
0,
'Cancel touched the save bar',
);
// Enter is the keyboard equivalent of clicking the row.
await row.click();
assert.equal(await row.getAttribute('aria-expanded'), 'false', 'the row did not collapse');
await row.focus();
await page.keyboard.press('Enter');
await settled();
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'Enter did not expand the change set');
};
+36
View File
@@ -0,0 +1,36 @@
// A runtime event with a task target expands to its metadata and links to
// the task. The seed's work requests park and record the event; the feed is
// filtered to it so settings noise cannot push it off the page. Without it
// there is nothing to exercise, so the check skips instead of failing.
const assert = require('node:assert/strict');
const { DEFAULT_WINDOW_MS, trackAudit } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, skip }) => {
trackAudit(page);
await go('/org/audit?kind=parked');
await page.locator('[data-row-key]').first().waitFor();
const from = new Date(Date.now() - DEFAULT_WINDOW_MS).toISOString();
// The feed page size is 100: only rows in this response are rendered.
const feed = await page.evaluate(
async (iso) => (await fetch(`/api/audit?limit=100&kind=parked&from=${encodeURIComponent(iso)}`)).json(),
from,
);
const records = feed.records || [];
const runtime = records.find((row) => row.category === 'runtime' && row.target?.kind === 'task' && row.target?.id);
if (!runtime) {
skip('no runtime event with a task target in the feed');
}
const row = page.locator(`[data-row-key="${runtime.id}"]`);
await row.waitFor();
await row.scrollIntoViewIfNeeded();
await row.locator('td').first().click();
assert.equal(await row.getAttribute('aria-expanded'), 'true', 'runtime row did not expand');
const detail = row.locator('xpath=following-sibling::tr[1]');
await detail.locator('dl dt', { hasText: 'Target' }).first().waitFor();
assert.match(await detail.innerText(), /Table/, 'runtime metadata has no table row');
const link = detail.getByRole('link', { name: runtime.target.label || runtime.target.id, exact: true });
assert.equal(await link.count(), 1, 'runtime target is not a link');
assert.equal(await link.getAttribute('href'), `/tasks/${runtime.target.id}`);
};
+50
View File
@@ -0,0 +1,50 @@
// Audit saved views round-trip through the URL, and CSV/JSON exports carry
// the resolved window and arrive as attachments.
const assert = require('node:assert/strict');
const { trackAudit, exportOnce } = require('./helpers/audit-helpers.cjs');
module.exports = async ({ page, go, shot, fail, settled }) => {
const { waitForUrl } = trackAudit(page);
await go('/org/audit');
await page.getByRole('button', { name: 'Runtime', exact: true }).click();
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
const viewName = `e2e-view-${Date.now()}`;
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
await page.getByRole('menuitem', { name: 'Save view…', exact: true }).click();
const saveDialog = page.getByRole('dialog');
await saveDialog.waitFor();
await saveDialog.getByLabel('Name', { exact: true }).fill(viewName);
await saveDialog.getByRole('button', { name: 'Save', exact: true }).click();
await settled();
await saveDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
const savedView = page.getByRole('combobox', { name: 'Saved view', exact: true });
await savedView.waitFor();
assert.equal((await savedView.innerText()).trim(), viewName);
await shot('saved-view');
await page.getByRole('button', { name: 'Runtime', exact: true }).click();
await waitForUrl((u) => u.searchParams.get('categories') === null);
await savedView.click();
await page.getByRole('option', { name: viewName, exact: true }).click();
await waitForUrl((u) => u.searchParams.get('categories') === 'runtime');
assert.equal((await savedView.innerText()).trim(), viewName, 'applying the saved view did not restore it');
await page.getByRole('button', { name: 'Audit actions', exact: true }).click();
await page.getByRole('menuitem', { name: 'Delete view', exact: true }).click();
await savedView.waitFor({ state: 'detached', timeout: 5000 }).catch(() => {});
assert.equal(await savedView.count(), 0, 'deleting the saved view left it in the picker');
await go('/org/audit');
await page.getByRole('button', { name: 'Export', exact: true }).click();
await page.getByRole('menuitem', { name: 'CSV', exact: true }).waitFor();
await shot('export');
await page.keyboard.press('Escape');
const csvBody = await exportOnce(page, fail, 'CSV', 'csv');
if (csvBody !== null) assert.ok(csvBody.split('\n')[0].trim().length > 0, 'CSV export is empty');
const jsonBody = await exportOnce(page, fail, 'JSON', 'json');
if (jsonBody !== null) assert.ok(jsonBody.trimStart().startsWith('['), 'JSON export is not an array');
};
+70
View File
@@ -0,0 +1,70 @@
// The chat composer: IME confirmation never submits the draft, Shift+Enter
// inserts a newline, ordinary Enter submits and clears, and # attaches a task.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot, tolerate }) => {
tolerate(/api\/tasks/);
await go('/events');
const composer = page.getByRole('combobox', { name: 'Message Archie', exact: true });
await composer.waitFor();
await composer.fill('Composition in progress');
const sent = [];
await page.route('**/api/chat/stream', async route => {
sent.push(route.request().postDataJSON().text);
await route.fulfill({ contentType: 'text/event-stream', body: 'data: {"type":"done","text":"Test response"}\n\n' });
});
for (const event of [{ isComposing: true }, { keyCode: 229 }]) {
await composer.dispatchEvent('keydown', { key: 'Enter', bubbles: true, cancelable: true, ...event });
assert.equal(await composer.inputValue(), 'Composition in progress', 'IME confirmation submitted the draft');
}
assert.equal(sent.length, 0);
await composer.press('Shift+Enter');
assert.ok((await composer.inputValue()).includes('\n'), 'Shift+Enter no longer inserts a newline');
await composer.fill('Ordinary Enter submits');
const request = page.waitForRequest('**/api/chat/stream');
await composer.press('Enter');
assert.equal((await request).postDataJSON().text, 'Ordinary Enter submits');
assert.equal(await composer.inputValue(), '');
let failTasks = true;
await page.route('**/api/tasks?*', async route => {
if (failTasks) return route.fulfill({ status: 500, contentType: 'text/plain', body: 'task store down' });
await route.fulfill({
contentType: 'application/json',
body: JSON.stringify([
{ id: 1861, title: "Chat composer: '#' context dropdown", status: 'running' },
{ id: 1842, title: 'Retry stalled task runs', status: 'done' },
]),
});
});
const tasksPalette = page.getByRole('listbox', { name: 'Tasks' });
await composer.fill('Look at #');
await tasksPalette.getByRole('alert').waitFor();
assert.equal(await tasksPalette.getByRole('option').count(), 0);
failTasks = false;
await tasksPalette.getByRole('button', { name: 'Retry' }).click();
await tasksPalette.getByRole('option').first().waitFor();
assert.equal(await tasksPalette.getByRole('option').count(), 2);
await composer.press('Escape');
await tasksPalette.waitFor({ state: 'hidden' });
await composer.fill('Look at #184 now');
await composer.evaluate(el => el.setSelectionRange(12, 12));
await composer.dispatchEvent('input');
await tasksPalette.getByRole('option').first().waitFor();
assert.equal(await tasksPalette.getByRole('option').count(), 1);
await composer.press('Tab');
await tasksPalette.waitFor({ state: 'hidden' });
assert.equal(await composer.inputValue(), 'Look at now');
await page.getByRole('list', { name: 'Attached tasks' }).getByText('#1842').waitFor();
const tagged = page.waitForRequest('**/api/chat/stream');
await composer.press('Enter');
const text = (await tagged).postDataJSON().text;
assert.ok(text.startsWith('Look at now') && text.includes('#1842 Retry stalled task runs'), text);
assert.equal(await page.getByRole('list', { name: 'Attached tasks' }).count(), 0);
await shot('chat-composition');
};
+42
View File
@@ -0,0 +1,42 @@
// Each conversation keeps its own unsent text and attached tasks. Starting a
// new chat opens an empty composer, switching back restores the earlier
// draft, and hiding and reopening the conversation loses nothing.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
module.exports = async ({ page, go, shot }) => {
await page.route('**/api/tasks?*', (route) =>
route.fulfill({ contentType: 'application/json', body: JSON.stringify([{ id: 1861, title: 'Task picker', status: 'running' }]) }),
);
await h.load(page, go);
await h.expand(page);
const composer = h.composerOf(page);
const tags = page.getByRole('list', { name: 'Attached tasks' });
await composer.fill('draft for the first chat');
await composer.fill('#');
await page.getByRole('listbox', { name: 'Tasks' }).getByRole('option').first().click();
await tags.getByText('#1861').waitFor();
await composer.fill('draft for the first chat');
await page.getByRole('button', { name: 'New chat' }).click();
await h.until(async () => (await composer.inputValue()) === '' && (await tags.count()) === 0, 'a new chat inherited the first chat draft');
await composer.fill('draft for the second chat');
await h.hideOf(page).click();
await h.expand(page);
assert.equal(await composer.inputValue(), 'draft for the second chat', 'hiding the conversation lost the draft');
const pick = async (index) => {
await page.getByRole('combobox', { name: 'Conversation' }).click();
await page.getByRole('option').nth(index).click();
};
await pick(1);
await h.until(async () => (await composer.inputValue()) === 'draft for the first chat', 'switching back did not restore the first draft');
await tags.getByText('#1861').waitFor();
await shot('first-chat-draft');
await pick(0);
await h.until(async () => (await composer.inputValue()) === 'draft for the second chat', 'switching forward did not restore the second draft');
assert.equal(await tags.count(), 0, 'the first chat task tag leaked into the second chat');
};
+27
View File
@@ -0,0 +1,27 @@
// A drag the browser cancels (a touch turned into a scroll, a lost pointer)
// leaves the dock where it was: nothing pins, nothing stays offset, and the
// next drag still works.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
module.exports = async ({ page, go }) => {
await h.load(page, go);
await h.expand(page);
const dock = h.dockOf(page);
const before = await dock.boundingBox();
const header = dock.locator('div.cursor-grab');
await h.dragTo(page, 1430);
const dragging = await dock.getAttribute('style');
assert.ok(/translate/.test(dragging || ''), 'the drag never started, so cancelling it proves nothing');
await header.dispatchEvent('pointercancel');
await page.mouse.up();
await h.until(async () => !/translate/.test((await dock.getAttribute('style')) || ''), 'the dock stayed offset after the drag was cancelled');
assert.deepEqual(await dock.boundingBox(), before, 'cancelling the drag moved the dock');
assert.equal((await h.saved(page)).side, null, 'a cancelled drag pinned the dock');
await h.dragTo(page, 1430);
await page.mouse.up();
await h.until(async () => (await h.saved(page)).side === 'right', 'a drag after a cancelled one did not pin');
};
+46
View File
@@ -0,0 +1,46 @@
// The saved dock layout: a stored mode and width are honoured, widths outside
// the allowed range are clamped, unreadable JSON falls back to a usable
// floating dock that saves again, and visiting phone width never overwrites
// the desktop choice.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
module.exports = async ({ page, go, shot, tolerate }) => {
tolerate(/JSON|SyntaxError/);
const dock = h.dockOf(page);
await h.load(page, go, JSON.stringify({ mode: 'left', w: 500 }));
await h.expand(page);
let box = await dock.boundingBox();
h.near(box.x, 0, 'saved left pin');
h.near(box.width, 500, 'saved width');
assert.ok((await h.mainRect(page)).x >= 499, 'page did not reflow beside the restored dock');
await h.load(page, go, JSON.stringify({ mode: 'right', w: -4 }));
await h.expand(page);
h.near((await dock.boundingBox()).width, 320, 'a negative width clamps to the minimum');
await h.load(page, go, JSON.stringify({ mode: 'right', w: 9999 }));
await h.expand(page);
h.near((await dock.boundingBox()).width, 720, 'a huge width clamps to the maximum');
await h.load(page, go, '{broken');
await h.expand(page);
box = await dock.boundingBox();
assert.ok(box.height < 900 && box.x > 0 && box.x + box.width < 1440, 'unreadable layout did not fall back to a floating dock');
await h.composerOf(page).fill('still usable');
await h.dragTo(page, 1430);
await page.mouse.up();
await h.until(async () => (await h.saved(page)).mode === 'right', 'the dock did not save a layout over the unreadable one');
await shot('recovered');
await h.load(page, go, JSON.stringify({ mode: 'left', w: 460 }));
const layout = await h.stored(page);
await page.setViewportSize({ width: 390, height: 844 });
await h.expand(page);
box = await dock.boundingBox();
assert.ok(box.x >= 0 && box.x + box.width <= 390, 'the dock overflows the phone viewport');
await page.setViewportSize({ width: 1440, height: 900 });
assert.equal(await h.stored(page), layout, 'visiting phone width rewrote the saved layout');
await h.until(async () => Math.abs((await dock.boundingBox()).width - 460) <= 1, 'the desktop layout did not return after phone width');
};
+41
View File
@@ -0,0 +1,41 @@
// The chat dock at phone width: the bar and the open conversation fit the
// screen on a few pages, a stored desktop pin is ignored, the composer stays
// reachable, and the dock adds no sideways scroll. The page's own overflow is
// phone-overflow's to report, so the dock is measured against the page
// without it.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
module.exports = async ({ page, go, shot, tolerate }) => {
tolerate(/extensions\/catalogue/);
await page.setViewportSize({ width: 390, height: 844 });
const fits = async (label) => {
const { scroll, bare, inner } = await page.evaluate(() => {
const root = document.querySelector('aside[aria-label="Chat with Archie"]').parentElement;
const scroll = document.documentElement.scrollWidth;
root.style.display = 'none';
const bare = document.documentElement.scrollWidth;
root.style.display = '';
return { scroll, bare, inner: window.innerWidth };
});
assert.ok(scroll <= Math.max(bare, inner), `${label}: the dock widens the page (${scroll} > ${Math.max(bare, inner)})`);
const box = await h.dockOf(page).boundingBox();
assert.ok(box.x >= 0 && box.x + box.width <= inner, `${label}: dock leaves the screen (${box.x}..${box.x + box.width})`);
assert.ok(box.y >= 0 && box.y + box.height <= 844, `${label}: dock leaves the screen vertically`);
};
for (const path of ['/events', '/account', '/org/agents']) {
await h.load(page, go, JSON.stringify({ side: 'right', width: 420 }));
await go(path);
await fits(`${path} collapsed`);
await h.expand(page);
await fits(`${path} open`);
assert.equal(await page.evaluate(() => document.documentElement.style.getPropertyValue('--chat-pin-r')), '0px', `${path}: the page reserved room for a pin on a phone`);
const composer = await h.composerOf(page).boundingBox();
assert.ok(composer.y + composer.height <= 844 && composer.x >= 0 && composer.x + composer.width <= 390, `${path}: composer is off screen`);
assert.equal(await h.dividerOf(page).count(), 0, `${path}: a phone shows the pin divider`);
await h.composerOf(page).fill('A long unbroken line '.repeat(20));
await fits(`${path} long draft`);
await shot(path);
}
};
+59
View File
@@ -0,0 +1,59 @@
// The # task picker by keyboard: arrows move the selection and wrap, Enter
// attaches the selected task, Escape closes the picker and leaves the
// conversation open, and an IME confirmation Enter never picks.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
const tasks = [
{ id: 1861, title: 'Task picker', status: 'running' },
{ id: 1842, title: 'Retry stalled task runs', status: 'done' },
{ id: 1830, title: 'Filter forge text', status: 'queued' },
];
module.exports = async ({ page, go, shot }) => {
await page.route('**/api/tasks?*', (route) => route.fulfill({ contentType: 'application/json', body: JSON.stringify(tasks) }));
await h.load(page, go);
await h.expand(page);
const composer = h.composerOf(page);
const palette = page.getByRole('listbox', { name: 'Tasks' });
const options = palette.getByRole('option');
const selected = () => options.evaluateAll((els) => els.findIndex((el) => el.getAttribute('aria-selected') === 'true'));
const tags = page.getByRole('list', { name: 'Attached tasks' });
await composer.fill('Look at #');
await options.first().waitFor();
assert.equal(await options.count(), 3);
assert.equal(await selected(), 0);
await shot('picker');
await composer.press('ArrowDown');
assert.equal(await selected(), 1);
assert.equal(await composer.getAttribute('aria-activedescendant'), 'slash-palette-option-1');
await composer.press('ArrowUp');
await composer.press('ArrowUp');
assert.equal(await selected(), 2, 'ArrowUp from the first row did not wrap to the last');
await composer.press('ArrowDown');
assert.equal(await selected(), 0, 'ArrowDown from the last row did not wrap to the first');
await composer.press('ArrowDown');
for (const event of [{ isComposing: true }, { keyCode: 229 }]) {
await composer.dispatchEvent('keydown', { key: 'Enter', bubbles: true, cancelable: true, ...event });
assert.equal(await options.count(), 3, 'an IME confirmation closed the picker');
assert.equal(await tags.count(), 0, 'an IME confirmation attached a task');
}
await composer.press('Enter');
await palette.waitFor({ state: 'hidden' });
await tags.getByText('#1842').waitFor();
assert.equal(await tags.getByRole('listitem').count(), 1);
assert.equal(await composer.inputValue(), 'Look at ', 'the # token stayed in the text');
assert.ok(await composer.evaluate((el) => document.activeElement === el), 'focus left the composer');
await composer.fill('Look at #');
await options.first().waitFor();
await composer.press('Escape');
await palette.waitFor({ state: 'hidden' });
assert.equal(await h.hideOf(page).isVisible(), true, 'Escape on the picker also closed the conversation');
await composer.press('Escape');
await h.hideOf(page).waitFor({ state: 'hidden' });
};
+52
View File
@@ -0,0 +1,52 @@
// Pinning the chat dock: dragging its header to an edge pins it there and the
// page reflows beside it; double-clicking the header unpins it; hiding the
// conversation gives the page back its width; the choice survives a reload.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
module.exports = async ({ page, go, shot }) => {
await h.load(page, go);
await h.expand(page);
const dock = h.dockOf(page);
const free = await h.mainRect(page);
const floating = await dock.boundingBox();
assert.ok(floating.height < 900, 'the dock starts as a floating card');
await h.dragTo(page, 1430);
await page.mouse.up();
await h.until(async () => (await h.saved(page)).side === 'right', 'dragging to the right edge did not pin right');
const right = await dock.boundingBox();
h.near(right.x + right.width, 1440, 'right pin touches the right edge');
h.near(right.height, 900, 'a pinned dock is full height');
const reflowed = await h.mainRect(page);
assert.ok(reflowed.x + reflowed.width <= right.x + 1, `page content runs under the pinned dock: ${reflowed.x + reflowed.width} > ${right.x}`);
assert.ok(reflowed.width < free.width, 'the page did not give up any width');
assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth), 'pinning made the page scroll sideways');
await shot('pinned-right');
await page.reload();
await h.expand(page);
await h.until(async () => Math.abs((await dock.boundingBox()).x - right.x) <= 1, 'the right pin did not survive a reload');
await h.hideOf(page).click();
await h.until(async () => Math.abs((await h.mainRect(page)).width - free.width) <= 1, 'hiding the conversation kept the page narrowed');
await h.expand(page);
await h.until(async () => Math.abs((await dock.boundingBox()).x - right.x) <= 1, 'reopening did not restore the pin');
const strip = await h.grip(page);
await page.mouse.dblclick(strip.x, strip.y);
await h.until(async () => (await h.saved(page)).side === null, 'double-clicking the header did not unpin');
assert.ok((await dock.boundingBox()).height < 900, 'an unpinned dock is a floating card again');
h.near((await h.mainRect(page)).width, free.width, 'the page returns to its full width');
await h.dragTo(page, 10);
await page.mouse.up();
await h.until(async () => (await h.saved(page)).side === 'left', 'dragging to the left edge did not pin left');
const left = await dock.boundingBox();
h.near(left.x, 0, 'left pin touches the left edge');
assert.ok((await h.mainRect(page)).x >= left.x + left.width - 1, 'page content runs under the left-pinned dock');
await shot('pinned-left');
await page.mouse.dblclick((await h.grip(page)).x, (await h.grip(page)).y);
await h.until(async () => (await h.saved(page)).side === null, 'double-clicking did not unpin the left pin');
};
+37
View File
@@ -0,0 +1,37 @@
// The pinned dock's divider is a keyboard separator: the arrow toward the
// page widens the dock, the arrow away narrows it, both stop at the allowed
// range, and the width is saved.
const assert = require('node:assert/strict');
const h = require('./helpers/chat-dock.cjs');
const width = (page) => h.dockOf(page).boundingBox().then((b) => Math.round(b.width));
const value = (page) => h.dividerOf(page).getAttribute('aria-valuenow').then(Number);
module.exports = async ({ page, go }) => {
const divider = h.dividerOf(page);
for (const [side, grow, shrink] of [['right', 'ArrowLeft', 'ArrowRight'], ['left', 'ArrowRight', 'ArrowLeft']]) {
await h.load(page, go, JSON.stringify({ side, width: 420 }));
await h.expand(page);
await divider.focus();
assert.equal(await value(page), 420);
assert.equal(await divider.getAttribute('aria-valuemin'), '320');
await page.keyboard.press(grow);
await h.until(async () => (await value(page)) === 436 && (await width(page)) === 436, `${side}: ${grow} did not widen by 16`);
await page.keyboard.press(shrink);
await page.keyboard.press(shrink);
await h.until(async () => (await value(page)) === 404 && (await width(page)) === 404, `${side}: ${shrink} did not narrow by 16`);
assert.equal((await h.saved(page)).width, 404, `${side}: the width was not saved`);
await page.keyboard.press('ArrowUp');
assert.equal(await value(page), 404, `${side}: a vertical arrow resized the dock`);
for (let i = 0; i < 12; i++) await page.keyboard.press(shrink);
await h.until(async () => (await width(page)) === 320, `${side}: the dock narrowed past its minimum`);
assert.equal(await value(page), 320);
for (let i = 0; i < 30; i++) await page.keyboard.press(grow);
await h.until(async () => (await width(page)) === 720, `${side}: the dock widened past its maximum`);
assert.equal(await value(page), 720);
}
};
+49
View File
@@ -0,0 +1,49 @@
// Real local API records; workflow edits stay unsaved and the test agent retires.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot }) => {
const base = process.env.ARCHIE_E2E_URL || 'http://localhost:5173';
const headers = { 'X-Archie-CSRF': '1', Origin: base };
let agent;
const command = async (name, display_name = '') => {
const response = await page.request.post(`${base}/api/identities/${agent.id}/${name}`, {
headers, data: { expected_version: agent.version, display_name },
});
assert.equal(response.ok(), true, await response.text());
agent = await response.json();
};
const openSettings = async () => {
await go('/workflows/implement');
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
await page.locator('.vue-flow__node').filter({ hasText: 'Workflow' }).first().click();
return page.getByRole('combobox', { name: 'Execution identity', exact: true });
};
try {
const created = await page.request.post(`${base}/api/identities`, {
headers, data: { display_name: `E2E execution agent ${Date.now()}`, kind: 'bot' },
});
assert.equal(created.ok(), true, await created.text());
agent = await created.json();
const trigger = await openSettings();
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
await trigger.click();
await page.getByRole('option', { name: agent.display_name, exact: true }).click();
assert.match(await trigger.innerText(), new RegExp(agent.display_name));
await shot('named-execution-identity');
await command('rename', agent.display_name + ' renamed');
await page.reload();
const renamed = await openSettings();
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
await renamed.click();
await page.getByRole('option', { name: agent.display_name, exact: true }).waitFor();
await page.keyboard.press('Escape');
await command('suspend');
await page.reload();
const suspended = await openSettings();
await page.waitForFunction(() => !document.querySelector('[aria-label="Execution identity"]')?.hasAttribute('disabled'));
await suspended.click();
assert.equal(await page.getByRole('option', { name: agent.display_name, exact: true }).and(page.locator(':not([data-disabled])')).count(), 0);
} finally {
if (agent && agent.lifecycle !== 'retired') await command('retire');
}
};
+103
View File
@@ -0,0 +1,103 @@
// Shared setup for the audit-* checks: feed request tracking, URL waits,
// and the export download-or-popup accept. One behaviour per check module;
// this file holds only what several of them need.
const assert = require('node:assert/strict');
const fs = require('node:fs');
const DEFAULT_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
function isAudit(u) {
return u.pathname === '/api/audit';
}
// Installs request tracking on a fresh check page. Returns the helpers the
// audit checks share; a check destructures only what it uses.
function trackAudit(page) {
page.setDefaultTimeout(10000);
const auditRequests = [];
page.on('request', (request) => {
try {
const url = new URL(request.url());
if (isAudit(url) || url.pathname === '/api/audit/export') auditRequests.push(url);
} catch {
// A non-URL request cannot be an audit call.
}
});
let loads = 0;
page.on('load', () => (loads += 1));
const requestMatching = async (action, predicate, timeout = 6000) => {
const waiter = page
.waitForRequest(
(request) => {
try {
const url = new URL(request.url());
return (isAudit(url) || url.pathname === '/api/audit/export') && predicate(url);
} catch {
return false;
}
},
{ timeout },
)
.catch(() => null);
await action();
return waiter;
};
const waitForUrl = (predicate, timeout = 8000) =>
page.waitForURL((url) => predicate(new URL(url)), { timeout });
const lastRequest = () => auditRequests[auditRequests.length - 1] || null;
const loadCount = () => loads;
return { requestMatching, waitForUrl, lastRequest, loadCount };
}
// Export resolves its window at click time and opens a tab. A successful
// export arrives as an attachment download; a failed one stays visible in
// that tab, so the check accepts either and reads the response from it.
async function exportOnce(page, fail, label, extension) {
await page.getByRole('button', { name: 'Export', exact: true }).click();
const item = page.getByRole('menuitem', { name: label, exact: true });
await item.waitFor();
const downloadP = page.waitForEvent('download', { timeout: 15000 }).then((download) => ({ download })).catch(() => null);
const popupP = page.waitForEvent('popup', { timeout: 15000 }).then((popup) => ({ popup })).catch(() => null);
await item.click();
const settled = await Promise.race([downloadP, popupP]);
if (!settled) {
fail(`${label} export neither downloaded nor opened a tab`);
return null;
}
if (settled.popup) {
await settled.popup.waitForLoadState('load').catch(() => {});
const url = new URL(settled.popup.url());
assert.equal(url.pathname, '/api/audit/export', `${label} opened ${url.href}`);
assert.equal(url.searchParams.get('format'), extension);
assert.ok(url.searchParams.get('from'), `${label} export has no explicit start`);
assert.ok(url.searchParams.get('to'), `${label} export has no explicit end`);
const response = await page.request.get(url.href);
const body = await response.text();
if (response.status() !== 200) {
fail(`${label} export failed (${response.status()}): ${body.slice(0, 200)}`);
return null;
}
if (!new RegExp(`attachment;.*\\.${extension}`).test(response.headers()['content-disposition'] || '')) {
fail(`${label} export opened a tab without an attachment filename`);
return null;
}
return body;
}
if (!new RegExp(`\\.${extension}$`).test(settled.download.suggestedFilename())) {
fail(`${label} export did not download a .${extension} file`);
return null;
}
const failure = await settled.download.failure();
if (failure) {
fail(`${label} download failed: ${failure}`);
return null;
}
const saved = await settled.download.path();
return saved ? fs.readFileSync(saved, 'utf8') : '';
}
module.exports = { DEFAULT_WINDOW_MS, isAudit, trackAudit, exportOnce };
+63
View File
@@ -0,0 +1,63 @@
// Shared handles for the chat dock checks: the dock's own storage key, its
// landmarks, and the pointer gestures that pin it.
const assert = require('node:assert/strict');
const KEY = 'archie.chat.dock.v2';
const dockOf = (page) => page.getByRole('complementary', { name: 'Chat with Archie' });
const composerOf = (page) => page.getByRole('combobox', { name: 'Message Archie', exact: true });
const hideOf = (page) => page.getByRole('button', { name: 'Hide conversation' });
const dividerOf = (page) => page.getByRole('separator', { name: 'Resize chat' });
const stored = (page) => page.evaluate((key) => localStorage.getItem(key), KEY);
const saved = async (page) => JSON.parse(await stored(page));
// Loads /events with the given stored layout (a string, or null for none).
async function load(page, go, layout = null) {
await go('/events');
await page.evaluate(([key, value]) => (value === null ? localStorage.removeItem(key) : localStorage.setItem(key, value)), [KEY, layout]);
await go('/events');
}
// Focusing the composer is how the operator opens the conversation.
async function expand(page) {
await composerOf(page).focus();
await hideOf(page).waitFor();
}
// Retries an assertion until it holds: the dock settles over a few frames.
async function until(check, message, timeout = 5000) {
const end = Date.now() + timeout;
let last;
for (;;) {
try {
const ok = await check();
if (ok) return;
last = ok;
} catch (e) {
last = e;
}
if (Date.now() > end) throw new Error(`${message}${last instanceof Error ? `: ${last.message}` : ''}`);
await new Promise((r) => setTimeout(r, 50));
}
}
const near = (a, b, message, tolerance = 1) => assert.ok(Math.abs(a - b) <= tolerance, `${message}: ${a} is not within ${tolerance} of ${b}`);
// The empty strip at the top of the header, where a drag starts.
async function grip(page) {
const box = await dockOf(page).boundingBox();
return { x: box.x + box.width / 2, y: box.y + 8 };
}
async function dragTo(page, x, steps = 10) {
const from = await grip(page);
await page.mouse.move(from.x, from.y);
await page.mouse.down();
await page.mouse.move(x, from.y, { steps });
return from;
}
const mainRect = (page) => page.locator('#main-content').boundingBox();
module.exports = { KEY, dockOf, composerOf, hideOf, dividerOf, stored, saved, load, expand, until, near, grip, dragTo, mainRect };
+18
View File
@@ -0,0 +1,18 @@
// Shared by the org-* and setup checks: acting in a seeded org and the 404s a
// fresh org's pages are built to survive.
const ORG = { home: 'org-sys', beta: 'org-beta', outsider: 'org-gamma' };
// A new org has written no documents, and the instance-only reads answer
// not found outside the system org.
const ABSENT = /status of 404.*\/api\/(control-plane|schedules|identities)/;
// Selects an org the way the topbar does, over the page's own session.
async function selectOrg(page, id) {
const origin = new URL(page.url() === 'about:blank' ? 'http://localhost:5173' : page.url()).origin;
return page.request.put(`${origin}/api/orgs/current`, {
headers: { 'X-Archie-CSRF': '1', Origin: origin },
data: { id },
});
}
module.exports = { ORG, ABSENT, selectOrg };
+19
View File
@@ -0,0 +1,19 @@
// The dashboard's static routes, read from the router source so a new page is
// swept automatically. Parameterised and redirect routes are skipped.
const fs = require('fs');
const path = require('path');
function staticRoutes() {
const src = fs.readFileSync(path.join(__dirname, '../../../ui/src/router/index.ts'), 'utf8');
const out = [];
for (const line of src.split('\n')) {
if (/redirect:/.test(line)) continue;
const m = line.match(/path: "([^"]*)"/);
if (!m || m[1].includes(':')) continue;
if (m[1].startsWith('/')) out.push(m[1]);
else if (m[1]) out.push('/org/' + m[1]);
}
return [...new Set(out)];
}
module.exports = { staticRoutes };
+36
View File
@@ -0,0 +1,36 @@
const assert=require('node:assert/strict');
module.exports=async({page,go,shot,tolerate})=>{
// The extension catalogue 502 is a stack-environment issue, not this check.
tolerate(/extensions\/catalogue/);
await page.route('**/api/access/policies',async route=>{await new Promise(r=>setTimeout(r,2200));await route.continue()});
await go('/access/policies');
assert.equal(await page.getByText('No policies yet.',{exact:true}).count(),0);
await page.getByText('Loading policies…',{exact:true}).waitFor({state:'hidden'});
await page.route('**/api/tasks?**',async route=>{
if(new URL(route.request().url()).searchParams.has('workflow')) await route.fulfill({status:200,contentType:'application/json',body:'unreadable response'});
else await route.continue();
});
await go('/workflows/implement');
await page.getByRole('alert').filter({hasText:'Could not load recent runs'}).waitFor();
await page.getByRole('tab',{name:/^Runs/}).click();
assert.equal(await page.getByText('No runs yet',{exact:true}).count(),0);
await page.unroute('**/api/tasks?**');
await page.getByRole('button',{name:'Retry runs',exact:true}).click();
await page.getByRole('alert').filter({hasText:'Could not load recent runs'}).waitFor({state:'hidden'});
await shot('recovered');
// A failed list read is an error, never the empty state (#1767): force each
// page's list API to 500 and check its empty-state copy stays hidden.
const failList = async (pattern,path,emptyTexts,errorSel='[role=alert]')=>{
await page.route(pattern,route=>route.fulfill({status:200,contentType:'application/json',body:'unreadable response'}));
await go(path);
await page.locator(errorSel).first().waitFor();
for(const text of emptyTexts) assert.equal(await page.getByText(text,{exact:true}).count(),0,`${path} shows its empty state ("${text}") while the list read fails`);
await page.unroute(pattern);
};
await failList('**/api/tasks*','/tasks',['No tasks yet'],'text=Archie is not responding');
await failList('**/api/captures*','/events',['No captures yet']);
await failList('**/api/event-types*','/events',['No event types yet']);
await failList('**/api/tokens*','/account',['No tokens yet']);
await failList('**/api/access/policies*','/org/policies',['No policies yet']);
await shot('failed-reads-show-errors');
};
+18
View File
@@ -0,0 +1,18 @@
// The save response is mocked; this checks the page's save path without changing models.
const assert=require('node:assert/strict');
module.exports=async({page,go,shot})=>{
let submitted;
await page.route('**/api/control-plane/resources/model-aliases/commands/replace',async route=>{
submitted=route.request().postDataJSON();
await route.fulfill({json:{resource:{kind:'model-aliases',version:submitted.expected_version+1,value:submitted.value}}});
});
await go('/access/models');
await page.getByLabel('New alias',{exact:true}).fill('e2e-test');
await page.getByRole('button',{name:'Add alias',exact:true}).click();
await page.getByLabel('e2e-test',{exact:true}).fill('test/model');
await page.getByRole('button',{name:'Review and save',exact:true}).click();
await page.getByRole('button',{name:'Save',exact:true}).click();
await page.getByRole('heading',{name:/^Review \d/}).waitFor({state:'hidden'});
assert.equal(submitted?.value['e2e-test'],'test/model');
await shot('saved');
};
+30
View File
@@ -0,0 +1,30 @@
// The organisation pages: each loads its form in the selected org, and the old
// settings audit route lands on the organisation's audit page.
const assert = require('node:assert/strict');
const { trackAudit } = require('./helpers/audit-helpers.cjs');
const PAGES = [
{ path: '/org/channels', heading: 'Channels', text: 'Chat session defaults' },
{ path: '/org/scheduling-policy', heading: 'Scheduling policy', text: 'Retries and polling' },
{ path: '/org/alerts', heading: 'Alert webhook', text: 'Webhook severity' },
];
module.exports = async ({ page, go, shot }) => {
for (const { path, heading, text } of PAGES) {
await go(path);
await page.getByRole('heading', { name: heading, exact: true }).waitFor();
await page.getByText(text, { exact: true }).first().waitFor();
assert.equal(new URL(page.url()).pathname, path);
await shot(path);
}
trackAudit(page);
await go('/org/audit');
await page.getByRole('heading', { name: 'Audit', exact: true }).first().waitFor();
await page.locator('[data-row-key]').first().waitFor();
await shot('/org/audit');
await go('/settings/audit?since=7d');
assert.equal(new URL(page.url()).pathname, '/org/audit', '/settings/audit did not redirect');
assert.equal(new URL(page.url()).searchParams.get('since'), '7d', 'redirect dropped the query');
await page.locator('[data-row-key]').first().waitFor();
};
+31
View File
@@ -0,0 +1,31 @@
// A non-system org can arm a schedule trigger: the schedule source's built-in
// mapping is readable there, so a binding on it is accepted. The editor's own
// schedule list is instance-only, so the binding is written over the API.
const assert = require('node:assert/strict');
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
module.exports = async ({ page, go, shot, tolerate }) => {
tolerate(ABSENT);
await go('/');
assert.equal((await selectOrg(page, ORG.beta)).status(), 204);
await go('/workflows/feasibility');
const origin = new URL(page.url()).origin;
const headers = { 'X-Archie-CSRF': '1', Origin: origin };
const created = await page.request.post(`${origin}/api/bindings`, {
headers,
data: {
name: 'e2e schedule trigger', matcher: { source: 'schedule' }, mapping_id: 'schedule-fired',
filter: 'schedule_id == "issue-discovery"', workflow: 'feasibility', repo_param: '', owner: '', repo: '', inputs: {},
},
});
try {
assert.equal(created.status(), 201, `binding on the built-in schedule mapping refused: ${await created.text()}`);
const binding = await created.json();
assert.equal(binding.org_id, ORG.beta);
await go('/workflows/feasibility');
await page.getByText('Starts when').first().waitFor();
await shot('beta-trigger');
} finally {
if (created.ok()) await page.request.delete(`${origin}/api/bindings/${(await created.json()).id}`, { headers });
}
};
+44
View File
@@ -0,0 +1,44 @@
// The sidebar org switcher: choosing a member org reloads the dashboard into it,
// Tasks and Workflows then show only that org's work, and the API refuses an
// org the caller is not a member of.
const assert = require('node:assert/strict');
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
module.exports = async ({ page, go, shot, settled, tolerate }) => {
tolerate(ABSENT);
await go('/tasks');
await page.getByText('Fix flaky login test').first().waitFor();
const picker = page.getByRole('button', { name: /^Organisation: / });
await picker.waitFor();
const offered = await (async () => {
await picker.click();
await page.getByRole('menuitem').first().waitFor();
const names = (await page.getByRole('menuitem').allInnerTexts()).map(t => t.trim().split('\n').pop().trim());
await page.keyboard.press('Escape');
return names;
})();
assert.deepEqual(offered.sort(), ['Beta', 'E2E'], 'selector must offer exactly the orgs the caller belongs to');
await go('/workflows');
await page.getByText('Parked', { exact: true }).first().waitFor();
await shot('home-org-workflows');
await picker.click();
await Promise.all([page.waitForEvent('load'), page.getByRole('menuitem', { name: 'Beta' }).click()]);
await settled('/workflows');
await page.getByRole('button', { name: /^Organisation: / }).waitFor();
assert.equal(await page.getByText('Parked', { exact: true }).count(), 0, 'workflow run counts leaked across orgs');
await shot('beta-workflows');
await go('/tasks');
await page.getByText('No tasks yet').waitFor();
assert.equal(await page.getByText('Fix flaky login test').count(), 0, 'tasks leaked across orgs');
await shot('beta-tasks');
// The selector never writes an org the caller is outside of; the server decides.
const refused = await selectOrg(page, ORG.outsider);
assert.equal(refused.status(), 403, 'selecting a non-member org must be forbidden');
await go('/tasks');
await page.getByText('No tasks yet').waitFor();
assert.equal((await selectOrg(page, ORG.home)).status(), 204);
await go('/tasks');
await page.getByText('Fix flaky login test').first().waitFor();
};
+69
View File
@@ -0,0 +1,69 @@
// Phone-width sweep of the views the November audit flagged (#1757): at
// 390x844 each must fit without horizontal scroll or clipped controls. The
// topbar (with its instance badge) is on every page; /account holds the
// token form, /org/agents the agent rows and the grants card, /events the
// sources table, the event-type rule editor and the mapping editor dialog.
const assert = require('node:assert/strict');
const { staticRoutes } = require('./helpers/routes.cjs');
module.exports = async ({ page, go, shot, fail, settled, tolerate }) => {
// The extension catalogue 502 is a stack-environment issue, not this check.
tolerate(/extensions\/catalogue/);
await page.setViewportSize({ width: 390, height: 844 });
const assertNoOverflow = async (label) => {
const { scrollWidth, innerWidth } = await page.evaluate(() => ({
scrollWidth: document.documentElement.scrollWidth,
innerWidth: window.innerWidth,
}));
if (scrollWidth > innerWidth) {
fail(`${label} overflows 390px: scrollWidth=${scrollWidth} > innerWidth=${innerWidth}`);
}
};
const visit = async (path, label, waitFor) => {
await go(path);
if (waitFor) await settled(waitFor);
await assertNoOverflow(label);
await shot(label);
};
await visit('/account', 'account-tokens', 'text=API tokens');
await visit('/org/agents', 'org-agents', 'text=Credential grants');
await go('/events');
await settled('[role=tab]');
await assertNoOverflow('events');
await shot('events');
// The seeded event type's rule editor (RuleEditor's condition row) opens
// from the Edit button on its row.
const editType = page.locator('button[aria-label^="Edit "]').first();
if (await editType.count()) {
await editType.click();
await page.getByRole('dialog').first().waitFor();
await settled();
await assertNoOverflow('event-type rule editor');
await shot('rule-editor');
await page.keyboard.press('Escape');
await settled();
}
// The mappings tab's editor dialog carries the payload tree.
await page.getByRole('tab', { name: 'Map' }).click();
await settled('text=New mapping');
await assertNoOverflow('mappings list');
const editMapping = page.locator('button', { hasText: 'Edit' }).first();
if (await editMapping.count()) {
await editMapping.click();
await page.getByRole('dialog').first().waitFor();
await settled();
await assertNoOverflow('mapping editor dialog');
await shot('mapping-editor');
}
// Every static route fits 390px (#1767): horizontal scroll fails.
for (const r of staticRoutes()) {
await visit(r, `route ${r}`, null);
}
};
+13
View File
@@ -0,0 +1,13 @@
// Repositories and connections say what stops them serving work: the seeded
// repository has no connection, and the seeded connection's forge is not enabled.
module.exports = async ({ page, go, shot }) => {
await go('/org/repositories');
await page.getByText('acme/widgets', { exact: true }).first().waitFor();
await page.getByText('No connection', { exact: true }).waitFor();
await shot('repositories');
await go('/org/connections');
await page.getByText('github.com', { exact: true }).first().waitFor();
await page.getByText('Forge not enabled', { exact: true }).waitFor();
await shot('connections');
};
+2 -16
View File
@@ -1,24 +1,10 @@
// Every static route loads without errors, renders, and shows no text with
// stray leading, trailing or doubled spaces.
const fs = require('fs');
const path = require('path');
function routes() {
const src = fs.readFileSync(path.join(__dirname, '../../ui/src/router/index.ts'), 'utf8');
const out = [];
for (const line of src.split('\n')) {
if (/redirect:/.test(line)) continue;
const m = line.match(/path: "([^"]*)"/);
if (!m || m[1].includes(':')) continue;
if (m[1].startsWith('/')) out.push(m[1]);
else if (m[1]) out.push('/org/' + m[1]);
}
return [...new Set(out)];
}
const { staticRoutes } = require('./helpers/routes.cjs');
module.exports = async ({ page, go, shot, fail }) => {
const stray = new Map();
for (const r of routes()) {
for (const r of staticRoutes()) {
await go(r);
await shot(r);
// Log lines are data, not copy.
+32
View File
@@ -0,0 +1,32 @@
// Draft edits only: no saved configuration is changed.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot }) => {
await go('/settings/channels');
const workspace = page.getByLabel('Workspace', { exact: true });
assert.equal(await page.getByRole('region', { name: 'Unsaved changes' }).count(), 0, 'unsaved bar before any edit');
await workspace.fill('/srv/e2e-workspace');
await page.getByRole('link', { name: 'Models', exact: true }).click();
await page.getByRole('heading', { name: 'Models' }).waitFor();
await page.getByRole('link', { name: 'Channels', exact: true }).click();
assert.equal(await page.getByLabel('Workspace', { exact: true }).inputValue(), '/srv/e2e-workspace', 'edit lost on navigation');
const form = await page.getByText('Chat session defaults', { exact: true }).evaluate(el => el.closest('[data-slot="card"]').getBoundingClientRect().width);
assert.ok(form <= 850, `settings form stretched to ${form}px`);
const review = page.getByRole('button', { name: 'Review and save', exact: true });
await review.scrollIntoViewIfNeeded();
const unobscured = await review.evaluate(el => { const r=el.getBoundingClientRect(); const hit=document.elementFromPoint(r.x+r.width/2,r.y+r.height/2); return hit && el.contains(hit); });
assert.ok(unobscured, 'Review and save is covered');
await review.click();
await page.getByRole('heading', { name: /^Review \d/ }).waitFor();
await page.getByText('/srv/e2e-workspace', { exact: false }).last().waitFor();
await shot('review');
await page.getByRole('button', { name: 'Discard all', exact: true }).click();
assert.equal(await page.getByRole('region', { name: 'Unsaved changes' }).count(), 0);
assert.equal(await page.getByLabel('Workspace', { exact: true }).inputValue(), '', 'discard kept the edit');
await page.setViewportSize({width:390,height:844});
await page.getByLabel('Workspace', { exact: true }).fill('/srv/e2e-workspace');
const mobileReview=page.getByRole('button',{name:'Review and save',exact:true});
await mobileReview.scrollIntoViewIfNeeded();
assert.ok(await mobileReview.evaluate(el=>{const r=el.getBoundingClientRect();return el.contains(document.elementFromPoint(r.x+r.width/2,r.y+r.height/2))}), 'mobile save action covered');
await shot('mobile');
await page.getByRole('button',{name:'Discard',exact:true}).click();
};
+21
View File
@@ -0,0 +1,21 @@
// The setup checklist reads the selected org: an org with no model to run gets a
// Model step that leads to the page that fixes it.
const assert = require('node:assert/strict');
const { ORG, ABSENT, selectOrg } = require('./helpers/org-helpers.cjs');
module.exports = async ({ page, go, shot, settled, tolerate }) => {
tolerate(ABSENT);
await go('/');
await page.getByPlaceholder('Describe a task').waitFor();
assert.equal(await page.getByRole('link', { name: 'Model', exact: true }).count(), 0, 'an org with a model got a Model step');
assert.equal((await selectOrg(page, ORG.beta)).status(), 204);
await go('/');
await page.getByText('Setup', { exact: true }).waitFor();
const model = page.getByRole('link', { name: 'Model', exact: true });
await model.waitFor();
assert.equal(await model.getAttribute('href'), '/org/models');
await shot('beta-dashboard');
await model.click();
await settled('/org/models');
await shot('model-page');
};
+21
View File
@@ -0,0 +1,21 @@
const assert=require('node:assert/strict');
module.exports=async({page,go,shot})=>{
await go('/tasks');
const base=new URL(page.url()).origin;
const tasks=await (await page.request.get(base+'/api/tasks')).json();
const task=tasks.find(t=>t.status==='parked' && t.attempt>0);
assert.ok(task,'seeded stack has no parked attempt to inspect');
const state=await (await page.request.get(`${base}/api/tasks/${task.id}/attempts`)).json();
assert.ok(state.attempts.some(a=>a.attempt===state.current_attempt),'claimed current attempt missing');
await go(`/tasks/${task.id}`);
assert.equal(await page.getByText(`Attempt ${state.current_attempt} is not recorded`,{exact:true}).count(),0);
const logs=await (await page.request.get(`${base}/api/tasks/${task.id}/logs?attempt=${state.current_attempt}&level=ERROR&limit=1`)).json();
await page.getByRole('button',{name:'Jump to log line',exact:true}).click();
if(logs.entries?.[0]?.id){
await page.locator(`[data-row-key="${logs.entries[0].id}"]`).waitFor();
await page.waitForFunction(id=>document.activeElement?.getAttribute('data-row-key')===String(id),logs.entries[0].id);
}else{
await page.getByText('No error log line was recorded for this attempt.',{exact:true}).waitFor();
}
await shot('attempt');
};
+29
View File
@@ -0,0 +1,29 @@
// A parked task whose blocker has a fix links to the page that supplies it, from
// Needs attention on the dashboard and from the Stage Rail on the task page.
// The seed's work requests park for want of a repository connection.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot, settled, skip }) => {
await go('/');
const tasks = await page.evaluate(async () => (await fetch('/api/tasks?limit=100')).json());
if (!tasks.some((task) => task.status === 'parked')) skip('no parked task');
const parked = tasks.find((task) => task.status === 'parked' && task.recovery);
assert.ok(parked, 'no parked task in the list carries a recovery link');
const { label, link } = parked.recovery;
const row = page.getByRole('link', { name: parked.title, exact: true }).locator('xpath=ancestor::*[.//a[normalize-space()="' + label + '"]][1]');
const fromDashboard = row.getByRole('link', { name: label, exact: true });
await fromDashboard.waitFor();
assert.equal(await fromDashboard.getAttribute('href'), link);
await shot('needs-attention');
await fromDashboard.click();
await settled(link);
await go(`/tasks/${parked.id}`);
const fromRail = page.getByRole('complementary', { name: 'Task details' }).getByRole('link', { name: label, exact: true });
await fromRail.waitFor();
assert.equal(await fromRail.getAttribute('href'), link);
await shot('stage-rail');
await fromRail.click();
await settled(link);
};
+14
View File
@@ -0,0 +1,14 @@
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot }) => {
await page.route('**/api/control-plane/resources/workflow-definitions', async route => {
await new Promise(resolve => setTimeout(resolve, 2200));
await route.continue();
});
await go('/workflows');
assert.equal(await page.getByText('No workflows', { exact: true }).count(), 0, 'loading presented as empty');
await page.getByText('Loading workflows…', { exact: true }).waitFor({ state: 'hidden' });
await page.getByRole('link', { name: /^implement/ }).click();
assert.equal(await page.getByText(/workflow implement has no steps/).count(), 0, 'late definition left an empty canvas');
await page.locator('.vue-flow__node').filter({ hasText: 'Repository' }).first().waitFor();
await shot('loaded');
};
+121
View File
@@ -0,0 +1,121 @@
// Workflow definition behaviour at desktop width: legacy title IDs migrate
// to slugs, invalid expressions flag the node and toolbar alike, a pinned
// historical run keeps its original step IDs inspectable, and handoff
// targets round-trip between the step form and YAML.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot, settled }) => {
await page.route('**/api/control-plane/resources/workflow-drafts', async route => {
const response = await route.fetch();
const data = await response.json();
data.resource.value = { drafts: [] };
await route.fulfill({ json: data });
});
const panTo = async node => {
const flow = page.locator('.vue-flow');
await flow.hover();
for (let adjustment = 0; adjustment < 3; adjustment++) {
const target = await node.boundingBox(), viewport = await flow.boundingBox();
const delta = target.y + target.height / 2 - viewport.y - viewport.height / 2;
if (Math.abs(delta) < 30) break;
await page.mouse.wheel(0, delta * 2);
await settled();
}
};
// Reproduce a previously stored title ID without changing the test server.
await go('/workflows');
const response = await page.request.get(new URL('/api/control-plane/resources/workflow-definitions', page.url()).href);
const resource = await response.json();
const definition = resource.resource.value.definitions.find(entry => entry.id === 'feasibility');
definition.yaml = definition.yaml.replace(/\bid: assess\b/, 'id: Write a Product Requirement Document').replaceAll('steps.assess.', 'steps.Write a Product Requirement Document.');
await page.route('**/api/control-plane/resources/workflow-definitions', route => route.fulfill({ json: resource }));
await go('/workflows/feasibility');
await page.getByRole('tab', { name: 'History', exact: true }).click();
const yaml = await page.getByLabel('Workflow YAML', { exact: true }).inputValue();
assert.ok(yaml.includes('id: write-a-product-requirement-document'));
assert.ok(yaml.includes('steps.write-a-product-requirement-document.result'));
assert.ok(!yaml.includes('steps.Write a Product Requirement Document'));
await page.getByRole('tab', { name: 'Canvas', exact: true }).first().click();
const definitionPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
if (await definitionPicker.count()) { await definitionPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
const approval = page.locator('.vue-flow__node').filter({ hasText: 'Approval' }).first();
await panTo(approval);
await approval.click();
const chip = approval.getByRole('button', { name: 'write-a-product-requirement-document', exact: true });
await chip.waitFor();
await chip.click();
assert.match(await approval.getByLabel('Plan', { exact: true }).inputValue(), /steps\.write-a-product-requirement-document\.summary/);
await shot('legacy-reference');
await page.keyboard.press('Escape');
await page.getByRole('tab', { name: 'History', exact: true }).click();
const field = page.getByLabel('Workflow YAML', { exact: true });
await field.fill((await field.inputValue()).replace('type: repo.prepare', 'type: repo.prepare\n when: not-a-valid-expression'));
await page.getByRole('tab', { name: 'Canvas', exact: true }).first().click();
const problem = page.locator('.vue-flow__node').filter({ hasText: 'Prepare worktree' }).first().locator('svg.text-danger');
await problem.waitFor();
const toolbarProblem = page.getByRole('status').filter({ has: page.locator('svg') });
assert.equal(await problem.evaluate(el => getComputedStyle(el).color), await toolbarProblem.evaluate(el => getComputedStyle(el).color));
const invalidPage = await page.evaluate(() => ({
scrollWidth: document.documentElement.scrollWidth, width: innerWidth,
}));
assert.equal(invalidPage.scrollWidth, invalidPage.width, 'invalid toolbar overflows');
await shot('validation');
// A pinned historical run keeps its original step IDs and remains inspectable.
const snapshot = definition.yaml;
await page.route('**/api/tasks?*', route => {
const workflow = new URL(route.request().url()).searchParams.get('workflow');
return workflow === 'feasibility'
? route.fulfill({ json: [{ id: 999999, workflow, title: 'Historical run', status: 'failed', workflow_definition_yaml: snapshot }] })
: route.continue();
});
await page.route('**/api/tasks/999999/*?*', route => route.fulfill({ json: {} }));
await page.route('**/api/tasks/999999/debug', route => route.fulfill({ json: {} }));
await page.route('**/api/tasks/999999/attempts', route => route.fulfill({ json: { attempts: [{ attempt: 1, stages: [{ name: 'Write a Product Requirement Document', status: 'failed', error: 'Historical failure' }] }] } }));
await go('/workflows/feasibility');
const picker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
await picker.waitFor();
assert.match(await picker.innerText(), /Run #999999/);
const root = await page.locator('.vue-flow__node[data-id="workflow"]').boundingBox();
const pinnedCanvas = await page.locator('.workflow-canvas').boundingBox();
assert.ok(root.y >= pinnedCanvas.y, 'historical workflow header clipped above canvas');
await shot('run-picker');
await page.locator('.vue-flow').hover();
await page.mouse.wheel(0, 550);
await settled();
const historicalStep = page.locator('.vue-flow__node').filter({ hasText: 'Write a Product Requirement Document' }).first();
await panTo(historicalStep);
await historicalStep.click();
await page.getByText('Historical failure', { exact: true }).first().waitFor();
await shot('historical-run');
await page.keyboard.press('Escape');
await picker.click();
await page.getByRole('option', { name: 'Definition', exact: true }).click();
assert.equal(await picker.innerText(), 'Definition');
await shot('definition-picker');
await go('/workflows/triage');
const runPicker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
if (await runPicker.count()) { await runPicker.click(); await page.getByRole('option', { name: 'Definition', exact: true }).click(); }
await page.locator('.vue-flow').hover();
await page.mouse.wheel(0, 650);
await settled();
const handoff = page.locator('.vue-flow__node').filter({ hasText: 'Hand off' }).first();
await panTo(handoff);
await handoff.click();
const target = handoff.getByLabel('Workflow', { exact: true });
await target.waitFor();
assert.equal(await target.inputValue(), '{{ steps.classify.result.workflow }}');
await target.fill('{{ steps.classify.result.alternative }}');
await target.press('Home');
await shot('dynamic-handoff');
await page.keyboard.press('Escape');
await page.getByRole('tab', { name: 'History', exact: true }).click();
assert.ok((await page.getByLabel('Workflow YAML', { exact: true }).inputValue()).includes('steps.classify.result.alternative'));
await page.getByRole('tab', { name: 'Canvas', exact: true }).first().click();
await panTo(handoff);
await handoff.click();
await target.fill('implement');
await page.keyboard.press('Escape');
await page.keyboard.press('Escape');
await page.getByRole('tab', { name: 'History', exact: true }).click();
assert.ok((await page.getByLabel('Workflow YAML', { exact: true }).inputValue()).includes('workflow: implement'));
};
+101
View File
@@ -0,0 +1,101 @@
// The workflow canvas at phone width: no page scroll, a clean topbar, lanes
// inside the canvas, zoom controls below the graph, step and run dialogs
// that fit, YAML without page scroll, and a pinned run header that stays
// visible.
const assert = require('node:assert/strict');
module.exports = async ({ page, go, shot, settled }) => {
await page.setViewportSize({ width: 390, height: 844 });
// The list is a page at phone width: rows open the workflow, and the
// enabled switch is on the row and on the workflow page.
await go('/workflows');
const row = page.getByRole('link', { name: /^implement/ });
await row.waitFor();
const listWidth = await page.evaluate(() => ({ scrollWidth: document.documentElement.scrollWidth, width: innerWidth }));
assert.equal(listWidth.scrollWidth, listWidth.width, 'workflow list scrolls horizontally');
await shot('list');
await page.getByRole('switch', { name: 'implement enabled' }).waitFor();
await row.click();
await page.waitForURL(/\/workflows\/implement$/);
await page.locator('.workflow-canvas').waitFor();
await page.getByRole('switch', { name: 'implement enabled' }).waitFor();
await go('/workflows?workflow=implement');
assert.match(page.url(), /\/workflows\/implement$/, 'legacy ?workflow= link did not reach the workflow page');
for (const workflow of ['implement', 'feasibility']) {
await go(`/workflows/${workflow}`);
const canvas = page.locator('.workflow-canvas');
await canvas.waitFor();
const dimensions = await page.evaluate(() => ({
height: innerHeight, width: innerWidth,
scrollHeight: document.documentElement.scrollHeight,
scrollWidth: document.documentElement.scrollWidth,
}));
assert.equal(dimensions.scrollHeight, dimensions.height, 'workflow page scrolls vertically');
assert.equal(dimensions.scrollWidth, dimensions.width, 'workflow page scrolls horizontally');
const topbar = page.locator('header').first();
const bar = await topbar.boundingBox();
assert.equal(bar.y, 0, 'blank band above topbar');
assert.equal(await topbar.evaluate(el => getComputedStyle(el).backdropFilter), 'none');
assert.ok(!await canvas.getByText('Works on a repository', { exact: true }).count());
const run = page.getByRole('button', { name: new RegExp(`^(Run|Test) ${workflow}$`) });
assert.ok(await run.isVisible(), 'Run hidden on phone');
const box = await canvas.boundingBox();
const start = await page.locator('.vue-flow__node[data-id="start"]').boundingBox();
assert.ok(start.y >= box.y && start.y < box.y + box.height, 'start is outside initial viewport');
const nodes = await page.locator('.vue-flow__node').evaluateAll(elements => elements.map(el => ({
left: el.getBoundingClientRect().left, right: el.getBoundingClientRect().right,
})));
assert.ok(nodes.every(node => node.left >= box.x && node.right <= box.x + box.width), 'branch lanes clipped horizontally');
const controls = await page.getByRole('group', { name: 'Zoom', exact: true }).boundingBox();
const covered = await page.locator('.vue-flow__node').evaluateAll((elements, c) => elements.some((el) => {
const r = el.getBoundingClientRect();
return r.left < c.x + c.width && r.right > c.x && r.top < c.y + c.height && r.bottom > c.y;
}), controls);
assert.ok(!covered, 'zoom controls cover a step');
await shot(workflow);
const step = page.locator('.vue-flow__node').filter({ hasText: 'Prepare worktree' }).first();
assert.match(await step.innerText(), /^\d+\.\s+Prepare worktree$/);
await step.click();
const dialog = page.locator('[role="dialog"][data-slot="dialog-content"]');
await dialog.waitFor();
const dialogBox = await dialog.boundingBox();
assert.ok(dialogBox.x >= 0 && dialogBox.x + dialogBox.width <= 390, 'step editor exceeds phone width');
const input = dialog.getByRole('textbox').first();
if (await input.count()) assert.ok(await input.evaluate(el => el.getBoundingClientRect().height) >= 24, 'step form scaled down');
await shot(`${workflow}-step`);
await page.keyboard.press('Escape');
await run.click();
await page.locator('[role="dialog"][data-slot="dialog-content"]').waitFor();
await shot(`${workflow}-run`);
await page.keyboard.press('Escape');
}
// YAML must not make the page scroll at phone width.
await go('/workflows/feasibility');
await page.getByRole('tab', { name: 'History', exact: true }).click();
await settled();
const yamlPage = await page.evaluate(() => ({
scrollHeight: document.documentElement.scrollHeight, height: innerHeight,
}));
assert.equal(yamlPage.scrollHeight, yamlPage.height, 'YAML causes page scroll');
await page.getByRole('tab', { name: 'Canvas', exact: true }).first().click();
// A pinned historical run keeps its header visible on the canvas.
const response = await page.request.get(new URL('/api/control-plane/resources/workflow-definitions', page.url()).href);
const resource = await response.json();
const snapshot = resource.resource.value.definitions.find(entry => entry.id === 'feasibility').yaml;
await page.route('**/api/tasks?*', route => {
const workflow = new URL(route.request().url()).searchParams.get('workflow');
return workflow === 'feasibility'
? route.fulfill({ json: [{ id: 999999, workflow, title: 'Historical run', status: 'failed', workflow_definition_yaml: snapshot }] })
: route.continue();
});
await page.route('**/api/tasks/999999/*?*', route => route.fulfill({ json: {} }));
await page.route('**/api/tasks/999999/debug', route => route.fulfill({ json: {} }));
await page.route('**/api/tasks/999999/attempts', route => route.fulfill({ json: { attempts: [{ attempt: 1, stages: [] }] } }));
await go('/workflows/feasibility');
const picker = page.getByRole('combobox', { name: 'Run shown on the canvas' });
await picker.waitFor();
assert.match(await picker.innerText(), /Run #999999/);
const root = await page.locator('.vue-flow__node[data-id="workflow"]').boundingBox();
const pinnedCanvas = await page.locator('.workflow-canvas').boundingBox();
assert.ok(root.y >= pinnedCanvas.y, 'historical workflow header clipped above canvas');
};
Loaded 100 of 2008 files, more files were not shown because too many files have changed in this diff. Show more