@adhdev/daemon-core 0.9.82-rc.37 → 0.9.82-rc.371
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/dist/boot/daemon-lifecycle.d.ts +9 -0
- package/dist/boot/process-hardening.d.ts +50 -0
- package/dist/build-info.d.ts +37 -0
- package/dist/chat/source-machine.d.ts +166 -0
- package/dist/chat/source-resolver.d.ts +104 -0
- package/dist/chat/subscription-updates.d.ts +1 -0
- package/dist/cli-adapter-types.d.ts +55 -2
- package/dist/cli-adapters/cli-script-runner.d.ts +117 -0
- package/dist/cli-adapters/cli-state-engine.d.ts +198 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +116 -64
- package/dist/cli-adapters/provider-cli-parse.d.ts +4 -0
- package/dist/cli-adapters/provider-cli-runtime.d.ts +34 -0
- package/dist/cli-adapters/provider-cli-shared.d.ts +63 -0
- package/dist/cli-adapters/raw-terminal-io.d.ts +37 -0
- package/dist/cli-adapters/resolve-executable.d.ts +14 -0
- package/dist/cli-adapters/terminal-backends/ghostty-vt-backend.d.ts +6 -3
- package/dist/cli-adapters/terminal-backends/types.d.ts +10 -2
- package/dist/cli-adapters/terminal-screen.d.ts +4 -11
- package/dist/commands/chat-commands.d.ts +27 -0
- package/dist/commands/cli-manager.d.ts +15 -1
- package/dist/commands/handler.d.ts +125 -0
- package/dist/commands/high-family/index.d.ts +3 -0
- package/dist/commands/high-family/mesh-coordinator-launch.d.ts +2 -0
- package/dist/commands/high-family/mesh-events.d.ts +2 -0
- package/dist/commands/high-family/mesh-status.d.ts +2 -0
- package/dist/commands/high-family/types.d.ts +60 -0
- package/dist/commands/low-family/coordinator-prompt.d.ts +9 -0
- package/dist/commands/low-family/daemon-lifecycle.d.ts +2 -0
- package/dist/commands/low-family/diagnostics.d.ts +2 -0
- package/dist/commands/low-family/index.d.ts +3 -0
- package/dist/commands/low-family/mesh-ledger.d.ts +10 -0
- package/dist/commands/low-family/mesh-node-logs.d.ts +2 -0
- package/dist/commands/low-family/notification.d.ts +2 -0
- package/dist/commands/low-family/refine-config.d.ts +2 -0
- package/dist/commands/low-family/session-host.d.ts +2 -0
- package/dist/commands/low-family/spec-providerdev.d.ts +11 -0
- package/dist/commands/low-family/status-meta.d.ts +2 -0
- package/dist/commands/low-family/types.d.ts +33 -0
- package/dist/commands/med-family/cli-agent.d.ts +2 -0
- package/dist/commands/med-family/fast-forward.d.ts +2 -0
- package/dist/commands/med-family/ide.d.ts +10 -0
- package/dist/commands/med-family/index.d.ts +3 -0
- package/dist/commands/med-family/mesh-crud.d.ts +2 -0
- package/dist/commands/med-family/mesh-host-pairing.d.ts +2 -0
- package/dist/commands/med-family/mesh-queue.d.ts +2 -0
- package/dist/commands/med-family/mesh-restart.d.ts +2 -0
- package/dist/commands/med-family/types.d.ts +116 -0
- package/dist/commands/mesh-coordinator.d.ts +85 -1
- package/dist/commands/router.d.ts +666 -2
- package/dist/commands/upgrade-helper.d.ts +41 -1
- package/dist/config/chat-history.d.ts +9 -0
- package/dist/config/config.d.ts +5 -0
- package/dist/config/mesh-config.d.ts +77 -1
- package/dist/daemon/dev-server.d.ts +0 -2
- package/dist/detection/ide-detector.d.ts +13 -0
- package/dist/detection/win32-ide-version.d.ts +37 -0
- package/dist/git/change-impact-config.d.ts +159 -0
- package/dist/git/git-commands.d.ts +11 -1
- package/dist/git/git-diff.d.ts +6 -0
- package/dist/git/git-executor.d.ts +11 -0
- package/dist/git/git-status.d.ts +23 -0
- package/dist/git/git-types.d.ts +2 -50
- package/dist/git/index.d.ts +2 -0
- package/dist/index.d.ts +55 -13
- package/dist/index.js +46565 -19737
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43563 -16868
- package/dist/index.mjs.map +1 -1
- package/dist/installer.d.ts +1 -4
- package/dist/ipc/local-ipc-server.d.ts +91 -0
- package/dist/launch.d.ts +1 -1
- package/dist/logging/async-batch-writer.d.ts +10 -0
- package/dist/logging/log-redactor.d.ts +24 -0
- package/dist/logging/log-tail-reader.d.ts +46 -0
- package/dist/logging/logger.d.ts +1 -1
- package/dist/mesh/contracts.d.ts +164 -0
- package/dist/mesh/coordinator-prompt.d.ts +36 -0
- package/dist/mesh/coordinator-registry.d.ts +59 -0
- package/dist/mesh/mesh-active-work.d.ts +174 -0
- package/dist/mesh/mesh-delivery-policy.d.ts +131 -0
- package/dist/mesh/mesh-event-trace.d.ts +21 -0
- package/dist/mesh/mesh-events-coordinator.d.ts +91 -0
- package/dist/mesh/mesh-events-pending.d.ts +55 -0
- package/dist/mesh/mesh-events-stale.d.ts +40 -0
- package/dist/mesh/mesh-events-utils.d.ts +61 -0
- package/dist/mesh/mesh-events.d.ts +6 -49
- package/dist/mesh/mesh-fast-forward.d.ts +81 -0
- package/dist/mesh/mesh-host-ownership.d.ts +9 -0
- package/dist/mesh/mesh-init.d.ts +86 -0
- package/dist/mesh/mesh-ledger-reconciliation.d.ts +23 -3
- package/dist/mesh/mesh-ledger.d.ts +77 -1
- package/dist/mesh/mesh-missions.d.ts +164 -0
- package/dist/mesh/mesh-reconcile-loop.d.ts +7 -0
- package/dist/mesh/mesh-refine-batch.d.ts +68 -0
- package/dist/mesh/mesh-refine-status.d.ts +62 -0
- package/dist/mesh/mesh-review-inbox.d.ts +90 -0
- package/dist/mesh/mesh-routing.d.ts +70 -0
- package/dist/mesh/mesh-runtime-store.d.ts +429 -0
- package/dist/mesh/mesh-task-stats.d.ts +49 -0
- package/dist/mesh/mesh-unresolved-forward-outbox.d.ts +30 -0
- package/dist/mesh/mesh-warmup-deadline.d.ts +68 -0
- package/dist/mesh/mesh-work-queue.d.ts +246 -5
- package/dist/mesh/preview-freshness.d.ts +18 -0
- package/dist/mesh/refine-config.d.ts +216 -0
- package/dist/mesh/worktree-bootstrap-config.d.ts +135 -0
- package/dist/providers/acp-provider-instance.d.ts +5 -0
- package/dist/providers/approval-utils.d.ts +20 -0
- package/dist/providers/chat-message-normalization.d.ts +12 -0
- package/dist/providers/cli-provider-instance.d.ts +108 -3
- package/dist/providers/contracts.d.ts +139 -6
- package/dist/providers/external-sources.d.ts +71 -0
- package/dist/providers/manual-attendance.d.ts +63 -0
- package/dist/providers/native-history/antigravity-cli-transcript.d.ts +100 -0
- package/dist/providers/native-history/claude-cli-transcript.d.ts +70 -0
- package/dist/providers/native-history/codex-cli-transcript.d.ts +73 -0
- package/dist/providers/native-history/dispatcher.d.ts +27 -0
- package/dist/providers/native-history/hermes-cli-transcript.d.ts +30 -0
- package/dist/providers/native-history/index.d.ts +13 -0
- package/dist/providers/provider-instance-manager.d.ts +14 -0
- package/dist/providers/provider-instance.d.ts +23 -1
- package/dist/providers/provider-loader.d.ts +26 -4
- package/dist/providers/provider-trust.d.ts +31 -0
- package/dist/providers/read-chat-contract.d.ts +29 -0
- package/dist/providers/sdk/v1/builders/acp/detect-status.d.ts +68 -0
- package/dist/providers/sdk/v1/builders/cli/detect-status.d.ts +86 -0
- package/dist/providers/sdk/v1/builders/cli/parse-approval-squash.d.ts +59 -0
- package/dist/providers/sdk/v1/builders/cli/parse-approval.d.ts +65 -0
- package/dist/providers/sdk/v1/builders/cli/parse-session.d.ts +91 -0
- package/dist/providers/sdk/v1/builders/cli/visible-region.d.ts +42 -0
- package/dist/providers/sdk/v1/fixture-tooling/format.d.ts +126 -0
- package/dist/providers/sdk/v1/fixture-tooling/index.d.ts +8 -0
- package/dist/providers/sdk/v1/fixture-tooling/replay.d.ts +38 -0
- package/dist/providers/sdk/v1/index.d.ts +30 -0
- package/dist/providers/sdk/v1/sandbox/README-design.d.ts +193 -0
- package/dist/providers/sdk/v1/sandbox/require-whitelist.d.ts +74 -0
- package/dist/providers/sdk/v1/sandbox/script-runner.d.ts +98 -0
- package/dist/providers/sdk/v1/types/cli/index.d.ts +277 -0
- package/dist/providers/sdk/v1/types/common/index.d.ts +203 -0
- package/dist/providers/sdk/v1/validators/index.d.ts +5 -0
- package/dist/providers/sdk/v1/validators/manifest.d.ts +40 -0
- package/dist/providers/sdk/v1/validators/taint.d.ts +52 -0
- package/dist/providers/spec/adapter.d.ts +91 -0
- package/dist/providers/spec/cli-adapter.d.ts +223 -0
- package/dist/providers/spec/evaluator.d.ts +45 -0
- package/dist/providers/spec/fsm-driver.d.ts +395 -0
- package/dist/providers/spec/fsm-evaluator.d.ts +76 -0
- package/dist/providers/spec/fsm-loader.d.ts +14 -0
- package/dist/providers/spec/fsm-types.d.ts +174 -0
- package/dist/providers/spec/native-history-executor.d.ts +41 -0
- package/dist/providers/spec/pre-launch-trust.d.ts +16 -0
- package/dist/providers/spec/route.d.ts +4 -0
- package/dist/providers/spec/types.d.ts +222 -0
- package/dist/providers/status-monitor.d.ts +7 -7
- package/dist/providers/transcript-v2.d.ts +176 -0
- package/dist/providers/types/interactive-prompt.d.ts +84 -0
- package/dist/providers/working-dir.d.ts +17 -0
- package/dist/repo-mesh-types.d.ts +295 -13
- package/dist/sessions/registry.d.ts +6 -0
- package/dist/shared-types-extra.d.ts +2 -4
- package/dist/shared-types.d.ts +59 -2
- package/dist/status/normalize.d.ts +1 -1
- package/dist/status/normalize.js +1 -0
- package/dist/status/normalize.js.map +1 -1
- package/dist/status/normalize.mjs +1 -0
- package/dist/status/normalize.mjs.map +1 -1
- package/dist/status/reporter.d.ts +2 -0
- package/dist/status/snapshot.d.ts +26 -0
- package/dist/system/hash.d.ts +8 -0
- package/dist/system/load-better-sqlite3.d.ts +21 -0
- package/dist/types.d.ts +5 -0
- package/package.json +7 -3
- package/src/agent-stream/poller.ts +2 -3
- package/src/agent-stream/provider-adapter.ts +1 -1
- package/src/boot/daemon-lifecycle.ts +63 -12
- package/src/boot/process-hardening.ts +89 -0
- package/src/build-info.ts +73 -0
- package/src/chat/source-machine.ts +534 -0
- package/src/chat/source-resolver.ts +0 -0
- package/src/chat/subscription-updates.ts +20 -1
- package/src/cli-adapter-types.d.ts +1 -0
- package/src/cli-adapter-types.ts +56 -2
- package/src/cli-adapters/cli-script-runner.ts +421 -0
- package/src/cli-adapters/cli-state-engine.ts +1221 -0
- package/src/cli-adapters/provider-cli-adapter.d.ts +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +775 -1141
- package/src/cli-adapters/provider-cli-parse.d.ts +1 -0
- package/src/cli-adapters/provider-cli-parse.ts +13 -0
- package/src/cli-adapters/provider-cli-runtime.ts +56 -7
- package/src/cli-adapters/provider-cli-shared.d.ts +4 -0
- package/src/cli-adapters/provider-cli-shared.ts +110 -11
- package/src/cli-adapters/pty-transport.ts +2 -1
- package/src/cli-adapters/raw-terminal-io.ts +252 -0
- package/src/cli-adapters/resolve-executable.ts +90 -0
- package/src/cli-adapters/session-host-transport.ts +2 -1
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +53 -29
- package/src/cli-adapters/terminal-backends/types.ts +10 -3
- package/src/cli-adapters/terminal-screen.ts +16 -81
- package/src/commands/WINDOWS-UPGRADE-LOCK-FAILURE.md +198 -0
- package/src/commands/chat-commands.ts +1917 -62
- package/src/commands/cli-manager.ts +502 -24
- package/src/commands/handler.ts +841 -2
- package/src/commands/high-family/index.ts +28 -0
- package/src/commands/high-family/mesh-coordinator-launch.ts +592 -0
- package/src/commands/high-family/mesh-events.ts +47 -0
- package/src/commands/high-family/mesh-status.ts +642 -0
- package/src/commands/high-family/types.ts +76 -0
- package/src/commands/low-family/coordinator-prompt.ts +72 -0
- package/src/commands/low-family/daemon-lifecycle.ts +107 -0
- package/src/commands/low-family/diagnostics.ts +57 -0
- package/src/commands/low-family/index.ts +37 -0
- package/src/commands/low-family/mesh-ledger.ts +62 -0
- package/src/commands/low-family/mesh-node-logs.ts +81 -0
- package/src/commands/low-family/notification.ts +116 -0
- package/src/commands/low-family/refine-config.ts +106 -0
- package/src/commands/low-family/session-host.ts +274 -0
- package/src/commands/low-family/spec-providerdev.ts +217 -0
- package/src/commands/low-family/status-meta.ts +112 -0
- package/src/commands/low-family/types.ts +39 -0
- package/src/commands/med-family/cli-agent.ts +218 -0
- package/src/commands/med-family/fast-forward.ts +198 -0
- package/src/commands/med-family/ide.ts +163 -0
- package/src/commands/med-family/index.ts +37 -0
- package/src/commands/med-family/mesh-crud.ts +788 -0
- package/src/commands/med-family/mesh-host-pairing.ts +234 -0
- package/src/commands/med-family/mesh-queue.ts +131 -0
- package/src/commands/med-family/mesh-restart.ts +92 -0
- package/src/commands/med-family/types.ts +120 -0
- package/src/commands/mesh-coordinator.ts +334 -124
- package/src/commands/router.ts +5121 -2369
- package/src/commands/stream-commands.ts +8 -0
- package/src/commands/upgrade-helper.ts +310 -45
- package/src/config/chat-history.ts +483 -24
- package/src/config/config.ts +12 -0
- package/src/config/mesh-config.ts +389 -6
- package/src/config/recent-activity.ts +8 -2
- package/src/daemon/dev-auto-implement.ts +3 -2
- package/src/daemon/dev-cli-debug.ts +10 -1
- package/src/daemon/dev-server.ts +0 -541
- package/src/detection/cli-detector.ts +28 -9
- package/src/detection/ide-detector.ts +55 -16
- package/src/detection/win32-ide-version.ts +106 -0
- package/src/git/change-impact-config.ts +354 -0
- package/src/git/git-commands.ts +55 -14
- package/src/git/git-diff.ts +81 -11
- package/src/git/git-executor.ts +12 -0
- package/src/git/git-status.ts +574 -43
- package/src/git/git-types.ts +14 -62
- package/src/git/git-worktree.ts +8 -1
- package/src/git/index.ts +16 -0
- package/src/index.ts +158 -12
- package/src/installer.d.ts +1 -1
- package/src/installer.ts +8 -6
- package/src/ipc/local-ipc-server.ts +278 -0
- package/src/launch.d.ts +1 -1
- package/src/launch.ts +37 -28
- package/src/logging/async-batch-writer.ts +55 -0
- package/src/logging/command-log.ts +7 -5
- package/src/logging/log-redactor.ts +100 -0
- package/src/logging/log-tail-reader.ts +220 -0
- package/src/logging/logger.ts +14 -7
- package/src/mesh/contracts.ts +338 -0
- package/src/mesh/coordinator-prompt.ts +234 -31
- package/src/mesh/coordinator-registry.ts +121 -0
- package/src/mesh/mesh-active-work.ts +645 -0
- package/src/mesh/mesh-delivery-policy.ts +315 -0
- package/src/mesh/mesh-event-trace.ts +67 -0
- package/src/mesh/mesh-events-coordinator.ts +2866 -0
- package/src/mesh/mesh-events-pending.ts +599 -0
- package/src/mesh/mesh-events-stale.ts +309 -0
- package/src/mesh/mesh-events-utils.ts +387 -0
- package/src/mesh/mesh-events.ts +30 -1035
- package/src/mesh/mesh-fast-forward.ts +839 -0
- package/src/mesh/mesh-host-ownership.ts +73 -0
- package/src/mesh/mesh-init.ts +260 -0
- package/src/mesh/mesh-ledger-reconciliation.ts +12 -5
- package/src/mesh/mesh-ledger.ts +591 -102
- package/src/mesh/mesh-missions.ts +322 -0
- package/src/mesh/mesh-reconcile-loop.ts +1134 -0
- package/src/mesh/mesh-refine-batch.ts +197 -0
- package/src/mesh/mesh-refine-status.ts +231 -0
- package/src/mesh/mesh-review-inbox.ts +307 -0
- package/src/mesh/mesh-routing.ts +291 -0
- package/src/mesh/mesh-runtime-store.ts +1697 -0
- package/src/mesh/mesh-task-stats.ts +161 -0
- package/src/mesh/mesh-unresolved-forward-outbox.ts +185 -0
- package/src/mesh/mesh-warmup-deadline.ts +152 -0
- package/src/mesh/mesh-work-queue.ts +997 -141
- package/src/mesh/preview-freshness.ts +118 -0
- package/src/mesh/refine-config.ts +423 -0
- package/src/mesh/worktree-bootstrap-config.ts +331 -0
- package/src/providers/acp-provider-instance.ts +43 -10
- package/src/providers/approval-utils.d.ts +5 -0
- package/src/providers/approval-utils.ts +57 -5
- package/src/providers/chat-message-normalization.ts +45 -5
- package/src/providers/cli-provider-instance.ts +1310 -101
- package/src/providers/contracts.d.ts +55 -0
- package/src/providers/contracts.ts +150 -6
- package/src/providers/extension-provider-instance.ts +12 -7
- package/src/providers/external-sources.ts +218 -0
- package/src/providers/ide-provider-instance.ts +35 -12
- package/src/providers/manual-attendance.ts +85 -0
- package/src/providers/native-history/antigravity-cli-transcript.ts +643 -0
- package/src/providers/native-history/claude-cli-transcript.ts +396 -0
- package/src/providers/native-history/codex-cli-transcript.ts +479 -0
- package/src/providers/native-history/dispatcher.ts +340 -0
- package/src/providers/native-history/hermes-cli-transcript.ts +230 -0
- package/src/providers/native-history/index.ts +30 -0
- package/src/providers/provider-instance-manager.ts +30 -0
- package/src/providers/provider-instance.ts +19 -1
- package/src/providers/provider-loader.ts +668 -50
- package/src/providers/provider-schema.ts +87 -14
- package/src/providers/provider-trust.ts +114 -0
- package/src/providers/read-chat-contract.ts +76 -16
- package/src/providers/sdk/README.md +49 -0
- package/src/providers/sdk/v1/builders/acp/detect-status.ts +144 -0
- package/src/providers/sdk/v1/builders/cli/detect-status.ts +313 -0
- package/src/providers/sdk/v1/builders/cli/parse-approval-squash.ts +158 -0
- package/src/providers/sdk/v1/builders/cli/parse-approval.ts +250 -0
- package/src/providers/sdk/v1/builders/cli/parse-session.ts +276 -0
- package/src/providers/sdk/v1/builders/cli/visible-region.ts +143 -0
- package/src/providers/sdk/v1/fixture-tooling/format.ts +130 -0
- package/src/providers/sdk/v1/fixture-tooling/index.ts +22 -0
- package/src/providers/sdk/v1/fixture-tooling/replay.ts +352 -0
- package/src/providers/sdk/v1/index.ts +152 -0
- package/src/providers/sdk/v1/sandbox/README-design.ts +195 -0
- package/src/providers/sdk/v1/sandbox/require-whitelist.ts +472 -0
- package/src/providers/sdk/v1/sandbox/script-runner.ts +150 -0
- package/src/providers/sdk/v1/schemas/cli/provider.schema.json +504 -0
- package/src/providers/sdk/v1/schemas/primitives/acp-session-protocol-v1.json +131 -0
- package/src/providers/sdk/v1/schemas/primitives/native-history-codex-rollout-v1.json +66 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-approval-squash-v1.json +91 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-assistant-block-v1.json +91 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-cue-ordering-v1.json +47 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-dispatch-order-v1.json +32 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-footer-chrome-v1.json +42 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-index-finder-v1.json +27 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-modal-v1.json +125 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-prompt-marker-v1.json +45 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-session-id-extraction-v1.json +46 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-settled-prompt-v1.json +71 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-spinner-v1.json +83 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-transcript-pty-v1.json +83 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-visible-region-v1.json +57 -0
- package/src/providers/sdk/v1/schemas/primitives/tui-welcome-screen-v1.json +35 -0
- package/src/providers/sdk/v1/types/cli/index.ts +365 -0
- package/src/providers/sdk/v1/types/common/index.ts +229 -0
- package/src/providers/sdk/v1/validators/index.ts +19 -0
- package/src/providers/sdk/v1/validators/manifest.ts +110 -0
- package/src/providers/sdk/v1/validators/taint.ts +309 -0
- package/src/providers/spec/adapter.ts +235 -0
- package/src/providers/spec/cli-adapter.ts +1051 -0
- package/src/providers/spec/evaluator.ts +407 -0
- package/src/providers/spec/fsm-driver.ts +1305 -0
- package/src/providers/spec/fsm-evaluator.ts +272 -0
- package/src/providers/spec/fsm-loader.ts +120 -0
- package/src/providers/spec/fsm-types.ts +273 -0
- package/src/providers/spec/native-history-executor.ts +1136 -0
- package/src/providers/spec/pre-launch-trust.ts +104 -0
- package/src/providers/spec/route.ts +51 -0
- package/src/providers/spec/types.ts +262 -0
- package/src/providers/status-monitor.d.ts +7 -7
- package/src/providers/status-monitor.ts +37 -22
- package/src/providers/transcript-v2.ts +567 -0
- package/src/providers/types/interactive-prompt.ts +536 -0
- package/src/providers/version-archive.ts +64 -24
- package/src/providers/working-dir.ts +23 -0
- package/src/repo-mesh-types.ts +378 -14
- package/src/sessions/registry.ts +6 -0
- package/src/shared-types-extra.ts +2 -4
- package/src/shared-types.d.ts +8 -0
- package/src/shared-types.ts +64 -1
- package/src/status/builders.ts +26 -6
- package/src/status/normalize.ts +2 -0
- package/src/status/reporter.ts +19 -1
- package/src/status/snapshot.ts +95 -26
- package/src/system/hash.ts +23 -0
- package/src/system/host-memory.ts +29 -12
- package/src/system/load-better-sqlite3.ts +68 -0
- package/src/types.ts +5 -0
- package/dist/cli-adapters/terminal-backends/xterm-backend.d.ts +0 -17
- package/dist/mesh/mesh-sync.d.ts +0 -53
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.d.ts +0 -16
- package/src/cli-adapters/terminal-backends/xterm-backend.ts +0 -97
- package/src/mesh/mesh-sync.ts +0 -111
package/src/git/git-types.ts
CHANGED
|
@@ -6,69 +6,21 @@
|
|
|
6
6
|
* infer these values from agent transcripts in frontend code.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
// Pure shape types now live in @adhdev/mesh-shared so the cloud (web-core) and
|
|
10
|
+
// standalone (daemon-core) transports share ONE definition instead of hand-syncing
|
|
11
|
+
// two. Re-exported here so existing `from './git-types'` / package imports keep
|
|
12
|
+
// working unchanged. Daemon-specific types (GitSnapshot, GitCommandName, …) stay
|
|
13
|
+
// local below and consume these re-exports.
|
|
14
|
+
export type {
|
|
15
|
+
GitFailureReason,
|
|
16
|
+
GitRepoIdentity,
|
|
17
|
+
GitSubmoduleStatus,
|
|
18
|
+
GitUpstreamFreshness,
|
|
19
|
+
GitRepoStatus,
|
|
20
|
+
DaemonBuildBehind,
|
|
21
|
+
} from '@adhdev/mesh-shared';
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
workspace: string;
|
|
22
|
-
repoRoot: string | null;
|
|
23
|
-
isGitRepo: boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface GitSubmoduleStatus {
|
|
27
|
-
/** Submodule path relative to repo root */
|
|
28
|
-
path: string;
|
|
29
|
-
/** Current commit SHA the submodule is at */
|
|
30
|
-
commit: string;
|
|
31
|
-
/** Path to the submodule repo (absolute) */
|
|
32
|
-
repoPath: string;
|
|
33
|
-
/** Whether the submodule has uncommitted changes */
|
|
34
|
-
dirty: boolean;
|
|
35
|
-
/** Whether the submodule commit differs from what the parent repo expects */
|
|
36
|
-
outOfSync: boolean;
|
|
37
|
-
/** Last checked timestamp */
|
|
38
|
-
lastCheckedAt: number;
|
|
39
|
-
/** Error message if submodule status could not be read */
|
|
40
|
-
error?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type GitUpstreamFreshness = 'fresh' | 'unchecked' | 'stale' | 'no_upstream' | 'unavailable';
|
|
44
|
-
|
|
45
|
-
export interface GitRepoStatus extends GitRepoIdentity {
|
|
46
|
-
branch: string | null;
|
|
47
|
-
headCommit: string | null;
|
|
48
|
-
headMessage: string | null;
|
|
49
|
-
upstream: string | null;
|
|
50
|
-
/** Whether ahead/behind was verified against a freshly fetched upstream ref. */
|
|
51
|
-
upstreamStatus: GitUpstreamFreshness;
|
|
52
|
-
/** Timestamp for the fetch that refreshed upstream refs when upstreamStatus === 'fresh'. */
|
|
53
|
-
upstreamFetchedAt?: number;
|
|
54
|
-
/** Error from the last refresh attempt when upstreamStatus === 'stale'. */
|
|
55
|
-
upstreamFetchError?: string;
|
|
56
|
-
ahead: number;
|
|
57
|
-
behind: number;
|
|
58
|
-
staged: number;
|
|
59
|
-
modified: number;
|
|
60
|
-
untracked: number;
|
|
61
|
-
deleted: number;
|
|
62
|
-
renamed: number;
|
|
63
|
-
hasConflicts: boolean;
|
|
64
|
-
conflictFiles: string[];
|
|
65
|
-
stashCount: number;
|
|
66
|
-
lastCheckedAt: number;
|
|
67
|
-
/** Submodule statuses when auto-discover is enabled */
|
|
68
|
-
submodules?: GitSubmoduleStatus[];
|
|
69
|
-
error?: string;
|
|
70
|
-
reason?: GitFailureReason;
|
|
71
|
-
}
|
|
23
|
+
import type { GitRepoIdentity, GitRepoStatus, GitFailureReason, GitUpstreamFreshness } from '@adhdev/mesh-shared';
|
|
72
24
|
|
|
73
25
|
export type GitFileChangeStatus =
|
|
74
26
|
| 'added'
|
package/src/git/git-worktree.ts
CHANGED
|
@@ -116,8 +116,11 @@ export async function createWorktree(opts: WorktreeCreateOptions): Promise<Workt
|
|
|
116
116
|
});
|
|
117
117
|
} catch (error: any) {
|
|
118
118
|
const stderr = typeof error.stderr === 'string' ? error.stderr : '';
|
|
119
|
-
// Clean error messages for common failures
|
|
120
119
|
if (/already exists/i.test(stderr)) {
|
|
120
|
+
// Distinguish directory-collision (TOCTOU race) from branch-already-exists
|
|
121
|
+
if (existsSync(targetDir)) {
|
|
122
|
+
throw new Error(`Worktree target directory was created concurrently: ${targetDir}`);
|
|
123
|
+
}
|
|
121
124
|
throw new Error(`Branch '${branch}' already exists or is checked out in another worktree`);
|
|
122
125
|
}
|
|
123
126
|
throw new Error(`git worktree add failed: ${stderr.trim() || error.message}`);
|
|
@@ -170,6 +173,10 @@ export async function removeWorktree(repoRoot: string, worktreePath: string, opt
|
|
|
170
173
|
const stdout = typeof error.stdout === 'string' ? error.stdout : '';
|
|
171
174
|
const detail = `${stderr}\n${stdout}\n${error.message || ''}`;
|
|
172
175
|
if (opts.allowSubmoduleForceFallback && SUBMODULE_WORKTREE_REMOVE_RE.test(detail)) {
|
|
176
|
+
process.stderr.write(
|
|
177
|
+
`[adhdev-mesh] WARNING: git worktree remove --force fallback for submodule worktree '${worktreePath}'. `
|
|
178
|
+
+ `Any uncommitted changes inside submodules will be lost.\n`,
|
|
179
|
+
);
|
|
173
180
|
try {
|
|
174
181
|
await execFileAsync('git', ['worktree', 'remove', '--force', worktreePath], {
|
|
175
182
|
cwd: repoRoot,
|
package/src/git/index.ts
CHANGED
|
@@ -26,6 +26,22 @@ export type { GitCommandResult as GitExecutorCommandResult, GitExecutorOptions,
|
|
|
26
26
|
export { getGitRepoStatus, parsePorcelainV2Status } from './git-status.js';
|
|
27
27
|
export type { GitStatusOptions } from './git-status.js';
|
|
28
28
|
|
|
29
|
+
export {
|
|
30
|
+
CHANGE_IMPACT_CONFIG_LOCATIONS,
|
|
31
|
+
CHANGE_IMPACT_CONFIG_SCHEMA,
|
|
32
|
+
globToRegExp,
|
|
33
|
+
loadChangeImpactConfig,
|
|
34
|
+
suggestChangeImpactConfig,
|
|
35
|
+
validateChangeImpactConfig,
|
|
36
|
+
} from './change-impact-config.js';
|
|
37
|
+
export type {
|
|
38
|
+
ChangeImpactConfig,
|
|
39
|
+
ChangeImpactConfigLoadResult,
|
|
40
|
+
ChangeImpactConfigSuggestion,
|
|
41
|
+
ChangeImpactKind,
|
|
42
|
+
ChangeImpactTarget,
|
|
43
|
+
} from './change-impact-config.js';
|
|
44
|
+
|
|
29
45
|
export { getGitDiffSummary, getGitFileDiff } from './git-diff.js';
|
|
30
46
|
export type { GitDiffOptions, GitFileDiffResult } from './git-diff.js';
|
|
31
47
|
|
package/src/index.ts
CHANGED
|
@@ -85,9 +85,28 @@ export type {
|
|
|
85
85
|
InputMediaType,
|
|
86
86
|
} from './shared-types.js';
|
|
87
87
|
|
|
88
|
+
export type {
|
|
89
|
+
InteractivePrompt,
|
|
90
|
+
InteractiveQuestion,
|
|
91
|
+
InteractiveOption,
|
|
92
|
+
InteractivePromptResponse,
|
|
93
|
+
InteractiveAnswer,
|
|
94
|
+
} from './providers/types/interactive-prompt.js';
|
|
95
|
+
export {
|
|
96
|
+
normalizeInteractivePrompt,
|
|
97
|
+
normalizeInteractivePromptResponse,
|
|
98
|
+
buildClaudeInteractiveToolResult,
|
|
99
|
+
interactivePromptFromClaudeAskUserQuestion,
|
|
100
|
+
detectClaudeAskUserQuestionPromptFromJson,
|
|
101
|
+
} from './providers/types/interactive-prompt.js';
|
|
102
|
+
|
|
88
103
|
// ── Repo Mesh Types (cross-package) ──
|
|
89
104
|
export type {
|
|
90
105
|
RepoMesh,
|
|
106
|
+
RepoMeshDaemonRole,
|
|
107
|
+
RepoMeshHostMetadata,
|
|
108
|
+
RepoMeshHostPairingMetadata,
|
|
109
|
+
RepoMeshHostStatus,
|
|
91
110
|
RepoMeshNode,
|
|
92
111
|
RepoMeshNodeHealth,
|
|
93
112
|
RepoMeshPolicy,
|
|
@@ -103,6 +122,9 @@ export type {
|
|
|
103
122
|
LocalMeshNodeEntry,
|
|
104
123
|
RepoMeshStatus,
|
|
105
124
|
RepoMeshNodeStatus,
|
|
125
|
+
RepoMeshPeerConnectionStatus,
|
|
126
|
+
RepoMeshPeerConnectionState,
|
|
127
|
+
RepoMeshPeerConnectionTransport,
|
|
106
128
|
RepoMeshSessionStatus,
|
|
107
129
|
RepoMeshQueueTask,
|
|
108
130
|
RepoMeshQueueTaskStatus,
|
|
@@ -111,8 +133,20 @@ export type {
|
|
|
111
133
|
RepoMeshLedgerEntryStatus,
|
|
112
134
|
RepoMeshLedgerSummaryStatus,
|
|
113
135
|
RepoMeshLedgerStatus,
|
|
136
|
+
MeshAsyncJobLifecycle,
|
|
137
|
+
RepoMeshSchedulingStrategy,
|
|
138
|
+
} from './repo-mesh-types.js';
|
|
139
|
+
export {
|
|
140
|
+
DEFAULT_MESH_POLICY,
|
|
141
|
+
resolveDelegatedWorkerAutoApprove,
|
|
142
|
+
MESH_SCHEDULING_STRATEGIES,
|
|
143
|
+
DEFAULT_MESH_SCHEDULING_STRATEGY,
|
|
144
|
+
normalizeMeshSchedulingStrategy,
|
|
145
|
+
resolveNodeSchedulingPriority,
|
|
146
|
+
MESH_CONVERGE_REFINE_TAG,
|
|
147
|
+
MESH_CONVERGE_FAST_FORWARD_TAG,
|
|
148
|
+
resolveAutoConvergeCodeChange,
|
|
114
149
|
} from './repo-mesh-types.js';
|
|
115
|
-
export { DEFAULT_MESH_POLICY } from './repo-mesh-types.js';
|
|
116
150
|
|
|
117
151
|
// ── Git Surface ──
|
|
118
152
|
export * from './git/index.js';
|
|
@@ -138,7 +172,7 @@ export type RecentSessionBucket = 'needs_attention' | 'working' | 'task_complete
|
|
|
138
172
|
export type { IDaemonCore, DaemonCoreOptions } from './daemon-core.js';
|
|
139
173
|
|
|
140
174
|
// ── Config ──
|
|
141
|
-
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig } from './config/config.js';
|
|
175
|
+
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig, getDaemonDataDir } from './config/config.js';
|
|
142
176
|
export { getWorkspaceState } from './config/workspaces.js';
|
|
143
177
|
export { appendRecentActivity, getRecentActivity } from './config/recent-activity.js';
|
|
144
178
|
export type { RecentActivityEntry } from './config/recent-activity.js';
|
|
@@ -152,21 +186,68 @@ export {
|
|
|
152
186
|
} from './config/mesh-config.js';
|
|
153
187
|
export type { CreateMeshOptions, UpdateMeshOptions, AddNodeOptions } from './config/mesh-config.js';
|
|
154
188
|
|
|
189
|
+
// ── Mesh shared daemon-id / node-id helpers (re-export so external tooling —
|
|
190
|
+
// e.g. the mcp-server, which depends only on @adhdev/daemon-core — can
|
|
191
|
+
// canonicalize daemon-id and node-id forms without taking a direct
|
|
192
|
+
// @adhdev/mesh-shared dependency). ──
|
|
193
|
+
export { expandDaemonIdForms, daemonIdsEquivalent, machineCoreFromDaemonId } from '@adhdev/mesh-shared';
|
|
194
|
+
export { normalizeMeshNodeId, meshNodeIdMatches } from '@adhdev/mesh-shared';
|
|
195
|
+
|
|
155
196
|
// ── Mesh Coordinator ──
|
|
156
197
|
export { buildCoordinatorSystemPrompt } from './mesh/coordinator-prompt.js';
|
|
198
|
+
export { upsertMeshMission, getMeshMissions, getMeshMission, summarizeMissionTasks, summarizeMeshMission, getActiveMeshMissionSummaries, getMeshStatusMissionSummaries, getMeshStatusMissionsCompact, listMeshMissionSummaries, buildMissionPromptSection, GOAL_PREVIEW_MAX, COMPACT_STATUS_GOAL_PREVIEW_MAX, MESH_MISSION_STATUSES } from './mesh/mesh-missions.js';
|
|
199
|
+
export type { MeshMissionRecord, MeshMissionStatus, MeshMissionSummary, MeshMissionSlimSummary, MeshMissionTaskAggregate, MeshStatusMissionsCompact, MeshStatusMissionsHistoryFold } from './mesh/mesh-missions.js';
|
|
200
|
+
export { computeMeshTaskStats, computeMeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
201
|
+
export type { MeshTaskStats, MeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
202
|
+
export { deriveMeshReviewInboxItems } from './mesh/mesh-review-inbox.js';
|
|
203
|
+
export type { MeshReviewInboxItem, MeshReviewInboxDerivation, MeshReviewInboxEvidence, MeshReviewInboxDiffSummary, MeshReviewInboxDiffFile, MeshReviewInboxReason, MeshReviewInboxConvergence } from './mesh/mesh-review-inbox.js';
|
|
157
204
|
export type { CoordinatorPromptContext } from './mesh/coordinator-prompt.js';
|
|
158
|
-
export {
|
|
159
|
-
export type {
|
|
205
|
+
export { loadMeshCoordinatorRegistry, registerMeshCoordinator, unregisterMeshCoordinator, getCoordinatorForSession, listCoordinatorsForWorkspace } from './mesh/coordinator-registry.js';
|
|
206
|
+
export type { CoordinatorRegistryEntry } from './mesh/coordinator-registry.js';
|
|
207
|
+
export {
|
|
208
|
+
MESH_REFINE_CONFIG_LOCATIONS,
|
|
209
|
+
MESH_REFINE_CONFIG_SCHEMA,
|
|
210
|
+
loadMeshRefineConfig,
|
|
211
|
+
resolveMeshRefineValidationPlan,
|
|
212
|
+
suggestMeshRefineConfig,
|
|
213
|
+
validateMeshRefineConfig,
|
|
214
|
+
} from './mesh/refine-config.js';
|
|
215
|
+
export {
|
|
216
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS,
|
|
217
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA,
|
|
218
|
+
loadMeshWorktreeBootstrapConfig,
|
|
219
|
+
runMeshWorktreeBootstrap,
|
|
220
|
+
validateMeshWorktreeBootstrapConfig,
|
|
221
|
+
type RepoMeshWorktreeBootstrapConfig,
|
|
222
|
+
type WorktreeBootstrapState,
|
|
223
|
+
} from './mesh/worktree-bootstrap-config.js';
|
|
224
|
+
export type {
|
|
225
|
+
MeshRefineValidationCategory,
|
|
226
|
+
MeshRefineValidationCommandPlan,
|
|
227
|
+
MeshRefineValidationPlan,
|
|
228
|
+
RepoMeshRefineConfig,
|
|
229
|
+
RepoMeshRefineValidationCommandConfig,
|
|
230
|
+
} from './mesh/refine-config.js';
|
|
160
231
|
|
|
161
232
|
// ── Mesh Task Ledger ──
|
|
162
|
-
export { appendLedgerEntry, appendRemoteLedgerEntries, readLedgerEntries, readLedgerSlice, getLedgerSummary, getLedgerDir, getSessionRecoveryContext, MAX_LEDGER_SLICE_LIMIT } from './mesh/mesh-ledger.js';
|
|
163
|
-
export type { AppendRemoteLedgerResult, MeshLedgerEntry, MeshLedgerKind, MeshLedgerSlice, MeshLedgerSummary, ReadLedgerOptions, ReadLedgerSliceOptions, SessionRecoveryContext } from './mesh/mesh-ledger.js';
|
|
233
|
+
export { appendLedgerEntry, appendRemoteLedgerEntries, buildTaskCompletionEvidence, normalizeMeshWorkerResult, readLedgerEntries, readLedgerSlice, readLedgerSliceFromStore, getLedgerSummary, getLedgerDir, getSessionRecoveryContext, MAX_LEDGER_SLICE_LIMIT } from './mesh/mesh-ledger.js';
|
|
234
|
+
export type { AppendRemoteLedgerResult, MeshLedgerEntry, MeshLedgerKind, MeshLedgerSlice, MeshLedgerSummary, ReadLedgerOptions, ReadLedgerSliceOptions, SessionRecoveryContext, MeshTaskCompletionEvidence, MeshWorkerResultArtifact, MeshProcessArtifact, MeshValidationResultArtifact } from './mesh/mesh-ledger.js';
|
|
235
|
+
export { fastForwardMeshNode } from './mesh/mesh-fast-forward.js';
|
|
236
|
+
export type { MeshFastForwardNodeArgs, MeshFastForwardPlannedStep, MeshFastForwardResult } from './mesh/mesh-fast-forward.js';
|
|
164
237
|
export { buildMeshLedgerReconciliationEvidence, buildMeshLedgerReplicaEvidence } from './mesh/mesh-ledger-reconciliation.js';
|
|
165
|
-
export type { MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
238
|
+
export type { AnyLedgerSlice, MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
166
239
|
|
|
167
240
|
// ── Mesh Work Queue (GUPP) ──
|
|
168
|
-
export { enqueueTask, getQueue, claimNextTask, updateTaskStatus, updateSessionTaskStatus, cancelTask, requeueTask, getMeshQueueStats } from './mesh/mesh-work-queue.js';
|
|
169
|
-
export type { MeshWorkQueueEntry, MeshTaskStatus, MeshWorkQueueStats } from './mesh/mesh-work-queue.js';
|
|
241
|
+
export { enqueueTask, recordDirectDispatchTask, getQueue, claimNextTask, updateTaskStatus, updateSessionTaskStatus, cancelTask, requeueTask, getMeshQueueStats, getMeshQueueRevision, normalizeMeshTaskMode, validateMeshTaskModeRequest, buildMeshNodeCapabilityTags, nodeSatisfiesRequiredTags, normalizeMeshCapabilityTags, resolveConvergeRequiredTags, insertDirectDispatch, getActiveDirectDispatches, updateDirectDispatchStatus, cleanupTerminalDirectDispatches, markStaleDirectDispatches, deleteDirectDispatchesByTaskId, recordMeshToolCall, assertNoDependencyCycle, hasPendingDependents, describeTaskDependencyState } from './mesh/mesh-work-queue.js';
|
|
242
|
+
export type { MeshWorkQueueEntry, MeshTaskStatus, MeshTaskMode, MeshWorkQueueStats, MeshQueueMutationOptions, MeshTaskModeValidationResult, DirectDispatchRecord, MeshToolCallRateResult } from './mesh/mesh-work-queue.js';
|
|
243
|
+
export { buildCompactStaleDirectWorkSummary, buildMeshActiveWork, buildMeshActiveWorkSummary, classifyStaleDirectForPrune, pruneStaleDirectDispatches, PRUNABLE_ORPHAN_STALE_REASONS } from './mesh/mesh-active-work.js';
|
|
244
|
+
export type { StaleDirectPruneClassification, StaleDirectPruneResult, PruneStaleDirectDispatchesOptions } from './mesh/mesh-active-work.js';
|
|
245
|
+
export type { MeshActiveWorkRecord, MeshActiveWorkStatus, MeshActiveWorkSummary, MeshActiveWorkSource, MeshStaleDirectWorkSummary } from './mesh/mesh-active-work.js';
|
|
246
|
+
export { buildMeshAsyncRefineJobs, summarizeMeshAsyncRefineJobs, STALE_TERMINAL_REFINE_WINDOW_MS, RECENT_TERMINAL_REFINE_CAP } from './mesh/mesh-refine-status.js';
|
|
247
|
+
export type { MeshAsyncRefineJobStatus, MeshAsyncRefineJobSummary, MeshAsyncRefineJobsSummary } from './mesh/mesh-refine-status.js';
|
|
248
|
+
|
|
249
|
+
// ── Mesh Host Ownership ──
|
|
250
|
+
export { buildMeshHostRequiredFailure, createDefaultMeshHostMetadata, isMeshHostOwner, normalizeMeshDaemonRole, requireMeshHostQueueOwner, resolveMeshHostStatus } from './mesh/mesh-host-ownership.js';
|
|
170
251
|
|
|
171
252
|
// ── Mesh Visualization ──
|
|
172
253
|
// buildMeshGraph and MeshGraph types moved to @adhdev/web-core to avoid
|
|
@@ -176,8 +257,17 @@ export type { MeshWorkQueueEntry, MeshTaskStatus, MeshWorkQueueStats } from './m
|
|
|
176
257
|
// export type { MeshGraph, MeshGraphNode, MeshGraphEdge, MeshGraphNodeType, MeshGraphEdgeType } from './mesh/mesh-visualization.js';
|
|
177
258
|
|
|
178
259
|
// ── Mesh Events ──
|
|
179
|
-
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
260
|
+
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent, reconcileDirectDispatchCompletionFromTranscript } from './mesh/mesh-events.js';
|
|
180
261
|
export type { PendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
262
|
+
// The coordinator-side preview surfaced from a worker's completion/status event
|
|
263
|
+
// (finalSummary / workerResult.summary / lastMessagePreview). Same data the mobile
|
|
264
|
+
// inbox is fed; reused by mesh_read_chat's cache fallback when the live P2P read path
|
|
265
|
+
// is unavailable (saturated/unreachable peer).
|
|
266
|
+
export { resolveMeshSurfacedSessionPreview, readMeshCompletionSummary } from './mesh/mesh-events-utils.js';
|
|
267
|
+
|
|
268
|
+
// ── Mesh Delivery Policy ──
|
|
269
|
+
export { resolveDeliveryDecision, createSessionDelivery, updateSessionDeliveryStatus, getActiveSessionDeliveries, markSessionDeliveriesTerminal, recordCompletionConflict, getRecentCompletionConflicts } from './mesh/mesh-delivery-policy.js';
|
|
270
|
+
export type { MeshSessionDeliveryStatus, MeshSessionDeliveryKind, MeshDeliveryDecision, MeshDeliveryPolicyResult, SessionDeliveryRecord } from './mesh/mesh-delivery-policy.js';
|
|
181
271
|
|
|
182
272
|
// ── Mesh P2P Relay Failure Classification ──
|
|
183
273
|
export {
|
|
@@ -222,7 +312,7 @@ export type { CdpInitializerConfig } from './cdp/initializer.js';
|
|
|
222
312
|
// ── Commands ──
|
|
223
313
|
export { DaemonCommandHandler } from './commands/handler.js';
|
|
224
314
|
export type { CommandResult, CommandContext } from './commands/handler.js';
|
|
225
|
-
export { DaemonCommandRouter } from './commands/router.js';
|
|
315
|
+
export { DaemonCommandRouter, readCachedInlineMeshActiveSessionDetails, resolveMeshNodeAttribution, buildMeshNodeDataFreshness, MESH_NODE_LIVE_TRUTH_MARKER } from './commands/router.js';
|
|
226
316
|
export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
|
|
227
317
|
export {
|
|
228
318
|
maybeRunDaemonUpgradeHelperFromEnv,
|
|
@@ -242,7 +332,9 @@ export type {
|
|
|
242
332
|
// ── Status ──
|
|
243
333
|
export { DaemonStatusReporter } from './status/reporter.js';
|
|
244
334
|
export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
|
|
245
|
-
export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
|
|
335
|
+
export { buildStatusSnapshot, buildMachineInfo, getLastDisplayMessage } from './status/snapshot.js';
|
|
336
|
+
export { getDaemonBuildInfo } from './build-info.js';
|
|
337
|
+
export type { DaemonBuildInfo } from './build-info.js';
|
|
246
338
|
export { normalizeManagedStatus, isManagedStatusWorking, isManagedStatusWaiting, normalizeActiveChatData } from './status/normalize.js';
|
|
247
339
|
export type { ManagedStatus } from './status/normalize.js';
|
|
248
340
|
export type { StatusSnapshotOptions, StatusSnapshot } from './status/snapshot.js';
|
|
@@ -388,6 +480,13 @@ export type { CliAdapter } from './cli-adapter-types.js';
|
|
|
388
480
|
export { NodePtyTransportFactory } from './cli-adapters/pty-transport.js';
|
|
389
481
|
export type { PtyRuntimeTransport, PtyTransportFactory, PtySpawnOptions } from './cli-adapters/pty-transport.js';
|
|
390
482
|
export { SessionHostPtyTransportFactory } from './cli-adapters/session-host-transport.js';
|
|
483
|
+
export {
|
|
484
|
+
RawTerminalAttachment,
|
|
485
|
+
namedKeyToAnsi,
|
|
486
|
+
namedKeysToAnsi,
|
|
487
|
+
withRawTerminalAttachment,
|
|
488
|
+
} from './cli-adapters/raw-terminal-io.js';
|
|
489
|
+
export type { NamedKey, RawTerminalAttachmentOptions, RawTerminalSessionHostClient } from './cli-adapters/raw-terminal-io.js';
|
|
391
490
|
export type { HostedCliRuntimeDescriptor, CliTransportFactoryParams } from './commands/cli-manager.js';
|
|
392
491
|
export {
|
|
393
492
|
DEFAULT_SESSION_HOST_APP_NAME,
|
|
@@ -415,3 +514,50 @@ export type { ExtensionInfo as InstallerExtensionInfo } from './installer.js';
|
|
|
415
514
|
// ── Boot / Lifecycle ──
|
|
416
515
|
export { initDaemonComponents, startDaemonDevSupport, shutdownDaemonComponents } from './boot/daemon-lifecycle.js';
|
|
417
516
|
export type { DaemonInitConfig, DaemonComponents, DaemonDevSupportOptions } from './boot/daemon-lifecycle.js';
|
|
517
|
+
|
|
518
|
+
// ── Local IPC server (shared between cloud + standalone daemons) ──
|
|
519
|
+
export {
|
|
520
|
+
startLocalIpcServer,
|
|
521
|
+
buildIpcStatusHttpResponse,
|
|
522
|
+
type LocalIpcServerOptions,
|
|
523
|
+
type LocalIpcServerHandle,
|
|
524
|
+
type IpcCommandContext,
|
|
525
|
+
type IpcCommandResult,
|
|
526
|
+
type IpcStatusPayload,
|
|
527
|
+
} from './ipc/local-ipc-server.js';
|
|
528
|
+
|
|
529
|
+
// ── CLI Spec (adhdev:cli/spec@4) ──
|
|
530
|
+
export { createNativeHistoryDispatcher } from './providers/native-history/index.js';
|
|
531
|
+
export type { ReaderId } from './providers/native-history/index.js';
|
|
532
|
+
export {
|
|
533
|
+
readClaudeCliSession, readCodexCliSession,
|
|
534
|
+
readAntigravityCliSession, readHermesCliSession,
|
|
535
|
+
} from './providers/native-history/index.js';
|
|
536
|
+
export type {
|
|
537
|
+
ControlAction, Control,
|
|
538
|
+
NotificationRule, DelegateTrigger,
|
|
539
|
+
} from './providers/spec/types.js';
|
|
540
|
+
export type { TraceEntry } from './providers/spec/evaluator.js';
|
|
541
|
+
export { evaluateFsm } from './providers/spec/fsm-evaluator.js';
|
|
542
|
+
export type { FsmClock } from './providers/spec/fsm-evaluator.js';
|
|
543
|
+
export { validateFsmSpec } from './providers/spec/fsm-loader.js';
|
|
544
|
+
export { FsmDriver } from './providers/spec/fsm-driver.js';
|
|
545
|
+
export type { DashboardEvent, DashboardCommand, SpecDriverOpts, ISpecDriver } from './providers/spec/fsm-driver.js';
|
|
546
|
+
export { TerminalAdapter } from './providers/spec/adapter.js';
|
|
547
|
+
export type { TerminalAdapterOpts, TerminalAdapterHandlers } from './providers/spec/adapter.js';
|
|
548
|
+
|
|
549
|
+
// ── Provider SDK (v1) — selective re-exports for external tooling ──
|
|
550
|
+
// Tooling (registry publish, dashboard validators, the e2e harness) needs
|
|
551
|
+
// the manifest validator, the builder catalog, and the contract version.
|
|
552
|
+
// We don't re-export *everything* from the SDK to keep the public surface
|
|
553
|
+
// stable; consumers that need internal SDK types still import from the
|
|
554
|
+
// sdk/v1 subpath.
|
|
555
|
+
export {
|
|
556
|
+
validateCliProviderManifest,
|
|
557
|
+
formatManifestValidationIssues,
|
|
558
|
+
type ManifestValidationIssue,
|
|
559
|
+
type ManifestValidationResult,
|
|
560
|
+
V1_CONTRACT_VERSION,
|
|
561
|
+
V1_PRIMITIVE_CATALOG,
|
|
562
|
+
V1_ALL_PRIMITIVES,
|
|
563
|
+
} from './providers/sdk/v1/index.js';
|
package/src/installer.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface InstallResult {
|
|
|
31
31
|
/**
|
|
32
32
|
* Check if an extension is already installed
|
|
33
33
|
*/
|
|
34
|
-
export declare function isExtensionInstalled(ide: IDEInfo, marketplaceId: string): boolean
|
|
34
|
+
export declare function isExtensionInstalled(ide: IDEInfo, marketplaceId: string): Promise<boolean>;
|
|
35
35
|
/**
|
|
36
36
|
* Install a single extension
|
|
37
37
|
*/
|
package/src/installer.ts
CHANGED
|
@@ -122,20 +122,22 @@ export interface InstallResult {
|
|
|
122
122
|
/**
|
|
123
123
|
* Check if an extension is already installed
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
import { promisify } from 'util';
|
|
126
|
+
const execAsync = promisify(exec);
|
|
127
|
+
|
|
128
|
+
export async function isExtensionInstalled(
|
|
126
129
|
ide: IDEInfo,
|
|
127
130
|
marketplaceId: string
|
|
128
|
-
): boolean {
|
|
131
|
+
): Promise<boolean> {
|
|
129
132
|
if (!ide.cliCommand) return false;
|
|
130
133
|
|
|
131
134
|
try {
|
|
132
|
-
const
|
|
135
|
+
const { stdout } = await execAsync(`"${ide.cliCommand}" --list-extensions`, {
|
|
133
136
|
encoding: 'utf-8',
|
|
134
137
|
timeout: 15000,
|
|
135
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
136
138
|
});
|
|
137
139
|
|
|
138
|
-
const installed =
|
|
140
|
+
const installed = stdout
|
|
139
141
|
.trim()
|
|
140
142
|
.split('\n')
|
|
141
143
|
.map((e) => e.trim().toLowerCase());
|
|
@@ -163,7 +165,7 @@ export async function installExtension(
|
|
|
163
165
|
}
|
|
164
166
|
|
|
165
167
|
// Check if already installed
|
|
166
|
-
const alreadyInstalled = isExtensionInstalled(ide, extension.marketplaceId);
|
|
168
|
+
const alreadyInstalled = await isExtensionInstalled(ide, extension.marketplaceId);
|
|
167
169
|
if (alreadyInstalled) {
|
|
168
170
|
return {
|
|
169
171
|
extensionId: extension.id,
|