@adhdev/daemon-core 0.9.82-rc.39 → 0.9.82-rc.390
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 +67 -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 +121 -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 +74 -0
- package/dist/cli-adapters/pty-write-chunking.d.ts +34 -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-debug-bundle.d.ts +14 -0
- package/dist/commands/chat-commands-read.d.ts +7 -0
- package/dist/commands/chat-commands-scope.d.ts +39 -0
- package/dist/commands/chat-commands-shared.d.ts +33 -0
- package/dist/commands/chat-commands-write.d.ts +14 -0
- package/dist/commands/chat-commands.d.ts +10 -23
- 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 +237 -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/git-worktree.d.ts +22 -0
- package/dist/git/index.d.ts +2 -0
- package/dist/index.d.ts +57 -13
- package/dist/index.js +46306 -18259
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46439 -18533
- 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 +81 -0
- package/dist/logging/logger.d.ts +1 -1
- package/dist/mesh/contracts.d.ts +164 -0
- package/dist/mesh/coordinator-prompt.d.ts +89 -0
- package/dist/mesh/coordinator-registry.d.ts +59 -0
- package/dist/mesh/mesh-active-work.d.ts +174 -0
- package/dist/mesh/mesh-coordinator-config.d.ts +21 -0
- package/dist/mesh/mesh-delivery-policy.d.ts +131 -0
- package/dist/mesh/mesh-event-classify.d.ts +5 -0
- package/dist/mesh/mesh-event-forwarding.d.ts +19 -0
- package/dist/mesh/mesh-event-trace.d.ts +21 -0
- package/dist/mesh/mesh-events-coordinator.d.ts +4 -0
- package/dist/mesh/mesh-events-pending.d.ts +55 -0
- package/dist/mesh/mesh-events-stale.d.ts +52 -0
- package/dist/mesh/mesh-events-utils.d.ts +64 -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 -4
- package/dist/mesh/mesh-ledger.d.ts +77 -1
- package/dist/mesh/mesh-missions.d.ts +164 -0
- package/dist/mesh/mesh-node-identity.d.ts +289 -0
- package/dist/mesh/mesh-queue-assignment.d.ts +86 -0
- package/dist/mesh/mesh-reconcile-loop.d.ts +65 -0
- package/dist/mesh/mesh-refine-batch.d.ts +68 -0
- package/dist/mesh/mesh-refine-gates.d.ts +428 -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 +447 -0
- package/dist/mesh/mesh-scheduling-runtime.d.ts +78 -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 +247 -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 +13 -1
- package/dist/providers/cli-provider-instance.d.ts +157 -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/constants.d.ts +12 -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 +407 -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 +376 -13
- package/dist/runtime-defaults.d.ts +2 -0
- 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 +68 -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 +836 -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 +121 -11
- package/src/cli-adapters/pty-transport.ts +2 -1
- package/src/cli-adapters/pty-write-chunking.ts +106 -0
- 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-debug-bundle.ts +398 -0
- package/src/commands/chat-commands-read.ts +2327 -0
- package/src/commands/chat-commands-scope.ts +54 -0
- package/src/commands/chat-commands-shared.ts +114 -0
- package/src/commands/chat-commands-write.ts +880 -0
- package/src/commands/chat-commands.ts +19 -1841
- package/src/commands/cli-manager.ts +513 -26
- 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 +657 -0
- package/src/commands/high-family/mesh-events.ts +80 -0
- package/src/commands/high-family/mesh-status.ts +678 -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 +87 -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 +230 -0
- package/src/commands/med-family/fast-forward.ts +230 -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 +836 -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 +2476 -3207
- 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 +353 -22
- 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 +76 -1
- package/src/git/index.ts +16 -0
- package/src/index.ts +171 -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 +341 -0
- package/src/logging/logger.ts +14 -7
- package/src/mesh/contracts.ts +338 -0
- package/src/mesh/coordinator-prompt.ts +381 -33
- package/src/mesh/coordinator-registry.ts +121 -0
- package/src/mesh/mesh-active-work.ts +645 -0
- package/src/mesh/mesh-coordinator-config.ts +97 -0
- package/src/mesh/mesh-delivery-policy.ts +315 -0
- package/src/mesh/mesh-event-classify.ts +51 -0
- package/src/mesh/mesh-event-forwarding.ts +1665 -0
- package/src/mesh/mesh-event-trace.ts +67 -0
- package/src/mesh/mesh-events-coordinator.ts +30 -0
- package/src/mesh/mesh-events-pending.ts +590 -0
- package/src/mesh/mesh-events-stale.ts +363 -0
- package/src/mesh/mesh-events-utils.ts +425 -0
- package/src/mesh/mesh-events.ts +32 -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 -7
- package/src/mesh/mesh-ledger.ts +596 -102
- package/src/mesh/mesh-missions.ts +322 -0
- package/src/mesh/mesh-node-identity.ts +1887 -0
- package/src/mesh/mesh-queue-assignment.ts +1491 -0
- package/src/mesh/mesh-reconcile-loop.ts +1527 -0
- package/src/mesh/mesh-refine-batch.ts +197 -0
- package/src/mesh/mesh-refine-gates.ts +1652 -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 +1795 -0
- package/src/mesh/mesh-scheduling-runtime.ts +199 -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 +1141 -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 +46 -6
- package/src/providers/cli-provider-instance.ts +1552 -102
- 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/constants.ts +19 -0
- package/src/providers/native-history/dispatcher.ts +339 -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 +1056 -0
- package/src/providers/spec/evaluator.ts +407 -0
- package/src/providers/spec/fsm-driver.ts +1304 -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 +1128 -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 +542 -14
- package/src/runtime-defaults.ts +39 -0
- 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,
|
|
@@ -250,6 +257,74 @@ export function parseWorktreeListOutput(output: string): WorktreeEntry[] {
|
|
|
250
257
|
return entries;
|
|
251
258
|
}
|
|
252
259
|
|
|
260
|
+
// ─── Branch ref deletion ────────────────────────
|
|
261
|
+
|
|
262
|
+
export interface BranchRefDeleteResult {
|
|
263
|
+
/** True if the branch ref no longer exists after this call. */
|
|
264
|
+
deleted: boolean;
|
|
265
|
+
/** Why it was (not) deleted, for surfacing in the cleanup result. */
|
|
266
|
+
reason: string;
|
|
267
|
+
/** True when a forced delete (`-D`) was needed (e.g. squash/patch-equivalent merge). */
|
|
268
|
+
forced?: boolean;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Delete a local branch ref after its worktree was removed.
|
|
273
|
+
*
|
|
274
|
+
* SAFETY: this is only meant to be called once the caller has independently
|
|
275
|
+
* verified that the branch is fully merged / its content is contained in the
|
|
276
|
+
* default ref (no work loss). It first tries the safe `git branch -d`, which
|
|
277
|
+
* refuses to delete a branch git itself does not consider merged. If
|
|
278
|
+
* `safeDeleteOnly` is false (the caller proved containment by patch-equivalence,
|
|
279
|
+
* which `-d` cannot see), it falls back to `git branch -D`. When the branch is
|
|
280
|
+
* already gone, this reports `deleted: true` idempotently.
|
|
281
|
+
*/
|
|
282
|
+
export async function deleteBranchRef(
|
|
283
|
+
repoRoot: string,
|
|
284
|
+
branch: string,
|
|
285
|
+
opts: { safeDeleteOnly?: boolean } = {},
|
|
286
|
+
): Promise<BranchRefDeleteResult> {
|
|
287
|
+
const name = (branch || '').trim();
|
|
288
|
+
if (!name) return { deleted: false, reason: 'empty_branch_name' };
|
|
289
|
+
|
|
290
|
+
// Idempotent: nothing to delete if the ref does not exist.
|
|
291
|
+
try {
|
|
292
|
+
await execFileAsync('git', ['rev-parse', '--verify', '--quiet', `refs/heads/${name}`], {
|
|
293
|
+
cwd: repoRoot, encoding: 'utf8', timeout: GIT_TIMEOUT_MS, maxBuffer: GIT_MAX_BUFFER, windowsHide: true,
|
|
294
|
+
});
|
|
295
|
+
} catch {
|
|
296
|
+
return { deleted: true, reason: 'branch_ref_absent' };
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Try the safe delete first — git refuses if it cannot see the branch as merged.
|
|
300
|
+
try {
|
|
301
|
+
await execFileAsync('git', ['branch', '-d', name], {
|
|
302
|
+
cwd: repoRoot, encoding: 'utf8', timeout: GIT_TIMEOUT_MS, maxBuffer: GIT_MAX_BUFFER, windowsHide: true,
|
|
303
|
+
});
|
|
304
|
+
return { deleted: true, reason: 'safe_deleted_merged_branch' };
|
|
305
|
+
} catch (error: any) {
|
|
306
|
+
const stderr = typeof error?.stderr === 'string' ? error.stderr : '';
|
|
307
|
+
const notMerged = /not fully merged/i.test(stderr) || /not fully merged/i.test(String(error?.message || ''));
|
|
308
|
+
if (!notMerged) {
|
|
309
|
+
return { deleted: false, reason: `branch_delete_failed: ${stderr.trim() || error?.message || 'unknown error'}` };
|
|
310
|
+
}
|
|
311
|
+
// git -d refused. Only force when the caller proved containment another way
|
|
312
|
+
// (e.g. squash/cherry-pick/patch-equivalent merge that -d cannot detect).
|
|
313
|
+
if (opts.safeDeleteOnly) {
|
|
314
|
+
return { deleted: false, reason: 'branch_not_merged_per_git_safe_delete_only' };
|
|
315
|
+
}
|
|
316
|
+
try {
|
|
317
|
+
await execFileAsync('git', ['branch', '-D', name], {
|
|
318
|
+
cwd: repoRoot, encoding: 'utf8', timeout: GIT_TIMEOUT_MS, maxBuffer: GIT_MAX_BUFFER, windowsHide: true,
|
|
319
|
+
});
|
|
320
|
+
return { deleted: true, reason: 'force_deleted_patch_equivalent_branch', forced: true };
|
|
321
|
+
} catch (forceError: any) {
|
|
322
|
+
const fErr = typeof forceError?.stderr === 'string' ? forceError.stderr : forceError?.message;
|
|
323
|
+
return { deleted: false, reason: `branch_force_delete_failed: ${String(fErr || 'unknown error').trim()}` };
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
253
328
|
// ─── Prune ──────────────────────────────────────
|
|
254
329
|
|
|
255
330
|
async function pruneWorktrees(repoRoot: string): Promise<void> {
|
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,29 @@ export type {
|
|
|
111
133
|
RepoMeshLedgerEntryStatus,
|
|
112
134
|
RepoMeshLedgerSummaryStatus,
|
|
113
135
|
RepoMeshLedgerStatus,
|
|
136
|
+
MeshAsyncJobLifecycle,
|
|
137
|
+
RepoMeshSchedulingStrategy,
|
|
138
|
+
RepoMeshSchedulingStatus,
|
|
139
|
+
RepoMeshNodeSchedulingStatus,
|
|
140
|
+
RepoMeshNodeProviderSchedulingStatus,
|
|
141
|
+
} from './repo-mesh-types.js';
|
|
142
|
+
export {
|
|
143
|
+
DEFAULT_MESH_POLICY,
|
|
144
|
+
resolveDelegatedWorkerAutoApprove,
|
|
145
|
+
MESH_SCHEDULING_STRATEGIES,
|
|
146
|
+
DEFAULT_MESH_SCHEDULING_STRATEGY,
|
|
147
|
+
normalizeMeshSchedulingStrategy,
|
|
148
|
+
resolveNodeSchedulingPriority,
|
|
149
|
+
resolveProviderMaxParallel,
|
|
150
|
+
mergeAndNormalizePolicy,
|
|
151
|
+
normalizeAutoFastForwardPolicy,
|
|
152
|
+
resolveMaxParallelTasks,
|
|
153
|
+
MESH_MAX_PARALLEL_TASKS_MIN,
|
|
154
|
+
MESH_MAX_PARALLEL_TASKS_MAX,
|
|
155
|
+
MESH_CONVERGE_REFINE_TAG,
|
|
156
|
+
MESH_CONVERGE_FAST_FORWARD_TAG,
|
|
157
|
+
resolveAutoConvergeCodeChange,
|
|
114
158
|
} from './repo-mesh-types.js';
|
|
115
|
-
export { DEFAULT_MESH_POLICY } from './repo-mesh-types.js';
|
|
116
159
|
|
|
117
160
|
// ── Git Surface ──
|
|
118
161
|
export * from './git/index.js';
|
|
@@ -138,7 +181,7 @@ export type RecentSessionBucket = 'needs_attention' | 'working' | 'task_complete
|
|
|
138
181
|
export type { IDaemonCore, DaemonCoreOptions } from './daemon-core.js';
|
|
139
182
|
|
|
140
183
|
// ── Config ──
|
|
141
|
-
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig } from './config/config.js';
|
|
184
|
+
export { loadConfig, saveConfig, resetConfig, isSetupComplete, markSetupComplete, updateConfig, getDaemonDataDir } from './config/config.js';
|
|
142
185
|
export { getWorkspaceState } from './config/workspaces.js';
|
|
143
186
|
export { appendRecentActivity, getRecentActivity } from './config/recent-activity.js';
|
|
144
187
|
export type { RecentActivityEntry } from './config/recent-activity.js';
|
|
@@ -152,21 +195,72 @@ export {
|
|
|
152
195
|
} from './config/mesh-config.js';
|
|
153
196
|
export type { CreateMeshOptions, UpdateMeshOptions, AddNodeOptions } from './config/mesh-config.js';
|
|
154
197
|
|
|
198
|
+
// ── Mesh shared daemon-id / node-id helpers (re-export so external tooling —
|
|
199
|
+
// e.g. the mcp-server, which depends only on @adhdev/daemon-core — can
|
|
200
|
+
// canonicalize daemon-id and node-id forms without taking a direct
|
|
201
|
+
// @adhdev/mesh-shared dependency). ──
|
|
202
|
+
export { expandDaemonIdForms, daemonIdsEquivalent, machineCoreFromDaemonId } from '@adhdev/mesh-shared';
|
|
203
|
+
export { normalizeMeshNodeId, meshNodeIdMatches } from '@adhdev/mesh-shared';
|
|
204
|
+
|
|
155
205
|
// ── Mesh Coordinator ──
|
|
156
206
|
export { buildCoordinatorSystemPrompt } from './mesh/coordinator-prompt.js';
|
|
207
|
+
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';
|
|
208
|
+
export type { MeshMissionRecord, MeshMissionStatus, MeshMissionSummary, MeshMissionSlimSummary, MeshMissionTaskAggregate, MeshStatusMissionsCompact, MeshStatusMissionsHistoryFold } from './mesh/mesh-missions.js';
|
|
209
|
+
export { computeMeshTaskStats, computeMeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
210
|
+
export type { MeshTaskStats, MeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
211
|
+
export { deriveMeshReviewInboxItems } from './mesh/mesh-review-inbox.js';
|
|
212
|
+
export type { MeshReviewInboxItem, MeshReviewInboxDerivation, MeshReviewInboxEvidence, MeshReviewInboxDiffSummary, MeshReviewInboxDiffFile, MeshReviewInboxReason, MeshReviewInboxConvergence } from './mesh/mesh-review-inbox.js';
|
|
157
213
|
export type { CoordinatorPromptContext } from './mesh/coordinator-prompt.js';
|
|
158
|
-
export {
|
|
159
|
-
export type {
|
|
214
|
+
export { loadMeshCoordinatorRegistry, registerMeshCoordinator, unregisterMeshCoordinator, getCoordinatorForSession, listCoordinatorsForWorkspace } from './mesh/coordinator-registry.js';
|
|
215
|
+
export type { CoordinatorRegistryEntry } from './mesh/coordinator-registry.js';
|
|
216
|
+
export {
|
|
217
|
+
MESH_REFINE_CONFIG_LOCATIONS,
|
|
218
|
+
MESH_REFINE_CONFIG_SCHEMA,
|
|
219
|
+
loadMeshRefineConfig,
|
|
220
|
+
resolveMeshRefineValidationPlan,
|
|
221
|
+
suggestMeshRefineConfig,
|
|
222
|
+
validateMeshRefineConfig,
|
|
223
|
+
} from './mesh/refine-config.js';
|
|
224
|
+
export {
|
|
225
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS,
|
|
226
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA,
|
|
227
|
+
loadMeshWorktreeBootstrapConfig,
|
|
228
|
+
runMeshWorktreeBootstrap,
|
|
229
|
+
validateMeshWorktreeBootstrapConfig,
|
|
230
|
+
type RepoMeshWorktreeBootstrapConfig,
|
|
231
|
+
type WorktreeBootstrapState,
|
|
232
|
+
} from './mesh/worktree-bootstrap-config.js';
|
|
233
|
+
export type {
|
|
234
|
+
MeshRefineValidationCategory,
|
|
235
|
+
MeshRefineValidationCommandPlan,
|
|
236
|
+
MeshRefineValidationPlan,
|
|
237
|
+
RepoMeshRefineConfig,
|
|
238
|
+
RepoMeshRefineValidationCommandConfig,
|
|
239
|
+
} from './mesh/refine-config.js';
|
|
160
240
|
|
|
161
241
|
// ── 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';
|
|
242
|
+
export { appendLedgerEntry, appendRemoteLedgerEntries, buildTaskCompletionEvidence, normalizeMeshWorkerResult, readLedgerEntries, readLedgerSlice, readLedgerSliceFromStore, getLedgerSummary, getLedgerDir, getSessionRecoveryContext, MAX_LEDGER_SLICE_LIMIT } from './mesh/mesh-ledger.js';
|
|
243
|
+
export type { AppendRemoteLedgerResult, MeshLedgerEntry, MeshLedgerKind, MeshLedgerSlice, MeshLedgerSummary, ReadLedgerOptions, ReadLedgerSliceOptions, SessionRecoveryContext, MeshTaskCompletionEvidence, MeshWorkerResultArtifact, MeshProcessArtifact, MeshValidationResultArtifact } from './mesh/mesh-ledger.js';
|
|
244
|
+
export { fastForwardMeshNode } from './mesh/mesh-fast-forward.js';
|
|
245
|
+
export type { MeshFastForwardNodeArgs, MeshFastForwardPlannedStep, MeshFastForwardResult } from './mesh/mesh-fast-forward.js';
|
|
164
246
|
export { buildMeshLedgerReconciliationEvidence, buildMeshLedgerReplicaEvidence } from './mesh/mesh-ledger-reconciliation.js';
|
|
165
|
-
export type { MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
247
|
+
export type { AnyLedgerSlice, MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
166
248
|
|
|
167
249
|
// ── 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';
|
|
250
|
+
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';
|
|
251
|
+
export type { MeshWorkQueueEntry, MeshTaskStatus, MeshTaskMode, MeshWorkQueueStats, MeshQueueMutationOptions, MeshTaskModeValidationResult, DirectDispatchRecord, MeshToolCallRateResult } from './mesh/mesh-work-queue.js';
|
|
252
|
+
export { buildCompactStaleDirectWorkSummary, buildMeshActiveWork, buildMeshActiveWorkSummary, classifyStaleDirectForPrune, pruneStaleDirectDispatches, PRUNABLE_ORPHAN_STALE_REASONS } from './mesh/mesh-active-work.js';
|
|
253
|
+
export type { StaleDirectPruneClassification, StaleDirectPruneResult, PruneStaleDirectDispatchesOptions } from './mesh/mesh-active-work.js';
|
|
254
|
+
export type { MeshActiveWorkRecord, MeshActiveWorkStatus, MeshActiveWorkSummary, MeshActiveWorkSource, MeshStaleDirectWorkSummary } from './mesh/mesh-active-work.js';
|
|
255
|
+
export { buildMeshAsyncRefineJobs, summarizeMeshAsyncRefineJobs, STALE_TERMINAL_REFINE_WINDOW_MS, RECENT_TERMINAL_REFINE_CAP } from './mesh/mesh-refine-status.js';
|
|
256
|
+
export type { MeshAsyncRefineJobStatus, MeshAsyncRefineJobSummary, MeshAsyncRefineJobsSummary } from './mesh/mesh-refine-status.js';
|
|
257
|
+
|
|
258
|
+
// ── Mesh Scheduling Runtime (observability projection) ──
|
|
259
|
+
export { buildMeshSchedulingRuntime } from './mesh/mesh-scheduling-runtime.js';
|
|
260
|
+
export type { MeshSchedulingRuntime, MeshNodeSchedulingRuntime, MeshNodeProviderSchedulingRuntime } from './mesh/mesh-scheduling-runtime.js';
|
|
261
|
+
|
|
262
|
+
// ── Mesh Host Ownership ──
|
|
263
|
+
export { buildMeshHostRequiredFailure, createDefaultMeshHostMetadata, isMeshHostOwner, normalizeMeshDaemonRole, requireMeshHostQueueOwner, resolveMeshHostStatus } from './mesh/mesh-host-ownership.js';
|
|
170
264
|
|
|
171
265
|
// ── Mesh Visualization ──
|
|
172
266
|
// buildMeshGraph and MeshGraph types moved to @adhdev/web-core to avoid
|
|
@@ -176,8 +270,17 @@ export type { MeshWorkQueueEntry, MeshTaskStatus, MeshWorkQueueStats } from './m
|
|
|
176
270
|
// export type { MeshGraph, MeshGraphNode, MeshGraphEdge, MeshGraphNodeType, MeshGraphEdgeType } from './mesh/mesh-visualization.js';
|
|
177
271
|
|
|
178
272
|
// ── Mesh Events ──
|
|
179
|
-
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
273
|
+
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent, reconcileDirectDispatchCompletionFromTranscript } from './mesh/mesh-events.js';
|
|
180
274
|
export type { PendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
275
|
+
// The coordinator-side preview surfaced from a worker's completion/status event
|
|
276
|
+
// (finalSummary / workerResult.summary / lastMessagePreview). Same data the mobile
|
|
277
|
+
// inbox is fed; reused by mesh_read_chat's cache fallback when the live P2P read path
|
|
278
|
+
// is unavailable (saturated/unreachable peer).
|
|
279
|
+
export { resolveMeshSurfacedSessionPreview, readMeshCompletionSummary } from './mesh/mesh-events-utils.js';
|
|
280
|
+
|
|
281
|
+
// ── Mesh Delivery Policy ──
|
|
282
|
+
export { resolveDeliveryDecision, createSessionDelivery, updateSessionDeliveryStatus, getActiveSessionDeliveries, markSessionDeliveriesTerminal, recordCompletionConflict, getRecentCompletionConflicts } from './mesh/mesh-delivery-policy.js';
|
|
283
|
+
export type { MeshSessionDeliveryStatus, MeshSessionDeliveryKind, MeshDeliveryDecision, MeshDeliveryPolicyResult, SessionDeliveryRecord } from './mesh/mesh-delivery-policy.js';
|
|
181
284
|
|
|
182
285
|
// ── Mesh P2P Relay Failure Classification ──
|
|
183
286
|
export {
|
|
@@ -222,7 +325,7 @@ export type { CdpInitializerConfig } from './cdp/initializer.js';
|
|
|
222
325
|
// ── Commands ──
|
|
223
326
|
export { DaemonCommandHandler } from './commands/handler.js';
|
|
224
327
|
export type { CommandResult, CommandContext } from './commands/handler.js';
|
|
225
|
-
export { DaemonCommandRouter } from './commands/router.js';
|
|
328
|
+
export { DaemonCommandRouter, readCachedInlineMeshActiveSessionDetails, resolveMeshNodeAttribution, buildMeshNodeDataFreshness, buildMeshNodeProbeFreshness, MESH_NODE_LIVE_TRUTH_MARKER } from './commands/router.js';
|
|
226
329
|
export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
|
|
227
330
|
export {
|
|
228
331
|
maybeRunDaemonUpgradeHelperFromEnv,
|
|
@@ -242,7 +345,9 @@ export type {
|
|
|
242
345
|
// ── Status ──
|
|
243
346
|
export { DaemonStatusReporter } from './status/reporter.js';
|
|
244
347
|
export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
|
|
245
|
-
export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
|
|
348
|
+
export { buildStatusSnapshot, buildMachineInfo, getLastDisplayMessage } from './status/snapshot.js';
|
|
349
|
+
export { getDaemonBuildInfo } from './build-info.js';
|
|
350
|
+
export type { DaemonBuildInfo } from './build-info.js';
|
|
246
351
|
export { normalizeManagedStatus, isManagedStatusWorking, isManagedStatusWaiting, normalizeActiveChatData } from './status/normalize.js';
|
|
247
352
|
export type { ManagedStatus } from './status/normalize.js';
|
|
248
353
|
export type { StatusSnapshotOptions, StatusSnapshot } from './status/snapshot.js';
|
|
@@ -388,6 +493,13 @@ export type { CliAdapter } from './cli-adapter-types.js';
|
|
|
388
493
|
export { NodePtyTransportFactory } from './cli-adapters/pty-transport.js';
|
|
389
494
|
export type { PtyRuntimeTransport, PtyTransportFactory, PtySpawnOptions } from './cli-adapters/pty-transport.js';
|
|
390
495
|
export { SessionHostPtyTransportFactory } from './cli-adapters/session-host-transport.js';
|
|
496
|
+
export {
|
|
497
|
+
RawTerminalAttachment,
|
|
498
|
+
namedKeyToAnsi,
|
|
499
|
+
namedKeysToAnsi,
|
|
500
|
+
withRawTerminalAttachment,
|
|
501
|
+
} from './cli-adapters/raw-terminal-io.js';
|
|
502
|
+
export type { NamedKey, RawTerminalAttachmentOptions, RawTerminalSessionHostClient } from './cli-adapters/raw-terminal-io.js';
|
|
391
503
|
export type { HostedCliRuntimeDescriptor, CliTransportFactoryParams } from './commands/cli-manager.js';
|
|
392
504
|
export {
|
|
393
505
|
DEFAULT_SESSION_HOST_APP_NAME,
|
|
@@ -415,3 +527,50 @@ export type { ExtensionInfo as InstallerExtensionInfo } from './installer.js';
|
|
|
415
527
|
// ── Boot / Lifecycle ──
|
|
416
528
|
export { initDaemonComponents, startDaemonDevSupport, shutdownDaemonComponents } from './boot/daemon-lifecycle.js';
|
|
417
529
|
export type { DaemonInitConfig, DaemonComponents, DaemonDevSupportOptions } from './boot/daemon-lifecycle.js';
|
|
530
|
+
|
|
531
|
+
// ── Local IPC server (shared between cloud + standalone daemons) ──
|
|
532
|
+
export {
|
|
533
|
+
startLocalIpcServer,
|
|
534
|
+
buildIpcStatusHttpResponse,
|
|
535
|
+
type LocalIpcServerOptions,
|
|
536
|
+
type LocalIpcServerHandle,
|
|
537
|
+
type IpcCommandContext,
|
|
538
|
+
type IpcCommandResult,
|
|
539
|
+
type IpcStatusPayload,
|
|
540
|
+
} from './ipc/local-ipc-server.js';
|
|
541
|
+
|
|
542
|
+
// ── CLI Spec (adhdev:cli/spec@4) ──
|
|
543
|
+
export { createNativeHistoryDispatcher } from './providers/native-history/index.js';
|
|
544
|
+
export type { ReaderId } from './providers/native-history/index.js';
|
|
545
|
+
export {
|
|
546
|
+
readClaudeCliSession, readCodexCliSession,
|
|
547
|
+
readAntigravityCliSession, readHermesCliSession,
|
|
548
|
+
} from './providers/native-history/index.js';
|
|
549
|
+
export type {
|
|
550
|
+
ControlAction, Control,
|
|
551
|
+
NotificationRule, DelegateTrigger,
|
|
552
|
+
} from './providers/spec/types.js';
|
|
553
|
+
export type { TraceEntry } from './providers/spec/evaluator.js';
|
|
554
|
+
export { evaluateFsm } from './providers/spec/fsm-evaluator.js';
|
|
555
|
+
export type { FsmClock } from './providers/spec/fsm-evaluator.js';
|
|
556
|
+
export { validateFsmSpec } from './providers/spec/fsm-loader.js';
|
|
557
|
+
export { FsmDriver } from './providers/spec/fsm-driver.js';
|
|
558
|
+
export type { DashboardEvent, DashboardCommand, SpecDriverOpts, ISpecDriver } from './providers/spec/fsm-driver.js';
|
|
559
|
+
export { TerminalAdapter } from './providers/spec/adapter.js';
|
|
560
|
+
export type { TerminalAdapterOpts, TerminalAdapterHandlers } from './providers/spec/adapter.js';
|
|
561
|
+
|
|
562
|
+
// ── Provider SDK (v1) — selective re-exports for external tooling ──
|
|
563
|
+
// Tooling (registry publish, dashboard validators, the e2e harness) needs
|
|
564
|
+
// the manifest validator, the builder catalog, and the contract version.
|
|
565
|
+
// We don't re-export *everything* from the SDK to keep the public surface
|
|
566
|
+
// stable; consumers that need internal SDK types still import from the
|
|
567
|
+
// sdk/v1 subpath.
|
|
568
|
+
export {
|
|
569
|
+
validateCliProviderManifest,
|
|
570
|
+
formatManifestValidationIssues,
|
|
571
|
+
type ManifestValidationIssue,
|
|
572
|
+
type ManifestValidationResult,
|
|
573
|
+
V1_CONTRACT_VERSION,
|
|
574
|
+
V1_PRIMITIVE_CATALOG,
|
|
575
|
+
V1_ALL_PRIMITIVES,
|
|
576
|
+
} 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,
|