@openrig/cli 0.5.7 → 0.5.8
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/plugins/openrig-core/hooks/scripts/refocus.cjs +25 -2
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +95 -8
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +9 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +40 -15
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +95 -8
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +9 -1
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +120 -355
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -3
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +62 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/inspect-upgrade.mjs +40 -0
- package/daemon/context-packs/skills/core/openrig-upgrade/scripts/refresh-managed-plugin.mjs +151 -0
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
- package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +249 -2
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +6 -5
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +29 -12
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/all-migrations.d.ts +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +3 -1
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts +17 -0
- package/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts.map +1 -0
- package/daemon/dist/db/migrations/078_idle_gate_fired_condition.js +21 -0
- package/daemon/dist/db/migrations/078_idle_gate_fired_condition.js.map +1 -0
- package/daemon/dist/domain/active-occupant.d.ts +6 -0
- package/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/daemon/dist/domain/active-occupant.js +14 -0
- package/daemon/dist/domain/active-occupant.js.map +1 -1
- package/daemon/dist/domain/current-work.d.ts +73 -0
- package/daemon/dist/domain/current-work.d.ts.map +1 -0
- package/daemon/dist/domain/current-work.js +225 -0
- package/daemon/dist/domain/current-work.js.map +1 -0
- package/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/daemon/dist/domain/execution-view.js +215 -13
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.d.ts +3 -2
- package/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/daemon/dist/domain/gateway/human-registry.js +113 -18
- package/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +3 -2
- package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
- package/daemon/dist/domain/model-divergence/effective-model-readers.js +7 -5
- package/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts +5 -5
- package/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
- package/daemon/dist/domain/policies/idle-gate-qitem.js +130 -22
- package/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
- package/daemon/dist/domain/policies/types.d.ts +12 -0
- package/daemon/dist/domain/policies/types.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +37 -2
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +171 -16
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +19 -0
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +33 -0
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +4 -1
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts +11 -1
- package/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/daemon/dist/domain/rehydrate-eligibility.js +34 -0
- package/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +9 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +32 -0
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-plan-preview.js +2 -2
- package/daemon/dist/domain/restore-plan-preview.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 +15 -9
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +66 -83
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts +5 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +41 -2
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts +32 -1
- package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-attention-reconciler.js +183 -4
- package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +5 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +33 -7
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/daemon/dist/domain/snapshot-capture.js +4 -2
- package/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/daemon/dist/domain/topology-defaults-installer.d.ts +4 -2
- package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -1
- package/daemon/dist/domain/topology-defaults-installer.js +27 -0
- package/daemon/dist/domain/topology-defaults-installer.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +1 -1
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/up-command-router.d.ts.map +1 -1
- package/daemon/dist/domain/up-command-router.js +19 -0
- package/daemon/dist/domain/up-command-router.js.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts +9 -0
- package/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-jobs-repository.js +15 -2
- package/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.d.ts +7 -0
- package/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-policy-engine.js +47 -0
- package/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +31 -10
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigs.js +10 -3
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/daemon/dist/routes/rigspec.js +37 -0
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/up.js +10 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +16 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +33 -0
- package/daemon/docs/reference/chain-file-convention.md +17 -12
- package/daemon/docs/reference/release-boundary.md +29 -5
- package/daemon/docs/reference/sdlc-conventions.md +6 -0
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +120 -355
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/backup-sqlite.mjs +62 -0
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/inspect-upgrade.mjs +40 -0
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/scripts/refresh-managed-plugin.mjs +151 -0
- package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +4 -4
- package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +3 -3
- package/dist/build-info.js +3 -3
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +55 -9
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +27 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +51 -3
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/front-door.d.ts.map +1 -1
- package/dist/front-door.js +16 -4
- package/dist/front-door.js.map +1 -1
- package/dist/lib/topology-trace.d.ts +3 -2
- package/dist/lib/topology-trace.d.ts.map +1 -1
- package/dist/lib/topology-trace.js +12 -2
- package/dist/lib/topology-trace.js.map +1 -1
- package/dist/lib/work-install.d.ts.map +1 -1
- package/dist/lib/work-install.js +65 -31
- package/dist/lib/work-install.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js +249 -2
- package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +6 -5
- package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js +29 -12
- package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
- package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.js +3 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts +17 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.js +21 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/078_idle_gate_fired_condition.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts +6 -0
- package/node_modules/@openrig/daemon/dist/domain/active-occupant.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/active-occupant.js +14 -0
- package/node_modules/@openrig/daemon/dist/domain/active-occupant.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/current-work.d.ts +73 -0
- package/node_modules/@openrig/daemon/dist/domain/current-work.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/current-work.js +225 -0
- package/node_modules/@openrig/daemon/dist/domain/current-work.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/execution-view.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/execution-view.js +215 -13
- package/node_modules/@openrig/daemon/dist/domain/execution-view.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts +3 -2
- package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js +113 -18
- package/node_modules/@openrig/daemon/dist/domain/gateway/human-registry.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +3 -2
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js +7 -5
- package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.d.ts +5 -5
- package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.js +130 -22
- package/node_modules/@openrig/daemon/dist/domain/policies/idle-gate-qitem.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts +12 -0
- package/node_modules/@openrig/daemon/dist/domain/policies/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +37 -2
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +171 -16
- package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts +19 -0
- package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js +33 -0
- package/node_modules/@openrig/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js +4 -1
- package/node_modules/@openrig/daemon/dist/domain/reconciler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.d.ts +11 -1
- package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.js +34 -0
- package/node_modules/@openrig/daemon/dist/domain/rehydrate-eligibility.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts +9 -0
- package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js +32 -0
- package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js +2 -2
- package/node_modules/@openrig/daemon/dist/domain/restore-plan-preview.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +2 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +15 -9
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +66 -83
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts +5 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +41 -2
- package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts +32 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js +183 -4
- package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +5 -0
- package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js +33 -7
- package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js +4 -2
- package/node_modules/@openrig/daemon/dist/domain/snapshot-capture.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +4 -2
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +27 -0
- package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/up-command-router.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/up-command-router.js +19 -0
- package/node_modules/@openrig/daemon/dist/domain/up-command-router.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts +9 -0
- package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js +15 -2
- package/node_modules/@openrig/daemon/dist/domain/watchdog-jobs-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts +7 -0
- package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js +47 -0
- package/node_modules/@openrig/daemon/dist/domain/watchdog-policy-engine.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/queue.js +31 -10
- package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigs.js +10 -3
- package/node_modules/@openrig/daemon/dist/routes/rigs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigspec.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js +37 -0
- package/node_modules/@openrig/daemon/dist/routes/rigspec.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/up.js +10 -3
- package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.js +16 -6
- package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
- package/node_modules/@openrig/daemon/package.json +1 -1
- package/package.json +2 -1
- package/tui/dist/daemon-client.d.ts +2 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +4 -0
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/execution/execution-model.d.ts +19 -0
- package/tui/dist/execution/execution-model.d.ts.map +1 -0
- package/tui/dist/execution/execution-model.js +518 -0
- package/tui/dist/execution/execution-model.js.map +1 -0
- package/tui/dist/hydrate.d.ts +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +6 -2
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/input.d.ts +7 -0
- package/tui/dist/input.d.ts.map +1 -1
- package/tui/dist/input.js +13 -0
- package/tui/dist/input.js.map +1 -1
- package/tui/dist/live.d.ts +10 -0
- package/tui/dist/live.d.ts.map +1 -1
- package/tui/dist/live.js +34 -1
- package/tui/dist/live.js.map +1 -1
- package/tui/dist/main.js +22 -3
- package/tui/dist/main.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +13 -2
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/scopes/scopes-model.d.ts +1 -0
- package/tui/dist/scopes/scopes-model.d.ts.map +1 -1
- package/tui/dist/scopes/scopes-model.js +4 -2
- package/tui/dist/scopes/scopes-model.js.map +1 -1
- package/tui/dist/sections.js +2 -2
- package/tui/dist/sections.js.map +1 -1
- package/tui/dist/state.d.ts.map +1 -1
- package/tui/dist/state.js +15 -2
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/stylize.js +2 -2
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/types.d.ts +20 -0
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
2
|
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
3
|
name: "openrig-herdr"
|
|
4
|
-
version: "0.5.
|
|
4
|
+
version: "0.5.8"
|
|
5
5
|
taxonomy: "skills"
|
|
6
6
|
purpose: "Use when opening OpenRig fleet terminals as a herdr wall — turning a rig, pod, mission, slice, or saved view into live interactive agent tiles via `rig terminal`, watching another rig read-only, or driving herdr on an agent's request (\"open all my rigs + a mission as views\"). Covers the `rig terminal open|views|status` verbs, the honest-partial/degrade reading of the result, the read-only-by-construction rail for cross-rig views, scroll/copy out of the box, and the same-size-only duplicate-pane "
|
|
7
7
|
files:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
2
|
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
3
|
name: "openrig-skills"
|
|
4
|
-
version: "0.5.
|
|
4
|
+
version: "0.5.8"
|
|
5
5
|
taxonomy: "skills"
|
|
6
6
|
purpose: "Use when you're operating OpenRig and need the right skill or context for fleet recovery, seat handover, new-seat orientation, a watchdog wake, cross-host reach to an agent on another machine, rig packaging, an OpenRig upgrade, systematic debugging, queue triage, or implementation planning; also use when you don't know what applies or nothing is projected on cold boot."
|
|
7
7
|
files:
|
|
@@ -1,404 +1,169 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: openrig-upgrade
|
|
3
|
-
description: Use when
|
|
3
|
+
description: Use when an agent is preparing or performing an OpenRig CLI/daemon upgrade and must preserve live seats, verify each mutation, or reconcile managed plugin and skill files without overwriting local work.
|
|
4
4
|
metadata:
|
|
5
5
|
cli_surfaces_referenced:
|
|
6
6
|
- capture
|
|
7
|
-
- daemon adopt-state
|
|
8
7
|
- daemon start
|
|
9
8
|
- daemon status
|
|
10
9
|
- daemon stop
|
|
11
|
-
-
|
|
10
|
+
- plugin list
|
|
12
11
|
- ps
|
|
13
12
|
- restore-check
|
|
14
13
|
- snapshot
|
|
15
|
-
- up
|
|
16
|
-
- upgrade backup
|
|
17
|
-
- upgrade preflight
|
|
18
|
-
- upgrade promote-runtime
|
|
19
|
-
- upgrade verify
|
|
20
14
|
- version
|
|
21
15
|
openrig:
|
|
22
16
|
stage: factory-approved
|
|
23
17
|
sibling_skills:
|
|
24
18
|
- openrig-user
|
|
25
19
|
- openrig-operator
|
|
26
|
-
- openrig-builder
|
|
27
|
-
- openrig-architect
|
|
28
20
|
- forming-an-openrig-mental-model
|
|
29
|
-
- ai-dev-workflows
|
|
30
21
|
---
|
|
31
22
|
|
|
32
|
-
# OpenRig
|
|
23
|
+
# Upgrade OpenRig
|
|
33
24
|
|
|
34
|
-
|
|
25
|
+
An upgrade is an observed agent workflow, not a transaction hidden behind one
|
|
26
|
+
command. Hosts differ, process state drifts, local plugin files accumulate, and
|
|
27
|
+
the useful response to a failed step depends on what is still alive.
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
**The agent owns the sequence. Stop after every mutation and observe the actual
|
|
30
|
+
effect before choosing the next step.** There is deliberately no end-to-end
|
|
31
|
+
upgrade subcommand.
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
- **Management plane:** the OpenRig daemon, CLI, SQLite DB, transcripts, node inventory,
|
|
40
|
-
send/capture APIs, restore metadata, and migrations.
|
|
33
|
+
## Safety model
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
the new daemon restarts against the same DB and transcript root. Do not run
|
|
44
|
-
`rig down` on continuity rigs unless the goal is a disruptive restore test; `rig down`
|
|
45
|
-
kills OpenRig-launched tmux sessions.
|
|
35
|
+
Keep these planes separate:
|
|
46
36
|
|
|
47
|
-
|
|
37
|
+
- Seats normally live in tmux and can survive a daemon restart.
|
|
38
|
+
- The daemon, database, wrappers, and managed plugin projection are the control
|
|
39
|
+
plane being changed.
|
|
40
|
+
- `rig down` tears down seats. It is not part of a continuity-preserving upgrade.
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
Before acting, name the rigs and seats whose continuity matters. On a production
|
|
43
|
+
host, use the host's normal operator ceremony. On a recovery-friendly build VM,
|
|
44
|
+
the orchestrator may adopt a tested runtime directly, but still observes each
|
|
45
|
+
step and stops on unexplained drift.
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
mutates the management plane. The sidecar inherits enough context to avoid a
|
|
55
|
-
cold handoff, but it is not inside the failure domain it is modifying.
|
|
47
|
+
## The loop
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
For every step:
|
|
58
50
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
1. **Inspect.** Derive current facts from the live host.
|
|
52
|
+
2. **Decide.** Choose one bounded mutation and state its expected effect.
|
|
53
|
+
3. **Act once.** Do not bundle the next mutation with it.
|
|
54
|
+
4. **Observe.** Check the process, listener, database, plugin, and seat surfaces
|
|
55
|
+
that the step could have changed.
|
|
56
|
+
5. **Continue, adapt, or stop.** A failed expectation is information for the
|
|
57
|
+
agent, not permission for a blind retry.
|
|
65
58
|
|
|
66
|
-
|
|
67
|
-
mean standing Codex `auto_review`, `--full-auto`, or approval-bypass mode. Use
|
|
68
|
-
`security-and-consequence-boundary-policy` skill for the current
|
|
69
|
-
security and consequence-boundary policy.
|
|
59
|
+
## Bounded helpers
|
|
70
60
|
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
Let `SKILL_DIR` be the directory containing this `SKILL.md`. These scripts emit
|
|
62
|
+
JSON and do not decide the upgrade sequence.
|
|
73
63
|
|
|
74
|
-
###
|
|
64
|
+
### Inspect current facts
|
|
75
65
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
window.
|
|
79
|
-
|
|
80
|
-
Sidecar starter prompt shape:
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
You are the host-local OpenRig runtime upgrade operator, outside the managed rig
|
|
84
|
-
topology. Execute the approved daemon-only cutover only after explicit human
|
|
85
|
-
approval. First read the upgrade preflight artifact and runtime-upgrade
|
|
86
|
-
decision. Prove you are outside the topology before mutation. Never run rig
|
|
87
|
-
down. Preserve tmux topology. Stop/start only the daemon, verify protected rigs,
|
|
88
|
-
write cutover evidence, unblock downstream artifacts only when the blocker is
|
|
89
|
-
truly closed, and rollback to <previous-wrapper-or-commit> if needed.
|
|
66
|
+
```bash
|
|
67
|
+
node "$SKILL_DIR/scripts/inspect-upgrade.mjs"
|
|
90
68
|
```
|
|
91
69
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
mutated;
|
|
97
|
-
- update any blocked downstream dogfood/runtime task only when the blocking
|
|
98
|
-
condition is truly closed;
|
|
99
|
-
- preserve caveats as downstream material instead of using them to reopen a
|
|
100
|
-
closed cutover gate;
|
|
101
|
-
- report back to the in-rig lifecycle/runtime-upgrade seat or orch surface with
|
|
102
|
-
daemon provenance, topology verification, caveats, rollback state, and one
|
|
103
|
-
compact paragraph of operator judgment about ambiguous choices;
|
|
104
|
-
- close the sidecar after the original lifecycle owner has absorbed the result.
|
|
105
|
-
|
|
106
|
-
Stop conditions for the sidecar:
|
|
107
|
-
|
|
108
|
-
- preflight or runtime-upgrade decision is missing;
|
|
109
|
-
- human approval is absent or narrower than the requested cutover;
|
|
110
|
-
- protected topology is already degraded beyond the packet's expected caveats;
|
|
111
|
-
- target runtime cannot be verified by process path, port listener, and command
|
|
112
|
-
evidence;
|
|
113
|
-
- any step would require `rig down` or destructive DB restore without a new
|
|
114
|
-
explicit human decision.
|
|
115
|
-
|
|
116
|
-
Generic primitive: this upgrade specialization composes over the
|
|
117
|
-
`sidecar-operator` skill (the underlying out-of-band-operator pattern;
|
|
118
|
-
this skill is the upgrade-specific specialization).
|
|
119
|
-
|
|
120
|
-
## What Changed On 2026-04-27
|
|
121
|
-
|
|
122
|
-
Initial belief:
|
|
123
|
-
|
|
124
|
-
- All rigs had to be down before daemon restart.
|
|
125
|
-
- Live upgrade was research-gated because DB migrations might break session/node
|
|
126
|
-
state while sessions were running.
|
|
127
|
-
- A parallel isolated daemon/adoption path looked necessary before production use.
|
|
70
|
+
This asks the installed `rig` for its version, daemon status, node inventory,
|
|
71
|
+
and plugin inventory. A missing surface remains visible with a suggested next
|
|
72
|
+
probe. `ready: false` means the agent must resolve or consciously bound the gap;
|
|
73
|
+
it does not mean the script should mutate anything.
|
|
128
74
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
- A daemon-only hot cutover preserved the live `example-seat` tmux
|
|
132
|
-
sessions.
|
|
133
|
-
- The old daemon was stopped without running `rig down`.
|
|
134
|
-
- The new source-pinned daemon started against the same production DB.
|
|
135
|
-
- `rig ps --nodes --json`, `rig capture`, and `rig restore-check` could inspect the
|
|
136
|
-
still-running continuity seats after restart.
|
|
75
|
+
### Back up SQLite
|
|
137
76
|
|
|
138
|
-
|
|
139
|
-
back up state, stop only the daemon, start the new daemon, then verify that live
|
|
140
|
-
sessions are still observable and manageable.
|
|
141
|
-
|
|
142
|
-
## Proven Hot Path
|
|
143
|
-
|
|
144
|
-
Use this as the canonical first-choice workflow for a host where continuity rigs
|
|
145
|
-
are tmux-backed and the operator wants non-disruptive daemon upgrade.
|
|
146
|
-
|
|
147
|
-
0. **Spawn the out-of-band operator when live cutover is required.**
|
|
148
|
-
The sidecar must be host-local and outside the managed topology being
|
|
149
|
-
upgraded. Keep the lifecycle/runtime-upgrade owner inside the rig so it can
|
|
150
|
-
continue to observe, ask questions, and absorb the handback.
|
|
151
|
-
|
|
152
|
-
1. **Choose continuity targets.**
|
|
153
|
-
Name the exact rigs that must remain live. Everything else is source material.
|
|
154
|
-
Do not let "nice to resume later" rigs expand the success criteria.
|
|
155
|
-
|
|
156
|
-
2. **Freeze active work.**
|
|
157
|
-
Get continuity seats to a stable/idle checkpoint. Record resume commands if
|
|
158
|
-
available.
|
|
159
|
-
|
|
160
|
-
3. **Inventory with filters.**
|
|
161
|
-
Do not dump full `rig ps` output on this host. Use filtered JSON:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
rig ps --nodes --json \
|
|
165
|
-
| jq -r 'map(select(.rigName=="<rig>")) | sort_by(.canonicalSessionName)[] | "\(.canonicalSessionName) \(.sessionStatus) \(.startupStatus) \(.resumeToken // "none")"'
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
4. **Take a non-destructive snapshot of each continuity rig.**
|
|
169
|
-
This records rollback/recovery metadata without killing tmux sessions:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
rig snapshot <rigId>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Verify the snapshot payload in SQLite has the expected nodes, sessions,
|
|
176
|
-
checkpoints, and resume tokens.
|
|
177
|
-
|
|
178
|
-
5. **Create a post-snapshot SQLite backup.**
|
|
179
|
-
Use SQLite's online backup API while the daemon is live. Then run
|
|
180
|
-
`PRAGMA integrity_check` on the backup and verify it contains the continuity
|
|
181
|
-
snapshot.
|
|
182
|
-
|
|
183
|
-
6. **Prepare a clean runtime artifact.**
|
|
184
|
-
Prefer a dedicated clean source worktree pinned to a commit:
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
git worktree add --detach /path/to/openrig-runtime-<shortsha> <commit>
|
|
188
|
-
cd /path/to/openrig-runtime-<shortsha>
|
|
189
|
-
PATH=/path/to/node22/bin:$PATH npm ci
|
|
190
|
-
PATH=/path/to/node22/bin:$PATH npm run build
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Use even/LTS Node. The 2026-04-27 upgrade used Node `v22.22.1`.
|
|
194
|
-
|
|
195
|
-
7. **Stop only the daemon.**
|
|
196
|
-
First try:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
rig daemon stop
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
If the daemon state file is missing but the PID is known and verified as the
|
|
203
|
-
OpenRig daemon, gracefully terminate that PID:
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
kill -TERM <daemonPid>
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Do not use `kill -9` unless recovering from a wedged process with human
|
|
210
|
-
approval. Do not run `rig down` on continuity rigs.
|
|
211
|
-
|
|
212
|
-
8. **Start the pinned daemon against the same production DB.**
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
PATH=/path/to/node22/bin:$PATH \
|
|
216
|
-
node packages/cli/dist/index.js daemon start \
|
|
217
|
-
--port 7433 \
|
|
218
|
-
--host 127.0.0.1 \
|
|
219
|
-
--db ~/.openrig/openrig.sqlite
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
9. **Verify management continuity.**
|
|
223
|
-
Required checks:
|
|
224
|
-
|
|
225
|
-
```bash
|
|
226
|
-
rig daemon status
|
|
227
|
-
lsof -nP -iTCP:7433 -sTCP:LISTEN
|
|
228
|
-
rig ps --nodes --json | jq -r 'map(select(.rigName=="<rig>")) | ...'
|
|
229
|
-
rig capture --rig <rig> --lines 1 --json
|
|
230
|
-
rig restore-check --rig <rig>
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
Success means the daemon is healthy, continuity sessions remain running/ready,
|
|
234
|
-
capture works, transcripts are present, and `restore-check` reports no red
|
|
235
|
-
blockers.
|
|
236
|
-
|
|
237
|
-
10. **Align the default CLI with the new daemon.**
|
|
238
|
-
If `rig` is a wrapper, make sure it delegates to the new CLI.
|
|
239
|
-
|
|
240
|
-
11. **Write evidence and hand back.**
|
|
241
|
-
The sidecar writes a cutover evidence packet with daemon provenance,
|
|
242
|
-
protected topology counts, representative capture/restore checks, smoke
|
|
243
|
-
results, caveats, and rollback state. Then it notifies the original in-rig
|
|
244
|
-
lifecycle/runtime-upgrade owner. Do not rely on chat as the only proof.
|
|
245
|
-
|
|
246
|
-
## Proof Point: Daemon-Only Hot Cutover
|
|
247
|
-
|
|
248
|
-
A clean source runtime on an LTS Node version replaced the old daemon while one
|
|
249
|
-
tmux-backed continuity rig stayed live. The operator took a post-snapshot online
|
|
250
|
-
database backup, verified its integrity, stopped only the daemon, started the
|
|
251
|
-
new runtime against the same database, and confirmed that every protected seat
|
|
252
|
-
remained running and ready with no red restore blockers.
|
|
253
|
-
|
|
254
|
-
Important caveat: this proves hot daemon cutover for the tested tmux-backed
|
|
255
|
-
Claude runtime shape. It does not prove that arbitrary migrations,
|
|
256
|
-
non-tmux runtimes, service-backed rigs, or dead sessions can be recovered without
|
|
257
|
-
separate testing.
|
|
258
|
-
|
|
259
|
-
## Proof Point: Out-of-Band Sidecar Cutover
|
|
260
|
-
|
|
261
|
-
A lifecycle owner prepared the decision and preflight artifacts, then spawned a
|
|
262
|
-
host-local tmux sidecar outside the managed topology. The sidecar stopped only
|
|
263
|
-
the daemon, used a verified graceful PID fallback when daemon state was stale,
|
|
264
|
-
started the pinned runtime, aligned the default wrapper, verified the protected
|
|
265
|
-
topology, ran targeted smoke checks, retained cutover evidence, and handed the
|
|
266
|
-
result back while delivery continued.
|
|
267
|
-
|
|
268
|
-
Important caveat: live `rig up --plan --json` accepted valid `starter_ref`
|
|
269
|
-
specs and rejected forbidden compositions, but plan-mode output did not emit the
|
|
270
|
-
`resolve_starter.detail.starterContent` stage expected by the Dogfood proof bar.
|
|
271
|
-
This is a product/dogfood caveat, not an upgrade failure.
|
|
272
|
-
|
|
273
|
-
## Brittle Edges Observed On 2026-04-27
|
|
274
|
-
|
|
275
|
-
Operator lessons from the daemon upgrade:
|
|
276
|
-
|
|
277
|
-
- `rig down` kills OpenRig-launched tmux sessions. Do not use it as a snapshot
|
|
278
|
-
primitive when resumability depends on keeping sessions alive.
|
|
279
|
-
- Old daemon/CLI combinations can be partially functional even when newer health
|
|
280
|
-
checks fail. A `/healthz` mismatch blocked `rig down --snapshot` even though
|
|
281
|
-
other daemon APIs still worked.
|
|
282
|
-
- `rig daemon stop` can fail when the daemon state file is missing. Operators
|
|
283
|
-
need a verified PID fallback, but the product should reconcile daemon state
|
|
284
|
-
automatically.
|
|
285
|
-
- If the sidecar has an operator auto window and `rig daemon stop` refuses only
|
|
286
|
-
because state is stale, a verified graceful PID termination is acceptable:
|
|
287
|
-
identify the daemon PID, verify its runtime path, send graceful `TERM`, and
|
|
288
|
-
verify the port is gone before starting the target daemon.
|
|
289
|
-
- CLI and daemon provenance can drift. Repointing or verifying the default
|
|
290
|
-
`rig` wrapper is part of the upgrade, not an afterthought.
|
|
291
|
-
- Raw `rig ps` output can be noisy. Use filtered JSON until the product
|
|
292
|
-
has compact first-class inventory views.
|
|
293
|
-
- Snapshot and backup verification is too manual. The SOP currently depends on
|
|
294
|
-
checking snapshot rows, resume tokens, SQLite backups, and integrity by hand.
|
|
295
|
-
|
|
296
|
-
## Disruptive Restore Path
|
|
297
|
-
|
|
298
|
-
Use disruptive restore when the goal is to test recovery from killed sessions, or
|
|
299
|
-
when hot upgrade is blocked by incompatible migrations or corrupted management
|
|
300
|
-
state.
|
|
77
|
+
Take continuity snapshots first:
|
|
301
78
|
|
|
302
79
|
```bash
|
|
303
|
-
rig snapshot <
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
rig restore-check --rig <rigName>
|
|
80
|
+
rig snapshot <rig-id>
|
|
81
|
+
node "$SKILL_DIR/scripts/backup-sqlite.mjs" \
|
|
82
|
+
--source "$OPENRIG_HOME/openrig.sqlite" \
|
|
83
|
+
--destination "/safe/path/openrig-before-upgrade.sqlite"
|
|
308
84
|
```
|
|
309
85
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|---|---|---|
|
|
314
|
-
| `fully_restored` | All nodes resumed or rebuilt | Resume normal work |
|
|
315
|
-
| `partially_restored` | Some nodes succeeded, some failed | Inspect failed nodes and relaunch manually |
|
|
316
|
-
| `failed` | Zero nodes restored | Check daemon logs, snapshot integrity, provider tokens |
|
|
317
|
-
| `not_attempted` | Pre-restore blockers | Fix blockers before retrying |
|
|
318
|
-
|
|
319
|
-
Do not confuse this path with hot upgrade. `rig down` is intentionally
|
|
320
|
-
disruptive.
|
|
321
|
-
|
|
322
|
-
## Stop Conditions
|
|
86
|
+
The helper refuses to overwrite a destination, uses SQLite's backup operation,
|
|
87
|
+
and verifies the backup with `PRAGMA integrity_check`. It does not stop the
|
|
88
|
+
daemon or restore a database.
|
|
323
89
|
|
|
324
|
-
|
|
90
|
+
### Plan or apply safe managed-plugin refreshes
|
|
325
91
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
- no verified DB backup exists after continuity snapshots;
|
|
329
|
-
- the target runtime cannot build under an even/LTS Node version;
|
|
330
|
-
- the daemon migration plan is known to rewrite session/binding semantics in a
|
|
331
|
-
way that has not been tested;
|
|
332
|
-
- disk space or DB integrity checks fail;
|
|
333
|
-
- the operator cannot identify the current daemon PID and runtime source.
|
|
92
|
+
Plugin trees may contain skills as well as hooks and metadata. Compare the last
|
|
93
|
+
packaged ancestor, the target package, and the live installed tree:
|
|
334
94
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
1. Stop the new daemon.
|
|
343
|
-
2. Start the previous runtime or npm/global daemon.
|
|
344
|
-
3. Verify `/healthz`, filtered continuity inventory, and `rig capture`.
|
|
345
|
-
4. Restore the DB backup only if migration or DB corruption is confirmed. Do not
|
|
346
|
-
replace the DB just because continuity sessions are still live but management
|
|
347
|
-
projection is degraded.
|
|
95
|
+
```bash
|
|
96
|
+
node "$SKILL_DIR/scripts/refresh-managed-plugin.mjs" \
|
|
97
|
+
--ancestor /path/to/previous/package/plugin \
|
|
98
|
+
--target /path/to/target/package/plugin \
|
|
99
|
+
--live "$OPENRIG_HOME/plugins/<plugin>"
|
|
100
|
+
```
|
|
348
101
|
|
|
349
|
-
|
|
102
|
+
Review the sorted decisions. To apply only `refresh-safe` and `add-safe` files:
|
|
350
103
|
|
|
351
104
|
```bash
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
105
|
+
node "$SKILL_DIR/scripts/refresh-managed-plugin.mjs" \
|
|
106
|
+
--ancestor /path/to/previous/package/plugin \
|
|
107
|
+
--target /path/to/target/package/plugin \
|
|
108
|
+
--live "$OPENRIG_HOME/plugins/<plugin>" \
|
|
109
|
+
--apply-safe
|
|
355
110
|
```
|
|
356
111
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
112
|
+
The helper never deletes a live file and never overwrites a local modification.
|
|
113
|
+
Local deletions, live-only files, target removals, and ambiguous types are
|
|
114
|
+
reported for the agent to resolve. Re-run the plan after any manual resolution.
|
|
115
|
+
|
|
116
|
+
## Agent-led continuity upgrade
|
|
117
|
+
|
|
118
|
+
This is a decision guide, not a command recipe. Adapt paths and checks to the
|
|
119
|
+
host in front of you.
|
|
120
|
+
|
|
121
|
+
1. Inspect the current CLI, daemon, nodes, and plugins with the helper.
|
|
122
|
+
2. Checkpoint active work and record the exact protected tmux/session census.
|
|
123
|
+
3. Run `rig snapshot <rig-id>` for each protected rig.
|
|
124
|
+
4. Create and verify the SQLite backup.
|
|
125
|
+
5. Build or stage the target runtime separately. Prove its version and source
|
|
126
|
+
identity before touching the live daemon.
|
|
127
|
+
6. Run `rig daemon stop`. Verify both the listener and the identified daemon
|
|
128
|
+
process are gone. If the command returns while either remains, stop: inspect
|
|
129
|
+
identity and use the host's authorized recovery procedure. Do not blindly
|
|
130
|
+
signal a PID.
|
|
131
|
+
7. Start the target with `rig daemon start` or the host's known wrapper. Verify
|
|
132
|
+
daemon status, process path, listener, version, and database integrity.
|
|
133
|
+
8. Run the plugin refresh helper in plan mode. Apply safe writes only after the
|
|
134
|
+
three roots and classifications make sense; resolve preserved paths one at a
|
|
135
|
+
time when required.
|
|
136
|
+
9. Verify protected seats with `rig ps --nodes -A --json`, representative
|
|
137
|
+
`rig capture`, and `rig restore-check` where applicable. `-A` is required:
|
|
138
|
+
without it the node read is your CURRENT rig only, and a daemon upgrade
|
|
139
|
+
protects seats across every rig on the host — so the narrow form reports
|
|
140
|
+
success while seats outside your rig went unchecked.
|
|
141
|
+
10. Align wrappers only after deriving how that host owns them. Use its existing
|
|
142
|
+
mechanism; this skill does not rewrite launchers.
|
|
143
|
+
11. Record the observed result, remaining local preservation decisions, and the
|
|
144
|
+
exact rollback runtime and backup.
|
|
145
|
+
|
|
146
|
+
## Stop and hand back when
|
|
147
|
+
|
|
148
|
+
- a protected tmux session is missing before the upgrade;
|
|
149
|
+
- database integrity or backup verification fails;
|
|
150
|
+
- the running process or listener does not match the expected runtime;
|
|
151
|
+
- daemon stop reports success but the identified process or listener remains;
|
|
152
|
+
- the target cannot start against the existing database;
|
|
153
|
+
- plugin roots cannot be tied to a known ancestor and target;
|
|
154
|
+
- a required plugin path is classified as locally modified or deleted and the
|
|
155
|
+
correct ownership decision is unclear;
|
|
156
|
+
- continuing would require `rig down`, destructive restore, credential changes,
|
|
157
|
+
or broader authority than the operator has.
|
|
158
|
+
|
|
159
|
+
When stopping, report the last proven-good state, the first failed expectation,
|
|
160
|
+
the exact evidence, and the smallest decision needed from the owner. Preserve
|
|
161
|
+
live seats and the database unless recovery specifically requires otherwise.
|
|
162
|
+
|
|
163
|
+
## Rollback is also agent-led
|
|
164
|
+
|
|
165
|
+
Prefer starting the previous known runtime against the still-valid database.
|
|
166
|
+
Restore the database backup only when a migration or corruption finding requires
|
|
167
|
+
it; a degraded projection alone is not proof that the database should be
|
|
168
|
+
replaced. After rollback, repeat the same process, listener, database, plugin,
|
|
169
|
+
and seat observations used during the forward path.
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
2
|
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
3
|
name: "openrig-upgrade"
|
|
4
|
-
version: "0.5.
|
|
4
|
+
version: "0.5.8"
|
|
5
5
|
taxonomy: "skills"
|
|
6
|
-
purpose: "Use when
|
|
6
|
+
purpose: "Use when an agent is preparing or performing an OpenRig CLI/daemon upgrade and must preserve live seats, verify each mutation, or reconcile managed plugin and skill files without overwriting local work."
|
|
7
7
|
files:
|
|
8
8
|
- path: "SKILL.md"
|
|
9
9
|
role: "instruction"
|
|
10
|
-
summary: "Use when
|
|
10
|
+
summary: "Use when an agent is preparing or performing an OpenRig CLI/daemon upgrade and must preserve live seats, verify each mutation, or reconcile managed plugin and skill files without overwriting local work."
|
|
11
|
+
- path: "scripts/backup-sqlite.mjs"
|
|
12
|
+
role: "reference"
|
|
13
|
+
- path: "scripts/inspect-upgrade.mjs"
|
|
14
|
+
role: "reference"
|
|
15
|
+
- path: "scripts/refresh-managed-plugin.mjs"
|
|
16
|
+
role: "reference"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
function argument(name) {
|
|
8
|
+
const index = process.argv.indexOf(name);
|
|
9
|
+
return index === -1 ? undefined : process.argv[index + 1];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function fail(message, next) {
|
|
13
|
+
process.stderr.write(`${JSON.stringify({ ok: false, error: message, next }, null, 2)}\n`);
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const source = argument("--source");
|
|
18
|
+
const destination = argument("--destination");
|
|
19
|
+
if (!source || !destination) {
|
|
20
|
+
fail("--source and --destination are required", "choose an existing OpenRig SQLite database and a new backup path");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const sourcePath = path.resolve(source);
|
|
24
|
+
const destinationPath = path.resolve(destination);
|
|
25
|
+
if (!fs.existsSync(sourcePath) || !fs.statSync(sourcePath).isFile()) {
|
|
26
|
+
fail(`source database is not a regular file: ${sourcePath}`, "derive the live database path from daemon status before retrying");
|
|
27
|
+
}
|
|
28
|
+
if (fs.existsSync(destinationPath)) {
|
|
29
|
+
fail(`destination already exists: ${destinationPath}`, "choose a new path; this helper never overwrites a backup");
|
|
30
|
+
}
|
|
31
|
+
if (destinationPath.includes("'") || destinationPath.includes("\n")) {
|
|
32
|
+
fail("destination contains a quote or newline unsupported by the sqlite3 backup command", "choose a simple filesystem path");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
fs.mkdirSync(path.dirname(destinationPath), { recursive: true });
|
|
36
|
+
const sqlite = process.env.OPENRIG_SQLITE_BIN || "sqlite3";
|
|
37
|
+
const backup = spawnSync(sqlite, [sourcePath, `.backup '${destinationPath}'`], { encoding: "utf8" });
|
|
38
|
+
if (backup.status !== 0) {
|
|
39
|
+
fs.rmSync(destinationPath, { force: true });
|
|
40
|
+
fail(
|
|
41
|
+
backup.stderr?.trim() || backup.stdout?.trim() || backup.error?.message || "sqlite3 backup failed",
|
|
42
|
+
`run ${sqlite} against the source directly, resolve locking/path/tooling errors, then choose a fresh destination`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const check = spawnSync(sqlite, [destinationPath, "PRAGMA integrity_check;"], { encoding: "utf8" });
|
|
47
|
+
const integrity = check.stdout?.trim();
|
|
48
|
+
if (check.status !== 0 || integrity !== "ok") {
|
|
49
|
+
fail(
|
|
50
|
+
check.stderr?.trim() || `backup integrity result was ${JSON.stringify(integrity)}`,
|
|
51
|
+
"preserve the failed backup for diagnosis only; do not use it for rollback",
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
process.stdout.write(`${JSON.stringify({
|
|
56
|
+
schema: "openrig-sqlite-backup/v1",
|
|
57
|
+
ok: true,
|
|
58
|
+
source: sourcePath,
|
|
59
|
+
destination: destinationPath,
|
|
60
|
+
bytes: fs.statSync(destinationPath).size,
|
|
61
|
+
integrity,
|
|
62
|
+
}, null, 2)}\n`);
|