Add repo work accept front door

This commit is contained in:
Meta Vens 2026-06-19 22:18:53 +01:00
commit 20f95c623d
5 changed files with 410 additions and 5 deletions

View file

@ -186,9 +186,35 @@ CultMesh topology/liveness/tool/overview surfaces, and writes
7 agent SoA rows, 7 cluster/private-Verse/daemon rows, 19 globally available
daemon tools, and `privateStateExposed=false`.
This still does not execute elevated Idunn service mutation and does not accept
work items. It makes a fresh repo inspectably online as a local typed Verse
Body so the next missing organ is `epiphany-work accept --workspace <repo>`.
This still does not execute elevated Idunn service mutation. It makes a fresh
repo inspectably online as a local typed Verse Body.
### Landed Work Intake Front Door
The third front door exists as native Rust:
```powershell
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- accept --workspace <repo> --from persona-or-bifrost --item <id>
```
It requires the online receipt, writes public Persona/Bifrost feedback through
the existing CultMesh `collaboration-feedback` artery, routes the item to
Imagination consensus discovery, and writes
`.epiphany/work/work-accept-<item>.json`. This is intake, not execution:
`handsAuthorityGranted=false`, `durableStateAdmitted=false`, and
`publicationAuthorized=false` until Imagination/Self/Mind/Bifrost gates adopt a
concrete plan.
The first smoke proved the three-command sequence:
```powershell
epiphany-repo init --workspace <repo>
epiphany-swarm online --workspace <repo>
epiphany-work accept --workspace <repo> --from persona --item first-request
```
The accepted item produced an Imagination consensus receipt, candidate action
ref, public discussion ref, and `privateStateExposed=false`.
## Migration Implication

View file

