Commit Graph
4 Commits
Author SHA1 Message Date
Andy Dixon 2ecdbc39b5 feat(ui): wants, intentions, commitments, plans, agency timeline, why, research
- Wants: active wants by effective strength with origin, means, drives,
  values, goal, reinforcement, suppressions and each conflict with its
  resolution rule; closed wants with their resolution.
- Intentions grouped by status with blocked reasons and plans, plus the
  wants that did not become intentions and why. An intention page shows
  sources, subordinate intentions, formation terms, every plan revision as
  a dependency graph, decisions and the correlated timeline; operators can
  abandon it.
- Commitments with polarity, exception, matcher, weight and due time,
  live conflicts between commitments, a creation form and close controls.
- Plans with estimate against budget; a plan page with the dependency
  graph, per-step expectations, observations and linked approvals,
  requests, executions and subordinate intentions, resources, completion
  and abort conditions, assumptions, alternatives, revisions and
  validation; operators can cancel a plan or release a blocked step.
- Agency timeline labelling each event as wanted, intended, committed,
  planned, requested, approved, acted, observed or reconsidered.
- "Why did this happen?" pages built from agency.Explain, reachable from
  events, executions in the approval centre, plan steps and intentions.
- A research dashboard per mind (volition and agency rates, introspection
  accuracy, action claims, self-model accuracy, calibration by confidence
  band, experiments on the mind) and a global research page grouping
  experiments by protocol; every figure sits next to its operational
  definition and the disclaimer. Experiment pages show the protocol,
  reproducibility, build, per-variant research measures, divergence
  extras and counterfactual findings.
- The mind tabs gain Volition; the navigation gains Research.
2026-09-24 21:16:48 +01:00
Andy Dixon 937c5fb2ff feat(capabilities): metadata, frozen registry, scoped grants and requests
- Capabilities declare access (read/write, unknown fails closed as
  write), side effects, idempotency, timeout, cost estimate and the trust
  of their output (web content is low trust). A capability may derive its
  policy target from its parameters; a disagreeing target is refused, and
  approvals whose modified parameters change the target are refused.
- The registry is frozen at start-up; registration afterwards panics.
- Invocation.RequireApproval turns ALLOW into ASK for commitments; it can
  only tighten, and scoped grants never satisfy it.
- Scoped grants (migration 0025): capability, target and parameter globs,
  access, expiry of at most seven days and an optional operation count
  consumed atomically; applied only where policy says ASK. A sweep marks
  lapsed grants and refreshes the self-model, which now lists live grants.
- Capability requests carry scope, duration, operation cap, reason,
  evidence, risk, mitigation, fallback, alternatives and explicit decision
  history; they batch per intention, are capped per mind (operator
  attention budget) and can be decided only by a named person. Component
  names are refused as deciders, for approvals too, and as usernames.
- API routes, OpenAPI entries, scheduler sweeps and approval-centre
  sections for requests and temporary grants.
2026-09-06 22:29:03 +01:00
Andy Dixon 286d40a2d9 fix(ui): approval centre and policy form called unwired callbacks
Neither noemad nor the test harness passed ui.Actions.Policy or Decide,
so an operator's Approve, Deny and "add rule" forms dereferenced a nil
function and returned 500. Both handlers now use the shared, audited
server methods like the other study pages, and the unused callbacks are
removed. The observer-escalation test only reached the role check, which
is why this went unnoticed; the new browser test fails without the fix
(policy form → 500) and passes with it.
2026-09-01 21:09:30 +01:00
Andy Dixon b35dbe0299 security: add the capability and policy layer as the only path to action
Phase 12 (ADR-0005). Capabilities are registered in code with parameter
schemas, risk classes and default effects; sudo_shell and delete_database
are locked to DENY and cannot be relaxed. Policies are scoped globally or
per mind with capability, target glob, action kind and optional hour
window; evaluation is deterministic, most specific wins, and ties go to
the stricter effect. Invoke is the single entry point: it refuses
dreaming and replay contexts, validates parameters (unknown keys, non
http URLs and path traversal rejected), evaluates policy and session
grants, hashes the exact request and records a policy_decision event.
ALLOW executes with timeout and panic isolation and turns textual output
into a tool-trust observation; ASK creates an approval request bound to
the hash with an alert notification; DENY is counted and recorded.

Operators approve once, approve for a time-boxed session grant, deny
with a note, or modify parameters (re-validated, re-hashed, original
kept in the append-only decision log). The self-model's capability list
is recomputed from effective policy on start and on every policy change.
The act process maps fetch requests to http.fetch and the action handler
invokes through the layer; replies report capabilities and outcomes.

Policy matrix and approval centre pages, dashboard count, API, CLI
(approvals, policy, invoke) and docs/capabilities.md.
2026-06-29 20:28:05 +01:00