@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
|
@@ -2,23 +2,30 @@
|
|
|
2
2
|
* Session-projection seam: drive registry + dual type tables.
|
|
3
3
|
* No Cordis — Host Face (or any carrier) owns wiring; domains register pure units.
|
|
4
4
|
*/
|
|
5
|
+
import { assertLosslessJson } from "@xrkseek/protocol";
|
|
5
6
|
function eraseDefinition(definition) {
|
|
6
7
|
const wire = definition.wire;
|
|
8
|
+
const parseState = definition.parseState === undefined
|
|
9
|
+
? undefined
|
|
10
|
+
: (value) => definition.parseState(value);
|
|
7
11
|
if (wire) {
|
|
8
12
|
return {
|
|
9
13
|
key: definition.key,
|
|
10
14
|
stateVersion: definition.stateVersion,
|
|
11
15
|
wired: true,
|
|
16
|
+
summary: wire.summary === true,
|
|
12
17
|
init: () => definition.init(),
|
|
13
18
|
apply: (state, event, seq) => definition.apply(state, event, seq),
|
|
14
19
|
view: (state) => wire.view(state),
|
|
15
20
|
parse: (value) => wire.parse(value),
|
|
21
|
+
...(parseState !== undefined ? { parseState } : {}),
|
|
16
22
|
};
|
|
17
23
|
}
|
|
18
24
|
return {
|
|
19
25
|
key: definition.key,
|
|
20
26
|
stateVersion: definition.stateVersion,
|
|
21
27
|
wired: false,
|
|
28
|
+
summary: false,
|
|
22
29
|
init: () => definition.init(),
|
|
23
30
|
apply: (state, event, seq) => definition.apply(state, event, seq),
|
|
24
31
|
view: () => {
|
|
@@ -27,13 +34,57 @@ function eraseDefinition(definition) {
|
|
|
27
34
|
parse: () => {
|
|
28
35
|
throw new Error(`projection ${JSON.stringify(definition.key)} is host-only (no wire)`);
|
|
29
36
|
},
|
|
37
|
+
...(parseState !== undefined ? { parseState } : {}),
|
|
30
38
|
};
|
|
31
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Detach + optional {@link ProjectionDefinition.parseState}.
|
|
42
|
+
* `undefined` → treat the checkpoint row as missing.
|
|
43
|
+
*/
|
|
44
|
+
function materializeCheckpointState(def, raw) {
|
|
45
|
+
try {
|
|
46
|
+
const detached = structuredClone(raw);
|
|
47
|
+
return def.parseState !== undefined ? def.parseState(detached) : detached;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Wire-view equality for the change feed (DSH compares view, not state ref).
|
|
55
|
+
* Primitives use `Object.is`; plain JSON uses stable `JSON.stringify`.
|
|
56
|
+
*/
|
|
57
|
+
function projectionViewEquals(a, b) {
|
|
58
|
+
if (Object.is(a, b))
|
|
59
|
+
return true;
|
|
60
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
32
70
|
export function createSessionProjectionRegistry(options) {
|
|
33
71
|
const registrations = new Map();
|
|
34
72
|
const listeners = new Set();
|
|
35
73
|
const sidecars = new Map();
|
|
36
74
|
const eventLogCache = new Map();
|
|
75
|
+
let summaryKeySet;
|
|
76
|
+
function invalidateSummaryKeys() {
|
|
77
|
+
summaryKeySet = undefined;
|
|
78
|
+
}
|
|
79
|
+
function deriveSummaryKeys() {
|
|
80
|
+
const keys = new Set();
|
|
81
|
+
for (const registration of registrations.values()) {
|
|
82
|
+
if (registration.def.wired && registration.def.summary) {
|
|
83
|
+
keys.add(registration.def.key);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return keys;
|
|
87
|
+
}
|
|
37
88
|
function eventsFor(sessionId) {
|
|
38
89
|
const fresh = options.getEvents(sessionId);
|
|
39
90
|
const cached = eventLogCache.get(sessionId);
|
|
@@ -92,17 +143,22 @@ export function createSessionProjectionRegistry(options) {
|
|
|
92
143
|
throw new Error(`projection ${JSON.stringify(definition.key)} stateVersion must be a non-negative integer`);
|
|
93
144
|
}
|
|
94
145
|
const key = definition.key;
|
|
146
|
+
const erased = eraseDefinition(definition);
|
|
95
147
|
const existing = registrations.get(key);
|
|
96
148
|
if (existing === undefined) {
|
|
97
149
|
registrations.set(key, {
|
|
98
|
-
def:
|
|
150
|
+
def: erased,
|
|
99
151
|
cells: new Map(),
|
|
100
152
|
refs: 1,
|
|
101
153
|
});
|
|
154
|
+
invalidateSummaryKeys();
|
|
102
155
|
}
|
|
103
156
|
else {
|
|
104
|
-
if (existing.def.stateVersion !==
|
|
105
|
-
throw new Error(`projection key ${JSON.stringify(key)} already registered at stateVersion ${existing.def.stateVersion}; refusing ${
|
|
157
|
+
if (existing.def.stateVersion !== erased.stateVersion) {
|
|
158
|
+
throw new Error(`projection key ${JSON.stringify(key)} already registered at stateVersion ${existing.def.stateVersion}; refusing ${erased.stateVersion}`);
|
|
159
|
+
}
|
|
160
|
+
if (existing.def.summary !== erased.summary) {
|
|
161
|
+
throw new Error(`projection key ${JSON.stringify(key)} already registered with summary=${String(existing.def.summary)}; refusing to share it with summary=${String(erased.summary)}`);
|
|
106
162
|
}
|
|
107
163
|
existing.refs += 1;
|
|
108
164
|
}
|
|
@@ -115,8 +171,10 @@ export function createSessionProjectionRegistry(options) {
|
|
|
115
171
|
if (live === undefined)
|
|
116
172
|
return;
|
|
117
173
|
live.refs -= 1;
|
|
118
|
-
if (live.refs === 0)
|
|
174
|
+
if (live.refs === 0) {
|
|
119
175
|
registrations.delete(key);
|
|
176
|
+
invalidateSummaryKeys();
|
|
177
|
+
}
|
|
120
178
|
};
|
|
121
179
|
},
|
|
122
180
|
onChanged(listener) {
|
|
@@ -126,7 +184,9 @@ export function createSessionProjectionRegistry(options) {
|
|
|
126
184
|
};
|
|
127
185
|
},
|
|
128
186
|
drive(sessionId, event, seq) {
|
|
129
|
-
eventLogCache
|
|
187
|
+
// Do not clear `eventLogCache` first: that skipped the identity guard in
|
|
188
|
+
// `eventsFor` and let recreate/truncate keep stale cells when the first
|
|
189
|
+
// touch after a new log was `drive` (not `snapshot`).
|
|
130
190
|
const all = eventsFor(sessionId);
|
|
131
191
|
for (const registration of registrations.values()) {
|
|
132
192
|
let cell = registration.cells.get(sessionId);
|
|
@@ -139,12 +199,16 @@ export function createSessionProjectionRegistry(options) {
|
|
|
139
199
|
// (SQLite open-turn repair on hydrate).
|
|
140
200
|
catchUpCell(registration.def, cell, all, seq - 1);
|
|
141
201
|
}
|
|
142
|
-
const
|
|
143
|
-
const
|
|
202
|
+
const prev = cell.state;
|
|
203
|
+
const next = registration.def.apply(prev, event, seq);
|
|
204
|
+
const stateChanged = !Object.is(next, prev);
|
|
144
205
|
cell.state = next;
|
|
145
206
|
cell.observedSeq = seq;
|
|
146
|
-
if (
|
|
207
|
+
if (stateChanged && registration.def.wired && listeners.size > 0) {
|
|
147
208
|
const value = registration.def.parse(registration.def.view(next));
|
|
209
|
+
const previous = registration.def.parse(registration.def.view(prev));
|
|
210
|
+
if (projectionViewEquals(previous, value))
|
|
211
|
+
continue;
|
|
148
212
|
for (const listener of listeners) {
|
|
149
213
|
listener(sessionId, registration.def.key, value, seq);
|
|
150
214
|
}
|
|
@@ -157,14 +221,23 @@ export function createSessionProjectionRegistry(options) {
|
|
|
157
221
|
? new Set(snapshotOptions.keys)
|
|
158
222
|
: undefined;
|
|
159
223
|
const values = {};
|
|
160
|
-
|
|
224
|
+
// `asOfSeq` is the LOWEST watermark across the wired units: every value
|
|
225
|
+
// in the snapshot is current as of at least that seq. Claiming the max
|
|
226
|
+
// would advertise the freshest unit's position for the whole snapshot,
|
|
227
|
+
// and the client seeds its incremental baseline from this number —
|
|
228
|
+
// `projection-store` drops rows with `seq > asOfSeq`, so the rows
|
|
229
|
+
// between the true watermark and the claimed one are skipped and that
|
|
230
|
+
// key stays frozen on a stale value.
|
|
231
|
+
let asOfSeq;
|
|
161
232
|
for (const registration of registrations.values()) {
|
|
162
233
|
if (!registration.def.wired)
|
|
163
234
|
continue;
|
|
164
235
|
if (keyFilter && !keyFilter.has(registration.def.key))
|
|
165
236
|
continue;
|
|
166
237
|
const cell = cellFor(registration, sessionId);
|
|
167
|
-
asOfSeq =
|
|
238
|
+
asOfSeq = asOfSeq === undefined
|
|
239
|
+
? cell.observedSeq
|
|
240
|
+
: Math.min(asOfSeq, cell.observedSeq);
|
|
168
241
|
values[registration.def.key] = registration.def.parse(registration.def.view(cell.state));
|
|
169
242
|
}
|
|
170
243
|
const extra = sidecars.get(sessionId);
|
|
@@ -175,7 +248,9 @@ export function createSessionProjectionRegistry(options) {
|
|
|
175
248
|
values[key] = value;
|
|
176
249
|
}
|
|
177
250
|
}
|
|
178
|
-
|
|
251
|
+
// No wired unit (or every one filtered out): the log tail is the honest
|
|
252
|
+
// watermark, -1 for an empty log.
|
|
253
|
+
return { asOfSeq: asOfSeq ?? (events.length === 0 ? -1 : events.length), values };
|
|
179
254
|
},
|
|
180
255
|
stateOf(sessionId, key) {
|
|
181
256
|
const registration = registrations.get(key);
|
|
@@ -203,8 +278,11 @@ export function createSessionProjectionRegistry(options) {
|
|
|
203
278
|
const row = checkpoint[def.key];
|
|
204
279
|
if (row === undefined || row.ver !== def.stateVersion)
|
|
205
280
|
continue;
|
|
281
|
+
const state = materializeCheckpointState(def, row.val);
|
|
282
|
+
if (state === undefined)
|
|
283
|
+
continue;
|
|
206
284
|
try {
|
|
207
|
-
values[def.key] = def.parse(def.view(
|
|
285
|
+
values[def.key] = def.parse(def.view(state));
|
|
208
286
|
}
|
|
209
287
|
catch {
|
|
210
288
|
// malformed row → omit key (cold consumer refolds)
|
|
@@ -219,15 +297,19 @@ export function createSessionProjectionRegistry(options) {
|
|
|
219
297
|
for (const registration of registrations.values()) {
|
|
220
298
|
const def = registration.def;
|
|
221
299
|
const row = checkpoint[def.key];
|
|
222
|
-
const
|
|
300
|
+
const rangeOk = row !== undefined &&
|
|
223
301
|
row.ver === def.stateVersion &&
|
|
224
302
|
row.seq >= baseSeq - 1 &&
|
|
225
303
|
row.seq <= endSeq;
|
|
304
|
+
const seeded = rangeOk
|
|
305
|
+
? materializeCheckpointState(def, row.val)
|
|
306
|
+
: undefined;
|
|
307
|
+
const usable = seeded !== undefined;
|
|
226
308
|
if (!usable && baseSeq > 0) {
|
|
227
309
|
throw new Error(`session projection ${JSON.stringify(def.key)} cannot restore from seq ${baseSeq}: ` +
|
|
228
|
-
"its checkpoint row is missing, version-mismatched, or beyond the supplied log end; re-read from seq 0");
|
|
310
|
+
"its checkpoint row is missing, version-mismatched, schema-invalid, or beyond the supplied log end; re-read from seq 0");
|
|
229
311
|
}
|
|
230
|
-
let state = usable ?
|
|
312
|
+
let state = usable ? seeded : def.init();
|
|
231
313
|
const from = usable ? row.seq : baseSeq - 1;
|
|
232
314
|
for (let i = 0; i < events.length; i++) {
|
|
233
315
|
const seq = baseSeq + i;
|
|
@@ -239,7 +321,7 @@ export function createSessionProjectionRegistry(options) {
|
|
|
239
321
|
refreshed[def.key] = {
|
|
240
322
|
ver: def.stateVersion,
|
|
241
323
|
seq: endSeq,
|
|
242
|
-
val: state,
|
|
324
|
+
val: assertLosslessJson(state, `projection ${JSON.stringify(def.key)}`),
|
|
243
325
|
};
|
|
244
326
|
}
|
|
245
327
|
return {
|
|
@@ -247,6 +329,32 @@ export function createSessionProjectionRegistry(options) {
|
|
|
247
329
|
checkpoint: refreshed,
|
|
248
330
|
};
|
|
249
331
|
},
|
|
332
|
+
seedFromCheckpoint(sessionId, checkpoint, options) {
|
|
333
|
+
const events = eventsFor(sessionId);
|
|
334
|
+
const wanted = options?.keys === undefined ? undefined : new Set(options.keys);
|
|
335
|
+
for (const registration of registrations.values()) {
|
|
336
|
+
if (wanted !== undefined && !wanted.has(registration.def.key))
|
|
337
|
+
continue;
|
|
338
|
+
if (registration.cells.has(sessionId))
|
|
339
|
+
continue;
|
|
340
|
+
const row = checkpoint[registration.def.key];
|
|
341
|
+
if (row === undefined
|
|
342
|
+
|| row.ver !== registration.def.stateVersion
|
|
343
|
+
|| row.seq < 0
|
|
344
|
+
|| row.seq > events.length) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
const state = materializeCheckpointState(registration.def, row.val);
|
|
348
|
+
if (state === undefined)
|
|
349
|
+
continue;
|
|
350
|
+
const cell = {
|
|
351
|
+
state,
|
|
352
|
+
observedSeq: row.seq,
|
|
353
|
+
};
|
|
354
|
+
catchUpCell(registration.def, cell, events, events.length);
|
|
355
|
+
registration.cells.set(sessionId, cell);
|
|
356
|
+
}
|
|
357
|
+
},
|
|
250
358
|
checkpoint(sessionId, options) {
|
|
251
359
|
const rows = {};
|
|
252
360
|
// Key filtering matters: `cellFor` folds the whole log for a unit that
|
|
@@ -261,7 +369,7 @@ export function createSessionProjectionRegistry(options) {
|
|
|
261
369
|
rows[registration.def.key] = {
|
|
262
370
|
ver: registration.def.stateVersion,
|
|
263
371
|
seq: cell.observedSeq,
|
|
264
|
-
val:
|
|
372
|
+
val: assertLosslessJson(cell.state, `projection ${JSON.stringify(registration.def.key)}`),
|
|
265
373
|
};
|
|
266
374
|
}
|
|
267
375
|
return rows;
|
|
@@ -274,6 +382,10 @@ export function createSessionProjectionRegistry(options) {
|
|
|
274
382
|
}
|
|
275
383
|
return [...new Set([...registrations.keys(), ...extra])];
|
|
276
384
|
},
|
|
385
|
+
summaryKeys() {
|
|
386
|
+
summaryKeySet ??= deriveSummaryKeys();
|
|
387
|
+
return summaryKeySet;
|
|
388
|
+
},
|
|
277
389
|
setSidecar(sessionId, key, value, seq) {
|
|
278
390
|
let map = sidecars.get(sessionId);
|
|
279
391
|
if (value === undefined) {
|
|
@@ -297,13 +409,17 @@ export function createSessionProjectionRegistry(options) {
|
|
|
297
409
|
if (registration === undefined)
|
|
298
410
|
return;
|
|
299
411
|
const cell = cellFor(registration, sessionId);
|
|
300
|
-
const
|
|
301
|
-
|
|
412
|
+
const prev = cell.state;
|
|
413
|
+
const next = patch(prev);
|
|
414
|
+
if (Object.is(next, prev))
|
|
302
415
|
return;
|
|
303
416
|
cell.state = next;
|
|
304
417
|
if (!registration.def.wired || listeners.size === 0)
|
|
305
418
|
return;
|
|
306
419
|
const value = registration.def.parse(registration.def.view(next));
|
|
420
|
+
const previous = registration.def.parse(registration.def.view(prev));
|
|
421
|
+
if (projectionViewEquals(previous, value))
|
|
422
|
+
return;
|
|
307
423
|
for (const listener of listeners) {
|
|
308
424
|
listener(sessionId, key, value, cell.observedSeq);
|
|
309
425
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoKH,SAAS,eAAe,CACtB,UAAyC;IAEzC,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAC7B,IAAI,IAAI,EAAE,CAAC;QACT,OAAO;YACL,GAAG,EAAE,UAAU,CAAC,GAAG;YACnB,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;YAC7B,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,KAAU,EAAE,KAAK,EAAE,GAAG,CAAC;YACtE,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAU,CAAC;YACtC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;SACpC,CAAC;IACJ,CAAC;IACD,OAAO;QACL,GAAG,EAAE,UAAU,CAAC,GAAG;QACnB,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;QAC7B,KAAK,E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AAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACrE,IAAI,oBAAoB,CAAC,QAAQ,EAAE,KAAK,CAAC;gBAAE,OAAO;YAClD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;QAED,YAAY,CAAC,SAAS;YACpB,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,KAAK,MAAM,YAAY,IAAI,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClD,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YACvC,CAAC;YACD,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @xrkseek/session-telemetry
|
|
2
|
-
|
|
3
|
-
OpenTelemetry session-telemetry seam (capture + OTLP/HTTP logs export).
|
|
4
|
-
|
|
5
|
-
- **Definition**: `SessionTelemetrySink` (`emit` · optional `flush` · `shutdown`)
|
|
6
|
-
- **Provider**: memory sink · OTLP/HTTP JSON logs (no OTel SDK dependency)
|
|
7
|
-
- **Consumer**: `wrapStoreForSessionTelemetry` mirrors session appends (DSH-style live capture)
|
|
8
|
-
|
|
9
|
-
Env: `XRK_TELEMETRY=memory` | `XRK_TELEMETRY=1` + OTLP endpoint (`XRK_TELEMETRY_OTLP_ENDPOINT` / `OTEL_EXPORTER_OTLP_*`).
|
|
10
|
-
|
|
11
|
-
See [docs/session-telemetry.md](../../../docs/session-telemetry.md).
|
|
1
|
+
# @xrkseek/session-telemetry
|
|
2
|
+
|
|
3
|
+
OpenTelemetry session-telemetry seam (capture + OTLP/HTTP logs export).
|
|
4
|
+
|
|
5
|
+
- **Definition**: `SessionTelemetrySink` (`emit` · optional `flush` · `shutdown`)
|
|
6
|
+
- **Provider**: memory sink · OTLP/HTTP JSON logs (no OTel SDK dependency)
|
|
7
|
+
- **Consumer**: `wrapStoreForSessionTelemetry` mirrors session appends (DSH-style live capture)
|
|
8
|
+
|
|
9
|
+
Env: `XRK_TELEMETRY=memory` | `XRK_TELEMETRY=1` + OTLP endpoint (`XRK_TELEMETRY_OTLP_ENDPOINT` / `OTEL_EXPORTER_OTLP_*`).
|
|
10
|
+
|
|
11
|
+
See [docs/session-telemetry.md](../../../docs/session-telemetry.md).
|
|
@@ -5,6 +5,7 @@ export { opsRecord, recordFromSessionEvent, } from "./record.js";
|
|
|
5
5
|
export { createMemorySessionTelemetrySink, type MemorySessionTelemetryOptions, } from "./memory.js";
|
|
6
6
|
export { createOtlpHttpSessionTelemetrySink, resolveOtlpLogsEndpoint, type OtlpFetch, type OtlpHttpSessionTelemetryOptions, } from "./otlp-http.js";
|
|
7
7
|
export { wrapStoreForSessionTelemetry, type WrapStoreForSessionTelemetryOptions, } from "./wrap-store.js";
|
|
8
|
+
export { applyRedaction, basicRedactionRule, type RedactionRule, } from "./redact.js";
|
|
8
9
|
/** Face `session-telemetry` product shape (Settings SoT). */
|
|
9
10
|
export type SessionTelemetryMode = "off" | "memory" | "otlp";
|
|
10
11
|
export interface SessionTelemetryProductConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EACL,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB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;CAC5B;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACjD,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,yFAAyF;AACzF,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,OAAO,GACX,6BAA6B,GAAG,SAAS,CAgB3C;AAED,wBAAgB,kCAAkC,CAChD,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,CAAC,EAAE,6BAA6B,GACtC,MAAM,CA+BR;AA4BD;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CACjD,OAAO,GAAE,oCAAyC,GACjD,6BAA6B,CA8D/B"}
|
|
@@ -5,6 +5,7 @@ export { opsRecord, recordFromSessionEvent, } from "./record.js";
|
|
|
5
5
|
export { createMemorySessionTelemetrySink, } from "./memory.js";
|
|
6
6
|
export { createOtlpHttpSessionTelemetrySink, resolveOtlpLogsEndpoint, } from "./otlp-http.js";
|
|
7
7
|
export { wrapStoreForSessionTelemetry, } from "./wrap-store.js";
|
|
8
|
+
export { applyRedaction, basicRedactionRule, } from "./redact.js";
|
|
8
9
|
/** Parse a Face `session-telemetry` namespace value (unknown → product or undefined). */
|
|
9
10
|
export function parseSessionTelemetryProduct(raw) {
|
|
10
11
|
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],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|
4
|
+
* Throwing from a rule is treated as drop.
|
|
5
|
+
*/
|
|
6
|
+
export type RedactionRule = (record: SessionTelemetryRecord) => SessionTelemetryRecord | undefined;
|
|
7
|
+
/** Default rule: strip prompt/tool payload text; keep type/structure + lengths. */
|
|
8
|
+
export declare function basicRedactionRule(record: SessionTelemetryRecord): SessionTelemetryRecord;
|
|
9
|
+
/**
|
|
10
|
+
* Apply rules in order. Any throw or `undefined` return drops the record
|
|
11
|
+
* (caller must not emit).
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyRedaction(record: SessionTelemetryRecord, rules: readonly RedactionRule[]): SessionTelemetryRecord | undefined;
|
|
14
|
+
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,MAAM,EAAE,sBAAsB,KAC3B,sBAAsB,GAAG,SAAS,CAAC;AAiCxC,mFAAmF;AACnF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAMxB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,KAAK,EAAE,SAAS,aAAa,EAAE,GAC9B,sBAAsB,GAAG,SAAS,CAWpC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const BODY_TEXT_KEYS = new Set([
|
|
2
|
+
"content",
|
|
3
|
+
"text",
|
|
4
|
+
"args",
|
|
5
|
+
"result",
|
|
6
|
+
"input",
|
|
7
|
+
"output",
|
|
8
|
+
"prompt",
|
|
9
|
+
"message",
|
|
10
|
+
"delta",
|
|
11
|
+
"chunks",
|
|
12
|
+
]);
|
|
13
|
+
function redactValue(value) {
|
|
14
|
+
if (value === null || value === undefined)
|
|
15
|
+
return value;
|
|
16
|
+
if (typeof value === "string") {
|
|
17
|
+
return { elided: true, bytes: Buffer.byteLength(value, "utf8") };
|
|
18
|
+
}
|
|
19
|
+
if (Array.isArray(value)) {
|
|
20
|
+
return value.map((item) => redactValue(item));
|
|
21
|
+
}
|
|
22
|
+
if (typeof value === "object") {
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const [k, v] of Object.entries(value)) {
|
|
25
|
+
out[k] = BODY_TEXT_KEYS.has(k) ? redactValue(v) : v;
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
/** Default rule: strip prompt/tool payload text; keep type/structure + lengths. */
|
|
32
|
+
export function basicRedactionRule(record) {
|
|
33
|
+
if (record.channel !== "ledger")
|
|
34
|
+
return record;
|
|
35
|
+
return {
|
|
36
|
+
...record,
|
|
37
|
+
body: redactValue(record.body),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Apply rules in order. Any throw or `undefined` return drops the record
|
|
42
|
+
* (caller must not emit).
|
|
43
|
+
*/
|
|
44
|
+
export function applyRedaction(record, rules) {
|
|
45
|
+
let current = record;
|
|
46
|
+
for (const rule of rules) {
|
|
47
|
+
if (!current)
|
|
48
|
+
return undefined;
|
|
49
|
+
try {
|
|
50
|
+
current = rule(current);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return current;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=redact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAUA,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAA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AAC;IACzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAC/B,IAAI,CAAC;YACH,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { SessionStore } from "@xrkseek/core-session";
|
|
2
|
+
import { type RedactionRule } from "./redact.js";
|
|
2
3
|
import type { SessionTelemetrySink } from "./types.js";
|
|
3
4
|
export interface WrapStoreForSessionTelemetryOptions {
|
|
4
5
|
readonly store: SessionStore;
|
|
5
6
|
readonly sink: SessionTelemetrySink;
|
|
6
7
|
/** When set, only this sessionId is exported (composition-scoped). */
|
|
7
8
|
readonly sessionId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Redaction waterfall applied before `sink.emit`.
|
|
11
|
+
* Default: `[basicRedactionRule]` (strip prompt/tool payload text).
|
|
12
|
+
* Pass `[]` to disable (tests / trusted memory sink only).
|
|
13
|
+
*/
|
|
14
|
+
readonly redactionRules?: readonly RedactionRule[];
|
|
8
15
|
}
|
|
9
16
|
/**
|
|
10
17
|
* Live capture: mirror each append into the telemetry sink (non-blocking).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap-store.d.ts","sourceRoot":"","sources":["../src/wrap-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"wrap-store.d.ts","sourceRoot":"","sources":["../src/wrap-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CACpD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mCAAmC,GAC3C,YAAY,CA2Ed"}
|
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
import { opsRecord, recordFromSessionEvent } from "./record.js";
|
|
2
|
+
import { applyRedaction, basicRedactionRule, } from "./redact.js";
|
|
2
3
|
/**
|
|
3
4
|
* Live capture: mirror each append into the telemetry sink (non-blocking).
|
|
4
5
|
* Never throws to the agent loop — sink/record failures are contained.
|
|
5
6
|
*/
|
|
6
7
|
export function wrapStoreForSessionTelemetry(options) {
|
|
7
8
|
const { store, sink } = options;
|
|
8
|
-
const
|
|
9
|
-
|
|
9
|
+
const redactionRules = options.redactionRules ?? [basicRedactionRule];
|
|
10
|
+
/**
|
|
11
|
+
* Mirror one optional store verb only when the wrapped store has it.
|
|
12
|
+
*
|
|
13
|
+
* Face gates `session.truncate` on `typeof store.replacePrefix === 'function'`
|
|
14
|
+
* and archived-session deletion on `store.delete`, so a wrapper that drops
|
|
15
|
+
* them turns every edit / delete / regenerate into `truncate-unsupported`
|
|
16
|
+
* the moment telemetry is switched on. Spreading the verb keeps the
|
|
17
|
+
* "absent means unsupported" contract instead of faking it with a stub.
|
|
18
|
+
*/
|
|
19
|
+
const forwardOptional = (key) => {
|
|
20
|
+
const fn = store[key];
|
|
21
|
+
if (typeof fn !== "function")
|
|
22
|
+
return {};
|
|
23
|
+
// Computed-key object is wider than Partial<Pick<…>>; assert at the return.
|
|
24
|
+
return {
|
|
25
|
+
[key]: fn.bind(store),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const emitFor = (id, event, seq) => {
|
|
10
29
|
if (options.sessionId !== undefined && id !== options.sessionId)
|
|
11
30
|
return;
|
|
12
31
|
try {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
const raw = recordFromSessionEvent(id, event, seq);
|
|
33
|
+
const redacted = applyRedaction(raw, redactionRules);
|
|
34
|
+
if (!redacted)
|
|
35
|
+
return;
|
|
36
|
+
sink.emit(redacted);
|
|
16
37
|
if (event.type === "turn/end") {
|
|
17
38
|
sink.flush?.();
|
|
18
39
|
}
|
|
@@ -22,6 +43,20 @@ export function wrapStoreForSessionTelemetry(options) {
|
|
|
22
43
|
}
|
|
23
44
|
};
|
|
24
45
|
return {
|
|
46
|
+
...forwardOptional("seed"),
|
|
47
|
+
...forwardOptional("seedFromSession"),
|
|
48
|
+
...forwardOptional("replacePrefix"),
|
|
49
|
+
...forwardOptional("delete"),
|
|
50
|
+
...forwardOptional("reclaimStorage"),
|
|
51
|
+
...forwardOptional("offloadToArchive"),
|
|
52
|
+
...forwardOptional("restoreFromArchive"),
|
|
53
|
+
...forwardOptional("isOffloaded"),
|
|
54
|
+
...forwardOptional("listHints"),
|
|
55
|
+
...forwardOptional("isLoaded"),
|
|
56
|
+
...forwardOptional("readEventsTail"),
|
|
57
|
+
...forwardOptional("scanDurableSingles"),
|
|
58
|
+
...forwardOptional("flush"),
|
|
59
|
+
...forwardOptional("releaseResident"),
|
|
25
60
|
create: (id) => {
|
|
26
61
|
const rec = store.create(id);
|
|
27
62
|
try {
|
|
@@ -36,15 +71,11 @@ export function wrapStoreForSessionTelemetry(options) {
|
|
|
36
71
|
has: (id) => store.has(id),
|
|
37
72
|
list: () => store.list(),
|
|
38
73
|
readEvents: (id, from, to) => store.readEvents(id, from, to),
|
|
39
|
-
...(store.listHints
|
|
40
|
-
? { listHints: (id) => store.listHints(id) }
|
|
41
|
-
: {}),
|
|
42
|
-
...(store.isLoaded
|
|
43
|
-
? { isLoaded: (id) => store.isLoaded(id) }
|
|
44
|
-
: {}),
|
|
45
74
|
append(id, event) {
|
|
46
75
|
const logged = store.append(id, event);
|
|
47
|
-
|
|
76
|
+
// Face seq = 1-based index in full log (same clock as session.history).
|
|
77
|
+
const seq = store.readEvents(id).length;
|
|
78
|
+
emitFor(id, logged, seq);
|
|
48
79
|
return logged;
|
|
49
80
|
},
|
|
50
81
|
};
|