@xrkseek/harness 0.6.21 → 0.7.0-rc.1
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/node_modules/@xrkseek/a2a/README.md +45 -45
- package/node_modules/@xrkseek/attachment/README.md +23 -23
- package/node_modules/@xrkseek/attachment-local/README.md +6 -6
- package/node_modules/@xrkseek/attachment-local/package.json +26 -26
- package/node_modules/@xrkseek/checkpoint/README.md +90 -90
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +21 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/store.js +33 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/package.json +26 -26
- package/node_modules/@xrkseek/claude-code-mods/README.md +152 -0
- package/node_modules/@xrkseek/claude-code-mods/README.zh.md +172 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts +36 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/api.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/api.js +215 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/api.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts +92 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/attach.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/attach.js +106 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/attach.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts +105 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/chain.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/chain.js +324 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/chain.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts +39 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js +39 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/define-mod.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts +96 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/elements.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/elements.js +171 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/elements.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts +155 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/engine.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/engine.js +356 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/engine.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts +72 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js +603 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/host-ops.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts +112 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/index.js +654 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts +45 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/matcher.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js +195 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/matcher.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts +74 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/module.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/module.js +167 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/module.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts +31 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/native-import.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js +32 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/native-import.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts +70 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js +167 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/plugin-dir.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts +57 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js +85 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/product-agent.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts +117 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js +252 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/runtime.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts +68 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js +104 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/storage-domain.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts +82 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js +243 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/surfaces.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts +157 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/testing.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/testing.js +266 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/testing.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts +21 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js +37 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/tool-names.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts +592 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/types.js +10 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts +58 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/values.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/values.js +75 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/values.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts +45 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.d.ts.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js +29 -0
- package/node_modules/@xrkseek/claude-code-mods/dist/working-directory.js.map +1 -0
- package/node_modules/@xrkseek/claude-code-mods/package.json +47 -0
- package/node_modules/@xrkseek/code-runtime/README.md +20 -20
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts +87 -0
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js +9 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/package.json +42 -42
- package/node_modules/@xrkseek/core-session/README.md +35 -35
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.js +62 -37
- package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/freeze.d.ts +6 -0
- package/node_modules/@xrkseek/core-session/dist/freeze.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/freeze.js +9 -0
- package/node_modules/@xrkseek/core-session/dist/freeze.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.d.ts +18 -2
- package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js +53 -12
- package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/list-hints.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/list-hints.js +14 -4
- package/node_modules/@xrkseek/core-session/dist/list-hints.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts +8 -1
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js +14 -4
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts +55 -0
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +670 -92
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/store.d.ts +38 -0
- package/node_modules/@xrkseek/core-session/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/package.json +34 -34
- package/node_modules/@xrkseek/core-system-prompt/README.md +14 -14
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js +3 -2
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/std-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/std-tools.js +1 -13
- package/node_modules/@xrkseek/core-tools/dist/std-tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/README.md +14 -14
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +402 -402
- package/node_modules/@xrkseek/exec-computer-use/package.json +26 -26
- package/node_modules/@xrkseek/exec-fs/README.md +12 -12
- package/node_modules/@xrkseek/exec-fs/dist/read-image.js +4 -4
- package/node_modules/@xrkseek/exec-image-gen/README.md +13 -13
- package/node_modules/@xrkseek/exec-image-gen/package.json +28 -28
- package/node_modules/@xrkseek/exec-memory/README.md +14 -14
- package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts +11 -0
- package/node_modules/@xrkseek/exec-memory/dist/live-fragment.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js +40 -0
- package/node_modules/@xrkseek/exec-memory/dist/live-fragment.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/package.json +28 -28
- package/node_modules/@xrkseek/exec-sandbox/README.md +15 -15
- package/node_modules/@xrkseek/exec-ssh/README.md +19 -19
- package/node_modules/@xrkseek/exec-subprocess/README.md +10 -10
- package/node_modules/@xrkseek/exec-video-analyze/README.md +11 -11
- package/node_modules/@xrkseek/exec-video-analyze/package.json +26 -26
- package/node_modules/@xrkseek/exec-video-gen/README.md +26 -26
- package/node_modules/@xrkseek/exec-voice/README.md +25 -25
- package/node_modules/@xrkseek/exec-web/README.md +11 -11
- package/node_modules/@xrkseek/llm-deepseek/README.md +22 -22
- package/node_modules/@xrkseek/llm-deepseek/package.json +30 -30
- package/node_modules/@xrkseek/llm-registry/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/llm-registry/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/index.js +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/types.d.ts +29 -0
- package/node_modules/@xrkseek/llm-registry/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/types.js +21 -0
- package/node_modules/@xrkseek/llm-registry/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/mcp/README.md +78 -78
- package/node_modules/@xrkseek/policy/README.md +18 -18
- package/node_modules/@xrkseek/policy/package.json +31 -31
- package/node_modules/@xrkseek/preset-harness/README.md +7 -7
- package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts +68 -0
- package/node_modules/@xrkseek/preset-harness/dist/mods.d.ts.map +1 -0
- package/node_modules/@xrkseek/preset-harness/dist/mods.js +510 -0
- package/node_modules/@xrkseek/preset-harness/dist/mods.js.map +1 -0
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +12 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +73 -26
- package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-harness/package.json +9 -8
- package/node_modules/@xrkseek/preset-minimal/README.md +6 -6
- package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js +9 -3
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/README.md +4 -4
- package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js +2 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/README.md +34 -34
- package/node_modules/@xrkseek/protocol/dist/index.d.ts +3 -2
- package/node_modules/@xrkseek/protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/index.js +1 -0
- package/node_modules/@xrkseek/protocol/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts +12 -0
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.js +9 -0
- package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-value.d.ts +25 -0
- package/node_modules/@xrkseek/protocol/dist/json-value.d.ts.map +1 -0
- package/node_modules/@xrkseek/protocol/dist/json-value.js +181 -0
- package/node_modules/@xrkseek/protocol/dist/json-value.js.map +1 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +21 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.js +1 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts +4 -1
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js +28 -2
- package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
- package/node_modules/@xrkseek/schemastery/lib/index.cjs +597 -597
- package/node_modules/@xrkseek/schemastery/lib/index.mjs +597 -597
- package/node_modules/@xrkseek/schemastery/lib/types/index.d.ts +203 -203
- package/node_modules/@xrkseek/schemastery/src/index.d.ts +203 -203
- package/node_modules/@xrkseek/schemastery/src/index.ts +906 -906
- package/node_modules/@xrkseek/server-config/package.json +28 -28
- package/node_modules/@xrkseek/server-cron/README.md +12 -12
- package/node_modules/@xrkseek/server-cron/package.json +26 -26
- package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts +22 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js +40 -3
- package/node_modules/@xrkseek/server-face/dist/adapt/history-paginate.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js +2 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts +1 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js +2 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts +5 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js +7 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-ids.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts +31 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js +71 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home-boundary.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts +18 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home.js +64 -0
- package/node_modules/@xrkseek/server-face/dist/agent-home.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts +41 -2
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js +200 -28
- package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/attach-http.js +9 -0
- package/node_modules/@xrkseek/server-face/dist/attach-http.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts +55 -0
- package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js +167 -0
- package/node_modules/@xrkseek/server-face/dist/boss-status-broadcast.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts +12 -0
- package/node_modules/@xrkseek/server-face/dist/collab-board.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/collab-board.js +101 -19
- package/node_modules/@xrkseek/server-face/dist/collab-board.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +25 -2
- package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/dispatch.js +6 -2
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.js +2 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/fork-cut.js +15 -3
- package/node_modules/@xrkseek/server-face/dist/fork-cut.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts +7 -0
- package/node_modules/@xrkseek/server-face/dist/fork-lineage.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/fork-lineage.js +23 -8
- package/node_modules/@xrkseek/server-face/dist/fork-lineage.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts +7 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/band.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/band.js +40 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/band.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js +81 -3
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js +4 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js +236 -62
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/team.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/team.js +100 -9
- package/node_modules/@xrkseek/server-face/dist/handlers/team.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts +8 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js +15 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +5 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +5 -1
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts +19 -0
- package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js +28 -0
- package/node_modules/@xrkseek/server-face/dist/instruction-authority-fragment.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts +3 -0
- package/node_modules/@xrkseek/server-face/dist/log-cut-reset.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js +22 -0
- package/node_modules/@xrkseek/server-face/dist/log-cut-reset.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts +66 -4
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.js +147 -5
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js +60 -5
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +2 -2
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.js +2 -2
- package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts +50 -4
- package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js +167 -19
- package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts +21 -1
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js +21 -1
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +58 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js +85 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js +14 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.js +14 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js +24 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +4 -2
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +127 -17
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts +26 -0
- package/node_modules/@xrkseek/server-face/dist/seat-identity.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/seat-identity.js +137 -0
- package/node_modules/@xrkseek/server-face/dist/seat-identity.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts +29 -0
- package/node_modules/@xrkseek/server-face/dist/seat-titles.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/seat-titles.js +74 -0
- package/node_modules/@xrkseek/server-face/dist/seat-titles.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-capability.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-capability.js +9 -6
- package/node_modules/@xrkseek/server-face/dist/session-capability.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-cwd.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-cwd.js +3 -1
- package/node_modules/@xrkseek/server-face/dist/session-cwd.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts +37 -0
- package/node_modules/@xrkseek/server-face/dist/session-event-window.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-event-window.js +88 -0
- package/node_modules/@xrkseek/server-face/dist/session-event-window.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts +20 -0
- package/node_modules/@xrkseek/server-face/dist/session-identity-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-identity-store.js +82 -0
- package/node_modules/@xrkseek/server-face/dist/session-identity-store.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-posture.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-posture.js +20 -5
- package/node_modules/@xrkseek/server-face/dist/session-posture.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.js +172 -25
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-search.d.ts +20 -2
- package/node_modules/@xrkseek/server-face/dist/session-search.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-search.js +125 -19
- package/node_modules/@xrkseek/server-face/dist/session-search.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.js +143 -21
- package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-thread-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js +5 -0
- package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js +2 -1
- package/node_modules/@xrkseek/server-face/dist/session-tool-copy.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +10 -2
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +48 -10
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-documents.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-documents.js +14 -4
- package/node_modules/@xrkseek/server-face/dist/skill-documents.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts +4 -2
- package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-list.js +10 -4
- package/node_modules/@xrkseek/server-face/dist/skill-list.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-read.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-read.js +9 -2
- package/node_modules/@xrkseek/server-face/dist/skill-read.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts +2 -1
- package/node_modules/@xrkseek/server-face/dist/skill-source.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-source.js +12 -2
- package/node_modules/@xrkseek/server-face/dist/skill-source.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.d.ts +10 -1
- package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.js +97 -22
- package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js +53 -0
- package/node_modules/@xrkseek/server-face/dist/status-snapshot-cache.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +10 -5
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/types.d.ts +23 -0
- package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +6 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +17 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js +19 -14
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts +22 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-member-look.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js +35 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-member-look.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts +3 -2
- package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js +74 -57
- package/node_modules/@xrkseek/server-face/dist/workspace-orchestrate-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +31 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +109 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-store.js +7 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +60 -60
- package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts +16 -2
- package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/agent-cache.js +84 -36
- package/node_modules/@xrkseek/server-host/dist/agent-cache.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +37 -6
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +124 -27
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/log.d.ts +6 -0
- package/node_modules/@xrkseek/server-host/dist/log.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +17 -2
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/standing-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/standing-tools.js +3 -3
- package/node_modules/@xrkseek/server-host/dist/standing-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-host/package.json +75 -75
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-tool-pre.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js +41 -6
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.js +188 -188
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js +292 -24
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-auth.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js +12 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access-gate.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts +16 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js +47 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js +53 -53
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts +9 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js +39 -20
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/mobile-gate-kit.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +2 -1
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js +85 -0
- package/node_modules/@xrkseek/server-http/dist/sunflower-free/ensure.js.map +1 -0
- package/node_modules/@xrkseek/server-http/package.json +72 -72
- package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.js +132 -0
- package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
- package/node_modules/@xrkseek/session-projection/README.md +26 -26
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts +31 -2
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-projection/dist/index.js +135 -19
- package/node_modules/@xrkseek/session-projection/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/README.md +11 -11
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/dist/index.js +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts +14 -0
- package/node_modules/@xrkseek/session-telemetry/dist/redact.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/redact.js +58 -0
- package/node_modules/@xrkseek/session-telemetry/dist/redact.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts +7 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js +43 -12
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/package.json +27 -27
- package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts +13 -0
- package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/durable-inject.js +40 -4
- package/node_modules/@xrkseek/workspace/dist/durable-inject.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts +10 -9
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +67 -19
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +19 -20
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +43 -20
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts +2 -0
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js +23 -12
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts +7 -4
- package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-sources.js +10 -0
- package/node_modules/@xrkseek/workspace/dist/inject-sources.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts +27 -0
- package/node_modules/@xrkseek/workspace/dist/instruction-authority.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/instruction-authority.js +78 -0
- package/node_modules/@xrkseek/workspace/dist/instruction-authority.js.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts +7 -0
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.js +4 -2
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-tools.js +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-tools.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skills.d.ts +13 -1
- package/node_modules/@xrkseek/workspace/dist/skills.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skills.js +45 -5
- package/node_modules/@xrkseek/workspace/dist/skills.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts +26 -0
- package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js +80 -0
- package/node_modules/@xrkseek/workspace/dist/standing-skill-dirs.js.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts +7 -1
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js +21 -1
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js.map +1 -1
- package/node_modules/@xrkseek/workspace/package.json +28 -28
- package/node_modules/@xrkseek/xrk-agent/lib/index.js +1 -793
- package/node_modules/@xrkseek/xrk-agent/lib/invariant.js +1 -23
- package/node_modules/@xrkseek/xrk-attachment/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-attachment/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/brand.js +10 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/error.js +48 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/index.js +42 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/invariant.js +16 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/types.d.ts +6 -0
- package/node_modules/@xrkseek/xrk-attachment/lib/types/types.js +3 -0
- package/node_modules/@xrkseek/xrk-attachment/package.json +1 -0
- package/node_modules/@xrkseek/xrk-brand/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-brand/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-brand/lib/types/index.js +24 -0
- package/node_modules/@xrkseek/xrk-brand/lib/types/invariant.js +22 -0
- package/node_modules/@xrkseek/xrk-brand/package.json +1 -0
- package/node_modules/@xrkseek/xrk-commands/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-commands/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/README.md +46 -46
- package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +46 -46
- package/node_modules/@xrkseek/xrk-file-reference-local/package.json +30 -30
- package/node_modules/@xrkseek/xrk-invariants/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-invariants/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-invariants/lib/types/index.js +148 -0
- package/node_modules/@xrkseek/xrk-invariants/lib/types/invariant.js +22 -0
- package/node_modules/@xrkseek/xrk-invariants/package.json +1 -0
- package/node_modules/@xrkseek/xrk-llm/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-llm/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-llm/lib/types/index.js +4 -0
- package/node_modules/@xrkseek/xrk-llm/lib/types/types.d.ts +11 -0
- package/node_modules/@xrkseek/xrk-permission-presets/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-permission-presets/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-scope/lib/index.js +1 -0
- package/node_modules/@xrkseek/xrk-scope/lib/types/index.d.ts +129 -0
- package/node_modules/@xrkseek/xrk-scope/lib/types/index.js +243 -0
- package/node_modules/@xrkseek/xrk-scope/package.json +34 -0
- package/node_modules/@xrkseek/xrk-session/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-session/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-session-projection/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-session-projection/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-session-reference/README.md +50 -50
- package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +50 -50
- package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.js +13 -13
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +2 -2
- package/node_modules/@xrkseek/xrk-session-reference/package.json +56 -56
- package/node_modules/@xrkseek/xrk-settings/lib/index.js +1 -638
- package/node_modules/@xrkseek/xrk-settings/lib/invariant.js +1 -67
- package/node_modules/@xrkseek/xrk-system-prompt/package.json +15 -15
- package/node_modules/@xrkseek/xrk-system-prompt/src/index.ts +144 -144
- package/node_modules/@xrkseek/xrk-token-meter/README.i18n.yaml +6 -0
- package/node_modules/@xrkseek/xrk-token-meter/README.md +68 -0
- package/node_modules/@xrkseek/xrk-token-meter/README.zh.md +68 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/index.js +1 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.d.ts +29 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/breakdown-projection.js +56 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.d.ts +9 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/client.js +7 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.d.ts +42 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/estimate.js +79 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.d.ts +62 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/index.js +250 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.d.ts +16 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/invariant.js +30 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.d.ts +74 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/projection.js +7 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.d.ts +38 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-fold.js +47 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.d.ts +59 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/surface-projection.js +66 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.d.ts +33 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/turn-usage.js +247 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.d.ts +44 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/types.js +7 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.d.ts +64 -0
- package/node_modules/@xrkseek/xrk-token-meter/lib/types/usage-projection.js +161 -0
- package/node_modules/@xrkseek/xrk-token-meter/package.json +57 -0
- package/node_modules/@xrkseek/xrk-tools/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-tools/lib/invariant.js +1 -1
- package/node_modules/@xrkseek/xrk-tools/src/presentation.ts +39 -39
- package/node_modules/@xrkseek/xrk-typert-protocol/lib/index.js +1 -1
- package/node_modules/@xrkseek/xrk-typert-protocol/lib/invariant.js +1 -0
- package/node_modules/@xrkseek/xrk-workflow/README.md +73 -73
- package/node_modules/@xrkseek/xrk-workflow/README.zh.md +72 -72
- package/node_modules/@xrkseek/xrk-workflow/lib/types/index.js +118 -118
- package/package.json +7 -1
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts +0 -14
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts.map +0 -1
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.js +0 -21
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.js.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.mts +0 -3734
- package/node_modules/@xrkseek/server-face/dist/index.d.mts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/index.mjs +0 -22085
- package/node_modules/@xrkseek/server-face/dist/index.mjs.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts +0 -51
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.js +0 -104
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.js.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts +0 -2
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js +0 -98
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts +0 -18
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js +0 -141
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts +0 -30
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js +0 -96
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js.map +0 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `defineMod`: wrap a Claude Code mod's `register(on, options)` as a DSH
|
|
3
|
+
* plugin. Mounting the plugin registers the mod with the bridge service
|
|
4
|
+
* (`ctx.claudeCodeMods`); unmounting it removes the mod's hooks, timers, and
|
|
5
|
+
* registrations. Mods load in composition order, which is their chain order.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from "@xrkseek/cordis";
|
|
9
|
+
import z from "@xrkseek/schemastery";
|
|
10
|
+
import type { ModDefinition, ModRegister, PluginOptions } from "./types.js";
|
|
11
|
+
/** The option values a composition may set for a mod: `userConfig`'s value types. */
|
|
12
|
+
export type ModConfig = Record<string, string | number | boolean | string[]>;
|
|
13
|
+
/** What a mod's plugin declares: the plugin identity and the hooks module's `register`. */
|
|
14
|
+
export interface ModSpec {
|
|
15
|
+
/** Plugin name, as `.claude-plugin/plugin.json` names it: letters, digits, `_` and `-`. */
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly version?: string;
|
|
18
|
+
/** Absolute directory the mod ships in, reported by `$.plugin.root`. */
|
|
19
|
+
readonly root?: string;
|
|
20
|
+
/** `userConfig` defaults: the `options` `register` receives when the composition sets none. */
|
|
21
|
+
readonly userConfig?: PluginOptions;
|
|
22
|
+
readonly register: ModRegister;
|
|
23
|
+
}
|
|
24
|
+
/** A mod wrapped as a DSH plugin; its config is the mod's `options`. */
|
|
25
|
+
export interface ModPlugin {
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly inject: readonly string[];
|
|
28
|
+
readonly Config: z<ModConfig>;
|
|
29
|
+
/** The mod as the bridge and the test kit load it, with `userConfig` as its options. */
|
|
30
|
+
readonly definition: ModDefinition;
|
|
31
|
+
apply(ctx: Context, config: ModConfig): Promise<() => Promise<void>>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Wrap one mod as a DSH plugin.
|
|
35
|
+
* @param spec - the mod's identity, `userConfig` defaults, and `register`.
|
|
36
|
+
* @returns a plugin object for `cordis.yml` or `ctx.plugin`; its `config` overlays `userConfig` as `register`'s `options`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function defineMod(spec: ModSpec): ModPlugin;
|
|
39
|
+
//# sourceMappingURL=define-mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-mod.d.ts","sourceRoot":"","sources":["../src/define-mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,CAAC,MAAM,sBAAsB,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5E,qFAAqF;AACrF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;AAE7E,2FAA2F;AAC3F,MAAM,WAAW,OAAO;IACtB,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,+FAA+F;IAC/F,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;CAChC;AAED,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IAC9B,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CACtE;AAID;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAuBlD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `defineMod`: wrap a Claude Code mod's `register(on, options)` as a DSH
|
|
3
|
+
* plugin. Mounting the plugin registers the mod with the bridge service
|
|
4
|
+
* (`ctx.claudeCodeMods`); unmounting it removes the mod's hooks, timers, and
|
|
5
|
+
* registrations. Mods load in composition order, which is their chain order.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import z from "@xrkseek/schemastery";
|
|
9
|
+
const optionValue = z.union([z.string(), z.number(), z.boolean(), z.array(z.string())]);
|
|
10
|
+
/**
|
|
11
|
+
* Wrap one mod as a DSH plugin.
|
|
12
|
+
* @param spec - the mod's identity, `userConfig` defaults, and `register`.
|
|
13
|
+
* @returns a plugin object for `cordis.yml` or `ctx.plugin`; its `config` overlays `userConfig` as `register`'s `options`.
|
|
14
|
+
*/
|
|
15
|
+
export function defineMod(spec) {
|
|
16
|
+
const userConfig = Object.freeze({ ...spec.userConfig });
|
|
17
|
+
const definition = Object.freeze({
|
|
18
|
+
name: spec.name,
|
|
19
|
+
...(spec.version === undefined ? {} : { version: spec.version }),
|
|
20
|
+
...(spec.root === undefined ? {} : { root: spec.root }),
|
|
21
|
+
options: userConfig,
|
|
22
|
+
register: spec.register,
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
name: `claude-code-mod-${spec.name}`,
|
|
26
|
+
inject: ["claudeCodeMods"],
|
|
27
|
+
Config: z.dict(optionValue).default({}),
|
|
28
|
+
definition,
|
|
29
|
+
// A `register` that throws fails this plugin's mount, as any misconfigured plugin does; the rest of the composition continues.
|
|
30
|
+
// The disposer is the return value, which Cordis collects even when the plugin was removed while `register` ran.
|
|
31
|
+
apply(ctx, config) {
|
|
32
|
+
return ctx.claudeCodeMods.add({
|
|
33
|
+
...definition,
|
|
34
|
+
options: Object.freeze({ ...userConfig, ...config }),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=define-mod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-mod.js","sourceRoot":"","sources":["../src/define-mod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,CAAC,MAAM,sBAAsB,CAAC;AA4BrC,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,MAAM,UAAU,GAAkB,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACxE,MAAM,UAAU,GAAkB,MAAM,CAAC,MAAM,CAAC;QAC9C,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;QAChE,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACvD,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC,CAAC;IACH,OAAO;QACL,IAAI,EAAE,mBAAmB,IAAI,CAAC,IAAI,EAAE;QACpC,MAAM,EAAE,CAAC,gBAAgB,CAAC;QAC1B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,UAAU;QACV,+HAA+H;QAC/H,iHAAiH;QACjH,KAAK,CAAC,GAAY,EAAE,MAAiB;YACnC,OAAO,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC;gBAC5B,GAAG,UAAU;gBACb,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,EAAE,CAAC;aACrD,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The element vocabulary a `ui.render` hook answers with — Claude Code's
|
|
3
|
+
* `Box`, `Text`, and `Button` constructors — and what the host does with a
|
|
4
|
+
* tree: validate it, serialize it with callbacks replaced by action ids, and
|
|
5
|
+
* search it the way a mod's test does.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import type { SerializedNode } from "./types.js";
|
|
9
|
+
/** One element a constructor returns; `props` are the constructor's argument, frozen. */
|
|
10
|
+
export interface UiElement {
|
|
11
|
+
readonly type: "Box" | "Text" | "Button";
|
|
12
|
+
readonly props: Readonly<Record<string, unknown>>;
|
|
13
|
+
}
|
|
14
|
+
/** What a `ui.render` hook returns: an element, text, nothing, or a list of those. */
|
|
15
|
+
export type UiNode = UiElement | string | number | null | undefined | false | readonly UiNode[];
|
|
16
|
+
/** `Box` props this host lays out; a prop set to `undefined` is one a mod left out. */
|
|
17
|
+
export interface BoxProps {
|
|
18
|
+
readonly flexDirection?: "row" | "column" | undefined;
|
|
19
|
+
readonly paddingX?: number | undefined;
|
|
20
|
+
readonly paddingY?: number | undefined;
|
|
21
|
+
readonly padding?: number | undefined;
|
|
22
|
+
readonly gap?: number | undefined;
|
|
23
|
+
readonly border?: boolean | string | undefined;
|
|
24
|
+
readonly borderColor?: string | undefined;
|
|
25
|
+
readonly children?: UiNode | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** `Text` props this host styles. */
|
|
28
|
+
export interface TextProps {
|
|
29
|
+
readonly color?: string | undefined;
|
|
30
|
+
readonly bold?: boolean | undefined;
|
|
31
|
+
readonly dimColor?: boolean | undefined;
|
|
32
|
+
readonly italic?: boolean | undefined;
|
|
33
|
+
readonly underline?: boolean | undefined;
|
|
34
|
+
readonly children?: UiNode | undefined;
|
|
35
|
+
}
|
|
36
|
+
/** `Button` props: a label, an optional hotkey hint, and the callback a press runs on the host. */
|
|
37
|
+
export interface ButtonProps {
|
|
38
|
+
readonly label: string;
|
|
39
|
+
readonly hotkey?: string | undefined;
|
|
40
|
+
readonly disabled?: boolean | undefined;
|
|
41
|
+
readonly onPress?: (() => unknown) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** The constructors `$.ui.resolve(e)` returns. */
|
|
44
|
+
export interface UiElements {
|
|
45
|
+
readonly Box: (props: BoxProps) => UiElement;
|
|
46
|
+
readonly Text: (props: TextProps) => UiElement;
|
|
47
|
+
readonly Button: (props: ButtonProps) => UiElement;
|
|
48
|
+
}
|
|
49
|
+
export type { SerializedElement, SerializedNode } from "./types.js";
|
|
50
|
+
/**
|
|
51
|
+
* Whether a value is an element one of this host's constructors returned.
|
|
52
|
+
* @param value - the candidate.
|
|
53
|
+
* @returns true for a constructor-made element.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isUiElement(value: unknown): value is UiElement;
|
|
56
|
+
/**
|
|
57
|
+
* The element constructors for one render.
|
|
58
|
+
* @returns `Box`, `Text`, and `Button`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function uiElements(): UiElements;
|
|
61
|
+
/**
|
|
62
|
+
* Check a `ui.render` answer against the vocabulary.
|
|
63
|
+
* @param node - the hook's answer.
|
|
64
|
+
* @returns undefined for a valid tree, or the reason it does not validate.
|
|
65
|
+
*/
|
|
66
|
+
export declare function treeProblem(node: UiNode): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Serialize a validated tree for a client: scalars kept, children flattened,
|
|
69
|
+
* each `onPress` replaced by the id `holdAction` returns for it.
|
|
70
|
+
* @param node - the hook's answer, already validated with {@link treeProblem}.
|
|
71
|
+
* @param holdAction - stores one callback and returns its id.
|
|
72
|
+
* @returns the serialized nodes, in drawing order.
|
|
73
|
+
*/
|
|
74
|
+
export declare function serializeTree(node: UiNode, holdAction: (callback: () => unknown) => string): SerializedNode[];
|
|
75
|
+
/** What a tree search matches on. */
|
|
76
|
+
export interface TreePattern {
|
|
77
|
+
readonly type?: UiElement["type"];
|
|
78
|
+
/** Text drawn by the element, including its descendants; a string matches as a substring. */
|
|
79
|
+
readonly text?: string | RegExp;
|
|
80
|
+
/** A Button's label. */
|
|
81
|
+
readonly label?: string | RegExp;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Every element of a tree matching a pattern, in drawing order.
|
|
85
|
+
* @param node - the tree.
|
|
86
|
+
* @param pattern - the type, text, and label to match; an empty pattern matches every element.
|
|
87
|
+
* @returns the matching elements.
|
|
88
|
+
*/
|
|
89
|
+
export declare function findAll(node: UiNode, pattern: TreePattern): UiElement[];
|
|
90
|
+
/**
|
|
91
|
+
* The plain text a tree draws, one line per top-level node: the test kit's and the host log's view of a surface.
|
|
92
|
+
* @param node - the tree.
|
|
93
|
+
* @returns the drawn text.
|
|
94
|
+
*/
|
|
95
|
+
export declare function renderText(node: UiNode): string;
|
|
96
|
+
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,E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,CAAC,CAAC;IAClC,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,wBAAwB;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC;AAQD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,CAkBvE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The element vocabulary a `ui.render` hook answers with — Claude Code's
|
|
3
|
+
* `Box`, `Text`, and `Button` constructors — and what the host does with a
|
|
4
|
+
* tree: validate it, serialize it with callbacks replaced by action ids, and
|
|
5
|
+
* search it the way a mod's test does.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
/** What a serialized tree may carry per prop: scalars only. */
|
|
9
|
+
function scalarProps(props) {
|
|
10
|
+
const scalars = {};
|
|
11
|
+
for (const [name, value] of Object.entries(props)) {
|
|
12
|
+
if (name === "children" || name === "onPress")
|
|
13
|
+
continue;
|
|
14
|
+
if (typeof value === "string" ||
|
|
15
|
+
typeof value === "number" ||
|
|
16
|
+
typeof value === "boolean")
|
|
17
|
+
scalars[name] = value;
|
|
18
|
+
}
|
|
19
|
+
return scalars;
|
|
20
|
+
}
|
|
21
|
+
const elementBrand = Symbol("claude-code-mods.element");
|
|
22
|
+
function element(type, props) {
|
|
23
|
+
return Object.freeze({
|
|
24
|
+
type,
|
|
25
|
+
props: Object.freeze({ ...props }),
|
|
26
|
+
[elementBrand]: true,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Whether a value is an element one of this host's constructors returned.
|
|
31
|
+
* @param value - the candidate.
|
|
32
|
+
* @returns true for a constructor-made element.
|
|
33
|
+
*/
|
|
34
|
+
export function isUiElement(value) {
|
|
35
|
+
return (typeof value === "object" &&
|
|
36
|
+
value !== null &&
|
|
37
|
+
value[elementBrand] === true);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The element constructors for one render.
|
|
41
|
+
* @returns `Box`, `Text`, and `Button`.
|
|
42
|
+
*/
|
|
43
|
+
export function uiElements() {
|
|
44
|
+
return Object.freeze({
|
|
45
|
+
Box: (props) => element("Box", props),
|
|
46
|
+
Text: (props) => element("Text", props),
|
|
47
|
+
Button: (props) => element("Button", props),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** Flatten a node into the elements and text runs it draws, dropping what draws nothing. */
|
|
51
|
+
function childrenOf(node) {
|
|
52
|
+
if (node === null || node === undefined || node === false)
|
|
53
|
+
return [];
|
|
54
|
+
if (typeof node === "string")
|
|
55
|
+
return node.length === 0 ? [] : [node];
|
|
56
|
+
if (typeof node === "number")
|
|
57
|
+
return [String(node)];
|
|
58
|
+
if (isUiElement(node))
|
|
59
|
+
return [node];
|
|
60
|
+
if (Array.isArray(node))
|
|
61
|
+
return node.flatMap(childrenOf);
|
|
62
|
+
throw new TypeError(`a tree node is ${typeof node}, not an element, text, or a list of them`);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check a `ui.render` answer against the vocabulary.
|
|
66
|
+
* @param node - the hook's answer.
|
|
67
|
+
* @returns undefined for a valid tree, or the reason it does not validate.
|
|
68
|
+
*/
|
|
69
|
+
export function treeProblem(node) {
|
|
70
|
+
try {
|
|
71
|
+
for (const child of childrenOf(node)) {
|
|
72
|
+
if (typeof child === "string")
|
|
73
|
+
continue;
|
|
74
|
+
if (child.type === "Button") {
|
|
75
|
+
if (typeof child.props["label"] !== "string")
|
|
76
|
+
return "a Button needs a string label";
|
|
77
|
+
if (child.props["onPress"] !== undefined &&
|
|
78
|
+
typeof child.props["onPress"] !== "function")
|
|
79
|
+
return "a Button onPress must be a function";
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const nested = treeProblem(child.props["children"]);
|
|
83
|
+
if (nested !== undefined)
|
|
84
|
+
return nested;
|
|
85
|
+
}
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
/* v8 ignore next -- childrenOf throws TypeErrors only; the String branch covers a future non-Error throw */
|
|
90
|
+
return error instanceof Error ? error.message : String(error);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Serialize a validated tree for a client: scalars kept, children flattened,
|
|
95
|
+
* each `onPress` replaced by the id `holdAction` returns for it.
|
|
96
|
+
* @param node - the hook's answer, already validated with {@link treeProblem}.
|
|
97
|
+
* @param holdAction - stores one callback and returns its id.
|
|
98
|
+
* @returns the serialized nodes, in drawing order.
|
|
99
|
+
*/
|
|
100
|
+
export function serializeTree(node, holdAction) {
|
|
101
|
+
return childrenOf(node).map((child) => {
|
|
102
|
+
if (typeof child === "string")
|
|
103
|
+
return child;
|
|
104
|
+
if (child.type === "Button") {
|
|
105
|
+
const onPress = child.props["onPress"];
|
|
106
|
+
return {
|
|
107
|
+
type: "Button",
|
|
108
|
+
props: scalarProps(child.props),
|
|
109
|
+
children: [],
|
|
110
|
+
...(typeof onPress === "function"
|
|
111
|
+
? { actionId: holdAction(onPress) }
|
|
112
|
+
: {}),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
type: child.type,
|
|
117
|
+
props: scalarProps(child.props),
|
|
118
|
+
children: serializeTree(child.props["children"], holdAction),
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/** The text a node draws, with child texts joined in order. */
|
|
123
|
+
function textOf(node) {
|
|
124
|
+
if (typeof node === "string")
|
|
125
|
+
return node;
|
|
126
|
+
if (node.type === "Button")
|
|
127
|
+
return String(node.props["label"]);
|
|
128
|
+
return childrenOf(node.props["children"])
|
|
129
|
+
.map(textOf)
|
|
130
|
+
.join("");
|
|
131
|
+
}
|
|
132
|
+
function textMatches(expected, actual) {
|
|
133
|
+
return typeof expected === "string"
|
|
134
|
+
? actual.includes(expected)
|
|
135
|
+
: expected.test(actual);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Every element of a tree matching a pattern, in drawing order.
|
|
139
|
+
* @param node - the tree.
|
|
140
|
+
* @param pattern - the type, text, and label to match; an empty pattern matches every element.
|
|
141
|
+
* @returns the matching elements.
|
|
142
|
+
*/
|
|
143
|
+
export function findAll(node, pattern) {
|
|
144
|
+
const found = [];
|
|
145
|
+
const visit = (child) => {
|
|
146
|
+
if (typeof child === "string")
|
|
147
|
+
return;
|
|
148
|
+
const matchesType = pattern.type === undefined || child.type === pattern.type;
|
|
149
|
+
const matchesText = pattern.text === undefined || textMatches(pattern.text, textOf(child));
|
|
150
|
+
const matchesLabel = pattern.label === undefined ||
|
|
151
|
+
(child.type === "Button" &&
|
|
152
|
+
textMatches(pattern.label, String(child.props["label"])));
|
|
153
|
+
if (matchesType && matchesText && matchesLabel)
|
|
154
|
+
found.push(child);
|
|
155
|
+
if (child.type !== "Button")
|
|
156
|
+
for (const grandchild of childrenOf(child.props["children"]))
|
|
157
|
+
visit(grandchild);
|
|
158
|
+
};
|
|
159
|
+
for (const child of childrenOf(node))
|
|
160
|
+
visit(child);
|
|
161
|
+
return found;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The plain text a tree draws, one line per top-level node: the test kit's and the host log's view of a surface.
|
|
165
|
+
* @param node - the tree.
|
|
166
|
+
* @returns the drawn text.
|
|
167
|
+
*/
|
|
168
|
+
export function renderText(node) {
|
|
169
|
+
return childrenOf(node).map(textOf).join("\n");
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=elements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqDH,+DAA+D;AAC/D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K,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClE,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ;YACzB,KAAK,MAAM,UAAU,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAW,CAAC;gBACpE,KAAK,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC,CAAC;IACF,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC;QAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACnD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mods engine: loaded mods and their hooks, engine-raised events, mods
|
|
3
|
+
* API calls raised as events, per-session `$.state`, and the timers mods
|
|
4
|
+
* start. It knows nothing of Cordis; the plugin supplies the engine behavior
|
|
5
|
+
* for each mods API call and the test kit supplies stubs.
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import type { BudgetClock, LoadedMod, RegisteredHook } from "./chain.js";
|
|
9
|
+
import { HookRegistry } from "./module.js";
|
|
10
|
+
import type { ModDefinition, ModsApi } from "./types.js";
|
|
11
|
+
/** The engine behavior for one mods API call. */
|
|
12
|
+
export type OpCore<B> = (input: unknown, context: OpContext<B>) => unknown;
|
|
13
|
+
/** Engine behaviors by event name, `<namespace>.<method>`. */
|
|
14
|
+
export type OpTable<B> = Readonly<Record<string, OpCore<B>>>;
|
|
15
|
+
/** Looks up the engine behavior for one mods API call; `undefined` means none is served. */
|
|
16
|
+
export type OpResolver<B> = (op: string) => OpCore<B> | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Thrown by an engine behavior to answer a mods API call with `{ deny }`, so
|
|
19
|
+
* the calling mod's `$` call rejects with the reason.
|
|
20
|
+
*/
|
|
21
|
+
export declare class OpDenied extends Error {
|
|
22
|
+
readonly reason: string;
|
|
23
|
+
constructor(reason: string);
|
|
24
|
+
}
|
|
25
|
+
/** What an op core and a `$` instance know about the raising hook's surroundings. */
|
|
26
|
+
export interface OpContext<B> {
|
|
27
|
+
readonly mod: LoadedMod;
|
|
28
|
+
/** The engine-specific binding of the event that is running: the plugin's agent, or the test kit's fixture. */
|
|
29
|
+
readonly binding: B;
|
|
30
|
+
readonly signal: AbortSignal;
|
|
31
|
+
readonly engine: ModsEngine<B>;
|
|
32
|
+
}
|
|
33
|
+
/** Engine construction options. */
|
|
34
|
+
export interface ModsEngineOptions<B> {
|
|
35
|
+
/**
|
|
36
|
+
* Engine behaviors for mods API calls. The engine answers `state.*`,
|
|
37
|
+
* `clock.now`, and `clock.sleep` itself when the resolver serves none.
|
|
38
|
+
*/
|
|
39
|
+
readonly ops: OpResolver<B>;
|
|
40
|
+
/**
|
|
41
|
+
* The key `$.state` values and a mod's timers live under: Claude Code's "for
|
|
42
|
+
* the whole session". The empty string is the sessionless scope.
|
|
43
|
+
*/
|
|
44
|
+
readonly stateKey: (binding: B) => string;
|
|
45
|
+
/** A hook's own running-time limit in milliseconds. */
|
|
46
|
+
readonly budgetMs: number;
|
|
47
|
+
/** A `.catch` handler's running-time limit in milliseconds. */
|
|
48
|
+
readonly catchBudgetMs: number;
|
|
49
|
+
/** Receives diagnostics: skipped hooks, failed fire-and-forget calls, timer callback errors. */
|
|
50
|
+
readonly report: (line: string) => void;
|
|
51
|
+
/** Observes `$.state` reads, by session key and `<plugin>\u0000<key>` slot, so a drawing can subscribe to what it read. */
|
|
52
|
+
readonly onStateRead?: (key: string, slot: string) => void;
|
|
53
|
+
/** Observes `$.state` writes, by session key and slot. */
|
|
54
|
+
readonly onStateWritten?: (key: string, slot: string) => void;
|
|
55
|
+
}
|
|
56
|
+
/** Options for raising one engine event. */
|
|
57
|
+
export interface RaiseOptions<B, E = unknown> {
|
|
58
|
+
readonly binding: B;
|
|
59
|
+
readonly signal?: AbortSignal;
|
|
60
|
+
/** Checks the input a hook passes to `next`; a throw skips that hook and continues with the input it received. */
|
|
61
|
+
readonly validateNext?: (e: E, hook: RegisteredHook) => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Loaded mods, their hooks, and the two ways events reach them: the engine
|
|
65
|
+
* raises one through every selected hook, and a mod's `$` call raises one
|
|
66
|
+
* through the mods loaded before it.
|
|
67
|
+
*/
|
|
68
|
+
export declare class ModsEngine<B> {
|
|
69
|
+
private readonly options;
|
|
70
|
+
/** The loaded mods and their registrations. */
|
|
71
|
+
readonly registry: HookRegistry;
|
|
72
|
+
private readonly state;
|
|
73
|
+
/** Timer sets by `<session key>\u0000<plugin>`: a mod's timers belong to the session whose event started them. */
|
|
74
|
+
private readonly timers;
|
|
75
|
+
private nextOrder;
|
|
76
|
+
constructor(options: ModsEngineOptions<B>);
|
|
77
|
+
/**
|
|
78
|
+
* Run one mod's `register` and add its hooks beneath every mod added before it.
|
|
79
|
+
* @param definition - the mod as its plugin defined it.
|
|
80
|
+
* @returns the loaded mod.
|
|
81
|
+
* @throws Error when the name is taken or invalid, or when `register` throws.
|
|
82
|
+
*/
|
|
83
|
+
add(definition: ModDefinition): Promise<LoadedMod>;
|
|
84
|
+
/**
|
|
85
|
+
* Raise one engine event through its hooks, outermost first.
|
|
86
|
+
* @param event - the event name.
|
|
87
|
+
* @param input - the event input; frozen before a hook sees it.
|
|
88
|
+
* @param core - the engine behavior beneath every hook.
|
|
89
|
+
* @param options - the binding events of this agent share, and its cancellation.
|
|
90
|
+
* @returns the result as the outermost hook returned it.
|
|
91
|
+
*/
|
|
92
|
+
raise<E, R>(event: string, input: E, core: (e: E) => Promise<R> | R, options: RaiseOptions<B, E>): Promise<R>;
|
|
93
|
+
/**
|
|
94
|
+
* Raise one event through hooks the caller already selected, attributed to
|
|
95
|
+
* the mod that caused it: the engine, or a mod whose `$` call the host turned
|
|
96
|
+
* back into this event.
|
|
97
|
+
* @param event - the event name.
|
|
98
|
+
* @param hooks - the selected hooks, outermost first.
|
|
99
|
+
* @param raisedBy - the mod the event is attributed to, or undefined for the engine.
|
|
100
|
+
* @param input - the event input; frozen before a hook sees it.
|
|
101
|
+
* @param core - the engine behavior beneath every hook.
|
|
102
|
+
* @param options - the binding events of this agent share, and its cancellation.
|
|
103
|
+
* @returns the result as the outermost hook returned it.
|
|
104
|
+
*/
|
|
105
|
+
raiseWith<E, R>(event: string, hooks: readonly RegisteredHook[], raisedBy: LoadedMod | undefined, input: E, core: (e: E) => Promise<R> | R, options: RaiseOptions<B, E>): Promise<R>;
|
|
106
|
+
/**
|
|
107
|
+
* Raise one mods API call as its event through the mods loaded before the
|
|
108
|
+
* caller, then answer it with the engine behavior.
|
|
109
|
+
* @param mod - the calling mod.
|
|
110
|
+
* @param op - the event name, `<namespace>.<method>`.
|
|
111
|
+
* @param input - the call's input.
|
|
112
|
+
* @param binding - the binding of the event the caller is handling.
|
|
113
|
+
* @param signal - cancellation of that event.
|
|
114
|
+
* @returns the value the chain answered with.
|
|
115
|
+
* @throws Error with the reason when a hook or the engine answered `{ deny }`.
|
|
116
|
+
*/
|
|
117
|
+
invoke(mod: LoadedMod, op: string, input: unknown, binding: B, signal: AbortSignal): Promise<unknown>;
|
|
118
|
+
/**
|
|
119
|
+
* Build the `$` for one mod inside one event.
|
|
120
|
+
* @param mod - the mod the instance belongs to.
|
|
121
|
+
* @param clock - the running hook's clock, or undefined outside a hook.
|
|
122
|
+
* @param binding - the event's binding.
|
|
123
|
+
* @param signal - the event's cancellation.
|
|
124
|
+
* @returns the mods API.
|
|
125
|
+
*/
|
|
126
|
+
api(mod: LoadedMod, clock: BudgetClock | undefined, binding: B, signal: AbortSignal): ModsApi;
|
|
127
|
+
/**
|
|
128
|
+
* Forget one session's `$.state` values and close the timers its events started.
|
|
129
|
+
* @param key - the session key the values and timers were kept under.
|
|
130
|
+
* @returns settles once the session's timer callbacks have finished.
|
|
131
|
+
*/
|
|
132
|
+
forgetSession(key: string): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* The `claude plugin validate` style `hooks:` line for one mod.
|
|
135
|
+
* @param mod - the loaded mod.
|
|
136
|
+
* @returns its events with matchers, comma-separated.
|
|
137
|
+
*/
|
|
138
|
+
describe(mod: LoadedMod): string;
|
|
139
|
+
/**
|
|
140
|
+
* Drop one mod: its hooks stop receiving events, its timers are cancelled,
|
|
141
|
+
* and its running timer callbacks are awaited.
|
|
142
|
+
* @param name - the plugin name.
|
|
143
|
+
* @returns settles once the mod's timer callbacks have finished.
|
|
144
|
+
*/
|
|
145
|
+
unload(name: string): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Drop every registration and close every mod's timers.
|
|
148
|
+
* @returns settles once every timer callback has finished.
|
|
149
|
+
*/
|
|
150
|
+
dispose(): Promise<void>;
|
|
151
|
+
private timersOf;
|
|
152
|
+
private opCore;
|
|
153
|
+
}
|
|
154
|
+
export type { RegisteredHook };
|
|
155
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKzE,OAAO,EAAE,YAAY,EAAe,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAsB,MAAM,YAAY,CAAC;AAE7E,iDAAiD;AACjD,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;AAE3E,8DAA8D;AAC9D,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MA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