@adhdev/daemon-core 0.9.82-rc.21 → 0.9.82-rc.211
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 +1 -0
- package/dist/boot/process-hardening.d.ts +50 -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 +23 -2
- package/dist/cli-adapters/cli-script-runner.d.ts +117 -0
- package/dist/cli-adapters/cli-state-engine.d.ts +178 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +106 -63
- package/dist/cli-adapters/provider-cli-parse.d.ts +4 -0
- package/dist/cli-adapters/provider-cli-shared.d.ts +29 -0
- package/dist/cli-adapters/raw-terminal-io.d.ts +37 -0
- package/dist/cli-adapters/terminal-backends/ghostty-vt-backend.d.ts +3 -3
- package/dist/cli-adapters/terminal-backends/types.d.ts +1 -2
- package/dist/cli-adapters/terminal-screen.d.ts +2 -11
- package/dist/commands/cli-manager.d.ts +2 -1
- package/dist/commands/handler.d.ts +110 -0
- package/dist/commands/mesh-coordinator.d.ts +85 -1
- package/dist/commands/router.d.ts +32 -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 +72 -1
- package/dist/git/git-commands.d.ts +9 -1
- package/dist/git/git-diff.d.ts +6 -0
- package/dist/git/git-types.d.ts +2 -0
- package/dist/index.d.ts +46 -11
- package/dist/index.js +35173 -15756
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34880 -15556
- 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/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 +90 -0
- package/dist/mesh/mesh-delivery-policy.d.ts +131 -0
- package/dist/mesh/mesh-events-coordinator.d.ts +151 -0
- package/dist/mesh/mesh-events-pending.d.ts +33 -0
- package/dist/mesh/mesh-events-stale.d.ts +40 -0
- package/dist/mesh/mesh-events-utils.d.ts +14 -0
- package/dist/mesh/mesh-events.d.ts +5 -40
- package/dist/mesh/mesh-fast-forward.d.ts +41 -0
- package/dist/mesh/mesh-host-ownership.d.ts +9 -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 +58 -0
- package/dist/mesh/mesh-refine-status.d.ts +26 -0
- package/dist/mesh/mesh-review-inbox.d.ts +90 -0
- package/dist/mesh/mesh-runtime-store.d.ts +324 -0
- package/dist/mesh/mesh-task-stats.d.ts +49 -0
- package/dist/mesh/mesh-work-queue.d.ts +137 -6
- package/dist/mesh/preview-freshness.d.ts +18 -0
- package/dist/mesh/refine-config.d.ts +215 -0
- package/dist/mesh/worktree-bootstrap-config.d.ts +135 -0
- package/dist/providers/acp-provider-instance.d.ts +2 -0
- package/dist/providers/approval-utils.d.ts +13 -0
- package/dist/providers/cli-provider-instance.d.ts +39 -3
- package/dist/providers/contracts.d.ts +130 -6
- package/dist/providers/external-sources.d.ts +71 -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 +12 -0
- package/dist/providers/provider-instance.d.ts +13 -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 +85 -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 +52 -0
- package/dist/providers/spec/cli-adapter.d.ts +101 -0
- package/dist/providers/spec/driver.d.ts +225 -0
- package/dist/providers/spec/evaluator.d.ts +54 -0
- package/dist/providers/spec/loader.d.ts +15 -0
- package/dist/providers/spec/native-history-executor.d.ts +41 -0
- package/dist/providers/spec/route.d.ts +4 -0
- package/dist/providers/spec/schema.gen.d.ts +2025 -0
- package/dist/providers/spec/types.d.ts +302 -0
- package/dist/providers/transcript-v2.d.ts +176 -0
- package/dist/providers/types/interactive-prompt.d.ts +48 -0
- package/dist/repo-mesh-types.d.ts +109 -1
- package/dist/sessions/registry.d.ts +3 -0
- package/dist/shared-types-extra.d.ts +2 -4
- package/dist/shared-types.d.ts +42 -1
- 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 +1 -0
- package/dist/types.d.ts +5 -0
- package/package.json +6 -3
- package/src/agent-stream/poller.ts +2 -3
- package/src/boot/daemon-lifecycle.ts +22 -10
- package/src/boot/process-hardening.ts +89 -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 +22 -2
- package/src/cli-adapters/cli-script-runner.ts +421 -0
- package/src/cli-adapters/cli-state-engine.ts +1138 -0
- package/src/cli-adapters/provider-cli-adapter.d.ts +1 -1
- package/src/cli-adapters/provider-cli-adapter.ts +673 -1139
- 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 +3 -1
- package/src/cli-adapters/provider-cli-shared.d.ts +2 -0
- package/src/cli-adapters/provider-cli-shared.ts +59 -11
- package/src/cli-adapters/raw-terminal-io.ts +252 -0
- package/src/cli-adapters/terminal-backends/ghostty-vt-backend.ts +35 -29
- package/src/cli-adapters/terminal-backends/types.ts +1 -3
- package/src/cli-adapters/terminal-screen.ts +11 -81
- package/src/commands/chat-commands.ts +1787 -60
- package/src/commands/cli-manager.ts +283 -14
- package/src/commands/handler.ts +809 -2
- package/src/commands/mesh-coordinator.ts +332 -122
- package/src/commands/router.ts +4198 -557
- package/src/config/chat-history.ts +95 -24
- package/src/config/config.ts +12 -0
- package/src/config/mesh-config.ts +280 -2
- 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/ide-detector.ts +26 -16
- package/src/git/git-commands.ts +42 -12
- package/src/git/git-diff.ts +53 -0
- package/src/git/git-status.ts +35 -6
- package/src/git/git-types.ts +2 -0
- package/src/git/git-worktree.ts +8 -1
- package/src/index.ts +126 -10
- 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/logger.ts +2 -1
- package/src/mesh/contracts.ts +329 -0
- package/src/mesh/coordinator-prompt.ts +218 -31
- package/src/mesh/coordinator-registry.ts +121 -0
- package/src/mesh/mesh-active-work.ts +437 -0
- package/src/mesh/mesh-delivery-policy.ts +315 -0
- package/src/mesh/mesh-events-coordinator.ts +1404 -0
- package/src/mesh/mesh-events-pending.ts +371 -0
- package/src/mesh/mesh-events-stale.ts +283 -0
- package/src/mesh/mesh-events-utils.ts +161 -0
- package/src/mesh/mesh-events.ts +24 -908
- package/src/mesh/mesh-fast-forward.ts +438 -0
- package/src/mesh/mesh-host-ownership.ts +73 -0
- package/src/mesh/mesh-ledger-reconciliation.ts +12 -5
- package/src/mesh/mesh-ledger.ts +587 -102
- package/src/mesh/mesh-missions.ts +151 -0
- package/src/mesh/mesh-refine-status.ts +144 -0
- package/src/mesh/mesh-review-inbox.ts +307 -0
- package/src/mesh/mesh-runtime-store.ts +1305 -0
- package/src/mesh/mesh-task-stats.ts +154 -0
- package/src/mesh/mesh-work-queue.ts +490 -166
- package/src/mesh/preview-freshness.ts +118 -0
- package/src/mesh/refine-config.ts +403 -0
- package/src/mesh/worktree-bootstrap-config.ts +326 -0
- package/src/providers/acp-provider-instance.ts +15 -1
- package/src/providers/approval-utils.d.ts +4 -0
- package/src/providers/approval-utils.ts +47 -5
- package/src/providers/chat-message-normalization.ts +4 -11
- package/src/providers/cli-provider-instance.ts +833 -64
- package/src/providers/contracts.d.ts +55 -0
- package/src/providers/contracts.ts +141 -6
- package/src/providers/external-sources.ts +218 -0
- package/src/providers/ide-provider-instance.ts +19 -5
- 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 +419 -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 +10 -1
- package/src/providers/provider-loader.ts +582 -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 +262 -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 +138 -0
- package/src/providers/spec/cli-adapter.ts +626 -0
- package/src/providers/spec/driver.ts +922 -0
- package/src/providers/spec/evaluator.ts +597 -0
- package/src/providers/spec/loader.ts +324 -0
- package/src/providers/spec/native-history-executor.ts +939 -0
- package/src/providers/spec/route.ts +51 -0
- package/src/providers/spec/schema.gen.ts +691 -0
- package/src/providers/spec/schema.json +341 -0
- package/src/providers/spec/types.ts +356 -0
- package/src/providers/transcript-v2.ts +567 -0
- package/src/providers/types/interactive-prompt.ts +425 -0
- package/src/providers/version-archive.ts +38 -20
- package/src/repo-mesh-types.ts +119 -1
- package/src/sessions/registry.ts +3 -0
- package/src/shared-types-extra.ts +2 -4
- package/src/shared-types.ts +45 -1
- package/src/status/builders.ts +24 -6
- package/src/status/normalize.ts +2 -0
- package/src/status/reporter.ts +15 -0
- package/src/status/snapshot.ts +84 -25
- package/src/system/host-memory.ts +29 -12
- 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,341 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "adhdev:cli/spec@3",
|
|
4
|
+
"title": "ADHDev CLI provider spec v3",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "id", "name", "binary", "send_message", "sections", "states", "default_state"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string", "const": "adhdev:cli/spec@3" },
|
|
10
|
+
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9-]*$" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1 },
|
|
12
|
+
"binary": { "type": "string", "minLength": 1 },
|
|
13
|
+
"spawn_args": { "type": "array", "items": { "type": "string" }, "default": [] },
|
|
14
|
+
"env": { "type": "object", "additionalProperties": { "type": "string" }, "default": {} },
|
|
15
|
+
"cli_version_range": { "type": "string", "minLength": 1 },
|
|
16
|
+
"send_message": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["submit_key"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"submit_key": { "type": "string", "minLength": 1 },
|
|
22
|
+
"delay_ms_before_submit": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"delay_ms_per_char": { "type": "integer", "minimum": 0 }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sections": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"minProperties": 1,
|
|
29
|
+
"additionalProperties": { "$ref": "#/definitions/sectionDef" }
|
|
30
|
+
},
|
|
31
|
+
"states": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"items": { "$ref": "#/definitions/stateV3" }
|
|
35
|
+
},
|
|
36
|
+
"default_state": { "type": "string", "minLength": 1 },
|
|
37
|
+
"control_bar": { "type": "array", "default": [], "items": { "$ref": "#/definitions/control" } },
|
|
38
|
+
"notifications": { "type": "array", "default": [], "items": { "$ref": "#/definitions/notification" } },
|
|
39
|
+
"delegate": { "type": "array", "default": [], "items": { "$ref": "#/definitions/delegateTrigger" } },
|
|
40
|
+
"native_history": { "$ref": "#/definitions/nativeHistory" },
|
|
41
|
+
"requiresFinalAssistantBeforeIdle": { "type": "boolean" },
|
|
42
|
+
"timing": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"busy_hold_ms": { "type": "integer", "minimum": 0 },
|
|
47
|
+
"idle_hold_ms": { "type": "integer", "minimum": 0 },
|
|
48
|
+
"startup_grace_ms": { "type": "integer", "minimum": 0 },
|
|
49
|
+
"completion_marker": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["matches", "hold_ms"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"section": { "type": "string", "minLength": 1 },
|
|
55
|
+
"matches": { "type": "string", "minLength": 1 },
|
|
56
|
+
"flags": { "type": "string" },
|
|
57
|
+
"hold_ms": { "type": "integer", "minimum": 0 },
|
|
58
|
+
"force_after_ms": { "type": "integer", "minimum": 0 }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"definitions": {
|
|
65
|
+
"size": {
|
|
66
|
+
"oneOf": [
|
|
67
|
+
{ "type": "integer", "minimum": 0 },
|
|
68
|
+
{ "type": "string", "pattern": "^\\d+(\\.\\d+)?%$" }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"sectionDef": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"from_top": { "$ref": "#/definitions/size" },
|
|
76
|
+
"from_bottom": { "$ref": "#/definitions/size" },
|
|
77
|
+
"until": { "type": "string", "minLength": 1 },
|
|
78
|
+
"anchor": { "type": "string", "minLength": 1 },
|
|
79
|
+
"anchor_flags": { "type": "string" },
|
|
80
|
+
"anchor_last": { "type": "boolean" },
|
|
81
|
+
"anchor_context": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"prev": { "type": "string" },
|
|
86
|
+
"prev_flags": { "type": "string" },
|
|
87
|
+
"next": { "type": "string" },
|
|
88
|
+
"next_flags": { "type": "string" }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"lines": { "type": "integer", "minimum": 1 },
|
|
92
|
+
"until_regex": { "type": "string", "minLength": 1 },
|
|
93
|
+
"until_regex_flags": { "type": "string" }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"condition": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{ "$ref": "#/definitions/regexCondition" },
|
|
99
|
+
{ "$ref": "#/definitions/changedCondition" },
|
|
100
|
+
{ "$ref": "#/definitions/allCondition" },
|
|
101
|
+
{ "$ref": "#/definitions/anyCondition" }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"regexCondition": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["matches"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"section": { "type": "string" },
|
|
110
|
+
"matches": { "type": "string", "minLength": 1 },
|
|
111
|
+
"flags": { "type": "string" },
|
|
112
|
+
"cursor_row_min": { "type": "integer", "minimum": 0 },
|
|
113
|
+
"cursor_row_max": { "type": "integer", "minimum": 0 },
|
|
114
|
+
"cursor_col_min": { "type": "integer", "minimum": 0 },
|
|
115
|
+
"cursor_col_max": { "type": "integer", "minimum": 0 }
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"changedCondition": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["cursor_above", "changed"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"cursor_above": { "type": "integer", "minimum": 1 },
|
|
124
|
+
"changed": { "type": "boolean", "const": true }
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"allCondition": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": ["all"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"all": { "type": "array", "items": { "$ref": "#/definitions/condition" } }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"anyCondition": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": ["any"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"any": { "type": "array", "items": { "$ref": "#/definitions/condition" } }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"extractTitle": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"section": { "type": "string" },
|
|
148
|
+
"regex": { "type": "string", "minLength": 1 },
|
|
149
|
+
"flags": { "type": "string" },
|
|
150
|
+
"first_line": { "type": "boolean", "const": true }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"extractButtons": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": ["pattern", "key_for_index"],
|
|
157
|
+
"properties": {
|
|
158
|
+
"section": { "type": "string" },
|
|
159
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
160
|
+
"flags": { "type": "string" },
|
|
161
|
+
"key_for_index": { "type": "string", "minLength": 1 },
|
|
162
|
+
"min_count": { "type": "integer", "minimum": 1, "default": 2 },
|
|
163
|
+
"continuation_lines": { "type": "boolean", "default": false }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"stateV3": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": ["id", "label", "when"],
|
|
170
|
+
"properties": {
|
|
171
|
+
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
172
|
+
"label": { "type": "string", "minLength": 1 },
|
|
173
|
+
"when": {
|
|
174
|
+
"oneOf": [
|
|
175
|
+
{ "$ref": "#/definitions/allCondition" },
|
|
176
|
+
{ "$ref": "#/definitions/anyCondition" }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"extract": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": false,
|
|
182
|
+
"properties": {
|
|
183
|
+
"title": { "$ref": "#/definitions/extractTitle" },
|
|
184
|
+
"buttons": { "$ref": "#/definitions/extractButtons" }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"sectionRegex": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": ["regex"],
|
|
193
|
+
"properties": {
|
|
194
|
+
"section": { "type": "string" },
|
|
195
|
+
"regex": { "type": "string", "minLength": 1 },
|
|
196
|
+
"flags": { "type": "string", "default": "i" },
|
|
197
|
+
"cursor_row_min": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"cursor_row_max": { "type": "integer", "minimum": 0 },
|
|
199
|
+
"cursor_col_min": { "type": "integer", "minimum": 0 },
|
|
200
|
+
"cursor_col_max": { "type": "integer", "minimum": 0 }
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"sectionPattern": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": ["pattern"],
|
|
207
|
+
"properties": {
|
|
208
|
+
"section": { "type": "string" },
|
|
209
|
+
"pattern": { "type": "string", "minLength": 1 },
|
|
210
|
+
"flags": { "type": "string", "default": "" }
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"control": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": ["id", "label", "action"],
|
|
217
|
+
"properties": {
|
|
218
|
+
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
219
|
+
"label": { "type": "string", "minLength": 1 },
|
|
220
|
+
"visible_when_state": { "type": "array", "items": { "type": "string" } },
|
|
221
|
+
"action": { "$ref": "#/definitions/controlAction" }
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"controlAction": {
|
|
225
|
+
"oneOf": [
|
|
226
|
+
{
|
|
227
|
+
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"required": ["type", "keys"],
|
|
230
|
+
"properties": {
|
|
231
|
+
"type": { "const": "send_keys" },
|
|
232
|
+
"keys": { "type": "string", "minLength": 1 }
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"required": ["type", "trigger_keys", "wait_for", "extract_choices", "submit_key"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"type": { "const": "open_picker" },
|
|
241
|
+
"trigger_keys": { "type": "string", "minLength": 1 },
|
|
242
|
+
"wait_for": { "$ref": "#/definitions/sectionRegex" },
|
|
243
|
+
"extract_choices": { "$ref": "#/definitions/sectionPattern" },
|
|
244
|
+
"submit_key": { "type": "string", "minLength": 1 }
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "object",
|
|
249
|
+
"additionalProperties": false,
|
|
250
|
+
"required": ["type", "method", "keys_template"],
|
|
251
|
+
"properties": {
|
|
252
|
+
"type": { "const": "attach_image" },
|
|
253
|
+
"method": { "const": "tempfile_then_keys" },
|
|
254
|
+
"keys_template": { "type": "string", "minLength": 1 }
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"notification": {
|
|
260
|
+
"type": "object",
|
|
261
|
+
"additionalProperties": false,
|
|
262
|
+
"required": ["id", "when_state", "title"],
|
|
263
|
+
"properties": {
|
|
264
|
+
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
265
|
+
"when_state": { "type": "string", "minLength": 1 },
|
|
266
|
+
"title": { "type": "string", "minLength": 1 },
|
|
267
|
+
"body": { "type": "string" }
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"nativeHistory": {
|
|
271
|
+
"type": "object",
|
|
272
|
+
"additionalProperties": false,
|
|
273
|
+
"properties": {
|
|
274
|
+
"reader": { "type": "string", "enum": ["claude-cli", "codex-cli", "antigravity-cli", "hermes-cli"] },
|
|
275
|
+
"source": {
|
|
276
|
+
"oneOf": [
|
|
277
|
+
{ "$ref": "#/definitions/nativeHistoryJsonlSource" },
|
|
278
|
+
{ "$ref": "#/definitions/nativeHistorySqliteSource" }
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"override_path": { "type": "string", "minLength": 1 }
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"nativeHistoryMessageMap": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": ["role", "content"],
|
|
288
|
+
"properties": {
|
|
289
|
+
"role": { "type": "string", "minLength": 1 },
|
|
290
|
+
"content": { "type": "string", "minLength": 1 },
|
|
291
|
+
"content_strip": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
292
|
+
"content_unwrap": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
293
|
+
"timestamp_ms": { "type": "string", "minLength": 1 },
|
|
294
|
+
"kind": { "type": "string", "minLength": 1 }
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"nativeHistoryJsonlSource": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"additionalProperties": false,
|
|
300
|
+
"required": ["kind", "path", "message_map"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"kind": { "const": "jsonl" },
|
|
303
|
+
"path": { "type": "string", "minLength": 1 },
|
|
304
|
+
"file_pattern": { "type": "string", "minLength": 1 },
|
|
305
|
+
"recent_window_ms": { "type": "integer", "minimum": 0 },
|
|
306
|
+
"session_id_from": { "type": "string", "enum": ["filename_uuid", "first_record"] },
|
|
307
|
+
"session_id_path": { "type": "string", "minLength": 1 },
|
|
308
|
+
"message_filter": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"required": ["where"],
|
|
312
|
+
"properties": { "where": { "type": "string", "minLength": 1 } }
|
|
313
|
+
},
|
|
314
|
+
"message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"nativeHistorySqliteSource": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"required": ["kind", "path", "session_query", "message_query", "message_map"],
|
|
321
|
+
"properties": {
|
|
322
|
+
"kind": { "const": "sqlite" },
|
|
323
|
+
"path": { "type": "string", "minLength": 1 },
|
|
324
|
+
"session_query": { "type": "string", "minLength": 1 },
|
|
325
|
+
"message_query": { "type": "string", "minLength": 1 },
|
|
326
|
+
"message_map": { "$ref": "#/definitions/nativeHistoryMessageMap" }
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"delegateTrigger": {
|
|
330
|
+
"type": "object",
|
|
331
|
+
"additionalProperties": false,
|
|
332
|
+
"required": ["id", "when_state", "task_template"],
|
|
333
|
+
"properties": {
|
|
334
|
+
"id": { "type": "string", "minLength": 1, "pattern": "^[a-z][a-z0-9_]*$" },
|
|
335
|
+
"when_state": { "type": "string", "minLength": 1 },
|
|
336
|
+
"after_duration_ms": { "type": "integer", "minimum": 0 },
|
|
337
|
+
"task_template": { "type": "string", "minLength": 1 }
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|