@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,13 @@
|
|
|
1
|
+
export interface ValidationError {
|
|
2
|
+
field: string;
|
|
3
|
+
value: string;
|
|
4
|
+
rule: string;
|
|
5
|
+
severity: "error" | "warning";
|
|
6
|
+
}
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
valid: boolean;
|
|
9
|
+
errors: ValidationError[];
|
|
10
|
+
}
|
|
11
|
+
export declare const RESTORE_SUMMARY_SCHEMA: Record<string, unknown>;
|
|
12
|
+
export declare function validateRestoreSummary(summary: unknown): ValidationResult;
|
|
13
|
+
//# sourceMappingURL=schema-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-validator.d.ts","sourceRoot":"","sources":["../../src/restore-packet/schema-validator.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAKD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAgK1D,CAAC;AAyBF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAiCzE"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
// schema-validator.ts — validates restore-summary.json against the v0 JSON
|
|
2
|
+
// Schema (packages/cli/src/schemas/restore-summary.schema.json).
|
|
3
|
+
//
|
|
4
|
+
// Per M1 contract § 8 + IMPL § M2 line 167:
|
|
5
|
+
// - generator-side: emit-time self-check against the schema before atomic
|
|
6
|
+
// rename of the packet directory.
|
|
7
|
+
// - operator-side: M3 `rig restore-packet validate <packet-dir>` runs this
|
|
8
|
+
// validator and surfaces per-field violations.
|
|
9
|
+
//
|
|
10
|
+
// Validator returns a ValidationResult with `valid` and a per-field error
|
|
11
|
+
// list. Each error names: field path, value (truncated/escaped), rule, and
|
|
12
|
+
// severity. Required-field violations are severity `error`; optional-field
|
|
13
|
+
// malformations are severity `warning` per § 8.
|
|
14
|
+
//
|
|
15
|
+
// M2a R2 packaging fix: the schema is embedded directly in this module as
|
|
16
|
+
// a typed TS const (RESTORE_SUMMARY_SCHEMA) rather than read from the
|
|
17
|
+
// sibling .json file at runtime. tsc emits the const into the compiled
|
|
18
|
+
// validator JS, so the validator works after `tsc` emit without any extra
|
|
19
|
+
// build-script copy step. The canonical JSON Schema file at
|
|
20
|
+
// `packages/cli/src/schemas/restore-summary.schema.json` remains the
|
|
21
|
+
// source of truth for downstream IDE / tooling consumption; a drift-catcher
|
|
22
|
+
// test in `test/restore-packet.test.ts` asserts the two stay byte-equivalent.
|
|
23
|
+
import Ajv from "ajv";
|
|
24
|
+
import addFormats from "ajv-formats";
|
|
25
|
+
// RESTORE_SUMMARY_SCHEMA — verbatim mirror of
|
|
26
|
+
// `packages/cli/src/schemas/restore-summary.schema.json`. Keep these in
|
|
27
|
+
// lockstep; the drift-catcher test enforces equivalence.
|
|
28
|
+
export const RESTORE_SUMMARY_SCHEMA = {
|
|
29
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
30
|
+
$id: "https://openrig.dev/schemas/restore-summary.schema.json",
|
|
31
|
+
title: "Restore Packet Summary",
|
|
32
|
+
description: "Machine-readable metadata for a cross-runtime restore packet per the v0 paper standard.",
|
|
33
|
+
type: "object",
|
|
34
|
+
required: [
|
|
35
|
+
"source_session_id",
|
|
36
|
+
"source_rig",
|
|
37
|
+
"source_runtime",
|
|
38
|
+
"source_cwd",
|
|
39
|
+
"target_rig",
|
|
40
|
+
"target_runtime",
|
|
41
|
+
"target_workspace_root",
|
|
42
|
+
"default_target_repo",
|
|
43
|
+
"role_pointer",
|
|
44
|
+
"bounded_latest_transcript",
|
|
45
|
+
"touched_files",
|
|
46
|
+
"durable_pointers",
|
|
47
|
+
"current_work_summary",
|
|
48
|
+
"next_owner",
|
|
49
|
+
"caveats",
|
|
50
|
+
"authority_boundaries",
|
|
51
|
+
"omitted_classes",
|
|
52
|
+
"redaction_policy_id",
|
|
53
|
+
"source_trust_ranking",
|
|
54
|
+
"generator_version",
|
|
55
|
+
"generated_at",
|
|
56
|
+
],
|
|
57
|
+
properties: {
|
|
58
|
+
source_session_id: { type: "string", minLength: 1 },
|
|
59
|
+
source_rig: { type: "string", minLength: 1 },
|
|
60
|
+
source_runtime: {
|
|
61
|
+
type: "string",
|
|
62
|
+
enum: ["claude-code", "codex", "terminal", "external"],
|
|
63
|
+
},
|
|
64
|
+
source_cwd: { type: "string", pattern: "^/" },
|
|
65
|
+
target_rig: { type: "string", minLength: 1 },
|
|
66
|
+
target_runtime: {
|
|
67
|
+
type: "string",
|
|
68
|
+
enum: ["claude-code", "codex", "terminal", "external"],
|
|
69
|
+
},
|
|
70
|
+
target_workspace_root: { type: "string", pattern: "^/" },
|
|
71
|
+
default_target_repo: { type: ["string", "null"] },
|
|
72
|
+
role_pointer: {
|
|
73
|
+
type: "string",
|
|
74
|
+
minLength: 1,
|
|
75
|
+
description: "Path or URI pointing to the role guidance file the restored seat should consume. REQUIRED per v0 standard field #9; resolves at restore time.",
|
|
76
|
+
},
|
|
77
|
+
bounded_latest_transcript: {
|
|
78
|
+
type: "object",
|
|
79
|
+
required: ["path", "message_count", "bound"],
|
|
80
|
+
properties: {
|
|
81
|
+
path: { type: "string" },
|
|
82
|
+
message_count: {
|
|
83
|
+
type: "integer",
|
|
84
|
+
minimum: 0,
|
|
85
|
+
description: "Actual count of extracted messages in transcript-latest.md.",
|
|
86
|
+
},
|
|
87
|
+
bound: {
|
|
88
|
+
type: "integer",
|
|
89
|
+
const: 120,
|
|
90
|
+
description: "v0 bound is fixed at 120 messages to match Velocity prior art (per contract § 7). v1+ may make configurable; v0 schema requires const 120 so packets with the wrong bound cannot pass.",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
full_transcript: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
path: { type: "string" },
|
|
98
|
+
line_count: { type: "integer", minimum: 0 },
|
|
99
|
+
},
|
|
100
|
+
description: "Optional per v0 standard field #11. Generator emits when full transcript material is available (e.g., from --source-jsonl or full-read --source-session); omitted otherwise.",
|
|
101
|
+
},
|
|
102
|
+
touched_files: {
|
|
103
|
+
type: "object",
|
|
104
|
+
required: ["path", "top_paths"],
|
|
105
|
+
properties: {
|
|
106
|
+
path: { type: "string" },
|
|
107
|
+
top_paths: {
|
|
108
|
+
type: "array",
|
|
109
|
+
items: {
|
|
110
|
+
type: "object",
|
|
111
|
+
required: ["path", "count"],
|
|
112
|
+
properties: {
|
|
113
|
+
path: { type: "string" },
|
|
114
|
+
count: { type: "integer", minimum: 0 },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
durable_pointers: {
|
|
121
|
+
type: "object",
|
|
122
|
+
required: [
|
|
123
|
+
"queue_pointers",
|
|
124
|
+
"progress_pointers",
|
|
125
|
+
"field_note_pointers",
|
|
126
|
+
"artifact_pointers",
|
|
127
|
+
],
|
|
128
|
+
properties: {
|
|
129
|
+
queue_pointers: {
|
|
130
|
+
type: "array",
|
|
131
|
+
items: { type: "string" },
|
|
132
|
+
description: "References to durable queue items (qitem ids or queue-file paths).",
|
|
133
|
+
},
|
|
134
|
+
progress_pointers: {
|
|
135
|
+
type: "array",
|
|
136
|
+
items: { type: "string" },
|
|
137
|
+
description: "References to PROGRESS.md cursors the source seat was operating against.",
|
|
138
|
+
},
|
|
139
|
+
field_note_pointers: {
|
|
140
|
+
type: "array",
|
|
141
|
+
items: { type: "string" },
|
|
142
|
+
description: "References to field-notes folders or files.",
|
|
143
|
+
},
|
|
144
|
+
artifact_pointers: {
|
|
145
|
+
type: "array",
|
|
146
|
+
items: { type: "string" },
|
|
147
|
+
description: "Other durable artifacts (proof packets, slice packets, candidate dossiers).",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
description: "REQUIRED per v0 standard field #13. Pointers to durable work the source seat was operating against; restored seat reads to recover work-context.",
|
|
151
|
+
},
|
|
152
|
+
current_work_summary: { type: "string", minLength: 1 },
|
|
153
|
+
next_owner: { type: "string", minLength: 1 },
|
|
154
|
+
caveats: { type: "array", items: { type: "string" } },
|
|
155
|
+
authority_boundaries: { type: "string", minLength: 1 },
|
|
156
|
+
omitted_classes: {
|
|
157
|
+
type: "array",
|
|
158
|
+
items: {
|
|
159
|
+
type: "string",
|
|
160
|
+
enum: ["reasoning_records", "raw_tool_outputs", "function_call_output", "redacted_secrets"],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
redaction_policy_id: { type: "string", enum: ["velocity-v1", "openrig-v0"] },
|
|
164
|
+
source_trust_ranking: {
|
|
165
|
+
type: "array",
|
|
166
|
+
items: {
|
|
167
|
+
type: "string",
|
|
168
|
+
enum: [
|
|
169
|
+
"rig_whoami",
|
|
170
|
+
"target_rigspec",
|
|
171
|
+
"bounded_latest_transcript",
|
|
172
|
+
"full_transcript",
|
|
173
|
+
"touched_files",
|
|
174
|
+
"restore_summary",
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
minItems: 1,
|
|
178
|
+
},
|
|
179
|
+
generator_version: { type: "string", minLength: 1 },
|
|
180
|
+
generated_at: { type: "string", format: "date-time" },
|
|
181
|
+
},
|
|
182
|
+
additionalProperties: false,
|
|
183
|
+
};
|
|
184
|
+
let cachedValidator = null;
|
|
185
|
+
function getValidator() {
|
|
186
|
+
if (cachedValidator)
|
|
187
|
+
return cachedValidator;
|
|
188
|
+
const ajv = new Ajv({ allErrors: true, strict: false });
|
|
189
|
+
addFormats(ajv);
|
|
190
|
+
cachedValidator = ajv.compile(RESTORE_SUMMARY_SCHEMA);
|
|
191
|
+
return cachedValidator;
|
|
192
|
+
}
|
|
193
|
+
function truncateValue(value) {
|
|
194
|
+
if (value === undefined)
|
|
195
|
+
return "<undefined>";
|
|
196
|
+
if (value === null)
|
|
197
|
+
return "null";
|
|
198
|
+
let s;
|
|
199
|
+
try {
|
|
200
|
+
s = typeof value === "string" ? value : JSON.stringify(value);
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
s = String(value);
|
|
204
|
+
}
|
|
205
|
+
if (s.length > 80)
|
|
206
|
+
return s.slice(0, 77) + "...";
|
|
207
|
+
return s;
|
|
208
|
+
}
|
|
209
|
+
export function validateRestoreSummary(summary) {
|
|
210
|
+
const validator = getValidator();
|
|
211
|
+
const ok = validator(summary);
|
|
212
|
+
if (ok) {
|
|
213
|
+
return { valid: true, errors: [] };
|
|
214
|
+
}
|
|
215
|
+
const errors = (validator.errors ?? []).map((err) => {
|
|
216
|
+
const instancePath = err.instancePath || "";
|
|
217
|
+
const missing = err.params && err.params.missingProperty;
|
|
218
|
+
const additional = err.params && err.params.additionalProperty;
|
|
219
|
+
let field = instancePath.replace(/^\//, "").replace(/\//g, ".");
|
|
220
|
+
if (missing)
|
|
221
|
+
field = field ? `${field}.${missing}` : missing;
|
|
222
|
+
if (additional)
|
|
223
|
+
field = additional;
|
|
224
|
+
// Per M1 contract § 8 + IMPL § M3: optional-field malformations are
|
|
225
|
+
// severity "warning"; required-field violations are severity "error".
|
|
226
|
+
// The only top-level optional field in v0 is `full_transcript`.
|
|
227
|
+
// Errors whose path begins at `/full_transcript` come from validating
|
|
228
|
+
// the optional object's contents, not from a missing-required check
|
|
229
|
+
// on a required field.
|
|
230
|
+
const isOptionalFieldError = instancePath.startsWith("/full_transcript");
|
|
231
|
+
return {
|
|
232
|
+
field: field || "<root>",
|
|
233
|
+
value: truncateValue(err.data),
|
|
234
|
+
rule: `${err.keyword}: ${err.message ?? ""}`.trim(),
|
|
235
|
+
severity: isOptionalFieldError ? "warning" : "error",
|
|
236
|
+
};
|
|
237
|
+
});
|
|
238
|
+
// `valid` is false on ANY ajv violation (preserves M2c writer
|
|
239
|
+
// semantics: any malformation should block atomic rename). The M3
|
|
240
|
+
// validate command consults `errors[].severity` to decide exit code
|
|
241
|
+
// per M1 contract § 8 (required-field-class errors → exit nonzero;
|
|
242
|
+
// optional-field warnings → exit 0 with warning text).
|
|
243
|
+
return { valid: false, errors };
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=schema-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-validator.js","sourceRoot":"","sources":["../../src/restore-packet/schema-validator.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,iEAAiE;AACjE,EAAE;AACF,4CAA4C;AAC5C,0EAA0E;AAC1E,oCAAoC;AACpC,2EAA2E;AAC3E,iDAAiD;AACjD,EAAE;AACF,0EAA0E;AAC1E,2EAA2E;AAC3E,2EAA2E;AAC3E,gDAAgD;AAChD,EAAE;AACF,0EAA0E;AAC1E,sEAAsE;AACtE,uEAAuE;AACvE,0EAA0E;AAC1E,4DAA4D;AAC5D,qEAAqE;AACrE,4EAA4E;AAC5E,8EAA8E;AAE9E,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,UAAU,MAAM,aAAa,CAAC;AAcrC,8CAA8C;AAC9C,wEAAwE;AACxE,yDAAyD;AACzD,MAAM,CAAC,MAAM,s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EAAE,EAAE,CAAC,IAAI,EAAE;YACnD,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;SACrD,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,8DAA8D;IAC9D,kEAAkE;IAClE,oEAAoE;IACpE,mEAAmE;IACnE,uDAAuD;IACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** A single user-visible message extracted from a transcript. */
|
|
2
|
+
export interface ExtractedMessage {
|
|
3
|
+
/** ISO-8601 timestamp if the source provides one; else null. */
|
|
4
|
+
timestamp: string | null;
|
|
5
|
+
/** Speaker role. Restricted to user-visible roles (developer/user/assistant). */
|
|
6
|
+
role: "developer" | "user" | "assistant";
|
|
7
|
+
/** Redacted message text. */
|
|
8
|
+
text: string;
|
|
9
|
+
/** First non-empty line of the text, truncated to ~180 chars. Used in summaries. */
|
|
10
|
+
preview: string;
|
|
11
|
+
}
|
|
12
|
+
/** Canonical record-class enum per M1 contract § 5. */
|
|
13
|
+
export type OmittedRecordClass = "reasoning_records" | "raw_tool_outputs" | "function_call_output" | "redacted_secrets";
|
|
14
|
+
/**
|
|
15
|
+
* A path frequency entry from path extraction. Sorted by count
|
|
16
|
+
* descending then path ascending; used to populate `touched_files.top_paths`.
|
|
17
|
+
*/
|
|
18
|
+
export interface PathCount {
|
|
19
|
+
path: string;
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Per-runtime per-record-type counter. Flexible string keys because
|
|
24
|
+
* Codex JSONL uses `record.type` strings and Claude transcript uses
|
|
25
|
+
* `record.type` strings; both are runtime-defined.
|
|
26
|
+
*/
|
|
27
|
+
export type TypeCounts = Record<string, number>;
|
|
28
|
+
/**
|
|
29
|
+
* Per-omitted-class counter. Records how many records were filtered
|
|
30
|
+
* for each of the 4 contract enums during parsing/redaction.
|
|
31
|
+
*/
|
|
32
|
+
export type OmittedCounts = Record<OmittedRecordClass, number>;
|
|
33
|
+
/**
|
|
34
|
+
* Optional session metadata extracted from the source. Codex emits a
|
|
35
|
+
* `session_meta` record at the top of a JSONL; Claude transcripts
|
|
36
|
+
* carry per-record `cwd` etc.
|
|
37
|
+
*/
|
|
38
|
+
export interface SessionMeta {
|
|
39
|
+
cwd: string | null;
|
|
40
|
+
sessionId: string | null;
|
|
41
|
+
/** Free-form additional fields the runtime emitted; not load-bearing. */
|
|
42
|
+
raw?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Structured representation produced by both parsers. The packet-writer
|
|
46
|
+
* (M2c) consumes this to assemble a v0 restore packet.
|
|
47
|
+
*/
|
|
48
|
+
export interface StructuredTranscript {
|
|
49
|
+
/** Top-level session metadata (cwd, sessionId). */
|
|
50
|
+
sessionMeta: SessionMeta | null;
|
|
51
|
+
/** Total source lines processed (raw JSONL line count, including malformed/skipped). */
|
|
52
|
+
lineCount: number;
|
|
53
|
+
/** Number of user-visible messages extracted into `messages`. */
|
|
54
|
+
messageCount: number;
|
|
55
|
+
/**
|
|
56
|
+
* Number of "compaction" records seen. Codex emits these explicitly
|
|
57
|
+
* (`type: "compacted"`); Claude doesn't. The field is parser-specific
|
|
58
|
+
* but always present (zero when not applicable).
|
|
59
|
+
*/
|
|
60
|
+
compactedCount: number;
|
|
61
|
+
/** Per-record-type frequency map; used in human reports / debug. */
|
|
62
|
+
typeCounts: TypeCounts;
|
|
63
|
+
/** Per-omitted-class counter; populated as the parser filters records. */
|
|
64
|
+
omittedCounts: OmittedCounts;
|
|
65
|
+
/** Extracted messages in chronological order; redaction has been applied. */
|
|
66
|
+
messages: ExtractedMessage[];
|
|
67
|
+
/**
|
|
68
|
+
* Path frequency inventory; sorted by count desc then path asc.
|
|
69
|
+
* Capped at 200 entries.
|
|
70
|
+
*/
|
|
71
|
+
paths: PathCount[];
|
|
72
|
+
}
|
|
73
|
+
/** Source-runtime kind. v0 supports codex + claude-code transcript shapes. */
|
|
74
|
+
export type SourceRuntime = "codex" | "claude-code";
|
|
75
|
+
export declare function emptyOmittedCounts(): OmittedCounts;
|
|
76
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/restore-packet/types.ts"],"names":[],"mappings":"AAOA,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iFAAiF;IACjF,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,WAAW,CAAC;IACzC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAC1B,mBAAmB,GACnB,kBAAkB,GAClB,sBAAsB,GACtB,kBAAkB,CAAC;AAEvB;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,wFAAwF;IACxF,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,UAAU,EAAE,UAAU,CAAC;IACvB,0EAA0E;IAC1E,aAAa,EAAE,aAAa,CAAC;IAC7B,6EAA6E;IAC7E,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,aAAa,CAAC;AAEpD,wBAAgB,kBAAkB,IAAI,aAAa,CAOlD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// types.ts — shared TypeScript types for the restore-packet generator.
|
|
2
|
+
//
|
|
3
|
+
// Both runtime adapters (codex-jsonl-parser, claude-transcript-parser)
|
|
4
|
+
// emit the same StructuredTranscript shape. Downstream modules
|
|
5
|
+
// (redaction, omitted-records, packet-writer) consume this shape
|
|
6
|
+
// without caring about the source runtime.
|
|
7
|
+
export function emptyOmittedCounts() {
|
|
8
|
+
return {
|
|
9
|
+
reasoning_records: 0,
|
|
10
|
+
raw_tool_outputs: 0,
|
|
11
|
+
function_call_output: 0,
|
|
12
|
+
redacted_secrets: 0,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/restore-packet/types.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,uEAAuE;AACvE,+DAA+D;AAC/D,iEAAiE;AACjE,2CAA2C;AAwF3C,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,iBAAiB,EAAE,CAAC;QACpB,gBAAgB,EAAE,CAAC;QACnB,oBAAoB,EAAE,CAAC;QACvB,gBAAgB,EAAE,CAAC;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://openrig.dev/schemas/restore-summary.schema.json",
|
|
4
|
+
"title": "Restore Packet Summary",
|
|
5
|
+
"description": "Machine-readable metadata for a cross-runtime restore packet per the v0 paper standard.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"source_session_id",
|
|
9
|
+
"source_rig",
|
|
10
|
+
"source_runtime",
|
|
11
|
+
"source_cwd",
|
|
12
|
+
"target_rig",
|
|
13
|
+
"target_runtime",
|
|
14
|
+
"target_workspace_root",
|
|
15
|
+
"default_target_repo",
|
|
16
|
+
"role_pointer",
|
|
17
|
+
"bounded_latest_transcript",
|
|
18
|
+
"touched_files",
|
|
19
|
+
"durable_pointers",
|
|
20
|
+
"current_work_summary",
|
|
21
|
+
"next_owner",
|
|
22
|
+
"caveats",
|
|
23
|
+
"authority_boundaries",
|
|
24
|
+
"omitted_classes",
|
|
25
|
+
"redaction_policy_id",
|
|
26
|
+
"source_trust_ranking",
|
|
27
|
+
"generator_version",
|
|
28
|
+
"generated_at"
|
|
29
|
+
],
|
|
30
|
+
"properties": {
|
|
31
|
+
"source_session_id": {"type": "string", "minLength": 1},
|
|
32
|
+
"source_rig": {"type": "string", "minLength": 1},
|
|
33
|
+
"source_runtime": {"type": "string", "enum": ["claude-code", "codex", "terminal", "external"]},
|
|
34
|
+
"source_cwd": {"type": "string", "pattern": "^/"},
|
|
35
|
+
"target_rig": {"type": "string", "minLength": 1},
|
|
36
|
+
"target_runtime": {"type": "string", "enum": ["claude-code", "codex", "terminal", "external"]},
|
|
37
|
+
"target_workspace_root": {"type": "string", "pattern": "^/"},
|
|
38
|
+
"default_target_repo": {"type": ["string", "null"]},
|
|
39
|
+
"role_pointer": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1,
|
|
42
|
+
"description": "Path or URI pointing to the role guidance file the restored seat should consume. REQUIRED per v0 standard field #9; resolves at restore time."
|
|
43
|
+
},
|
|
44
|
+
"bounded_latest_transcript": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"required": ["path", "message_count", "bound"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"path": {"type": "string"},
|
|
49
|
+
"message_count": {"type": "integer", "minimum": 0, "description": "Actual count of extracted messages in transcript-latest.md."},
|
|
50
|
+
"bound": {"type": "integer", "const": 120, "description": "v0 bound is fixed at 120 messages to match Velocity prior art (per contract § 7). v1+ may make configurable; v0 schema requires const 120 so packets with the wrong bound cannot pass."}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"full_transcript": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": {"type": "string"},
|
|
57
|
+
"line_count": {"type": "integer", "minimum": 0}
|
|
58
|
+
},
|
|
59
|
+
"description": "Optional per v0 standard field #11. Generator emits when full transcript material is available (e.g., from --source-jsonl or full-read --source-session); omitted otherwise."
|
|
60
|
+
},
|
|
61
|
+
"touched_files": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": ["path", "top_paths"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"path": {"type": "string"},
|
|
66
|
+
"top_paths": {"type": "array", "items": {"type": "object", "required": ["path", "count"], "properties": {"path": {"type": "string"}, "count": {"type": "integer", "minimum": 0}}}}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"durable_pointers": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["queue_pointers", "progress_pointers", "field_note_pointers", "artifact_pointers"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"queue_pointers": {"type": "array", "items": {"type": "string"}, "description": "References to durable queue items (qitem ids or queue-file paths)."},
|
|
74
|
+
"progress_pointers": {"type": "array", "items": {"type": "string"}, "description": "References to PROGRESS.md cursors the source seat was operating against."},
|
|
75
|
+
"field_note_pointers": {"type": "array", "items": {"type": "string"}, "description": "References to field-notes folders or files."},
|
|
76
|
+
"artifact_pointers": {"type": "array", "items": {"type": "string"}, "description": "Other durable artifacts (proof packets, slice packets, candidate dossiers)."}
|
|
77
|
+
},
|
|
78
|
+
"description": "REQUIRED per v0 standard field #13. Pointers to durable work the source seat was operating against; restored seat reads to recover work-context."
|
|
79
|
+
},
|
|
80
|
+
"current_work_summary": {"type": "string", "minLength": 1},
|
|
81
|
+
"next_owner": {"type": "string", "minLength": 1},
|
|
82
|
+
"caveats": {"type": "array", "items": {"type": "string"}},
|
|
83
|
+
"authority_boundaries": {"type": "string", "minLength": 1},
|
|
84
|
+
"omitted_classes": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {"type": "string", "enum": ["reasoning_records", "raw_tool_outputs", "function_call_output", "redacted_secrets"]}
|
|
87
|
+
},
|
|
88
|
+
"redaction_policy_id": {"type": "string", "enum": ["velocity-v1", "openrig-v0"]},
|
|
89
|
+
"source_trust_ranking": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {"type": "string", "enum": ["rig_whoami", "target_rigspec", "bounded_latest_transcript", "full_transcript", "touched_files", "restore_summary"]},
|
|
92
|
+
"minItems": 1
|
|
93
|
+
},
|
|
94
|
+
"generator_version": {"type": "string", "minLength": 1},
|
|
95
|
+
"generated_at": {"type": "string", "format": "date-time"}
|
|
96
|
+
},
|
|
97
|
+
"additionalProperties": false
|
|
98
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-preflight.d.ts","sourceRoot":"","sources":["../src/system-preflight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"system-preflight.d.ts","sourceRoot":"","sources":["../src/system-preflight.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBA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
|
import { accessSync, mkdirSync, constants } from "node:fs";
|
|
3
3
|
import { dirname } from "node:path";
|
|
4
|
+
import { buildTmuxControlFailure, probeTmuxControlAsync } from "./tmux-health.js";
|
|
4
5
|
const MIN_NODE_MAJOR = 20;
|
|
5
6
|
function parseNodeMajor(version) {
|
|
6
7
|
const match = version.match(/^v?(\d+)/);
|
|
@@ -88,11 +89,8 @@ export class SystemPreflight {
|
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
// 2. tmux availability
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
checks.push({ name: "tmux", ok: true });
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
92
|
+
const tmuxProbe = await probeTmuxControlAsync(this.deps.exec);
|
|
93
|
+
if (tmuxProbe.code === "not_installed") {
|
|
96
94
|
checks.push({
|
|
97
95
|
name: "tmux",
|
|
98
96
|
ok: false,
|
|
@@ -101,6 +99,19 @@ export class SystemPreflight {
|
|
|
101
99
|
fix: "Install tmux (brew install tmux on macOS, apt install tmux on Debian/Ubuntu).",
|
|
102
100
|
});
|
|
103
101
|
}
|
|
102
|
+
else if (tmuxProbe.available) {
|
|
103
|
+
checks.push({ name: "tmux", ok: true });
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
const failure = buildTmuxControlFailure(tmuxProbe.detail ?? "unknown tmux control failure");
|
|
107
|
+
checks.push({
|
|
108
|
+
name: "tmux",
|
|
109
|
+
ok: false,
|
|
110
|
+
error: failure.message,
|
|
111
|
+
reason: failure.reason,
|
|
112
|
+
fix: failure.fix,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
104
115
|
// 3. Writable OpenRig home + transcript path
|
|
105
116
|
checks.push(buildWritableHomeCheck(config, openrigHome));
|
|
106
117
|
// 4. Daemon port availability
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-preflight.js","sourceRoot":"","sources":["../src/system-preflight.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;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,CAAC;QAED,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChC,MAAM;SACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TmuxProbeResult {
|
|
2
|
+
installed: boolean;
|
|
3
|
+
available: boolean;
|
|
4
|
+
version: string | null;
|
|
5
|
+
detail: string | null;
|
|
6
|
+
code: "available" | "no_server" | "not_installed" | "unhealthy";
|
|
7
|
+
}
|
|
8
|
+
export declare function isTmuxNoServerMessage(message: string): boolean;
|
|
9
|
+
export declare function buildTmuxControlFailure(message: string): {
|
|
10
|
+
message: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
fix: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function probeTmuxControl(exec: (cmd: string) => string): TmuxProbeResult;
|
|
15
|
+
export declare function probeTmuxControlAsync(exec: (cmd: string) => Promise<string>): Promise<TmuxProbeResult>;
|
|
16
|
+
//# sourceMappingURL=tmux-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmux-health.d.ts","sourceRoot":"","sources":["../src/tmux-health.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,eAAe,GAAG,WAAW,CAAC;CACjE;AAMD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAK9D;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAMzG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,eAAe,CA0C/E;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CA0C5G"}
|