@xrkseek/harness 0.4.0-rc.4 → 0.4.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/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/README.md +88 -0
- package/node_modules/@xrkseek/checkpoint/dist/index.d.ts +5 -0
- package/node_modules/@xrkseek/checkpoint/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/index.js +5 -0
- package/node_modules/@xrkseek/checkpoint/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/json-file.d.ts +5 -0
- package/node_modules/@xrkseek/checkpoint/dist/json-file.d.ts.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/json-file.js +29 -0
- package/node_modules/@xrkseek/checkpoint/dist/json-file.js.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts +8 -0
- package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/process-git.js +40 -0
- package/node_modules/@xrkseek/checkpoint/dist/process-git.js.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +101 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.js +312 -0
- package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts +65 -0
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/checkpoint/dist/types.js +18 -0
- package/node_modules/@xrkseek/checkpoint/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/checkpoint/package.json +23 -0
- package/node_modules/@xrkseek/code-runtime/README.md +11 -4
- package/node_modules/@xrkseek/code-runtime/dist/index.d.ts +43 -3
- package/node_modules/@xrkseek/code-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/code-runtime/dist/index.js +209 -7
- package/node_modules/@xrkseek/code-runtime/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/context-fragments/README.md +28 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts +104 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.js +192 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/context-fragments/package.json +27 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +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 +7 -4
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/invariant.d.ts +11 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/invariant.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/invariant.js +21 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/invariant.js.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.d.ts +7 -5
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.js +24 -109
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/package.json +7 -0
- package/node_modules/@xrkseek/core-session/README.md +3 -1
- package/node_modules/@xrkseek/core-session/dist/invariant.d.ts +18 -0
- package/node_modules/@xrkseek/core-session/dist/invariant.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/invariant.js +114 -0
- package/node_modules/@xrkseek/core-session/dist/invariant.js.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts +2 -1
- package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/session-interchange.js +6 -1
- package/node_modules/@xrkseek/core-session/dist/session-interchange.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +37 -23
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
- package/node_modules/@xrkseek/core-session/package.json +33 -26
- package/node_modules/@xrkseek/core-system-prompt/README.md +7 -7
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts +55 -3
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js +107 -11
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/guards.d.ts +9 -1
- package/node_modules/@xrkseek/core-tools/dist/guards.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/guards.js +53 -9
- package/node_modules/@xrkseek/core-tools/dist/guards.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.js +2 -1
- package/node_modules/@xrkseek/core-tools/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts +5 -0
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js +12 -0
- package/node_modules/@xrkseek/core-tools/dist/session-query-prompt.js.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js +6 -2
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/README.md +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js +7 -5
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts +14 -3
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js +22 -8
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/keys.d.ts +10 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/keys.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/keys.js +89 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/keys.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts +3 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js +12 -8
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +138 -2
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/README.md +12 -9
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.d.ts +32 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.js +203 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-apply.js.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.d.ts +52 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.js +260 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch-parser.js.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch.d.ts +27 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch.js +69 -0
- package/node_modules/@xrkseek/exec-fs/dist/apply-patch.js.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +6 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +72 -3
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/present.d.ts +4 -0
- package/node_modules/@xrkseek/exec-fs/dist/present.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/present.js +25 -0
- package/node_modules/@xrkseek/exec-fs/dist/present.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js +10 -6
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +15 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js +14 -7
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +6 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js +14 -8
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/README.md +5 -3
- package/node_modules/@xrkseek/exec-memory/dist/http.d.ts +42 -0
- package/node_modules/@xrkseek/exec-memory/dist/http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/http.js +232 -0
- package/node_modules/@xrkseek/exec-memory/dist/http.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts +5 -2
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/index.js +3 -1
- package/node_modules/@xrkseek/exec-memory/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts +19 -0
- package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/provider.js +8 -0
- package/node_modules/@xrkseek/exec-memory/dist/provider.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts +25 -0
- package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/resolve.js +46 -0
- package/node_modules/@xrkseek/exec-memory/dist/resolve.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.d.ts +8 -4
- package/node_modules/@xrkseek/exec-memory/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/store.js +6 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/tools.js +12 -9
- package/node_modules/@xrkseek/exec-memory/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts +17 -6
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js +81 -20
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/package.json +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.d.ts +24 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js +118 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/hardline.d.ts +24 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/hardline.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/hardline.js +93 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/hardline.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts +3 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js +3 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +17 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +47 -5
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/service.js +2 -5
- package/node_modules/@xrkseek/exec-sandbox/dist/service.js.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/README.md +16 -16
- package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts +10 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/config.js +50 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.js.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/fs.js +18 -1
- package/node_modules/@xrkseek/exec-ssh/dist/fs.js.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/index.js +1 -1
- package/node_modules/@xrkseek/exec-ssh/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts +15 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js +14 -9
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts +6 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +14 -10
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/README.md +25 -25
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts +16 -3
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/index.js +14 -8
- package/node_modules/@xrkseek/exec-voice/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts +26 -0
- package/node_modules/@xrkseek/exec-voice/dist/readiness.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/readiness.js +69 -0
- package/node_modules/@xrkseek/exec-voice/dist/readiness.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts +4 -1
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-voice/dist/tools.js +3 -14
- package/node_modules/@xrkseek/exec-voice/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/README.md +11 -11
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts +22 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js +32 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.d.ts +21 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.js +52 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-runtime-registry.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts +2 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js +3 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts +9 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +34 -15
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts +7 -0
- package/node_modules/@xrkseek/exec-web/dist/fetch-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/fetch-http.js +8 -2
- package/node_modules/@xrkseek/exec-web/dist/fetch-http.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/format.js +4 -3
- package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts +4 -2
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.js +8 -3
- package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.d.ts +46 -0
- package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.js +144 -0
- package/node_modules/@xrkseek/exec-web/dist/outbound-allowlist.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/url-policy.d.ts +6 -1
- package/node_modules/@xrkseek/exec-web/dist/url-policy.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/url-policy.js +5 -2
- package/node_modules/@xrkseek/exec-web/dist/url-policy.js.map +1 -1
- package/node_modules/@xrkseek/im-gateway-contract/README.md +50 -0
- package/node_modules/@xrkseek/im-gateway-contract/dist/index.d.ts +77 -0
- package/node_modules/@xrkseek/im-gateway-contract/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/im-gateway-contract/dist/index.js +120 -0
- package/node_modules/@xrkseek/im-gateway-contract/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/im-gateway-contract/examples/mock-sidecar.mjs +124 -0
- package/node_modules/@xrkseek/im-gateway-contract/package.json +25 -0
- package/node_modules/@xrkseek/mcp/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.js +1 -0
- package/node_modules/@xrkseek/mcp/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/oauth-product.d.ts +31 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-product.d.ts.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-product.js +72 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-product.js.map +1 -0
- package/node_modules/@xrkseek/policy/README.md +18 -15
- package/node_modules/@xrkseek/policy/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/policy/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/index.js +1 -0
- package/node_modules/@xrkseek/policy/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/permission-pre.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/permission-pre.js +1 -0
- package/node_modules/@xrkseek/policy/dist/permission-pre.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/security-guidance.d.ts +50 -0
- package/node_modules/@xrkseek/policy/dist/security-guidance.d.ts.map +1 -0
- package/node_modules/@xrkseek/policy/dist/security-guidance.js +262 -0
- package/node_modules/@xrkseek/policy/dist/security-guidance.js.map +1 -0
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +81 -7
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +307 -63
- 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 +53 -52
- package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js +7 -2
- 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/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js +19 -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/dist/json-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.js +3 -0
- package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +18 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js +30 -0
- package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
- package/node_modules/@xrkseek/runtime-invariants/README.md +28 -0
- package/node_modules/@xrkseek/runtime-invariants/dist/index.d.ts +94 -0
- package/node_modules/@xrkseek/runtime-invariants/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/runtime-invariants/dist/index.js +163 -0
- package/node_modules/@xrkseek/runtime-invariants/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/runtime-invariants/package.json +27 -0
- package/node_modules/@xrkseek/secrets/README.md +28 -0
- package/node_modules/@xrkseek/secrets/dist/index.d.ts +11 -0
- package/node_modules/@xrkseek/secrets/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/index.js +23 -0
- package/node_modules/@xrkseek/secrets/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/keyring.d.ts +10 -0
- package/node_modules/@xrkseek/secrets/dist/keyring.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/keyring.js +77 -0
- package/node_modules/@xrkseek/secrets/dist/keyring.js.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/memory.d.ts +4 -0
- package/node_modules/@xrkseek/secrets/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/memory.js +21 -0
- package/node_modules/@xrkseek/secrets/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/redact.d.ts +23 -0
- package/node_modules/@xrkseek/secrets/dist/redact.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/redact.js +38 -0
- package/node_modules/@xrkseek/secrets/dist/redact.js.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/resolve.d.ts +10 -0
- package/node_modules/@xrkseek/secrets/dist/resolve.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/resolve.js +24 -0
- package/node_modules/@xrkseek/secrets/dist/resolve.js.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/types.d.ts +27 -0
- package/node_modules/@xrkseek/secrets/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/secrets/dist/types.js +15 -0
- package/node_modules/@xrkseek/secrets/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/secrets/package.json +29 -0
- package/node_modules/@xrkseek/server-config/dist/index.d.ts +6 -0
- package/node_modules/@xrkseek/server-config/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.js +12 -0
- package/node_modules/@xrkseek/server-config/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-cron/README.md +1 -1
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts +10 -1
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/index.js +9 -2
- package/node_modules/@xrkseek/server-cron/dist/index.js.map +1 -1
- 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 +6 -2
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-output.d.ts +34 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-output.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-output.js +140 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-output.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts +13 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +67 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.d.ts +79 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.js +230 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-tasks.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/approval-category.d.ts +25 -0
- package/node_modules/@xrkseek/server-face/dist/approval-category.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/approval-category.js +108 -0
- package/node_modules/@xrkseek/server-face/dist/approval-category.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/approvals.d.ts +17 -0
- package/node_modules/@xrkseek/server-face/dist/approvals.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/approvals.js +50 -0
- package/node_modules/@xrkseek/server-face/dist/approvals.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +22 -0
- package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js +22 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js.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 +14 -2
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts +87 -2
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js +456 -32
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-round-driver.d.ts +48 -0
- package/node_modules/@xrkseek/server-face/dist/goal-round-driver.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/goal-round-driver.js +69 -0
- package/node_modules/@xrkseek/server-face/dist/goal-round-driver.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts +6 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.js +45 -9
- package/node_modules/@xrkseek/server-face/dist/goal-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-tools.d.ts +13 -0
- package/node_modules/@xrkseek/server-face/dist/goal-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/goal-tools.js +131 -0
- package/node_modules/@xrkseek/server-face/dist/goal-tools.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts +10 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js +156 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/checkpoint.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts +7 -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 +88 -2
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js +62 -3
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +19 -5
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +18 -4
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts +115 -0
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.js +330 -0
- package/node_modules/@xrkseek/server-face/dist/managed-worktree.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/mcp-oauth.d.ts +33 -0
- package/node_modules/@xrkseek/server-face/dist/mcp-oauth.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/mcp-oauth.js +352 -0
- package/node_modules/@xrkseek/server-face/dist/mcp-oauth.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts +15 -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 +26 -2
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/propose-skill.d.ts +20 -0
- package/node_modules/@xrkseek/server-face/dist/propose-skill.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/propose-skill.js +65 -0
- package/node_modules/@xrkseek/server-face/dist/propose-skill.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/ralph-tool.d.ts +33 -0
- package/node_modules/@xrkseek/server-face/dist/ralph-tool.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/ralph-tool.js +366 -0
- package/node_modules/@xrkseek/server-face/dist/ralph-tool.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/rollout-trace.d.ts +58 -0
- package/node_modules/@xrkseek/server-face/dist/rollout-trace.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/rollout-trace.js +194 -0
- package/node_modules/@xrkseek/server-face/dist/rollout-trace.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +7 -0
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +93 -4
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-export.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-export.js +74 -0
- package/node_modules/@xrkseek/server-face/dist/session-export.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts +23 -0
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.js +275 -0
- package/node_modules/@xrkseek/server-face/dist/session-query-tools.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +209 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.js +559 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +67 -0
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts +5 -0
- package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-document.js +69 -0
- package/node_modules/@xrkseek/server-face/dist/settings-document.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 +220 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.js +70 -16
- package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.js +4 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +14 -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 +614 -62
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js +7 -2
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/types.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js +11 -0
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +40 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +154 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts +1 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js +25 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +11 -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 +14 -4
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +3 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +61 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +376 -10
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.d.ts +16 -0
- package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.js +24 -0
- package/node_modules/@xrkseek/server-host/dist/invariants-fail-fast.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/standing-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/standing-tools.js +4 -1
- package/node_modules/@xrkseek/server-host/dist/standing-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-host/package.json +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +10 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +17 -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-classifier.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js +20 -5
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.d.ts +5 -17
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.js +50 -49
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-sidecar.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts +14 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js +30 -14
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js +5 -5
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js.map +1 -1
- package/node_modules/@xrkseek/server-http/package.json +1 -0
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.js +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts +75 -3
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js +415 -46
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js.map +1 -1
- package/node_modules/@xrkseek/session-format/README.md +20 -0
- package/node_modules/@xrkseek/session-format/dist/catalog.d.ts +27 -0
- package/node_modules/@xrkseek/session-format/dist/catalog.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/catalog.js +36 -0
- package/node_modules/@xrkseek/session-format/dist/catalog.js.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/chain.d.ts +38 -0
- package/node_modules/@xrkseek/session-format/dist/chain.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/chain.js +86 -0
- package/node_modules/@xrkseek/session-format/dist/chain.js.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/detect.d.ts +29 -0
- package/node_modules/@xrkseek/session-format/dist/detect.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/detect.js +68 -0
- package/node_modules/@xrkseek/session-format/dist/detect.js.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/index.d.ts +12 -0
- package/node_modules/@xrkseek/session-format/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/index.js +12 -0
- package/node_modules/@xrkseek/session-format/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/interchange-version.d.ts +6 -0
- package/node_modules/@xrkseek/session-format/dist/interchange-version.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/interchange-version.js +6 -0
- package/node_modules/@xrkseek/session-format/dist/interchange-version.js.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/sqlite-schema.d.ts +31 -0
- package/node_modules/@xrkseek/session-format/dist/sqlite-schema.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-format/dist/sqlite-schema.js +52 -0
- package/node_modules/@xrkseek/session-format/dist/sqlite-schema.js.map +1 -0
- package/node_modules/@xrkseek/session-format/package.json +24 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +18 -4
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/dist/index.js +97 -36
- package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/spill/README.md +27 -0
- package/node_modules/@xrkseek/spill/dist/index.d.ts +11 -0
- package/node_modules/@xrkseek/spill/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/spill/dist/index.js +11 -0
- package/node_modules/@xrkseek/spill/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/spill/dist/local-store.d.ts +30 -0
- package/node_modules/@xrkseek/spill/dist/local-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/spill/dist/local-store.js +73 -0
- package/node_modules/@xrkseek/spill/dist/local-store.js.map +1 -0
- package/node_modules/@xrkseek/spill/dist/policy.d.ts +59 -0
- package/node_modules/@xrkseek/spill/dist/policy.d.ts.map +1 -0
- package/node_modules/@xrkseek/spill/dist/policy.js +143 -0
- package/node_modules/@xrkseek/spill/dist/policy.js.map +1 -0
- package/node_modules/@xrkseek/spill/dist/types.d.ts +46 -0
- package/node_modules/@xrkseek/spill/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/spill/dist/types.js +8 -0
- package/node_modules/@xrkseek/spill/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/spill/package.json +27 -0
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +2 -0
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +1 -0
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-propose.d.ts +71 -0
- package/node_modules/@xrkseek/workspace/dist/skill-propose.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/skill-propose.js +259 -0
- package/node_modules/@xrkseek/workspace/dist/skill-propose.js.map +1 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/README.md +46 -45
- package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +46 -45
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.d.ts +37 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.d.ts.map +1 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.js +91 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/gitignore.js.map +1 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.d.ts +7 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.d.ts.map +1 -1
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.js +46 -4
- package/node_modules/@xrkseek/xrk-file-reference-local/dist/search.js.map +1 -1
- package/node_modules/@xrkseek/xrk-file-reference-local/package.json +30 -29
- package/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/ignore/README.md +452 -0
- package/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/ignore/index.js +793 -0
- package/node_modules/ignore/legacy.js +690 -0
- package/node_modules/ignore/package.json +87 -0
- package/package.json +17 -1
|
@@ -5,7 +5,24 @@ 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
|
-
|
|
8
|
+
/** Parse a Face `session-telemetry` namespace value (unknown → product or undefined). */
|
|
9
|
+
export function parseSessionTelemetryProduct(raw) {
|
|
10
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
11
|
+
return undefined;
|
|
12
|
+
const row = raw;
|
|
13
|
+
const modeRaw = typeof row.mode === "string" ? row.mode.trim().toLowerCase() : "";
|
|
14
|
+
const mode = modeRaw === "memory" || modeRaw === "otlp" || modeRaw === "off"
|
|
15
|
+
? modeRaw
|
|
16
|
+
: "off";
|
|
17
|
+
const endpoint = typeof row.endpoint === "string" && row.endpoint.trim()
|
|
18
|
+
? row.endpoint.trim()
|
|
19
|
+
: undefined;
|
|
20
|
+
return {
|
|
21
|
+
mode,
|
|
22
|
+
...(endpoint ? { endpoint } : {}),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function sessionTelemetryUnavailableMessage(env = process.env, product) {
|
|
9
26
|
const flag = String(env.XRK_TELEMETRY ?? "").trim().toLowerCase();
|
|
10
27
|
if (flag === "0" || flag === "off" || flag === "disabled") {
|
|
11
28
|
return "Session telemetry disabled (XRK_TELEMETRY=0).";
|
|
@@ -17,61 +34,105 @@ export function sessionTelemetryUnavailableMessage(env = process.env) {
|
|
|
17
34
|
return ("XRK_TELEMETRY=1 but no OTLP endpoint. Set XRK_TELEMETRY_OTLP_ENDPOINT " +
|
|
18
35
|
"or OTEL_EXPORTER_OTLP_LOGS_ENDPOINT / OTEL_EXPORTER_OTLP_ENDPOINT.");
|
|
19
36
|
}
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
if (flag === "" && product) {
|
|
38
|
+
if (product.mode === "off") {
|
|
39
|
+
return "Session telemetry disabled (Settings → session-telemetry mode=off).";
|
|
40
|
+
}
|
|
41
|
+
if (product.mode === "memory") {
|
|
42
|
+
return "Session telemetry memory sink (Settings).";
|
|
43
|
+
}
|
|
44
|
+
return ("Session telemetry OTLP (Settings) but no endpoint. Set endpoint in " +
|
|
45
|
+
"Settings or XRK_TELEMETRY_OTLP_ENDPOINT / OTEL_*.");
|
|
46
|
+
}
|
|
47
|
+
return ("Session telemetry is off. Set Settings → session-telemetry, or " +
|
|
48
|
+
"XRK_TELEMETRY=memory / XRK_TELEMETRY=1 with an OTLP logs endpoint. " +
|
|
49
|
+
"See docs/session-telemetry.md.");
|
|
50
|
+
}
|
|
51
|
+
function otlpHeadersFromEnv(env) {
|
|
52
|
+
const headersRaw = String(env.OTEL_EXPORTER_OTLP_HEADERS ?? "").trim();
|
|
53
|
+
const headers = {};
|
|
54
|
+
if (!headersRaw)
|
|
55
|
+
return headers;
|
|
56
|
+
for (const part of headersRaw.split(",")) {
|
|
57
|
+
const idx = part.indexOf("=");
|
|
58
|
+
if (idx <= 0)
|
|
59
|
+
continue;
|
|
60
|
+
headers[part.slice(0, idx).trim()] = part.slice(idx + 1).trim();
|
|
61
|
+
}
|
|
62
|
+
return headers;
|
|
63
|
+
}
|
|
64
|
+
function buildOtlpSink(endpoint, options, env) {
|
|
65
|
+
const headers = otlpHeadersFromEnv(env);
|
|
66
|
+
return createOtlpHttpSessionTelemetrySink({
|
|
67
|
+
endpoint,
|
|
68
|
+
...(Object.keys(headers).length ? { headers } : {}),
|
|
69
|
+
...(options.fetchImpl ? { fetchImpl: options.fetchImpl } : {}),
|
|
70
|
+
...(options.serviceName ? { serviceName: options.serviceName } : {}),
|
|
71
|
+
});
|
|
22
72
|
}
|
|
23
73
|
/**
|
|
24
74
|
* Resolve a session-telemetry sink.
|
|
25
75
|
* - Injected `sink` wins.
|
|
26
|
-
* - `XRK_TELEMETRY
|
|
27
|
-
* - `
|
|
28
|
-
* - `XRK_TELEMETRY=1` / `otlp` + endpoint → OTLP/HTTP logs.
|
|
76
|
+
* - Non-empty `XRK_TELEMETRY` → env path (CI bypass over Settings).
|
|
77
|
+
* - Else Face `product` (`off` / `memory` / `otlp` + endpoint).
|
|
29
78
|
* - Else if a standard OTEL_* endpoint is set → OTLP (opt-in via endpoint alone).
|
|
79
|
+
* - Else disabled.
|
|
30
80
|
*/
|
|
31
81
|
export function createDefaultSessionTelemetryAccess(options = {}) {
|
|
32
82
|
const env = options.env ?? process.env;
|
|
33
|
-
const
|
|
83
|
+
const product = options.product;
|
|
84
|
+
const unavailableMessage = sessionTelemetryUnavailableMessage(env, product);
|
|
34
85
|
if (options.sink) {
|
|
35
86
|
return { sink: options.sink, unavailableMessage };
|
|
36
87
|
}
|
|
37
88
|
const flag = String(env.XRK_TELEMETRY ?? "").trim().toLowerCase();
|
|
38
|
-
|
|
89
|
+
// CI / shell bypass: any explicit XRK_TELEMETRY wins over Face Settings.
|
|
90
|
+
if (flag !== "") {
|
|
91
|
+
if (flag === "0" || flag === "off" || flag === "disabled") {
|
|
92
|
+
return { unavailableMessage };
|
|
93
|
+
}
|
|
94
|
+
if (flag === "memory") {
|
|
95
|
+
return {
|
|
96
|
+
sink: createMemorySessionTelemetrySink(),
|
|
97
|
+
unavailableMessage,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const endpoint = resolveOtlpLogsEndpoint(env);
|
|
101
|
+
const wantOtlp = flag === "1" || flag === "otlp" || flag === "otel";
|
|
102
|
+
if (wantOtlp) {
|
|
103
|
+
if (!endpoint)
|
|
104
|
+
return { unavailableMessage };
|
|
105
|
+
return {
|
|
106
|
+
sink: buildOtlpSink(endpoint, options, env),
|
|
107
|
+
unavailableMessage,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
39
110
|
return { unavailableMessage };
|
|
40
111
|
}
|
|
41
|
-
|
|
112
|
+
// Product Settings (Face `session-telemetry`).
|
|
113
|
+
if (product) {
|
|
114
|
+
if (product.mode === "off") {
|
|
115
|
+
return { unavailableMessage };
|
|
116
|
+
}
|
|
117
|
+
if (product.mode === "memory") {
|
|
118
|
+
return {
|
|
119
|
+
sink: createMemorySessionTelemetrySink(),
|
|
120
|
+
unavailableMessage,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const endpoint = product.endpoint?.trim() || resolveOtlpLogsEndpoint(env) || undefined;
|
|
124
|
+
if (!endpoint)
|
|
125
|
+
return { unavailableMessage };
|
|
42
126
|
return {
|
|
43
|
-
sink:
|
|
127
|
+
sink: buildOtlpSink(endpoint, options, env),
|
|
44
128
|
unavailableMessage,
|
|
45
129
|
};
|
|
46
130
|
}
|
|
131
|
+
// Legacy: OTEL endpoint alone still opt-in when no Face product was passed.
|
|
47
132
|
const endpoint = resolveOtlpLogsEndpoint(env);
|
|
48
|
-
|
|
49
|
-
flag === "otlp" ||
|
|
50
|
-
flag === "otel" ||
|
|
51
|
-
(flag === "" && Boolean(endpoint));
|
|
52
|
-
if (wantOtlp) {
|
|
53
|
-
if (!endpoint) {
|
|
54
|
-
return { unavailableMessage };
|
|
55
|
-
}
|
|
56
|
-
const headersRaw = String(env.OTEL_EXPORTER_OTLP_HEADERS ?? "").trim();
|
|
57
|
-
const headers = {};
|
|
58
|
-
if (headersRaw) {
|
|
59
|
-
for (const part of headersRaw.split(",")) {
|
|
60
|
-
const idx = part.indexOf("=");
|
|
61
|
-
if (idx <= 0)
|
|
62
|
-
continue;
|
|
63
|
-
headers[part.slice(0, idx).trim()] = part.slice(idx + 1).trim();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
133
|
+
if (endpoint) {
|
|
66
134
|
return {
|
|
67
|
-
sink:
|
|
68
|
-
endpoint,
|
|
69
|
-
...(Object.keys(headers).length ? { headers } : {}),
|
|
70
|
-
...(options.fetchImpl ? { fetchImpl: options.fetchImpl } : {}),
|
|
71
|
-
...(options.serviceName
|
|
72
|
-
? { serviceName: options.serviceName }
|
|
73
|
-
: {}),
|
|
74
|
-
}),
|
|
135
|
+
sink: buildOtlpSink(endpoint, options, env),
|
|
75
136
|
unavailableMessage,
|
|
76
137
|
};
|
|
77
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,kCAAkC,EAClC,uBAAuB,GAExB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,qBAAq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,EAAE,CAAC;IAChC,CAAC;IAED,+CAA+C;IAC/C,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;QAChC,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO;gBACL,IAAI,EAAE,gCAAgC,EAAE;gBACxC,kBAAkB;aACnB,CAAC;QACJ,CAAC;QACD,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;QACxE,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;QAC7C,OAAO;YACL,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC;YAC3C,kBAAkB;SACnB,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,MAAM,QAAQ,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC9C,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,IAAI,EAAE,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC;YAC3C,kBAAkB;SACnB,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# `@xrkseek/spill`
|
|
2
|
+
|
|
3
|
+
> **读者**:贡献者 · Host / agent-loop 维护者。
|
|
4
|
+
|
|
5
|
+
工具结果溢出(spill)的 **locator 契约**、本机存储、与策略层分离。
|
|
6
|
+
|
|
7
|
+
| 层 | 职责 |
|
|
8
|
+
|----|------|
|
|
9
|
+
| `SpillStore` / `LocalSpillStore` | 落盘、返回不透明 `SpillLocator` + `retrievalHint` |
|
|
10
|
+
| `applySpillPolicy` / `formatSpillNotice` | 何时溢出、inline 预览、模型可见 notice |
|
|
11
|
+
| `parseSpillLocator` | 从 pipeline / loop notice 解析路径(概况 Status 打开 spill) |
|
|
12
|
+
|
|
13
|
+
默认根目录:`{XRK_HOME}/spill`(工具结果在 `tool-outputs/`)。
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
> **Audience**: Contributors · Host / agent-loop maintainers.
|
|
18
|
+
|
|
19
|
+
**Locator contract**, local store, and policy layer for oversized tool results — storage ≠ policy.
|
|
20
|
+
|
|
21
|
+
| Layer | Role |
|
|
22
|
+
|-------|------|
|
|
23
|
+
| `SpillStore` / `LocalSpillStore` | Persist bytes; return opaque `SpillLocator` + `retrievalHint` |
|
|
24
|
+
| `applySpillPolicy` / `formatSpillNotice` | When to spill, inline preview, model-facing notice |
|
|
25
|
+
| `parseSpillLocator` | Parse path from pipeline / loop notices (Status “open spill”) |
|
|
26
|
+
|
|
27
|
+
Default root: `{XRK_HOME}/spill` (`tool-outputs/` for tool bodies).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@xrkseek/spill` — locator contract, local store, tool-result spill policy.
|
|
3
|
+
*
|
|
4
|
+
* Storage ({@link SpillStore} / {@link LocalSpillStore}) and policy
|
|
5
|
+
* ({@link applySpillPolicy} / notices) are separate packages-of-concern so
|
|
6
|
+
* Host / agent-loop can swap backends without rewriting notice text.
|
|
7
|
+
*/
|
|
8
|
+
export { SpillLocator, type SpillOwner, type SpillSource, type SaveTextSpill, type SpillRef, type SpillStore, } from "./types.js";
|
|
9
|
+
export { LocalSpillStore, defaultLocalSpillStore, defaultSpillRoot, encodeSpillSegment, resetDefaultLocalSpillStore, type LocalSpillStoreOptions, } from "./local-store.js";
|
|
10
|
+
export { NO_SPILL_TOOLS, DEFAULT_SPILL_INLINE_BYTES, utf8Bytes, utf8Prefix, utf8Suffix, headTail, formatSpillNotice, parseSpillLocator, alreadySavedPath, fitInlineNotice, applySpillPolicy, type ApplySpillPolicyInput, type ApplySpillPolicyResult, } from "./policy.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@xrkseek/spill` — locator contract, local store, tool-result spill policy.
|
|
3
|
+
*
|
|
4
|
+
* Storage ({@link SpillStore} / {@link LocalSpillStore}) and policy
|
|
5
|
+
* ({@link applySpillPolicy} / notices) are separate packages-of-concern so
|
|
6
|
+
* Host / agent-loop can swap backends without rewriting notice text.
|
|
7
|
+
*/
|
|
8
|
+
export { SpillLocator, } from "./types.js";
|
|
9
|
+
export { LocalSpillStore, defaultLocalSpillStore, defaultSpillRoot, encodeSpillSegment, resetDefaultLocalSpillStore, } from "./local-store.js";
|
|
10
|
+
export { NO_SPILL_TOOLS, DEFAULT_SPILL_INLINE_BYTES, utf8Bytes, utf8Prefix, utf8Suffix, headTail, formatSpillNotice, parseSpillLocator, alreadySavedPath, fitInlineNotice, applySpillPolicy, } from "./policy.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,GAMb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,GAE5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,0BAA0B,EAC1B,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GAGjB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-filesystem spill backend under `{XRK_HOME}/spill`.
|
|
3
|
+
*/
|
|
4
|
+
import { type SaveTextSpill, type SpillRef, type SpillStore } from "./types.js";
|
|
5
|
+
export interface LocalSpillStoreOptions {
|
|
6
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
7
|
+
/** Override spill root (tests). Default `{XRK_HOME}/spill`. */
|
|
8
|
+
readonly root?: string;
|
|
9
|
+
/** Subdir under root for tool results. Default `tool-outputs`. */
|
|
10
|
+
readonly toolRelativeDir?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Encode one untrusted string as a single safe path segment. */
|
|
13
|
+
export declare function encodeSpillSegment(raw: string): string;
|
|
14
|
+
export declare function defaultSpillRoot(env?: NodeJS.ProcessEnv): string;
|
|
15
|
+
/** Local filesystem {@link SpillStore}. */
|
|
16
|
+
export declare class LocalSpillStore implements SpillStore {
|
|
17
|
+
private readonly root;
|
|
18
|
+
private readonly toolRelativeDir;
|
|
19
|
+
private readonly env;
|
|
20
|
+
constructor(options?: LocalSpillStoreOptions);
|
|
21
|
+
/** Absolute spill tree root (Host `hostReadableRoots`). */
|
|
22
|
+
get spillRoot(): string;
|
|
23
|
+
saveText(input: SaveTextSpill): Promise<SpillRef>;
|
|
24
|
+
saveTextSync(input: SaveTextSpill): SpillRef;
|
|
25
|
+
}
|
|
26
|
+
/** Process-wide default local store (lazy; rebinds when XRK_HOME changes). */
|
|
27
|
+
export declare function defaultLocalSpillStore(env?: NodeJS.ProcessEnv): LocalSpillStore;
|
|
28
|
+
/** Test hook: drop the shared singleton. */
|
|
29
|
+
export declare function resetDefaultLocalSpillStore(): void;
|
|
30
|
+
//# sourceMappingURL=local-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-store.d.ts","sourceRoot":"","sources":["../src/local-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAKpB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,iEAAiE;AACjE,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAE7E;AAED,2CAA2C;AAC3C,qBAAa,eAAgB,YAAW,UAAU;IAChD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAoB;gBAE5B,OAAO,GAAE,sBAA2B;IAShD,2DAA2D;IAC3D,IAAI,SAAS,IAAI,MAAM,CAEtB;IAEK,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIvD,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ;CA6B7C;AAKD,8EAA8E;AAC9E,wBAAgB,sBAAsB,CACpC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,eAAe,CAOjB;AAED,4CAA4C;AAC5C,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-filesystem spill backend under `{XRK_HOME}/spill`.
|
|
3
|
+
*/
|
|
4
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { capSpillText, pruneSpillTree, resolveXrkHome, } from "@xrkseek/xrk-home-paths";
|
|
7
|
+
import { SpillLocator, } from "./types.js";
|
|
8
|
+
const DEFAULT_RETRIEVAL = "Retrieve with read_file or grep on that path.";
|
|
9
|
+
/** Encode one untrusted string as a single safe path segment. */
|
|
10
|
+
export function encodeSpillSegment(raw) {
|
|
11
|
+
if (raw.length === 0)
|
|
12
|
+
return "_";
|
|
13
|
+
return raw.replace(/[^\w.-]+/g, "_").slice(0, 120) || "_";
|
|
14
|
+
}
|
|
15
|
+
export function defaultSpillRoot(env = process.env) {
|
|
16
|
+
return path.join(resolveXrkHome(env), "spill");
|
|
17
|
+
}
|
|
18
|
+
/** Local filesystem {@link SpillStore}. */
|
|
19
|
+
export class LocalSpillStore {
|
|
20
|
+
root;
|
|
21
|
+
toolRelativeDir;
|
|
22
|
+
env;
|
|
23
|
+
constructor(options = {}) {
|
|
24
|
+
this.env = options.env ?? process.env;
|
|
25
|
+
this.root = path.resolve(options.root ?? defaultSpillRoot(this.env));
|
|
26
|
+
this.toolRelativeDir = (options.toolRelativeDir ?? "tool-outputs").replace(/\\/g, "/");
|
|
27
|
+
}
|
|
28
|
+
/** Absolute spill tree root (Host `hostReadableRoots`). */
|
|
29
|
+
get spillRoot() {
|
|
30
|
+
return this.root;
|
|
31
|
+
}
|
|
32
|
+
async saveText(input) {
|
|
33
|
+
return this.saveTextSync(input);
|
|
34
|
+
}
|
|
35
|
+
saveTextSync(input) {
|
|
36
|
+
pruneSpillTree(this.root);
|
|
37
|
+
const dir = input.source.kind === "tool"
|
|
38
|
+
? path.join(this.root, this.toolRelativeDir)
|
|
39
|
+
: path.join(this.root, encodeSpillSegment(input.owner.sessionId));
|
|
40
|
+
mkdirSync(dir, { recursive: true });
|
|
41
|
+
const base = encodeSpillSegment(input.suggestedName.replace(/\.[^.]+$/, "") || "spill");
|
|
42
|
+
const ext = path.extname(input.suggestedName).replace(/[^\w.]/g, "") || ".txt";
|
|
43
|
+
const name = input.source.kind === "tool"
|
|
44
|
+
? `${encodeSpillSegment(input.owner.sessionId)}_${encodeSpillSegment(input.source.callId) || "call"}${ext.startsWith(".") ? ext : `.${ext}`}`
|
|
45
|
+
: `${base}_${Date.now().toString(36)}${ext.startsWith(".") ? ext : `.${ext}`}`;
|
|
46
|
+
const file = path.join(dir, name);
|
|
47
|
+
const body = capSpillText(input.content);
|
|
48
|
+
writeFileSync(file, body, "utf8");
|
|
49
|
+
const bytes = Buffer.byteLength(body, "utf8");
|
|
50
|
+
return {
|
|
51
|
+
locator: SpillLocator(file),
|
|
52
|
+
bytes,
|
|
53
|
+
retrievalHint: DEFAULT_RETRIEVAL,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
let shared;
|
|
58
|
+
let sharedHome;
|
|
59
|
+
/** Process-wide default local store (lazy; rebinds when XRK_HOME changes). */
|
|
60
|
+
export function defaultLocalSpillStore(env = process.env) {
|
|
61
|
+
const home = resolveXrkHome(env);
|
|
62
|
+
if (!shared || sharedHome !== home) {
|
|
63
|
+
shared = new LocalSpillStore({ env });
|
|
64
|
+
sharedHome = home;
|
|
65
|
+
}
|
|
66
|
+
return shared;
|
|
67
|
+
}
|
|
68
|
+
/** Test hook: drop the shared singleton. */
|
|
69
|
+
export function resetDefaultLocalSpillStore() {
|
|
70
|
+
shared = undefined;
|
|
71
|
+
sharedHome = undefined;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=local-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-store.js","sourceRoot":"","sources":["../src/local-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,YAAY,GAIb,MAAM,YAAY,CAAC;AAEpB,MAAM,iBAAiB,GACrB,+CAA+C,CAAC;AAUlD,iEAAiE;AACjE,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACjC,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACnE,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED,2CAA2C;AAC3C,MAAM,OAAO,eAAe;IACT,IAAI,CAAS;IACb,eAAe,CAAS;IACxB,GAAG,CAAoB;IAExC,YAAY,UAAkC,EAAE;QAC9C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,GAAG,CAAC,OAAO,CAAC,eAAe,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|
|
3
|
+
* Learned from dsh `@deepseek-ai/dsh-spill-policy` (notice · skip tools · head/tail).
|
|
4
|
+
*/
|
|
5
|
+
import type { SpillLocator, SpillRef, SpillStore } from "./types.js";
|
|
6
|
+
/** Tools that must stay inline (avoid read → spill → read loops). */
|
|
7
|
+
export declare const NO_SPILL_TOOLS: Set<string>;
|
|
8
|
+
/** Default inline ceiling (UTF-8 bytes); Face may override. */
|
|
9
|
+
export declare const DEFAULT_SPILL_INLINE_BYTES = 64000;
|
|
10
|
+
export declare function utf8Bytes(text: string): number;
|
|
11
|
+
/** Prefix of `text` with at most `maxBytes` UTF-8 bytes (no mid-sequence cut). */
|
|
12
|
+
export declare function utf8Prefix(text: string, maxBytes: number): string;
|
|
13
|
+
/** Suffix of `text` with at most `maxBytes` UTF-8 bytes. */
|
|
14
|
+
export declare function utf8Suffix(text: string, maxBytes: number): string;
|
|
15
|
+
/** Head/tail preview: half budget each end, omit the middle. */
|
|
16
|
+
export declare function headTail(text: string, budget: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Model-facing spill notice (dsh-compatible wording).
|
|
19
|
+
* Keep stable — Host timeline / UI parse the path after `stored at:`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatSpillNotice(args: {
|
|
22
|
+
readonly omittedBytes: number;
|
|
23
|
+
readonly ref: SpillRef;
|
|
24
|
+
/**
|
|
25
|
+
* When the body was already persisted by pipeline `persist`, skip the
|
|
26
|
+
* “(omitted ~N bytes…)” prefix so markers stay short.
|
|
27
|
+
*/
|
|
28
|
+
readonly alreadyPersisted?: boolean;
|
|
29
|
+
}): string;
|
|
30
|
+
/**
|
|
31
|
+
* Parse a spill locator from pipeline / loop notices.
|
|
32
|
+
* Prefer an authoritative `savedPath` from the tool pipeline when present.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseSpillLocator(text: string): SpillLocator | undefined;
|
|
35
|
+
/** @deprecated Prefer {@link parseSpillLocator}. */
|
|
36
|
+
export declare const alreadySavedPath: (text: string) => string | undefined;
|
|
37
|
+
export declare function fitInlineNotice(notice: string, plain: string, maxInline: number): string;
|
|
38
|
+
export interface ApplySpillPolicyInput {
|
|
39
|
+
readonly sessionId: string;
|
|
40
|
+
readonly callId: string;
|
|
41
|
+
readonly toolName: string;
|
|
42
|
+
readonly plainText: string;
|
|
43
|
+
/** UTF-8 inline ceiling; omit → {@link DEFAULT_SPILL_INLINE_BYTES}; `0` → no spill. */
|
|
44
|
+
readonly maxInlineBytes?: number;
|
|
45
|
+
/** Authoritative full-body path from pipeline `outputPaths`. */
|
|
46
|
+
readonly savedPath?: string;
|
|
47
|
+
readonly store: SpillStore;
|
|
48
|
+
}
|
|
49
|
+
export interface ApplySpillPolicyResult {
|
|
50
|
+
readonly content: string;
|
|
51
|
+
readonly spilled: boolean;
|
|
52
|
+
readonly ref?: SpillRef;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Apply spill policy against a {@link SpillStore}.
|
|
56
|
+
* Sync when `store.saveTextSync` exists; otherwise throws (agent-loop needs sync).
|
|
57
|
+
*/
|
|
58
|
+
export declare function applySpillPolicy(input: ApplySpillPolicyInput): ApplySpillPolicyResult;
|
|
59
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGrE,qEAAqE;AACrE,eAAO,MAAM,cAAc,aAA+C,CAAC;AAE3E,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAUjE;AAED,4DAA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AAG,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,qBAAqB,GAC3B,sBAAsB,CAyDxB"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-result spill policy — decides when/how to spill; storage stays on SpillStore.
|
|
3
|
+
* Learned from dsh `@deepseek-ai/dsh-spill-policy` (notice · skip tools · head/tail).
|
|
4
|
+
*/
|
|
5
|
+
import { SpillLocator as asSpillLocator } from "./types.js";
|
|
6
|
+
/** Tools that must stay inline (avoid read → spill → read loops). */
|
|
7
|
+
export const NO_SPILL_TOOLS = new Set(["read_file", "read", "read_image"]);
|
|
8
|
+
/** Default inline ceiling (UTF-8 bytes); Face may override. */
|
|
9
|
+
export const DEFAULT_SPILL_INLINE_BYTES = 64_000;
|
|
10
|
+
export function utf8Bytes(text) {
|
|
11
|
+
return Buffer.byteLength(text, "utf8");
|
|
12
|
+
}
|
|
13
|
+
/** Prefix of `text` with at most `maxBytes` UTF-8 bytes (no mid-sequence cut). */
|
|
14
|
+
export function utf8Prefix(text, maxBytes) {
|
|
15
|
+
if (maxBytes <= 0)
|
|
16
|
+
return "";
|
|
17
|
+
if (utf8Bytes(text) <= maxBytes)
|
|
18
|
+
return text;
|
|
19
|
+
let end = Math.min(text.length, maxBytes);
|
|
20
|
+
let out = text.slice(0, end);
|
|
21
|
+
while (end > 0 && utf8Bytes(out) > maxBytes) {
|
|
22
|
+
end -= 1;
|
|
23
|
+
out = text.slice(0, end);
|
|
24
|
+
}
|
|
25
|
+
return out;
|
|
26
|
+
}
|
|
27
|
+
/** Suffix of `text` with at most `maxBytes` UTF-8 bytes. */
|
|
28
|
+
export function utf8Suffix(text, maxBytes) {
|
|
29
|
+
if (maxBytes <= 0)
|
|
30
|
+
return "";
|
|
31
|
+
if (utf8Bytes(text) <= maxBytes)
|
|
32
|
+
return text;
|
|
33
|
+
let start = Math.max(0, text.length - maxBytes);
|
|
34
|
+
let out = text.slice(start);
|
|
35
|
+
while (start < text.length && utf8Bytes(out) > maxBytes) {
|
|
36
|
+
start += 1;
|
|
37
|
+
out = text.slice(start);
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
/** Head/tail preview: half budget each end, omit the middle. */
|
|
42
|
+
export function headTail(text, budget) {
|
|
43
|
+
if (utf8Bytes(text) <= budget)
|
|
44
|
+
return text;
|
|
45
|
+
const marker = "\n\n[... middle omitted ...]\n\n";
|
|
46
|
+
const markerBytes = utf8Bytes(marker);
|
|
47
|
+
const keep = Math.max(0, budget - markerBytes);
|
|
48
|
+
const headBytes = Math.ceil(keep / 2);
|
|
49
|
+
const tailBytes = Math.floor(keep / 2);
|
|
50
|
+
return `${utf8Prefix(text, headBytes)}${marker}${utf8Suffix(text, tailBytes)}`;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Model-facing spill notice (dsh-compatible wording).
|
|
54
|
+
* Keep stable — Host timeline / UI parse the path after `stored at:`.
|
|
55
|
+
*/
|
|
56
|
+
export function formatSpillNotice(args) {
|
|
57
|
+
const loc = String(args.ref.locator);
|
|
58
|
+
const hint = args.ref.retrievalHint.trim() || "Retrieve with read_file or grep on that path.";
|
|
59
|
+
if (args.alreadyPersisted) {
|
|
60
|
+
return `Full formatted result stored at: ${loc}. ${hint}\n\n`;
|
|
61
|
+
}
|
|
62
|
+
return (`(omitted ~${args.omittedBytes} bytes. Full formatted result stored at: ${loc}. ` +
|
|
63
|
+
`${hint})\n\n`);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Parse a spill locator from pipeline / loop notices.
|
|
67
|
+
* Prefer an authoritative `savedPath` from the tool pipeline when present.
|
|
68
|
+
*/
|
|
69
|
+
export function parseSpillLocator(text) {
|
|
70
|
+
const pipeline = text.match(/full content saved to (.+?)(?: \.\.\.| \.\.\.$|$)/m);
|
|
71
|
+
const loop = text.match(/Full formatted result stored at: (.+?)\. Retrieve/);
|
|
72
|
+
const loc = (pipeline?.[1] ?? loop?.[1])?.trim();
|
|
73
|
+
return loc ? asSpillLocator(loc) : undefined;
|
|
74
|
+
}
|
|
75
|
+
/** @deprecated Prefer {@link parseSpillLocator}. */
|
|
76
|
+
export const alreadySavedPath = (text) => parseSpillLocator(text);
|
|
77
|
+
export function fitInlineNotice(notice, plain, maxInline) {
|
|
78
|
+
const noticeBytes = utf8Bytes(notice);
|
|
79
|
+
if (noticeBytes >= maxInline)
|
|
80
|
+
return utf8Prefix(notice, maxInline);
|
|
81
|
+
let body = notice + headTail(plain, maxInline - noticeBytes);
|
|
82
|
+
if (utf8Bytes(body) > maxInline)
|
|
83
|
+
body = utf8Prefix(body, maxInline);
|
|
84
|
+
return body;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Apply spill policy against a {@link SpillStore}.
|
|
88
|
+
* Sync when `store.saveTextSync` exists; otherwise throws (agent-loop needs sync).
|
|
89
|
+
*/
|
|
90
|
+
export function applySpillPolicy(input) {
|
|
91
|
+
if (NO_SPILL_TOOLS.has(input.toolName)) {
|
|
92
|
+
return { content: input.plainText, spilled: false };
|
|
93
|
+
}
|
|
94
|
+
const maxInline = input.maxInlineBytes === undefined
|
|
95
|
+
? DEFAULT_SPILL_INLINE_BYTES
|
|
96
|
+
: Math.max(0, Math.floor(input.maxInlineBytes));
|
|
97
|
+
if (maxInline === 0) {
|
|
98
|
+
return { content: input.plainText, spilled: false };
|
|
99
|
+
}
|
|
100
|
+
const total = utf8Bytes(input.plainText);
|
|
101
|
+
if (total <= maxInline) {
|
|
102
|
+
return { content: input.plainText, spilled: false };
|
|
103
|
+
}
|
|
104
|
+
const saved = (input.savedPath?.trim() ? input.savedPath.trim() : undefined) ??
|
|
105
|
+
parseSpillLocator(input.plainText);
|
|
106
|
+
let ref;
|
|
107
|
+
let alreadyPersisted = false;
|
|
108
|
+
if (saved) {
|
|
109
|
+
alreadyPersisted = true;
|
|
110
|
+
ref = {
|
|
111
|
+
locator: asSpillLocator(saved),
|
|
112
|
+
bytes: total,
|
|
113
|
+
retrievalHint: "Retrieve with read_file or grep on that path.",
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (typeof input.store.saveTextSync !== "function") {
|
|
118
|
+
throw new Error("SpillStore.saveTextSync is required for synchronous tool-result spill");
|
|
119
|
+
}
|
|
120
|
+
ref = input.store.saveTextSync({
|
|
121
|
+
owner: { sessionId: input.sessionId },
|
|
122
|
+
source: {
|
|
123
|
+
kind: "tool",
|
|
124
|
+
toolName: input.toolName,
|
|
125
|
+
callId: input.callId,
|
|
126
|
+
label: input.toolName,
|
|
127
|
+
},
|
|
128
|
+
suggestedName: `${input.callId}.txt`,
|
|
129
|
+
content: input.plainText,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const notice = formatSpillNotice({
|
|
133
|
+
omittedBytes: total - maxInline,
|
|
134
|
+
ref,
|
|
135
|
+
alreadyPersisted,
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
content: fitInlineNotice(notice, input.plainText, maxInline),
|
|
139
|
+
spilled: true,
|
|
140
|
+
ref,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5D,qEAAqE;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;AAE3E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAEjD,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,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AM,MAAM;YACpC,OAAO,EAAE,KAAK,CAAC,SAAS;SACzB,CAAC,CAAC;IACL,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAC;QAC/B,YAAY,EAAE,KAAK,GAAG,SAAS;QAC/B,GAAG;QACH,gBAAgB;KACjB,CAAC,CAAC;IACH,OAAO;QACL,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC;QAC5D,OAAO,EAAE,IAAI;QACb,GAAG;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spill storage seam vocabulary (Cordis-free).
|
|
3
|
+
* Learned from dsh `@deepseek-ai/dsh-spill` types: opaque locator + retrieval hint.
|
|
4
|
+
*/
|
|
5
|
+
/** Opaque model-facing handle for one spilled artifact (often a filesystem path). */
|
|
6
|
+
export type SpillLocator = string & {
|
|
7
|
+
readonly __brand: "SpillLocator";
|
|
8
|
+
};
|
|
9
|
+
export declare function SpillLocator(locator: string): SpillLocator;
|
|
10
|
+
/** Session that owns the artifact at save time. */
|
|
11
|
+
export interface SpillOwner {
|
|
12
|
+
readonly sessionId: string;
|
|
13
|
+
}
|
|
14
|
+
/** Producer of a spilled artifact (descriptive only — not access control). */
|
|
15
|
+
export type SpillSource = {
|
|
16
|
+
readonly kind: "tool";
|
|
17
|
+
readonly toolName: string;
|
|
18
|
+
readonly callId: string;
|
|
19
|
+
readonly label: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: "session-reference";
|
|
22
|
+
readonly sessionId: string;
|
|
23
|
+
readonly label: string;
|
|
24
|
+
};
|
|
25
|
+
/** One request to persist text to a spill artifact. */
|
|
26
|
+
export interface SaveTextSpill {
|
|
27
|
+
readonly owner: SpillOwner;
|
|
28
|
+
readonly source: SpillSource;
|
|
29
|
+
/** Caller-suggested base name (sanitized to one path segment). */
|
|
30
|
+
readonly suggestedName: string;
|
|
31
|
+
/** Full UTF-8 text to persist. */
|
|
32
|
+
readonly content: string;
|
|
33
|
+
}
|
|
34
|
+
/** Saved spill artifact: locator, bytes, and model-facing retrieval guidance. */
|
|
35
|
+
export interface SpillRef {
|
|
36
|
+
readonly locator: SpillLocator;
|
|
37
|
+
readonly bytes: number;
|
|
38
|
+
readonly retrievalHint: string;
|
|
39
|
+
}
|
|
40
|
+
/** Abstract spill storage — persist full text; return opaque locator + hint. */
|
|
41
|
+
export interface SpillStore {
|
|
42
|
+
saveText(input: SaveTextSpill): Promise<SpillRef>;
|
|
43
|
+
/** Sync path for agent-loop (no async turn boundary). */
|
|
44
|
+
saveTextSync?(input: SaveTextSpill): SpillRef;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;CAAE,CAAC;AAEzE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAE1D;AAED,mDAAmD;AACnD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,MAAM,WAAW,GACnB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEN,uDAAuD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