@xrkseek/harness 0.4.11 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@xrkseek/a2a/README.md +8 -6
- package/node_modules/@xrkseek/a2a/dist/client.d.ts +1 -0
- package/node_modules/@xrkseek/a2a/dist/client.d.ts.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/client.js +36 -20
- package/node_modules/@xrkseek/a2a/dist/client.js.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/inbound.d.ts +9 -2
- package/node_modules/@xrkseek/a2a/dist/inbound.d.ts.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/inbound.js +86 -41
- package/node_modules/@xrkseek/a2a/dist/inbound.js.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/a2a/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/index.js +2 -1
- package/node_modules/@xrkseek/a2a/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/protocol.d.ts +9 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.d.ts.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/protocol.js +25 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.js.map +1 -1
- package/node_modules/@xrkseek/a2a/dist/task-store.d.ts +43 -0
- package/node_modules/@xrkseek/a2a/dist/task-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/task-store.js +105 -0
- package/node_modules/@xrkseek/a2a/dist/task-store.js.map +1 -0
- package/node_modules/@xrkseek/context-fragments/README.md +4 -2
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts +10 -2
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/context-fragments/dist/index.js +16 -11
- package/node_modules/@xrkseek/context-fragments/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts +5 -0
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.js +3 -0
- package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +11 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js +9 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/background.js +2 -2
- package/node_modules/@xrkseek/exec-computer-use/dist/background.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts +22 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js +75 -9
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/exec-computer-use/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js +2 -2
- package/node_modules/@xrkseek/exec-computer-use/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts +2 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.js +18 -2
- package/node_modules/@xrkseek/exec-computer-use/dist/memory.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts +15 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js +77 -22
- package/node_modules/@xrkseek/exec-computer-use/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts +5 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts +4 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js +138 -6
- package/node_modules/@xrkseek/exec-computer-use/dist/windows-uia.js.map +1 -1
- package/node_modules/@xrkseek/exec-environment/README.md +2 -2
- package/node_modules/@xrkseek/exec-environment/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-environment/dist/index.js +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-environment/dist/memory.d.ts +25 -0
- package/node_modules/@xrkseek/exec-environment/dist/memory.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/memory.js +290 -0
- package/node_modules/@xrkseek/exec-environment/dist/memory.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts +5 -3
- package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-environment/dist/resolve.js +13 -5
- package/node_modules/@xrkseek/exec-environment/dist/resolve.js.map +1 -1
- package/node_modules/@xrkseek/exec-environment/dist/types.d.ts +1 -1
- package/node_modules/@xrkseek/exec-environment/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-environment/package.json +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts +2 -0
- package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/read-image.js +69 -31
- package/node_modules/@xrkseek/exec-fs/dist/read-image.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js +10 -1
- package/node_modules/@xrkseek/exec-fs/dist/routing-prompt.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts +14 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js +28 -6
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/references.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/references.js +8 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/references.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.js +11 -7
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +2 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js +38 -14
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/package.json +2 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts +23 -3
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js +40 -5
- package/node_modules/@xrkseek/exec-sandbox/dist/bwrap.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/doctor.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +8 -0
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +13 -4
- package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -1
- package/node_modules/@xrkseek/exec-shell/dist/index.d.ts +6 -3
- package/node_modules/@xrkseek/exec-shell/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-shell/dist/index.js +40 -10
- package/node_modules/@xrkseek/exec-shell/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-subprocess/dist/index.d.ts +4 -0
- package/node_modules/@xrkseek/exec-subprocess/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-subprocess/dist/index.js +2 -0
- package/node_modules/@xrkseek/exec-subprocess/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js +6 -6
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +2 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js +26 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-cdp.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts +10 -2
- package/node_modules/@xrkseek/exec-web/dist/browser-session.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js +27 -4
- package/node_modules/@xrkseek/exec-web/dist/browser-session.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +43 -14
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/format.js +2 -1
- package/node_modules/@xrkseek/exec-web/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts +14 -0
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.js +21 -0
- package/node_modules/@xrkseek/llm/dist/reasoning-effort.js.map +1 -0
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +28 -4
- 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-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.js +3 -1
- package/node_modules/@xrkseek/protocol/dist/workspace-changes.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts +6 -2
- package/node_modules/@xrkseek/server-face/dist/attach-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/attach-http.js +120 -48
- package/node_modules/@xrkseek/server-face/dist/attach-http.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +18 -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 +6 -2
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/face-schema.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/face-schema.js.map +1 -1
- 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 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts +11 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.js +170 -4
- package/node_modules/@xrkseek/server-face/dist/handlers/remotes.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 -2
- 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 +7 -6
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.mts +3734 -0
- package/node_modules/@xrkseek/server-face/dist/index.d.mts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +7 -4
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +7 -4
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.mjs +22085 -0
- package/node_modules/@xrkseek/server-face/dist/index.mjs.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts +51 -0
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.js +104 -0
- package/node_modules/@xrkseek/server-face/dist/model-reasoning.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.d.ts +34 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.js +41 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-agent-presets.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts +5 -2
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js +13 -2
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +3 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/remote-event.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/remote-event.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/remote-event.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/remote-event.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +17 -4
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +14 -2
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.d.ts +14 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.js +71 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset-store.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset.d.ts +17 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset.js +50 -0
- package/node_modules/@xrkseek/server-face/dist/session-agent-preset.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-attachment.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/session-attachment.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-attachment.js +30 -7
- package/node_modules/@xrkseek/server-face/dist/session-attachment.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.js +2 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +6 -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 +68 -12
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +7 -3
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +25 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/types.d.ts +3 -0
- package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js +61 -3
- package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts +23 -2
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.js +37 -2
- package/node_modules/@xrkseek/server-face/dist/workspace-registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-store.js +4 -0
- package/node_modules/@xrkseek/server-face/dist/workspace-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/ws-heartbeat.d.ts +9 -3
- package/node_modules/@xrkseek/server-face/dist/ws-heartbeat.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/ws-heartbeat.js +11 -7
- package/node_modules/@xrkseek/server-face/dist/ws-heartbeat.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/ws-send-queue.d.ts +4 -9
- package/node_modules/@xrkseek/server-face/dist/ws-send-queue.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/ws-send-queue.js +12 -24
- package/node_modules/@xrkseek/server-face/dist/ws-send-queue.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/cron-http.d.ts +26 -0
- package/node_modules/@xrkseek/server-host/dist/cron-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/cron-http.js +77 -0
- package/node_modules/@xrkseek/server-host/dist/cron-http.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +222 -123
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts +8 -0
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js +33 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js +2 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-face-bridge.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts +2 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js +98 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-agent.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts +18 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js +141 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty-worker.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts +11 -4
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js +353 -2
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts +30 -0
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js +96 -0
- package/node_modules/@xrkseek/server-host/dist/win-fd-inherit.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +306 -11
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js +53 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.js +80 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/billing.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.js +152 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/code-server.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.js +31 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-plugin-root.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts +17 -3
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js +265 -8
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js +6 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.js +188 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-codex-ui.js.map +1 -0
- 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 +3 -3
- 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-context.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.js +117 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-context.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.js +381 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-email.js.map +1 -0
- 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 +43 -1
- 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/dsh-pet-legacy.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.js +173 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-pet-legacy.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.d.ts +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.js +209 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-skins.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.js +470 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-ssh.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.js +93 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-update.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.d.ts +27 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.js +213 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/free-search.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts +6 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js +92 -14
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts +1 -0
- 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 +72 -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/git-graph.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.js +341 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/git-graph.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.js +138 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-connect.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.js +85 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/install.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts +27 -0
- 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 +230 -52
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.js +182 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mcp-connector.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.d.ts +13 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.js +151 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/michengai.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts +6 -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 +34 -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 +2 -0
- 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 +271 -20
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js +105 -21
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.js +81 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/niulai-kws.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.js +378 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pet.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.js +229 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/remote-web-ui.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.js +300 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/server-deck.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js +10 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js +40 -9
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.js +428 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skills-manager.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.js +166 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-assets.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts +20 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.js +308 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-center.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.d.ts +32 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.js +183 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-discover.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js +20 -16
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.js +245 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/task-board.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js +116 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/token-usage-stats-dash.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js +5 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-json.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts +2 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js +2 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.js +65 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.js +114 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/univer-api.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts +3 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js +42 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts +6 -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 +68 -8
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.js +111 -26
- package/node_modules/@xrkseek/server-http/dist/fetch-dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/host-owned-paths.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/host-owned-paths.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/host-owned-paths.js +32 -0
- package/node_modules/@xrkseek/server-http/dist/host-owned-paths.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +1 -0
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- 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 +10 -0
- package/node_modules/@xrkseek/server-http/dist/sidebar/sidebar-adapter.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts +9 -0
- 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 +68 -21
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js.map +1 -1
- package/node_modules/@xrkseek/server-http/package.json +1 -0
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.js +5 -2
- package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts +11 -1
- package/node_modules/@xrkseek/server-loader/dist/managed-state.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/managed-state.js +11 -2
- package/node_modules/@xrkseek/server-loader/dist/managed-state.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +9 -0
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +4 -2
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts +32 -2
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js +69 -2
- package/node_modules/@xrkseek/workspace/dist/workspace-anchor.js.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/README.md +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts +5 -3
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.d.ts.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js +20 -17
- package/node_modules/@xrkseek/xrk-session-reference/dist/spill.js.map +1 -1
- package/node_modules/@xrkseek/xrk-session-reference/package.json +1 -1
- package/package.json +1 -1
- package/node_modules/@xrkseek/server-face/dist/opencode-zen.d.ts +0 -13
- package/node_modules/@xrkseek/server-face/dist/opencode-zen.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/opencode-zen.js +0 -40
- package/node_modules/@xrkseek/server-face/dist/opencode-zen.js.map +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
2
|
+
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
3
|
+
import { httpMethod, parseJsonBody } from "./underlying/http-kit.js";
|
|
4
|
+
import { DSH_COMPAT_ADAPTER } from "./meta.js";
|
|
5
|
+
const STORE = createXrkDocStore(["dsh-univer-office", "state.json"], {
|
|
6
|
+
lastStartAttemptAt: null,
|
|
7
|
+
startAttempts: 0,
|
|
8
|
+
});
|
|
9
|
+
function stoppedGateway() {
|
|
10
|
+
return {
|
|
11
|
+
phase: "stopped",
|
|
12
|
+
gateway: null,
|
|
13
|
+
owned: false,
|
|
14
|
+
pid: null,
|
|
15
|
+
port: null,
|
|
16
|
+
baseUrl: null,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function isUniverApiPath(pathname) {
|
|
20
|
+
return pathname === "/univer-api" || pathname.startsWith("/univer-api/");
|
|
21
|
+
}
|
|
22
|
+
export async function handleUniverApiHttp(req, res, pathname, options = {}) {
|
|
23
|
+
if (!isUniverApiPath(pathname))
|
|
24
|
+
return false;
|
|
25
|
+
const method = httpMethod(req);
|
|
26
|
+
const xrkHome = options.xrkHome;
|
|
27
|
+
const url = new URL(req.url ?? "/", "http://127.0.0.1");
|
|
28
|
+
if (pathname === "/univer-api/status" || pathname === "/univer-api") {
|
|
29
|
+
const meta = STORE.read(xrkHome).data;
|
|
30
|
+
sendJson(res, 200, {
|
|
31
|
+
gateway: stoppedGateway(),
|
|
32
|
+
unitContent: "bundled",
|
|
33
|
+
startAttempts: meta.startAttempts,
|
|
34
|
+
lastStartAttemptAt: meta.lastStartAttemptAt,
|
|
35
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
36
|
+
});
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
if (pathname === "/univer-api/gateway/start") {
|
|
40
|
+
await parseJsonBody(req).catch(() => ({}));
|
|
41
|
+
const doc = STORE.patch(xrkHome, (current) => ({
|
|
42
|
+
startAttempts: current.startAttempts + 1,
|
|
43
|
+
lastStartAttemptAt: new Date().toISOString(),
|
|
44
|
+
}));
|
|
45
|
+
sendJson(res, 200, {
|
|
46
|
+
ok: false,
|
|
47
|
+
reason: "compat-offline",
|
|
48
|
+
message: "Univer Gateway is not embedded on XRK-Harness; office files stay offline.",
|
|
49
|
+
gateway: stoppedGateway(),
|
|
50
|
+
startAttempts: doc.data.startAttempts,
|
|
51
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
52
|
+
});
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
if (pathname === "/univer-api/gateway/stop") {
|
|
56
|
+
await parseJsonBody(req).catch(() => ({}));
|
|
57
|
+
sendJson(res, 200, {
|
|
58
|
+
ok: true,
|
|
59
|
+
gateway: stoppedGateway(),
|
|
60
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
61
|
+
});
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
if (pathname === "/univer-api/state") {
|
|
65
|
+
const file = url.searchParams.get("file") ?? "";
|
|
66
|
+
const sessionId = url.searchParams.get("sessionId") ?? "";
|
|
67
|
+
sendJson(res, 200, {
|
|
68
|
+
ok: false,
|
|
69
|
+
error: "GATEWAY_UNAVAILABLE",
|
|
70
|
+
reason: "Univer Gateway is not available.",
|
|
71
|
+
code: "GATEWAY_UNAVAILABLE",
|
|
72
|
+
file,
|
|
73
|
+
sessionId,
|
|
74
|
+
gateway: stoppedGateway(),
|
|
75
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
76
|
+
});
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
if (pathname === "/univer-api/worktree-action") {
|
|
80
|
+
const body = await parseJsonBody(req);
|
|
81
|
+
sendJson(res, 200, {
|
|
82
|
+
ok: false,
|
|
83
|
+
reason: "compat-offline",
|
|
84
|
+
action: typeof body.action === "string" ? body.action : null,
|
|
85
|
+
message: "Worktree actions require a live Univer Gateway.",
|
|
86
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
87
|
+
});
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
if (pathname === "/univer-api/open" ||
|
|
91
|
+
pathname === "/univer-api/save" ||
|
|
92
|
+
pathname === "/univer-api/export" ||
|
|
93
|
+
pathname.startsWith("/univer-api/")) {
|
|
94
|
+
if (method === "POST" || method === "PUT" || method === "PATCH") {
|
|
95
|
+
await parseJsonBody(req).catch(() => ({}));
|
|
96
|
+
}
|
|
97
|
+
sendJson(res, 200, {
|
|
98
|
+
ok: false,
|
|
99
|
+
error: "GATEWAY_UNAVAILABLE",
|
|
100
|
+
reason: "compat-offline",
|
|
101
|
+
path: pathname,
|
|
102
|
+
gateway: stoppedGateway(),
|
|
103
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
104
|
+
});
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
sendJson(res, 200, {
|
|
108
|
+
ok: true,
|
|
109
|
+
path: pathname,
|
|
110
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
111
|
+
});
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=univer-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"univer-api.js","sourceRoot":"","sources":["../../src/dsh-compat/univer-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAW/C,MAAM,KAAK,GAAG,iBAAiB,CAAY,CAAC,mBAAmB,EAAE,YAAY,CAAC,EAAE;IAC9E,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,CAAC;CACjB,CAAC,CAAC;AAEH,SAAS,cAAc;IACrB,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,GAAG,EAAE,IAAI;QACT,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,QAAQ,KAAK,aAAa,IAAI,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,CAAC,K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AAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;YAC5D,OAAO,EAAE,iDAAiD;YAC1D,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IACE,QAAQ,KAAK,kBAAkB;QAC/B,QAAQ,KAAK,kBAAkB;QAC/B,QAAQ,KAAK,oBAAoB;QACjC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,EACnC,CAAC;QACD,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YAChE,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7C,CAAC;QACD,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;YACjB,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,qBAAqB;YAC5B,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,cAAc,EAAE;YACzB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,kBAAkB;KAC5B,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-plugin-wallpaper-engine file-backed settings + inventory.
|
|
2
|
+
* dsh-plugin-wallpaper-engine file-backed settings + inventory + scene stubs.
|
|
3
|
+
* `/scene-frame/*` · `/scene-anim/*` return a stable placeholder (no ffmpeg).
|
|
3
4
|
*/
|
|
4
5
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
5
6
|
export interface WallpaperOptions {
|
|
6
7
|
readonly xrkHome?: string;
|
|
7
8
|
}
|
|
9
|
+
export declare function isWallpaperHttpPath(pathname: string): boolean;
|
|
8
10
|
export declare function handleWallpaperHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options: WallpaperOptions): Promise<boolean>;
|
|
9
11
|
//# sourceMappingURL=wallpaper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallpaper.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/wallpaper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wallpaper.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/wallpaper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAUjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AA0GD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQ7D;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,CAAC,CA6GlB"}
|
|
@@ -6,6 +6,8 @@ import { dataPath } from "./underlying/json-store.js";
|
|
|
6
6
|
import { tag } from "./meta.js";
|
|
7
7
|
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
8
8
|
import { parseJsonBody } from "./underlying/http-kit.js";
|
|
9
|
+
/** 1×1 PNG — keeps <img src="/scene-frame/…"> from breaking. */
|
|
10
|
+
const PLACEHOLDER_PNG = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==", "base64");
|
|
9
11
|
const DEFAULT_SETTINGS = {
|
|
10
12
|
scrim: 0.25,
|
|
11
13
|
border: 0.35,
|
|
@@ -75,10 +77,49 @@ function uploadIdFor(bytes, ext) {
|
|
|
75
77
|
const hash = createHash("sha256").update(bytes).digest("hex").slice(0, 12);
|
|
76
78
|
return `up-${hash}${ext}`;
|
|
77
79
|
}
|
|
80
|
+
function sendPlaceholderPng(res, method) {
|
|
81
|
+
res.writeHead(200, {
|
|
82
|
+
"content-type": "image/png",
|
|
83
|
+
"content-length": String(PLACEHOLDER_PNG.length),
|
|
84
|
+
"cache-control": "no-store",
|
|
85
|
+
});
|
|
86
|
+
if (method === "HEAD") {
|
|
87
|
+
res.end();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
res.end(PLACEHOLDER_PNG);
|
|
91
|
+
}
|
|
92
|
+
export function isWallpaperHttpPath(pathname) {
|
|
93
|
+
return (pathname.startsWith("/wallpaper-engine") ||
|
|
94
|
+
pathname === "/scene-anim" ||
|
|
95
|
+
pathname.startsWith("/scene-anim/") ||
|
|
96
|
+
pathname === "/scene-frame" ||
|
|
97
|
+
pathname.startsWith("/scene-frame/"));
|
|
98
|
+
}
|
|
78
99
|
export async function handleWallpaperHttp(req, res, pathname, options) {
|
|
79
|
-
if (!pathname
|
|
100
|
+
if (!isWallpaperHttpPath(pathname))
|
|
80
101
|
return false;
|
|
81
102
|
const method = (req.method ?? "GET").toUpperCase();
|
|
103
|
+
if (pathname === "/scene-frame" ||
|
|
104
|
+
pathname.startsWith("/scene-frame/") ||
|
|
105
|
+
pathname === "/scene-anim" ||
|
|
106
|
+
pathname.startsWith("/scene-anim/")) {
|
|
107
|
+
// No scene.pkg ffmpeg pipeline — return a stable still so media tags settle.
|
|
108
|
+
sendPlaceholderPng(res, method);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
if (pathname.startsWith("/wallpaper-engine/scene-anim-progress/")) {
|
|
112
|
+
const token = pathname.slice("/wallpaper-engine/scene-anim-progress/".length);
|
|
113
|
+
sendJson(res, 200, {
|
|
114
|
+
ok: true,
|
|
115
|
+
percent: 100,
|
|
116
|
+
progress: 100,
|
|
117
|
+
done: true,
|
|
118
|
+
token: token.split("?")[0] || token,
|
|
119
|
+
note: "Scene anim render is not embedded; progress reports complete.",
|
|
120
|
+
});
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
82
123
|
if (pathname === "/wallpaper-engine/settings") {
|
|
83
124
|
if (method === "GET" || method === "HEAD") {
|
|
84
125
|
sendJson(res, 200, { settings: loadSettings(options) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallpaper.js","sourceRoot":"","sources":["../../src/dsh-compat/wallpaper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wallpaper.js","sourceRoot":"","sources":["../../src/dsh-compat/wallpaper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD,gEAAgE;AAChE,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CACjC,kGAAkG,EAClG,QAAQ,CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,EAAE;IACR,aAAa,EAAE,CAAC;IAChB,eAAe,EAAE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C,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACrE,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9C,IAAI,UAAU,CAAC,GAAG,CAAC;gBAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACrC,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,KAAK;QAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/D,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -4,6 +4,11 @@ export declare const EMPTY_PRESET_CATALOG: Readonly<{
|
|
|
4
4
|
items: readonly never[];
|
|
5
5
|
}>;
|
|
6
6
|
export declare function imOfflineSnapshot(): Record<string, unknown>;
|
|
7
|
-
export
|
|
7
|
+
export interface StubRpcOptions {
|
|
8
|
+
readonly xrkHome?: string;
|
|
9
|
+
/** RPC channel name (e.g. `/dsh-foo`) used as surface id. */
|
|
10
|
+
readonly channel?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function stubRpcHandler(kind: string, endpoint: string, payload: Record<string, unknown>, feature?: string, options?: StubRpcOptions): unknown;
|
|
8
13
|
export declare function stubHttpProvider(route: PluginHostHttpRoute): HostProviderPartial;
|
|
9
14
|
//# sourceMappingURL=stub-handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stub-handlers.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/wire/stub-handlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"stub-handlers.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/wire/stub-handlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAW7B,eAAO,MAAM,oBAAoB;;;EAG/B,CAAC;AAEH,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmB3D;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAiCD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,SAAW,EAClB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAkFT;AAaD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,mBAAmB,GACzB,mBAAmB,CAuDrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readBody, sendJson } from "../underlying/http-json.js";
|
|
2
2
|
import { honestHostActionUnavailable, honestReady, } from "../honest-envelope.js";
|
|
3
3
|
import { hostIncomplete, tag } from "../meta.js";
|
|
4
|
+
import { patchPluginSurface, readPluginSurface, } from "../underlying/plugin-surface-store.js";
|
|
4
5
|
export const EMPTY_PRESET_CATALOG = Object.freeze({
|
|
5
6
|
defaultId: "",
|
|
6
7
|
items: Object.freeze([]),
|
|
@@ -22,7 +23,25 @@ export function imOfflineSnapshot() {
|
|
|
22
23
|
note: "IM bridge requires Cordis Host; XRK returns an empty offline snapshot.",
|
|
23
24
|
}, ["im-host"]);
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
function surfaceId(channel, feature) {
|
|
27
|
+
const raw = (channel ?? feature).replace(/^\//, "").trim();
|
|
28
|
+
return raw || feature || "plugin";
|
|
29
|
+
}
|
|
30
|
+
function extractWritePatch(payload) {
|
|
31
|
+
if (payload.value &&
|
|
32
|
+
typeof payload.value === "object" &&
|
|
33
|
+
!Array.isArray(payload.value)) {
|
|
34
|
+
return payload.value;
|
|
35
|
+
}
|
|
36
|
+
if (payload.document &&
|
|
37
|
+
typeof payload.document === "object" &&
|
|
38
|
+
!Array.isArray(payload.document)) {
|
|
39
|
+
return payload.document;
|
|
40
|
+
}
|
|
41
|
+
const { action: _a, expectedRevision: _e, ops: _o, ...rest } = payload;
|
|
42
|
+
return rest;
|
|
43
|
+
}
|
|
44
|
+
export function stubRpcHandler(kind, endpoint, payload, feature = "plugin", options = {}) {
|
|
26
45
|
if (kind === "im-offline") {
|
|
27
46
|
if (endpoint === "connection.status" ||
|
|
28
47
|
endpoint === "status" ||
|
|
@@ -32,19 +51,60 @@ export function stubRpcHandler(kind, endpoint, _payload, feature = "plugin") {
|
|
|
32
51
|
return honestHostActionUnavailable("im", endpoint);
|
|
33
52
|
}
|
|
34
53
|
if (kind === "generic") {
|
|
54
|
+
const id = surfaceId(options.channel, feature);
|
|
55
|
+
const xrkHome = options.xrkHome;
|
|
35
56
|
if (endpoint === "get" ||
|
|
36
57
|
endpoint === "describe" ||
|
|
37
58
|
endpoint === "status" ||
|
|
38
59
|
endpoint === "status-summary" ||
|
|
60
|
+
endpoint === "view" ||
|
|
39
61
|
endpoint === "") {
|
|
40
|
-
|
|
62
|
+
const surface = readPluginSurface(xrkHome, id);
|
|
63
|
+
return honestReady({
|
|
64
|
+
value: surface.settings,
|
|
65
|
+
settings: surface.settings,
|
|
66
|
+
config: surface.config,
|
|
67
|
+
state: surface.state,
|
|
68
|
+
revision: surface.revision,
|
|
69
|
+
writable: true,
|
|
70
|
+
feature,
|
|
71
|
+
channel: options.channel,
|
|
72
|
+
});
|
|
41
73
|
}
|
|
42
|
-
if (endpoint === "set" ||
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
74
|
+
if (endpoint === "set" ||
|
|
75
|
+
endpoint === "apply" ||
|
|
76
|
+
endpoint === "patch" ||
|
|
77
|
+
endpoint === "mutate" ||
|
|
78
|
+
endpoint === "save") {
|
|
79
|
+
const patch = extractWritePatch(payload);
|
|
80
|
+
const ops = Array.isArray(payload.ops) ? payload.ops : [];
|
|
81
|
+
const fromOps = {};
|
|
82
|
+
for (const raw of ops) {
|
|
83
|
+
if (!raw || typeof raw !== "object")
|
|
84
|
+
continue;
|
|
85
|
+
const op = raw;
|
|
86
|
+
const path = Array.isArray(op.path)
|
|
87
|
+
? op.path.map(String)
|
|
88
|
+
: [];
|
|
89
|
+
if ((op.op === "set" || op.value !== undefined) &&
|
|
90
|
+
path.length === 1 &&
|
|
91
|
+
path[0]) {
|
|
92
|
+
fromOps[path[0]] = op.value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const merged = { ...fromOps, ...patch };
|
|
96
|
+
const next = Object.keys(merged).length > 0
|
|
97
|
+
? patchPluginSurface(xrkHome, id, "settings", merged, "merge")
|
|
98
|
+
: readPluginSurface(xrkHome, id);
|
|
99
|
+
return honestReady({
|
|
100
|
+
ok: true,
|
|
101
|
+
value: next.settings,
|
|
102
|
+
settings: next.settings,
|
|
103
|
+
revision: next.revision,
|
|
104
|
+
writable: true,
|
|
105
|
+
feature,
|
|
106
|
+
channel: options.channel,
|
|
107
|
+
persisted: Object.keys(merged).length > 0,
|
|
48
108
|
});
|
|
49
109
|
}
|
|
50
110
|
return hostIncomplete(feature, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stub-handlers.js","sourceRoot":"","sources":["../../../src/dsh-compat/wire/stub-handlers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,4B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EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;4BAC1D,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAClC,CAAC;oBACF,OAAO,IAAI,CAAC;gBACd,CAAC;gBACD,QAAQ,CACN,GAAG,EACH,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EACrB,aAAa;oBACX,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC;oBACpD,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAC7C,CAAC;gBACF,OAAO,IAAI,CAAC;YACd,CAAC;SACF;KACF,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-dispatch.d.ts","sourceRoot":"","sources":["../src/fetch-dispatch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"fetch-dispatch.d.ts","sourceRoot":"","sources":["../src/fetch-dispatch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIL,KAAK,MAAM,EACZ,MAAM,WAAW,CAAC;AAwCnB;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC,CAuMnB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Dispatch a Fetch `Request` through a Node `http.Server` without binding a port.
|
|
3
3
|
* Used by Desktop Host pipe transport (ADR-0008).
|
|
4
4
|
*/
|
|
5
|
-
import { IncomingMessage, ServerResponse } from "node:http";
|
|
5
|
+
import { IncomingMessage, ServerResponse, } from "node:http";
|
|
6
6
|
import { Socket } from "node:net";
|
|
7
7
|
function headerRecord(headers) {
|
|
8
8
|
const out = {};
|
|
@@ -17,6 +17,25 @@ function headerRecord(headers) {
|
|
|
17
17
|
});
|
|
18
18
|
return out;
|
|
19
19
|
}
|
|
20
|
+
function mergeOutgoingHeaders(target, headers) {
|
|
21
|
+
if (headers === undefined)
|
|
22
|
+
return;
|
|
23
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
24
|
+
if (value === undefined)
|
|
25
|
+
continue;
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
for (const item of value)
|
|
28
|
+
target.append(key, String(item));
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
target.set(key, String(value));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function isStreamClosedError(error) {
|
|
36
|
+
return (error instanceof TypeError &&
|
|
37
|
+
/Controller is already closed|Invalid state/u.test(error.message));
|
|
38
|
+
}
|
|
20
39
|
/**
|
|
21
40
|
* Emit `request` on `server` and return a Fetch `Response`.
|
|
22
41
|
* Body is buffered for the Node IncomingMessage (streaming request bodies later).
|
|
@@ -24,6 +43,12 @@ function headerRecord(headers) {
|
|
|
24
43
|
export async function dispatchHttpServerFetch(server, request) {
|
|
25
44
|
const url = new URL(request.url);
|
|
26
45
|
const socket = new Socket();
|
|
46
|
+
// Pipe / no-listen dispatch is local; Face auth treats loopback as trusted
|
|
47
|
+
// when the product API key is set but the browser omits Authorization.
|
|
48
|
+
Object.defineProperty(socket, "remoteAddress", {
|
|
49
|
+
value: "127.0.0.1",
|
|
50
|
+
configurable: true,
|
|
51
|
+
});
|
|
27
52
|
const req = new IncomingMessage(socket);
|
|
28
53
|
req.method = request.method;
|
|
29
54
|
req.url = `${url.pathname}${url.search}`;
|
|
@@ -40,6 +65,24 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
40
65
|
}
|
|
41
66
|
req.push(null);
|
|
42
67
|
});
|
|
68
|
+
// When the pipe / renderer cancels the Fetch body (mux reconnect), tear down
|
|
69
|
+
// the synthetic Node request so Face SSE `req.on("close")` unsubscribes.
|
|
70
|
+
// Otherwise Face keeps `res.write` → enqueue on a closed controller and the
|
|
71
|
+
// throw surfaces as `session.prompt` `internal: Controller is already closed`.
|
|
72
|
+
const tearDownNodeRequest = () => {
|
|
73
|
+
if (!req.destroyed)
|
|
74
|
+
req.destroy();
|
|
75
|
+
if (!socket.destroyed)
|
|
76
|
+
socket.destroy();
|
|
77
|
+
};
|
|
78
|
+
if (request.signal.aborted) {
|
|
79
|
+
queueMicrotask(tearDownNodeRequest);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
request.signal.addEventListener("abort", tearDownNodeRequest, {
|
|
83
|
+
once: true,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
43
86
|
return new Promise((resolve, reject) => {
|
|
44
87
|
const res = new ServerResponse(req);
|
|
45
88
|
const chunks = [];
|
|
@@ -47,6 +90,10 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
47
90
|
let streamController;
|
|
48
91
|
let responseOpened = false;
|
|
49
92
|
const responseHeaders = new Headers();
|
|
93
|
+
const dropController = () => {
|
|
94
|
+
streamController = undefined;
|
|
95
|
+
settled = true;
|
|
96
|
+
};
|
|
50
97
|
const openResponse = () => {
|
|
51
98
|
if (responseOpened)
|
|
52
99
|
return;
|
|
@@ -54,8 +101,22 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
54
101
|
const body = new ReadableStream({
|
|
55
102
|
start(controller) {
|
|
56
103
|
streamController = controller;
|
|
57
|
-
for (const chunk of chunks)
|
|
58
|
-
|
|
104
|
+
for (const chunk of chunks) {
|
|
105
|
+
try {
|
|
106
|
+
controller.enqueue(chunk);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
if (isStreamClosedError(error)) {
|
|
110
|
+
dropController();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
cancel() {
|
|
118
|
+
dropController();
|
|
119
|
+
tearDownNodeRequest();
|
|
59
120
|
},
|
|
60
121
|
});
|
|
61
122
|
resolve(new Response(body, {
|
|
@@ -63,25 +124,19 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
63
124
|
headers: responseHeaders,
|
|
64
125
|
}));
|
|
65
126
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (value === undefined)
|
|
70
|
-
continue;
|
|
71
|
-
if (Array.isArray(value)) {
|
|
72
|
-
for (const item of value)
|
|
73
|
-
responseHeaders.append(key, String(item));
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
responseHeaders.set(key, String(value));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
127
|
+
/** Copy headers still held in `kOutHeaders` (before `writeHead` flushes them). */
|
|
128
|
+
const capturePendingHeaders = () => {
|
|
129
|
+
mergeOutgoingHeaders(responseHeaders, res.getHeaders());
|
|
79
130
|
};
|
|
80
131
|
const origWriteHead = res.writeHead.bind(res);
|
|
81
132
|
res.writeHead = ((statusCode, reasonOrHeaders, maybeHeaders) => {
|
|
82
133
|
res.statusCode = statusCode;
|
|
134
|
+
// Node clears getHeaders() once writeHead serializes into `_header`.
|
|
135
|
+
// Capture setHeader() values and the writeHead() object form first.
|
|
136
|
+
capturePendingHeaders();
|
|
137
|
+
const fromArgs = typeof reasonOrHeaders === "string" ? maybeHeaders : reasonOrHeaders;
|
|
138
|
+
mergeOutgoingHeaders(responseHeaders, fromArgs);
|
|
83
139
|
const result = origWriteHead(statusCode, reasonOrHeaders, maybeHeaders);
|
|
84
|
-
captureHeaders();
|
|
85
140
|
openResponse();
|
|
86
141
|
return result;
|
|
87
142
|
});
|
|
@@ -91,14 +146,26 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
91
146
|
const buf = Buffer.isBuffer(chunk)
|
|
92
147
|
? chunk
|
|
93
148
|
: Buffer.from(typeof chunk === "string" ? chunk : String(chunk));
|
|
94
|
-
if (streamController)
|
|
149
|
+
if (streamController === undefined) {
|
|
150
|
+
if (!settled)
|
|
151
|
+
chunks.push(buf);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
95
155
|
streamController.enqueue(buf);
|
|
96
|
-
|
|
97
|
-
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
if (isStreamClosedError(error)) {
|
|
159
|
+
dropController();
|
|
160
|
+
tearDownNodeRequest();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
98
165
|
};
|
|
99
166
|
res.write = ((chunk, encoding, cb) => {
|
|
100
167
|
if (!responseOpened) {
|
|
101
|
-
|
|
168
|
+
capturePendingHeaders();
|
|
102
169
|
openResponse();
|
|
103
170
|
}
|
|
104
171
|
pushChunk(chunk);
|
|
@@ -110,14 +177,25 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
110
177
|
});
|
|
111
178
|
res.end = ((chunk, encoding, cb) => {
|
|
112
179
|
if (!responseOpened) {
|
|
113
|
-
|
|
180
|
+
capturePendingHeaders();
|
|
114
181
|
openResponse();
|
|
115
182
|
}
|
|
116
183
|
if (chunk !== undefined && typeof chunk !== "function") {
|
|
117
184
|
pushChunk(chunk);
|
|
118
185
|
}
|
|
119
|
-
streamController
|
|
120
|
-
|
|
186
|
+
if (streamController !== undefined) {
|
|
187
|
+
try {
|
|
188
|
+
streamController.close();
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
if (!isStreamClosedError(error))
|
|
192
|
+
throw error;
|
|
193
|
+
}
|
|
194
|
+
dropController();
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
settled = true;
|
|
198
|
+
}
|
|
121
199
|
const done = typeof chunk === "function"
|
|
122
200
|
? chunk
|
|
123
201
|
: typeof encoding === "function"
|
|
@@ -132,8 +210,15 @@ export async function dispatchHttpServerFetch(server, request) {
|
|
|
132
210
|
res.on("error", (error) => {
|
|
133
211
|
if (!settled)
|
|
134
212
|
reject(error);
|
|
135
|
-
else
|
|
136
|
-
|
|
213
|
+
else if (streamController !== undefined) {
|
|
214
|
+
try {
|
|
215
|
+
streamController.error(error);
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
/* already closed */
|
|
219
|
+
}
|
|
220
|
+
dropController();
|
|
221
|
+
}
|
|
137
222
|
});
|
|
138
223
|
try {
|
|
139
224
|
server.emit("request", req, res);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-dispatch.js","sourceRoot":"","sources":["../src/fetch-dispatch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"fetch-dispatch.js","sourceRoot":"","sources":["../src/fetch-dispatch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,eAAe,EACf,cAAc,GAGf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,SAAS,YAAY,CACnB,OAAgB;IAEhB,MAAM,GAAG,GAAwB,EAAE,CAAC;IACpC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,QAAQ,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACxC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;YAClD,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAID,SAAS,oBAAoB,CAC3B,MAAe,EACf,OAAwC;IAExC,IAAI,OAAO,KAAK,SAA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