25 Commits
Author SHA1 Message Date
sam d9e993e2b9 feat(connectors): install and update extensions from a signed catalogue (#2063) 2026-11-22 15:41:33 +11:00
sam 9aceaa15bc feat(system): report module, connector and runner health and what waits on a person (#2023) 2026-11-22 02:44:13 +11:00
sam e3130d53e7 Merge branch 'worktree-agent-a82ec64b6cc1a2809'
# Conflicts:
#	internal/app/archie/operations.go
#	modules/events/events.go
#	modules/governance/accounts_api.go
#	modules/governance/governance.go
2026-11-22 02:16:56 +11:00
sam 6c59d6b742 feat(httpapi): refuse every API operation that does not declare its access (#2078)
Operations register through httpapi.Register with Public, Authorized or
AdminAuthorized, and the guard asks the policy chain for the declared
action and resource kind before the handler runs. An undeclared operation
and an undecidable chain are refused. The workload principal, its shipped
policy, a self-service policy and Recording for denials are added in
governance.
2026-11-22 02:15:02 +11:00
sam 02227a0b22 feat(connectors): let a connector declare it links accounts and return the link URL for a code (#2095) 2026-11-22 02:13:08 +11:00
sam 592d36e0d1 feat(connectors): re-check saved workflows on capability change; validate core delivery schemas (#2091, #2092)
When a connector loads with new declarations, the saved workflows that
reference it are re-checked against them (via a Recheck hook wired to
runs.Engine.RecheckConnector); if any would become invalid, the new
declarations are refused and the connector fails to start, so the breakage
surfaces at update time instead of mid-run. The previous declarations stay
in force.

A connector that declares the message or chat_message delivery now has its
declared input schema checked against every payload shape core sends on it
when it loads; a rejecting schema fails the connector. The delivery names
are exported from the connectors module and used by core's senders, so the
contract has one definition.
2026-11-21 18:34:47 +11:00
sam 14060675cd feat(connectors): check workflow and trigger references against declared capabilities (#2087) 2026-11-21 17:14:00 +11:00
sam d6f3a1a01d docs(connectors): describe the extension kinds table accurately (#2084) 2026-11-21 15:00:01 +11:00
sam 64ef2c9af7 feat(connectors): group extensions as platform, integration or agent (#2084) 2026-11-21 14:58:53 +11:00
sam 01eb4aaf7c fix(events): verify webhook signatures before parsing (#2021)
A source now declares how its deliveries prove themselves: token (the
default, unchanged), hmac (HMAC-SHA256 over the raw body, per-source header
and prefix, secret sealed at rest and write-only) or none. The events module
verifies before the connector parses, answers 401 and logs the refusal.

The digest comparison is ported from internal/webhookguard/hmac.go and the
header-borne signature from internal/infrastructure/captureintake/receiver.go;
the old copies stay until their service goes. The seal package moves to
internal/platform/seal so events can seal the secret.
2026-11-21 13:46:48 +11:00
sam 81bca2251e fix(app): retry startup and atomically seed policies (#2081) 2026-11-21 11:45:18 +11:00
samandCopilot 264062866c feat(ui): run events, workflows, runs, controls and settings pages on the archie binary (#2023)
Events (sources, triggers), workflows (list, document, YAML publish,
read-only canvas), runs with approvals and the decision trail, controls
(policies, guards, action classes), agent models, accepted extensions,
secret engines and credentials now read the binary's API. Capabilities
name every section, so pages the binary can't back yet (the visual
workflow editor, captures, mappings, bindings, the extension catalogue,
model aliases and the rest) stay in the tree, hidden. Adds
GET /api/credential-kinds for the credentials form.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-20 01:04:29 +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 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 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 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 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 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 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 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 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 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 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 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