@adhdev/daemon-core 0.9.82-rc.36 → 0.9.82-rc.360
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 +8 -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 +53 -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/cli-manager.d.ts +2 -1
- package/dist/commands/handler.d.ts +125 -0
- package/dist/commands/mesh-coordinator.d.ts +85 -1
- package/dist/commands/router.d.ts +336 -1
- 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/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 +54 -13
- package/dist/index.js +44143 -17595
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43858 -17438
- 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 +170 -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 +62 -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-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 +106 -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 +368 -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/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 +55 -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 +1215 -0
- package/src/cli-adapters/provider-cli-adapter.d.ts +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +774 -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 +100 -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 +1823 -62
- package/src/commands/cli-manager.ts +336 -19
- package/src/commands/handler.ts +841 -2
- package/src/commands/mesh-coordinator.ts +332 -122
- package/src/commands/router.ts +7624 -1312
- 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 +388 -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/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 +156 -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 +329 -0
- package/src/mesh/coordinator-prompt.ts +234 -31
- package/src/mesh/coordinator-registry.ts +121 -0
- package/src/mesh/mesh-active-work.ts +667 -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 +2572 -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 +381 -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 +1096 -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-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 +1254 -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 +670 -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 +1251 -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/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,66 @@ 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 helpers (re-export so external tooling — e.g. the
|
|
190
|
+
// mcp-server, which depends only on @adhdev/daemon-core — can canonicalize
|
|
191
|
+
// daemon-id forms without taking a direct @adhdev/mesh-shared dependency). ──
|
|
192
|
+
export { expandDaemonIdForms, daemonIdsEquivalent, machineCoreFromDaemonId } from '@adhdev/mesh-shared';
|
|
193
|
+
|
|
155
194
|
// ── Mesh Coordinator ──
|
|
156
195
|
export { buildCoordinatorSystemPrompt } from './mesh/coordinator-prompt.js';
|
|
196
|
+
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';
|
|
197
|
+
export type { MeshMissionRecord, MeshMissionStatus, MeshMissionSummary, MeshMissionSlimSummary, MeshMissionTaskAggregate, MeshStatusMissionsCompact, MeshStatusMissionsHistoryFold } from './mesh/mesh-missions.js';
|
|
198
|
+
export { computeMeshTaskStats, computeMeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
199
|
+
export type { MeshTaskStats, MeshMissionStats } from './mesh/mesh-task-stats.js';
|
|
200
|
+
export { deriveMeshReviewInboxItems } from './mesh/mesh-review-inbox.js';
|
|
201
|
+
export type { MeshReviewInboxItem, MeshReviewInboxDerivation, MeshReviewInboxEvidence, MeshReviewInboxDiffSummary, MeshReviewInboxDiffFile, MeshReviewInboxReason, MeshReviewInboxConvergence } from './mesh/mesh-review-inbox.js';
|
|
157
202
|
export type { CoordinatorPromptContext } from './mesh/coordinator-prompt.js';
|
|
158
|
-
export {
|
|
159
|
-
export type {
|
|
203
|
+
export { loadMeshCoordinatorRegistry, registerMeshCoordinator, unregisterMeshCoordinator, getCoordinatorForSession, listCoordinatorsForWorkspace } from './mesh/coordinator-registry.js';
|
|
204
|
+
export type { CoordinatorRegistryEntry } from './mesh/coordinator-registry.js';
|
|
205
|
+
export {
|
|
206
|
+
MESH_REFINE_CONFIG_LOCATIONS,
|
|
207
|
+
MESH_REFINE_CONFIG_SCHEMA,
|
|
208
|
+
loadMeshRefineConfig,
|
|
209
|
+
resolveMeshRefineValidationPlan,
|
|
210
|
+
suggestMeshRefineConfig,
|
|
211
|
+
validateMeshRefineConfig,
|
|
212
|
+
} from './mesh/refine-config.js';
|
|
213
|
+
export {
|
|
214
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_LOCATIONS,
|
|
215
|
+
MESH_WORKTREE_BOOTSTRAP_CONFIG_SCHEMA,
|
|
216
|
+
loadMeshWorktreeBootstrapConfig,
|
|
217
|
+
runMeshWorktreeBootstrap,
|
|
218
|
+
validateMeshWorktreeBootstrapConfig,
|
|
219
|
+
type RepoMeshWorktreeBootstrapConfig,
|
|
220
|
+
type WorktreeBootstrapState,
|
|
221
|
+
} from './mesh/worktree-bootstrap-config.js';
|
|
222
|
+
export type {
|
|
223
|
+
MeshRefineValidationCategory,
|
|
224
|
+
MeshRefineValidationCommandPlan,
|
|
225
|
+
MeshRefineValidationPlan,
|
|
226
|
+
RepoMeshRefineConfig,
|
|
227
|
+
RepoMeshRefineValidationCommandConfig,
|
|
228
|
+
} from './mesh/refine-config.js';
|
|
160
229
|
|
|
161
230
|
// ── 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';
|
|
231
|
+
export { appendLedgerEntry, appendRemoteLedgerEntries, buildTaskCompletionEvidence, normalizeMeshWorkerResult, readLedgerEntries, readLedgerSlice, readLedgerSliceFromStore, getLedgerSummary, getLedgerDir, getSessionRecoveryContext, MAX_LEDGER_SLICE_LIMIT } from './mesh/mesh-ledger.js';
|
|
232
|
+
export type { AppendRemoteLedgerResult, MeshLedgerEntry, MeshLedgerKind, MeshLedgerSlice, MeshLedgerSummary, ReadLedgerOptions, ReadLedgerSliceOptions, SessionRecoveryContext, MeshTaskCompletionEvidence, MeshWorkerResultArtifact, MeshProcessArtifact, MeshValidationResultArtifact } from './mesh/mesh-ledger.js';
|
|
233
|
+
export { fastForwardMeshNode } from './mesh/mesh-fast-forward.js';
|
|
234
|
+
export type { MeshFastForwardNodeArgs, MeshFastForwardPlannedStep, MeshFastForwardResult } from './mesh/mesh-fast-forward.js';
|
|
164
235
|
export { buildMeshLedgerReconciliationEvidence, buildMeshLedgerReplicaEvidence } from './mesh/mesh-ledger-reconciliation.js';
|
|
165
|
-
export type { MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
236
|
+
export type { AnyLedgerSlice, MeshLedgerReconciliationEvidence, MeshLedgerReplicaEvidence, MeshLedgerReplicaStatus } from './mesh/mesh-ledger-reconciliation.js';
|
|
166
237
|
|
|
167
238
|
// ── 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';
|
|
239
|
+
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';
|
|
240
|
+
export type { MeshWorkQueueEntry, MeshTaskStatus, MeshTaskMode, MeshWorkQueueStats, MeshQueueMutationOptions, MeshTaskModeValidationResult, DirectDispatchRecord, MeshToolCallRateResult } from './mesh/mesh-work-queue.js';
|
|
241
|
+
export { buildCompactStaleDirectWorkSummary, buildMeshActiveWork, buildMeshActiveWorkSummary, classifyStaleDirectForPrune, pruneStaleDirectDispatches, PRUNABLE_ORPHAN_STALE_REASONS } from './mesh/mesh-active-work.js';
|
|
242
|
+
export type { StaleDirectPruneClassification, StaleDirectPruneResult, PruneStaleDirectDispatchesOptions } from './mesh/mesh-active-work.js';
|
|
243
|
+
export type { MeshActiveWorkRecord, MeshActiveWorkStatus, MeshActiveWorkSummary, MeshActiveWorkSource, MeshStaleDirectWorkSummary } from './mesh/mesh-active-work.js';
|
|
244
|
+
export { buildMeshAsyncRefineJobs, summarizeMeshAsyncRefineJobs, STALE_TERMINAL_REFINE_WINDOW_MS, RECENT_TERMINAL_REFINE_CAP } from './mesh/mesh-refine-status.js';
|
|
245
|
+
export type { MeshAsyncRefineJobStatus, MeshAsyncRefineJobSummary, MeshAsyncRefineJobsSummary } from './mesh/mesh-refine-status.js';
|
|
246
|
+
|
|
247
|
+
// ── Mesh Host Ownership ──
|
|
248
|
+
export { buildMeshHostRequiredFailure, createDefaultMeshHostMetadata, isMeshHostOwner, normalizeMeshDaemonRole, requireMeshHostQueueOwner, resolveMeshHostStatus } from './mesh/mesh-host-ownership.js';
|
|
170
249
|
|
|
171
250
|
// ── Mesh Visualization ──
|
|
172
251
|
// buildMeshGraph and MeshGraph types moved to @adhdev/web-core to avoid
|
|
@@ -176,8 +255,17 @@ export type { MeshWorkQueueEntry, MeshTaskStatus, MeshWorkQueueStats } from './m
|
|
|
176
255
|
// export type { MeshGraph, MeshGraphNode, MeshGraphEdge, MeshGraphNodeType, MeshGraphEdgeType } from './mesh/mesh-visualization.js';
|
|
177
256
|
|
|
178
257
|
// ── Mesh Events ──
|
|
179
|
-
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
258
|
+
export { triggerMeshQueue, drainPendingMeshCoordinatorEvents, getPendingMeshCoordinatorEvents, clearPendingMeshCoordinatorEvents, queuePendingMeshCoordinatorEvent, reconcileDirectDispatchCompletionFromTranscript } from './mesh/mesh-events.js';
|
|
180
259
|
export type { PendingMeshCoordinatorEvent } from './mesh/mesh-events.js';
|
|
260
|
+
// The coordinator-side preview surfaced from a worker's completion/status event
|
|
261
|
+
// (finalSummary / workerResult.summary / lastMessagePreview). Same data the mobile
|
|
262
|
+
// inbox is fed; reused by mesh_read_chat's cache fallback when the live P2P read path
|
|
263
|
+
// is unavailable (saturated/unreachable peer).
|
|
264
|
+
export { resolveMeshSurfacedSessionPreview, readMeshCompletionSummary } from './mesh/mesh-events-utils.js';
|
|
265
|
+
|
|
266
|
+
// ── Mesh Delivery Policy ──
|
|
267
|
+
export { resolveDeliveryDecision, createSessionDelivery, updateSessionDeliveryStatus, getActiveSessionDeliveries, markSessionDeliveriesTerminal, recordCompletionConflict, getRecentCompletionConflicts } from './mesh/mesh-delivery-policy.js';
|
|
268
|
+
export type { MeshSessionDeliveryStatus, MeshSessionDeliveryKind, MeshDeliveryDecision, MeshDeliveryPolicyResult, SessionDeliveryRecord } from './mesh/mesh-delivery-policy.js';
|
|
181
269
|
|
|
182
270
|
// ── Mesh P2P Relay Failure Classification ──
|
|
183
271
|
export {
|
|
@@ -222,7 +310,7 @@ export type { CdpInitializerConfig } from './cdp/initializer.js';
|
|
|
222
310
|
// ── Commands ──
|
|
223
311
|
export { DaemonCommandHandler } from './commands/handler.js';
|
|
224
312
|
export type { CommandResult, CommandContext } from './commands/handler.js';
|
|
225
|
-
export { DaemonCommandRouter } from './commands/router.js';
|
|
313
|
+
export { DaemonCommandRouter, readCachedInlineMeshActiveSessionDetails, resolveMeshNodeAttribution } from './commands/router.js';
|
|
226
314
|
export type { CommandRouterDeps, CommandRouterResult } from './commands/router.js';
|
|
227
315
|
export {
|
|
228
316
|
maybeRunDaemonUpgradeHelperFromEnv,
|
|
@@ -242,7 +330,9 @@ export type {
|
|
|
242
330
|
// ── Status ──
|
|
243
331
|
export { DaemonStatusReporter } from './status/reporter.js';
|
|
244
332
|
export { buildSessionEntries, findCdpManager, hasCdpManager, isCdpConnected } from './status/builders.js';
|
|
245
|
-
export { buildStatusSnapshot, buildMachineInfo } from './status/snapshot.js';
|
|
333
|
+
export { buildStatusSnapshot, buildMachineInfo, getLastDisplayMessage } from './status/snapshot.js';
|
|
334
|
+
export { getDaemonBuildInfo } from './build-info.js';
|
|
335
|
+
export type { DaemonBuildInfo } from './build-info.js';
|
|
246
336
|
export { normalizeManagedStatus, isManagedStatusWorking, isManagedStatusWaiting, normalizeActiveChatData } from './status/normalize.js';
|
|
247
337
|
export type { ManagedStatus } from './status/normalize.js';
|
|
248
338
|
export type { StatusSnapshotOptions, StatusSnapshot } from './status/snapshot.js';
|
|
@@ -388,6 +478,13 @@ export type { CliAdapter } from './cli-adapter-types.js';
|
|
|
388
478
|
export { NodePtyTransportFactory } from './cli-adapters/pty-transport.js';
|
|
389
479
|
export type { PtyRuntimeTransport, PtyTransportFactory, PtySpawnOptions } from './cli-adapters/pty-transport.js';
|
|
390
480
|
export { SessionHostPtyTransportFactory } from './cli-adapters/session-host-transport.js';
|
|
481
|
+
export {
|
|
482
|
+
RawTerminalAttachment,
|
|
483
|
+
namedKeyToAnsi,
|
|
484
|
+
namedKeysToAnsi,
|
|
485
|
+
withRawTerminalAttachment,
|
|
486
|
+
} from './cli-adapters/raw-terminal-io.js';
|
|
487
|
+
export type { NamedKey, RawTerminalAttachmentOptions, RawTerminalSessionHostClient } from './cli-adapters/raw-terminal-io.js';
|
|
391
488
|
export type { HostedCliRuntimeDescriptor, CliTransportFactoryParams } from './commands/cli-manager.js';
|
|
392
489
|
export {
|
|
393
490
|
DEFAULT_SESSION_HOST_APP_NAME,
|
|
@@ -415,3 +512,50 @@ export type { ExtensionInfo as InstallerExtensionInfo } from './installer.js';
|
|
|
415
512
|
// ── Boot / Lifecycle ──
|
|
416
513
|
export { initDaemonComponents, startDaemonDevSupport, shutdownDaemonComponents } from './boot/daemon-lifecycle.js';
|
|
417
514
|
export type { DaemonInitConfig, DaemonComponents, DaemonDevSupportOptions } from './boot/daemon-lifecycle.js';
|
|
515
|
+
|
|
516
|
+
// ── Local IPC server (shared between cloud + standalone daemons) ──
|
|
517
|
+
export {
|
|
518
|
+
startLocalIpcServer,
|
|
519
|
+
buildIpcStatusHttpResponse,
|
|
520
|
+
type LocalIpcServerOptions,
|
|
521
|
+
type LocalIpcServerHandle,
|
|
522
|
+
type IpcCommandContext,
|
|
523
|
+
type IpcCommandResult,
|
|
524
|
+
type IpcStatusPayload,
|
|
525
|
+
} from './ipc/local-ipc-server.js';
|
|
526
|
+
|
|
527
|
+
// ── CLI Spec (adhdev:cli/spec@4) ──
|
|
528
|
+
export { createNativeHistoryDispatcher } from './providers/native-history/index.js';
|
|
529
|
+
export type { ReaderId } from './providers/native-history/index.js';
|
|
530
|
+
export {
|
|
531
|
+
readClaudeCliSession, readCodexCliSession,
|
|
532
|
+
readAntigravityCliSession, readHermesCliSession,
|
|
533
|
+
} from './providers/native-history/index.js';
|
|
534
|
+
export type {
|
|
535
|
+
ControlAction, Control,
|
|
536
|
+
NotificationRule, DelegateTrigger,
|
|
537
|
+
} from './providers/spec/types.js';
|
|
538
|
+
export type { TraceEntry } from './providers/spec/evaluator.js';
|
|
539
|
+
export { evaluateFsm } from './providers/spec/fsm-evaluator.js';
|
|
540
|
+
export type { FsmClock } from './providers/spec/fsm-evaluator.js';
|
|
541
|
+
export { validateFsmSpec } from './providers/spec/fsm-loader.js';
|
|
542
|
+
export { FsmDriver } from './providers/spec/fsm-driver.js';
|
|
543
|
+
export type { DashboardEvent, DashboardCommand, SpecDriverOpts, ISpecDriver } from './providers/spec/fsm-driver.js';
|
|
544
|
+
export { TerminalAdapter } from './providers/spec/adapter.js';
|
|
545
|
+
export type { TerminalAdapterOpts, TerminalAdapterHandlers } from './providers/spec/adapter.js';
|
|
546
|
+
|
|
547
|
+
// ── Provider SDK (v1) — selective re-exports for external tooling ──
|
|
548
|
+
// Tooling (registry publish, dashboard validators, the e2e harness) needs
|
|
549
|
+
// the manifest validator, the builder catalog, and the contract version.
|
|
550
|
+
// We don't re-export *everything* from the SDK to keep the public surface
|
|
551
|
+
// stable; consumers that need internal SDK types still import from the
|
|
552
|
+
// sdk/v1 subpath.
|
|
553
|
+
export {
|
|
554
|
+
validateCliProviderManifest,
|
|
555
|
+
formatManifestValidationIssues,
|
|
556
|
+
type ManifestValidationIssue,
|
|
557
|
+
type ManifestValidationResult,
|
|
558
|
+
V1_CONTRACT_VERSION,
|
|
559
|
+
V1_PRIMITIVE_CATALOG,
|
|
560
|
+
V1_ALL_PRIMITIVES,
|
|
561
|
+
} 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,
|