oh-my-super-agent 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/advisor.md +15 -0
- package/.agents/agents/conductor.md +32 -0
- package/.agents/agents/dreamer.md +13 -0
- package/.agents/agents/executor.md +17 -0
- package/.agents/agents/grader.md +15 -0
- package/.agents/config/endurance-policy.json +8 -0
- package/.agents/config/oms-config.json +119 -0
- package/.agents/config/release-policy.json +12 -0
- package/.agents/config/secret-scan-policy.json +7 -0
- package/.agents/config/verification-plan.json +33 -0
- package/.agents/registry.json +11 -0
- package/.agents/rules/constitution.md +7 -0
- package/.agents/skills/conductor/SKILL.md +23 -0
- package/.agents/skills/dream/SKILL.md +14 -0
- package/.agents/skills/executor/SKILL.md +13 -0
- package/.agents/skills/oms/SKILL.md +52 -0
- package/.agents/skills/quota-aware/SKILL.md +12 -0
- package/.agents/skills/schedule/SKILL.md +13 -0
- package/.agents/skills/team-protocol/SKILL.md +20 -0
- package/LICENSE +21 -0
- package/README.md +146 -0
- package/dist/src/audit/run-ledger.d.ts +183 -0
- package/dist/src/audit/run-ledger.js +1655 -0
- package/dist/src/audit/run-ledger.js.map +1 -0
- package/dist/src/cli.d.ts +61 -0
- package/dist/src/cli.js +2096 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/github-queue-probe.d.ts +26 -0
- package/dist/src/commands/github-queue-probe.js +51 -0
- package/dist/src/commands/github-queue-probe.js.map +1 -0
- package/dist/src/commands/trace-fixture.d.ts +20 -0
- package/dist/src/commands/trace-fixture.js +72 -0
- package/dist/src/commands/trace-fixture.js.map +1 -0
- package/dist/src/conductor/activity.d.ts +46 -0
- package/dist/src/conductor/activity.js +224 -0
- package/dist/src/conductor/activity.js.map +1 -0
- package/dist/src/conductor/bridge.d.ts +53 -0
- package/dist/src/conductor/bridge.js +652 -0
- package/dist/src/conductor/bridge.js.map +1 -0
- package/dist/src/conductor/notifications.d.ts +59 -0
- package/dist/src/conductor/notifications.js +381 -0
- package/dist/src/conductor/notifications.js.map +1 -0
- package/dist/src/conductor/recovery.d.ts +29 -0
- package/dist/src/conductor/recovery.js +198 -0
- package/dist/src/conductor/recovery.js.map +1 -0
- package/dist/src/conductor/start.d.ts +73 -0
- package/dist/src/conductor/start.js +519 -0
- package/dist/src/conductor/start.js.map +1 -0
- package/dist/src/conductor/waiter.d.ts +88 -0
- package/dist/src/conductor/waiter.js +427 -0
- package/dist/src/conductor/waiter.js.map +1 -0
- package/dist/src/config.d.ts +9 -0
- package/dist/src/config.js +40 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/dispatch/advice-source.d.ts +61 -0
- package/dist/src/dispatch/advice-source.js +198 -0
- package/dist/src/dispatch/advice-source.js.map +1 -0
- package/dist/src/dispatch/advice-store.d.ts +41 -0
- package/dist/src/dispatch/advice-store.js +201 -0
- package/dist/src/dispatch/advice-store.js.map +1 -0
- package/dist/src/dispatch/advice.d.ts +34 -0
- package/dist/src/dispatch/advice.js +371 -0
- package/dist/src/dispatch/advice.js.map +1 -0
- package/dist/src/dispatch/authority.d.ts +124 -0
- package/dist/src/dispatch/authority.js +1202 -0
- package/dist/src/dispatch/authority.js.map +1 -0
- package/dist/src/dispatch/intent.d.ts +66 -0
- package/dist/src/dispatch/intent.js +71 -0
- package/dist/src/dispatch/intent.js.map +1 -0
- package/dist/src/dispatch/runtime-authority.d.ts +42 -0
- package/dist/src/dispatch/runtime-authority.js +52 -0
- package/dist/src/dispatch/runtime-authority.js.map +1 -0
- package/dist/src/doctor.d.ts +20 -0
- package/dist/src/doctor.js +85 -0
- package/dist/src/doctor.js.map +1 -0
- package/dist/src/domain/records.d.ts +44 -0
- package/dist/src/domain/records.js +138 -0
- package/dist/src/domain/records.js.map +1 -0
- package/dist/src/domain/role-policy.d.ts +67 -0
- package/dist/src/domain/role-policy.js +547 -0
- package/dist/src/domain/role-policy.js.map +1 -0
- package/dist/src/events/bus.d.ts +32 -0
- package/dist/src/events/bus.js +115 -0
- package/dist/src/events/bus.js.map +1 -0
- package/dist/src/events/kinds.d.ts +126 -0
- package/dist/src/events/kinds.js +14 -0
- package/dist/src/events/kinds.js.map +1 -0
- package/dist/src/evidence/immutable-file.d.ts +12 -0
- package/dist/src/evidence/immutable-file.js +141 -0
- package/dist/src/evidence/immutable-file.js.map +1 -0
- package/dist/src/evidence/store.d.ts +125 -0
- package/dist/src/evidence/store.js +1189 -0
- package/dist/src/evidence/store.js.map +1 -0
- package/dist/src/evidence/verdict.d.ts +17 -0
- package/dist/src/evidence/verdict.js +23 -0
- package/dist/src/evidence/verdict.js.map +1 -0
- package/dist/src/generation/agent.d.ts +5 -0
- package/dist/src/generation/agent.js +34 -0
- package/dist/src/generation/agent.js.map +1 -0
- package/dist/src/generation/frontmatter.d.ts +7 -0
- package/dist/src/generation/frontmatter.js +33 -0
- package/dist/src/generation/frontmatter.js.map +1 -0
- package/dist/src/github/adapter.d.ts +44 -0
- package/dist/src/github/adapter.js +592 -0
- package/dist/src/github/adapter.js.map +1 -0
- package/dist/src/github/dispatch-eligibility.d.ts +9 -0
- package/dist/src/github/dispatch-eligibility.js +94 -0
- package/dist/src/github/dispatch-eligibility.js.map +1 -0
- package/dist/src/github/projector.d.ts +23 -0
- package/dist/src/github/projector.js +181 -0
- package/dist/src/github/projector.js.map +1 -0
- package/dist/src/github/review.d.ts +39 -0
- package/dist/src/github/review.js +1450 -0
- package/dist/src/github/review.js.map +1 -0
- package/dist/src/github/sync.d.ts +21 -0
- package/dist/src/github/sync.js +518 -0
- package/dist/src/github/sync.js.map +1 -0
- package/dist/src/github/types.d.ts +134 -0
- package/dist/src/github/types.js +11 -0
- package/dist/src/github/types.js.map +1 -0
- package/dist/src/goals/artifact-store.d.ts +31 -0
- package/dist/src/goals/artifact-store.js +241 -0
- package/dist/src/goals/artifact-store.js.map +1 -0
- package/dist/src/goals/authority.d.ts +112 -0
- package/dist/src/goals/authority.js +621 -0
- package/dist/src/goals/authority.js.map +1 -0
- package/dist/src/goals/native-snapshot.d.ts +12 -0
- package/dist/src/goals/native-snapshot.js +53 -0
- package/dist/src/goals/native-snapshot.js.map +1 -0
- package/dist/src/goals/runtime-authority.d.ts +7 -0
- package/dist/src/goals/runtime-authority.js +20 -0
- package/dist/src/goals/runtime-authority.js.map +1 -0
- package/dist/src/health/release-assessment.d.ts +11 -0
- package/dist/src/health/release-assessment.js +83 -0
- package/dist/src/health/release-assessment.js.map +1 -0
- package/dist/src/health/release-policy.d.ts +16 -0
- package/dist/src/health/release-policy.js +40 -0
- package/dist/src/health/release-policy.js.map +1 -0
- package/dist/src/hooks/native.d.ts +30 -0
- package/dist/src/hooks/native.js +495 -0
- package/dist/src/hooks/native.js.map +1 -0
- package/dist/src/hooks/provider-runtime.d.ts +55 -0
- package/dist/src/hooks/provider-runtime.js +479 -0
- package/dist/src/hooks/provider-runtime.js.map +1 -0
- package/dist/src/hooks/provider.d.ts +102 -0
- package/dist/src/hooks/provider.js +358 -0
- package/dist/src/hooks/provider.js.map +1 -0
- package/dist/src/live/contact-journal.d.ts +73 -0
- package/dist/src/live/contact-journal.js +439 -0
- package/dist/src/live/contact-journal.js.map +1 -0
- package/dist/src/live-probes/gh-adapter.d.ts +28 -0
- package/dist/src/live-probes/gh-adapter.js +188 -0
- package/dist/src/live-probes/gh-adapter.js.map +1 -0
- package/dist/src/live-probes/github-queue.d.ts +1 -0
- package/dist/src/live-probes/github-queue.js +2 -0
- package/dist/src/live-probes/github-queue.js.map +1 -0
- package/dist/src/notifications/slack-request.d.ts +13 -0
- package/dist/src/notifications/slack-request.js +40 -0
- package/dist/src/notifications/slack-request.js.map +1 -0
- package/dist/src/outbox/processor.d.ts +27 -0
- package/dist/src/outbox/processor.js +63 -0
- package/dist/src/outbox/processor.js.map +1 -0
- package/dist/src/outbox/store.d.ts +158 -0
- package/dist/src/outbox/store.js +834 -0
- package/dist/src/outbox/store.js.map +1 -0
- package/dist/src/package-root.d.ts +1 -0
- package/dist/src/package-root.js +26 -0
- package/dist/src/package-root.js.map +1 -0
- package/dist/src/project.d.ts +12 -0
- package/dist/src/project.js +60 -0
- package/dist/src/project.js.map +1 -0
- package/dist/src/projection/generated-file.d.ts +15 -0
- package/dist/src/projection/generated-file.js +72 -0
- package/dist/src/projection/generated-file.js.map +1 -0
- package/dist/src/projection/project-workspace.d.ts +11 -0
- package/dist/src/projection/project-workspace.js +94 -0
- package/dist/src/projection/project-workspace.js.map +1 -0
- package/dist/src/projection/registry.d.ts +15 -0
- package/dist/src/projection/registry.js +59 -0
- package/dist/src/projection/registry.js.map +1 -0
- package/dist/src/projection/safe-path.d.ts +4 -0
- package/dist/src/projection/safe-path.js +106 -0
- package/dist/src/projection/safe-path.js.map +1 -0
- package/dist/src/providers/claude-interactive.d.ts +38 -0
- package/dist/src/providers/claude-interactive.js +287 -0
- package/dist/src/providers/claude-interactive.js.map +1 -0
- package/dist/src/providers/claude-structured-bridge.d.ts +32 -0
- package/dist/src/providers/claude-structured-bridge.js +215 -0
- package/dist/src/providers/claude-structured-bridge.js.map +1 -0
- package/dist/src/providers/claude-structured-completion.d.ts +23 -0
- package/dist/src/providers/claude-structured-completion.js +229 -0
- package/dist/src/providers/claude-structured-completion.js.map +1 -0
- package/dist/src/providers/claude-structured-pane.d.ts +23 -0
- package/dist/src/providers/claude-structured-pane.js +156 -0
- package/dist/src/providers/claude-structured-pane.js.map +1 -0
- package/dist/src/providers/claude-structured-store.d.ts +48 -0
- package/dist/src/providers/claude-structured-store.js +212 -0
- package/dist/src/providers/claude-structured-store.js.map +1 -0
- package/dist/src/providers/claude-structured.d.ts +56 -0
- package/dist/src/providers/claude-structured.js +250 -0
- package/dist/src/providers/claude-structured.js.map +1 -0
- package/dist/src/providers/codex-exec.d.ts +29 -0
- package/dist/src/providers/codex-exec.js +127 -0
- package/dist/src/providers/codex-exec.js.map +1 -0
- package/dist/src/providers/grading.d.ts +2 -0
- package/dist/src/providers/grading.js +20 -0
- package/dist/src/providers/grading.js.map +1 -0
- package/dist/src/providers/native-dispatch.d.ts +24 -0
- package/dist/src/providers/native-dispatch.js +34 -0
- package/dist/src/providers/native-dispatch.js.map +1 -0
- package/dist/src/providers/preflight.d.ts +65 -0
- package/dist/src/providers/preflight.js +256 -0
- package/dist/src/providers/preflight.js.map +1 -0
- package/dist/src/providers/process.d.ts +18 -0
- package/dist/src/providers/process.js +21 -0
- package/dist/src/providers/process.js.map +1 -0
- package/dist/src/queue/model.d.ts +37 -0
- package/dist/src/queue/model.js +51 -0
- package/dist/src/queue/model.js.map +1 -0
- package/dist/src/queue/service.d.ts +1 -0
- package/dist/src/queue/service.js +2 -0
- package/dist/src/queue/service.js.map +1 -0
- package/dist/src/reflections/store.d.ts +21 -0
- package/dist/src/reflections/store.js +60 -0
- package/dist/src/reflections/store.js.map +1 -0
- package/dist/src/reports/daily-trust.d.ts +11 -0
- package/dist/src/reports/daily-trust.js +98 -0
- package/dist/src/reports/daily-trust.js.map +1 -0
- package/dist/src/runs/controller.d.ts +187 -0
- package/dist/src/runs/controller.js +1182 -0
- package/dist/src/runs/controller.js.map +1 -0
- package/dist/src/runtime/composition.d.ts +9 -0
- package/dist/src/runtime/composition.js +35 -0
- package/dist/src/runtime/composition.js.map +1 -0
- package/dist/src/runtime/endurance-authorities.d.ts +44 -0
- package/dist/src/runtime/endurance-authorities.js +101 -0
- package/dist/src/runtime/endurance-authorities.js.map +1 -0
- package/dist/src/runtime/endurance-policy.d.ts +12 -0
- package/dist/src/runtime/endurance-policy.js +13 -0
- package/dist/src/runtime/endurance-policy.js.map +1 -0
- package/dist/src/runtime/lock.d.ts +63 -0
- package/dist/src/runtime/lock.js +577 -0
- package/dist/src/runtime/lock.js.map +1 -0
- package/dist/src/runtime/process-identity.d.ts +10 -0
- package/dist/src/runtime/process-identity.js +43 -0
- package/dist/src/runtime/process-identity.js.map +1 -0
- package/dist/src/runtime/quota.d.ts +130 -0
- package/dist/src/runtime/quota.js +590 -0
- package/dist/src/runtime/quota.js.map +1 -0
- package/dist/src/runtime/record-store.d.ts +45 -0
- package/dist/src/runtime/record-store.js +272 -0
- package/dist/src/runtime/record-store.js.map +1 -0
- package/dist/src/runtime/schema.d.ts +28 -0
- package/dist/src/runtime/schema.js +194 -0
- package/dist/src/runtime/schema.js.map +1 -0
- package/dist/src/runtime/stable-id.d.ts +3 -0
- package/dist/src/runtime/stable-id.js +27 -0
- package/dist/src/runtime/stable-id.js.map +1 -0
- package/dist/src/runtime/system-clock.d.ts +8 -0
- package/dist/src/runtime/system-clock.js +35 -0
- package/dist/src/runtime/system-clock.js.map +1 -0
- package/dist/src/schedule/service-plan.d.ts +58 -0
- package/dist/src/schedule/service-plan.js +327 -0
- package/dist/src/schedule/service-plan.js.map +1 -0
- package/dist/src/schedule/user-installation.d.ts +62 -0
- package/dist/src/schedule/user-installation.js +701 -0
- package/dist/src/schedule/user-installation.js.map +1 -0
- package/dist/src/schedule/user-plan.d.ts +47 -0
- package/dist/src/schedule/user-plan.js +286 -0
- package/dist/src/schedule/user-plan.js.map +1 -0
- package/dist/src/scheduler/minute.d.ts +31 -0
- package/dist/src/scheduler/minute.js +441 -0
- package/dist/src/scheduler/minute.js.map +1 -0
- package/dist/src/schemas/registry.d.ts +10 -0
- package/dist/src/schemas/registry.js +36 -0
- package/dist/src/schemas/registry.js.map +1 -0
- package/dist/src/security/secret-scan.d.ts +50 -0
- package/dist/src/security/secret-scan.js +384 -0
- package/dist/src/security/secret-scan.js.map +1 -0
- package/dist/src/sessions/registry.d.ts +89 -0
- package/dist/src/sessions/registry.js +443 -0
- package/dist/src/sessions/registry.js.map +1 -0
- package/dist/src/state.d.ts +27 -0
- package/dist/src/state.js +235 -0
- package/dist/src/state.js.map +1 -0
- package/dist/src/status/hud.d.ts +37 -0
- package/dist/src/status/hud.js +88 -0
- package/dist/src/status/hud.js.map +1 -0
- package/dist/src/team/plan.d.ts +31 -0
- package/dist/src/team/plan.js +184 -0
- package/dist/src/team/plan.js.map +1 -0
- package/dist/src/team/projection.d.ts +24 -0
- package/dist/src/team/projection.js +79 -0
- package/dist/src/team/projection.js.map +1 -0
- package/dist/src/tickets/admission.d.ts +34 -0
- package/dist/src/tickets/admission.js +169 -0
- package/dist/src/tickets/admission.js.map +1 -0
- package/dist/src/tickets/materializer.d.ts +1 -0
- package/dist/src/tickets/materializer.js +2 -0
- package/dist/src/tickets/materializer.js.map +1 -0
- package/dist/src/tickets/runtime-authority.d.ts +32 -0
- package/dist/src/tickets/runtime-authority.js +46 -0
- package/dist/src/tickets/runtime-authority.js.map +1 -0
- package/dist/src/tickets/store.d.ts +221 -0
- package/dist/src/tickets/store.js +2025 -0
- package/dist/src/tickets/store.js.map +1 -0
- package/dist/src/tracer/one-ticket.d.ts +58 -0
- package/dist/src/tracer/one-ticket.js +578 -0
- package/dist/src/tracer/one-ticket.js.map +1 -0
- package/dist/src/trust/assessment.d.ts +24 -0
- package/dist/src/trust/assessment.js +124 -0
- package/dist/src/trust/assessment.js.map +1 -0
- package/dist/src/trust/runs.d.ts +13 -0
- package/dist/src/trust/runs.js +46 -0
- package/dist/src/trust/runs.js.map +1 -0
- package/dist/src/types.d.ts +6 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/fs.d.ts +13 -0
- package/dist/src/utils/fs.js +188 -0
- package/dist/src/utils/fs.js.map +1 -0
- package/dist/src/verification/authority.d.ts +28 -0
- package/dist/src/verification/authority.js +153 -0
- package/dist/src/verification/authority.js.map +1 -0
- package/dist/src/verification/grade-source.d.ts +17 -0
- package/dist/src/verification/grade-source.js +30 -0
- package/dist/src/verification/grade-source.js.map +1 -0
- package/dist/src/verification/plan.d.ts +20 -0
- package/dist/src/verification/plan.js +128 -0
- package/dist/src/verification/plan.js.map +1 -0
- package/dist/src/verification/protected-runner.d.ts +50 -0
- package/dist/src/verification/protected-runner.js +171 -0
- package/dist/src/verification/protected-runner.js.map +1 -0
- package/dist/src/verification/result-gate-store.d.ts +72 -0
- package/dist/src/verification/result-gate-store.js +193 -0
- package/dist/src/verification/result-gate-store.js.map +1 -0
- package/dist/src/verification/result-gate.d.ts +41 -0
- package/dist/src/verification/result-gate.js +731 -0
- package/dist/src/verification/result-gate.js.map +1 -0
- package/dist/src/verification/runner.d.ts +38 -0
- package/dist/src/verification/runner.js +143 -0
- package/dist/src/verification/runner.js.map +1 -0
- package/dist/src/verification/sandbox.d.ts +16 -0
- package/dist/src/verification/sandbox.js +199 -0
- package/dist/src/verification/sandbox.js.map +1 -0
- package/dist/src/verify.d.ts +8 -0
- package/dist/src/verify.js +35 -0
- package/dist/src/verify.js.map +1 -0
- package/dist/src/watchdog/reconcile.d.ts +42 -0
- package/dist/src/watchdog/reconcile.js +440 -0
- package/dist/src/watchdog/reconcile.js.map +1 -0
- package/dist/src/workers/bridge.d.ts +35 -0
- package/dist/src/workers/bridge.js +426 -0
- package/dist/src/workers/bridge.js.map +1 -0
- package/dist/src/workers/delivery.d.ts +31 -0
- package/dist/src/workers/delivery.js +876 -0
- package/dist/src/workers/delivery.js.map +1 -0
- package/dist/src/workers/panes.d.ts +32 -0
- package/dist/src/workers/panes.js +212 -0
- package/dist/src/workers/panes.js.map +1 -0
- package/dist/src/workers/registry.d.ts +80 -0
- package/dist/src/workers/registry.js +351 -0
- package/dist/src/workers/registry.js.map +1 -0
- package/dist/src/workers/runtime.d.ts +44 -0
- package/dist/src/workers/runtime.js +21 -0
- package/dist/src/workers/runtime.js.map +1 -0
- package/dist/src/worktrees/manager.d.ts +35 -0
- package/dist/src/worktrees/manager.js +315 -0
- package/dist/src/worktrees/manager.js.map +1 -0
- package/docs/ARCHITECTURE.md +323 -0
- package/docs/PLAN.md +216 -0
- package/docs/REFERENCES.md +42 -0
- package/docs/ROADMAP.md +327 -0
- package/docs/SECURITY.md +242 -0
- package/docs/adr/0001-tracer-first-file-backed-certification.md +41 -0
- package/docs/adr/0002-conductor-first-typed-dispatch.md +102 -0
- package/docs/adr/0003-mandatory-pre-dispatch-advice.md +59 -0
- package/docs/compatibility/claude-code-2.1.207.md +25 -0
- package/loop/contract.md +102 -0
- package/package.json +54 -0
- package/schemas/advisor-evidence.schema.json +54 -0
- package/schemas/advisor-output.schema.json +31 -0
- package/schemas/conductor-activity-payload.schema.json +38 -0
- package/schemas/conductor-decision.schema.json +29 -0
- package/schemas/conductor-dispatch-intent.schema.json +71 -0
- package/schemas/conductor-dispatch-preparation.schema.json +46 -0
- package/schemas/conductor-dispatch-proposal.schema.json +82 -0
- package/schemas/conductor-goal-proposal.schema.json +30 -0
- package/schemas/conductor-manage-worker.schema.json +17 -0
- package/schemas/conductor-notification-payload.schema.json +39 -0
- package/schemas/conductor-process-result.schema.json +14 -0
- package/schemas/conductor-route.schema.json +51 -0
- package/schemas/conductor-start-team.schema.json +16 -0
- package/schemas/conductor-waiter-payload.schema.json +68 -0
- package/schemas/deterministic-check.schema.json +107 -0
- package/schemas/dispatch-acknowledgement.schema.json +15 -0
- package/schemas/dispatch-advice-payload.schema.json +64 -0
- package/schemas/dispatch-payload.schema.json +131 -0
- package/schemas/dispatch-result.schema.json +28 -0
- package/schemas/endurance-policy.schema.json +16 -0
- package/schemas/events/dispatch-delivery-requested.schema.json +17 -0
- package/schemas/events/github-observed.schema.json +28 -0
- package/schemas/events/native-hook-observed.schema.json +35 -0
- package/schemas/events/provider-observed.schema.json +64 -0
- package/schemas/events/run-heartbeat-due.schema.json +10 -0
- package/schemas/events/slack-notification-requested.schema.json +14 -0
- package/schemas/events/structured-role-completed.schema.json +54 -0
- package/schemas/events/ticket-resume-due.schema.json +28 -0
- package/schemas/events/watchdog-lease-expired.schema.json +14 -0
- package/schemas/events/watchdog-outbox-stalled.schema.json +12 -0
- package/schemas/events/watchdog-session-stalled.schema.json +11 -0
- package/schemas/evidence-record.schema.json +37 -0
- package/schemas/executor-result.schema.json +17 -0
- package/schemas/github-observation.schema.json +33 -0
- package/schemas/github-watermark.schema.json +66 -0
- package/schemas/goal-artifact.schema.json +19 -0
- package/schemas/goal-create-input.schema.json +14 -0
- package/schemas/goal-executor-result.schema.json +18 -0
- package/schemas/goal-payload.schema.json +95 -0
- package/schemas/grader-output.schema.json +33 -0
- package/schemas/lease-expiry.schema.json +19 -0
- package/schemas/live-disclosure.schema.json +16 -0
- package/schemas/live-outcome.schema.json +52 -0
- package/schemas/native-goal-snapshot.schema.json +27 -0
- package/schemas/provider-observed.schema.json +64 -0
- package/schemas/quota-observation.schema.json +72 -0
- package/schemas/reflection-evidence.schema.json +61 -0
- package/schemas/reflection.schema.json +13 -0
- package/schemas/regression-request.schema.json +54 -0
- package/schemas/release-assessment.schema.json +34 -0
- package/schemas/release-policy.schema.json +30 -0
- package/schemas/result-gate-payload.schema.json +244 -0
- package/schemas/review-delivery-payload.schema.json +42 -0
- package/schemas/role-policy.schema.json +111 -0
- package/schemas/run-abort-input.schema.json +11 -0
- package/schemas/run-completion-proof.schema.json +62 -0
- package/schemas/run-ledger-entry.schema.json +78 -0
- package/schemas/run-manifest.schema.json +74 -0
- package/schemas/run-start-intent.schema.json +74 -0
- package/schemas/runtime-record.schema.json +111 -0
- package/schemas/service-plan.schema.json +35 -0
- package/schemas/session-payload.schema.json +80 -0
- package/schemas/structured-role-read-request.schema.json +14 -0
- package/schemas/structured-role-request.schema.json +44 -0
- package/schemas/structured-role-result.schema.json +38 -0
- package/schemas/structured-role-submit-result.schema.json +15 -0
- package/schemas/team-checkpoint.schema.json +42 -0
- package/schemas/team-plan.schema.json +30 -0
- package/schemas/ticket-content.schema.json +38 -0
- package/schemas/ticket-queue-payload.schema.json +191 -0
- package/schemas/trust-report.schema.json +68 -0
- package/schemas/trust-run.schema.json +47 -0
- package/schemas/ultragoal-checkpoint.schema.json +49 -0
- package/schemas/user-schedule-installation-v1.schema.json +32 -0
- package/schemas/user-schedule-installation.schema.json +38 -0
- package/schemas/user-schedule-plan.schema.json +39 -0
- package/schemas/verification-plan-evidence.schema.json +37 -0
- package/schemas/worker-acknowledge-dispatch.schema.json +12 -0
- package/schemas/worker-payload.schema.json +47 -0
- package/schemas/worker-read-dispatch.schema.json +11 -0
- package/schemas/worker-record-dispatch-result.schema.json +14 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { existsSync, lstatSync, realpathSync } from "node:fs";
|
|
2
|
+
import { dirname, isAbsolute, join, normalize } from "node:path";
|
|
3
|
+
import { acquireDirectoryLock } from "../runtime/lock.js";
|
|
4
|
+
import { assertActorId, assertOpaqueId, assertTransitionNonce } from "../domain/records.js";
|
|
5
|
+
import { isRecord, readJsonFileNoFollow, validateExistingDirectory, writeJsonAtomic, } from "../utils/fs.js";
|
|
6
|
+
const COMMIT_PATTERN = /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/;
|
|
7
|
+
const BASE_REF_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,254}$/;
|
|
8
|
+
const GIT_TIMEOUT_MS = 30_000;
|
|
9
|
+
const GIT_MAX_BUFFER_BYTES = 256 * 1024;
|
|
10
|
+
/**
|
|
11
|
+
* Creates one isolated branch/worktree. This boundary deliberately has no merge
|
|
12
|
+
* or removal operation: cleanup and integration remain explicit operator acts.
|
|
13
|
+
*/
|
|
14
|
+
export function createTicketWorktree(options) {
|
|
15
|
+
const ticketId = assertOpaqueId(options.ticketId, "ticket id");
|
|
16
|
+
const actorId = assertActorId(options.actorId, "worktree actor id");
|
|
17
|
+
const transitionNonce = assertTransitionNonce(options.transitionNonce, "worktree transition nonce");
|
|
18
|
+
const requestedBase = validateBaseRef(options.baseRef ?? "HEAD");
|
|
19
|
+
const repositoryRoot = validateExistingDirectory(options.repositoryRoot, "repository root");
|
|
20
|
+
const worktreesRoot = validateExistingDirectory(options.worktreesRoot, "worktrees root");
|
|
21
|
+
const recordsRoot = validateExistingDirectory(options.recordsRoot, "worktree records root");
|
|
22
|
+
const locksRoot = validateExistingDirectory(options.locksRoot, "locks root");
|
|
23
|
+
const worktreesRootIdentity = captureDirectoryIdentity(worktreesRoot);
|
|
24
|
+
const recordsRootIdentity = captureDirectoryIdentity(recordsRoot);
|
|
25
|
+
const worktreeRoot = join(worktreesRoot, ticketId);
|
|
26
|
+
const recordPath = join(recordsRoot, `${ticketId}.json`);
|
|
27
|
+
const intentPath = join(recordsRoot, `${ticketId}.intent.json`);
|
|
28
|
+
const branch = `oms-ticket-${ticketId}`;
|
|
29
|
+
const env = safeGitEnvironment(options.env ?? process.env);
|
|
30
|
+
assertRepositoryRoot(repositoryRoot, env, options.runner);
|
|
31
|
+
const readCompletedReplay = () => {
|
|
32
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
33
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
34
|
+
if (!existsSync(recordPath))
|
|
35
|
+
return undefined;
|
|
36
|
+
const record = parseTicketWorktreeRecord(readJsonFileNoFollow(recordPath), recordPath);
|
|
37
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
38
|
+
const intent = readRequiredRecord(intentPath, recordsRootIdentity, "worktree create intent");
|
|
39
|
+
assertRecordsEqual(intent, record, "worktree record does not match its create intent");
|
|
40
|
+
assertReplayMatches(record, {
|
|
41
|
+
ticketId,
|
|
42
|
+
repositoryRoot,
|
|
43
|
+
worktreeRoot,
|
|
44
|
+
branch,
|
|
45
|
+
requestedBase,
|
|
46
|
+
transitionNonce,
|
|
47
|
+
});
|
|
48
|
+
assertMaterializedWorktree(record, env, options.runner);
|
|
49
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
50
|
+
return { record, replayed: true, recovered: false };
|
|
51
|
+
};
|
|
52
|
+
const completedReplay = readCompletedReplay();
|
|
53
|
+
if (completedReplay)
|
|
54
|
+
return completedReplay;
|
|
55
|
+
const lock = acquireDirectoryLock({
|
|
56
|
+
locksRoot,
|
|
57
|
+
lockId: `worktree-${ticketId}`,
|
|
58
|
+
ownerId: actorId,
|
|
59
|
+
note: ticketId,
|
|
60
|
+
});
|
|
61
|
+
try {
|
|
62
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
63
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
64
|
+
const lockedReplay = readCompletedReplay();
|
|
65
|
+
if (lockedReplay)
|
|
66
|
+
return lockedReplay;
|
|
67
|
+
if (existsSync(intentPath)) {
|
|
68
|
+
const intent = readRequiredRecord(intentPath, recordsRootIdentity, "worktree create intent");
|
|
69
|
+
assertReplayMatches(intent, {
|
|
70
|
+
ticketId,
|
|
71
|
+
repositoryRoot,
|
|
72
|
+
worktreeRoot,
|
|
73
|
+
branch,
|
|
74
|
+
requestedBase,
|
|
75
|
+
transitionNonce,
|
|
76
|
+
});
|
|
77
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
78
|
+
if (existsSync(worktreeRoot)) {
|
|
79
|
+
const entry = lstatSync(worktreeRoot);
|
|
80
|
+
if (entry.isSymbolicLink())
|
|
81
|
+
throw new Error(`worktree path collision is a symbolic link: ${ticketId}`);
|
|
82
|
+
assertMaterializedWorktree(intent, env, options.runner, true);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
assertBranchAbsent(repositoryRoot, branch, env, options.runner);
|
|
86
|
+
addWorktree(repositoryRoot, intent, env, options.runner);
|
|
87
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
88
|
+
assertMaterializedWorktree(intent, env, options.runner, true);
|
|
89
|
+
}
|
|
90
|
+
persistNewRecord(recordPath, intent, recordsRootIdentity, "worktree record");
|
|
91
|
+
return { record: intent, replayed: false, recovered: true };
|
|
92
|
+
}
|
|
93
|
+
if (existsSync(worktreeRoot)) {
|
|
94
|
+
const entry = lstatSync(worktreeRoot);
|
|
95
|
+
if (entry.isSymbolicLink())
|
|
96
|
+
throw new Error(`worktree path collision is a symbolic link: ${ticketId}`);
|
|
97
|
+
throw new Error(`worktree path collision without a create intent: ${ticketId}`);
|
|
98
|
+
}
|
|
99
|
+
const baseCommit = resolveCommit(repositoryRoot, requestedBase, env, options.runner);
|
|
100
|
+
assertBranchAbsent(repositoryRoot, branch, env, options.runner);
|
|
101
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
102
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
103
|
+
const record = {
|
|
104
|
+
schema_version: 1,
|
|
105
|
+
ticket_id: ticketId,
|
|
106
|
+
repository_root: repositoryRoot,
|
|
107
|
+
worktree_root: worktreeRoot,
|
|
108
|
+
branch,
|
|
109
|
+
requested_base: requestedBase,
|
|
110
|
+
base_commit: baseCommit,
|
|
111
|
+
create_nonce: transitionNonce,
|
|
112
|
+
};
|
|
113
|
+
persistNewRecord(intentPath, record, recordsRootIdentity, "worktree create intent");
|
|
114
|
+
addWorktree(repositoryRoot, record, env, options.runner);
|
|
115
|
+
validateDirectoryIdentity(worktreesRootIdentity, "worktrees root");
|
|
116
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
117
|
+
assertMaterializedWorktree(record, env, options.runner, true);
|
|
118
|
+
persistNewRecord(recordPath, record, recordsRootIdentity, "worktree record");
|
|
119
|
+
return { record, replayed: false, recovered: false };
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
lock.release();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function addWorktree(repositoryRoot, record, env, runner) {
|
|
126
|
+
runGit(repositoryRoot, [
|
|
127
|
+
"-c",
|
|
128
|
+
"core.hooksPath=/dev/null",
|
|
129
|
+
"worktree",
|
|
130
|
+
"add",
|
|
131
|
+
"-b",
|
|
132
|
+
record.branch,
|
|
133
|
+
record.worktree_root,
|
|
134
|
+
record.base_commit,
|
|
135
|
+
], env, runner, "git worktree add");
|
|
136
|
+
}
|
|
137
|
+
function persistNewRecord(path, record, recordsRootIdentity, label) {
|
|
138
|
+
parseTicketWorktreeRecord(record);
|
|
139
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
140
|
+
if (existsSync(path))
|
|
141
|
+
throw new Error(`${label} path collision`);
|
|
142
|
+
writeJsonAtomic(path, record);
|
|
143
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
144
|
+
const stored = parseTicketWorktreeRecord(readJsonFileNoFollow(path), path);
|
|
145
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
146
|
+
assertRecordsEqual(stored, record, `stored ${label} does not match input`);
|
|
147
|
+
}
|
|
148
|
+
function readRequiredRecord(path, recordsRootIdentity, label) {
|
|
149
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
150
|
+
if (!existsSync(path))
|
|
151
|
+
throw new Error(`${label} is missing`);
|
|
152
|
+
const record = parseTicketWorktreeRecord(readJsonFileNoFollow(path), path);
|
|
153
|
+
validateDirectoryIdentity(recordsRootIdentity, "worktree records root");
|
|
154
|
+
return record;
|
|
155
|
+
}
|
|
156
|
+
function assertRecordsEqual(left, right, message) {
|
|
157
|
+
if (JSON.stringify(left) !== JSON.stringify(right))
|
|
158
|
+
throw new Error(message);
|
|
159
|
+
}
|
|
160
|
+
export function parseTicketWorktreeRecord(value, label = "worktree record") {
|
|
161
|
+
if (!isRecord(value))
|
|
162
|
+
throw new Error(`${label} must be an object`);
|
|
163
|
+
const expectedKeys = new Set([
|
|
164
|
+
"schema_version",
|
|
165
|
+
"ticket_id",
|
|
166
|
+
"repository_root",
|
|
167
|
+
"worktree_root",
|
|
168
|
+
"branch",
|
|
169
|
+
"requested_base",
|
|
170
|
+
"base_commit",
|
|
171
|
+
"create_nonce",
|
|
172
|
+
]);
|
|
173
|
+
for (const key of Object.keys(value)) {
|
|
174
|
+
if (!expectedKeys.has(key))
|
|
175
|
+
throw new Error(`${label} has unexpected property: ${key}`);
|
|
176
|
+
}
|
|
177
|
+
if (value.schema_version !== 1)
|
|
178
|
+
throw new Error(`${label} schema_version must be 1`);
|
|
179
|
+
if (typeof value.repository_root !== "string" || typeof value.worktree_root !== "string") {
|
|
180
|
+
throw new Error(`${label} paths must be strings`);
|
|
181
|
+
}
|
|
182
|
+
if (!isAbsolute(value.repository_root)
|
|
183
|
+
|| !isAbsolute(value.worktree_root)
|
|
184
|
+
|| normalize(value.repository_root) !== value.repository_root
|
|
185
|
+
|| normalize(value.worktree_root) !== value.worktree_root) {
|
|
186
|
+
throw new Error(`${label} paths must be normalized absolute paths`);
|
|
187
|
+
}
|
|
188
|
+
if (typeof value.branch !== "string")
|
|
189
|
+
throw new Error(`${label} branch must be a string`);
|
|
190
|
+
const requestedBase = validateBaseRef(value.requested_base);
|
|
191
|
+
if (typeof value.base_commit !== "string" || !COMMIT_PATTERN.test(value.base_commit)) {
|
|
192
|
+
throw new Error(`${label} base_commit is invalid`);
|
|
193
|
+
}
|
|
194
|
+
const ticketId = assertOpaqueId(value.ticket_id, "worktree record ticket id");
|
|
195
|
+
const record = {
|
|
196
|
+
schema_version: 1,
|
|
197
|
+
ticket_id: ticketId,
|
|
198
|
+
repository_root: value.repository_root,
|
|
199
|
+
worktree_root: value.worktree_root,
|
|
200
|
+
branch: value.branch,
|
|
201
|
+
requested_base: requestedBase,
|
|
202
|
+
base_commit: value.base_commit,
|
|
203
|
+
create_nonce: assertTransitionNonce(value.create_nonce, "worktree record create nonce"),
|
|
204
|
+
};
|
|
205
|
+
if (record.branch !== `oms-ticket-${ticketId}`)
|
|
206
|
+
throw new Error(`${label} branch does not match ticket id`);
|
|
207
|
+
if (record.worktree_root !== join(dirname(record.worktree_root), ticketId)) {
|
|
208
|
+
throw new Error(`${label} path does not match ticket id`);
|
|
209
|
+
}
|
|
210
|
+
return record;
|
|
211
|
+
}
|
|
212
|
+
function assertReplayMatches(record, expected) {
|
|
213
|
+
if (record.ticket_id !== expected.ticketId
|
|
214
|
+
|| record.repository_root !== expected.repositoryRoot
|
|
215
|
+
|| record.worktree_root !== expected.worktreeRoot
|
|
216
|
+
|| record.branch !== expected.branch
|
|
217
|
+
|| record.requested_base !== expected.requestedBase
|
|
218
|
+
|| record.create_nonce !== expected.transitionNonce) {
|
|
219
|
+
throw new Error(`worktree replay does not match the committed record: ${expected.ticketId}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function validateBaseRef(value) {
|
|
223
|
+
if (typeof value !== "string" || !BASE_REF_PATTERN.test(value) || value.includes("..")) {
|
|
224
|
+
throw new Error("invalid worktree base ref");
|
|
225
|
+
}
|
|
226
|
+
return value;
|
|
227
|
+
}
|
|
228
|
+
function resolveCommit(repositoryRoot, baseRef, env, runner) {
|
|
229
|
+
const result = runGit(repositoryRoot, ["rev-parse", "--verify", "--end-of-options", `${baseRef}^{commit}`], env, runner, "git base commit resolution");
|
|
230
|
+
const commit = result.stdout.trim();
|
|
231
|
+
if (!COMMIT_PATTERN.test(commit))
|
|
232
|
+
throw new Error("git base commit resolution returned an invalid commit");
|
|
233
|
+
return commit;
|
|
234
|
+
}
|
|
235
|
+
function assertRepositoryRoot(repositoryRoot, env, runner) {
|
|
236
|
+
const result = runGit(repositoryRoot, ["rev-parse", "--show-toplevel"], env, runner, "git repository probe");
|
|
237
|
+
const reported = result.stdout.trim();
|
|
238
|
+
if (!reported || realpathSync.native(reported) !== repositoryRoot) {
|
|
239
|
+
throw new Error("repository root does not match git top level");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function assertBranchAbsent(repositoryRoot, branch, env, runner) {
|
|
243
|
+
const request = gitRequest(repositoryRoot, ["show-ref", "--verify", "--quiet", `refs/heads/${branch}`], env);
|
|
244
|
+
const result = runner(request);
|
|
245
|
+
if (result.error)
|
|
246
|
+
throw new Error("git branch collision probe failed to start");
|
|
247
|
+
if (result.status === 0)
|
|
248
|
+
throw new Error(`worktree branch collision without a matching record: ${branch}`);
|
|
249
|
+
if (result.status !== 1)
|
|
250
|
+
throw new Error(`git branch collision probe exited ${result.status ?? "without status"}`);
|
|
251
|
+
}
|
|
252
|
+
function assertMaterializedWorktree(record, env, runner, requireBaseCommit = false) {
|
|
253
|
+
const root = validateExistingDirectory(record.worktree_root, "ticket worktree");
|
|
254
|
+
if (root !== record.worktree_root)
|
|
255
|
+
throw new Error("ticket worktree path changed after creation");
|
|
256
|
+
const result = runGit(root, ["rev-parse", "--path-format=absolute", "--show-toplevel", "--git-common-dir", "--abbrev-ref", "HEAD"], env, runner, "git worktree validation");
|
|
257
|
+
const [reportedRoot, commonGitDirectory, branch, ...extra] = result.stdout.trim().split(/\r?\n/);
|
|
258
|
+
if (!reportedRoot || !commonGitDirectory || !branch || extra.length > 0) {
|
|
259
|
+
throw new Error("git worktree validation returned invalid output");
|
|
260
|
+
}
|
|
261
|
+
if (realpathSync.native(reportedRoot) !== record.worktree_root)
|
|
262
|
+
throw new Error("git worktree root mismatch");
|
|
263
|
+
const repositoryCommonDirectory = runGit(record.repository_root, ["rev-parse", "--path-format=absolute", "--git-common-dir"], env, runner, "git common directory probe").stdout.trim();
|
|
264
|
+
if (realpathSync.native(commonGitDirectory) !== realpathSync.native(repositoryCommonDirectory)) {
|
|
265
|
+
throw new Error("ticket worktree belongs to a different repository");
|
|
266
|
+
}
|
|
267
|
+
if (branch !== record.branch)
|
|
268
|
+
throw new Error("ticket worktree branch mismatch");
|
|
269
|
+
const head = runGit(root, ["rev-parse", "--verify", "HEAD^{commit}"], env, runner, "git worktree HEAD probe").stdout.trim();
|
|
270
|
+
if (!COMMIT_PATTERN.test(head))
|
|
271
|
+
throw new Error("ticket worktree HEAD is invalid");
|
|
272
|
+
if (requireBaseCommit && head !== record.base_commit)
|
|
273
|
+
throw new Error("ticket worktree did not start at the frozen base commit");
|
|
274
|
+
}
|
|
275
|
+
function runGit(cwd, args, env, runner, label) {
|
|
276
|
+
const result = runner(gitRequest(cwd, args, env));
|
|
277
|
+
if (result.error)
|
|
278
|
+
throw new Error(`${label} failed to start`);
|
|
279
|
+
if (result.status !== 0)
|
|
280
|
+
throw new Error(`${label} exited ${result.status ?? "without status"}`);
|
|
281
|
+
return result;
|
|
282
|
+
}
|
|
283
|
+
function gitRequest(cwd, args, env) {
|
|
284
|
+
return {
|
|
285
|
+
command: "git",
|
|
286
|
+
args,
|
|
287
|
+
cwd,
|
|
288
|
+
env,
|
|
289
|
+
timeoutMs: GIT_TIMEOUT_MS,
|
|
290
|
+
maxBufferBytes: GIT_MAX_BUFFER_BYTES,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function safeGitEnvironment(source) {
|
|
294
|
+
const env = {};
|
|
295
|
+
for (const key of ["PATH", "HOME", "TMPDIR", "TMP", "TEMP", "LANG", "LC_ALL", "SYSTEMROOT"]) {
|
|
296
|
+
if (source[key] !== undefined)
|
|
297
|
+
env[key] = source[key];
|
|
298
|
+
}
|
|
299
|
+
env.GIT_TERMINAL_PROMPT = "0";
|
|
300
|
+
env.GIT_CONFIG_NOSYSTEM = "1";
|
|
301
|
+
env.GIT_CONFIG_GLOBAL = "/dev/null";
|
|
302
|
+
return env;
|
|
303
|
+
}
|
|
304
|
+
function captureDirectoryIdentity(path) {
|
|
305
|
+
const entry = lstatSync(path);
|
|
306
|
+
return { path, device: entry.dev, inode: entry.ino };
|
|
307
|
+
}
|
|
308
|
+
function validateDirectoryIdentity(expected, label) {
|
|
309
|
+
const path = validateExistingDirectory(expected.path, label);
|
|
310
|
+
const entry = lstatSync(path);
|
|
311
|
+
if (path !== expected.path || entry.dev !== expected.device || entry.ino !== expected.inode) {
|
|
312
|
+
throw new Error(`${label} changed`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/worktrees/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,C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AAC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,KAAK,EAAE,CAAC;QAC5F,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;IACtC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## System boundary
|
|
4
|
+
|
|
5
|
+
OMS is a TypeScript-first coordinator around supported local CLI workflows. It
|
|
6
|
+
does not proxy model traffic, emulate a model API, or keep a custom long-running
|
|
7
|
+
daemon. Native CLI sessions, goals, hooks, and subagents remain the execution
|
|
8
|
+
primitives. OMS supplies validated local authorities, immutable evidence,
|
|
9
|
+
idempotent event handling, and operator-facing plans around those primitives.
|
|
10
|
+
|
|
11
|
+
The executable control plane is local and durable, not a daemon: a human starts
|
|
12
|
+
the read-only conductor, and accepted dispatches may start policy-eligible
|
|
13
|
+
interactive worker panes through OMS. Exact user schedules are explicitly
|
|
14
|
+
managed without an OMS daemon, Slack stops at request intent, and every merge remains on human
|
|
15
|
+
hold. No shipped test or artifact proves a live GitHub ticket or an elapsed
|
|
16
|
+
12h/24h canary.
|
|
17
|
+
|
|
18
|
+
All runtime automation is TypeScript. The repository contains no tracked shell
|
|
19
|
+
automation scripts; the extensionless `bin/oms` file is a Node.js compatibility
|
|
20
|
+
shim for a source checkout.
|
|
21
|
+
|
|
22
|
+
## Sources of truth
|
|
23
|
+
|
|
24
|
+
Each field has exactly one authoritative owner:
|
|
25
|
+
|
|
26
|
+
| Concern | Authority |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Agent policy and roster | tracked `.agents/` files |
|
|
29
|
+
| Project defaults | tracked `.agents/config/oms-config.json` and endurance policy |
|
|
30
|
+
| Ticket content | immutable materialized file below `OMS_STATE_ROOT` |
|
|
31
|
+
| Ticket lifecycle and lease | one canonical versioned queue record per ticket |
|
|
32
|
+
| Session lifecycle | canonical session registry record |
|
|
33
|
+
| Quota freshness | hook-derived quota observation bound to a canonical session version |
|
|
34
|
+
| Events and delivery | immutable typed outbox event plus per-consumer receipt |
|
|
35
|
+
| Audit run | immutable manifest plus append-safe audit ledger |
|
|
36
|
+
| Conductor route | immutable opaque decision file |
|
|
37
|
+
| Goal lifecycle status | one canonical OMS goal record; native goal state is immutable checkpoint evidence |
|
|
38
|
+
| Pre-dispatch advice | canonical intent digest plus immutable protected advisor evidence and operation record |
|
|
39
|
+
| Verification and trust | deterministic evidence and ticket-bound immutable trust records |
|
|
40
|
+
| User schedule | exact generated plan plus user-scoped installation record |
|
|
41
|
+
| Release status | negative-only tracked release assessment |
|
|
42
|
+
|
|
43
|
+
Cached views must be reconstructible and must not compete with these
|
|
44
|
+
authorities. Native goal state, Team state, HUD state, and reports are projections or evidence only.
|
|
45
|
+
A leader may checkpoint a fresh native goal snapshot into evidence, but a mismatch with the canonical OMS goal record parks the goal and blocks mutation until explicit reconciliation.
|
|
46
|
+
|
|
47
|
+
## Runtime root
|
|
48
|
+
|
|
49
|
+
The CLI keeps three paths separate: its read-only package root, the caller's
|
|
50
|
+
workspace root, and `OMS_STATE_ROOT`. The state root is resolved once to an
|
|
51
|
+
explicit absolute path and passed to every worktree and generated service job.
|
|
52
|
+
`state.json` binds that root to one canonical workspace, so another checkout
|
|
53
|
+
cannot reuse its events, conductor, or authorities. Runtime state never depends
|
|
54
|
+
on the package installation directory.
|
|
55
|
+
|
|
56
|
+
For a single-checkout smoke run, the CLI defaults to the caller workspace's
|
|
57
|
+
ignored `.oms/` directory. Any multi-worktree or resumed run should set one
|
|
58
|
+
explicit absolute `OMS_STATE_ROOT`. Initialization rejects the filesystem root,
|
|
59
|
+
home directory, and workspace root. Read-only status surfaces do not initialize
|
|
60
|
+
a missing root.
|
|
61
|
+
|
|
62
|
+
Interactive bare `oms` starts the conductor. When `OMS_STATE_ROOT` is absent, it
|
|
63
|
+
may reuse the single valid repository-authorized state root found at `.oms/` or
|
|
64
|
+
one immediate child; zero matches use `.oms/`, while multiple matches fail
|
|
65
|
+
closed. Discovery itself never creates live-delivery authorization. When either
|
|
66
|
+
required authority is absent, bare `oms` performs the one-time human terminal
|
|
67
|
+
confirmation before initialization or provider contact; it never widens a
|
|
68
|
+
running conductor.
|
|
69
|
+
|
|
70
|
+
Bare startup recognizes a workspace only when it contains the exact tracked OMS
|
|
71
|
+
configuration and a non-symbolic Git marker. If the current directory is not
|
|
72
|
+
such a workspace, a source-linked installation uses its OMS Git checkout. A
|
|
73
|
+
generic `.agents/` directory is never a workspace marker; if neither location
|
|
74
|
+
is valid, startup fails before state initialization or provider contact.
|
|
75
|
+
|
|
76
|
+
The initialized runtime tree includes private directories for:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
$OMS_STATE_ROOT/
|
|
80
|
+
locks/ queue/ tickets/
|
|
81
|
+
worktrees/ worktree-records/ trace-operations/
|
|
82
|
+
sessions/ quota/ workers/
|
|
83
|
+
conductor-{activity,notifications,waiters}/ outbox/{events,receipts}/
|
|
84
|
+
audit/ run-manifests/ run-decisions/
|
|
85
|
+
run-start-intents/ run-completion-proofs/ run-aborts/
|
|
86
|
+
goals/ goal-artifacts/ team-plans/
|
|
87
|
+
service-plans/ schedule-installations/ evidence/ tmp/
|
|
88
|
+
live-contacts/ review-deliveries/ review-proofs/ secret-scan/
|
|
89
|
+
dispatch-advice/ codex-structured-results/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Tracked configuration contains no secrets. Runtime records use restrictive
|
|
93
|
+
permissions and reject unsafe path, symlink, authority-copy, version, and schema
|
|
94
|
+
conditions at their mutation boundaries.
|
|
95
|
+
|
|
96
|
+
## Ticket lifecycle and local tracer
|
|
97
|
+
|
|
98
|
+
The implemented queue states are:
|
|
99
|
+
|
|
100
|
+
```text
|
|
101
|
+
pending -> leased -> running -> verifying -> completed
|
|
102
|
+
| | |
|
|
103
|
+
+------> retryable <---+
|
|
104
|
+
+------> parked
|
|
105
|
+
+------> blocked
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Legal edges are enforced by the lifecycle service rather than inferred from a
|
|
109
|
+
diagram. Every mutation supplies the opaque ticket ID, expected version, state,
|
|
110
|
+
attempt, actor, operation nonce, and lease token when ownership is required.
|
|
111
|
+
Replaying an accepted operation returns the existing outcome; stale or
|
|
112
|
+
conflicting authority fails closed. The attempt budget is bounded.
|
|
113
|
+
|
|
114
|
+
The one-ticket tracer composes ticket materialization, a dedicated git
|
|
115
|
+
worktree, executor result, deterministic verification, and supplemental grader
|
|
116
|
+
evidence. Its shipped fixture uses a local no-op executor and grader, performs
|
|
117
|
+
no network or provider call, changes no tracked source, and is non-certifying.
|
|
118
|
+
A successful fixture remains `verifying`; only the protected live result gate
|
|
119
|
+
can complete a ticket. Passing the fixture is not evidence of a live ticket or
|
|
120
|
+
provider run.
|
|
121
|
+
|
|
122
|
+
GitHub Issues supply untrusted ticket intent only. The named queue probe first
|
|
123
|
+
persists and emits a contact/spend disclosure and requires explicit
|
|
124
|
+
confirmation before invoking `gh`. Queue lifecycle authority stays local; sync
|
|
125
|
+
cannot overwrite active execution state.
|
|
126
|
+
|
|
127
|
+
Normal GitHub sync is projection-only: it materializes open `oms:ready` issues
|
|
128
|
+
as pending tickets and assigns an opaque conductor notification. It never
|
|
129
|
+
freezes the plan, creates a worktree, leases a ticket, or selects a route.
|
|
130
|
+
After a persisted human goal, the conductor selects one exact ticket version
|
|
131
|
+
and calls `prepare_dispatch`. OMS first writes an immutable request journal,
|
|
132
|
+
then freezes the plan, creates or replays the `oms-ticket-*` worktree from
|
|
133
|
+
`main`, leases the ticket, validates the server-derived intent, and writes its
|
|
134
|
+
immutable result. Exact replay can recover a crash between those writes;
|
|
135
|
+
changed or stale requests fail before advice.
|
|
136
|
+
|
|
137
|
+
## Pre-dispatch advice boundary
|
|
138
|
+
|
|
139
|
+
The conductor passes the exact intent returned by `mcp__oms__prepare_dispatch`
|
|
140
|
+
through `mcp__oms__advise_dispatch`. OMS re-reads current goal, ticket, lease, role,
|
|
141
|
+
policy, budget, and worktree authority, canonicalizes every executor-affecting
|
|
142
|
+
field including the operation nonce, and computes the intent SHA-256.
|
|
143
|
+
|
|
144
|
+
Before contacting Codex, OMS requires the separate human-confirmed
|
|
145
|
+
pre-dispatch-advice authorization, writes the live-contact disclosure, and
|
|
146
|
+
records a `prepared -> contacting` operation. A fresh schema-bound Codex exec
|
|
147
|
+
may return only the intent digest, `approve | revise | veto`, summary,
|
|
148
|
+
recommendations, and risks. OMS—not the model—adds provider request, fresh
|
|
149
|
+
session, contact, and authorization identities and writes protected immutable
|
|
150
|
+
advisor evidence. The contacting record also stores the owning OMS Linux
|
|
151
|
+
process identity (PID, boot ID, and process start ticks). Another OMS process
|
|
152
|
+
leaves a live owner untouched; a dead, restarted, or PID-reused owner makes the
|
|
153
|
+
contact ambiguous, blocks the operation, and never launches a second provider
|
|
154
|
+
session. While one intent is prepared or contacting, another intent for the
|
|
155
|
+
same ticket attempt and lease is rejected before provider contact.
|
|
156
|
+
|
|
157
|
+
`mcp__oms__propose_dispatch` then recomputes the exact intent digest and accepts
|
|
158
|
+
only an `approve` evidence reference for that unchanged ticket and digest before
|
|
159
|
+
creating a dispatch, worker reservation, or delivery event. Worker delivery
|
|
160
|
+
independently revalidates the same evidence before any provider probe or pane
|
|
161
|
+
creation. A veto is terminal for that ticket attempt and lease. A revision
|
|
162
|
+
requires a substantive canonical-intent change and fresh advice; changing only
|
|
163
|
+
the operation nonce cannot reopen advice. Missing, stale, tampered,
|
|
164
|
+
cross-ticket, veto, or revision evidence fails closed.
|
|
165
|
+
|
|
166
|
+
## Atomic records and immutable artifacts
|
|
167
|
+
|
|
168
|
+
Mutable records are protected by exclusive locks, schema validation, expected
|
|
169
|
+
versions, and same-filesystem atomic replacement. Append-style history uses
|
|
170
|
+
serialized, hash-linked records or immutable one-file-per-event artifacts.
|
|
171
|
+
Digest-addressed evidence is written once and a replay must match its original
|
|
172
|
+
bytes. Stable-directory checks and no-follow reads prevent a path or symlink
|
|
173
|
+
swap from silently changing the authority being read.
|
|
174
|
+
|
|
175
|
+
## Event, hook, session, and quota flow
|
|
176
|
+
|
|
177
|
+
The typed event bus accepts only registered event kinds and exact schema-valid
|
|
178
|
+
payloads. Immutable outbox events are processed per consumer through
|
|
179
|
+
idempotent receipts. The event set covers pinned provider observations, typed
|
|
180
|
+
GitHub changes, native-hook observations, schema-bound Claude grader/dreamer
|
|
181
|
+
completion, due ticket resumes, audit heartbeats, watchdog reports, and Slack
|
|
182
|
+
notification requests. A structured-role completion event carries only its
|
|
183
|
+
exact result-gate, dispatch, ticket, fresh-session, and result-digest bindings;
|
|
184
|
+
it has no grade/reflection content and no terminal authority.
|
|
185
|
+
Projection is serialized per structured request and recovery isolates failures,
|
|
186
|
+
so one malformed or live-locked request cannot prevent another waiting gate
|
|
187
|
+
from being repaired. A dead projector lock is recovered only for its exact
|
|
188
|
+
generation after its owner process is no longer alive. Already committed
|
|
189
|
+
outbox, notification, and worktree replays bypass mutation locks, keeping the
|
|
190
|
+
60-second polling path from growing lock history for unchanged state.
|
|
191
|
+
|
|
192
|
+
`hook ingest` reads one bounded JSON object from stdin. It computes its source
|
|
193
|
+
digest, publishes a typed event, and projects the event into canonical session,
|
|
194
|
+
quota, and ticket authorities. Session identity binds role, engine, mode, run,
|
|
195
|
+
ticket, native-session reference, pane ID, version, and lifecycle state. Live
|
|
196
|
+
quota gates can be created only from the canonical bus event and matching
|
|
197
|
+
session registry; stale, ambiguous, cross-policy, copied, or unrelated evidence
|
|
198
|
+
is rejected. A quota-parked ticket resumes only from newer, fresh availability
|
|
199
|
+
evidence for the same session.
|
|
200
|
+
|
|
201
|
+
OMS injects only pinned, fixed-argument native hooks into the interactive Claude
|
|
202
|
+
and Codex launch settings. Hook JSON arrives on bounded stdin; raw prompt,
|
|
203
|
+
completion, quota, and GitHub content is discarded before event publication.
|
|
204
|
+
Each GitHub poll durably stages one validated snapshot batch before projection.
|
|
205
|
+
Restart recovery replays that exact generation before any refetch, advances the
|
|
206
|
+
watermark only after projection, and then removes the stage.
|
|
207
|
+
|
|
208
|
+
## Reconciliation and watchdog
|
|
209
|
+
|
|
210
|
+
The minute reconciler is a single idempotent pass. It:
|
|
211
|
+
|
|
212
|
+
- consumes pending resume and run-heartbeat events;
|
|
213
|
+
- emits due ticket-resume events using the original ticket authority;
|
|
214
|
+
- requires a current time or quota gate before resuming parked work;
|
|
215
|
+
- records an audit heartbeat against the expected hash-chain head;
|
|
216
|
+
- reports overdue, conflicting, failed, or superseded lanes without converting
|
|
217
|
+
them into success.
|
|
218
|
+
|
|
219
|
+
The watchdog is a separate recovery pass. It recovers expired ticket leases,
|
|
220
|
+
marks sessions stalled, reports stalled internal delivery, supersedes dead
|
|
221
|
+
waiters, repairs a persisted structured-role result whose completion event,
|
|
222
|
+
receipt, or notification was interrupted, and may resume the same conductor
|
|
223
|
+
without attaching. It sends only one opaque notice ID to a proven idle pane and
|
|
224
|
+
never interrupts `working` state or performs ordinary routing.
|
|
225
|
+
|
|
226
|
+
The tracked policy specifies a 60-second minute interval, a 15-minute watchdog
|
|
227
|
+
interval, a 15-minute session heartbeat horizon, and bounded quota freshness.
|
|
228
|
+
These policies and deterministic tests do not constitute elapsed endurance
|
|
229
|
+
evidence.
|
|
230
|
+
|
|
231
|
+
## Schedule boundary
|
|
232
|
+
|
|
233
|
+
`schedule generate|install|status|remove` manages one exact user schedule for
|
|
234
|
+
cron, systemd, or launchd. It contains only GitHub polling (60 seconds by
|
|
235
|
+
default) and recovery watchdog reconciliation (900 seconds). Installation is
|
|
236
|
+
user-scoped, fixed-argv, drift-detecting, idempotent, and recorded only after
|
|
237
|
+
native activation succeeds. Legacy digest-addressed service plans remain
|
|
238
|
+
internal evidence for non-certifying audit runs.
|
|
239
|
+
|
|
240
|
+
## Audit run and conductor boundary
|
|
241
|
+
|
|
242
|
+
`run start` first persists an immutable start intent, then freezes each admitted
|
|
243
|
+
ticket's ID, version, attempt, state, source digest, content digest, policy, and
|
|
244
|
+
verification gate together with the service plan, run kind (`until-empty`,
|
|
245
|
+
`12h`, or `24h`), workspace, and state root. A crash can replay that intent
|
|
246
|
+
without recapturing a changed queue. Every manifest fixes
|
|
247
|
+
`provider_started: false`, `manual_conductor_start_required: true`,
|
|
248
|
+
`certifying: false`, `release: not_stable`, and `merge_disposition: human_hold`.
|
|
249
|
+
It generates service files but neither installs them nor launches a provider.
|
|
250
|
+
|
|
251
|
+
`run tick` records a continuity observation, projects admitted ticket state, and
|
|
252
|
+
may complete an `until-empty` audit only after every admitted ticket has
|
|
253
|
+
deterministic and grader evidence. A new or drifted unresolved ticket produces
|
|
254
|
+
a human hold. Completion requires a digest-bound immutable proof. `run close`
|
|
255
|
+
applies the same proof gate to a fully elapsed same-boot 12h/24h audit; it does
|
|
256
|
+
not certify a canary. `run abort` records an immutable reason, while
|
|
257
|
+
`run recover-controller` is an exact-generation, dead-owner-only recovery for a
|
|
258
|
+
crashed global controller lock. `run status` is read-only and revalidates the
|
|
259
|
+
start intent, service artifacts, manifest/ledger binding, and any terminal
|
|
260
|
+
proof on every read.
|
|
261
|
+
|
|
262
|
+
`conductor next` reads the canonical run and queue, chooses the next legal
|
|
263
|
+
opaque route, and persists a decision containing IDs, versions, role IDs, and
|
|
264
|
+
evidence file paths. Raw ticket text is excluded. The decision can say that a
|
|
265
|
+
human start, native hook, resume wait, human hold, or empty queue is next. It
|
|
266
|
+
does not invoke Claude, Codex, tmux, or a shell.
|
|
267
|
+
|
|
268
|
+
The conductor's existing `process_result` tool is also the only review-delivery
|
|
269
|
+
entry point. A canonical completed result triggers pinned secret scanning,
|
|
270
|
+
fresh remote branch/draft-PR readback, one exact non-force push, and at most one draft
|
|
271
|
+
PR. Ambiguous push or PR outcomes recover by readback only. The delivery remains
|
|
272
|
+
waiting until existing typed PR/check events bind the exact verified commit;
|
|
273
|
+
then an immutable proof reports `READY_FOR_HUMAN`. No merge, ready-for-review,
|
|
274
|
+
tag, publish, release, or positive-stability operation exists.
|
|
275
|
+
|
|
276
|
+
## Goal, trust, and Team authorities
|
|
277
|
+
|
|
278
|
+
One canonical OMS goal record owns `active`, `parked`, or `completed` lifecycle
|
|
279
|
+
state. The CLI can create a goal from bounded JSON and read its status. Native
|
|
280
|
+
goal snapshots, Team checkpoints, Ultragoal checkpoints, and regression
|
|
281
|
+
requests are immutable evidence. Stale, inconsistent, or mismatched evidence
|
|
282
|
+
parks the goal; only matching terminal native and executor-group checkpoint
|
|
283
|
+
evidence can complete it through the internal authority API.
|
|
284
|
+
|
|
285
|
+
Trust runs require ticket, attempt, result, role-policy identity, and
|
|
286
|
+
verification-gate identity from one protected live deterministic verdict. OMS
|
|
287
|
+
ships that writer only inside the result gate: installed checks run with the
|
|
288
|
+
candidate worktree and isolated temp writable, OMS state and installed code
|
|
289
|
+
protected, and one fresh opposite-engine grade bound to its durable request and
|
|
290
|
+
session. The local trace fixture cannot create canonical trust evidence. Daily trust reports cover one closed UTC
|
|
291
|
+
interval and are review-only; their output grants no merge, queue, or execution
|
|
292
|
+
authority.
|
|
293
|
+
|
|
294
|
+
`team start --dispatch-id ID ...` writes one immutable executor-group manifest
|
|
295
|
+
over already accepted dispatches and sends every member through the same OMS
|
|
296
|
+
worker delivery path. The manifest contains no task text, provider command,
|
|
297
|
+
model choice, verifier lane, or release authority.
|
|
298
|
+
|
|
299
|
+
## HUD and release truth
|
|
300
|
+
|
|
301
|
+
The HUD reconstructs read-only counts from queue, session, quota, and outbox
|
|
302
|
+
authorities and always displays `release=not_stable`. It is not a dashboard
|
|
303
|
+
server and has no mutation authority.
|
|
304
|
+
|
|
305
|
+
`release status` is offline, read-only, and negative-only. Its schema can express
|
|
306
|
+
only `not_stable`, human hold, automatic merge disabled, and the canonical list
|
|
307
|
+
of unproven obligations: live GitHub ticket, elapsed 12h canary, fresh elapsed
|
|
308
|
+
24h canary, and executor-group evidence. There is no positive
|
|
309
|
+
release or automatic-merge parser in the shipped design.
|
|
310
|
+
|
|
311
|
+
## Verification boundary
|
|
312
|
+
|
|
313
|
+
`doctor` performs offline executable, version, JSON, path, permissions, git,
|
|
314
|
+
exact Gitleaks-version, and native verification-sandbox prerequisite checks. `oms verify` validates
|
|
315
|
+
shipped and workspace configuration plus the offline doctor. `make verify` runs
|
|
316
|
+
strict TypeScript typecheck, a clean TypeScript build, Vitest, and the installed
|
|
317
|
+
offline gate.
|
|
318
|
+
|
|
319
|
+
Pre-dispatch advice runs before execution. Deterministic project verification
|
|
320
|
+
runs after execution and before the supplemental grader; neither model advice
|
|
321
|
+
nor grading can override tests. Local tests do
|
|
322
|
+
not prove network access, provider authentication, billing policy, current
|
|
323
|
+
remote GitHub state, an actual provider session, or elapsed endurance.
|