@ -102,7 +102,7 @@ remembers doctrine; the branch remembers the blade.
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
- Hands now has a first executable action receipt spine. `epiphany-core::hands_gateway` owns `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`; runtime-spine can persist/reread them; `runtime_spine_persists_mind_gateway_review_receipts` includes the Hands chain beside Mind/Eyes/Substrate/Soul/Continuity proofs and proves the post-timestamp Hands receipt-chain detector; `epiphany-hands-action-smoke` emits intent/review/patch/command/commit receipt ids from `.epiphany-smoke\runtime-spine\hands-action-smoke.msgpack`; and the repo-action launch proof profile now requires action intent, action review, and patch receipt together. `epiphany-mvp-coordinator` now turns `continueImplementation` into a persisted Substrate Gate grant plus Hands intent/review gate and includes the receipt ids in the operator step. `epiphany-hands-action` is the native consequence recorder for that gate: `record-patch`, `record-command`, `record-commit`, and turn-level `record-pass` load the stored intent/review or `finalAction.handsActionGate` from `coordinator-summary.json`, require an approved matching review, enforce allowed operations, and keep patch/commit changed paths inside the requested scope. `epiphany-mvp-coordinator-smoke` includes the deterministic Hands pass proof. The coordinator now treats a complete Hands receipt chain after an accepted Soul result as new implementation evidence, launches Soul again, and routes a passing accepted Soul result to Modeling/modeling before another Hands turn. Work-loop telemetry is now typed internal CultMesh state: Verification role launches write `epiphany.cultmesh.work_loop_telemetry.v0` beside runtime-spine, render that packet for Soul with resolved receipt bodies, commit diff preview, source proof notes, verification assertions, and stdout/stderr previews, and Modeling launches read/enrich the latest packet with Soul acceptance receipt ids before Modeling updates the map. Local Verse prompt context now exposes only a sealed `latest_work_loop_summary` digest with telemetry id, Hands receipt ids, path/source/assertion counts, and Soul receipt ids; receipt payload previews, artifact previews, and commit diff previews remain internal telemetry and are leak-guarded by tests plus `epiphany-verse-query -- smoke`.
- `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. `epiphany-verse-query swarm-brake --brake-status engaged|released` can now write the local Verse brake document, and `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when that brake is engaged while keeping `status` readable. `epiphany-mvp-coordinator` also checks `--local-verse-store` before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when passed `--local-verse-store`. Daemon tool invocation, daemon lifecycle poke, and `epiphany-daemon-supervisor` restart/tick/serve/service-plan/service-launch/service-runbook/windows-service-install/windows-service-status/windows-service-reconcile/windows-service-execution-readiness/start/stop attempts now fail closed under a matching engaged brake; supervisor restart now has durable per-daemon policy with cooldown/backoff, explicit scheduled tick pulses, latest scheduler receipts, typed service lifecycle plan/launch/runbook/install/status/reconcile/readiness/start/stop receipts, and local operator wrapper modes that write runbook/install/status/reconcile/readiness/control-plan/execution artifacts plus operator run receipts. The installed-service read path, read-only service-policy reconciliation path, execution-readiness path, non-mutating start/stop control-plan path, and non-elevated execution refusal path have been proved against real Windows `EventLog` service-manager state or safe missing-service targets through local Verse receipts, including explicit wrapper install/start/stop execution modes. The next cut is actual elevated install/start/stop execution proof under operator authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` corrects the repo-swarm MVP authority boundary: autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, not every local edit. Future migration plans must make that autonomy typed, branch-contained, receipt-backed, interruptible, private-state-sealed, and cross-body-safe rather than turning Epiphany into a human-permission queue. The first native front door is now `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-repo -- init --workspace <repo>`; it delegates to the reviewed startup-only birth runner, writes `.epiphany/repo-init/repo-swarm-init-receipt.json`, prepares repo-local state paths, and emits a planned `epiphany/<swarm-id>/<topic>` branch receipt unless `--create-branch` or `--switch-branch` grants local branch mutation. The second native front door is `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-swarm -- online --workspace <repo>`; it requires the init receipt, seeds repo-local `.epiphany/local-verse.ccmp`, bootstraps a repo-local standing-faculty agent store when absent, refreshes SoA, reads CultMesh topology/liveness/tool/overview surfaces, and writes `.epiphany/swarm-online/repo-swarm-online-receipt.json`. Fresh-repo smoke proved 7 SoA rows, 7 cluster/private-Verse/daemon rows, 19 all-agent tools, and `privateStateExposed=false`. Next missing organ: `epiphany-work accept --workspace <repo>`.
- `notes/epiphany-repo-swarm-mvp-contract.md` corrects the repo-swarm MVP authority boundary: autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, not every local edit. Future migration plans must make that autonomy typed, branch-contained, receipt-backed, interruptible, private-state-sealed, and cross-body-safe rather than turning Epiphany into a human-permission queue. Three native repo-swarm front doors are now live: `epiphany-repo init --workspace <repo>` writes the repo-swarm init receipt and branch workbench plan; `epiphany-swarm online --workspace <repo>` seeds repo-local `.epiphany/local-verse.ccmp`, standing-faculty SoA, topology/liveness/tool/overview proof, and `.epiphany/swarm-online/repo-swarm-online-receipt.json`; `epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>` routes a Persona/Bifrost item through CultMesh collaboration feedback into Imagination consensus discovery and writes `.epiphany/work/work-accept-<item>.json` with no Hands, durable-state, or publication authority granted. Fresh-repo smokes proved init, online, and Persona-item accept with `privateStateExposed=false`. Next missing organ: `epiphany-work run --workspace <repo>` after Imagination/Self/Mind gates adopt a concrete plan.
- `service-execution-runbook` makes that next cut repeatable: it generates the exact elevated wrapper command sequence without mutating the service manager, continues after per-step failure to preserve more receipts, runs `service-execution-audit` in `finally`, exits nonzero if any step failed, and seals a typed runbook lifecycle receipt. Run the generated artifact only with explicit operator authority.
- `service-execution-audit` is the non-mutating acceptance proof after the elevated rite: it reports `complete` only when typed lifecycle receipts prove the runbook witness plus expected elevated chain, and otherwise reports the missing/failed sealed checks.
- `service-tick` is the non-elevated scheduler pulse proof: it writes the latest daemon scheduler receipt through durable policy ownership and local wrapper receipts.