@adhdev/daemon-core 0.9.82-rc.46 → 0.9.82-rc.460
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 +68 -2
- package/dist/cli-adapters/cli-script-runner.d.ts +117 -0
- package/dist/cli-adapters/cli-state-engine.d.ts +200 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +126 -64
- package/dist/cli-adapters/provider-cli-parse.d.ts +5 -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 +69 -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 +25 -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 +64 -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 +48 -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 +152 -0
- package/dist/commands/mesh-coordinator.d.ts +85 -1
- package/dist/commands/router-refine.d.ts +137 -0
- package/dist/commands/router-worktree-cleanup.d.ts +133 -0
- package/dist/commands/router.d.ts +241 -12
- package/dist/commands/upgrade-helper.d.ts +41 -1
- package/dist/config/chat-history.d.ts +9 -0
- package/dist/config/config.d.ts +19 -0
- package/dist/config/mesh-config.d.ts +129 -1
- package/dist/config/mesh-json-config.d.ts +199 -0
- package/dist/config/registry-resolver.d.ts +54 -0
- package/dist/config/repo-settings.d.ts +77 -0
- 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 +12 -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 +57 -0
- package/dist/git/git-types.d.ts +2 -50
- package/dist/git/git-worktree.d.ts +71 -1
- package/dist/git/index.d.ts +3 -1
- package/dist/index.d.ts +67 -15
- package/dist/index.js +57943 -25340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57611 -25174
- 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/debug-config.d.ts +16 -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 +230 -0
- package/dist/mesh/coordinator-prompt.d.ts +76 -0
- package/dist/mesh/coordinator-registry.d.ts +59 -0
- package/dist/mesh/mesh-active-work.d.ts +174 -0
- package/dist/mesh/mesh-clone-grace.d.ts +8 -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 +7 -0
- package/dist/mesh/mesh-event-forwarding.d.ts +41 -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 +113 -0
- package/dist/mesh/mesh-events-stale.d.ts +61 -0
- package/dist/mesh/mesh-events-utils.d.ts +75 -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 +29 -0
- package/dist/mesh/mesh-init.d.ts +128 -0
- package/dist/mesh/mesh-ledger-reconciliation.d.ts +23 -4
- package/dist/mesh/mesh-ledger.d.ts +133 -1
- package/dist/mesh/mesh-magi-status.d.ts +63 -0
- package/dist/mesh/mesh-missions.d.ts +189 -0
- package/dist/mesh/mesh-node-identity.d.ts +306 -0
- package/dist/mesh/mesh-queue-assignment.d.ts +158 -0
- package/dist/mesh/mesh-reconcile-loop.d.ts +80 -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 +476 -0
- package/dist/mesh/mesh-scheduling-runtime.d.ts +78 -0
- package/dist/mesh/mesh-task-inflight.d.ts +46 -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 +318 -5
- package/dist/mesh/preview-freshness.d.ts +28 -0
- package/dist/mesh/refine-config.d.ts +216 -0
- package/dist/mesh/worktree-bootstrap-config.d.ts +219 -0
- package/dist/providers/acp-provider-instance.d.ts +5 -0
- package/dist/providers/approval-utils.d.ts +45 -0
- package/dist/providers/chat-message-normalization.d.ts +58 -1
- package/dist/providers/cli-provider-instance.d.ts +290 -3
- package/dist/providers/contracts.d.ts +149 -6
- package/dist/providers/external-sources.d.ts +71 -0
- package/dist/providers/manual-attendance.d.ts +79 -0
- package/dist/providers/native-history/antigravity-claim-registry.d.ts +28 -0
- package/dist/providers/native-history/antigravity-cli-transcript.d.ts +137 -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 +31 -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 +29 -0
- package/dist/providers/provider-instance.d.ts +30 -1
- package/dist/providers/provider-loader.d.ts +42 -5
- 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 +98 -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 +449 -0
- package/dist/providers/spec/fsm-evaluator.d.ts +93 -0
- package/dist/providers/spec/fsm-loader.d.ts +14 -0
- package/dist/providers/spec/fsm-types.d.ts +202 -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 +519 -13
- package/dist/runtime-defaults.d.ts +2 -0
- package/dist/session-host/managed-host.d.ts +64 -0
- package/dist/session-host/runtime-surface.d.ts +10 -16
- package/dist/sessions/registry.d.ts +6 -0
- package/dist/shared-types-extra.d.ts +2 -4
- package/dist/shared-types.d.ts +86 -55
- 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 +11 -4
- package/src/agent-stream/poller.ts +2 -3
- package/src/agent-stream/provider-adapter.ts +1 -1
- package/src/boot/daemon-lifecycle.ts +65 -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 +3 -1
- 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 +1246 -0
- package/src/cli-adapters/provider-cli-adapter.d.ts +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +914 -1144
- package/src/cli-adapters/provider-cli-parse.d.ts +2 -0
- package/src/cli-adapters/provider-cli-parse.ts +19 -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 +204 -0
- package/src/cli-adapters/session-host-transport.ts +2 -1
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +63 -29
- package/src/cli-adapters/terminal-backends/types.ts +10 -3
- package/src/cli-adapters/terminal-screen.ts +16 -81
- package/src/commands/chat-commands-debug-bundle.ts +398 -0
- package/src/commands/chat-commands-read.ts +2488 -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 +891 -0
- package/src/commands/chat-commands.ts +19 -1841
- package/src/commands/cli-manager.ts +596 -27
- package/src/commands/handler.ts +845 -2
- package/src/commands/high-family/index.ts +28 -0
- package/src/commands/high-family/mesh-coordinator-launch.ts +680 -0
- package/src/commands/high-family/mesh-events.ts +89 -0
- package/src/commands/high-family/mesh-status.ts +822 -0
- package/src/commands/high-family/types.ts +80 -0
- package/src/commands/low-family/coordinator-prompt.ts +72 -0
- package/src/commands/low-family/daemon-lifecycle.ts +120 -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 +241 -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 +1287 -0
- package/src/commands/med-family/mesh-host-pairing.ts +234 -0
- package/src/commands/med-family/mesh-queue.ts +167 -0
- package/src/commands/med-family/mesh-restart.ts +92 -0
- package/src/commands/med-family/types.ts +153 -0
- package/src/commands/mesh-coordinator.ts +334 -124
- package/src/commands/router-refine.ts +1711 -0
- package/src/commands/router-worktree-cleanup.ts +870 -0
- package/src/commands/router.ts +1025 -4070
- package/src/commands/stream-commands.ts +8 -0
- package/src/commands/upgrade-helper.ts +310 -45
- package/src/config/chat-history.ts +493 -24
- package/src/config/config.ts +30 -0
- package/src/config/mesh-config.ts +619 -23
- package/src/config/mesh-json-config.ts +376 -0
- package/src/config/recent-activity.ts +8 -2
- package/src/config/registry-resolver.ts +100 -0
- package/src/config/repo-settings.ts +111 -0
- 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 +78 -15
- package/src/git/git-diff.ts +81 -11
- package/src/git/git-executor.ts +12 -0
- package/src/git/git-status.ts +767 -48
- package/src/git/git-types.ts +14 -62
- package/src/git/git-worktree.ts +261 -4
- package/src/git/index.ts +17 -0
- package/src/index.ts +200 -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/debug-config.ts +25 -0
- package/src/logging/debug-trace.ts +7 -2
- 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 +469 -0
- package/src/mesh/coordinator-prompt.ts +536 -34
- package/src/mesh/coordinator-registry.ts +121 -0
- package/src/mesh/mesh-active-work.ts +656 -0
- package/src/mesh/mesh-clone-grace.ts +68 -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 +73 -0
- package/src/mesh/mesh-event-forwarding.ts +1932 -0
- package/src/mesh/mesh-event-trace.ts +67 -0
- package/src/mesh/mesh-events-coordinator.ts +32 -0
- package/src/mesh/mesh-events-pending.ts +766 -0
- package/src/mesh/mesh-events-stale.ts +440 -0
- package/src/mesh/mesh-events-utils.ts +443 -0
- package/src/mesh/mesh-events.ts +33 -1035
- package/src/mesh/mesh-fast-forward.ts +856 -0
- package/src/mesh/mesh-host-ownership.ts +111 -0
- package/src/mesh/mesh-init.ts +350 -0
- package/src/mesh/mesh-ledger-reconciliation.ts +12 -7
- package/src/mesh/mesh-ledger.ts +873 -102
- package/src/mesh/mesh-magi-status.ts +223 -0
- package/src/mesh/mesh-missions.ts +449 -0
- package/src/mesh/mesh-node-identity.ts +1994 -0
- package/src/mesh/mesh-queue-assignment.ts +2233 -0
- package/src/mesh/mesh-reconcile-loop.ts +2390 -0
- package/src/mesh/mesh-refine-batch.ts +205 -0
- package/src/mesh/mesh-refine-gates.ts +1686 -0
- package/src/mesh/mesh-refine-status.ts +231 -0
- package/src/mesh/mesh-review-inbox.ts +308 -0
- package/src/mesh/mesh-routing.ts +291 -0
- package/src/mesh/mesh-runtime-store.ts +2026 -0
- package/src/mesh/mesh-scheduling-runtime.ts +198 -0
- package/src/mesh/mesh-task-inflight.ts +70 -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 +1281 -141
- package/src/mesh/preview-freshness.ts +163 -0
- package/src/mesh/refine-config.ts +423 -0
- package/src/mesh/worktree-bootstrap-config.ts +599 -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 +99 -5
- package/src/providers/chat-message-normalization.ts +126 -4
- package/src/providers/cli-provider-instance.ts +2456 -107
- package/src/providers/contracts.d.ts +55 -0
- package/src/providers/contracts.ts +160 -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 +105 -0
- package/src/providers/native-history/antigravity-claim-registry.ts +131 -0
- package/src/providers/native-history/antigravity-cli-transcript.ts +1193 -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 +503 -0
- package/src/providers/native-history/hermes-cli-transcript.ts +260 -0
- package/src/providers/native-history/index.ts +30 -0
- package/src/providers/provider-instance-manager.ts +71 -0
- package/src/providers/provider-instance.ts +24 -1
- package/src/providers/provider-loader.ts +700 -55
- 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 +261 -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 +509 -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 +246 -0
- package/src/providers/spec/cli-adapter.ts +1064 -0
- package/src/providers/spec/evaluator.ts +407 -0
- package/src/providers/spec/fsm-driver.ts +1528 -0
- package/src/providers/spec/fsm-evaluator.ts +290 -0
- package/src/providers/spec/fsm-loader.ts +128 -0
- package/src/providers/spec/fsm-types.ts +301 -0
- package/src/providers/spec/native-history-executor.ts +1174 -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 +758 -14
- package/src/runtime-defaults.ts +39 -0
- package/src/session-host/managed-host.ts +218 -0
- package/src/session-host/runtime-surface.ts +20 -80
- 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 +124 -55
- 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
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:acp/session-protocol@1",
|
|
4
|
+
"title": "acp/session-protocol — v1",
|
|
5
|
+
"description": "Describes how to detect ACP stdio session status from line-oriented process output. Supports json-rpc, plain-text, and mcp prompt styles. The daemon compiles the regex patterns at builder time and uses them at runtime to classify each incoming line as idle, generating, or an error verdict.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"const": "adhdev:acp/session-protocol@1"
|
|
12
|
+
},
|
|
13
|
+
"idlePattern": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "Regex pattern that matches a line emitted when the agent finishes a turn and is waiting for the next user message.",
|
|
16
|
+
"required": ["regex"],
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"regex": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "ECMAScript regex source. Daemon compiles with the flags below."
|
|
22
|
+
},
|
|
23
|
+
"flags": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[gimsuy]*$",
|
|
26
|
+
"default": "i",
|
|
27
|
+
"description": "Optional ECMAScript regex flags (default: 'i')."
|
|
28
|
+
},
|
|
29
|
+
"description": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Author-facing note explaining when this pattern fires."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"generatingPattern": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Regex pattern that matches a line emitted while the agent is actively working (streaming tokens, calling tools, etc.).",
|
|
38
|
+
"required": ["regex"],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"regex": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "ECMAScript regex source."
|
|
44
|
+
},
|
|
45
|
+
"flags": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[gimsuy]*$",
|
|
48
|
+
"default": "i"
|
|
49
|
+
},
|
|
50
|
+
"description": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"errorPatterns": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"description": "List of error-signal patterns. Each entry provides a regex and the status verdict to return on match. Checked in order; first match wins.",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["regex", "verdict"],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"properties": {
|
|
63
|
+
"regex": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "ECMAScript regex source."
|
|
66
|
+
},
|
|
67
|
+
"flags": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[gimsuy]*$",
|
|
70
|
+
"default": "i"
|
|
71
|
+
},
|
|
72
|
+
"verdict": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enum": ["idle", "generating", "waiting_approval"],
|
|
75
|
+
"description": "Status verdict to return when this error pattern fires."
|
|
76
|
+
},
|
|
77
|
+
"description": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Author-facing note explaining what condition this pattern represents."
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"promptStyle": {
|
|
85
|
+
"description": "Wire format used by the agent on stdio. Affects how lines are parsed (e.g. json-rpc messages are newline-delimited JSON objects; plain-text is freeform; mcp is the Model Context Protocol framing).",
|
|
86
|
+
"default": "plain-text",
|
|
87
|
+
"oneOf": [
|
|
88
|
+
{
|
|
89
|
+
"const": "json-rpc",
|
|
90
|
+
"title": "JSON-RPC",
|
|
91
|
+
"description": "Each line is a newline-delimited JSON-RPC 2.0 object."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"const": "plain-text",
|
|
95
|
+
"title": "Plain text",
|
|
96
|
+
"description": "Freeform text output — patterns are matched against each line directly."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"const": "mcp",
|
|
100
|
+
"title": "MCP",
|
|
101
|
+
"description": "Model Context Protocol stdio framing (Content-Length + JSON body)."
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"messageDelimiter": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"default": "\n",
|
|
108
|
+
"description": "String used to delimit messages in the stdio stream. Defaults to newline ('\\n'). For MCP framing this is effectively the Content-Length header separator, but the builder uses this field to split incoming bytes into logical lines for regex matching."
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"examples": [
|
|
112
|
+
{
|
|
113
|
+
"$schema": "adhdev:acp/session-protocol@1",
|
|
114
|
+
"promptStyle": "plain-text",
|
|
115
|
+
"idlePattern": { "regex": "^\\$\\s*$", "flags": "m", "description": "Shell prompt — agent returned to idle" },
|
|
116
|
+
"generatingPattern": { "regex": "thinking|processing|calling tool", "flags": "i" },
|
|
117
|
+
"errorPatterns": [
|
|
118
|
+
{ "regex": "error:|exception:", "flags": "i", "verdict": "idle", "description": "Unrecoverable error — treat as idle so user can retry" }
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"$schema": "adhdev:acp/session-protocol@1",
|
|
123
|
+
"promptStyle": "json-rpc",
|
|
124
|
+
"idlePattern": { "regex": "\"method\"\\s*:\\s*\"agent/ready\"" },
|
|
125
|
+
"generatingPattern": { "regex": "\"method\"\\s*:\\s*\"agent/(?:thinking|toolCall)\"" },
|
|
126
|
+
"errorPatterns": [
|
|
127
|
+
{ "regex": "\"method\"\\s*:\\s*\"agent/approvalRequired\"", "verdict": "waiting_approval" }
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:native-history/codex-rollout@1",
|
|
4
|
+
"title": "native-history/codex-rollout — v1",
|
|
5
|
+
"description": "Declares that the provider's chat history is canonically owned by Codex's rollout JSONL files at `~/.codex/sessions/YYYY/MM/DD/rollout-<ts>-<uuid>.jsonl`. The daemon's chat-history layer routes readChat through the configured `scripts.readSession` adapter, which is expected to honour the format contract documented at:\n\n - One JSONL line per record. First line is `session_meta`; subsequent lines are `response_item` payloads.\n - Workspace scoping by matching `session_meta.payload.cwd` to the live session's working directory (with symlink expansion via `fs.realpathSync.native`).\n - spawnAt grace window (default 3000ms): reject workspace-only candidates older than `spawnAt - graceMs`.\n - excludeInProgressTurn: strip trailing in-flight assistant/tool records when set.\n - Silent-skip malformed JSONL lines (mirrors codex's concurrent-write tolerance).\n\nThis primitive is currently script-delegated. A daemon-side built-in adapter may replace `_shared/native_history.js` in a later phase; the schema is forward-compatible.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "format", "watchPath", "mode"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:native-history/codex-rollout@1" },
|
|
11
|
+
"format": {
|
|
12
|
+
"const": "codex-rollout",
|
|
13
|
+
"description": "Identifies the rollout-jsonl contract version. Sync with `payload.cli_version` interpretation in adapter code."
|
|
14
|
+
},
|
|
15
|
+
"watchPath": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"default": "~/.codex/sessions",
|
|
18
|
+
"description": "Filesystem root the daemon watches for new rollout files. Defaults to the canonical Codex path; override only when the user has a custom CODEX_HOME."
|
|
19
|
+
},
|
|
20
|
+
"mode": {
|
|
21
|
+
"const": "native-source",
|
|
22
|
+
"description": "Codex JSONL is authoritative for sealed turns; PTY parsing fills the in-flight tail."
|
|
23
|
+
},
|
|
24
|
+
"contractVersion": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"default": "1.0",
|
|
27
|
+
"description": "Adapter contract version; bump in lockstep with breaking changes to Codex's rollout-record schema."
|
|
28
|
+
},
|
|
29
|
+
"spawnGraceMs": {
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"minimum": 0,
|
|
32
|
+
"maximum": 60000,
|
|
33
|
+
"default": 3000,
|
|
34
|
+
"description": "Workspace-only candidates with mtime older than `spawnAt - spawnGraceMs` are rejected as stale. Codex's default is 3000ms; only override if you observe a different race window."
|
|
35
|
+
},
|
|
36
|
+
"excludeInProgressTurn": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"default": true,
|
|
39
|
+
"description": "When true, trailing assistant/tool records produced mid-turn are stripped so paused approvals don't show as completed."
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"description": "Pointers to the JS adapter functions (until a daemon-side built-in replaces them).",
|
|
45
|
+
"properties": {
|
|
46
|
+
"readSession": { "type": "string", "default": "readCodexNativeHistory" },
|
|
47
|
+
"listSessions": { "type": "string", "default": "listCodexNativeHistory" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"examples": [
|
|
52
|
+
{
|
|
53
|
+
"$schema": "adhdev:native-history/codex-rollout@1",
|
|
54
|
+
"format": "codex-rollout",
|
|
55
|
+
"watchPath": "~/.codex/sessions",
|
|
56
|
+
"mode": "native-source",
|
|
57
|
+
"contractVersion": "1.0",
|
|
58
|
+
"spawnGraceMs": 3000,
|
|
59
|
+
"excludeInProgressTurn": true,
|
|
60
|
+
"scripts": {
|
|
61
|
+
"readSession": "readCodexNativeHistory",
|
|
62
|
+
"listSessions": "listCodexNativeHistory"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/approval-squash@1",
|
|
4
|
+
"title": "tui/approval-squash — v1",
|
|
5
|
+
"description": "Recognises approval modals whose buttons + cues have been collapsed by the terminal renderer into a single squashed lowercase-alnum string (e.g. `1yescontinue2noquit`, `doyoutrustthecontentsofthisdirectory`). Codex is the canonical example: when the terminal re-flows the modal across narrow widths, the rendered text loses whitespace/punctuation but the byte order is preserved. The builder applies the manifest's `cues` to detect the modal, then the `buttonRules` to reconstruct labels.\n\nThe normalisation function is fixed: `String(value).toLowerCase().replace(/[^a-z0-9]+/g, '')`. Authors only declare which compact substrings count as cues and how to map known compact button runs back into labels.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "cues", "buttonRules"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/approval-squash@1" },
|
|
11
|
+
"cues": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"description": "Compact substrings or regexes that, if found in the compacted text, identify this as an approval modal. Mix freely — daemon tries every cue.",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["compact"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"compact": { "type": "string", "description": "Compacted (lowercase-alnum) substring." },
|
|
21
|
+
"kind": { "enum": ["substring", "regex"], "default": "substring" },
|
|
22
|
+
"label": { "type": "string", "description": "Optional category label, e.g. 'trust-folder'." },
|
|
23
|
+
"messageWhenMatched": { "type": "string", "description": "Human-readable message the modal builder returns when this cue matches. Use this to recover the original prose from the compacted form." }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"footers": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "Optional compact substrings that must also be present in the compacted text to count as a real modal (e.g. 'pressentertocontinue'). Default: at least one cue is sufficient.",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["compact"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"compact": { "type": "string" },
|
|
36
|
+
"kind": { "enum": ["substring", "regex"], "default": "substring" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"default": []
|
|
40
|
+
},
|
|
41
|
+
"buttonRules": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"description": "Rules that map a recognised compact substring to the original labels. Tried in order; first match wins. Use this for the cases where the terminal collapsed both buttons into one rendering blob.",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["compact", "labels"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"compact": { "type": "string", "description": "Compact substring (e.g. '1yescontinue2noquit') OR regex source when kind=regex." },
|
|
51
|
+
"kind": { "enum": ["substring", "regex"], "default": "substring" },
|
|
52
|
+
"labels": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"minItems": 1,
|
|
55
|
+
"items": { "type": "string" },
|
|
56
|
+
"description": "Original human-readable labels in display order."
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"scope": {
|
|
62
|
+
"default": "tail-window",
|
|
63
|
+
"enum": ["tail-window", "whole-screen"]
|
|
64
|
+
},
|
|
65
|
+
"tailWindowLines": {
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"minimum": 1,
|
|
68
|
+
"maximum": 64,
|
|
69
|
+
"default": 24
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"examples": [
|
|
73
|
+
{
|
|
74
|
+
"$schema": "adhdev:tui/approval-squash@1",
|
|
75
|
+
"cues": [
|
|
76
|
+
{ "compact": "doyoutrustthecontentsofthisdirectory", "label": "trust-folder", "messageWhenMatched": "Do you trust the contents of this directory?" },
|
|
77
|
+
{ "compact": "workingwithuntrustedcontents", "label": "untrusted-content", "messageWhenMatched": "Working with untrusted contents" },
|
|
78
|
+
{ "compact": "switchtogpt", "kind": "regex", "label": "rate-limit" }
|
|
79
|
+
],
|
|
80
|
+
"footers": [
|
|
81
|
+
{ "compact": "pressentertocontinue" },
|
|
82
|
+
{ "compact": "esctocancel" }
|
|
83
|
+
],
|
|
84
|
+
"buttonRules": [
|
|
85
|
+
{ "compact": "1yescontinue2noquit", "labels": ["Yes, continue", "No, quit"] },
|
|
86
|
+
{ "compact": "1approveandrun2deny", "labels": ["Approve and run", "Deny"] },
|
|
87
|
+
{ "compact": "1alwaysapprove2approve3deny", "labels": ["Always approve", "Approve", "Deny"] }
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/assistant-block@1",
|
|
4
|
+
"title": "tui/assistant-block — v1",
|
|
5
|
+
"description": "Declares how to extract assistant turns from the rendered transcript. The block starts at a marker (e.g. Claude `⏺`, Codex `Codex` heading) and ends at either the next user prompt or the next block marker. Each captured block becomes one assistant chat message.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "startMarker"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/assistant-block@1" },
|
|
11
|
+
"startMarker": {
|
|
12
|
+
"description": "Where an assistant block begins. Can be a plain substring or a regex.",
|
|
13
|
+
"oneOf": [
|
|
14
|
+
{ "type": "string", "description": "Plain substring." },
|
|
15
|
+
{
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["regex"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"regex": { "type": "string" },
|
|
21
|
+
"flags": { "type": "string", "pattern": "^[gimsuy]*$", "default": "m" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"endMarker": {
|
|
27
|
+
"description": "Where the block ends. Common: next prompt marker or another startMarker. Defaults to \"next-user-prompt\".",
|
|
28
|
+
"default": "next-user-prompt",
|
|
29
|
+
"oneOf": [
|
|
30
|
+
{ "const": "next-user-prompt", "title": "Stop at the next prompt marker line" },
|
|
31
|
+
{ "const": "next-start-marker", "title": "Stop at the next startMarker" },
|
|
32
|
+
{ "type": "string", "title": "Plain substring marker" },
|
|
33
|
+
{
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": ["regex"],
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"regex": { "type": "string" },
|
|
39
|
+
"flags": { "type": "string", "pattern": "^[gimsuy]*$", "default": "m" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"skipKinds": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Which sub-blocks to skip when classifying assistant turns. Tool calls and thinking blocks are usually classified separately via tui/tool-block and tui/thinking-block.",
|
|
47
|
+
"items": { "enum": ["tool", "thinking", "system"] },
|
|
48
|
+
"default": ["tool"]
|
|
49
|
+
},
|
|
50
|
+
"headerLines": {
|
|
51
|
+
"type": "integer",
|
|
52
|
+
"minimum": 0,
|
|
53
|
+
"default": 0,
|
|
54
|
+
"description": "Number of header lines after the startMarker to skip when extracting content (e.g. Codex's `Codex\\n<timestamp>` header)."
|
|
55
|
+
},
|
|
56
|
+
"trimEmptyLeading": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"default": true,
|
|
59
|
+
"description": "Whether to strip leading whitespace-only lines from the captured content."
|
|
60
|
+
},
|
|
61
|
+
"trimEmptyTrailing": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true
|
|
64
|
+
},
|
|
65
|
+
"kind": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"default": "standard",
|
|
68
|
+
"description": "The CliChatMessage.kind value to stamp on captured blocks."
|
|
69
|
+
},
|
|
70
|
+
"minLength": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 1,
|
|
73
|
+
"default": 1,
|
|
74
|
+
"description": "Discard blocks whose captured content is shorter than this. Set higher if you have noisy short blocks (e.g. single-character paints)."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"examples": [
|
|
78
|
+
{
|
|
79
|
+
"$schema": "adhdev:tui/assistant-block@1",
|
|
80
|
+
"startMarker": "⏺",
|
|
81
|
+
"endMarker": "next-user-prompt",
|
|
82
|
+
"skipKinds": ["tool", "thinking"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"$schema": "adhdev:tui/assistant-block@1",
|
|
86
|
+
"startMarker": { "regex": "^Codex\\s*$" },
|
|
87
|
+
"endMarker": "next-start-marker",
|
|
88
|
+
"headerLines": 1
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/cue-ordering@1",
|
|
4
|
+
"title": "TUI cue ordering",
|
|
5
|
+
"description": "Declares the relative spatial order cues must occur in to be considered evidence of a state. Addresses the canonical 'idle-while-Working-still-visible' regression: spinner cue near bottom + settled prompt cue ABOVE spinner → still generating; spinner ABOVE settled prompt → stale.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["rules"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/cue-ordering@1" },
|
|
11
|
+
"rules": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": ["name", "cues", "verdict"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": { "type": "string" },
|
|
20
|
+
"cues": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 2,
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["primitive", "position"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"primitive": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Reference to another primitive $id (e.g. adhdev:tui/spinner@1)."
|
|
31
|
+
},
|
|
32
|
+
"position": {
|
|
33
|
+
"enum": ["above", "below", "same-line", "any"],
|
|
34
|
+
"description": "Spatial relation to the NEXT cue in this array."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"verdict": {
|
|
40
|
+
"enum": ["generating", "idle", "approval", "ignore"],
|
|
41
|
+
"description": "What to return when this ordering matches."
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/dispatch-order@1",
|
|
4
|
+
"title": "TUI dispatch order",
|
|
5
|
+
"description": "Declares the order in which detectStatus consults its primitive groups. Default order — spinner → modal → settled-prompt — is what fixed the sprint-2026-06 'idle while Working visible' regression and must be expressible in declarative manifests.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["order"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/dispatch-order@1" },
|
|
11
|
+
"order": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"uniqueItems": true,
|
|
15
|
+
"description": "Ordered list of primitive group identifiers. Daemon evaluates them in this order; first matching group decides the verdict.",
|
|
16
|
+
"items": {
|
|
17
|
+
"enum": [
|
|
18
|
+
"spinner",
|
|
19
|
+
"modal",
|
|
20
|
+
"settled-prompt",
|
|
21
|
+
"cue-ordering",
|
|
22
|
+
"error-detection",
|
|
23
|
+
"approval-stitching"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"onNoMatch": {
|
|
28
|
+
"enum": ["idle", "unknown", "preserve-last"],
|
|
29
|
+
"default": "idle"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/footer-chrome@1",
|
|
4
|
+
"title": "TUI footer chrome",
|
|
5
|
+
"description": "Declares the lines/regions that constitute the persistent CLI footer (input hint, model badge, token counter, etc.). Used to mask the footer out before running prompt-marker / spinner / settled-prompt matchers, so chrome text never gets misclassified as agent state.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["regions"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/footer-chrome@1" },
|
|
11
|
+
"regions": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"minItems": 1,
|
|
14
|
+
"description": "Ordered list of regions; the first match wins. Each region is identified by a sentinel + bounded line span.",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["sentinel"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"name": { "type": "string" },
|
|
21
|
+
"sentinel": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": ["pattern"],
|
|
25
|
+
"properties": {
|
|
26
|
+
"pattern": { "type": "string", "description": "Regex source." },
|
|
27
|
+
"flags": { "type": "string" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"spanLinesBefore": { "type": "integer", "minimum": 0, "default": 0 },
|
|
31
|
+
"spanLinesAfter": { "type": "integer", "minimum": 0, "default": 0 },
|
|
32
|
+
"anchor": {
|
|
33
|
+
"enum": ["bottom", "any"],
|
|
34
|
+
"default": "bottom",
|
|
35
|
+
"description": "When 'bottom', region must be within the last N lines of the screen."
|
|
36
|
+
},
|
|
37
|
+
"bottomLookbackLines": { "type": "integer", "minimum": 1, "default": 12 }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/index-finder@1",
|
|
4
|
+
"title": "TUI index finder",
|
|
5
|
+
"description": "Locates the most-recent occurrence of a cue inside a rendered screen by line index — exposed as a helper primitive used by cue-ordering, settled-prompt, and visible-region. Authors don't reference this primitive directly in manifests; the runtime uses it internally when evaluating spatial relations.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["strategy"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/index-finder@1" },
|
|
11
|
+
"strategy": {
|
|
12
|
+
"enum": ["last-match", "first-match", "tail-window-only"],
|
|
13
|
+
"default": "last-match"
|
|
14
|
+
},
|
|
15
|
+
"tailWindowLines": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 1,
|
|
18
|
+
"default": 12,
|
|
19
|
+
"description": "Used when strategy=tail-window-only."
|
|
20
|
+
},
|
|
21
|
+
"ignoreInsideRegions": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": { "type": "string" },
|
|
24
|
+
"description": "Primitive $ids whose matched regions should be ignored (e.g. mask out footer-chrome lines before finding the cue)."
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "adhdev:tui/modal@1",
|
|
4
|
+
"title": "tui/modal — v1",
|
|
5
|
+
"description": "Declares how to extract an approval modal from the screen. Codex `Do you want to proceed?` + numbered list, Claude approval frame with explicit separators, Antigravity `agy wants to run:` are all expressible. The builder returns null when no modal is visible; daemon then keeps status non-waiting.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["$schema", "questionPattern", "buttonPattern"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "const": "adhdev:tui/modal@1" },
|
|
11
|
+
"questionPattern": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Regex source matching the question line that introduces the modal. Examples: `Do you want to proceed\\?`, `Do you trust the contents of this directory\\?`, `agy wants to run:`."
|
|
14
|
+
},
|
|
15
|
+
"questionFlags": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[gimsuy]*$",
|
|
18
|
+
"default": "i"
|
|
19
|
+
},
|
|
20
|
+
"questionVariants": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Additional regex sources that count as the same approval kind. Each is tried in order; the first match wins.",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["regex"],
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {
|
|
28
|
+
"regex": { "type": "string" },
|
|
29
|
+
"flags": { "type": "string", "pattern": "^[gimsuy]*$", "default": "i" },
|
|
30
|
+
"label": { "type": "string", "description": "Optional category label, e.g. \"trust-folder\", \"tool-approval\"." }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"default": []
|
|
34
|
+
},
|
|
35
|
+
"buttonPattern": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Regex source matching a single button line. Capture group 1 is the button label. Example: `^[\\s❯>]*\\d+\\.\\s+(.+)$`."
|
|
38
|
+
},
|
|
39
|
+
"buttonLabelGroup": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": 1,
|
|
42
|
+
"default": 1,
|
|
43
|
+
"description": "Capture group number to use as the button label when `buttonPattern` contains non-label groups such as selected-row markers."
|
|
44
|
+
},
|
|
45
|
+
"buttonFlags": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[gimsuy]*$",
|
|
48
|
+
"default": "m"
|
|
49
|
+
},
|
|
50
|
+
"inlineButtonPattern": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Fallback regex for terminals that render all options on a single line (e.g. Antigravity's `[0] skip [1] yes [2] no [3] still using` survey). Used only when per-line extraction collects fewer than `minButtons`. The `g` flag is forced on by the builder; capture group 1 is the label."
|
|
53
|
+
},
|
|
54
|
+
"inlineButtonFlags": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[gimsuy]*$",
|
|
57
|
+
"default": "gi"
|
|
58
|
+
},
|
|
59
|
+
"scope": {
|
|
60
|
+
"default": "between-last-two-separators",
|
|
61
|
+
"description": "Where on the screen the question + buttons must appear together.",
|
|
62
|
+
"oneOf": [
|
|
63
|
+
{
|
|
64
|
+
"const": "between-last-two-separators",
|
|
65
|
+
"title": "Between last two separators",
|
|
66
|
+
"description": "Most robust for Claude/Antigravity-style framed modals."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"const": "window-around-question",
|
|
70
|
+
"title": "Window around the question line",
|
|
71
|
+
"description": "Matches when the modal is announced by an explicit question line; collects buttons in the N lines below."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"const": "whole-screen",
|
|
75
|
+
"title": "Whole screen",
|
|
76
|
+
"description": "Use sparingly; tends to false-positive on numbered lists in assistant prose."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"scopeWindowLines": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 2,
|
|
83
|
+
"maximum": 64,
|
|
84
|
+
"default": 16,
|
|
85
|
+
"description": "Lines of context around the question when scope is `window-around-question`."
|
|
86
|
+
},
|
|
87
|
+
"contextHeader": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"description": "Optional header line that should be included in the modal message text. Captures the tool name / command being approved.",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"regex": { "type": "string" },
|
|
93
|
+
"flags": { "type": "string", "pattern": "^[gimsuy]*$", "default": "i" }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"continuationLines": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"default": false,
|
|
99
|
+
"description": "When true, indented lines immediately following a button line are concatenated to the previous label (handles wrapped long options like Antigravity's \"Yes, and always allow ...\")."
|
|
100
|
+
},
|
|
101
|
+
"minButtons": {
|
|
102
|
+
"type": "integer",
|
|
103
|
+
"minimum": 1,
|
|
104
|
+
"default": 2,
|
|
105
|
+
"description": "Minimum buttons required for the modal to be considered valid. Daemon's auto-approve gate also enforces buttons.length > 0."
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"examples": [
|
|
109
|
+
{
|
|
110
|
+
"$schema": "adhdev:tui/modal@1",
|
|
111
|
+
"questionPattern": "Do you want to (?:proceed|allow|run)",
|
|
112
|
+
"buttonPattern": "^[\\s❯>]*\\d+\\.\\s+(.+)$",
|
|
113
|
+
"scope": "between-last-two-separators",
|
|
114
|
+
"minButtons": 2
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"$schema": "adhdev:tui/modal@1",
|
|
118
|
+
"questionPattern": "agy wants to run:",
|
|
119
|
+
"buttonPattern": "^\\s*\\d+\\.\\s+(.+)$",
|
|
120
|
+
"scope": "window-around-question",
|
|
121
|
+
"continuationLines": true,
|
|
122
|
+
"contextHeader": { "regex": "agy wants to run:\\s*\\n?(.+)" }
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|