@openrig/cli 0.7.12 → 0.7.14
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/README.md +5 -5
- package/daemon/assets/plugins/openrig/.claude-plugin/icon.png +0 -0
- package/daemon/assets/plugins/openrig/.claude-plugin/plugin.json +2 -2
- package/daemon/assets/plugins/openrig/.codex-plugin/plugin.json +4 -2
- package/daemon/assets/plugins/openrig/.cursor-plugin/plugin.json +1 -1
- package/daemon/assets/plugins/openrig/plugin.json +2 -2
- package/daemon/assets/plugins/openrig/skills/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +2 -2
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +5 -3
- package/daemon/assets/plugins/openrig-core/README.md +6 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/activity-relay.cjs +125 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +24 -1
- package/daemon/assets/skills/rigs/SKILL.md +11 -4
- package/daemon/context-packs/help/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +87 -22
- package/daemon/context-packs/reference/getting-started.md +30 -13
- package/daemon/context-packs/reference/manifest.yaml +1 -1
- package/daemon/context-packs/reference/rig-spec.md +18 -0
- package/daemon/context-packs/reference/tmux-servers.md +10 -1
- package/daemon/context-packs/reference/whats-new.md +302 -179
- package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
- package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
- 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/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-software-factory/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- 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/SKILL.md +5 -0
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/context-packs/skills/core/working-with-an-openrig-team/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/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +27 -4
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -2
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +32 -9
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-runner.d.ts +49 -1
- package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runner.js +343 -28
- package/daemon/dist/adapters/pi-runner.js.map +1 -1
- package/daemon/dist/adapters/tmux-exec.d.ts +4 -4
- package/daemon/dist/adapters/tmux-exec.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-exec.js +37 -8
- package/daemon/dist/adapters/tmux-exec.js.map +1 -1
- package/daemon/dist/adapters/tmux-server.d.ts +9 -1
- package/daemon/dist/adapters/tmux-server.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux-server.js +36 -4
- package/daemon/dist/adapters/tmux-server.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +9 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +23 -3
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/attention-surface.d.ts +8 -0
- package/daemon/dist/attention-surface.d.ts.map +1 -1
- package/daemon/dist/attention-surface.js.map +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/connection-contract-surface.d.ts +2 -0
- package/daemon/dist/connection-contract-surface.d.ts.map +1 -0
- package/daemon/dist/connection-contract-surface.js +4 -0
- package/daemon/dist/connection-contract-surface.js.map +1 -0
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +12 -0
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/160_network_bindings.d.ts +7 -0
- package/daemon/dist/db/migrations/160_network_bindings.d.ts.map +1 -0
- package/daemon/dist/db/migrations/160_network_bindings.js +26 -0
- package/daemon/dist/db/migrations/160_network_bindings.js.map +1 -0
- package/daemon/dist/db/migrations/161_network_receipts.d.ts +8 -0
- package/daemon/dist/db/migrations/161_network_receipts.d.ts.map +1 -0
- package/daemon/dist/db/migrations/161_network_receipts.js +25 -0
- package/daemon/dist/db/migrations/161_network_receipts.js.map +1 -0
- package/daemon/dist/db/migrations/162_session_address_read_indexes.d.ts +5 -0
- package/daemon/dist/db/migrations/162_session_address_read_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/162_session_address_read_indexes.js +12 -0
- package/daemon/dist/db/migrations/162_session_address_read_indexes.js.map +1 -0
- package/daemon/dist/db/migrations/163_network_installations.d.ts +7 -0
- package/daemon/dist/db/migrations/163_network_installations.d.ts.map +1 -0
- package/daemon/dist/db/migrations/163_network_installations.js +23 -0
- package/daemon/dist/db/migrations/163_network_installations.js.map +1 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.d.ts +5 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.d.ts.map +1 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.js +9 -0
- package/daemon/dist/db/migrations/164_queue_items_reply_to_index.js.map +1 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.d.ts +4 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.d.ts.map +1 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.js +17 -0
- package/daemon/dist/db/migrations/166_queue_list_read_indexes.js.map +1 -0
- package/daemon/dist/domain/agent-activity-store.d.ts +8 -0
- package/daemon/dist/domain/agent-activity-store.d.ts.map +1 -1
- package/daemon/dist/domain/agent-activity-store.js +14 -0
- package/daemon/dist/domain/agent-activity-store.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +5 -0
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +5 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +12 -3
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/connection-contract.d.ts +111 -0
- package/daemon/dist/domain/connection-contract.d.ts.map +1 -0
- package/daemon/dist/domain/connection-contract.js +113 -0
- package/daemon/dist/domain/connection-contract.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +8 -3
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.d.ts.map +1 -1
- package/daemon/dist/domain/draft-aware-delivery.js +2 -1
- package/daemon/dist/domain/draft-aware-delivery.js.map +1 -1
- package/daemon/dist/domain/execution-view.js +2 -2
- package/daemon/dist/domain/execution-view.js.map +1 -1
- package/daemon/dist/domain/hosts/pairing-ask.d.ts +8 -0
- package/daemon/dist/domain/hosts/pairing-ask.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/pairing-ask.js +20 -0
- package/daemon/dist/domain/hosts/pairing-ask.js.map +1 -1
- package/daemon/dist/domain/input-read-diagnostic.d.ts +30 -0
- package/daemon/dist/domain/input-read-diagnostic.d.ts.map +1 -0
- package/daemon/dist/domain/input-read-diagnostic.js +32 -0
- package/daemon/dist/domain/input-read-diagnostic.js.map +1 -0
- package/daemon/dist/domain/install-engine.d.ts +5 -0
- package/daemon/dist/domain/install-engine.d.ts.map +1 -1
- package/daemon/dist/domain/install-engine.js +28 -26
- package/daemon/dist/domain/install-engine.js.map +1 -1
- package/daemon/dist/domain/install-verifier.d.ts +5 -1
- package/daemon/dist/domain/install-verifier.d.ts.map +1 -1
- package/daemon/dist/domain/install-verifier.js +12 -1
- package/daemon/dist/domain/install-verifier.js.map +1 -1
- package/daemon/dist/domain/managed-block-records.d.ts +9 -3
- package/daemon/dist/domain/managed-block-records.d.ts.map +1 -1
- package/daemon/dist/domain/managed-block-records.js +43 -8
- package/daemon/dist/domain/managed-block-records.js.map +1 -1
- package/daemon/dist/domain/managed-blocks.d.ts +40 -3
- package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
- package/daemon/dist/domain/managed-blocks.js +151 -39
- package/daemon/dist/domain/managed-blocks.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +3 -2
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-model-picker.d.ts +8 -0
- package/daemon/dist/domain/native-model-picker.d.ts.map +1 -0
- package/daemon/dist/domain/native-model-picker.js +35 -0
- package/daemon/dist/domain/native-model-picker.js.map +1 -0
- package/daemon/dist/domain/native-process-lineage.d.ts +6 -0
- package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
- package/daemon/dist/domain/native-process-lineage.js +34 -29
- package/daemon/dist/domain/native-process-lineage.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +6 -0
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +124 -2
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/network/hub-client.d.ts +40 -0
- package/daemon/dist/domain/network/hub-client.d.ts.map +1 -0
- package/daemon/dist/domain/network/hub-client.js +102 -0
- package/daemon/dist/domain/network/hub-client.js.map +1 -0
- package/daemon/dist/domain/network/network-bindings.d.ts +104 -0
- package/daemon/dist/domain/network/network-bindings.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-bindings.js +272 -0
- package/daemon/dist/domain/network/network-bindings.js.map +1 -0
- package/daemon/dist/domain/network/network-connector.d.ts +77 -0
- package/daemon/dist/domain/network/network-connector.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-connector.js +380 -0
- package/daemon/dist/domain/network/network-connector.js.map +1 -0
- package/daemon/dist/domain/network/network-installations.d.ts +97 -0
- package/daemon/dist/domain/network/network-installations.d.ts.map +1 -0
- package/daemon/dist/domain/network/network-installations.js +371 -0
- package/daemon/dist/domain/network/network-installations.js.map +1 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +6 -5
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts +1 -1
- package/daemon/dist/domain/operation-correlation.d.ts.map +1 -1
- package/daemon/dist/domain/operation-correlation.js +1 -1
- package/daemon/dist/domain/operation-correlation.js.map +1 -1
- package/daemon/dist/domain/package-install-service.d.ts +1 -0
- package/daemon/dist/domain/package-install-service.d.ts.map +1 -1
- package/daemon/dist/domain/package-install-service.js +2 -1
- package/daemon/dist/domain/package-install-service.js.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.d.ts +9 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +50 -8
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/process-observation-pass.d.ts +20 -0
- package/daemon/dist/domain/process-observation-pass.d.ts.map +1 -0
- package/daemon/dist/domain/process-observation-pass.js +80 -0
- package/daemon/dist/domain/process-observation-pass.js.map +1 -0
- package/daemon/dist/domain/proof/judgments.d.ts +12 -13
- package/daemon/dist/domain/proof/judgments.d.ts.map +1 -1
- package/daemon/dist/domain/proof/judgments.js +14 -0
- package/daemon/dist/domain/proof/judgments.js.map +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts +1 -1
- package/daemon/dist/domain/proof/source-watch.d.ts.map +1 -1
- package/daemon/dist/domain/proof/source-watch.js +45 -22
- package/daemon/dist/domain/proof/source-watch.js.map +1 -1
- package/daemon/dist/domain/provider/claude-usage-reader.d.ts +3 -3
- package/daemon/dist/domain/provider/claude-usage-reader.d.ts.map +1 -1
- package/daemon/dist/domain/provider/claude-usage-reader.js +16 -5
- package/daemon/dist/domain/provider/claude-usage-reader.js.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.d.ts.map +1 -1
- package/daemon/dist/domain/provider/codex-limit-banner.js +2 -1
- package/daemon/dist/domain/provider/codex-limit-banner.js.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.d.ts +6 -0
- package/daemon/dist/domain/provider/provider-signals.d.ts.map +1 -1
- package/daemon/dist/domain/provider/provider-signals.js +9 -3
- package/daemon/dist/domain/provider/provider-signals.js.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.d.ts.map +1 -1
- package/daemon/dist/domain/provider/reactive-tap.js +6 -0
- package/daemon/dist/domain/provider/reactive-tap.js.map +1 -1
- package/daemon/dist/domain/queue-erasure.d.ts +10 -6
- package/daemon/dist/domain/queue-erasure.d.ts.map +1 -1
- package/daemon/dist/domain/queue-erasure.js +31 -18
- package/daemon/dist/domain/queue-erasure.js.map +1 -1
- package/daemon/dist/domain/queue-recovery.d.ts +10 -1
- package/daemon/dist/domain/queue-recovery.d.ts.map +1 -1
- package/daemon/dist/domain/queue-recovery.js +25 -3
- package/daemon/dist/domain/queue-recovery.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +39 -3
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +132 -6
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/queue-retention.d.ts +1 -1
- package/daemon/dist/domain/queue-retention.d.ts.map +1 -1
- package/daemon/dist/domain/queue-retention.js +1 -0
- package/daemon/dist/domain/queue-retention.js.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.d.ts +5 -0
- package/daemon/dist/domain/queue-stuck-sweep.d.ts.map +1 -1
- package/daemon/dist/domain/queue-stuck-sweep.js +408 -68
- package/daemon/dist/domain/queue-stuck-sweep.js.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-ladder.js +45 -27
- package/daemon/dist/domain/queue-wake-ladder.js.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.d.ts +3 -0
- package/daemon/dist/domain/queue-wake-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-wake-repository.js +6 -0
- package/daemon/dist/domain/queue-wake-repository.js.map +1 -1
- package/daemon/dist/domain/receiver-context.d.ts +9 -0
- package/daemon/dist/domain/receiver-context.d.ts.map +1 -0
- package/daemon/dist/domain/receiver-context.js +25 -0
- package/daemon/dist/domain/receiver-context.js.map +1 -0
- package/daemon/dist/domain/reconciler.d.ts +15 -6
- package/daemon/dist/domain/reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/reconciler.js +26 -26
- package/daemon/dist/domain/reconciler.js.map +1 -1
- package/daemon/dist/domain/restore-guidance.d.ts +9 -4
- package/daemon/dist/domain/restore-guidance.d.ts.map +1 -1
- package/daemon/dist/domain/restore-guidance.js +43 -27
- package/daemon/dist/domain/restore-guidance.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +6 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +69 -5
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/restore-preconditions.d.ts.map +1 -1
- package/daemon/dist/domain/restore-preconditions.js +2 -1
- package/daemon/dist/domain/restore-preconditions.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rosters.d.ts +12 -0
- package/daemon/dist/domain/rosters.d.ts.map +1 -1
- package/daemon/dist/domain/rosters.js +24 -1
- package/daemon/dist/domain/rosters.js.map +1 -1
- package/daemon/dist/domain/runner-permissions.d.ts.map +1 -1
- package/daemon/dist/domain/runner-permissions.js +9 -2
- package/daemon/dist/domain/runner-permissions.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +9 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js +2 -0
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts +3 -1
- package/daemon/dist/domain/seat-delivery-guard.d.ts.map +1 -1
- package/daemon/dist/domain/seat-delivery-guard.js +8 -5
- package/daemon/dist/domain/seat-delivery-guard.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts +9 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +75 -9
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.d.ts +4 -0
- package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
- package/daemon/dist/domain/seat-identity-reconciler.js +18 -2
- package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.d.ts +13 -8
- package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-lifecycle-service.js +46 -26
- package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-structural-activity-service.js +7 -4
- package/daemon/dist/domain/seat-structural-activity-service.js.map +1 -1
- package/daemon/dist/domain/session-registry.d.ts.map +1 -1
- package/daemon/dist/domain/session-registry.js +16 -5
- package/daemon/dist/domain/session-registry.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +4 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +44 -10
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +5 -2
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +60 -16
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.d.ts +0 -3
- package/daemon/dist/domain/slow-op-recorder.d.ts.map +1 -1
- package/daemon/dist/domain/slow-op-recorder.js +5 -34
- package/daemon/dist/domain/slow-op-recorder.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +2 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +22 -13
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +8 -3
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +5 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +11 -6
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/team-operations.d.ts +20 -0
- package/daemon/dist/domain/team-operations.d.ts.map +1 -0
- package/daemon/dist/domain/team-operations.js +23 -0
- package/daemon/dist/domain/team-operations.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +12 -2
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +52 -2
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-live-workspace.d.ts +42 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.js +118 -0
- package/daemon/dist/domain/terminal/herdr-live-workspace.js.map +1 -0
- package/daemon/dist/domain/terminal/herdr-sessions.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-sessions.js +3 -0
- package/daemon/dist/domain/terminal/herdr-sessions.js.map +1 -1
- package/daemon/dist/domain/terminal/rex-adapter.d.ts +3 -0
- package/daemon/dist/domain/terminal/rex-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/rex-adapter.js +10 -1
- package/daemon/dist/domain/terminal/rex-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts +76 -0
- package/daemon/dist/domain/terminal/rex-agent-status.d.ts.map +1 -0
- package/daemon/dist/domain/terminal/rex-agent-status.js +168 -0
- package/daemon/dist/domain/terminal/rex-agent-status.js.map +1 -0
- package/daemon/dist/domain/terminal/terminal-provider.d.ts +12 -1
- package/daemon/dist/domain/terminal/terminal-provider.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.d.ts +2 -0
- package/daemon/dist/domain/terminal/terminal-service.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/terminal-service.js +3 -2
- package/daemon/dist/domain/terminal/terminal-service.js.map +1 -1
- package/daemon/dist/domain/tmux-option-defaults.d.ts +4 -4
- package/daemon/dist/domain/tmux-option-defaults.d.ts.map +1 -1
- package/daemon/dist/domain/tmux-option-defaults.js +25 -12
- package/daemon/dist/domain/tmux-option-defaults.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +12 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.d.ts +8 -2
- package/daemon/dist/domain/user-settings/settings-browser.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-browser.js +5 -2
- package/daemon/dist/domain/user-settings/settings-browser.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +15 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +108 -44
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.d.ts.map +1 -1
- package/daemon/dist/domain/watchdog-delivery-receipts.js +8 -3
- package/daemon/dist/domain/watchdog-delivery-receipts.js.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-exception-escalation.js +4 -2
- package/daemon/dist/domain/workflow-exception-escalation.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +8 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +34 -10
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workflow-validator.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-validator.js +16 -0
- package/daemon/dist/domain/workflow-validator.js.map +1 -1
- package/daemon/dist/herdr-live-workspace-surface.d.ts +2 -0
- package/daemon/dist/herdr-live-workspace-surface.d.ts.map +1 -0
- package/daemon/dist/herdr-live-workspace-surface.js +2 -0
- package/daemon/dist/herdr-live-workspace-surface.js.map +1 -0
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +3 -0
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/routes/activity.d.ts.map +1 -1
- package/daemon/dist/routes/activity.js +12 -0
- package/daemon/dist/routes/activity.js.map +1 -1
- package/daemon/dist/routes/attention.d.ts.map +1 -1
- package/daemon/dist/routes/attention.js +5 -1
- package/daemon/dist/routes/attention.js.map +1 -1
- package/daemon/dist/routes/hosts.d.ts.map +1 -1
- package/daemon/dist/routes/hosts.js +30 -46
- package/daemon/dist/routes/hosts.js.map +1 -1
- package/daemon/dist/routes/network.d.ts +13 -0
- package/daemon/dist/routes/network.d.ts.map +1 -0
- package/daemon/dist/routes/network.js +93 -0
- package/daemon/dist/routes/network.js.map +1 -0
- package/daemon/dist/routes/packages.js +3 -1
- package/daemon/dist/routes/packages.js.map +1 -1
- package/daemon/dist/routes/proof.d.ts.map +1 -1
- package/daemon/dist/routes/proof.js +6 -4
- package/daemon/dist/routes/proof.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +13 -0
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigspec.js +13 -4
- package/daemon/dist/routes/rigspec.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +24 -5
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts +1 -0
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +66 -16
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +7 -3
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/terminal.js +1 -1
- package/daemon/dist/routes/terminal.js.map +1 -1
- package/daemon/dist/server.d.ts +3 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +7 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +35 -31
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/dist/tmux-server-start-surface.d.ts +2 -0
- package/daemon/dist/tmux-server-start-surface.d.ts.map +1 -0
- package/daemon/dist/tmux-server-start-surface.js +2 -0
- package/daemon/dist/tmux-server-start-surface.js.map +1 -0
- package/daemon/dist/tmux-server-start.d.ts +13 -0
- package/daemon/dist/tmux-server-start.d.ts.map +1 -0
- package/daemon/dist/tmux-server-start.js +36 -0
- package/daemon/dist/tmux-server-start.js.map +1 -0
- package/daemon/docs/reference/agent-startup-guide.md +52 -17
- package/daemon/docs/reference/agent-state-taxonomy.md +2 -1
- package/daemon/docs/reference/claude-status-line.md +25 -9
- package/daemon/docs/reference/daemon-http-clients.md +42 -0
- package/daemon/docs/reference/getting-started.md +30 -13
- package/daemon/docs/reference/herdr-app.md +3 -2
- package/daemon/docs/reference/hosted-members.md +60 -4
- package/daemon/docs/reference/keeping-a-watch.md +28 -0
- package/daemon/docs/reference/network-connector.md +185 -0
- package/daemon/docs/reference/operation-correlation.md +18 -2
- package/daemon/docs/reference/queue-erasure.md +7 -5
- package/daemon/docs/reference/quickstart.md +4 -4
- package/daemon/docs/reference/rig-spec.md +18 -0
- package/daemon/docs/reference/rosters.md +5 -0
- package/daemon/docs/reference/seat-delivery.md +16 -1
- package/daemon/docs/reference/terminal-sessions.md +12 -0
- package/daemon/docs/reference/tmux-servers.md +10 -1
- package/daemon/docs/reference/whats-new.md +302 -179
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/core/working-with-an-openrig-team/SKILL.md +7 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +66 -24
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +11 -3
- package/dist/build-info.js +3 -3
- package/dist/commands/broadcast.js +7 -3
- package/dist/commands/broadcast.js.map +1 -1
- package/dist/commands/chatroom.d.ts.map +1 -1
- package/dist/commands/chatroom.js +8 -3
- package/dist/commands/chatroom.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +50 -10
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/daemon.d.ts +4 -2
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +28 -4
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts.map +1 -1
- package/dist/commands/down.js +2 -1
- package/dist/commands/down.js.map +1 -1
- package/dist/commands/gateway.d.ts.map +1 -1
- package/dist/commands/gateway.js +5 -0
- package/dist/commands/gateway.js.map +1 -1
- package/dist/commands/host.d.ts +4 -10
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +9 -36
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +96 -3
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/network.d.ts +12 -0
- package/dist/commands/network.d.ts.map +1 -0
- package/dist/commands/network.js +150 -0
- package/dist/commands/network.js.map +1 -0
- package/dist/commands/package.d.ts.map +1 -1
- package/dist/commands/package.js +5 -0
- package/dist/commands/package.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +44 -0
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +68 -3
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/roster.d.ts +15 -0
- package/dist/commands/roster.d.ts.map +1 -1
- package/dist/commands/roster.js +38 -2
- package/dist/commands/roster.js.map +1 -1
- package/dist/commands/seat.d.ts.map +1 -1
- package/dist/commands/seat.js +6 -5
- package/dist/commands/seat.js.map +1 -1
- package/dist/commands/send.d.ts +4 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +6 -1
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.js +1 -1
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/terminal.d.ts.map +1 -1
- package/dist/commands/terminal.js +9 -7
- package/dist/commands/terminal.js.map +1 -1
- package/dist/commands/watchdog.d.ts.map +1 -1
- package/dist/commands/watchdog.js +22 -2
- package/dist/commands/watchdog.js.map +1 -1
- package/dist/config-store.d.ts +14 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +34 -5
- package/dist/config-store.js.map +1 -1
- package/dist/cross-host-executor.d.ts.map +1 -1
- package/dist/cross-host-executor.js +6 -1
- package/dist/cross-host-executor.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +11 -0
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +61 -9
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/daemon-reachability.js +1 -1
- package/dist/daemon-reachability.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lazy-program.d.ts.map +1 -1
- package/dist/lazy-program.js +1 -0
- package/dist/lazy-program.js.map +1 -1
- package/dist/lib/check-in.d.ts +7 -0
- package/dist/lib/check-in.d.ts.map +1 -0
- package/dist/lib/check-in.js +13 -0
- package/dist/lib/check-in.js.map +1 -0
- package/dist/mcp-http.d.ts.map +1 -1
- package/dist/mcp-http.js +25 -2
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-server.d.ts +12 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +185 -57
- package/dist/mcp-server.js.map +1 -1
- package/dist/person-registration-offer.d.ts +10 -0
- package/dist/person-registration-offer.d.ts.map +1 -0
- package/dist/person-registration-offer.js +25 -0
- package/dist/person-registration-offer.js.map +1 -0
- package/dist/terminal-window.d.ts.map +1 -1
- package/dist/terminal-window.js +20 -102
- package/dist/terminal-window.js.map +1 -1
- package/dist/tmux-attachment.d.ts.map +1 -1
- package/dist/tmux-attachment.js +3 -1
- package/dist/tmux-attachment.js.map +1 -1
- package/package.json +1 -1
- package/tui/dist/attention/attention-model.d.ts.map +1 -1
- package/tui/dist/attention/attention-model.js +10 -5
- package/tui/dist/attention/attention-model.js.map +1 -1
- package/tui/dist/config/pairing.d.ts.map +1 -1
- package/tui/dist/config/pairing.js +8 -3
- package/tui/dist/config/pairing.js.map +1 -1
- package/tui/dist/connected-assistants.d.ts +20 -0
- package/tui/dist/connected-assistants.d.ts.map +1 -0
- package/tui/dist/connected-assistants.js +51 -0
- package/tui/dist/connected-assistants.js.map +1 -0
- package/tui/dist/daemon-client.d.ts +8 -0
- package/tui/dist/daemon-client.d.ts.map +1 -1
- package/tui/dist/daemon-client.js +8 -0
- package/tui/dist/daemon-client.js.map +1 -1
- package/tui/dist/hydrate.d.ts.map +1 -1
- package/tui/dist/hydrate.js +19 -4
- package/tui/dist/hydrate.js.map +1 -1
- package/tui/dist/navigator.js +1 -1
- package/tui/dist/navigator.js.map +1 -1
- package/tui/dist/render.d.ts.map +1 -1
- package/tui/dist/render.js +48 -29
- package/tui/dist/render.js.map +1 -1
- package/tui/dist/state.js +2 -2
- package/tui/dist/state.js.map +1 -1
- package/tui/dist/stylize.d.ts.map +1 -1
- package/tui/dist/stylize.js +4 -0
- package/tui/dist/stylize.js.map +1 -1
- package/tui/dist/topology/glyphs.d.ts.map +1 -1
- package/tui/dist/topology/glyphs.js +4 -0
- package/tui/dist/topology/glyphs.js.map +1 -1
- package/tui/dist/topology/host-label.d.ts +2 -0
- package/tui/dist/topology/host-label.d.ts.map +1 -1
- package/tui/dist/topology/host-label.js +7 -1
- package/tui/dist/topology/host-label.js.map +1 -1
- package/tui/dist/types.d.ts +13 -1
- package/tui/dist/types.d.ts.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-connector.d.ts","sourceRoot":"","sources":["../../../src/domain/network/network-connector.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAA8C,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAClI,OAAO,EAAiB,QAAQ,EAAE,KAAK,UAAU,EAAiC,MAAM,iBAAiB,CAAC;AAW1G;0CAC0C;AAC1C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7H;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW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O,CAAC,QAAQ,CAAgC;IAChD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAwF;IAC5G,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAET,IAAI,EAAE,oBAAoB,EAAE,IAAI,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,MAAM,CAAA;KAAO;IAKzI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC,KAAK,IAAI,IAAI;IAWP,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ3B,0FAA0F;IACpF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB5B,QAAQ,IAAI,wBAAwB;IAQpC,OAAO,CAAC,QAAQ;CAQjB;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { QueueRepositoryError } from "../queue-repository.js";
|
|
3
|
+
import { NetworkBindingError, readNetworkCredential } from "./network-bindings.js";
|
|
4
|
+
import { connectMcpHub, HubError } from "./hub-client.js";
|
|
5
|
+
/** OpenRig's own sender: the connector creates the local item for the hub's requester, who is named first in it. */
|
|
6
|
+
const LOCAL_SOURCE = "daemon@kernel";
|
|
7
|
+
const PAGE = 25;
|
|
8
|
+
const MAX_PAGES = 8;
|
|
9
|
+
/** Receipts looked at per pass, the least recently looked at first, so a long backlog still gives every item a turn. */
|
|
10
|
+
const REPORT_LIMIT = 50;
|
|
11
|
+
/** How long one binding's pass may take before its connection is closed, so one slow hub can't hold the others. */
|
|
12
|
+
const PASS_TIMEOUT_MS = 60_000;
|
|
13
|
+
/** The local item for a hub item, by what it is. A retry, a restart or a new binding for the same seat, hub and
|
|
14
|
+
* participant lands on the same item. */
|
|
15
|
+
export function networkLocalItemId(binding, hubQitemId) {
|
|
16
|
+
return `qitem-net-${createHash("sha256").update([binding.nodeId, binding.hubUrl, binding.hubSeat, hubQitemId].join("\n")).digest("hex").slice(0, 20)}`;
|
|
17
|
+
}
|
|
18
|
+
/** The seat's current address: the node's latest session, as the queue's other node lookups read it. */
|
|
19
|
+
function currentSession(db, nodeId) {
|
|
20
|
+
const row = db.prepare("SELECT session_name FROM sessions WHERE node_id = ? ORDER BY created_at DESC, id DESC LIMIT 1")
|
|
21
|
+
.get(nodeId);
|
|
22
|
+
return row?.session_name ?? null;
|
|
23
|
+
}
|
|
24
|
+
/** The states a local item ends in. A handed-off local item ends at its successor, which is followed. */
|
|
25
|
+
const FINAL = new Set(["done", "canceled", "denied", "failed"]);
|
|
26
|
+
/** The states in which the hub item is closed to this connector. A hub item handed on by someone there is closed here:
|
|
27
|
+
* its successor isn't followed, and it's never written to again. */
|
|
28
|
+
const HUB_CLOSED = new Set([...FINAL, "handed-off"]);
|
|
29
|
+
/** One pass for one binding, bounded by its deadline and the connector's stop. Never throws: a failure is recorded on
|
|
30
|
+
* the binding and returned. */
|
|
31
|
+
export async function runNetworkBindingPass(deps, binding, opts = {}) {
|
|
32
|
+
const now = deps.now ?? (() => new Date());
|
|
33
|
+
const result = { bindingId: binding.id, taken: 0, pickupsSent: 0, resultsSent: 0, unknown: 0 };
|
|
34
|
+
// The token goes to a plain-http hub only on the person's recorded choice for this binding.
|
|
35
|
+
if (binding.unencrypted && !binding.allowHttp) {
|
|
36
|
+
deps.bindings.recordError(binding.id, `${binding.hubUrl} is plain http and this binding has no --allow-http choice, so its token isn't sent. Connect again with the hub's https URL, or with --allow-http.`);
|
|
37
|
+
return { ...result, error: "http_not_allowed" };
|
|
38
|
+
}
|
|
39
|
+
let token;
|
|
40
|
+
try {
|
|
41
|
+
token = readNetworkCredential(deps.home, binding.id);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
deps.bindings.recordError(binding.id, error instanceof NetworkBindingError ? error.message : String(error));
|
|
45
|
+
return { ...result, error: "credential" };
|
|
46
|
+
}
|
|
47
|
+
const timeoutMs = deps.passTimeoutMs ?? PASS_TIMEOUT_MS;
|
|
48
|
+
const deadline = new AbortController();
|
|
49
|
+
const timer = setTimeout(() => deadline.abort(), timeoutMs);
|
|
50
|
+
timer.unref?.();
|
|
51
|
+
const onStop = () => deadline.abort();
|
|
52
|
+
if (opts.signal?.aborted)
|
|
53
|
+
deadline.abort();
|
|
54
|
+
opts.signal?.addEventListener("abort", onStop, { once: true });
|
|
55
|
+
// Checked before every take, and again just before a local item is made: an ended binding, the pass's deadline or
|
|
56
|
+
// the connector's stop starts no local work, even when a hub answer arrives late.
|
|
57
|
+
const live = () => !deadline.signal.aborted && deps.bindings.get(binding.id)?.state === "active";
|
|
58
|
+
let hub = null;
|
|
59
|
+
try {
|
|
60
|
+
hub = await (deps.connect ?? connectMcpHub)(binding.hubUrl, token, deadline.signal);
|
|
61
|
+
// Work goes to the seat at its current address. With no session there's nobody to give it to, so nothing is taken.
|
|
62
|
+
const destination = currentSession(deps.db, binding.nodeId);
|
|
63
|
+
if (destination) {
|
|
64
|
+
// What this participant already holds (claimed before a restart, or through an earlier binding) comes first.
|
|
65
|
+
for (const held of await hub.listOwned("in-progress", PAGE * MAX_PAGES)) {
|
|
66
|
+
if (!live())
|
|
67
|
+
break;
|
|
68
|
+
if (held.destinationSession === binding.hubSeat && await ensureLocal(deps, binding, hub, held, destination, now, live))
|
|
69
|
+
result.taken++;
|
|
70
|
+
}
|
|
71
|
+
// New work, a page at a time: a claim moves an item out of pending, so each page is new items.
|
|
72
|
+
for (let page = 0; page < MAX_PAGES && live(); page++) {
|
|
73
|
+
const pending = await hub.listOwned("pending", PAGE);
|
|
74
|
+
for (const item of pending) {
|
|
75
|
+
if (!live())
|
|
76
|
+
break;
|
|
77
|
+
if (item.destinationSession !== binding.hubSeat)
|
|
78
|
+
continue;
|
|
79
|
+
try {
|
|
80
|
+
await hub.claim(item.qitemId);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
// Another claimant, or the item closed meanwhile: it isn't this binding's to take.
|
|
84
|
+
if (error instanceof HubError && error.kind === "refused")
|
|
85
|
+
continue;
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
if (await ensureLocal(deps, binding, hub, item, destination, now, live))
|
|
89
|
+
result.taken++;
|
|
90
|
+
}
|
|
91
|
+
if (pending.length < PAGE)
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Report back what happened locally, for the items this binding holds. A revoked binding never gets here.
|
|
96
|
+
if (live())
|
|
97
|
+
await reportBack(deps, binding, hub, now, result);
|
|
98
|
+
deps.bindings.recordContact(binding.id, now());
|
|
99
|
+
if (!destination) {
|
|
100
|
+
deps.bindings.recordError(binding.id, `${binding.localSession} has no session here, so its hub items stay pending until it has one.`);
|
|
101
|
+
return { ...result, error: "no_session" };
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (deadline.signal.aborted) {
|
|
107
|
+
deps.bindings.recordError(binding.id, opts.signal?.aborted
|
|
108
|
+
? "The connector stopped during this pass and closed its connection to the hub."
|
|
109
|
+
: `This pass took longer than ${timeoutMs >= 1000 ? `${Math.round(timeoutMs / 1000)} s` : `${timeoutMs} ms`}, so its connection to the hub was closed. The next pass tries again.`);
|
|
110
|
+
return { ...result, error: "unavailable" };
|
|
111
|
+
}
|
|
112
|
+
// Only the hub session's own failures are the hub's (it reports them as HubError); anything else happened here.
|
|
113
|
+
if (!(error instanceof HubError)) {
|
|
114
|
+
deps.bindings.recordError(binding.id, `A local error stopped this pass: ${error instanceof Error ? error.message : String(error)}`);
|
|
115
|
+
return { ...result, error: "local" };
|
|
116
|
+
}
|
|
117
|
+
if (error.kind === "revoked") {
|
|
118
|
+
try {
|
|
119
|
+
deps.bindings.markRevoked(binding.id, error.message);
|
|
120
|
+
}
|
|
121
|
+
catch (cleanup) {
|
|
122
|
+
// The binding is revoked either way; only its credential's removal failed, and the error says how to retry.
|
|
123
|
+
if (!(cleanup instanceof NetworkBindingError) || cleanup.code !== "credential_cleanup_failed")
|
|
124
|
+
throw cleanup;
|
|
125
|
+
deps.bindings.recordError(binding.id, cleanup.message);
|
|
126
|
+
}
|
|
127
|
+
deps.log?.(`network ${binding.id}: revoked by the hub; no new work comes in through it`);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
deps.bindings.recordError(binding.id, error.message);
|
|
131
|
+
}
|
|
132
|
+
return { ...result, error: error.kind };
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
clearTimeout(timer);
|
|
136
|
+
opts.signal?.removeEventListener("abort", onStop);
|
|
137
|
+
await hub?.end();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** The local item for a hub item this participant holds: created once, or found again. Returns true when it was new. */
|
|
141
|
+
async function ensureLocal(deps, binding, hub, item, destination, now, live) {
|
|
142
|
+
const localId = networkLocalItemId(binding, item.qitemId);
|
|
143
|
+
const taken = deps.db.prepare("SELECT binding_id FROM network_receipts WHERE local_qitem_id = ?").get(localId);
|
|
144
|
+
if (taken) {
|
|
145
|
+
// Taken already, perhaps through an earlier binding for this seat, hub and participant: this binding reports it now,
|
|
146
|
+
// with what was already sent and its outcome, unknown included, kept.
|
|
147
|
+
if (taken.binding_id !== binding.id)
|
|
148
|
+
deps.db.prepare("UPDATE network_receipts SET binding_id = ? WHERE local_qitem_id = ?").run(binding.id, localId);
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
const full = item.body == null ? await hub.show(item.qitemId) : item;
|
|
152
|
+
if (!live())
|
|
153
|
+
return false;
|
|
154
|
+
let outcome = null;
|
|
155
|
+
try {
|
|
156
|
+
await deps.queueRepo.create({
|
|
157
|
+
qitemId: localId,
|
|
158
|
+
sourceSession: LOCAL_SOURCE,
|
|
159
|
+
destinationSession: destination,
|
|
160
|
+
// Where it came from is read first: the requester and the hub, before the requester's own words.
|
|
161
|
+
summary: full.summary ? `From ${item.sourceSession} via network hub: ${full.summary}` : `From ${item.sourceSession} via network hub`,
|
|
162
|
+
body: [
|
|
163
|
+
`From ${item.sourceSession} through the network hub ${binding.hubUrl}, as ${binding.hubSeat} (hub item ${item.qitemId}).`,
|
|
164
|
+
"",
|
|
165
|
+
full.body ?? "",
|
|
166
|
+
"",
|
|
167
|
+
"---",
|
|
168
|
+
`Answer by closing this item with your result: rig queue update ${localId} --state done --closure-reason no-follow-on --resolution "<your answer>".`,
|
|
169
|
+
"OpenRig returns the resolution to the hub item.",
|
|
170
|
+
].join("\n"),
|
|
171
|
+
tags: [`network-binding:${binding.id}`, `network-hub-item:${item.qitemId}`],
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
const code = error instanceof QueueRepositoryError ? error.code : null;
|
|
176
|
+
// Its id was used before and its record erased: whether it ran is unknown, and it's never run again. The hub hears
|
|
177
|
+
// that from reportBack, which retries the note until it lands.
|
|
178
|
+
if (code === "qitem_erased")
|
|
179
|
+
outcome = "unknown";
|
|
180
|
+
// The same id with another destination: the seat's address changed between attempts; the item already exists.
|
|
181
|
+
else if (code !== "qitem_id_reuse" || !deps.queueRepo.getById(localId))
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
const inserted = deps.db.prepare(`INSERT INTO network_receipts (local_qitem_id, binding_id, hub_qitem_id, created_at, outcome)
|
|
185
|
+
VALUES (?, ?, ?, ?, ?) ON CONFLICT DO NOTHING`).run(localId, binding.id, item.qitemId, now().toISOString(), outcome).changes > 0;
|
|
186
|
+
// Every stage note, queued included, goes out from reportBack, which marks it sent only once it lands.
|
|
187
|
+
return inserted && outcome === null;
|
|
188
|
+
}
|
|
189
|
+
/** The item a local item ends at, following local handoffs: a successor names the item it came from. Null when a
|
|
190
|
+
* handed-off item has no one successor here (handed to another host, or the record is gone): its outcome is unknown. */
|
|
191
|
+
function finalItem(repo, start) {
|
|
192
|
+
let current = start;
|
|
193
|
+
for (let hop = 0; hop < 20 && current.state === "handed-off"; hop++) {
|
|
194
|
+
const next = repo.list({ handedOffFrom: current.qitemId, limit: 2 });
|
|
195
|
+
if (next.length !== 1)
|
|
196
|
+
return null;
|
|
197
|
+
current = next[0];
|
|
198
|
+
}
|
|
199
|
+
return current.state === "handed-off" ? null : current;
|
|
200
|
+
}
|
|
201
|
+
/** What the hub hears as the result: the resolution, else the closer's own note on the close itself. The close is read
|
|
202
|
+
* with `closingTransition`, since later notes on a closed item repeat its state. Other notes on the item can be
|
|
203
|
+
* OpenRig's or another seat's, and name local seats, so they're never sent. */
|
|
204
|
+
function closingWords(repo, item) {
|
|
205
|
+
if (item.resolution)
|
|
206
|
+
return item.resolution;
|
|
207
|
+
const close = repo.closingTransition(item.qitemId, item.state);
|
|
208
|
+
return close?.transitionNote && close.actorSession === item.destinationSession ? close.transitionNote : "Closed without a stated result.";
|
|
209
|
+
}
|
|
210
|
+
/** The hub items a binding's result never reached because someone else closed them first, for status. */
|
|
211
|
+
export function networkClosedElsewhere(db, bindingId) {
|
|
212
|
+
return db.prepare("SELECT hub_qitem_id, local_qitem_id, last_error FROM network_receipts WHERE binding_id = ? AND outcome = 'closed_on_hub' ORDER BY settled_at, local_qitem_id")
|
|
213
|
+
.all(bindingId)
|
|
214
|
+
.map((row) => ({ hubItem: row.hub_qitem_id, localItem: row.local_qitem_id, note: row.last_error }));
|
|
215
|
+
}
|
|
216
|
+
async function reportBack(deps, binding, hub, now, result) {
|
|
217
|
+
const open = deps.db.prepare(`SELECT * FROM network_receipts WHERE binding_id = ? AND settled_at IS NULL
|
|
218
|
+
ORDER BY COALESCE(checked_at, ''), created_at LIMIT ?`).all(binding.id, deps.reportLimit ?? REPORT_LIMIT);
|
|
219
|
+
const mark = (column, receipt, outcome, lastError = null) => deps.db.prepare(`UPDATE network_receipts SET ${column} = ?, outcome = COALESCE(?, outcome), last_error = ? WHERE local_qitem_id = ?`)
|
|
220
|
+
.run(now().toISOString(), outcome ?? null, lastError, receipt.local_qitem_id);
|
|
221
|
+
for (const receipt of open) {
|
|
222
|
+
deps.db.prepare("UPDATE network_receipts SET checked_at = ? WHERE local_qitem_id = ?").run(now().toISOString(), receipt.local_qitem_id);
|
|
223
|
+
try {
|
|
224
|
+
const local = deps.queueRepo.getById(receipt.local_qitem_id);
|
|
225
|
+
const unknown = async (why) => {
|
|
226
|
+
await hub.note(receipt.hub_qitem_id, why);
|
|
227
|
+
mark("settled_at", receipt, "unknown");
|
|
228
|
+
result.unknown++;
|
|
229
|
+
};
|
|
230
|
+
if (!local || receipt.outcome === "unknown") {
|
|
231
|
+
await unknown(`This item's local record (${receipt.local_qitem_id}) is gone, so whether it ran is unknown. It won't be run again.`);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (!receipt.queued_sent_at) {
|
|
235
|
+
await hub.note(receipt.hub_qitem_id, `Queued for the connected local seat as ${local.qitemId}. Not picked up yet.`);
|
|
236
|
+
mark("queued_sent_at", receipt);
|
|
237
|
+
}
|
|
238
|
+
if (!receipt.pickup_sent_at && local.claimedAt) {
|
|
239
|
+
await hub.note(receipt.hub_qitem_id, `Picked up by the local seat at ${local.claimedAt}.`);
|
|
240
|
+
mark("pickup_sent_at", receipt);
|
|
241
|
+
result.pickupsSent++;
|
|
242
|
+
}
|
|
243
|
+
const end = local.state === "handed-off" ? finalItem(deps.queueRepo, local) : local;
|
|
244
|
+
if (!end) {
|
|
245
|
+
await unknown(`This item was handed on from ${local.qitemId} without one successor here, so its outcome is unknown. It won't be run again.`);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (!FINAL.has(end.state))
|
|
249
|
+
continue;
|
|
250
|
+
// The hub item closes the way the queue closes one: done with the local closure reason, or failed. A refusal, a
|
|
251
|
+
// cancel or a failure never reads as success.
|
|
252
|
+
const reason = end.state === "canceled" || end.closureReason === "canceled" ? "canceled"
|
|
253
|
+
: end.state === "denied" || end.closureReason === "denied" ? "denied" : "no-follow-on";
|
|
254
|
+
const state = end.state === "failed" ? "failed" : "done";
|
|
255
|
+
const closureReason = state === "failed" ? null : reason;
|
|
256
|
+
const words = closingWords(deps.queueRepo, end);
|
|
257
|
+
// A final check before the close: a hub item already closed, by our own close whose answer was lost or by someone
|
|
258
|
+
// else, gets no write, so another actor's failure or cancel never becomes our done.
|
|
259
|
+
let shown = await hub.show(receipt.hub_qitem_id);
|
|
260
|
+
if (!HUB_CLOSED.has(shown.state)) {
|
|
261
|
+
try {
|
|
262
|
+
await hub.close(receipt.hub_qitem_id, { state, closureReason, resolution: words });
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
// Refused: closed by someone else between the check and the close. The readback says how.
|
|
266
|
+
if (!(error instanceof HubError) || error.kind !== "refused")
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
shown = await hub.show(receipt.hub_qitem_id);
|
|
270
|
+
if (!HUB_CLOSED.has(shown.state)) {
|
|
271
|
+
deps.db.prepare("UPDATE network_receipts SET last_error = ? WHERE local_qitem_id = ?").run("The close didn't take: the hub item still reads open. Trying again.", receipt.local_qitem_id);
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// It counts as our result only when the hub item shows our state, closure reason and resolution. Otherwise the
|
|
276
|
+
// local result stays here, and status shows the hub item as closed elsewhere.
|
|
277
|
+
if (shown.state !== state || shown.resolution !== words || (shown.closureReason ?? null) !== closureReason) {
|
|
278
|
+
mark("settled_at", receipt, "closed_on_hub", `The hub item was closed elsewhere (${shown.state}${shown.closureReason ? `, ${shown.closureReason}` : ""}) before this result reached it. The result stays on ${local.qitemId}.`);
|
|
279
|
+
deps.log?.(`network ${binding.id}: hub item ${receipt.hub_qitem_id} was closed elsewhere; its local result stays on ${local.qitemId}`);
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
mark("settled_at", receipt, end.state);
|
|
283
|
+
result.resultsSent++;
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
if (!(error instanceof HubError) || error.kind !== "refused")
|
|
287
|
+
throw error;
|
|
288
|
+
deps.db.prepare("UPDATE network_receipts SET last_error = ? WHERE local_qitem_id = ?").run(error.message.slice(0, 500), receipt.local_qitem_id);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/** The connector the daemon runs: one pass per active binding when it's due, one round at a time, off the event loop's
|
|
293
|
+
* hot path (the hub calls are async network I/O). Each pass is bounded by its deadline, and stop closes a pass in
|
|
294
|
+
* flight. A binding that fails backs off, doubling to a cap, with jitter. With no active binding it makes no network
|
|
295
|
+
* call at all. */
|
|
296
|
+
export class NetworkConnectorService {
|
|
297
|
+
deps;
|
|
298
|
+
timer = null;
|
|
299
|
+
inFlight = null;
|
|
300
|
+
stopped = false;
|
|
301
|
+
stopping = null;
|
|
302
|
+
due = new Map();
|
|
303
|
+
intervalMs;
|
|
304
|
+
maxBackoffMs;
|
|
305
|
+
constructor(deps, opts = {}) {
|
|
306
|
+
this.deps = deps;
|
|
307
|
+
this.intervalMs = opts.intervalMs ?? 30_000;
|
|
308
|
+
this.maxBackoffMs = Math.max(this.intervalMs, opts.maxBackoffMs ?? 300_000);
|
|
309
|
+
this.random = opts.random ?? Math.random;
|
|
310
|
+
}
|
|
311
|
+
random;
|
|
312
|
+
start() {
|
|
313
|
+
this.stopped = false;
|
|
314
|
+
this.stopping = new AbortController();
|
|
315
|
+
// A credential whose binding isn't active has nothing left to do here: one a stop left before its row, or one
|
|
316
|
+
// whose removal failed when its binding ended.
|
|
317
|
+
const swept = this.deps.bindings.sweepCredentials();
|
|
318
|
+
if (swept.removed.length)
|
|
319
|
+
this.deps.log?.(`network connector: removed the credentials of ended bindings ${swept.removed.join(", ")}`);
|
|
320
|
+
if (swept.failed.length)
|
|
321
|
+
this.deps.log?.(`network connector: couldn't remove the credentials of ended bindings ${swept.failed.join(", ")}`);
|
|
322
|
+
this.schedule(0);
|
|
323
|
+
}
|
|
324
|
+
async stop() {
|
|
325
|
+
this.stopped = true;
|
|
326
|
+
this.stopping?.abort();
|
|
327
|
+
if (this.timer)
|
|
328
|
+
clearTimeout(this.timer);
|
|
329
|
+
this.timer = null;
|
|
330
|
+
await this.inFlight;
|
|
331
|
+
}
|
|
332
|
+
/** One round: a pass for each active binding that's due. Exposed for tests and status. */
|
|
333
|
+
async round() {
|
|
334
|
+
if (this.inFlight)
|
|
335
|
+
return this.inFlight;
|
|
336
|
+
this.inFlight = (async () => {
|
|
337
|
+
const at = (this.deps.now ?? (() => new Date()))().getTime();
|
|
338
|
+
const active = this.deps.bindings.active();
|
|
339
|
+
for (const id of [...this.due.keys()])
|
|
340
|
+
if (!active.some((b) => b.id === id))
|
|
341
|
+
this.due.delete(id);
|
|
342
|
+
for (const binding of active) {
|
|
343
|
+
if (this.stopped)
|
|
344
|
+
break;
|
|
345
|
+
const due = this.due.get(binding.id);
|
|
346
|
+
if (due && due.at > at)
|
|
347
|
+
continue;
|
|
348
|
+
const pass = await runNetworkBindingPass(this.deps, binding, { signal: this.stopping?.signal });
|
|
349
|
+
const failing = pass.error === "unavailable" || pass.error === "refused" || pass.error === "credential" || pass.error === "local";
|
|
350
|
+
const backoffMs = failing ? Math.min(this.maxBackoffMs, (due?.backoffMs ?? this.intervalMs) * 2) : this.intervalMs;
|
|
351
|
+
const jitter = 1 + (this.random() * 0.4 - 0.2);
|
|
352
|
+
this.due.set(binding.id, { at: at + Math.round(backoffMs * jitter), backoffMs, last: pass });
|
|
353
|
+
}
|
|
354
|
+
})();
|
|
355
|
+
try {
|
|
356
|
+
await this.inFlight;
|
|
357
|
+
}
|
|
358
|
+
finally {
|
|
359
|
+
this.inFlight = null;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
snapshot() {
|
|
363
|
+
return {
|
|
364
|
+
running: !this.stopped,
|
|
365
|
+
intervalMs: this.intervalMs,
|
|
366
|
+
bindings: [...this.due.entries()].map(([id, d]) => ({ id, nextPassAt: new Date(d.at).toISOString(), backoffMs: d.backoffMs, lastPass: d.last })),
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
schedule(ms) {
|
|
370
|
+
if (this.stopped)
|
|
371
|
+
return;
|
|
372
|
+
this.timer = setTimeout(() => {
|
|
373
|
+
void this.round().catch((error) => this.deps.log?.(`network connector round failed: ${error.message}`))
|
|
374
|
+
.finally(() => this.schedule(Math.min(this.intervalMs, 5_000)));
|
|
375
|
+
}, ms);
|
|
376
|
+
this.timer.unref?.();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
export { HubError };
|
|
380
|
+
//# sourceMappingURL=network-connector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-connector.js","sourceRoot":"","sources":["../../../src/domain/network/network-connector.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAwC,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAiD,MAAM,uBAAuB,CAAC;AAClI,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAkD,MAAM,iBAAiB,CAAC;AAE1G,oHAAoH;AACpH,MAAM,YAAY,GAAG,eAAe,CAAC;AACrC,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,MAAM,SAAS,GAAG,CAAC,CAAC;AACpB,wHAAwH;AACxH,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,mHAAmH;AACnH,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B;0CAC0C;AAC1C,MAAM,UAAU,kBAAkB,CAAC,OAA8D,EAAE,UAAkB;IACnH,OAAO,aAAa,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAA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,CAAC,OAAO,EAAE,CAAC,CAAC;iBAC/G,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;IACvB,CAAC;CACF;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import { type NetworkBinding, type NetworkBindingStore } from "./network-bindings.js";
|
|
3
|
+
export interface NetworkInstallation {
|
|
4
|
+
id: string;
|
|
5
|
+
site: string;
|
|
6
|
+
/** The account's id for this installation. */
|
|
7
|
+
installationId: string;
|
|
8
|
+
name: string | null;
|
|
9
|
+
allowHttp: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
}
|
|
12
|
+
/** An enroll's answer. A replaced enrollment names the bindings it ended, whose names the old installation may still list,
|
|
13
|
+
* and any cleanup after the switch that didn't finish. */
|
|
14
|
+
export interface EnrollResult extends NetworkInstallation {
|
|
15
|
+
replaced?: {
|
|
16
|
+
endedBindings: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
localSession: string;
|
|
19
|
+
participantName: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
problems?: string[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** Where the installation key lives: `<home>/network-secrets/<installation>/key.json`, private to this user. */
|
|
25
|
+
export declare function networkInstallationKeyFile(home: string, id: string): string;
|
|
26
|
+
/** The state reason of a binding a replaced enrollment ended: its name belongs to the old installation. */
|
|
27
|
+
export declare const REPLACED_REASON = "replaced by a new enrollment";
|
|
28
|
+
/** What's known about the account's side of an ended binding made through it: confirmed dropped, unconfirmed (a removal
|
|
29
|
+
* that failed or whose answer was lost), or left with an earlier account installation after the enrollment was replaced,
|
|
30
|
+
* which this daemon's key can neither drop nor confirm. `accountInstallationNow` is the account's id for the binding's
|
|
31
|
+
* enrollment as it is now. */
|
|
32
|
+
export declare function accountRemoval(binding: NetworkBinding, accountInstallationNow: string | null | undefined): "confirmed" | "unconfirmed" | "old-installation" | null;
|
|
33
|
+
export type AccountFetch = (url: string, init: {
|
|
34
|
+
method: string;
|
|
35
|
+
headers: Record<string, string>;
|
|
36
|
+
body: string;
|
|
37
|
+
redirect: "error";
|
|
38
|
+
signal: AbortSignal;
|
|
39
|
+
}) => Promise<{
|
|
40
|
+
status: number;
|
|
41
|
+
json(): Promise<unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
/** How long one enroll, connect or disconnect may spend with the account in all, waiting for its turn included. */
|
|
44
|
+
export declare const ACCOUNT_DEADLINE_MS = 30000;
|
|
45
|
+
export declare class NetworkInstallationStore {
|
|
46
|
+
private readonly db;
|
|
47
|
+
private readonly home;
|
|
48
|
+
private readonly opts;
|
|
49
|
+
private readonly fetch;
|
|
50
|
+
constructor(db: Database.Database, home: string, opts: {
|
|
51
|
+
fetch?: AccountFetch;
|
|
52
|
+
selfHostId: () => string | null;
|
|
53
|
+
now?: () => Date;
|
|
54
|
+
newId?: () => string;
|
|
55
|
+
timeoutMs?: number;
|
|
56
|
+
});
|
|
57
|
+
list(): NetworkInstallation[];
|
|
58
|
+
/** Trade the account page's one-time code for this installation's key. The code is checked by the account only, so a
|
|
59
|
+
* refused enroll here (a URL, a second enroll at the same site without `replace`) never spends it. With `replace`, the
|
|
60
|
+
* installation's turn comes first, so its wait counts against the same deadline: a wait that runs out sends no code,
|
|
61
|
+
* and the new key takes the old one's place only after the account accepted the new code. */
|
|
62
|
+
enroll(bindings: NetworkBindingStore, input: {
|
|
63
|
+
code: unknown;
|
|
64
|
+
site: unknown;
|
|
65
|
+
allowHttp?: unknown;
|
|
66
|
+
replace?: unknown;
|
|
67
|
+
}): Promise<EnrollResult>;
|
|
68
|
+
/** The code, with this daemon's host id, for an account installation and its key. */
|
|
69
|
+
private exchange;
|
|
70
|
+
/** The new key goes in beside the old one and takes its place, then the row and the old installation's active bindings
|
|
71
|
+
* change in one transaction. A failure before that commits puts the old key back (with no old key, it removes the new
|
|
72
|
+
* one), so nothing here changes, though the account has already made the new installation and nothing here holds its
|
|
73
|
+
* key. After the commit the replace has happened: the ended bindings' names are returned, since the old installation
|
|
74
|
+
* may still list them and this key can't drop them, with any cleanup that didn't finish. */
|
|
75
|
+
private replace;
|
|
76
|
+
/** The one installation a name-only connect goes through. */
|
|
77
|
+
only(): NetworkInstallation;
|
|
78
|
+
/** Connect a seat as a participant name: list it with the account, then bind to the account's MCP front with the new
|
|
79
|
+
* bearer. The seat is checked first, so a refusal here sends nothing. A name the account keeps without a bearer had
|
|
80
|
+
* its answer lost earlier: it's dropped and listed again for a fresh one. */
|
|
81
|
+
connect(bindings: NetworkBindingStore, input: {
|
|
82
|
+
session: unknown;
|
|
83
|
+
name: unknown;
|
|
84
|
+
}): Promise<NetworkBinding>;
|
|
85
|
+
/** After a binding made through the account ended here, the account stops listing its name, which revokes it there.
|
|
86
|
+
* Only an answered list that no longer has the name marks it removed; a failed or lost one leaves it unconfirmed. */
|
|
87
|
+
removeAtAccount(bindings: NetworkBindingStore, binding: NetworkBinding): Promise<NetworkBinding>;
|
|
88
|
+
/** `accountRemoval` against this binding's enrollment as it is now. */
|
|
89
|
+
removalOf(binding: NetworkBinding): ReturnType<typeof accountRemoval>;
|
|
90
|
+
private get;
|
|
91
|
+
private listedNames;
|
|
92
|
+
private instance;
|
|
93
|
+
private deadline;
|
|
94
|
+
private setParticipants;
|
|
95
|
+
private call;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=network-installations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-installations.d.ts","sourceRoot":"","sources":["../../../src/domain/network/network-installations.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;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