Commit Graph
181 Commits
Author SHA1 Message Date
sam 27cd2d0df1 fix(memory): reach every note a person may read (#2141)
maxNotes bounds what a conversation is given, and it was also the only bound on
the inspection read a person makes and on the shared list, so past 200 notes of
one class the oldest ones were unreachable, with no total and no offset to say
the list had been cut.

The conversation read keeps the bound. The read of a person's own notes and the
shared list pass no bound, which the store reads as LIMIT NULL, so both reach
everything the caller may read.
2026-11-27 19:16:08 +11:00
sam 35688b449a fix(governance): invite a member by email without an identity provider (#2110)
Adding a member by email refused with a 409 whenever no OIDC issuer was set,
so an install with local accounts only could not invite anyone by address.

An address now reserves the identity under a local issuer instead, and a local
account made with that address adopts it: the invitation's roles carry over and
the organisation shows one member, not two. A provider subject still needs the
provider that asserts it, and the refusal says so.
2026-11-27 19:08:08 +11:00
sam aa3568dd52 fix(memory): refuse a credential written out in prose (#2069)
A note saying "the deploy token is 1234567890abcdef" was neither redacted nor
refused, because the credential check only recognised a value after a colon or
an equals sign. The copula now counts as the separator, so a credential written
out in a sentence is refused the way an assignment is.

The version read is scoped to the organisation as every other note read is, so a
note id from another organisation answers nothing, and the doc comments on
Forget and Revoke describe the order the code actually commits in. The
deletion-recording schema constant had no consumer and is removed.
2026-11-27 18:25:20 +11:00
sam 368d484410 test(memory): cover the shared half of the read boundary (#2069)
The fake's Notes filter modelled only the owner half of store.Notes, so a
regression that stopped sharing published notes would still pass. It now mirrors
the statement, and the test asserts a published note reaches both people, a
proposal reaches neither, and a disabled note is left out of a conversation read.
2026-11-27 18:19:33 +11:00
sam 6356aa5d52 feat(api): filter lists by sys_query
sys_query is conditions joined by ^, each field=value, field!=value or fieldLIKEtext. A bad condition or a field a list does not offer is a 400 naming the fields it accepts, so a typo never reads as an empty page. Runs, workflows, proposals, guards and action types take it, and the dashboard keeps the filter in the URL so a filtered list is a link.

The guard control API is list-guard-controls at /api/controls/guards: list-guards belongs to the connectors extension list, and the resource is a guard. JudgeStanding keeps its name, since it is the model judgement a guard recorded.
2026-11-27 17:06:30 +11:00
sam 6b4ff8101a fix(governance): ask for the public URL during owner setup (#2076) 2026-11-27 02:33:15 +11:00
sam 24a3efcf60 fix(connectors): keep published settings and let admins reset the catalogue (#2119) 2026-11-27 02:29:39 +11:00
sam bc4ac4436d docs(connectors): clarify catalogue and guard comments (#2119) 2026-11-27 02:21:13 +11:00
sam c538017523 fix(connectors): verify the default catalogue and roll back failed updates (#2119)
Adapt OCI reads from internal/infrastructure/signedoci and internal/infrastructure/storepkg. Keep the legacy readers while their callers still use them.
2026-11-27 02:19:21 +11:00
sam 2ea0062bef feat(ui,judgement,system): unify nav, surface built-in guards, readiness and decision reasoning 2026-11-27 02:13:28 +11:00
sam f0f09e9189 fix(events): enforce source ownership for mappings
Quality / check (pull_request) Successful in 10m21s
2026-11-26 20:35:40 +11:00
sam 8bf3ace96b feat(governance,chat): size a model's chat history by its own window (#2018)
The replay budget was fixed at half of an assumed 128k window, so a small
local model was still handed more history than it accepts.

A model now carries the context window and output limit the published
catalogue gives it, read once into the state directory and cached on
disk. Chat holds its replay to the window minus the reply and an eighth
for the system prompt and tools, and keeps the assumed budget only for a
model the catalogue publishes nothing about.
2026-11-26 04:20:11 +11:00
sam 8dd28b90be feat(chat): hold a long conversation inside the model's window (#2018)
A reply was replayed with a fixed twenty earlier turns, so a long
conversation either lost its older context or, with large replies, sent
more than the model accepts and failed the request. The replay now reads
up to two hundred turns and replaces the middle of what it cannot carry
with one summary message, keeping the newest twenty messages and always
the question being answered.

Carried from internal/gateway's compression.go before that package is
retired: the same conservative token estimate (four ASCII characters or
one non-ASCII rune), the same 50%-of-window budget, and a summary that
says what was dropped. The budget is fixed rather than derived from the
model because the module is told a model's name and nothing about its
window.
2026-11-26 04:17:16 +11:00
sam 56dbb31923 build(dev,chat): point dev server at archie and wire chat pages catalogue 2026-11-25 23:05:04 +11:00
sam c9ed3b1ae2 feat(connectors): version packages and pin installations
A package is now a set of immutable versions with declared grants and a
default version that installations run unless they pin another. Adopting a
version is what accepts its grants, replacing the per-extension lifecycle
actions with version, pin and update-policy commands.
2026-11-25 22:10:06 +11:00
sam ba077f3779 fix(events): route webhooks by source UUID (#2127) 2026-11-24 08:07:09 +11:00
sam 26e19f3de4 feat(governance,connectors,ui): identify model providers and keys by UUID (#2129) 2026-11-24 06:52:58 +11:00
sam c5591d95da feat(judgement,approvals): link decisions and approval requests by action_type_id (#2130) 2026-11-24 06:23:19 +11:00
sam 1c10378a40 refactor(events,proposals,runs,ui): rename declared event type fields to declared_event_type (#2128) 2026-11-24 06:19:35 +11:00
sam efe7069bc1 feat(events,proposals,ui): identify triggers by immutable UUID (#2126) 2026-11-24 05:36:52 +11:00
sam 67ce2901a5 feat(runs,events,ui): identify workflows by immutable UUID (#2125) 2026-11-24 05:20:18 +11:00
sam 9c04b74e6f docs: fix Vale prose findings across comments, docs and prompts
Run Vale over every tracked Go, Markdown and template file and fix the remaining findings: long sentences, repetition, UI verbs, identifiers that should be backticked, and migration narration in comments.

AGENTS.md and CLAUDE.md keep their absolute rules; the prompt heuristic against repeated absolutes is disabled for rule files.
2026-11-24 03:26:16 +11:00
sam 911152c9d1 merge: proposals module (#1995)
# Conflicts:
#	internal/platform/pg/migrations/00008_drafts.sql
#	modules/drafts/drafts.go
#	modules/drafts/internal/store/store.go
2026-11-24 03:11:07 +11:00
sam 0d25c93ea0 merge: event source IDs and scopes (#2127, #2027)
# Conflicts:
#	api/openapi.yaml
#	modules/events/events.go
2026-11-24 03:09:12 +11:00
sam f24c2b4455 feat(connectors): separate packages from scoped installations (#2027)
Packages are accepted once by the instance. Installations configure them at the instance, an organisation or a person; bindings and credentials resolve the person's, then their organisation's, then the instance's. Decisions, approval requests and held chat actions record the installation and scope that acted.

The dashboard lists packages separately from installations, shows every installation's scope, and creates, edits and disables installations at their scope.
2026-11-24 03:05:27 +11:00
sam b47e98e25f feat(proposals): add the proposals module and fold drafts and memory proposals into it (#1995) 2026-11-24 02:44:31 +11:00
sam 8265e99466 feat(runs): run an approved proposal's actions in a durable workflow step (#1995) 2026-11-24 02:44:31 +11:00
sam 30aa351eb6 feat(events,drafts): give sources an immutable id and a scope (#2127, #2027)
A source is keyed by a uuid, owned by the organisation or one person, and
labelled within that scope. The webhook path is a separate unique column, so
renaming either leaves stored events, event types, triggers, groups, mappings
and drafts alone. Delivery policies, sealed secrets and group keys use the id.
2026-11-24 02:43:51 +11:00
sam 4a9f30ef04 fix(judgement,runs,approvals): record immutable identity IDs for attribution (#2122) 2026-11-24 02:23:23 +11:00
sam dad6924a0c docs: normalise Australian English and prose across comments and docs 2026-11-24 02:02:00 +11:00
sam de05bc2cbd feat(runs): show each step's summary and target on the run page
- a finished top-level step records its summary and target in a done marker; stages return them
- a message step's summary is the message, and its target the channel and chat
- the trail no longer lists the engine's markers as entries
- run page: short run ID in the breadcrumb, copyable IDs, version badge, step rows from stages, No output for an empty result
- event detail: No payload for an empty body, and links only the dispatches that started a run
- ui/AGENTS.md lists the components that exist
2026-11-24 00:04:20 +11:00
sam 2bfb262e9c docs(judgement,events): state comments plainly 2026-11-23 23:46:27 +11:00
sam 0ad4374a2a refactor(judgement): rename action classes to action types and raises to autonomy proposals
- tables judgement.action_types, action_type_resets, action_type_approvals and autonomy_proposals (migration 00063)
- governance setting propose_autonomy_after, approval request kind autonomy, policy resource kind action_type
- /api/action-types replaces /api/classes; the detail lists autonomy_proposals
- an autonomy proposal stores the identity ID of the account that answered it
2026-11-23 23:43:45 +11:00
sam 7f5220dea3 feat(events): record failed, denied and disabled trigger outcomes (#2117)
- a mapping failure is recorded as failed, with the value found at each mistyped path
- an access policy refusal and a disabled workflow are recorded as denied and disabled
- migration 00062 renames existing skipped dispatches to failed
2026-11-23 23:35:35 +11:00
sam 062336db91 refactor: rename denial records to access decisions
- rename governance.access_denials table, indexes and API types via migration 00061
- expose /api/access/decisions and decisions payload; keep audit auth unchanged
- rename UI store, page and route from denials to decisions
2026-11-23 02:03:35 +11:00
sam 60d9b6b7aa feat: record access decisions, not just denials
- add an outcome column and migration so allowed and denied decisions share one audit trail
- fail closed when an allowed decision cannot be recorded
- expose outcome filtering in the API and dashboard

Route chat through the recording authorizer so its decisions are audited too.
2026-11-23 01:00:46 +11:00
sam e1ada94d78 fix: redact link codes and guard shipped policies
- redact single-use link codes from stored account.link events after handling, with a migration to scrub existing rows
- refuse deletion of shipped org policies and hide the delete action in the UI
- validate agent step models against the workflow model policy at save time, including the default model
2026-11-23 00:38:54 +11:00
sam 8c267b6edd feat: record skipped dispatches and approver ids
- store trigger dispatches as started or skipped, with a JSON reason surfaced in the API and UI
- persist the answering account's identity id beside its display name for approvals and judgements
- save connector acceptances and their declarations in one transaction so a refused change stores nothing
2026-11-22 23:24:30 +11:00
sam 33f7ebdff4 feat: add member candidates endpoint and approvals page
- serve active identities outside the org at /api/orgs/{id}/member-candidates and back the members page from it
- add an org approvals page for default owner, deadline and escalation path over /api/settings
2026-11-22 23:03:01 +11:00
sam e801306c15 docs(deliveries): say what each field, lease and refusal does 2026-11-22 22:31:55 +11:00
sam 4707427759 feat: trust configured proxies for webhook intake
- add trusted proxy settings, migration, API, and UI
- derive client addresses from X-Forwarded-For behind trusted hops
- enforce delivery policy for listener batches and record denials
2026-11-22 22:29:36 +11:00
sam faeaa0d7f0 fix: deny orgs without active org policies
- refuse authorization when an org has no stored org-level policies instead of falling through the narrowed chain
- seed tests with shipped org policies and cover the deny-by-default cases
2026-11-22 22:19:07 +11:00
sam 787a213db6 Merge branch 'main' into worktree-agent-ac0944b265396932d
# Conflicts:
#	modules/governance/accounts_api.go
2026-11-22 15:42:43 +11:00
sam 51a1cf5128 feat(governance): model aliases resolve through providers with a policy (#2063) 2026-11-22 15:41:40 +11:00
sam d9e993e2b9 feat(connectors): install and update extensions from a signed catalogue (#2063) 2026-11-22 15:41:33 +11:00
sam de3bfe296d refactor(runs): adopt go fix output in the workflow catalogue test (#2061) 2026-11-22 13:54:09 +11:00
sam 07d14c8d50 merge main into the workflow editor branch (#2061) 2026-11-22 11:48:30 +11:00
sam c1b4ba2b6b wip(ui/workflows): visual editor on the binary's API (#2061) 2026-11-22 11:48:13 +11:00
sam 84284d59c3 refactor(events): split trigger firing and target checks to keep complexity in bounds (#2062) 2026-11-22 11:47:32 +11:00
sam 501338ffbd fix(events): a delete blocked by a restricting reference answers 409 (#2062) 2026-11-22 11:46:02 +11:00