@openrig/cli 0.1.11 → 0.2.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/daemon/assets/openrig-activity-hook-relay.cjs +104 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +14 -6
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +192 -60
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +5 -0
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +15 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +8 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +74 -5
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -6
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +322 -34
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/terminal-adapter.d.ts +2 -1
- package/daemon/dist/adapters/terminal-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/terminal-adapter.js +7 -1
- package/daemon/dist/adapters/terminal-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +53 -5
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/db/migrations/021_seat_handover_observability.d.ts +3 -0
- package/daemon/dist/db/migrations/021_seat_handover_observability.d.ts.map +1 -0
- package/daemon/dist/db/migrations/021_seat_handover_observability.js +11 -0
- package/daemon/dist/db/migrations/021_seat_handover_observability.js.map +1 -0
- package/daemon/dist/db/migrations/022_node_codex_config_profile.d.ts +3 -0
- package/daemon/dist/db/migrations/022_node_codex_config_profile.d.ts.map +1 -0
- package/daemon/dist/db/migrations/022_node_codex_config_profile.js +7 -0
- package/daemon/dist/db/migrations/022_node_codex_config_profile.js.map +1 -0
- package/daemon/dist/db/migrations/023_stream_items.d.ts +16 -0
- package/daemon/dist/db/migrations/023_stream_items.d.ts.map +1 -0
- package/daemon/dist/db/migrations/023_stream_items.js +37 -0
- package/daemon/dist/db/migrations/023_stream_items.js.map +1 -0
- package/daemon/dist/db/migrations/024_queue_items.d.ts +19 -0
- package/daemon/dist/db/migrations/024_queue_items.d.ts.map +1 -0
- package/daemon/dist/db/migrations/024_queue_items.js +52 -0
- package/daemon/dist/db/migrations/024_queue_items.js.map +1 -0
- package/daemon/dist/db/migrations/025_queue_transitions.d.ts +13 -0
- package/daemon/dist/db/migrations/025_queue_transitions.d.ts.map +1 -0
- package/daemon/dist/db/migrations/025_queue_transitions.js +28 -0
- package/daemon/dist/db/migrations/025_queue_transitions.js.map +1 -0
- package/daemon/dist/db/migrations/026_inbox_entries.d.ts +14 -0
- package/daemon/dist/db/migrations/026_inbox_entries.d.ts.map +1 -0
- package/daemon/dist/db/migrations/026_inbox_entries.js +35 -0
- package/daemon/dist/db/migrations/026_inbox_entries.js.map +1 -0
- package/daemon/dist/db/migrations/027_outbox_entries.d.ts +12 -0
- package/daemon/dist/db/migrations/027_outbox_entries.d.ts.map +1 -0
- package/daemon/dist/db/migrations/027_outbox_entries.js +30 -0
- package/daemon/dist/db/migrations/027_outbox_entries.js.map +1 -0
- package/daemon/dist/db/migrations/028_project_classifications.d.ts +26 -0
- package/daemon/dist/db/migrations/028_project_classifications.d.ts.map +1 -0
- package/daemon/dist/db/migrations/028_project_classifications.js +44 -0
- package/daemon/dist/db/migrations/028_project_classifications.js.map +1 -0
- package/daemon/dist/db/migrations/029_classifier_leases.d.ts +22 -0
- package/daemon/dist/db/migrations/029_classifier_leases.d.ts.map +1 -0
- package/daemon/dist/db/migrations/029_classifier_leases.js +41 -0
- package/daemon/dist/db/migrations/029_classifier_leases.js.map +1 -0
- package/daemon/dist/db/migrations/030_views_custom.d.ts +15 -0
- package/daemon/dist/db/migrations/030_views_custom.d.ts.map +1 -0
- package/daemon/dist/db/migrations/030_views_custom.js +27 -0
- package/daemon/dist/db/migrations/030_views_custom.js.map +1 -0
- package/daemon/dist/db/migrations/031_watchdog_jobs.d.ts +34 -0
- package/daemon/dist/db/migrations/031_watchdog_jobs.d.ts.map +1 -0
- package/daemon/dist/db/migrations/031_watchdog_jobs.js +59 -0
- package/daemon/dist/db/migrations/031_watchdog_jobs.js.map +1 -0
- package/daemon/dist/db/migrations/032_watchdog_history.d.ts +28 -0
- package/daemon/dist/db/migrations/032_watchdog_history.d.ts.map +1 -0
- package/daemon/dist/db/migrations/032_watchdog_history.js +46 -0
- package/daemon/dist/db/migrations/032_watchdog_history.js.map +1 -0
- package/daemon/dist/db/migrations/033_workflow_specs.d.ts +30 -0
- package/daemon/dist/db/migrations/033_workflow_specs.d.ts.map +1 -0
- package/daemon/dist/db/migrations/033_workflow_specs.js +50 -0
- package/daemon/dist/db/migrations/033_workflow_specs.js.map +1 -0
- package/daemon/dist/db/migrations/034_workflow_instances.d.ts +42 -0
- package/daemon/dist/db/migrations/034_workflow_instances.d.ts.map +1 -0
- package/daemon/dist/db/migrations/034_workflow_instances.js +63 -0
- package/daemon/dist/db/migrations/034_workflow_instances.js.map +1 -0
- package/daemon/dist/db/migrations/035_workflow_step_trails.d.ts +29 -0
- package/daemon/dist/db/migrations/035_workflow_step_trails.d.ts.map +1 -0
- package/daemon/dist/db/migrations/035_workflow_step_trails.js +48 -0
- package/daemon/dist/db/migrations/035_workflow_step_trails.js.map +1 -0
- package/daemon/dist/db/migrations/036_watchdog_policy_enum_extension.d.ts +35 -0
- package/daemon/dist/db/migrations/036_watchdog_policy_enum_extension.d.ts.map +1 -0
- package/daemon/dist/db/migrations/036_watchdog_policy_enum_extension.js +43 -0
- package/daemon/dist/db/migrations/036_watchdog_policy_enum_extension.js.map +1 -0
- package/daemon/dist/domain/agent-activity-store.d.ts +42 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -0
- package/daemon/dist/domain/agent-activity-store.js +177 -0
- package/daemon/dist/domain/agent-activity-store.js.map +1 -0
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +3 -0
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/agent-starter-resolver.d.ts +100 -0
- package/daemon/dist/domain/agent-starter-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/agent-starter-resolver.js +200 -0
- package/daemon/dist/domain/agent-starter-resolver.js.map +1 -0
- package/daemon/dist/domain/classifier-lease-manager.d.ts +130 -0
- package/daemon/dist/domain/classifier-lease-manager.d.ts.map +1 -0
- package/daemon/dist/domain/classifier-lease-manager.js +285 -0
- package/daemon/dist/domain/classifier-lease-manager.js.map +1 -0
- package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
- package/daemon/dist/domain/codex-thread-id.js +44 -15
- package/daemon/dist/domain/codex-thread-id.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +12 -7
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +51 -3
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/context-usage-store.d.ts +1 -1
- package/daemon/dist/domain/context-usage-store.js +1 -1
- package/daemon/dist/domain/context-usage-store.js.map +1 -1
- package/daemon/dist/domain/hot-potato-enforcer.d.ts +45 -0
- package/daemon/dist/domain/hot-potato-enforcer.d.ts.map +1 -0
- package/daemon/dist/domain/hot-potato-enforcer.js +94 -0
- package/daemon/dist/domain/hot-potato-enforcer.js.map +1 -0
- package/daemon/dist/domain/inbox-handler.d.ts +68 -0
- package/daemon/dist/domain/inbox-handler.d.ts.map +1 -0
- package/daemon/dist/domain/inbox-handler.js +177 -0
- package/daemon/dist/domain/inbox-handler.js.map +1 -0
- package/daemon/dist/domain/native-resume-probe.d.ts +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +89 -4
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +29 -1
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +208 -31
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +2 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +14 -2
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/outbox-handler.d.ts +48 -0
- package/daemon/dist/domain/outbox-handler.d.ts.map +1 -0
- package/daemon/dist/domain/outbox-handler.js +106 -0
- package/daemon/dist/domain/outbox-handler.js.map +1 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts +64 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.d.ts.map +1 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.js +226 -0
- package/daemon/dist/domain/policies/artifact-pool-helpers.js.map +1 -0
- package/daemon/dist/domain/policies/artifact-pool-ready.d.ts +3 -0
- package/daemon/dist/domain/policies/artifact-pool-ready.d.ts.map +1 -0
- package/daemon/dist/domain/policies/artifact-pool-ready.js +41 -0
- package/daemon/dist/domain/policies/artifact-pool-ready.js.map +1 -0
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts +3 -0
- package/daemon/dist/domain/policies/edge-artifact-required.d.ts.map +1 -0
- package/daemon/dist/domain/policies/edge-artifact-required.js +90 -0
- package/daemon/dist/domain/policies/edge-artifact-required.js.map +1 -0
- package/daemon/dist/domain/policies/periodic-reminder.d.ts +3 -0
- package/daemon/dist/domain/policies/periodic-reminder.d.ts.map +1 -0
- package/daemon/dist/domain/policies/periodic-reminder.js +30 -0
- package/daemon/dist/domain/policies/periodic-reminder.js.map +1 -0
- package/daemon/dist/domain/policies/types.d.ts +51 -0
- package/daemon/dist/domain/policies/types.d.ts.map +1 -0
- package/daemon/dist/domain/policies/types.js +9 -0
- package/daemon/dist/domain/policies/types.js.map +1 -0
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts +7 -0
- package/daemon/dist/domain/policies/workflow-keepalive.d.ts.map +1 -0
- package/daemon/dist/domain/policies/workflow-keepalive.js +123 -0
- package/daemon/dist/domain/policies/workflow-keepalive.js.map +1 -0
- package/daemon/dist/domain/project-classifier.d.ts +75 -0
- package/daemon/dist/domain/project-classifier.d.ts.map +1 -0
- package/daemon/dist/domain/project-classifier.js +132 -0
- package/daemon/dist/domain/project-classifier.js.map +1 -0
- package/daemon/dist/domain/projection-planner.d.ts +1 -0
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +3 -0
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +31 -0
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +38 -0
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +322 -0
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -0
- package/daemon/dist/domain/queue-repository.js +686 -0
- package/daemon/dist/domain/queue-repository.js.map +1 -0
- package/daemon/dist/domain/queue-transition-log.d.ts +38 -0
- package/daemon/dist/domain/queue-transition-log.d.ts.map +1 -0
- package/daemon/dist/domain/queue-transition-log.js +52 -0
- package/daemon/dist/domain/queue-transition-log.js.map +1 -0
- package/daemon/dist/domain/restore-check-service.d.ts +203 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -0
- package/daemon/dist/domain/restore-check-service.js +1047 -0
- package/daemon/dist/domain/restore-check-service.js.map +1 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts +50 -2
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +476 -24
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
- package/daemon/dist/domain/resume-metadata-refresher.js +27 -7
- package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +13 -0
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +17 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +63 -5
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +13 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +2 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +63 -1
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +196 -0
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +30 -1
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +14 -0
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-handover-planner.d.ts +84 -0
- package/daemon/dist/domain/seat-handover-planner.d.ts.map +1 -0
- package/daemon/dist/domain/seat-handover-planner.js +188 -0
- package/daemon/dist/domain/seat-handover-planner.js.map +1 -0
- package/daemon/dist/domain/seat-handover-service.d.ts +104 -0
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-handover-service.js +343 -0
- package/daemon/dist/domain/seat-handover-service.js.map +1 -0
- package/daemon/dist/domain/seat-status-service.d.ts +50 -0
- package/daemon/dist/domain/seat-status-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-status-service.js +66 -0
- package/daemon/dist/domain/seat-status-service.js.map +1 -0
- package/daemon/dist/domain/session-source-rebuild-resolver.d.ts +53 -0
- package/daemon/dist/domain/session-source-rebuild-resolver.d.ts.map +1 -0
- package/daemon/dist/domain/session-source-rebuild-resolver.js +59 -0
- package/daemon/dist/domain/session-source-rebuild-resolver.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts +30 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +322 -12
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-repository.d.ts +18 -0
- package/daemon/dist/domain/snapshot-repository.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-repository.js +77 -0
- package/daemon/dist/domain/snapshot-repository.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +27 -3
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +125 -40
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/stream-store.d.ts +56 -0
- package/daemon/dist/domain/stream-store.d.ts.map +1 -0
- package/daemon/dist/domain/stream-store.js +108 -0
- package/daemon/dist/domain/stream-store.js.map +1 -0
- package/daemon/dist/domain/transcript-redaction.d.ts +13 -0
- package/daemon/dist/domain/transcript-redaction.d.ts.map +1 -0
- package/daemon/dist/domain/transcript-redaction.js +34 -0
- package/daemon/dist/domain/transcript-redaction.js.map +1 -0
- package/daemon/dist/domain/transcript-store.d.ts +15 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +76 -1
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +323 -3
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/view-event-bridge.d.ts +12 -0
- package/daemon/dist/domain/view-event-bridge.d.ts.map +1 -0
- package/daemon/dist/domain/view-event-bridge.js +92 -0
- package/daemon/dist/domain/view-event-bridge.js.map +1 -0
- package/daemon/dist/domain/view-projector.d.ts +83 -0
- package/daemon/dist/domain/view-projector.d.ts.map +1 -0
- package/daemon/dist/domain/view-projector.js +296 -0
- package/daemon/dist/domain/view-projector.js.map +1 -0
- package/daemon/dist/domain/watchdog-history-log.d.ts +49 -0
- package/daemon/dist/domain/watchdog-history-log.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-history-log.js +67 -0
- package/daemon/dist/domain/watchdog-history-log.js.map +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +81 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js +164 -0
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +92 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-policy-engine.js +442 -0
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -0
- package/daemon/dist/domain/watchdog-scheduler.d.ts +76 -0
- package/daemon/dist/domain/watchdog-scheduler.d.ts.map +1 -0
- package/daemon/dist/domain/watchdog-scheduler.js +112 -0
- package/daemon/dist/domain/watchdog-scheduler.js.map +1 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts +46 -0
- package/daemon/dist/domain/workflow-instance-store.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-instance-store.js +116 -0
- package/daemon/dist/domain/workflow-instance-store.js.map +1 -0
- package/daemon/dist/domain/workflow-projector.d.ts +64 -0
- package/daemon/dist/domain/workflow-projector.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-projector.js +424 -0
- package/daemon/dist/domain/workflow-projector.js.map +1 -0
- package/daemon/dist/domain/workflow-runtime.d.ts +63 -0
- package/daemon/dist/domain/workflow-runtime.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-runtime.js +150 -0
- package/daemon/dist/domain/workflow-runtime.js.map +1 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts +35 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-spec-cache.js +171 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -0
- package/daemon/dist/domain/workflow-step-trail-log.d.ts +27 -0
- package/daemon/dist/domain/workflow-step-trail-log.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-step-trail-log.js +73 -0
- package/daemon/dist/domain/workflow-step-trail-log.js.map +1 -0
- package/daemon/dist/domain/workflow-types.d.ts +108 -0
- package/daemon/dist/domain/workflow-types.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-types.js +11 -0
- package/daemon/dist/domain/workflow-types.js.map +1 -0
- package/daemon/dist/domain/workflow-validator.d.ts +31 -0
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -0
- package/daemon/dist/domain/workflow-validator.js +115 -0
- package/daemon/dist/domain/workflow-validator.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +21 -2
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts +3 -0
- package/daemon/dist/routes/activity.d.ts.map +1 -0
- package/daemon/dist/routes/activity.js +47 -0
- package/daemon/dist/routes/activity.js.map +1 -0
- package/daemon/dist/routes/projects.d.ts +12 -0
- package/daemon/dist/routes/projects.d.ts.map +1 -0
- package/daemon/dist/routes/projects.js +178 -0
- package/daemon/dist/routes/projects.js.map +1 -0
- package/daemon/dist/routes/queue.d.ts +10 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -0
- package/daemon/dist/routes/queue.js +374 -0
- package/daemon/dist/routes/queue.js.map +1 -0
- package/daemon/dist/routes/restore-check.d.ts +3 -0
- package/daemon/dist/routes/restore-check.d.ts.map +1 -0
- package/daemon/dist/routes/restore-check.js +200 -0
- package/daemon/dist/routes/restore-check.js.map +1 -0
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +60 -4
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/seat.d.ts +3 -0
- package/daemon/dist/routes/seat.d.ts.map +1 -0
- package/daemon/dist/routes/seat.js +69 -0
- package/daemon/dist/routes/seat.js.map +1 -0
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +41 -5
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/snapshots.js +66 -17
- package/daemon/dist/routes/snapshots.js.map +1 -1
- package/daemon/dist/routes/stream.d.ts +9 -0
- package/daemon/dist/routes/stream.d.ts.map +1 -0
- package/daemon/dist/routes/stream.js +119 -0
- package/daemon/dist/routes/stream.js.map +1 -0
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +38 -0
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/routes/transport.d.ts.map +1 -1
- package/daemon/dist/routes/transport.js +21 -0
- package/daemon/dist/routes/transport.js.map +1 -1
- package/daemon/dist/routes/up.js +24 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/views.d.ts +13 -0
- package/daemon/dist/routes/views.d.ts.map +1 -0
- package/daemon/dist/routes/views.js +120 -0
- package/daemon/dist/routes/views.js.map +1 -0
- package/daemon/dist/routes/watchdog.d.ts +18 -0
- package/daemon/dist/routes/watchdog.d.ts.map +1 -0
- package/daemon/dist/routes/watchdog.js +148 -0
- package/daemon/dist/routes/watchdog.js.map +1 -0
- package/daemon/dist/routes/workflow.d.ts +20 -0
- package/daemon/dist/routes/workflow.d.ts.map +1 -0
- package/daemon/dist/routes/workflow.js +184 -0
- package/daemon/dist/routes/workflow.js.map +1 -0
- package/daemon/dist/server.d.ts +30 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +33 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +202 -8
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +12 -5
- package/daemon/docs/reference/agent-startup-guide.md +9 -9
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -1
- package/daemon/specs/agents/design/product-designer/agent.yaml +1 -1
- package/daemon/specs/agents/development/implementer/agent.yaml +1 -1
- package/daemon/specs/agents/development/qa/agent.yaml +1 -1
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +1 -1
- package/daemon/specs/agents/product-management/pm/agent.yaml +4 -0
- package/daemon/specs/agents/research/analyst/agent.yaml +1 -1
- package/daemon/specs/agents/research/synthesizer/agent.yaml +1 -1
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +1 -1
- package/daemon/specs/agents/shared/agent.yaml +17 -0
- package/daemon/specs/agents/shared/runtime/claude-mcp.fragment.json +12 -0
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +16 -0
- package/daemon/specs/agents/shared/runtime/codex-config.fragment.toml +5 -0
- package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +100 -0
- package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +110 -0
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +44 -1
- package/daemon/specs/agents/shared/skills/mental-model-ha/SKILL.md +3 -0
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +3 -0
- package/dist/commands/capture.d.ts +7 -1
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/capture.js +59 -1
- package/dist/commands/capture.js.map +1 -1
- package/dist/commands/compact-plan.d.ts +9 -0
- package/dist/commands/compact-plan.d.ts.map +1 -0
- package/dist/commands/compact-plan.js +354 -0
- package/dist/commands/compact-plan.js.map +1 -0
- package/dist/commands/context.d.ts +9 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +220 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +19 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/expand.d.ts.map +1 -1
- package/dist/commands/expand.js +15 -4
- package/dist/commands/expand.js.map +1 -1
- package/dist/commands/heartbeat.d.ts +99 -0
- package/dist/commands/heartbeat.d.ts.map +1 -0
- package/dist/commands/heartbeat.js +393 -0
- package/dist/commands/heartbeat.js.map +1 -0
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +2 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/preflight.js +1 -1
- package/dist/commands/preflight.js.map +1 -1
- package/dist/commands/project.d.ts +14 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +157 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/ps.d.ts +20 -3
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +455 -33
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +16 -0
- package/dist/commands/queue.d.ts.map +1 -0
- package/dist/commands/queue.js +401 -0
- package/dist/commands/queue.js.map +1 -0
- package/dist/commands/restore-check.d.ts +9 -0
- package/dist/commands/restore-check.d.ts.map +1 -0
- package/dist/commands/restore-check.js +234 -0
- package/dist/commands/restore-check.js.map +1 -0
- package/dist/commands/restore-packet.d.ts +9 -0
- package/dist/commands/restore-packet.d.ts.map +1 -0
- package/dist/commands/restore-packet.js +383 -0
- package/dist/commands/restore-packet.js.map +1 -0
- package/dist/commands/restore.d.ts.map +1 -1
- package/dist/commands/restore.js +69 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/seat.d.ts +5 -0
- package/dist/commands/seat.d.ts.map +1 -0
- package/dist/commands/seat.js +170 -0
- package/dist/commands/seat.js.map +1 -0
- package/dist/commands/send.d.ts +12 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +93 -5
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +20 -8
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/specs.d.ts.map +1 -1
- package/dist/commands/specs.js +99 -16
- package/dist/commands/specs.js.map +1 -1
- package/dist/commands/stream.d.ts +12 -0
- package/dist/commands/stream.d.ts.map +1 -0
- package/dist/commands/stream.js +111 -0
- package/dist/commands/stream.js.map +1 -0
- package/dist/commands/up.d.ts +1 -0
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +65 -4
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/view.d.ts +12 -0
- package/dist/commands/view.d.ts.map +1 -0
- package/dist/commands/view.js +82 -0
- package/dist/commands/view.js.map +1 -0
- package/dist/commands/watchdog.d.ts +15 -0
- package/dist/commands/watchdog.d.ts.map +1 -0
- package/dist/commands/watchdog.js +120 -0
- package/dist/commands/watchdog.js.map +1 -0
- package/dist/commands/whoami.d.ts +8 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +60 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/workflow.d.ts +17 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +138 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/cross-host-cli-helpers.d.ts +12 -0
- package/dist/cross-host-cli-helpers.d.ts.map +1 -0
- package/dist/cross-host-cli-helpers.js +48 -0
- package/dist/cross-host-cli-helpers.js.map +1 -0
- package/dist/cross-host-executor.d.ts +84 -0
- package/dist/cross-host-executor.d.ts.map +1 -0
- package/dist/cross-host-executor.js +138 -0
- package/dist/cross-host-executor.js.map +1 -0
- package/dist/host-registry.d.ts +50 -0
- package/dist/host-registry.d.ts.map +1 -0
- package/dist/host-registry.js +116 -0
- package/dist/host-registry.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +22 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/restore-packet/claude-transcript-parser.d.ts +12 -0
- package/dist/restore-packet/claude-transcript-parser.d.ts.map +1 -0
- package/dist/restore-packet/claude-transcript-parser.js +221 -0
- package/dist/restore-packet/claude-transcript-parser.js.map +1 -0
- package/dist/restore-packet/codex-jsonl-parser.d.ts +11 -0
- package/dist/restore-packet/codex-jsonl-parser.d.ts.map +1 -0
- package/dist/restore-packet/codex-jsonl-parser.js +159 -0
- package/dist/restore-packet/codex-jsonl-parser.js.map +1 -0
- package/dist/restore-packet/omitted-records.d.ts +60 -0
- package/dist/restore-packet/omitted-records.d.ts.map +1 -0
- package/dist/restore-packet/omitted-records.js +116 -0
- package/dist/restore-packet/omitted-records.js.map +1 -0
- package/dist/restore-packet/packet-writer.d.ts +59 -0
- package/dist/restore-packet/packet-writer.d.ts.map +1 -0
- package/dist/restore-packet/packet-writer.js +224 -0
- package/dist/restore-packet/packet-writer.js.map +1 -0
- package/dist/restore-packet/redaction.d.ts +30 -0
- package/dist/restore-packet/redaction.d.ts.map +1 -0
- package/dist/restore-packet/redaction.js +71 -0
- package/dist/restore-packet/redaction.js.map +1 -0
- package/dist/restore-packet/runtime-detect.d.ts +19 -0
- package/dist/restore-packet/runtime-detect.d.ts.map +1 -0
- package/dist/restore-packet/runtime-detect.js +81 -0
- package/dist/restore-packet/runtime-detect.js.map +1 -0
- package/dist/restore-packet/schema-validator.d.ts +13 -0
- package/dist/restore-packet/schema-validator.d.ts.map +1 -0
- package/dist/restore-packet/schema-validator.js +245 -0
- package/dist/restore-packet/schema-validator.js.map +1 -0
- package/dist/restore-packet/types.d.ts +76 -0
- package/dist/restore-packet/types.d.ts.map +1 -0
- package/dist/restore-packet/types.js +15 -0
- package/dist/restore-packet/types.js.map +1 -0
- package/dist/schemas/restore-summary.schema.json +98 -0
- package/dist/system-preflight.d.ts.map +1 -1
- package/dist/system-preflight.js +16 -5
- package/dist/system-preflight.js.map +1 -1
- package/dist/tmux-health.d.ts +16 -0
- package/dist/tmux-health.d.ts.map +1 -0
- package/dist/tmux-health.js +105 -0
- package/dist/tmux-health.js.map +1 -0
- package/package.json +10 -3
- package/scripts/check-abi.mjs +123 -0
- package/ui/dist/assets/{index-DlMH-REm.css → index-Dec25siz.css} +1 -1
- package/ui/dist/assets/{index-lEO-zBxz.js → index-GNYaWmBj.js} +9 -9
- package/ui/dist/index.html +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"029_classifier_leases.js","sourceRoot":"","sources":["../../../src/db/migrations/029_classifier_leases.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAc;IAC/C,IAAI,EAAE,2BAA2B;IACjC,GAAG,EAAE;;;;;;;;;;;;;;;;;GAiBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Custom views (PL-004 Phase B; L5 View — custom-view registration table).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § L5: built-in views (`recently-active`, `founder`, `pod-load`,
|
|
6
|
+
* `escalations`, `held`, `activity`) are HARDCODED in view-projector.ts.
|
|
7
|
+
* Operator-defined custom views are stored in this table and registered at
|
|
8
|
+
* daemon startup from `~/.openrig/views.yaml` (or via API at runtime).
|
|
9
|
+
*
|
|
10
|
+
* Built-in views are NOT inserted into this table — view-projector.ts
|
|
11
|
+
* exposes them by name without DB lookup. Custom views are looked up here
|
|
12
|
+
* when the operator queries `rig view show <custom-name>`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const viewsCustomSchema: Migration;
|
|
15
|
+
//# sourceMappingURL=030_views_custom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"030_views_custom.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/030_views_custom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAa/B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom views (PL-004 Phase B; L5 View — custom-view registration table).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § L5: built-in views (`recently-active`, `founder`, `pod-load`,
|
|
5
|
+
* `escalations`, `held`, `activity`) are HARDCODED in view-projector.ts.
|
|
6
|
+
* Operator-defined custom views are stored in this table and registered at
|
|
7
|
+
* daemon startup from `~/.openrig/views.yaml` (or via API at runtime).
|
|
8
|
+
*
|
|
9
|
+
* Built-in views are NOT inserted into this table — view-projector.ts
|
|
10
|
+
* exposes them by name without DB lookup. Custom views are looked up here
|
|
11
|
+
* when the operator queries `rig view show <custom-name>`.
|
|
12
|
+
*/
|
|
13
|
+
export const viewsCustomSchema = {
|
|
14
|
+
name: "030_views_custom.sql",
|
|
15
|
+
sql: `
|
|
16
|
+
CREATE TABLE IF NOT EXISTS views_custom (
|
|
17
|
+
view_id TEXT PRIMARY KEY,
|
|
18
|
+
view_name TEXT NOT NULL UNIQUE,
|
|
19
|
+
definition TEXT NOT NULL,
|
|
20
|
+
registered_by_session TEXT NOT NULL,
|
|
21
|
+
registered_at TEXT NOT NULL,
|
|
22
|
+
last_evaluated_at TEXT
|
|
23
|
+
);
|
|
24
|
+
CREATE INDEX IF NOT EXISTS idx_views_custom_registered_by ON views_custom(registered_by_session);
|
|
25
|
+
`,
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=030_views_custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"030_views_custom.js","sourceRoot":"","sources":["../../../src/db/migrations/030_views_custom.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAc;IAC1C,IAAI,EAAE,sBAAsB;IAC5B,GAAG,EAAE;;;;;;;;;;GAUJ;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Watchdog jobs (PL-004 Phase C; daemon-native Watchdog supervision tree).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § Watchdog + slice IMPL § Write Set: SQLite-canonical watchdog
|
|
6
|
+
* jobs that join the daemon supervision tree. Three policy enum values
|
|
7
|
+
* SHIPPED at Phase C v1: periodic-reminder, artifact-pool-ready,
|
|
8
|
+
* edge-artifact-required. The fourth POC policy (workflow-keepalive)
|
|
9
|
+
* ships in Phase D paired with workflow_instances; daemon registration
|
|
10
|
+
* MUST reject it with a structured deferred-to-phase-d error.
|
|
11
|
+
*
|
|
12
|
+
* State enum:
|
|
13
|
+
* active - scheduler is evaluating this job on its interval
|
|
14
|
+
* stopped - operator stopped the job; scheduler skips it
|
|
15
|
+
* terminal - policy declared the job complete (e.g., workflow finished)
|
|
16
|
+
*
|
|
17
|
+
* Cadence columns mirror POC engine semantics:
|
|
18
|
+
* - interval_seconds is the legacy / fallback cadence.
|
|
19
|
+
* - scan_interval_seconds overrides the scheduler isDue cadence
|
|
20
|
+
* (how often to run the policy at all).
|
|
21
|
+
* - active_wake_interval_seconds throttles re-delivery: when the
|
|
22
|
+
* pool stays continuously actionable, fire only every Nth scan.
|
|
23
|
+
*
|
|
24
|
+
* Active-wake state (R1 fix; POC parity for active-wake throttle):
|
|
25
|
+
* - actionable: 1 iff the most recent scan returned action=send.
|
|
26
|
+
* Used to detect newly-actionable transitions (no throttle on
|
|
27
|
+
* transition; throttle on continued actionable state).
|
|
28
|
+
* - last_actionable_at: first attempt time during the current
|
|
29
|
+
* actionable window. Cleared when the policy returns skip.
|
|
30
|
+
*
|
|
31
|
+
* spec_yaml preserves the original operator-supplied YAML for audit.
|
|
32
|
+
*/
|
|
33
|
+
export declare const watchdogJobsSchema: Migration;
|
|
34
|
+
//# sourceMappingURL=031_watchdog_jobs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"031_watchdog_jobs.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/031_watchdog_jobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,kBAAkB,EAAE,SA0BhC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watchdog jobs (PL-004 Phase C; daemon-native Watchdog supervision tree).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § Watchdog + slice IMPL § Write Set: SQLite-canonical watchdog
|
|
5
|
+
* jobs that join the daemon supervision tree. Three policy enum values
|
|
6
|
+
* SHIPPED at Phase C v1: periodic-reminder, artifact-pool-ready,
|
|
7
|
+
* edge-artifact-required. The fourth POC policy (workflow-keepalive)
|
|
8
|
+
* ships in Phase D paired with workflow_instances; daemon registration
|
|
9
|
+
* MUST reject it with a structured deferred-to-phase-d error.
|
|
10
|
+
*
|
|
11
|
+
* State enum:
|
|
12
|
+
* active - scheduler is evaluating this job on its interval
|
|
13
|
+
* stopped - operator stopped the job; scheduler skips it
|
|
14
|
+
* terminal - policy declared the job complete (e.g., workflow finished)
|
|
15
|
+
*
|
|
16
|
+
* Cadence columns mirror POC engine semantics:
|
|
17
|
+
* - interval_seconds is the legacy / fallback cadence.
|
|
18
|
+
* - scan_interval_seconds overrides the scheduler isDue cadence
|
|
19
|
+
* (how often to run the policy at all).
|
|
20
|
+
* - active_wake_interval_seconds throttles re-delivery: when the
|
|
21
|
+
* pool stays continuously actionable, fire only every Nth scan.
|
|
22
|
+
*
|
|
23
|
+
* Active-wake state (R1 fix; POC parity for active-wake throttle):
|
|
24
|
+
* - actionable: 1 iff the most recent scan returned action=send.
|
|
25
|
+
* Used to detect newly-actionable transitions (no throttle on
|
|
26
|
+
* transition; throttle on continued actionable state).
|
|
27
|
+
* - last_actionable_at: first attempt time during the current
|
|
28
|
+
* actionable window. Cleared when the policy returns skip.
|
|
29
|
+
*
|
|
30
|
+
* spec_yaml preserves the original operator-supplied YAML for audit.
|
|
31
|
+
*/
|
|
32
|
+
export const watchdogJobsSchema = {
|
|
33
|
+
name: "031_watchdog_jobs.sql",
|
|
34
|
+
sql: `
|
|
35
|
+
CREATE TABLE IF NOT EXISTS watchdog_jobs (
|
|
36
|
+
job_id TEXT PRIMARY KEY,
|
|
37
|
+
policy TEXT NOT NULL,
|
|
38
|
+
spec_yaml TEXT NOT NULL,
|
|
39
|
+
target_session TEXT NOT NULL,
|
|
40
|
+
interval_seconds INTEGER NOT NULL,
|
|
41
|
+
active_wake_interval_seconds INTEGER,
|
|
42
|
+
scan_interval_seconds INTEGER,
|
|
43
|
+
last_evaluation_at TEXT,
|
|
44
|
+
last_fire_at TEXT,
|
|
45
|
+
actionable INTEGER NOT NULL DEFAULT 0,
|
|
46
|
+
last_actionable_at TEXT,
|
|
47
|
+
state TEXT NOT NULL DEFAULT 'active',
|
|
48
|
+
registered_by_session TEXT NOT NULL,
|
|
49
|
+
registered_at TEXT NOT NULL,
|
|
50
|
+
terminal_reason TEXT
|
|
51
|
+
);
|
|
52
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_jobs_state ON watchdog_jobs(state);
|
|
53
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_jobs_policy ON watchdog_jobs(policy);
|
|
54
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_jobs_target_session ON watchdog_jobs(target_session);
|
|
55
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_jobs_active_next_eval
|
|
56
|
+
ON watchdog_jobs(last_evaluation_at) WHERE state = 'active';
|
|
57
|
+
`,
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=031_watchdog_jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"031_watchdog_jobs.js","sourceRoot":"","sources":["../../../src/db/migrations/031_watchdog_jobs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAc;IAC3C,IAAI,EAAE,uBAAuB;IAC7B,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;GAuBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Watchdog history (PL-004 Phase C; append-only audit log).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § Watchdog + slice IMPL § Guard Checkpoint Focus item 2:
|
|
6
|
+
* append-only history of meaningful watchdog events. Pure `not_due`
|
|
7
|
+
* polls are NOT recorded (matches POC; minimizes table size). Only
|
|
8
|
+
* `sent` (delivery executed), `skipped` (policy ran but skipped per
|
|
9
|
+
* its own logic — e.g., suppress_if_recent_success or
|
|
10
|
+
* no_actionable_artifacts), and `terminal` (policy declared job done)
|
|
11
|
+
* are recorded.
|
|
12
|
+
*
|
|
13
|
+
* Append-only contract: writers only INSERT. UPDATE/DELETE are not
|
|
14
|
+
* exposed by WatchdogHistoryLog API; direct SQL UPDATE/DELETE would
|
|
15
|
+
* succeed at the DB level (SQLite has no view/role layer) but is a
|
|
16
|
+
* contract violation enforced at the domain-layer API boundary.
|
|
17
|
+
*
|
|
18
|
+
* Outcome enum:
|
|
19
|
+
* sent - policy.evaluate() returned action=send and delivery executed
|
|
20
|
+
* skipped - policy.evaluate() returned action=skip (with reason)
|
|
21
|
+
* terminal - policy.evaluate() returned action=terminal (job declared done)
|
|
22
|
+
*
|
|
23
|
+
* FK to watchdog_jobs(job_id) for referential integrity. Indexes on
|
|
24
|
+
* (job_id, evaluated_at DESC) for "recent history for one job" queries
|
|
25
|
+
* and (outcome, evaluated_at DESC) for cross-job outcome queries.
|
|
26
|
+
*/
|
|
27
|
+
export declare const watchdogHistorySchema: Migration;
|
|
28
|
+
//# sourceMappingURL=032_watchdog_history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"032_watchdog_history.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/032_watchdog_history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAmBnC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watchdog history (PL-004 Phase C; append-only audit log).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § Watchdog + slice IMPL § Guard Checkpoint Focus item 2:
|
|
5
|
+
* append-only history of meaningful watchdog events. Pure `not_due`
|
|
6
|
+
* polls are NOT recorded (matches POC; minimizes table size). Only
|
|
7
|
+
* `sent` (delivery executed), `skipped` (policy ran but skipped per
|
|
8
|
+
* its own logic — e.g., suppress_if_recent_success or
|
|
9
|
+
* no_actionable_artifacts), and `terminal` (policy declared job done)
|
|
10
|
+
* are recorded.
|
|
11
|
+
*
|
|
12
|
+
* Append-only contract: writers only INSERT. UPDATE/DELETE are not
|
|
13
|
+
* exposed by WatchdogHistoryLog API; direct SQL UPDATE/DELETE would
|
|
14
|
+
* succeed at the DB level (SQLite has no view/role layer) but is a
|
|
15
|
+
* contract violation enforced at the domain-layer API boundary.
|
|
16
|
+
*
|
|
17
|
+
* Outcome enum:
|
|
18
|
+
* sent - policy.evaluate() returned action=send and delivery executed
|
|
19
|
+
* skipped - policy.evaluate() returned action=skip (with reason)
|
|
20
|
+
* terminal - policy.evaluate() returned action=terminal (job declared done)
|
|
21
|
+
*
|
|
22
|
+
* FK to watchdog_jobs(job_id) for referential integrity. Indexes on
|
|
23
|
+
* (job_id, evaluated_at DESC) for "recent history for one job" queries
|
|
24
|
+
* and (outcome, evaluated_at DESC) for cross-job outcome queries.
|
|
25
|
+
*/
|
|
26
|
+
export const watchdogHistorySchema = {
|
|
27
|
+
name: "032_watchdog_history.sql",
|
|
28
|
+
sql: `
|
|
29
|
+
CREATE TABLE IF NOT EXISTS watchdog_history (
|
|
30
|
+
history_id TEXT PRIMARY KEY,
|
|
31
|
+
job_id TEXT NOT NULL REFERENCES watchdog_jobs(job_id),
|
|
32
|
+
evaluated_at TEXT NOT NULL,
|
|
33
|
+
outcome TEXT NOT NULL,
|
|
34
|
+
skip_reason TEXT,
|
|
35
|
+
delivery_target_session TEXT,
|
|
36
|
+
delivery_status TEXT,
|
|
37
|
+
delivery_message TEXT,
|
|
38
|
+
evaluation_notes TEXT
|
|
39
|
+
);
|
|
40
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_history_job_recent
|
|
41
|
+
ON watchdog_history(job_id, evaluated_at DESC);
|
|
42
|
+
CREATE INDEX IF NOT EXISTS idx_watchdog_history_outcome_recent
|
|
43
|
+
ON watchdog_history(outcome, evaluated_at DESC);
|
|
44
|
+
`,
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=032_watchdog_history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"032_watchdog_history.js","sourceRoot":"","sources":["../../../src/db/migrations/032_watchdog_history.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAc;IAC9C,IAAI,EAAE,0BAA0B;IAChC,GAAG,EAAE;;;;;;;;;;;;;;;;GAgBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow specs (PL-004 Phase D; daemon-native Workflow Runtime).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § L4 Workflow Runtime: workflow specs are markdown/YAML
|
|
6
|
+
* authoritative — the daemon caches a read-through copy here so that
|
|
7
|
+
* lookups are fast and instances can resolve the spec at runtime
|
|
8
|
+
* even if the source file moves. source_hash invalidates the cache
|
|
9
|
+
* on next read; valid operator edits to the spec file win
|
|
10
|
+
* (workspace-surface reconciliation contract).
|
|
11
|
+
*
|
|
12
|
+
* Columns:
|
|
13
|
+
* - spec_id (ULID PK)
|
|
14
|
+
* - name (workflow.id from spec yaml)
|
|
15
|
+
* - version (workflow.version)
|
|
16
|
+
* - purpose (workflow.objective)
|
|
17
|
+
* - target_rig (workflow.target.rig)
|
|
18
|
+
* - roles_json (serialized roles[] map)
|
|
19
|
+
* - steps_json (serialized steps[] array)
|
|
20
|
+
* - coordination_terminal_turn_rule (default `hot_potato`)
|
|
21
|
+
* - source_path (markdown/yaml spec file path on disk)
|
|
22
|
+
* - source_hash (content hash for invalidation detection)
|
|
23
|
+
* - cached_at (ISO timestamp; latest read-through cache stamp)
|
|
24
|
+
*
|
|
25
|
+
* Unique constraint on (name, version) — a workflow spec at a given
|
|
26
|
+
* version is canonical; re-caching the same spec content updates
|
|
27
|
+
* cached_at + source_hash without inserting a duplicate row.
|
|
28
|
+
*/
|
|
29
|
+
export declare const workflowSpecsSchema: Migration;
|
|
30
|
+
//# sourceMappingURL=033_workflow_specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"033_workflow_specs.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/033_workflow_specs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAqBjC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow specs (PL-004 Phase D; daemon-native Workflow Runtime).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § L4 Workflow Runtime: workflow specs are markdown/YAML
|
|
5
|
+
* authoritative — the daemon caches a read-through copy here so that
|
|
6
|
+
* lookups are fast and instances can resolve the spec at runtime
|
|
7
|
+
* even if the source file moves. source_hash invalidates the cache
|
|
8
|
+
* on next read; valid operator edits to the spec file win
|
|
9
|
+
* (workspace-surface reconciliation contract).
|
|
10
|
+
*
|
|
11
|
+
* Columns:
|
|
12
|
+
* - spec_id (ULID PK)
|
|
13
|
+
* - name (workflow.id from spec yaml)
|
|
14
|
+
* - version (workflow.version)
|
|
15
|
+
* - purpose (workflow.objective)
|
|
16
|
+
* - target_rig (workflow.target.rig)
|
|
17
|
+
* - roles_json (serialized roles[] map)
|
|
18
|
+
* - steps_json (serialized steps[] array)
|
|
19
|
+
* - coordination_terminal_turn_rule (default `hot_potato`)
|
|
20
|
+
* - source_path (markdown/yaml spec file path on disk)
|
|
21
|
+
* - source_hash (content hash for invalidation detection)
|
|
22
|
+
* - cached_at (ISO timestamp; latest read-through cache stamp)
|
|
23
|
+
*
|
|
24
|
+
* Unique constraint on (name, version) — a workflow spec at a given
|
|
25
|
+
* version is canonical; re-caching the same spec content updates
|
|
26
|
+
* cached_at + source_hash without inserting a duplicate row.
|
|
27
|
+
*/
|
|
28
|
+
export const workflowSpecsSchema = {
|
|
29
|
+
name: "033_workflow_specs.sql",
|
|
30
|
+
sql: `
|
|
31
|
+
CREATE TABLE IF NOT EXISTS workflow_specs (
|
|
32
|
+
spec_id TEXT PRIMARY KEY,
|
|
33
|
+
name TEXT NOT NULL,
|
|
34
|
+
version TEXT NOT NULL,
|
|
35
|
+
purpose TEXT,
|
|
36
|
+
target_rig TEXT,
|
|
37
|
+
roles_json TEXT NOT NULL,
|
|
38
|
+
steps_json TEXT NOT NULL,
|
|
39
|
+
coordination_terminal_turn_rule TEXT NOT NULL DEFAULT 'hot_potato',
|
|
40
|
+
source_path TEXT NOT NULL,
|
|
41
|
+
source_hash TEXT NOT NULL,
|
|
42
|
+
cached_at TEXT NOT NULL
|
|
43
|
+
);
|
|
44
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_workflow_specs_name_version
|
|
45
|
+
ON workflow_specs(name, version);
|
|
46
|
+
CREATE INDEX IF NOT EXISTS idx_workflow_specs_target_rig
|
|
47
|
+
ON workflow_specs(target_rig);
|
|
48
|
+
`,
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=033_workflow_specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"033_workflow_specs.js","sourceRoot":"","sources":["../../../src/db/migrations/033_workflow_specs.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAc;IAC5C,IAAI,EAAE,wBAAwB;IAC9B,GAAG,EAAE;;;;;;;;;;;;;;;;;;GAkBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow instances (PL-004 Phase D; live workflow state).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § L4 Workflow Runtime: a workflow instance is a SQLite-canonical
|
|
6
|
+
* record of a running workflow. Survives daemon restart without
|
|
7
|
+
* filesystem reconciliation. The current_frontier_json column holds the
|
|
8
|
+
* array of qitem_ids that are the active step packets at any given time.
|
|
9
|
+
*
|
|
10
|
+
* R2 fix (guard blocker 1): durable current-step binding via
|
|
11
|
+
* `current_step_id`. Replaces trail-based "last_step + 1" inference,
|
|
12
|
+
* which produced wrong results for reused-frontier packets (e.g.,
|
|
13
|
+
* waiting → resume on same packet would skip a step). Mirrors POC
|
|
14
|
+
* which extracts step_id from the current packet binding rather than
|
|
15
|
+
* inferring from trail order. v1 supports a single active frontier
|
|
16
|
+
* packet; multi-frontier (parallel branches) is graduation and would
|
|
17
|
+
* need a packet→step map.
|
|
18
|
+
*
|
|
19
|
+
* Status enum (matches POC + PRD):
|
|
20
|
+
* - active: instance has at least one frontier packet in-flight
|
|
21
|
+
* - waiting: instance has a frontier packet blocked on an external gate
|
|
22
|
+
* - completed: terminal success state; current_frontier_json is []
|
|
23
|
+
* - failed: terminal failure state
|
|
24
|
+
*
|
|
25
|
+
* fallback_synthesis: nullable text recording the agent-judgment
|
|
26
|
+
* synthesis used when peer continuity relay was not available (closed
|
|
27
|
+
* but no successor identified). Optional audit context.
|
|
28
|
+
*
|
|
29
|
+
* hop_count: count of step transitions executed; PRD invariant
|
|
30
|
+
* `loop_guards.max_hops` is checked at projection time.
|
|
31
|
+
*
|
|
32
|
+
* last_continuation_decision_json: optional structured record of the
|
|
33
|
+
* most recent continuation/closure decision (the `handoff_decision`,
|
|
34
|
+
* `wait_decision`, or `close_decision` shape from the POC). Used for
|
|
35
|
+
* trace and debugging.
|
|
36
|
+
*
|
|
37
|
+
* Indexes:
|
|
38
|
+
* - (status, workflow_name) — fast "find active instances of workflow X"
|
|
39
|
+
* - (created_by_session, status) — fast "find my live workflows"
|
|
40
|
+
*/
|
|
41
|
+
export declare const workflowInstancesSchema: Migration;
|
|
42
|
+
//# sourceMappingURL=034_workflow_instances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"034_workflow_instances.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/034_workflow_instances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAsBrC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow instances (PL-004 Phase D; live workflow state).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § L4 Workflow Runtime: a workflow instance is a SQLite-canonical
|
|
5
|
+
* record of a running workflow. Survives daemon restart without
|
|
6
|
+
* filesystem reconciliation. The current_frontier_json column holds the
|
|
7
|
+
* array of qitem_ids that are the active step packets at any given time.
|
|
8
|
+
*
|
|
9
|
+
* R2 fix (guard blocker 1): durable current-step binding via
|
|
10
|
+
* `current_step_id`. Replaces trail-based "last_step + 1" inference,
|
|
11
|
+
* which produced wrong results for reused-frontier packets (e.g.,
|
|
12
|
+
* waiting → resume on same packet would skip a step). Mirrors POC
|
|
13
|
+
* which extracts step_id from the current packet binding rather than
|
|
14
|
+
* inferring from trail order. v1 supports a single active frontier
|
|
15
|
+
* packet; multi-frontier (parallel branches) is graduation and would
|
|
16
|
+
* need a packet→step map.
|
|
17
|
+
*
|
|
18
|
+
* Status enum (matches POC + PRD):
|
|
19
|
+
* - active: instance has at least one frontier packet in-flight
|
|
20
|
+
* - waiting: instance has a frontier packet blocked on an external gate
|
|
21
|
+
* - completed: terminal success state; current_frontier_json is []
|
|
22
|
+
* - failed: terminal failure state
|
|
23
|
+
*
|
|
24
|
+
* fallback_synthesis: nullable text recording the agent-judgment
|
|
25
|
+
* synthesis used when peer continuity relay was not available (closed
|
|
26
|
+
* but no successor identified). Optional audit context.
|
|
27
|
+
*
|
|
28
|
+
* hop_count: count of step transitions executed; PRD invariant
|
|
29
|
+
* `loop_guards.max_hops` is checked at projection time.
|
|
30
|
+
*
|
|
31
|
+
* last_continuation_decision_json: optional structured record of the
|
|
32
|
+
* most recent continuation/closure decision (the `handoff_decision`,
|
|
33
|
+
* `wait_decision`, or `close_decision` shape from the POC). Used for
|
|
34
|
+
* trace and debugging.
|
|
35
|
+
*
|
|
36
|
+
* Indexes:
|
|
37
|
+
* - (status, workflow_name) — fast "find active instances of workflow X"
|
|
38
|
+
* - (created_by_session, status) — fast "find my live workflows"
|
|
39
|
+
*/
|
|
40
|
+
export const workflowInstancesSchema = {
|
|
41
|
+
name: "034_workflow_instances.sql",
|
|
42
|
+
sql: `
|
|
43
|
+
CREATE TABLE IF NOT EXISTS workflow_instances (
|
|
44
|
+
instance_id TEXT PRIMARY KEY,
|
|
45
|
+
workflow_name TEXT NOT NULL,
|
|
46
|
+
workflow_version TEXT NOT NULL,
|
|
47
|
+
created_by_session TEXT NOT NULL,
|
|
48
|
+
created_at TEXT NOT NULL,
|
|
49
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
50
|
+
current_frontier_json TEXT NOT NULL DEFAULT '[]',
|
|
51
|
+
current_step_id TEXT,
|
|
52
|
+
hop_count INTEGER NOT NULL DEFAULT 0,
|
|
53
|
+
fallback_synthesis TEXT,
|
|
54
|
+
last_continuation_decision_json TEXT,
|
|
55
|
+
completed_at TEXT
|
|
56
|
+
);
|
|
57
|
+
CREATE INDEX IF NOT EXISTS idx_workflow_instances_status_name
|
|
58
|
+
ON workflow_instances(status, workflow_name);
|
|
59
|
+
CREATE INDEX IF NOT EXISTS idx_workflow_instances_creator_status
|
|
60
|
+
ON workflow_instances(created_by_session, status);
|
|
61
|
+
`,
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=034_workflow_instances.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"034_workflow_instances.js","sourceRoot":"","sources":["../../../src/db/migrations/034_workflow_instances.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAc;IAChD,IAAI,EAAE,4BAA4B;IAClC,GAAG,EAAE;;;;;;;;;;;;;;;;;;;GAmBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow step trails (PL-004 Phase D; append-only history).
|
|
4
|
+
*
|
|
5
|
+
* Per PRD § L4 Workflow Runtime: every workflow step transition records
|
|
6
|
+
* a trail entry. Append-only: writers only INSERT. UPDATE/DELETE are
|
|
7
|
+
* not exposed by WorkflowStepTrailLog API; direct SQL would succeed
|
|
8
|
+
* (SQLite has no view/role layer) but is a contract violation enforced
|
|
9
|
+
* at the domain-layer API boundary.
|
|
10
|
+
*
|
|
11
|
+
* Columns:
|
|
12
|
+
* - trail_id (ULID PK)
|
|
13
|
+
* - instance_id (FK to workflow_instances)
|
|
14
|
+
* - step_id (from spec; e.g., "produce", "review-convergence")
|
|
15
|
+
* - step_role (from spec; e.g., "producer", "orchestrator")
|
|
16
|
+
* - closed_at (ISO timestamp of the closure/transition)
|
|
17
|
+
* - closure_reason (enum: "handoff", "waiting", "done", "failed")
|
|
18
|
+
* - closure_evidence_json (operator-supplied evidence + system-derived
|
|
19
|
+
* audit context; JSON-encoded)
|
|
20
|
+
* - actor_session (the session that closed the packet — owner-as-author)
|
|
21
|
+
* - next_qitem_id (FK to queue_items; null on terminal closure)
|
|
22
|
+
* - prior_qitem_id (the closed packet; FK to queue_items)
|
|
23
|
+
*
|
|
24
|
+
* Indexes:
|
|
25
|
+
* - (instance_id, closed_at DESC) — fast "trail for one workflow instance"
|
|
26
|
+
* - (closed_at DESC) — global recent activity
|
|
27
|
+
*/
|
|
28
|
+
export declare const workflowStepTrailsSchema: Migration;
|
|
29
|
+
//# sourceMappingURL=035_workflow_step_trails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"035_workflow_step_trails.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/035_workflow_step_trails.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAoBtC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow step trails (PL-004 Phase D; append-only history).
|
|
3
|
+
*
|
|
4
|
+
* Per PRD § L4 Workflow Runtime: every workflow step transition records
|
|
5
|
+
* a trail entry. Append-only: writers only INSERT. UPDATE/DELETE are
|
|
6
|
+
* not exposed by WorkflowStepTrailLog API; direct SQL would succeed
|
|
7
|
+
* (SQLite has no view/role layer) but is a contract violation enforced
|
|
8
|
+
* at the domain-layer API boundary.
|
|
9
|
+
*
|
|
10
|
+
* Columns:
|
|
11
|
+
* - trail_id (ULID PK)
|
|
12
|
+
* - instance_id (FK to workflow_instances)
|
|
13
|
+
* - step_id (from spec; e.g., "produce", "review-convergence")
|
|
14
|
+
* - step_role (from spec; e.g., "producer", "orchestrator")
|
|
15
|
+
* - closed_at (ISO timestamp of the closure/transition)
|
|
16
|
+
* - closure_reason (enum: "handoff", "waiting", "done", "failed")
|
|
17
|
+
* - closure_evidence_json (operator-supplied evidence + system-derived
|
|
18
|
+
* audit context; JSON-encoded)
|
|
19
|
+
* - actor_session (the session that closed the packet — owner-as-author)
|
|
20
|
+
* - next_qitem_id (FK to queue_items; null on terminal closure)
|
|
21
|
+
* - prior_qitem_id (the closed packet; FK to queue_items)
|
|
22
|
+
*
|
|
23
|
+
* Indexes:
|
|
24
|
+
* - (instance_id, closed_at DESC) — fast "trail for one workflow instance"
|
|
25
|
+
* - (closed_at DESC) — global recent activity
|
|
26
|
+
*/
|
|
27
|
+
export const workflowStepTrailsSchema = {
|
|
28
|
+
name: "035_workflow_step_trails.sql",
|
|
29
|
+
sql: `
|
|
30
|
+
CREATE TABLE IF NOT EXISTS workflow_step_trails (
|
|
31
|
+
trail_id TEXT PRIMARY KEY,
|
|
32
|
+
instance_id TEXT NOT NULL REFERENCES workflow_instances(instance_id),
|
|
33
|
+
step_id TEXT NOT NULL,
|
|
34
|
+
step_role TEXT NOT NULL,
|
|
35
|
+
closed_at TEXT NOT NULL,
|
|
36
|
+
closure_reason TEXT NOT NULL,
|
|
37
|
+
closure_evidence_json TEXT,
|
|
38
|
+
actor_session TEXT NOT NULL,
|
|
39
|
+
next_qitem_id TEXT REFERENCES queue_items(qitem_id),
|
|
40
|
+
prior_qitem_id TEXT REFERENCES queue_items(qitem_id)
|
|
41
|
+
);
|
|
42
|
+
CREATE INDEX IF NOT EXISTS idx_workflow_step_trails_instance_recent
|
|
43
|
+
ON workflow_step_trails(instance_id, closed_at DESC);
|
|
44
|
+
CREATE INDEX IF NOT EXISTS idx_workflow_step_trails_recent
|
|
45
|
+
ON workflow_step_trails(closed_at DESC);
|
|
46
|
+
`,
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=035_workflow_step_trails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"035_workflow_step_trails.js","sourceRoot":"","sources":["../../../src/db/migrations/035_workflow_step_trails.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAc;IACjD,IAAI,EAAE,8BAA8B;IACpC,GAAG,EAAE;;;;;;;;;;;;;;;;;GAiBJ;CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Migration } from "../migrate.js";
|
|
2
|
+
/**
|
|
3
|
+
* Watchdog policy enum extension (PL-004 Phase D).
|
|
4
|
+
*
|
|
5
|
+
* DOCUMENTING NO-OP MIGRATION.
|
|
6
|
+
*
|
|
7
|
+
* Phase C implements the watchdog_jobs.policy enum at the application
|
|
8
|
+
* layer (in WatchdogJobsRepository.register() via the PHASE_C_POLICIES
|
|
9
|
+
* array + WORKFLOW_KEEPALIVE_DEFERRED_POLICY constant). The SQLite
|
|
10
|
+
* column itself is plain TEXT with no CHECK constraint, so extending
|
|
11
|
+
* the enum to include "workflow-keepalive" requires NO schema change.
|
|
12
|
+
*
|
|
13
|
+
* The actual enforcement extension lives in:
|
|
14
|
+
* packages/daemon/src/domain/watchdog-jobs-repository.ts
|
|
15
|
+
* - PHASE_C_POLICIES → renamed to PHASE_D_POLICIES (or extended)
|
|
16
|
+
* to include "workflow-keepalive"
|
|
17
|
+
* - WORKFLOW_KEEPALIVE_DEFERRED_POLICY rejection removed
|
|
18
|
+
*
|
|
19
|
+
* This migration exists for two reasons:
|
|
20
|
+
* 1. Audit trail: documents that Phase D extended the policy enum
|
|
21
|
+
* surface, even though no DDL was needed.
|
|
22
|
+
* 2. Migration sequence integrity: keeps Phase D's migration count
|
|
23
|
+
* visible in the daemon startup log alongside the three new
|
|
24
|
+
* workflow tables (033, 034, 035). Slice IMPL row 17 explicitly
|
|
25
|
+
* requires the extension migration land "cleanly without
|
|
26
|
+
* touching Phase C's existing migration files" — this no-op
|
|
27
|
+
* satisfies that constraint.
|
|
28
|
+
*
|
|
29
|
+
* Per slice IMPL § Write Set:
|
|
30
|
+
* "if the enforcement is application-layer in
|
|
31
|
+
* `watchdog-policy-engine.ts`, the migration is a no-op SQL but
|
|
32
|
+
* documents the policy enum intent."
|
|
33
|
+
*/
|
|
34
|
+
export declare const watchdogPolicyEnumExtensionSchema: Migration;
|
|
35
|
+
//# sourceMappingURL=036_watchdog_policy_enum_extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"036_watchdog_policy_enum_extension.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/036_watchdog_policy_enum_extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,iCAAiC,EAAE,SAS/C,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watchdog policy enum extension (PL-004 Phase D).
|
|
3
|
+
*
|
|
4
|
+
* DOCUMENTING NO-OP MIGRATION.
|
|
5
|
+
*
|
|
6
|
+
* Phase C implements the watchdog_jobs.policy enum at the application
|
|
7
|
+
* layer (in WatchdogJobsRepository.register() via the PHASE_C_POLICIES
|
|
8
|
+
* array + WORKFLOW_KEEPALIVE_DEFERRED_POLICY constant). The SQLite
|
|
9
|
+
* column itself is plain TEXT with no CHECK constraint, so extending
|
|
10
|
+
* the enum to include "workflow-keepalive" requires NO schema change.
|
|
11
|
+
*
|
|
12
|
+
* The actual enforcement extension lives in:
|
|
13
|
+
* packages/daemon/src/domain/watchdog-jobs-repository.ts
|
|
14
|
+
* - PHASE_C_POLICIES → renamed to PHASE_D_POLICIES (or extended)
|
|
15
|
+
* to include "workflow-keepalive"
|
|
16
|
+
* - WORKFLOW_KEEPALIVE_DEFERRED_POLICY rejection removed
|
|
17
|
+
*
|
|
18
|
+
* This migration exists for two reasons:
|
|
19
|
+
* 1. Audit trail: documents that Phase D extended the policy enum
|
|
20
|
+
* surface, even though no DDL was needed.
|
|
21
|
+
* 2. Migration sequence integrity: keeps Phase D's migration count
|
|
22
|
+
* visible in the daemon startup log alongside the three new
|
|
23
|
+
* workflow tables (033, 034, 035). Slice IMPL row 17 explicitly
|
|
24
|
+
* requires the extension migration land "cleanly without
|
|
25
|
+
* touching Phase C's existing migration files" — this no-op
|
|
26
|
+
* satisfies that constraint.
|
|
27
|
+
*
|
|
28
|
+
* Per slice IMPL § Write Set:
|
|
29
|
+
* "if the enforcement is application-layer in
|
|
30
|
+
* `watchdog-policy-engine.ts`, the migration is a no-op SQL but
|
|
31
|
+
* documents the policy enum intent."
|
|
32
|
+
*/
|
|
33
|
+
export const watchdogPolicyEnumExtensionSchema = {
|
|
34
|
+
name: "036_watchdog_policy_enum_extension.sql",
|
|
35
|
+
sql: `
|
|
36
|
+
-- No DDL: Phase C policy enum is enforced at the application layer
|
|
37
|
+
-- via PHASE_D_POLICIES in watchdog-jobs-repository.ts. The
|
|
38
|
+
-- watchdog_jobs.policy column remains plain TEXT. This migration
|
|
39
|
+
-- exists as an audit-trail marker for the Phase D enum extension.
|
|
40
|
+
SELECT 1 WHERE 0;
|
|
41
|
+
`,
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=036_watchdog_policy_enum_extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"036_watchdog_policy_enum_extension.js","sourceRoot":"","sources":["../../../src/db/migrations/036_watchdog_policy_enum_extension.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAc;IAC1D,IAAI,EAAE,wCAAwC;IAC9C,GAAG,EAAE;;;;;;GAMJ;CACF,CAAC"}
|