Commit Graph
98 Commits
Author SHA1 Message Date
sam e624a3737b feat(daemon): execute and verify organisation repository connections 2026-10-17 09:32:39 +11:00
sam 5d6d24c147 fix(daemon): execute dashboard identities with scoped authority 2026-10-17 03:13:30 +11:00
sam 78e162fa0a 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
sam d3e2a67222 feat(identity): add browser setup and user accounts 2026-10-16 02:41:24 +11:00
sam cc0fba87b4 feat(archied): read-only run-scoped sandbox view over the harness contract (#1662)
Quality / check (push) Canceled after 0s
* feat(archied): read-only run-scoped sandbox view over the harness contract

Serve RunTarget: the daemon resolves a running task and attempt to its Kit
container and follows its output, refusing a finished or unknown task with a
stated reason. The dashboard adds a Sandbox tab behind the task log's read
authority. Takeover stays out of scope until the sod1 authority is wired.

* fix(archied): scope and close sandbox views correctly

Forward harness activity into container output, bind containers and dashboard views to their attempt, enforce the asserted org, and report unavailable dependencies and interrupted streams accurately.

Refs: archie-core-qi91, archie-core-252tj
2026-10-14 02:57:32 +11:00
sam bbbb527721 feat(webui): finish redesign dashboard task and secret settings 2026-10-13 16:41:35 +11:00
sam 747a7cbfd7 Feat/operator alerts (#1635)
* feat(state): durable operator alerts owned by the State Store

Alerts dedup on org+kind+subject, resolve themselves when a condition
clears, and are raised, resolved, dismissed and listed through the state
contract. Task transitions raise needs-human and failed alerts in the same
transaction; the store checks service health and prunes closed alerts.
Each raise and resolve queues a webhook delivery whose attempts are kept.

* feat(notify): deliver operator alerts to the webhook; raise config and release alerts

notify.webhook now receives raised and resolved alerts above a severity
threshold with HMAC-signed payloads, bounded retry and every attempt recorded
on the alert. archied raises model alias, provider and credential-binding
alerts from the effective configuration, an update alert from the release
channel, and a credential-rejected alert from the egress resolver. The
dashboard API lists and dismisses the caller's org's alerts.

* feat(ui): alert bell in the top bar and webhook alert settings

The bell lists the org's open alerts by severity with dismiss and a link per
alert, and refreshes from the event stream. The task settings page gains the
webhook severity threshold and signing secret. ui/dist rebuilt.
2026-10-12 03:30:46 +11:00
sam 3d625ad29e feat(storepkg): auto-update policy, applied by a State Store ticker 2026-10-11 04:10:53 +11:00
sam 386e4b0a92 Merge branch 'work/mt9xo' 2026-10-11 04:03:52 +11:00
sam 0d5a12bf97 fix(webui): the setup checklist and skill catalogue are system-org only 2026-10-11 04:01:46 +11:00
sam 3a9bb2b487 feat(webui): add a member by provider subject or email
POST /api/orgs/{id}/members binds a person by subject, or by email as a
placeholder. The first sign-in whose provider vouches for that email
claims it: the State Store moves the binding onto the provider's subject
in one statement, so a second account with the same address finds
nothing to claim and later sign-ins rest on the subject alone.
2026-10-11 03:54:49 +11:00
sam 19933cc672 feat(storepkg): widening updates wait for approval, rollback restores the previous pin 2026-10-11 03:48:31 +11:00
sam 2be3314faa style(webui): rewrap the assets comment 2026-10-11 03:48:17 +11:00
sam a55e5530e7 fix(webui): an unserved /api path is a 404, not the dashboard page 2026-10-11 03:46:40 +11:00
sam 43769e902b fix(access): an unloaded chain is a refusing engine, not nil
Webhook intake answers 503 and counts no refusal while the chain loads.
The readiness probe reads the chain on every check. The UI never exits on
a first-load failure. An invalid instance policy closes the instance but
lets an instance admin repair policies. Outage pages are 503, and the
health detail names the unloaded chain.
2026-10-10 22:19:02 +11:00
sam 61e464b5f0 fix: close cross-org writes and move existing rows into their owner's org 2026-10-10 20:31:54 +11:00
sam 09ff6f7b93 fix(webui): instance health, logs, config and identities are system-org only 2026-10-10 20:20:07 +11:00
sam eb9288a3a6 refactor(webui): decode JSON request bodies with generic decodeBody 2026-10-10 11:05:58 +11:00
sam 45e908374b feat(logging): aggregate recent service logs in dashboard 2026-10-09 09:57:57 +11:00
sam 84d1286211 refactor(webui): remove unused configuration schema 2026-10-09 09:57:57 +11:00
sam 2ca594f4c6 feat(chat): the dashboard chat records voice, downloads files a turn sends, and offers /model and /personality choices 2026-10-08 01:37:21 +11:00
sam 051aae79ea feat(chat): the dashboard chat answers tool approvals and questions, and /update offers Install 2026-10-08 00:25:23 +11:00
sam 172ba474b3 feat(storepkg): install packages from a signed default catalogue, listed on the Extensions page 2026-10-06 01:18:25 +11:00
sam c56344ea41 feat(telegram): /stop stops the chat agent, else the tasks it created, or one task; delete the dead approval actions 2026-10-06 01:12:28 +11:00
sam d7c21fb839 fix(eda): name a source's delivery header in the dashboard instead of a built-in sender list 2026-10-06 00:54:20 +11:00
sam f966d07f04 feat(org): instance admins manage every org 2026-10-05 22:08:01 +11:00
sam d295fa2680 feat(eda): name and delete capture sources; an armed binding blocks the delete 2026-10-05 21:05:58 +11:00
sam fb05189e42 feat(org): org, workspace and membership API 2026-10-05 20:44:49 +11:00
sam 0788f5ab8a feat(eda): pause and resume a binding; resuming goes back through approval 2026-10-05 20:44:25 +11:00
sam 22b23f78cf fix(webui): admit dashboard work requests through the State Store and honour the workflow's repository mode 2026-10-05 20:25:20 +11:00
sam fcd66395cd feat(eda): link binding dispatches to the captures and tasks they started 2026-10-05 20:16:02 +11:00
sam 4dac44f98a feat(identity): personal API tokens, created and revoked from the dashboard, act as their owner 2026-10-04 18:10:28 +11:00
sam 4d1d874676 feat(contracts)!: requests no longer name their org; the State Store derives it from the caller 2026-10-04 17:28:31 +11:00
sam f298befb6b feat(access): instance network rules at the capture receiver; policies reload without a restart 2026-10-04 12:58:00 +11:00
sam 8f519006ab feat(access): edit org, workspace and object policies from the dashboard; refuse owner lockout 2026-10-04 11:02:42 +11:00
sam 823d60e1dc feat(presence): services card on the status page and archied status 2026-10-04 03:29:05 +11:00
sam f67c84f32b feat(webui): install, accept and enable extensions from the dashboard 2026-10-04 01:56:10 +10:00
sam efdd418368 refactor(webui): cut comments down to what the code does 2026-10-03 21:54:14 +10:00
sam 96e5d7b84b refactor: strip doc and issue narration from code comments
Remove PRD/doc paths, bead IDs, phase notes and deleted-test references
from comments; drop test-only hooks left by the test deletion. Includes
in-progress archied bootstrap, gateway and query changes.
2026-10-03 21:47:46 +10:00
sam 70fc0143ab feat(webui): the dashboard reads harness bindings and opens the setup terminal
The harness page lists each credential binding with its captured OAuth
state (expiry, scopes, capture time; never the tokens), and the setup
terminal route upgrades to a WebSocket and bridges it to a harness
session. The session is a narrow webui-owned HarnessTerminal seam: the
container, sandbox network and egress path belong to the daemon, so the
dashboard process cannot implement it and answers 503 until a transport
is wired (archie-core-egkf.7). Opening the terminal authorizes as the
update action on the secret, per the PRD.
2026-10-02 09:38:09 +10:00
sam 15e64d3de2 feat(eda): per-org workflow enable/disable gating bindings
A workflow-enablement control-plane resource lists, per org, the workflows
that org has disabled. A binding targeting a disabled workflow is skipped at
dispatch like an unarmed one, is refused on save, and is flagged on the
binding list; the workflows page toggles it. Bindings now carry the org_id
column they already had in storage, over the State Store wire too.

Org-owned workflow definitions are deferred to a follow-up bead: they need
the caller's org, which the access chain resolves.
2026-09-30 02:59:23 +10:00
sam 5f375f8a14 feat(state-store): ListSteps, dashboard run detail reads it; drop tasks.stage
docs/prds/execution-tree-state-machine.md: step_executions (0017) is now the
durable per-step record; the dashboard's run detail (GET /api/tasks/{id}/
attempts) still folded stage_start/stage_finish events into a rail by hand,
and tasks.stage duplicated what StartStep/FinishStep already record properly.

Added the missing read:
- ListSteps(execution_id, attempt) -- attempt 0 lists every attempt of the
  execution, oldest first, so the rail renders every attempt from one call.
  New storecontract.StepReader (separate from StepRecorder: this is a
  dashboard/API/dispatch action per the PRD's wire contract, never
  task-scoped-grant callable), postgresdb.ListStepExecutions, staterpc
  client/server/values.go plumbing, wired through state_store.go's Deps and
  archieui/compose.go's Server.Steps the same optional-capability pattern
  every other dashboard read uses.
- internal/webui/api_tasks_attempts.go: stageViewsFromSteps replaces
  foldStages/finishStage/stageOutcome. Attempt bounds, event_count and which
  attempt numbers exist stay sourced from events (an attempt can carry
  events -- agent calls -- with no step), only the stage list itself moves.
  The wire JSON contract is unchanged, so no frontend change was needed;
  `task ui` confirms ui/dist still matches a fresh build.
- A running step past the task's own current attempt reads interrupted, not
  running: RecoverStale (archie-core, still open per #1214) is what corrects
  a crashed run's stale "running" row, and until it does this is the honest
  read rather than trusting a row that may be stale.

Dropped tasks.stage and every reader, no fallback:
- Migration 0018 drops the column; tasks.sql's INSERT/UPDATE/RETURNING lists
  and the sqlc-generated code no longer carry it.
- workflow.Task.Stage is gone; workflow.Run's in-flight "which stage is this"
  bookkeeping moves to TaskContext.Stage (execution-time only, never
  persisted -- park/finish's event tagging is its only reader).
- pb.Task.stage (wire field 10) is `[deprecated = true]`, not deleted (never
  reuse a field number); staterpc's taskProto/taskValue no longer map it.
- taskactions.Task.Stage and the retry event's "previous_stage" data field
  are gone: the operator-action package had no reader for the column beyond
  echoing it.
- The chat /tasks command's per-task "workflow/stage" display drops to
  workflow-only (ChatTaskSummary.Stage removed, workflowStage() deleted):
  it was a genuine reader with no replacement in scope for this change.

Read the archie-web-ui skill and the state-store/daemon docs/development
pages first, per instruction. Stayed out of cancel/stop code throughout
(Pi's concurrent CancelExecution work); the only shared files touched
(workflow.go, daemon-adjacent SQL) got the smallest possible diff.
2026-09-27 06:57:47 +10:00
sam fcbdd757e9 fix(webui): mount the capture intake route from the receiver's constant
The bypass mux mounted captureintake's route from a local literal that
duplicated captureintake.Path, with a comment acknowledging the drift risk:
the kind of duplication that silently stops matching after a rename
(archie-core-1175). Reference the constant instead, so the receiver owns the
one spelling of the route and a rename there cannot unmount here.

The existing routing tests are the drift coverage: TestCaptureIntakeMountedOnBypassMux
drives Handler() with a POST to the real path, so a rename on either side that
stopped matching would fail it; no new test is needed. This gives internal/webui
its first infrastructure import -- the deleted literal existed so webui could
mount an http.Handler without depending on the receiver's concrete package, but
mounting by the owner's constant is exactly the boundary the intake cutover
drew: webui mounts and reads, captureintake owns the write path.
2026-09-26 20:44:40 +10:00
sam 77a41ecfd9 feat(access): the chain at the dashboard, API and dispatch, with denial records and health reporting (archie-core-qc8p) 2026-09-26 15:23:32 +10:00
sam 230280a6e0 feat(webui): Models picks from the provider catalog, and enables available providers
archied already finds usable providers (key set in the environment, or
configured) through the model catalog; the published config view now
carries that catalog, providers with their model ids. Settings > Models
offers role models only from configured providers, lists the catalog's
unconfigured providers as available, and adding one carries its class, key
variable and endpoint. Roles and providers are two accordions, each ending
in an add row.
2026-09-25 18:04:46 +10:00
sam 9344647719 fix(webui): multiplex dashboard live updates over one stream 2026-09-25 14:05:34 +10:00
sam c5faad5915 feat(controlplane): field-level sys_audit table, audit view on settings pages, whole-task time limit 2026-09-25 09:54:30 +10:00
sam 8a2b5b95f9 merge: t2db.40 sources and signing into pg/foundation
Resolves against t2db.36: captures carry both event_type and unsigned (proto field 10), the State Store serves sources and event types from the Postgres EDA store, the capture row shows event type and signature together, and the staterpc sentinels map both ways from one table.
2026-09-24 14:38:40 +10:00
sam 684ec1263a feat(eda): sources own signing, with UUIDv7 paths and approved unsigned option
A source is the capture endpoint: a UUIDv7 path by default or a unique
URL-safe custom path, signed by default with an Archie-generated secret
(encrypted via the bindings cipher), or unsigned after an approval.
Intake verifies X-Hub-Signature-256/X-Signature-256 against the source
secret before redaction; an unauthenticated event on a signed source is
captured but never dispatched, an event on an approved unsigned source
dispatches and is marked unsigned. The binding secret is retired; migration
0006 derives sources from existing binding and capture source strings,
moving each binding's secret onto its source. SourceStore crosses the
State Store gRPC contract. The dashboard gains a sources panel and flags
unsigned in the capture inspector, binding list and task timeline.
2026-09-24 14:26:21 +10:00
sam 152cdc6523 feat(webui): inspector shows proposed and unidentified events, names and pastes event types 2026-09-24 14:21:21 +10:00