@xrkseek/harness 0.3.11 → 0.4.0-rc.2
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/README.md +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/request-image-bound.d.ts +4 -2
- package/node_modules/@xrkseek/attachment/dist/request-image-bound.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/request-image-bound.js +59 -32
- package/node_modules/@xrkseek/attachment/dist/request-image-bound.js.map +1 -1
- package/node_modules/@xrkseek/attachment-local/README.md +6 -3
- package/node_modules/@xrkseek/attachment-local/dist/index.d.ts +2 -0
- package/node_modules/@xrkseek/attachment-local/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/index.js +9 -8
- package/node_modules/@xrkseek/attachment-local/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts +3 -2
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js +3 -2
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/store.js +3 -0
- package/node_modules/@xrkseek/attachment-local/dist/store.js.map +1 -1
- package/node_modules/@xrkseek/attachment-local/package.json +26 -25
- package/node_modules/@xrkseek/code-runtime/README.md +13 -5
- package/node_modules/@xrkseek/code-runtime/dist/index.d.ts +39 -1
- package/node_modules/@xrkseek/code-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/code-runtime/dist/index.js +202 -60
- package/node_modules/@xrkseek/code-runtime/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts +17 -0
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.js +15 -0
- package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +7 -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 +72 -37
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.d.ts +11 -1
- 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 +48 -38
- package/node_modules/@xrkseek/core-agent-loop/dist/tool-result-bound.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/workspace-changes-emit.d.ts +31 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/workspace-changes-emit.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/workspace-changes-emit.js +54 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/workspace-changes-emit.js.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/package.json +35 -34
- package/node_modules/@xrkseek/core-session/README.md +33 -33
- package/node_modules/@xrkseek/core-session/dist/admit.d.ts +5 -0
- package/node_modules/@xrkseek/core-session/dist/admit.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/admit.js +14 -0
- package/node_modules/@xrkseek/core-session/dist/admit.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts +16 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.js +56 -6
- package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/dangling.d.ts +0 -4
- package/node_modules/@xrkseek/core-session/dist/dangling.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/dangling.js +0 -2
- package/node_modules/@xrkseek/core-session/dist/dangling.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/drain-hub.d.ts +2 -0
- package/node_modules/@xrkseek/core-session/dist/drain-hub.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/drain-hub.js +8 -0
- package/node_modules/@xrkseek/core-session/dist/drain-hub.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/image-offload.d.ts +26 -0
- package/node_modules/@xrkseek/core-session/dist/image-offload.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/image-offload.js +141 -0
- package/node_modules/@xrkseek/core-session/dist/image-offload.js.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/index.d.ts +29 -10
- package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js +59 -14
- package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts +26 -0
- package/node_modules/@xrkseek/core-session/dist/session-interchange.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/session-interchange.js +271 -0
- package/node_modules/@xrkseek/core-session/dist/session-interchange.js.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts +8 -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 +131 -49
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/store-lock.d.ts +22 -0
- package/node_modules/@xrkseek/core-session/dist/store-lock.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/store-lock.js +143 -0
- package/node_modules/@xrkseek/core-session/dist/store-lock.js.map +1 -0
- package/node_modules/@xrkseek/core-system-prompt/README.md +2 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts +8 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js +25 -4
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/prompt-vars.d.ts +27 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/prompt-vars.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/prompt-vars.js +56 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/prompt-vars.js.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/output-bound.d.ts +6 -1
- package/node_modules/@xrkseek/core-tools/dist/output-bound.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/output-bound.js +6 -1
- package/node_modules/@xrkseek/core-tools/dist/output-bound.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/pipeline.d.ts +2 -1
- package/node_modules/@xrkseek/core-tools/dist/pipeline.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/pipeline.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/presentation.d.ts +3 -5
- package/node_modules/@xrkseek/core-tools/dist/presentation.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/presentation.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js +1 -0
- package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/README.md +13 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/background.d.ts +11 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/background.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/background.js +76 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/background.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts +20 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js +58 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts +28 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js +62 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts +12 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.js +100 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/registry.d.ts +12 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/registry.js +28 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/registry.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts +15 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js +133 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts +74 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/types.js +24 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts +10 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +253 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js.map +1 -0
- package/node_modules/@xrkseek/exec-computer-use/package.json +26 -0
- package/node_modules/@xrkseek/exec-fs/dist/document-extract.d.ts +9 -0
- package/node_modules/@xrkseek/exec-fs/dist/document-extract.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/document-extract.js +427 -0
- package/node_modules/@xrkseek/exec-fs/dist/document-extract.js.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +6 -3
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +13 -17
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/paths.d.ts +9 -0
- package/node_modules/@xrkseek/exec-fs/dist/paths.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/paths.js +101 -2
- package/node_modules/@xrkseek/exec-fs/dist/paths.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/README.md +11 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts +2 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js +7 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +24 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js +55 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.d.ts +11 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.js +32 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.d.ts +13 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.js +67 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +17 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js +130 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/types.d.ts +37 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/types.js +15 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/package.json +27 -0
- package/node_modules/@xrkseek/exec-memory/README.md +11 -0
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts +4 -0
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/index.js +4 -0
- package/node_modules/@xrkseek/exec-memory/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.d.ts +43 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.js +365 -0
- package/node_modules/@xrkseek/exec-memory/dist/store.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/tools.d.ts +8 -0
- package/node_modules/@xrkseek/exec-memory/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/tools.js +145 -0
- package/node_modules/@xrkseek/exec-memory/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts +26 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js +82 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/package.json +27 -0
- package/node_modules/@xrkseek/exec-pty/dist/backend.d.ts +3 -0
- package/node_modules/@xrkseek/exec-pty/dist/backend.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/backend.js +7 -2
- package/node_modules/@xrkseek/exec-pty/dist/backend.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/bounded-text-buffer.d.ts +35 -0
- package/node_modules/@xrkseek/exec-pty/dist/bounded-text-buffer.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-pty/dist/bounded-text-buffer.js +161 -0
- package/node_modules/@xrkseek/exec-pty/dist/bounded-text-buffer.js.map +1 -0
- package/node_modules/@xrkseek/exec-pty/dist/handle.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/handle.js +2 -0
- package/node_modules/@xrkseek/exec-pty/dist/handle.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.d.ts +3 -0
- package/node_modules/@xrkseek/exec-pty/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.js +3 -0
- package/node_modules/@xrkseek/exec-pty/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/process-inspector.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/process-inspector.js +6 -1
- package/node_modules/@xrkseek/exec-pty/dist/process-inspector.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/sandbox-fence.d.ts +8 -2
- package/node_modules/@xrkseek/exec-pty/dist/sandbox-fence.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/sandbox-fence.js +4 -3
- package/node_modules/@xrkseek/exec-pty/dist/sandbox-fence.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/session.js +3 -37
- package/node_modules/@xrkseek/exec-pty/dist/session.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/windows-pty.d.ts +9 -0
- package/node_modules/@xrkseek/exec-pty/dist/windows-pty.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-pty/dist/windows-pty.js +14 -0
- package/node_modules/@xrkseek/exec-pty/dist/windows-pty.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/README.md +15 -6
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts +14 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js +56 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/docker.d.ts +30 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/docker.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/docker.js +89 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/docker.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts +5 -28
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js +5 -85
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +44 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +108 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts +37 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/service.js +112 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/service.js.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/windows.d.ts +56 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/windows.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/windows.js +134 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/windows.js.map +1 -0
- package/node_modules/@xrkseek/exec-shell/dist/index.d.ts +12 -0
- package/node_modules/@xrkseek/exec-shell/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-shell/dist/index.js +51 -5
- package/node_modules/@xrkseek/exec-shell/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-ssh/README.md +16 -0
- package/node_modules/@xrkseek/exec-ssh/dist/code.d.ts +8 -0
- package/node_modules/@xrkseek/exec-ssh/dist/code.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/code.js +66 -0
- package/node_modules/@xrkseek/exec-ssh/dist/code.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts +21 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.js +30 -0
- package/node_modules/@xrkseek/exec-ssh/dist/config.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/directory.d.ts +29 -0
- package/node_modules/@xrkseek/exec-ssh/dist/directory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/directory.js +109 -0
- package/node_modules/@xrkseek/exec-ssh/dist/directory.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts +11 -0
- package/node_modules/@xrkseek/exec-ssh/dist/fs.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/fs.js +214 -0
- package/node_modules/@xrkseek/exec-ssh/dist/fs.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts +10 -0
- package/node_modules/@xrkseek/exec-ssh/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/index.js +10 -0
- package/node_modules/@xrkseek/exec-ssh/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/paths.d.ts +10 -0
- package/node_modules/@xrkseek/exec-ssh/dist/paths.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/paths.js +34 -0
- package/node_modules/@xrkseek/exec-ssh/dist/paths.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/providers.d.ts +19 -0
- package/node_modules/@xrkseek/exec-ssh/dist/providers.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/providers.js +22 -0
- package/node_modules/@xrkseek/exec-ssh/dist/providers.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/quote.d.ts +5 -0
- package/node_modules/@xrkseek/exec-ssh/dist/quote.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/quote.js +11 -0
- package/node_modules/@xrkseek/exec-ssh/dist/quote.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/session.d.ts +31 -0
- package/node_modules/@xrkseek/exec-ssh/dist/session.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/session.js +89 -0
- package/node_modules/@xrkseek/exec-ssh/dist/session.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/subprocess.d.ts +8 -0
- package/node_modules/@xrkseek/exec-ssh/dist/subprocess.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/dist/subprocess.js +30 -0
- package/node_modules/@xrkseek/exec-ssh/dist/subprocess.js.map +1 -0
- package/node_modules/@xrkseek/exec-ssh/package.json +28 -0
- package/node_modules/@xrkseek/exec-subprocess/README.md +1 -1
- package/node_modules/@xrkseek/exec-video-gen/README.md +19 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/format.d.ts +2 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/format.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js +8 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts +24 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js +57 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.d.ts +20 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.js +105 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.d.ts +16 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.js +113 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts +23 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +242 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/types.d.ts +66 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/types.js +25 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/package.json +27 -0
- package/node_modules/@xrkseek/exec-voice/README.md +25 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/dictation.d.ts +44 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/dictation.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/dictation.js +163 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/dictation.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/env.d.ts +23 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/env.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/env.js +93 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/env.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.d.ts +51 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.js +44 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/session.d.ts +26 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/session.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/session.js +96 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/session.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/types.d.ts +91 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/types.js +10 -0
- package/node_modules/@xrkseek/exec-voice/dist/browser/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.d.ts +2 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.js +8 -0
- package/node_modules/@xrkseek/exec-voice/dist/format.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts +24 -0
- package/node_modules/@xrkseek/exec-voice/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/index.js +53 -0
- package/node_modules/@xrkseek/exec-voice/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/memory.d.ts +11 -0
- package/node_modules/@xrkseek/exec-voice/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/memory.js +85 -0
- package/node_modules/@xrkseek/exec-voice/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/openai-http.d.ts +16 -0
- package/node_modules/@xrkseek/exec-voice/dist/openai-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/openai-http.js +135 -0
- package/node_modules/@xrkseek/exec-voice/dist/openai-http.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts +14 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.js +240 -0
- package/node_modules/@xrkseek/exec-voice/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/types.d.ts +69 -0
- package/node_modules/@xrkseek/exec-voice/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-voice/dist/types.js +16 -0
- package/node_modules/@xrkseek/exec-voice/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-voice/package.json +31 -0
- package/node_modules/@xrkseek/exec-web/README.md +5 -5
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts +23 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js +286 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-html.d.ts +26 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-html.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-html.js +118 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-html.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts +33 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js +113 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts +22 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +172 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/format.d.ts +4 -0
- package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/format.js +13 -0
- package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts +5 -1
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.js +5 -1
- package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm/dist/index.d.ts +0 -4
- package/node_modules/@xrkseek/llm/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm/dist/index.js +0 -20
- package/node_modules/@xrkseek/llm/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.js +2 -6
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/package.json +30 -29
- package/node_modules/@xrkseek/mcp/README.md +36 -2
- package/node_modules/@xrkseek/mcp/dist/client.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/client.js +220 -28
- package/node_modules/@xrkseek/mcp/dist/client.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.d.ts +7 -4
- package/node_modules/@xrkseek/mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.js +6 -3
- package/node_modules/@xrkseek/mcp/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/list-tools.d.ts +15 -0
- package/node_modules/@xrkseek/mcp/dist/list-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/list-tools.js +40 -0
- package/node_modules/@xrkseek/mcp/dist/list-tools.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/oauth-device.d.ts +104 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-device.d.ts.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-device.js +338 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-device.js.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-discovery.d.ts +92 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-discovery.d.ts.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-discovery.js +232 -0
- package/node_modules/@xrkseek/mcp/dist/oauth-discovery.js.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/resources.d.ts +24 -0
- package/node_modules/@xrkseek/mcp/dist/resources.d.ts.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/resources.js +127 -0
- package/node_modules/@xrkseek/mcp/dist/resources.js.map +1 -0
- package/node_modules/@xrkseek/mcp/dist/types.d.ts +61 -0
- package/node_modules/@xrkseek/mcp/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/engine.d.ts +12 -1
- package/node_modules/@xrkseek/policy/dist/engine.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/engine.js +31 -5
- package/node_modules/@xrkseek/policy/dist/engine.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/index.d.ts +6 -5
- package/node_modules/@xrkseek/policy/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/index.js +5 -4
- package/node_modules/@xrkseek/policy/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/load.d.ts +12 -4
- package/node_modules/@xrkseek/policy/dist/load.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/load.js +40 -21
- package/node_modules/@xrkseek/policy/dist/load.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/permission-pre.d.ts +7 -0
- package/node_modules/@xrkseek/policy/dist/permission-pre.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/permission-pre.js +14 -0
- package/node_modules/@xrkseek/policy/dist/permission-pre.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/rules.d.ts +30 -0
- package/node_modules/@xrkseek/policy/dist/rules.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/rules.js +102 -0
- package/node_modules/@xrkseek/policy/dist/rules.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/ruleset.d.ts +4 -1
- package/node_modules/@xrkseek/policy/dist/ruleset.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/ruleset.js +39 -2
- package/node_modules/@xrkseek/policy/dist/ruleset.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/schema.d.ts +16 -1
- package/node_modules/@xrkseek/policy/dist/schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/schema.js +15 -1
- package/node_modules/@xrkseek/policy/dist/schema.js.map +1 -1
- package/node_modules/@xrkseek/policy/dist/types.d.ts +40 -2
- package/node_modules/@xrkseek/policy/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/policy/dist/wire-error.d.ts +30 -0
- package/node_modules/@xrkseek/policy/dist/wire-error.d.ts.map +1 -0
- package/node_modules/@xrkseek/policy/dist/wire-error.js +42 -0
- package/node_modules/@xrkseek/policy/dist/wire-error.js.map +1 -0
- package/node_modules/@xrkseek/policy/package.json +31 -26
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +107 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +331 -19
- 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 +7 -0
- package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js +7 -4
- 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 +5 -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 +33 -35
- package/node_modules/@xrkseek/protocol/dist/content.d.ts +5 -0
- package/node_modules/@xrkseek/protocol/dist/content.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/content.js +4 -2
- package/node_modules/@xrkseek/protocol/dist/content.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/index.d.ts +4 -2
- package/node_modules/@xrkseek/protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/index.js +3 -1
- package/node_modules/@xrkseek/protocol/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts +2 -321
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.js +106 -61
- package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +28 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.js +2 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.d.ts +84 -0
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.d.ts.map +1 -0
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.js +36 -0
- package/node_modules/@xrkseek/protocol/dist/sidebar-previews.js.map +1 -0
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js +154 -0
- package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.d.ts +132 -0
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.d.ts.map +1 -0
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.js +160 -0
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.js.map +1 -0
- package/node_modules/@xrkseek/server-config/dist/home.d.ts +26 -10
- package/node_modules/@xrkseek/server-config/dist/home.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/home.js +40 -30
- package/node_modules/@xrkseek/server-config/dist/home.js.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/server-config/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.js +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/mcp-servers.d.ts +2 -0
- package/node_modules/@xrkseek/server-config/dist/mcp-servers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/mcp-servers.js +1 -0
- package/node_modules/@xrkseek/server-config/dist/mcp-servers.js.map +1 -1
- package/node_modules/@xrkseek/server-config/package.json +28 -27
- package/node_modules/@xrkseek/server-cron/README.md +11 -0
- package/node_modules/@xrkseek/server-cron/dist/deliver.d.ts +9 -0
- package/node_modules/@xrkseek/server-cron/dist/deliver.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/deliver.js +59 -0
- package/node_modules/@xrkseek/server-cron/dist/deliver.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts +27 -0
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/index.js +48 -0
- package/node_modules/@xrkseek/server-cron/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/runner.d.ts +10 -0
- package/node_modules/@xrkseek/server-cron/dist/runner.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/runner.js +62 -0
- package/node_modules/@xrkseek/server-cron/dist/runner.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/schedule.d.ts +9 -0
- package/node_modules/@xrkseek/server-cron/dist/schedule.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/schedule.js +108 -0
- package/node_modules/@xrkseek/server-cron/dist/schedule.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/scheduler.d.ts +29 -0
- package/node_modules/@xrkseek/server-cron/dist/scheduler.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/scheduler.js +152 -0
- package/node_modules/@xrkseek/server-cron/dist/scheduler.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/store.d.ts +26 -0
- package/node_modules/@xrkseek/server-cron/dist/store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/store.js +127 -0
- package/node_modules/@xrkseek/server-cron/dist/store.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/tools.d.ts +8 -0
- package/node_modules/@xrkseek/server-cron/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/tools.js +183 -0
- package/node_modules/@xrkseek/server-cron/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/types.d.ts +77 -0
- package/node_modules/@xrkseek/server-cron/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/types.js +17 -0
- package/node_modules/@xrkseek/server-cron/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/package.json +26 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/index.js +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts +9 -0
- 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 +31 -4
- 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 +2 -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 +16 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/agent-team-graph.d.ts +56 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-graph.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-graph.js +233 -0
- package/node_modules/@xrkseek/server-face/dist/agent-team-graph.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/approvals.d.ts +10 -1
- package/node_modules/@xrkseek/server-face/dist/approvals.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/approvals.js +24 -0
- package/node_modules/@xrkseek/server-face/dist/approvals.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +51 -3
- 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 +3 -0
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts +34 -0
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js +287 -0
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts +33 -0
- package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/fork-cut.js +114 -0
- package/node_modules/@xrkseek/server-face/dist/fork-cut.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js +2 -2
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/changes.d.ts +23 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/changes.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/changes.js +113 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/changes.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.js +10 -3
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/host.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/host.js +62 -9
- package/node_modules/@xrkseek/server-face/dist/handlers/host.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session-added.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session-added.js +3 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session-added.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js +45 -23
- 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 +3 -2
- package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/host-open-path.js +24 -2
- package/node_modules/@xrkseek/server-face/dist/host-open-path.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +7 -6
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +6 -5
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/last-good-config.d.ts +30 -0
- package/node_modules/@xrkseek/server-face/dist/last-good-config.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/last-good-config.js +39 -0
- package/node_modules/@xrkseek/server-face/dist/last-good-config.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/permissions.d.ts +10 -2
- package/node_modules/@xrkseek/server-face/dist/permissions.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/permissions.js +40 -3
- package/node_modules/@xrkseek/server-face/dist/permissions.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/plugin-boot.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/plugin-boot.js +4 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-boot.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.d.ts +12 -4
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.js +6 -6
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.js.map +1 -1
- 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 +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.js +3 -0
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.js.map +1 -1
- 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 +46 -12
- package/node_modules/@xrkseek/server-face/dist/projections/list-checkpoint-cache.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts +8 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.d.ts +2 -7
- 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 +2 -11
- package/node_modules/@xrkseek/server-face/dist/projections/snapshot-keys.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.d.ts +4 -2
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.js +5 -5
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/workspace-changes.d.ts +13 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/workspace-changes.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/workspace-changes.js +104 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/workspace-changes.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +10 -3
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +105 -10
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js +12 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +4 -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 +253 -41
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts +3 -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 +84 -23
- 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 +11 -0
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts +9 -2
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.js +21 -3
- package/node_modules/@xrkseek/server-face/dist/subagent-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +8 -2
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +185 -38
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.d.ts +33 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js +172 -0
- package/node_modules/@xrkseek/server-face/dist/subagent-worktree.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/types.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.d.ts +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 +16 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.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 +40 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +56 -55
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +18 -2
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +340 -48
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-deferred-dispose.d.ts +22 -0
- package/node_modules/@xrkseek/server-host/dist/mcp-deferred-dispose.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/mcp-deferred-dispose.js +37 -0
- package/node_modules/@xrkseek/server-host/dist/mcp-deferred-dispose.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts +19 -5
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js +161 -30
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/policy-file-watch.d.ts +18 -0
- package/node_modules/@xrkseek/server-host/dist/policy-file-watch.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/policy-file-watch.js +91 -0
- package/node_modules/@xrkseek/server-host/dist/policy-file-watch.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-opens.d.ts +29 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-opens.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-opens.js +111 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-opens.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-pty.d.ts +101 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-pty.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-pty.js +377 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-pty.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-tools.d.ts +25 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-tools.js +343 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-agent-tools.js.map +1 -0
- 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 +66 -6
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts +11 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js +188 -12
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/ssh-directory-backend.d.ts +35 -0
- package/node_modules/@xrkseek/server-host/dist/ssh-directory-backend.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/ssh-directory-backend.js +86 -0
- package/node_modules/@xrkseek/server-host/dist/ssh-directory-backend.js.map +1 -0
- package/node_modules/@xrkseek/server-host/package.json +3 -0
- package/node_modules/@xrkseek/server-http/dist/boot-inject.d.ts +6 -2
- package/node_modules/@xrkseek/server-http/dist/boot-inject.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js +6 -1
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js.map +1 -1
- 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 +4 -2
- 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 +1 -3
- 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 +36 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js +102 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-classifier.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.d.ts +5 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js +43 -17
- 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/chat-import.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js +23 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js +16 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-boot.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-boot.js +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-boot.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts +4 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +33 -6
- 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/dsh-path-capabilities.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js +0 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js.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 +1 -1
- 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.d.ts +13 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.js +254 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-browser-runtime.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-npm-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-npm-bridge.js +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui-npm-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js +4 -5
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.d.ts +9 -11
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.js +19 -47
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.js +3 -15
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-local-ws.d.ts +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-local-ws.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-local-ws.js +165 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-gateway-local-ws.js.map +1 -0
- 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 +11 -2
- 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/im-long-lived-gateway.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-long-lived-gateway.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-long-lived-gateway.js +23 -33
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-long-lived-gateway.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.d.ts +9 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.js +36 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-vendors.d.ts +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-vendors.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-vendors.js +13 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-vendors.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +4 -2
- 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 +3 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js +12 -8
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-engine.d.ts +40 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-engine.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-engine.js +139 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-engine.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js +137 -27
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.js +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.js +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-python-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-python-bridge.js +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-python-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js +45 -15
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.d.ts +1 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.js +3 -23
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/json-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js +14 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire-normalize.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire-normalize.js +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire-normalize.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/host-policy-error.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/host-policy-error.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/host-policy-error.js +19 -0
- package/node_modules/@xrkseek/server-http/dist/host-policy-error.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/host-wire.js +18 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts +3 -3
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +3 -3
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/index.d.ts +5 -2
- package/node_modules/@xrkseek/server-http/dist/sidebar/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/index.js +4 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/office-to-pdf.d.ts +23 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/office-to-pdf.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/office-to-pdf.js +103 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/office-to-pdf.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.d.ts +26 -4
- 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 +158 -11
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-browser.d.ts +5 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-browser.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-browser.js +0 -4
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-browser.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-face-bridge.d.ts +45 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-face-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-git.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-git.js +2 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-git.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-html.d.ts +4 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-html.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-html.js +24 -2
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-html.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-policy.d.ts +41 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-policy.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-policy.js +60 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-policy.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-prefs-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-prefs-store.js +1 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-prefs-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts +0 -6
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js +1 -10
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.d.ts +0 -11
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.js +8 -4
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.js +2 -8
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.js.map +1 -1
- package/node_modules/@xrkseek/server-http/package.json +42 -40
- package/node_modules/@xrkseek/server-loader/dist/hooks.d.ts +32 -0
- package/node_modules/@xrkseek/server-loader/dist/hooks.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/hooks.js +70 -0
- package/node_modules/@xrkseek/server-loader/dist/hooks.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts +19 -4
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.js +42 -8
- package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/kinds.d.ts +5 -2
- package/node_modules/@xrkseek/server-loader/dist/kinds.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/kinds.js +6 -1
- package/node_modules/@xrkseek/server-loader/dist/kinds.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/lifecycle-webhooks.d.ts +63 -0
- package/node_modules/@xrkseek/server-loader/dist/lifecycle-webhooks.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/lifecycle-webhooks.js +185 -0
- package/node_modules/@xrkseek/server-loader/dist/lifecycle-webhooks.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/load-failures.d.ts +54 -0
- package/node_modules/@xrkseek/server-loader/dist/load-failures.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/load-failures.js +50 -0
- package/node_modules/@xrkseek/server-loader/dist/load-failures.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/load.d.ts +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.js +33 -7
- package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts +9 -2
- package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/managed-state.js +27 -4
- package/node_modules/@xrkseek/server-loader/dist/managed-state.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/manifest.d.ts +5 -0
- package/node_modules/@xrkseek/server-loader/dist/manifest.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/manifest.js +3 -3
- package/node_modules/@xrkseek/server-loader/dist/manifest.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/policy.d.ts +13 -4
- package/node_modules/@xrkseek/server-loader/dist/policy.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/policy.js +21 -3
- package/node_modules/@xrkseek/server-loader/dist/policy.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts +49 -0
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js +248 -0
- package/node_modules/@xrkseek/server-loader/dist/shell-hooks.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/startup-audit.d.ts +46 -0
- package/node_modules/@xrkseek/server-loader/dist/startup-audit.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/startup-audit.js +121 -0
- package/node_modules/@xrkseek/server-loader/dist/startup-audit.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/types.d.ts +25 -1
- package/node_modules/@xrkseek/server-loader/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts +1 -3
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/session-projection/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/session-telemetry/README.md +11 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts +28 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.js +80 -0
- package/node_modules/@xrkseek/session-telemetry/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/memory.d.ts +11 -0
- package/node_modules/@xrkseek/session-telemetry/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/memory.js +18 -0
- package/node_modules/@xrkseek/session-telemetry/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/otlp-http.d.ts +26 -0
- package/node_modules/@xrkseek/session-telemetry/dist/otlp-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/otlp-http.js +161 -0
- package/node_modules/@xrkseek/session-telemetry/dist/otlp-http.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/record.d.ts +8 -0
- package/node_modules/@xrkseek/session-telemetry/dist/record.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/record.js +54 -0
- package/node_modules/@xrkseek/session-telemetry/dist/record.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/types.d.ts +33 -0
- package/node_modules/@xrkseek/session-telemetry/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/types.js +13 -0
- package/node_modules/@xrkseek/session-telemetry/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts +14 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js +52 -0
- package/node_modules/@xrkseek/session-telemetry/dist/wrap-store.js.map +1 -0
- package/node_modules/@xrkseek/session-telemetry/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 -1
- package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +3 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +3 -1
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts +2 -1
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js +9 -4
- package/node_modules/@xrkseek/workspace/dist/inject-fingerprint.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts +15 -2
- package/node_modules/@xrkseek/workspace/dist/inject-sources.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/inject-sources.js +23 -5
- package/node_modules/@xrkseek/workspace/dist/inject-sources.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.js +3 -1
- package/node_modules/@xrkseek/workspace/dist/skill-dirs.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-install.d.ts +61 -0
- package/node_modules/@xrkseek/workspace/dist/skill-install.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/skill-install.js +346 -0
- package/node_modules/@xrkseek/workspace/dist/skill-install.js.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/tool-output-persist.d.ts +1 -5
- package/node_modules/@xrkseek/workspace/dist/tool-output-persist.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/tool-output-persist.js +10 -22
- package/node_modules/@xrkseek/workspace/dist/tool-output-persist.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/user-product-home.d.ts +18 -0
- package/node_modules/@xrkseek/workspace/dist/user-product-home.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/user-product-home.js +45 -0
- package/node_modules/@xrkseek/workspace/dist/user-product-home.js.map +1 -0
- package/node_modules/@xrkseek/workspace/package.json +28 -27
- package/node_modules/@xrkseek/xrk-home-paths/README.md +4 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/index.d.ts +44 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/index.js +83 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/spill-budget.d.ts +22 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/spill-budget.d.ts.map +1 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/spill-budget.js +139 -0
- package/node_modules/@xrkseek/xrk-home-paths/dist/spill-budget.js.map +1 -0
- package/node_modules/@xrkseek/xrk-home-paths/package.json +24 -0
- package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.d.ts +0 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.d.ts.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.js +0 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/prepare-face.js.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts +3 -2
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +11 -21
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/package.json +56 -55
- package/node_modules/smol-toml/LICENSE +24 -0
- package/node_modules/smol-toml/README.md +418 -0
- package/node_modules/smol-toml/dist/date.d.ts +41 -0
- package/node_modules/smol-toml/dist/date.js +127 -0
- package/node_modules/smol-toml/dist/error.d.ts +38 -0
- package/node_modules/smol-toml/dist/error.js +63 -0
- package/node_modules/smol-toml/dist/extract.js +69 -0
- package/node_modules/smol-toml/dist/index.cjs +734 -0
- package/node_modules/smol-toml/dist/index.d.ts +43 -0
- package/node_modules/smol-toml/dist/index.js +33 -0
- package/node_modules/smol-toml/dist/parse.d.ts +36 -0
- package/node_modules/smol-toml/dist/parse.js +149 -0
- package/node_modules/smol-toml/dist/primitive.js +238 -0
- package/node_modules/smol-toml/dist/stringify.d.ts +31 -0
- package/node_modules/smol-toml/dist/stringify.js +181 -0
- package/node_modules/smol-toml/dist/struct.js +179 -0
- package/node_modules/smol-toml/dist/util.d.ts +38 -0
- package/node_modules/smol-toml/dist/util.js +89 -0
- package/node_modules/smol-toml/package.json +68 -0
- package/package.json +21 -1
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hard cap on `tools/list` pages per discovery (cycle detection alone is not
|
|
3
|
+
* enough when every cursor is unique). Matches a conservative MCP client bound.
|
|
4
|
+
*/
|
|
5
|
+
export const MAX_TOOLS_LIST_PAGES = 100;
|
|
1
6
|
/**
|
|
2
7
|
* Drain paginated `tools/list` into one generation.
|
|
3
8
|
* A repeated `nextCursor` rejects without returning a partial list — callers
|
|
4
9
|
* that already registered tools keep the previous generation (register watch).
|
|
10
|
+
* Exceeding {@link MAX_TOOLS_LIST_PAGES} also rejects (non-terminating pagination).
|
|
5
11
|
*/
|
|
6
12
|
export async function drainToolsListPages(serverName, fetchPage) {
|
|
7
13
|
const seenCursors = new Set();
|
|
8
14
|
const byName = new Map();
|
|
9
15
|
let cursor;
|
|
16
|
+
let pages = 0;
|
|
10
17
|
do {
|
|
18
|
+
pages += 1;
|
|
19
|
+
if (pages > MAX_TOOLS_LIST_PAGES) {
|
|
20
|
+
throw new Error(`mcp-client(${serverName}): tools/list exceeded ${MAX_TOOLS_LIST_PAGES} pages — invalid tool list`);
|
|
21
|
+
}
|
|
11
22
|
const page = await fetchPage(cursor);
|
|
12
23
|
for (const tool of page.tools) {
|
|
13
24
|
if (byName.has(tool.name)) {
|
|
@@ -28,4 +39,33 @@ export async function drainToolsListPages(serverName, fetchPage) {
|
|
|
28
39
|
} while (cursor !== undefined);
|
|
29
40
|
return [...byName.values()];
|
|
30
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* True when `tools/list` is unsupported (no tools capability, or MethodNotFound).
|
|
44
|
+
* Empty tool lists from capable servers are not treated as unsupported.
|
|
45
|
+
*/
|
|
46
|
+
export function isToolsListUnsupported(error) {
|
|
47
|
+
if (!error || typeof error !== "object")
|
|
48
|
+
return false;
|
|
49
|
+
const err = error;
|
|
50
|
+
if (err.code === -32601)
|
|
51
|
+
return true;
|
|
52
|
+
const message = String(err.message ?? "");
|
|
53
|
+
return (/MethodNotFound/i.test(message) ||
|
|
54
|
+
/does not support tools/i.test(message) ||
|
|
55
|
+
/method not found/i.test(message));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* True when a resources/* method is unsupported (MethodNotFound / capability).
|
|
59
|
+
*/
|
|
60
|
+
export function isResourcesUnsupported(error) {
|
|
61
|
+
if (!error || typeof error !== "object")
|
|
62
|
+
return false;
|
|
63
|
+
const err = error;
|
|
64
|
+
if (err.code === -32601)
|
|
65
|
+
return true;
|
|
66
|
+
const message = String(err.message ?? "");
|
|
67
|
+
return (/MethodNotFound/i.test(message) ||
|
|
68
|
+
/does not support resources/i.test(message) ||
|
|
69
|
+
/method not found/i.test(message));
|
|
70
|
+
}
|
|
31
71
|
//# sourceMappingURL=list-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-tools.js","sourceRoot":"","sources":["../src/list-tools.ts"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"list-tools.js","sourceRoot":"","sources":["../src/list-tools.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC;;;;;GAKG;AACH,MAAM,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,MAAM,KAAK,SAAS,EAAE;IAC/B,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,GAAG,GAAG,KAA8C,CAAC;IAC3D,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC1C,OAAO,CACL,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,yBAAyB,CAAC,IAAI,CAAC,OAAO,CAAC;QACvC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,GAAG,GAAG,KAA8C,CAAC;IAC3D,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;IAC1C,OAAO,CACL,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,6BAA6B,CAAC,IAAI,CAAC,OAAO,CAAC;QAC3C,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/** Endpoints + client identity for one authorization server. */
|
|
2
|
+
export interface McpDeviceCodeEndpoints {
|
|
3
|
+
/** RFC 8628 device authorization endpoint. */
|
|
4
|
+
readonly deviceAuthorizationUrl: string;
|
|
5
|
+
/** RFC 6749 token endpoint (also used for refresh). */
|
|
6
|
+
readonly tokenUrl: string;
|
|
7
|
+
readonly clientId: string;
|
|
8
|
+
readonly scopes?: readonly string[];
|
|
9
|
+
/** OAuth `resource` / `audience` param when the server expects it. */
|
|
10
|
+
readonly audience?: string;
|
|
11
|
+
}
|
|
12
|
+
/** What the human is shown while the flow is pending. */
|
|
13
|
+
export interface McpDeviceCodeStart {
|
|
14
|
+
readonly deviceCode: string;
|
|
15
|
+
readonly userCode: string;
|
|
16
|
+
readonly verificationUri: string;
|
|
17
|
+
/** Prefilled URL when the server returns `verification_uri_complete`. */
|
|
18
|
+
readonly verificationUriComplete?: string;
|
|
19
|
+
/** Seconds until the device code expires. */
|
|
20
|
+
readonly expiresIn: number;
|
|
21
|
+
/** Minimum seconds between polls. */
|
|
22
|
+
readonly interval: number;
|
|
23
|
+
}
|
|
24
|
+
/** A token set as persisted in the token store. */
|
|
25
|
+
export interface McpDeviceTokenSet {
|
|
26
|
+
readonly accessToken: string;
|
|
27
|
+
readonly tokenType: string;
|
|
28
|
+
readonly refreshToken?: string;
|
|
29
|
+
readonly scope?: string;
|
|
30
|
+
/** Epoch ms; absent when the server returned no `expires_in`. */
|
|
31
|
+
readonly expiresAt?: number;
|
|
32
|
+
}
|
|
33
|
+
export type McpDeviceCodeErrorCode = "device-authorization-failed" | "access-denied" | "expired-token" | "invalid-response" | "refresh-failed" | "aborted";
|
|
34
|
+
/** Failure with the OAuth error code preserved for callers / tests. */
|
|
35
|
+
export declare class McpDeviceCodeError extends Error {
|
|
36
|
+
readonly code: McpDeviceCodeErrorCode;
|
|
37
|
+
/** Raw OAuth `error` string when the failure came from the server. */
|
|
38
|
+
readonly oauthError?: string;
|
|
39
|
+
constructor(code: McpDeviceCodeErrorCode, message: string, oauthError?: string);
|
|
40
|
+
}
|
|
41
|
+
/** Injected side effects; all optional so prod callers pass nothing. */
|
|
42
|
+
export interface McpDeviceCodeDeps {
|
|
43
|
+
readonly fetch?: typeof fetch;
|
|
44
|
+
/** Epoch-ms clock (tests advance it with the fake sleep). */
|
|
45
|
+
readonly now?: () => number;
|
|
46
|
+
readonly sleep?: (ms: number) => Promise<void>;
|
|
47
|
+
/** Called once with the user code the human must approve. */
|
|
48
|
+
readonly onPrompt?: (start: McpDeviceCodeStart) => void;
|
|
49
|
+
/** Called before each poll after the first (progress / backoff logging). */
|
|
50
|
+
readonly onPending?: (attempt: number, intervalMs: number) => void;
|
|
51
|
+
readonly signal?: AbortSignal;
|
|
52
|
+
}
|
|
53
|
+
/** `device_authorization` response → validated start record. */
|
|
54
|
+
export declare function parseDeviceCodeResponse(raw: unknown): McpDeviceCodeStart;
|
|
55
|
+
/** Token endpoint JSON → validated token set (`expiresAt` from the clock). */
|
|
56
|
+
export declare function parseTokenResponse(raw: unknown, now: () => number): McpDeviceTokenSet;
|
|
57
|
+
/** Throwing form of {@link parseDeviceCodeResponse}. */
|
|
58
|
+
export declare function assertDeviceCodeResponse(raw: unknown): McpDeviceCodeStart;
|
|
59
|
+
/** Step 1: ask the authorization server for a user code. */
|
|
60
|
+
export declare function startDeviceAuthorization(endpoints: McpDeviceCodeEndpoints, deps?: McpDeviceCodeDeps): Promise<McpDeviceCodeStart>;
|
|
61
|
+
/**
|
|
62
|
+
* Step 2: poll the token endpoint until the human approves, honoring
|
|
63
|
+
* `authorization_pending` / `slow_down` per RFC 8628 and the device-code
|
|
64
|
+
* deadline. `sleep` advances the injected clock in tests.
|
|
65
|
+
*/
|
|
66
|
+
export declare function pollDeviceToken(endpoints: McpDeviceCodeEndpoints, start: McpDeviceCodeStart, deps?: McpDeviceCodeDeps): Promise<McpDeviceTokenSet>;
|
|
67
|
+
/** Full login: start, announce the user code, then poll to completion. */
|
|
68
|
+
export declare function loginWithDeviceCode(endpoints: McpDeviceCodeEndpoints, deps?: McpDeviceCodeDeps): Promise<{
|
|
69
|
+
start: McpDeviceCodeStart;
|
|
70
|
+
tokens: McpDeviceTokenSet;
|
|
71
|
+
}>;
|
|
72
|
+
/** Exchange a refresh token (no device code involved). */
|
|
73
|
+
export declare function refreshDeviceToken(endpoints: McpDeviceCodeEndpoints, refreshToken: string, deps?: McpDeviceCodeDeps): Promise<McpDeviceTokenSet>;
|
|
74
|
+
/** True when the token is absent an expiry or is inside the skew window. */
|
|
75
|
+
export declare function isTokenExpired(tokens: McpDeviceTokenSet | undefined, now?: () => number, skewMs?: number): boolean;
|
|
76
|
+
/** Request headers for the MCP HTTP transport. */
|
|
77
|
+
export declare function deviceAuthorizationHeaders(tokens: McpDeviceTokenSet): Record<string, string>;
|
|
78
|
+
/**
|
|
79
|
+
* Merge auth headers onto a transport `requestInit` without dropping any
|
|
80
|
+
* caller-supplied headers (case-insensitive, via `Headers`).
|
|
81
|
+
* Returns `undefined` when there is nothing to send.
|
|
82
|
+
*/
|
|
83
|
+
export declare function mergeAuthHeaders(requestInit: RequestInit | undefined, headers: Readonly<Record<string, string>> | undefined): RequestInit | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Token store for one MCP server: JSON sidecar beside the session dir.
|
|
86
|
+
* `headers()` refreshes through the injected fetch when the access token is
|
|
87
|
+
* expired and a refresh token is available.
|
|
88
|
+
*/
|
|
89
|
+
export declare class McpDeviceTokenStore {
|
|
90
|
+
private readonly persistPath?;
|
|
91
|
+
private tokens;
|
|
92
|
+
constructor(persistPath?: string | undefined);
|
|
93
|
+
get(): McpDeviceTokenSet | undefined;
|
|
94
|
+
set(tokens: McpDeviceTokenSet | undefined): void;
|
|
95
|
+
clear(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Headers to attach to the transport `requestInit`.
|
|
98
|
+
* Refreshes first when expired and a refresh token + endpoints are given.
|
|
99
|
+
*/
|
|
100
|
+
headers(endpoints?: McpDeviceCodeEndpoints, deps?: McpDeviceCodeDeps): Promise<Record<string, string>>;
|
|
101
|
+
private load;
|
|
102
|
+
private save;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=oauth-device.d.ts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OAAO,CACX,SAAS,CAAC,EAAE,sBAAsB,EAClC,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAalC,OAAO,CAAC,IAAI;IAcZ,OAAO,CAAC,IAAI;CAOb"}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP HTTP OAuth 2.0 device authorization grant (RFC 8628).
|
|
3
|
+
*
|
|
4
|
+
* Remote MCP servers behind an IdP cannot open a browser on the Host box, so
|
|
5
|
+
* the login runs as a device-code flow: the Host prints a short user code, the
|
|
6
|
+
* human approves it on any device, and the Host polls for a bearer token.
|
|
7
|
+
*
|
|
8
|
+
* Everything the flow touches is injected (`fetch` · `sleep` · `now` ·
|
|
9
|
+
* `onPrompt`), so the poll loop is deterministic under test and the module
|
|
10
|
+
* stays free of globals, timers, and console output.
|
|
11
|
+
*/
|
|
12
|
+
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { dirname } from "node:path";
|
|
14
|
+
/** Failure with the OAuth error code preserved for callers / tests. */
|
|
15
|
+
export class McpDeviceCodeError extends Error {
|
|
16
|
+
code;
|
|
17
|
+
/** Raw OAuth `error` string when the failure came from the server. */
|
|
18
|
+
oauthError;
|
|
19
|
+
constructor(code, message, oauthError) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.name = "McpDeviceCodeError";
|
|
22
|
+
this.code = code;
|
|
23
|
+
if (oauthError !== undefined)
|
|
24
|
+
this.oauthError = oauthError;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const DEFAULT_INTERVAL_SECONDS = 5;
|
|
28
|
+
const SLOW_DOWN_STEP_SECONDS = 5;
|
|
29
|
+
const EXPIRY_SKEW_MS = 30_000;
|
|
30
|
+
function asRecord(raw) {
|
|
31
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
32
|
+
return undefined;
|
|
33
|
+
return raw;
|
|
34
|
+
}
|
|
35
|
+
function readString(source, key) {
|
|
36
|
+
const value = source[key];
|
|
37
|
+
if (typeof value !== "string")
|
|
38
|
+
return undefined;
|
|
39
|
+
const trimmed = value.trim();
|
|
40
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
41
|
+
}
|
|
42
|
+
function readNumber(source, key) {
|
|
43
|
+
const value = source[key];
|
|
44
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
45
|
+
return value;
|
|
46
|
+
if (typeof value === "string" && value.trim()) {
|
|
47
|
+
const parsed = Number(value);
|
|
48
|
+
if (Number.isFinite(parsed))
|
|
49
|
+
return parsed;
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
/** `device_authorization` response → validated start record. */
|
|
54
|
+
export function parseDeviceCodeResponse(raw) {
|
|
55
|
+
const body = asRecord(raw);
|
|
56
|
+
if (!body) {
|
|
57
|
+
throw new McpDeviceCodeError("invalid-response", "device authorization returned a non-object body");
|
|
58
|
+
}
|
|
59
|
+
const deviceCode = readString(body, "device_code");
|
|
60
|
+
const userCode = readString(body, "user_code");
|
|
61
|
+
const verificationUri = readString(body, "verification_uri") ?? readString(body, "verification_url");
|
|
62
|
+
if (!deviceCode || !userCode || !verificationUri) {
|
|
63
|
+
throw new McpDeviceCodeError("invalid-response", "device authorization response missing device_code / user_code / verification_uri");
|
|
64
|
+
}
|
|
65
|
+
const complete = readString(body, "verification_uri_complete");
|
|
66
|
+
const expiresIn = readNumber(body, "expires_in") ?? 600;
|
|
67
|
+
const interval = readNumber(body, "interval") ?? DEFAULT_INTERVAL_SECONDS;
|
|
68
|
+
return {
|
|
69
|
+
deviceCode,
|
|
70
|
+
userCode,
|
|
71
|
+
verificationUri,
|
|
72
|
+
...(complete ? { verificationUriComplete: complete } : {}),
|
|
73
|
+
expiresIn: expiresIn > 0 ? expiresIn : 600,
|
|
74
|
+
interval: interval > 0 ? interval : DEFAULT_INTERVAL_SECONDS,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** Token endpoint JSON → validated token set (`expiresAt` from the clock). */
|
|
78
|
+
export function parseTokenResponse(raw, now) {
|
|
79
|
+
const body = asRecord(raw);
|
|
80
|
+
const accessToken = body ? readString(body, "access_token") : undefined;
|
|
81
|
+
if (!body || !accessToken) {
|
|
82
|
+
throw new McpDeviceCodeError("invalid-response", "token response missing access_token");
|
|
83
|
+
}
|
|
84
|
+
const expiresIn = readNumber(body, "expires_in");
|
|
85
|
+
const refreshToken = readString(body, "refresh_token");
|
|
86
|
+
const scope = readString(body, "scope");
|
|
87
|
+
const tokenType = readString(body, "token_type") ?? "Bearer";
|
|
88
|
+
return {
|
|
89
|
+
accessToken,
|
|
90
|
+
tokenType,
|
|
91
|
+
...(refreshToken ? { refreshToken } : {}),
|
|
92
|
+
...(scope ? { scope } : {}),
|
|
93
|
+
...(expiresIn !== undefined && expiresIn > 0
|
|
94
|
+
? { expiresAt: now() + expiresIn * 1000 }
|
|
95
|
+
: {}),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function formBody(fields) {
|
|
99
|
+
const params = new URLSearchParams();
|
|
100
|
+
for (const [key, value] of Object.entries(fields))
|
|
101
|
+
params.set(key, value);
|
|
102
|
+
return params.toString();
|
|
103
|
+
}
|
|
104
|
+
async function postForm(url, fields, deps) {
|
|
105
|
+
const doFetch = deps.fetch ?? fetch;
|
|
106
|
+
const response = await doFetch(url, {
|
|
107
|
+
method: "POST",
|
|
108
|
+
headers: {
|
|
109
|
+
"content-type": "application/x-www-form-urlencoded",
|
|
110
|
+
accept: "application/json",
|
|
111
|
+
},
|
|
112
|
+
body: formBody(fields),
|
|
113
|
+
...(deps.signal ? { signal: deps.signal } : {}),
|
|
114
|
+
});
|
|
115
|
+
let body;
|
|
116
|
+
try {
|
|
117
|
+
body = await response.json();
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
body = undefined;
|
|
121
|
+
}
|
|
122
|
+
return { status: response.status, body };
|
|
123
|
+
}
|
|
124
|
+
function throwIfAborted(deps) {
|
|
125
|
+
if (deps.signal?.aborted) {
|
|
126
|
+
throw new McpDeviceCodeError("aborted", "device code login aborted");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Throwing form of {@link parseDeviceCodeResponse}. */
|
|
130
|
+
export function assertDeviceCodeResponse(raw) {
|
|
131
|
+
return parseDeviceCodeResponse(raw);
|
|
132
|
+
}
|
|
133
|
+
/** Step 1: ask the authorization server for a user code. */
|
|
134
|
+
export async function startDeviceAuthorization(endpoints, deps = {}) {
|
|
135
|
+
throwIfAborted(deps);
|
|
136
|
+
const fields = { client_id: endpoints.clientId };
|
|
137
|
+
if (endpoints.scopes && endpoints.scopes.length > 0) {
|
|
138
|
+
fields.scope = endpoints.scopes.join(" ");
|
|
139
|
+
}
|
|
140
|
+
if (endpoints.audience)
|
|
141
|
+
fields.resource = endpoints.audience;
|
|
142
|
+
const { status, body } = await postForm(endpoints.deviceAuthorizationUrl, fields, deps);
|
|
143
|
+
if (status >= 400) {
|
|
144
|
+
const err = asRecord(body);
|
|
145
|
+
throw new McpDeviceCodeError("device-authorization-failed", `device authorization failed with HTTP ${status}`, err ? readString(err, "error") : undefined);
|
|
146
|
+
}
|
|
147
|
+
return parseDeviceCodeResponse(body);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Step 2: poll the token endpoint until the human approves, honoring
|
|
151
|
+
* `authorization_pending` / `slow_down` per RFC 8628 and the device-code
|
|
152
|
+
* deadline. `sleep` advances the injected clock in tests.
|
|
153
|
+
*/
|
|
154
|
+
export async function pollDeviceToken(endpoints, start, deps = {}) {
|
|
155
|
+
const now = deps.now ?? (() => Date.now());
|
|
156
|
+
const sleep = deps.sleep ??
|
|
157
|
+
((ms) => new Promise((resolve) => {
|
|
158
|
+
setTimeout(resolve, ms);
|
|
159
|
+
}));
|
|
160
|
+
const deadline = now() + start.expiresIn * 1000;
|
|
161
|
+
let intervalSeconds = start.interval;
|
|
162
|
+
let attempt = 0;
|
|
163
|
+
for (;;) {
|
|
164
|
+
throwIfAborted(deps);
|
|
165
|
+
await sleep(intervalSeconds * 1000);
|
|
166
|
+
throwIfAborted(deps);
|
|
167
|
+
attempt += 1;
|
|
168
|
+
const { status, body } = await postForm(endpoints.tokenUrl, {
|
|
169
|
+
client_id: endpoints.clientId,
|
|
170
|
+
device_code: start.deviceCode,
|
|
171
|
+
grant_type: "urn:ietf:params:oauth:grant-type:device_code",
|
|
172
|
+
}, deps);
|
|
173
|
+
if (status < 400)
|
|
174
|
+
return parseTokenResponse(body, now);
|
|
175
|
+
const err = asRecord(body);
|
|
176
|
+
const code = err ? readString(err, "error") : undefined;
|
|
177
|
+
if (code === "authorization_pending") {
|
|
178
|
+
deps.onPending?.(attempt, intervalSeconds * 1000);
|
|
179
|
+
if (now() >= deadline) {
|
|
180
|
+
throw new McpDeviceCodeError("expired-token", "device code expired before approval", code);
|
|
181
|
+
}
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
if (code === "slow_down") {
|
|
185
|
+
intervalSeconds += SLOW_DOWN_STEP_SECONDS;
|
|
186
|
+
deps.onPending?.(attempt, intervalSeconds * 1000);
|
|
187
|
+
if (now() >= deadline) {
|
|
188
|
+
throw new McpDeviceCodeError("expired-token", "device code expired before approval", code);
|
|
189
|
+
}
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
if (code === "access_denied") {
|
|
193
|
+
throw new McpDeviceCodeError("access-denied", "device code authorization was denied", code);
|
|
194
|
+
}
|
|
195
|
+
if (code === "expired_token") {
|
|
196
|
+
throw new McpDeviceCodeError("expired-token", "device code expired before approval", code);
|
|
197
|
+
}
|
|
198
|
+
throw new McpDeviceCodeError("device-authorization-failed", `token request failed with HTTP ${status}`, code);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/** Full login: start, announce the user code, then poll to completion. */
|
|
202
|
+
export async function loginWithDeviceCode(endpoints, deps = {}) {
|
|
203
|
+
const start = await startDeviceAuthorization(endpoints, deps);
|
|
204
|
+
deps.onPrompt?.(start);
|
|
205
|
+
const tokens = await pollDeviceToken(endpoints, start, deps);
|
|
206
|
+
return { start, tokens };
|
|
207
|
+
}
|
|
208
|
+
/** Exchange a refresh token (no device code involved). */
|
|
209
|
+
export async function refreshDeviceToken(endpoints, refreshToken, deps = {}) {
|
|
210
|
+
const now = deps.now ?? (() => Date.now());
|
|
211
|
+
throwIfAborted(deps);
|
|
212
|
+
const { status, body } = await postForm(endpoints.tokenUrl, {
|
|
213
|
+
client_id: endpoints.clientId,
|
|
214
|
+
grant_type: "refresh_token",
|
|
215
|
+
refresh_token: refreshToken,
|
|
216
|
+
}, deps);
|
|
217
|
+
if (status >= 400) {
|
|
218
|
+
const err = asRecord(body);
|
|
219
|
+
throw new McpDeviceCodeError("refresh-failed", `token refresh failed with HTTP ${status}`, err ? readString(err, "error") : undefined);
|
|
220
|
+
}
|
|
221
|
+
const fresh = parseTokenResponse(body, now);
|
|
222
|
+
// A refresh response often omits refresh_token; keep the old one.
|
|
223
|
+
return fresh.refreshToken ? fresh : { ...fresh, refreshToken };
|
|
224
|
+
}
|
|
225
|
+
/** True when the token is absent an expiry or is inside the skew window. */
|
|
226
|
+
export function isTokenExpired(tokens, now = () => Date.now(), skewMs = EXPIRY_SKEW_MS) {
|
|
227
|
+
if (!tokens?.accessToken)
|
|
228
|
+
return true;
|
|
229
|
+
if (tokens.expiresAt === undefined)
|
|
230
|
+
return false;
|
|
231
|
+
return now() >= tokens.expiresAt - skewMs;
|
|
232
|
+
}
|
|
233
|
+
/** Request headers for the MCP HTTP transport. */
|
|
234
|
+
export function deviceAuthorizationHeaders(tokens) {
|
|
235
|
+
const scheme = tokens.tokenType?.trim() || "Bearer";
|
|
236
|
+
return { authorization: `${scheme} ${tokens.accessToken}` };
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Merge auth headers onto a transport `requestInit` without dropping any
|
|
240
|
+
* caller-supplied headers (case-insensitive, via `Headers`).
|
|
241
|
+
* Returns `undefined` when there is nothing to send.
|
|
242
|
+
*/
|
|
243
|
+
export function mergeAuthHeaders(requestInit, headers) {
|
|
244
|
+
const entries = headers ? Object.entries(headers) : [];
|
|
245
|
+
if (entries.length === 0)
|
|
246
|
+
return requestInit;
|
|
247
|
+
const merged = new Headers(requestInit?.headers);
|
|
248
|
+
for (const [key, value] of entries)
|
|
249
|
+
merged.set(key, value);
|
|
250
|
+
return { ...requestInit, headers: merged };
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Best-effort atomic JSON write (tmp + rename) so a crash cannot leave a
|
|
254
|
+
* truncated token file. Persisting tokens is never session truth: failures
|
|
255
|
+
* are swallowed and the caller stays logged in for this process.
|
|
256
|
+
*/
|
|
257
|
+
function writeJsonAtomic(file, payload) {
|
|
258
|
+
try {
|
|
259
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
260
|
+
const tmp = `${file}.tmp-${process.pid}`;
|
|
261
|
+
writeFileSync(tmp, `${JSON.stringify(payload, null, 2)}\n`, "utf8");
|
|
262
|
+
renameSync(tmp, file);
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
try {
|
|
266
|
+
rmSync(`${file}.tmp-${process.pid}`, { force: true });
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
/* best effort */
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Token store for one MCP server: JSON sidecar beside the session dir.
|
|
275
|
+
* `headers()` refreshes through the injected fetch when the access token is
|
|
276
|
+
* expired and a refresh token is available.
|
|
277
|
+
*/
|
|
278
|
+
export class McpDeviceTokenStore {
|
|
279
|
+
persistPath;
|
|
280
|
+
tokens;
|
|
281
|
+
constructor(persistPath) {
|
|
282
|
+
this.persistPath = persistPath;
|
|
283
|
+
if (persistPath)
|
|
284
|
+
this.load();
|
|
285
|
+
}
|
|
286
|
+
get() {
|
|
287
|
+
return this.tokens;
|
|
288
|
+
}
|
|
289
|
+
set(tokens) {
|
|
290
|
+
this.tokens = tokens;
|
|
291
|
+
this.save();
|
|
292
|
+
}
|
|
293
|
+
clear() {
|
|
294
|
+
this.set(undefined);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Headers to attach to the transport `requestInit`.
|
|
298
|
+
* Refreshes first when expired and a refresh token + endpoints are given.
|
|
299
|
+
*/
|
|
300
|
+
async headers(endpoints, deps = {}) {
|
|
301
|
+
const current = this.tokens;
|
|
302
|
+
if (!current)
|
|
303
|
+
return {};
|
|
304
|
+
const now = deps.now ?? (() => Date.now());
|
|
305
|
+
if (!isTokenExpired(current, now))
|
|
306
|
+
return deviceAuthorizationHeaders(current);
|
|
307
|
+
if (!endpoints || !current.refreshToken) {
|
|
308
|
+
return deviceAuthorizationHeaders(current);
|
|
309
|
+
}
|
|
310
|
+
const refreshed = await refreshDeviceToken(endpoints, current.refreshToken, deps);
|
|
311
|
+
this.set(refreshed);
|
|
312
|
+
return deviceAuthorizationHeaders(refreshed);
|
|
313
|
+
}
|
|
314
|
+
load() {
|
|
315
|
+
const file = this.persistPath;
|
|
316
|
+
if (!file)
|
|
317
|
+
return;
|
|
318
|
+
try {
|
|
319
|
+
const raw = JSON.parse(readFileSync(file, "utf8"));
|
|
320
|
+
const tokens = raw.tokens;
|
|
321
|
+
if (tokens && typeof tokens.accessToken === "string" && tokens.accessToken) {
|
|
322
|
+
this.tokens = tokens;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
catch {
|
|
326
|
+
/* missing / corrupt sidecar → logged out */
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
save() {
|
|
330
|
+
const file = this.persistPath;
|
|
331
|
+
if (!file)
|
|
332
|
+
return;
|
|
333
|
+
writeJsonAtomic(file, {
|
|
334
|
+
...(this.tokens ? { tokens: this.tokens } : {}),
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=oauth-device.js.map
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AC;YACxC,OAAO,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAClF,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpB,OAAO,0BAA0B,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAEO,IAAI;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAmB,CAAC;YACrE,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;YAC1B,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;gBAC3E,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACvB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,4CAA4C;QAC9C,CAAC;IACH,CAAC;IAEO,IAAI;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,eAAe,CAAC,IAAI,EAAE;YACpB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvB,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP OAuth discovery: RFC 9728 protected-resource metadata + RFC 8414 /
|
|
3
|
+
* OIDC authorization-server metadata.
|
|
4
|
+
*
|
|
5
|
+
* An HTTP MCP server that needs OAuth publishes (a) which authorization
|
|
6
|
+
* servers it trusts and (b) where to log in. Rather than making the operator
|
|
7
|
+
* hand-copy three endpoints, the Host walks the same well-known documents a
|
|
8
|
+
* spec-compliant client does and hands back {@link McpDeviceCodeEndpoints}.
|
|
9
|
+
*
|
|
10
|
+
* `fetch` (and an optional `signal`) are injected, so the walk is deterministic
|
|
11
|
+
* under test and the module has no globals.
|
|
12
|
+
*/
|
|
13
|
+
import type { McpDeviceCodeEndpoints } from "./oauth-device.js";
|
|
14
|
+
/** RFC 9728 protected-resource metadata, narrowed to what a login needs. */
|
|
15
|
+
export interface McpProtectedResourceMetadata {
|
|
16
|
+
/** Canonical resource identifier (used as the OAuth `resource` audience). */
|
|
17
|
+
readonly resource?: string;
|
|
18
|
+
readonly authorizationServers: readonly string[];
|
|
19
|
+
readonly scopesSupported: readonly string[];
|
|
20
|
+
/** Document URL the metadata was read from (or the `resource_metadata` hint). */
|
|
21
|
+
readonly metadataUrl?: string;
|
|
22
|
+
}
|
|
23
|
+
/** RFC 8414 / OIDC authorization-server metadata, narrowed to a login need. */
|
|
24
|
+
export interface McpAuthorizationServerMetadata {
|
|
25
|
+
readonly issuer?: string;
|
|
26
|
+
readonly deviceAuthorizationUrl: string;
|
|
27
|
+
readonly tokenUrl: string;
|
|
28
|
+
readonly registrationUrl?: string;
|
|
29
|
+
readonly scopesSupported: readonly string[];
|
|
30
|
+
/** Document URL the metadata was read from. */
|
|
31
|
+
readonly metadataUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
export type McpOAuthDiscoveryErrorCode =
|
|
34
|
+
/** A document was not an object, or was missing a required field. */
|
|
35
|
+
"invalid-response"
|
|
36
|
+
/** A document could not be fetched (network error / non-2xx everywhere). */
|
|
37
|
+
| "request-failed"
|
|
38
|
+
/** Fetched documents were fine but do not describe a device-code login. */
|
|
39
|
+
| "unsupported";
|
|
40
|
+
/** Failure with a stable code so callers can print an actionable message. */
|
|
41
|
+
export declare class McpOAuthDiscoveryError extends Error {
|
|
42
|
+
readonly code: McpOAuthDiscoveryErrorCode;
|
|
43
|
+
readonly status?: number;
|
|
44
|
+
constructor(code: McpOAuthDiscoveryErrorCode, message: string, status?: number);
|
|
45
|
+
}
|
|
46
|
+
/** Injected side effects; all optional so prod callers pass nothing. */
|
|
47
|
+
export interface McpOAuthDiscoveryDeps {
|
|
48
|
+
readonly fetch?: typeof fetch;
|
|
49
|
+
readonly signal?: AbortSignal;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Well-known paths for a resource, most specific first. RFC 9728 keeps the
|
|
53
|
+
* resource's path as a suffix; the bare origin form is the fallback.
|
|
54
|
+
*/
|
|
55
|
+
export declare function protectedResourceMetadataUrls(resourceUrl: string): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Well-known paths for an issuer, most specific first. RFC 8414 inserts the
|
|
58
|
+
* issuer path after the well-known segment; OIDC appends it after the issuer.
|
|
59
|
+
*/
|
|
60
|
+
export declare function authorizationServerMetadataUrls(issuerUrl: string): string[];
|
|
61
|
+
/** `Bearer resource_metadata="…"` from a 401 challenge, when present. */
|
|
62
|
+
export declare function parseResourceMetadataChallenge(header: string | null | undefined): string | undefined;
|
|
63
|
+
/** Throwing form for a protected-resource metadata document. */
|
|
64
|
+
export declare function parseProtectedResourceMetadata(raw: unknown): McpProtectedResourceMetadata;
|
|
65
|
+
/** Throwing form for an authorization-server metadata document. */
|
|
66
|
+
export declare function parseAuthorizationServerMetadata(raw: unknown): McpAuthorizationServerMetadata;
|
|
67
|
+
/** First well-known document that parses; the 401 challenge as a fallback. */
|
|
68
|
+
export declare function discoverProtectedResource(resourceUrl: string, deps?: McpOAuthDiscoveryDeps): Promise<McpProtectedResourceMetadata>;
|
|
69
|
+
/** First well-known authorization-server document that parses. */
|
|
70
|
+
export declare function discoverAuthorizationServerMetadata(issuerUrl: string, deps?: McpOAuthDiscoveryDeps): Promise<McpAuthorizationServerMetadata>;
|
|
71
|
+
export interface McpDeviceCodeDiscoveryInput {
|
|
72
|
+
/** URL of the MCP server (its transport endpoint). */
|
|
73
|
+
readonly resourceUrl: string;
|
|
74
|
+
readonly clientId: string;
|
|
75
|
+
/** Overrides `scopes_supported` from discovery. */
|
|
76
|
+
readonly scopes?: readonly string[];
|
|
77
|
+
/** Overrides the discovered `resource` audience. */
|
|
78
|
+
readonly audience?: string;
|
|
79
|
+
readonly deps?: McpOAuthDiscoveryDeps;
|
|
80
|
+
}
|
|
81
|
+
export interface McpDeviceCodeDiscoveryResult {
|
|
82
|
+
readonly endpoints: McpDeviceCodeEndpoints;
|
|
83
|
+
readonly protectedResource: McpProtectedResourceMetadata;
|
|
84
|
+
readonly authorizationServer: McpAuthorizationServerMetadata;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Full discovery: resource metadata → authorization server → token endpoints.
|
|
88
|
+
* The discovered `resource` becomes the `resource` audience param when the
|
|
89
|
+
* metadata names one, so audience-bound servers accept the token.
|
|
90
|
+
*/
|
|
91
|
+
export declare function discoverDeviceCodeEndpoints(input: McpDeviceCodeDiscoveryInput): Promise<McpDeviceCodeDiscoveryResult>;
|
|
92
|
+
//# sourceMappingURL=oauth-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-discovery.d.ts","sourceRoot":"","sources":["../src/oauth-discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,+EAA+E;AAC/E,MAAM,WAAW,8BAA8B;IAC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