@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,356 @@
|
|
|
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 { dispatch, ENGINE_ORIGIN } from "./chain.js";
|
|
9
|
+
import { createModsApi } from "./api.js";
|
|
10
|
+
import { messageOf, record } from "./values.js";
|
|
11
|
+
import { HookRegistry, registerMod } from "./module.js";
|
|
12
|
+
/**
|
|
13
|
+
* Thrown by an engine behavior to answer a mods API call with `{ deny }`, so
|
|
14
|
+
* the calling mod's `$` call rejects with the reason.
|
|
15
|
+
*/
|
|
16
|
+
export class OpDenied extends Error {
|
|
17
|
+
reason;
|
|
18
|
+
constructor(reason) {
|
|
19
|
+
super(reason);
|
|
20
|
+
this.reason = reason;
|
|
21
|
+
this.name = "OpDenied";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const NEVER_ABORTS = new AbortController().signal;
|
|
25
|
+
/** Wait `ms`, or reject with the signal's reason when the event is cancelled before or while waiting. */
|
|
26
|
+
function sleepUnless(ms, signal) {
|
|
27
|
+
return new Promise((resolve, reject) => {
|
|
28
|
+
if (signal.aborted) {
|
|
29
|
+
reject(abortReasonOf(signal));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const timer = setTimeout(() => {
|
|
33
|
+
signal.removeEventListener("abort", onAbort);
|
|
34
|
+
resolve();
|
|
35
|
+
}, ms);
|
|
36
|
+
function onAbort() {
|
|
37
|
+
clearTimeout(timer);
|
|
38
|
+
reject(abortReasonOf(signal));
|
|
39
|
+
}
|
|
40
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function abortReasonOf(signal) {
|
|
44
|
+
const reason = signal.reason;
|
|
45
|
+
return reason instanceof Error
|
|
46
|
+
? reason
|
|
47
|
+
: new Error(`$.clock.sleep cancelled: ${messageOf(reason)}`);
|
|
48
|
+
}
|
|
49
|
+
/** One named `$.state` slot: `<plugin>\u0000<key>`. */
|
|
50
|
+
function stateSlot(plugin, key) {
|
|
51
|
+
if (typeof plugin !== "string" || typeof key !== "string")
|
|
52
|
+
throw new TypeError("$.state needs { plugin, key } strings");
|
|
53
|
+
return `${plugin}\u0000${key}`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Timers owned by the engine on one mod's behalf. Closing cancels every
|
|
57
|
+
* scheduled timer, refuses new ones, and waits for the callbacks already
|
|
58
|
+
* running, so a mod cannot reschedule itself or touch the host after unload.
|
|
59
|
+
*/
|
|
60
|
+
class TimerSet {
|
|
61
|
+
report;
|
|
62
|
+
owner;
|
|
63
|
+
active = new Set();
|
|
64
|
+
running = new Set();
|
|
65
|
+
closed = false;
|
|
66
|
+
constructor(report, owner) {
|
|
67
|
+
this.report = report;
|
|
68
|
+
this.owner = owner;
|
|
69
|
+
}
|
|
70
|
+
after(ms, fn) {
|
|
71
|
+
if (this.closed)
|
|
72
|
+
return { cancel() { } };
|
|
73
|
+
const handle = setTimeout(() => {
|
|
74
|
+
this.active.delete(handle);
|
|
75
|
+
this.run(fn);
|
|
76
|
+
}, ms);
|
|
77
|
+
handle.unref();
|
|
78
|
+
this.active.add(handle);
|
|
79
|
+
return {
|
|
80
|
+
cancel: () => {
|
|
81
|
+
clearTimeout(handle);
|
|
82
|
+
this.active.delete(handle);
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
every(ms, fn) {
|
|
87
|
+
if (this.closed)
|
|
88
|
+
return { cancel() { } };
|
|
89
|
+
const handle = setInterval(() => {
|
|
90
|
+
this.run(fn);
|
|
91
|
+
}, ms);
|
|
92
|
+
handle.unref();
|
|
93
|
+
this.active.add(handle);
|
|
94
|
+
return {
|
|
95
|
+
cancel: () => {
|
|
96
|
+
clearInterval(handle);
|
|
97
|
+
this.active.delete(handle);
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Cancel every scheduled timer, refuse new ones, and settle once the
|
|
103
|
+
* callbacks already running have finished.
|
|
104
|
+
*/
|
|
105
|
+
async close() {
|
|
106
|
+
this.closed = true;
|
|
107
|
+
for (const handle of this.active)
|
|
108
|
+
clearTimeout(handle);
|
|
109
|
+
this.active.clear();
|
|
110
|
+
await Promise.all(this.running);
|
|
111
|
+
}
|
|
112
|
+
run(fn) {
|
|
113
|
+
const settled = Promise.resolve()
|
|
114
|
+
.then(fn)
|
|
115
|
+
.then(() => undefined, (error) => {
|
|
116
|
+
this.report(`${this.owner}: timer callback failed: ${messageOf(error)}`);
|
|
117
|
+
});
|
|
118
|
+
this.running.add(settled);
|
|
119
|
+
void settled.finally(() => {
|
|
120
|
+
this.running.delete(settled);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Loaded mods, their hooks, and the two ways events reach them: the engine
|
|
126
|
+
* raises one through every selected hook, and a mod's `$` call raises one
|
|
127
|
+
* through the mods loaded before it.
|
|
128
|
+
*/
|
|
129
|
+
export class ModsEngine {
|
|
130
|
+
options;
|
|
131
|
+
/** The loaded mods and their registrations. */
|
|
132
|
+
registry = new HookRegistry();
|
|
133
|
+
state = new Map();
|
|
134
|
+
/** Timer sets by `<session key>\u0000<plugin>`: a mod's timers belong to the session whose event started them. */
|
|
135
|
+
timers = new Map();
|
|
136
|
+
nextOrder = 0;
|
|
137
|
+
constructor(options) {
|
|
138
|
+
this.options = options;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Run one mod's `register` and add its hooks beneath every mod added before it.
|
|
142
|
+
* @param definition - the mod as its plugin defined it.
|
|
143
|
+
* @returns the loaded mod.
|
|
144
|
+
* @throws Error when the name is taken or invalid, or when `register` throws.
|
|
145
|
+
*/
|
|
146
|
+
async add(definition) {
|
|
147
|
+
if (this.registry.list().some((loaded) => loaded.name === definition.name)) {
|
|
148
|
+
throw new Error(`mod "${definition.name}" not loaded: another mod of that name is already loaded`);
|
|
149
|
+
}
|
|
150
|
+
const order = this.nextOrder;
|
|
151
|
+
this.nextOrder += 1;
|
|
152
|
+
const { mod, hooks } = await registerMod(definition, order);
|
|
153
|
+
this.registry.add(mod, hooks);
|
|
154
|
+
return mod;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Raise one engine event through its hooks, outermost first.
|
|
158
|
+
* @param event - the event name.
|
|
159
|
+
* @param input - the event input; frozen before a hook sees it.
|
|
160
|
+
* @param core - the engine behavior beneath every hook.
|
|
161
|
+
* @param options - the binding events of this agent share, and its cancellation.
|
|
162
|
+
* @returns the result as the outermost hook returned it.
|
|
163
|
+
*/
|
|
164
|
+
raise(event, input, core, options) {
|
|
165
|
+
return this.raiseWith(event, this.registry.select(event), undefined, input, core, options);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Raise one event through hooks the caller already selected, attributed to
|
|
169
|
+
* the mod that caused it: the engine, or a mod whose `$` call the host turned
|
|
170
|
+
* back into this event.
|
|
171
|
+
* @param event - the event name.
|
|
172
|
+
* @param hooks - the selected hooks, outermost first.
|
|
173
|
+
* @param raisedBy - the mod the event is attributed to, or undefined for the engine.
|
|
174
|
+
* @param input - the event input; frozen before a hook sees it.
|
|
175
|
+
* @param core - the engine behavior beneath every hook.
|
|
176
|
+
* @param options - the binding events of this agent share, and its cancellation.
|
|
177
|
+
* @returns the result as the outermost hook returned it.
|
|
178
|
+
*/
|
|
179
|
+
raiseWith(event, hooks, raisedBy, input, core, options) {
|
|
180
|
+
const signal = options.signal ?? NEVER_ABORTS;
|
|
181
|
+
return dispatch({
|
|
182
|
+
event,
|
|
183
|
+
input,
|
|
184
|
+
core,
|
|
185
|
+
origin: raisedBy === undefined
|
|
186
|
+
? ENGINE_ORIGIN
|
|
187
|
+
: { plugin: raisedBy.name, tier: "user" },
|
|
188
|
+
hooks,
|
|
189
|
+
api: (hook, clock) => this.api(hook.mod, clock, options.binding, signal),
|
|
190
|
+
budgetMs: this.options.budgetMs,
|
|
191
|
+
catchBudgetMs: this.options.catchBudgetMs,
|
|
192
|
+
signal,
|
|
193
|
+
report: this.options.report,
|
|
194
|
+
...(options.validateNext === undefined
|
|
195
|
+
? {}
|
|
196
|
+
: { validateNext: options.validateNext }),
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Raise one mods API call as its event through the mods loaded before the
|
|
201
|
+
* caller, then answer it with the engine behavior.
|
|
202
|
+
* @param mod - the calling mod.
|
|
203
|
+
* @param op - the event name, `<namespace>.<method>`.
|
|
204
|
+
* @param input - the call's input.
|
|
205
|
+
* @param binding - the binding of the event the caller is handling.
|
|
206
|
+
* @param signal - cancellation of that event.
|
|
207
|
+
* @returns the value the chain answered with.
|
|
208
|
+
* @throws Error with the reason when a hook or the engine answered `{ deny }`.
|
|
209
|
+
*/
|
|
210
|
+
async invoke(mod, op, input, binding, signal) {
|
|
211
|
+
const result = await dispatch({
|
|
212
|
+
event: op,
|
|
213
|
+
input,
|
|
214
|
+
// `tool.call` reaches the earlier mods once the host raises it from the tool pipeline, not here as well.
|
|
215
|
+
hooks: op === "tool.call" ? [] : this.registry.select(op, mod),
|
|
216
|
+
core: async (e) => {
|
|
217
|
+
try {
|
|
218
|
+
return {
|
|
219
|
+
value: await this.opCore(op, e, { mod, binding, signal, engine: this }),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
if (error instanceof OpDenied)
|
|
224
|
+
return { deny: error.reason };
|
|
225
|
+
throw error;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
origin: { plugin: mod.name, tier: "user" },
|
|
229
|
+
api: (hook, clock) => this.api(hook.mod, clock, binding, signal),
|
|
230
|
+
budgetMs: this.options.budgetMs,
|
|
231
|
+
catchBudgetMs: this.options.catchBudgetMs,
|
|
232
|
+
signal,
|
|
233
|
+
report: this.options.report,
|
|
234
|
+
});
|
|
235
|
+
// Hooks that settle with anything but an object are skipped, so the result is the core's or a hook's object — or null.
|
|
236
|
+
const answer = result;
|
|
237
|
+
if (answer === null || (!("value" in answer) && !("deny" in answer))) {
|
|
238
|
+
throw new Error(`${op}: a hook returned neither { value } nor { deny }`);
|
|
239
|
+
}
|
|
240
|
+
if (typeof answer.deny === "string")
|
|
241
|
+
throw new Error(`${op} refused: ${answer.deny}`);
|
|
242
|
+
return answer.value;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Build the `$` for one mod inside one event.
|
|
246
|
+
* @param mod - the mod the instance belongs to.
|
|
247
|
+
* @param clock - the running hook's clock, or undefined outside a hook.
|
|
248
|
+
* @param binding - the event's binding.
|
|
249
|
+
* @param signal - the event's cancellation.
|
|
250
|
+
* @returns the mods API.
|
|
251
|
+
*/
|
|
252
|
+
api(mod, clock, binding, signal) {
|
|
253
|
+
return createModsApi({
|
|
254
|
+
mod,
|
|
255
|
+
clock,
|
|
256
|
+
invoke: (op, input) => this.invoke(mod, op, input, binding, signal),
|
|
257
|
+
timers: this.timersOf(mod, this.options.stateKey(binding)),
|
|
258
|
+
report: this.options.report,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Forget one session's `$.state` values and close the timers its events started.
|
|
263
|
+
* @param key - the session key the values and timers were kept under.
|
|
264
|
+
* @returns settles once the session's timer callbacks have finished.
|
|
265
|
+
*/
|
|
266
|
+
async forgetSession(key) {
|
|
267
|
+
this.state.delete(key);
|
|
268
|
+
const closing = [];
|
|
269
|
+
for (const [timerKey, timers] of this.timers) {
|
|
270
|
+
if (timerKey.startsWith(`${key}\u0000`)) {
|
|
271
|
+
this.timers.delete(timerKey);
|
|
272
|
+
closing.push(timers.close());
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
await Promise.all(closing);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* The `claude plugin validate` style `hooks:` line for one mod.
|
|
279
|
+
* @param mod - the loaded mod.
|
|
280
|
+
* @returns its events with matchers, comma-separated.
|
|
281
|
+
*/
|
|
282
|
+
describe(mod) {
|
|
283
|
+
return this.registry.describe(mod);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Drop one mod: its hooks stop receiving events, its timers are cancelled,
|
|
287
|
+
* and its running timer callbacks are awaited.
|
|
288
|
+
* @param name - the plugin name.
|
|
289
|
+
* @returns settles once the mod's timer callbacks have finished.
|
|
290
|
+
*/
|
|
291
|
+
async unload(name) {
|
|
292
|
+
this.registry.remove(name);
|
|
293
|
+
const closing = [];
|
|
294
|
+
for (const [timerKey, timers] of this.timers) {
|
|
295
|
+
if (timerKey.endsWith(`\u0000${name}`)) {
|
|
296
|
+
this.timers.delete(timerKey);
|
|
297
|
+
closing.push(timers.close());
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
await Promise.all(closing);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Drop every registration and close every mod's timers.
|
|
304
|
+
* @returns settles once every timer callback has finished.
|
|
305
|
+
*/
|
|
306
|
+
async dispose() {
|
|
307
|
+
await Promise.all([...this.registry.list()].map((mod) => this.unload(mod.name)));
|
|
308
|
+
this.state.clear();
|
|
309
|
+
}
|
|
310
|
+
timersOf(mod, sessionKey) {
|
|
311
|
+
const timerKey = `${sessionKey}\u0000${mod.name}`;
|
|
312
|
+
let timers = this.timers.get(timerKey);
|
|
313
|
+
if (timers === undefined) {
|
|
314
|
+
timers = new TimerSet(this.options.report, mod.name);
|
|
315
|
+
this.timers.set(timerKey, timers);
|
|
316
|
+
}
|
|
317
|
+
return timers;
|
|
318
|
+
}
|
|
319
|
+
opCore(op, input, context) {
|
|
320
|
+
const served = this.options.ops(op);
|
|
321
|
+
if (served !== undefined)
|
|
322
|
+
return served(input, context);
|
|
323
|
+
const fields = record(input);
|
|
324
|
+
switch (op) {
|
|
325
|
+
case "state.get": {
|
|
326
|
+
const slot = stateSlot(fields.plugin, fields.key);
|
|
327
|
+
const key = this.options.stateKey(context.binding);
|
|
328
|
+
this.options.onStateRead?.(key, slot);
|
|
329
|
+
return { value: this.state.get(key)?.get(slot) };
|
|
330
|
+
}
|
|
331
|
+
case "state.set": {
|
|
332
|
+
const slot = stateSlot(fields.plugin, fields.key);
|
|
333
|
+
const key = this.options.stateKey(context.binding);
|
|
334
|
+
let values = this.state.get(key);
|
|
335
|
+
if (values === undefined) {
|
|
336
|
+
values = new Map();
|
|
337
|
+
this.state.set(key, values);
|
|
338
|
+
}
|
|
339
|
+
values.set(slot, fields.value);
|
|
340
|
+
this.options.onStateWritten?.(key, slot);
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
case "clock.now":
|
|
344
|
+
return Date.now();
|
|
345
|
+
case "clock.sleep": {
|
|
346
|
+
const ms = fields.ms;
|
|
347
|
+
if (typeof ms !== "number" || !Number.isFinite(ms) || ms < 0)
|
|
348
|
+
throw new TypeError("$.clock.sleep needs a non-negative number of milliseconds");
|
|
349
|
+
return sleepUnless(ms, context.signal);
|
|
350
|
+
}
|
|
351
|
+
default:
|
|
352
|
+
throw new Error(`no implementation for ${op}`);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAA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,CAAC;gBACzC,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,WAAW;gBACd,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;YACpB,KAAK,aAAa,CAAC,CAAC,CAAC;gBACnB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;gBACrB,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;oBAC1D,MAAM,IAAI,SAAS,CACjB,2DAA2D,CAC5D,CAAC;gBACJ,OAAO,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;YACD;gBACE,MAAM,IAAI,KAAK,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The engine behavior for each mods API call this bridge serves, mapped onto
|
|
3
|
+
* harness services: commands and tools on the agent's scoped registries,
|
|
4
|
+
* `ui.ask` on the user-questions answerer, files on `ctx.fs`, processes on
|
|
5
|
+
* `ctx.subprocess`, the store on a storage domain, session facts on the
|
|
6
|
+
* agent's Session and projections. A service a deployment did not compose
|
|
7
|
+
* fails the call with the service name.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { Context } from "@xrkseek/cordis";
|
|
11
|
+
import type { ToolExecutionResult } from "@xrkseek/xrk-tools";
|
|
12
|
+
import type { LoadedMod } from "./chain.js";
|
|
13
|
+
import type { ModsEngine, OpTable } from "./engine.js";
|
|
14
|
+
import type { ToolNameAliases } from "./tool-names.js";
|
|
15
|
+
import type { SessionVersion, ToolCallResult } from "./types.js";
|
|
16
|
+
import type { ModAgent } from "./types.js";
|
|
17
|
+
/** The binding every event of this bridge carries: the agent it belongs to, when one does. */
|
|
18
|
+
export interface AgentBinding {
|
|
19
|
+
readonly agent: ModAgent | undefined;
|
|
20
|
+
}
|
|
21
|
+
/** The mods API version string `$.session.version()` reports. */
|
|
22
|
+
export declare const MODS_API_VERSION: SessionVersion;
|
|
23
|
+
/** Largest file `$.fs.read` returns and `$.fs.write` accepts, Claude Code's own limit. */
|
|
24
|
+
export declare const FS_MAX_BYTES: number;
|
|
25
|
+
/** Largest JSON a plugin's `$.store` holds in total, Claude Code's own limit. */
|
|
26
|
+
export declare const STORE_MAX_BYTES: number;
|
|
27
|
+
/** Largest response body `$.http.fetch` returns. */
|
|
28
|
+
export declare const HTTP_MAX_BYTES: number;
|
|
29
|
+
/**
|
|
30
|
+
* Full name the model sees for a mod-registered tool: Claude Code's MCP-style spelling.
|
|
31
|
+
* @param plugin - the registering plugin's name.
|
|
32
|
+
* @param tool - the name the mod registered.
|
|
33
|
+
* @returns `mcp__<plugin>__<tool>`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function modToolName(plugin: string, tool: string): string;
|
|
36
|
+
/** Options the host op table is built from. */
|
|
37
|
+
export interface HostOpsOptions {
|
|
38
|
+
readonly ctx: Context;
|
|
39
|
+
readonly aliases: ToolNameAliases;
|
|
40
|
+
/** Default `$.process.run` timeout in milliseconds. */
|
|
41
|
+
readonly processTimeoutMs: number;
|
|
42
|
+
/**
|
|
43
|
+
* Disposers of registrations mods made, keyed by the session they were scoped to
|
|
44
|
+
* (`''` for global ones), so bridge disposal undoes them and a disposed agent's
|
|
45
|
+
* entries can be dropped.
|
|
46
|
+
*/
|
|
47
|
+
readonly registrations: Map<string, Set<() => void>>;
|
|
48
|
+
/** The mod that raised each in-flight `$.tool.call`, by call id, so the pipeline raises `tool.call` from it. */
|
|
49
|
+
readonly callOrigins: Map<string, LoadedMod>;
|
|
50
|
+
/** Names of commands mods registered, for `$.command.list` sources. */
|
|
51
|
+
readonly modCommands: Set<string>;
|
|
52
|
+
/** Full names of tools mods registered, whose calls a `tool.call` hook may answer with a successful result. */
|
|
53
|
+
readonly modTools: Set<string>;
|
|
54
|
+
/** Redraw a session's band after a `$.ui` call that changes what it shows; absent when no surface is drawn. */
|
|
55
|
+
readonly redraw?: (sessionId: string) => void;
|
|
56
|
+
/** Note a prompt a mod submitted, so the `prompt.submit` it raises carries the mod as its origin. */
|
|
57
|
+
readonly submitted?: (messageId: string, mod: string) => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Project one tool outcome onto Claude Code's `tool.call` result.
|
|
61
|
+
* @param result - the harness tool outcome.
|
|
62
|
+
* @returns its text as `result`, with `isError` on a failure.
|
|
63
|
+
*/
|
|
64
|
+
export declare function toolCallResultOf(result: ToolExecutionResult): ToolCallResult;
|
|
65
|
+
/**
|
|
66
|
+
* Build the op table over the composed harness services.
|
|
67
|
+
* @param options - the context, aliases, limits, and registration tracking.
|
|
68
|
+
* @returns engine behaviors by event name.
|
|
69
|
+
*/
|
|
70
|
+
export declare function createHostOps(options: HostOpsOptions): OpTable<AgentBinding>;
|
|
71
|
+
export type { ModsEngine };
|
|
72
|
+
//# sourceMappingURL=host-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-ops.d.ts","sourceRoot":"","sources":["../src/host-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAc/C,OAAO,KAAK,EAAkB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAO9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAa,OAAO,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAUV,cAAc,EAEd,cAAc,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,8FAA8F;AAC9F,MAAM,WAAW,YAAY;IAC3B,QAAQ,C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