@xrkseek/harness 0.4.12 → 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 -46
- 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 +6 -3
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +6 -3
- 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-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,7 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
export interface TaskBoardOptions {
|
|
3
|
+
readonly xrkHome?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function isTaskBoardPath(pathname: string): boolean;
|
|
6
|
+
export declare function handleTaskBoardHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: TaskBoardOptions): Promise<boolean>;
|
|
7
|
+
//# sourceMappingURL=task-board.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-board.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/task-board.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AA6ED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CA2NlB"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@linxin666/dsh-client-ui-task-board` — persisted board under `~/.xrk/task-board/`.
|
|
3
|
+
*/
|
|
4
|
+
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
6
|
+
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
7
|
+
import { httpMethod, parseJsonBody } from "./underlying/http-kit.js";
|
|
8
|
+
import { DSH_COMPAT_ADAPTER } from "./meta.js";
|
|
9
|
+
const STORE = createXrkDocStore(["task-board", "board.json"], {
|
|
10
|
+
schemaVersion: 3,
|
|
11
|
+
revision: 0,
|
|
12
|
+
tasks: [],
|
|
13
|
+
sessionDefaultPermission: "ask",
|
|
14
|
+
maxSubtaskDepth: 3,
|
|
15
|
+
});
|
|
16
|
+
function snapshot(doc) {
|
|
17
|
+
return {
|
|
18
|
+
schemaVersion: doc.schemaVersion,
|
|
19
|
+
revision: doc.revision,
|
|
20
|
+
tasks: doc.tasks.filter((t) => !t.archived),
|
|
21
|
+
scheduler: {
|
|
22
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC",
|
|
23
|
+
ledgerId: "xrk-compat-task-board",
|
|
24
|
+
},
|
|
25
|
+
power: {
|
|
26
|
+
platform: process.platform,
|
|
27
|
+
phase: "disabled",
|
|
28
|
+
enabled: false,
|
|
29
|
+
sessionStateKnown: false,
|
|
30
|
+
runningSessions: 0,
|
|
31
|
+
armedSchedules: 0,
|
|
32
|
+
},
|
|
33
|
+
sessionDefaultPermission: doc.sessionDefaultPermission,
|
|
34
|
+
maxSubtaskDepth: doc.maxSubtaskDepth,
|
|
35
|
+
teamRunAvailable: false,
|
|
36
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function bump(xrkHome, mutator) {
|
|
40
|
+
const now = new Date().toISOString();
|
|
41
|
+
return STORE.patch(xrkHome, (doc) => ({
|
|
42
|
+
...doc,
|
|
43
|
+
revision: doc.revision + 1,
|
|
44
|
+
tasks: mutator(doc.tasks, now),
|
|
45
|
+
})).data;
|
|
46
|
+
}
|
|
47
|
+
function asString(v, fallback = "") {
|
|
48
|
+
return typeof v === "string" ? v : fallback;
|
|
49
|
+
}
|
|
50
|
+
export function isTaskBoardPath(pathname) {
|
|
51
|
+
return (pathname === "/api/task-board" || pathname.startsWith("/api/task-board/"));
|
|
52
|
+
}
|
|
53
|
+
export async function handleTaskBoardHttp(req, res, pathname, options = {}) {
|
|
54
|
+
if (!isTaskBoardPath(pathname))
|
|
55
|
+
return false;
|
|
56
|
+
const method = httpMethod(req);
|
|
57
|
+
const xrkHome = options.xrkHome;
|
|
58
|
+
if (pathname === "/api/task-board" ||
|
|
59
|
+
pathname === "/api/task-board/" ||
|
|
60
|
+
pathname === "/api/task-board/state") {
|
|
61
|
+
if (method === "GET" || method === "HEAD") {
|
|
62
|
+
sendJson(res, 200, snapshot(STORE.read(xrkHome).data));
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (pathname === "/api/task-board/parse") {
|
|
67
|
+
if (method !== "POST") {
|
|
68
|
+
sendJson(res, 405, { ok: false, error: "method-not-allowed" });
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
const body = await parseJsonBody(req);
|
|
72
|
+
const text = asString(body.text ?? body.prompt ?? body.input);
|
|
73
|
+
const firstLine = text.split(/\r?\n/).find((l) => l.trim())?.trim() ?? "";
|
|
74
|
+
sendJson(res, 200, {
|
|
75
|
+
ok: true,
|
|
76
|
+
draft: {
|
|
77
|
+
title: firstLine.slice(0, 80) || "Untitled",
|
|
78
|
+
description: text,
|
|
79
|
+
prompt: text,
|
|
80
|
+
},
|
|
81
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
82
|
+
});
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
if (pathname === "/api/task-board/action") {
|
|
86
|
+
if (method !== "POST") {
|
|
87
|
+
sendJson(res, 405, { ok: false, error: "method-not-allowed" });
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
const body = await parseJsonBody(req);
|
|
91
|
+
const requestId = typeof body.requestId === "string" ? body.requestId : randomUUID();
|
|
92
|
+
const action = body.action && typeof body.action === "object"
|
|
93
|
+
? body.action
|
|
94
|
+
: body;
|
|
95
|
+
const kind = asString(action.kind);
|
|
96
|
+
if (kind === "create") {
|
|
97
|
+
const input = action.input && typeof action.input === "object"
|
|
98
|
+
? action.input
|
|
99
|
+
: action;
|
|
100
|
+
const id = typeof action.id === "string" && action.id
|
|
101
|
+
? action.id
|
|
102
|
+
: randomUUID();
|
|
103
|
+
const title = asString(input.title).trim();
|
|
104
|
+
if (!title) {
|
|
105
|
+
sendJson(res, 200, {
|
|
106
|
+
ok: false,
|
|
107
|
+
error: "title is required",
|
|
108
|
+
requestId,
|
|
109
|
+
...snapshot(STORE.read(xrkHome).data),
|
|
110
|
+
});
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
const doc = bump(xrkHome, (tasks, now) => [
|
|
114
|
+
...tasks,
|
|
115
|
+
{
|
|
116
|
+
id,
|
|
117
|
+
title,
|
|
118
|
+
description: asString(input.description),
|
|
119
|
+
prompt: asString(input.prompt),
|
|
120
|
+
...(typeof input.parentId === "string"
|
|
121
|
+
? { parentId: input.parentId }
|
|
122
|
+
: {}),
|
|
123
|
+
status: "todo",
|
|
124
|
+
createdAt: now,
|
|
125
|
+
updatedAt: now,
|
|
126
|
+
executions: [],
|
|
127
|
+
...(typeof input.workspaceId === "string"
|
|
128
|
+
? { workspaceId: input.workspaceId }
|
|
129
|
+
: {}),
|
|
130
|
+
...(typeof input.mode === "string" ? { mode: input.mode } : {}),
|
|
131
|
+
...(typeof input.permission === "string"
|
|
132
|
+
? { permission: input.permission }
|
|
133
|
+
: {}),
|
|
134
|
+
...(typeof input.model === "string" ? { model: input.model } : {}),
|
|
135
|
+
tags: Array.isArray(input.tags)
|
|
136
|
+
? input.tags.filter((t) => typeof t === "string")
|
|
137
|
+
: [],
|
|
138
|
+
},
|
|
139
|
+
]);
|
|
140
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
if (kind === "update") {
|
|
144
|
+
const taskId = asString(action.taskId ?? action.id);
|
|
145
|
+
const patch = action.patch && typeof action.patch === "object"
|
|
146
|
+
? action.patch
|
|
147
|
+
: action;
|
|
148
|
+
const doc = bump(xrkHome, (tasks, now) => tasks.map((t) => {
|
|
149
|
+
if (t.id !== taskId)
|
|
150
|
+
return t;
|
|
151
|
+
return {
|
|
152
|
+
...t,
|
|
153
|
+
...(typeof patch.title === "string" ? { title: patch.title } : {}),
|
|
154
|
+
...(typeof patch.description === "string"
|
|
155
|
+
? { description: patch.description }
|
|
156
|
+
: {}),
|
|
157
|
+
...(typeof patch.prompt === "string"
|
|
158
|
+
? { prompt: patch.prompt }
|
|
159
|
+
: {}),
|
|
160
|
+
...(typeof patch.status === "string"
|
|
161
|
+
? { status: patch.status }
|
|
162
|
+
: {}),
|
|
163
|
+
updatedAt: now,
|
|
164
|
+
};
|
|
165
|
+
}));
|
|
166
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
if (kind === "move") {
|
|
170
|
+
const taskId = asString(action.taskId ?? action.id);
|
|
171
|
+
const status = asString(action.status, "todo");
|
|
172
|
+
const doc = bump(xrkHome, (tasks, now) => tasks.map((t) => t.id === taskId ? { ...t, status, updatedAt: now } : t));
|
|
173
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
if (kind === "archive") {
|
|
177
|
+
const taskId = asString(action.taskId ?? action.id);
|
|
178
|
+
const doc = bump(xrkHome, (tasks, now) => tasks.map((t) => t.id === taskId || t.parentId === taskId
|
|
179
|
+
? { ...t, archived: true, status: "archived", updatedAt: now }
|
|
180
|
+
: t));
|
|
181
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
if (kind === "delete") {
|
|
185
|
+
const taskId = asString(action.taskId ?? action.id);
|
|
186
|
+
const doc = bump(xrkHome, (tasks) => tasks.filter((t) => t.id !== taskId && t.parentId !== taskId));
|
|
187
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
if (kind === "import") {
|
|
191
|
+
const incoming = Array.isArray(action.tasks) ? action.tasks : [];
|
|
192
|
+
const doc = bump(xrkHome, (tasks, now) => {
|
|
193
|
+
const next = [...tasks];
|
|
194
|
+
for (const row of incoming) {
|
|
195
|
+
if (!row || typeof row !== "object")
|
|
196
|
+
continue;
|
|
197
|
+
const t = row;
|
|
198
|
+
const id = asString(t.id) || randomUUID();
|
|
199
|
+
if (next.some((x) => x.id === id))
|
|
200
|
+
continue;
|
|
201
|
+
next.push({
|
|
202
|
+
id,
|
|
203
|
+
title: asString(t.title, "Imported"),
|
|
204
|
+
description: asString(t.description),
|
|
205
|
+
prompt: asString(t.prompt),
|
|
206
|
+
status: asString(t.status, "todo"),
|
|
207
|
+
createdAt: asString(t.createdAt, now),
|
|
208
|
+
updatedAt: now,
|
|
209
|
+
executions: [],
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return next;
|
|
213
|
+
});
|
|
214
|
+
sendJson(res, 200, { ok: true, requestId, ...snapshot(doc) });
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
if (kind === "run" || kind === "halt" || kind === "arm" || kind === "disarm") {
|
|
218
|
+
sendJson(res, 200, {
|
|
219
|
+
ok: false,
|
|
220
|
+
error: "scheduler-unavailable",
|
|
221
|
+
message: "Task run/schedule needs a Host runner; board mutations still persist.",
|
|
222
|
+
requestId,
|
|
223
|
+
...snapshot(STORE.read(xrkHome).data),
|
|
224
|
+
});
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
sendJson(res, 200, {
|
|
228
|
+
ok: false,
|
|
229
|
+
error: `unknown-action:${kind || "missing"}`,
|
|
230
|
+
requestId,
|
|
231
|
+
...snapshot(STORE.read(xrkHome).data),
|
|
232
|
+
});
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
if (method === "POST" || method === "PUT" || method === "PATCH") {
|
|
236
|
+
await parseJsonBody(req).catch(() => ({}));
|
|
237
|
+
}
|
|
238
|
+
sendJson(res, 200, {
|
|
239
|
+
ok: true,
|
|
240
|
+
path: pathname,
|
|
241
|
+
...snapshot(STORE.read(xrkHome).data),
|
|
242
|
+
});
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=task-board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-board.js","sourceRoot":"","sources":["../../src/dsh-compat/task-board.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,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;AAgC/C,MAAM,KAAK,GAAG,iBAAiB,CAAW,CAAC,YAAY,EAAE,YAAY,CAAC,EAAE;IACtE,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC;IACX,KAAK,EAAE,EAAE;IACT,wBAAwB,EAAE,KAAK;IAC/B,eAAe,EAAE,CAAC;CACnB,CAAC,CAAC;AAE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,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;KACtC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-token-usage-stats — HTML dashboard at `/token-usage-stats` + JSON at `/api/token-usage-stats`.
|
|
3
|
+
*/
|
|
4
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
5
|
+
import type { TokenLedgerOptions } from "./tokenledger.js";
|
|
6
|
+
export type TokenUsageStatsOptions = TokenLedgerOptions;
|
|
7
|
+
export declare function isTokenUsageStatsPath(pathname: string): boolean;
|
|
8
|
+
export declare function handleTokenUsageStatsHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: TokenUsageStatsOptions): Promise<boolean>;
|
|
9
|
+
//# sourceMappingURL=token-usage-stats-dash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-usage-stats-dash.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/token-usage-stats-dash.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAExD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAO/D;AA8ED,wBAAsB,yBAAyB,CAC7C,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,OAAO,CAAC,CAuClB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
2
|
+
import { DSH_COMPAT_ADAPTER } from "./meta.js";
|
|
3
|
+
export function isTokenUsageStatsPath(pathname) {
|
|
4
|
+
return (pathname === "/token-usage-stats" ||
|
|
5
|
+
pathname.startsWith("/token-usage-stats/") ||
|
|
6
|
+
pathname === "/api/token-usage-stats" ||
|
|
7
|
+
pathname.startsWith("/api/token-usage-stats/"));
|
|
8
|
+
}
|
|
9
|
+
function emptySnapshot() {
|
|
10
|
+
return {
|
|
11
|
+
currency: "USD",
|
|
12
|
+
totals: {
|
|
13
|
+
requestCount: 0,
|
|
14
|
+
totalTokens: 0,
|
|
15
|
+
outputTokens: 0,
|
|
16
|
+
inputTokens: 0,
|
|
17
|
+
cost: 0,
|
|
18
|
+
cacheReadTokens: 0,
|
|
19
|
+
cacheWriteTokens: 0,
|
|
20
|
+
},
|
|
21
|
+
series: [],
|
|
22
|
+
models: [],
|
|
23
|
+
topSessions: [],
|
|
24
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function dashboardHtml() {
|
|
28
|
+
return `<!doctype html>
|
|
29
|
+
<html lang="zh-CN">
|
|
30
|
+
<head>
|
|
31
|
+
<meta charset="utf-8">
|
|
32
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
33
|
+
<title>Token 用量统计</title>
|
|
34
|
+
<style>
|
|
35
|
+
:root { color-scheme: light dark; --bg:#f6f7f9; --panel:#fff; --text:#1c2333; --muted:#6b7280; --line:#e5e7eb; }
|
|
36
|
+
@media (prefers-color-scheme: dark) {
|
|
37
|
+
:root { --bg:#111827; --panel:#1f2937; --text:#f9fafb; --muted:#9ca3af; --line:#374151; }
|
|
38
|
+
}
|
|
39
|
+
body { margin:0; background:var(--bg); color:var(--text); font:14px/1.45 system-ui,sans-serif; }
|
|
40
|
+
main { max-width:720px; margin:24px auto; padding:0 16px; }
|
|
41
|
+
.panel { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
|
|
42
|
+
h1 { font-size:18px; margin:0 0 8px; }
|
|
43
|
+
p { margin:0; color:var(--muted); }
|
|
44
|
+
.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:16px; }
|
|
45
|
+
.stat strong { display:block; font-size:20px; }
|
|
46
|
+
.stat span { color:var(--muted); font-size:12px; }
|
|
47
|
+
</style>
|
|
48
|
+
</head>
|
|
49
|
+
<body>
|
|
50
|
+
<main>
|
|
51
|
+
<div class="panel">
|
|
52
|
+
<h1>Token 用量统计</h1>
|
|
53
|
+
<p id="note">加载中…</p>
|
|
54
|
+
<div class="grid">
|
|
55
|
+
<div class="stat"><strong id="requests">0</strong><span>请求</span></div>
|
|
56
|
+
<div class="stat"><strong id="tokens">0</strong><span>总 Token</span></div>
|
|
57
|
+
<div class="stat"><strong id="cost">0</strong><span id="currency">USD</span></div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</main>
|
|
61
|
+
<script>
|
|
62
|
+
(async () => {
|
|
63
|
+
const note = document.getElementById('note');
|
|
64
|
+
try {
|
|
65
|
+
const res = await fetch('/api/token-usage-stats', { cache: 'no-store' });
|
|
66
|
+
if (!res.ok) throw new Error('HTTP ' + res.status);
|
|
67
|
+
const snap = await res.json();
|
|
68
|
+
document.getElementById('requests').textContent = String(snap.totals?.requestCount ?? 0);
|
|
69
|
+
document.getElementById('tokens').textContent = String(snap.totals?.totalTokens ?? 0);
|
|
70
|
+
document.getElementById('cost').textContent = String(snap.totals?.cost ?? 0);
|
|
71
|
+
document.getElementById('currency').textContent = snap.currency || 'USD';
|
|
72
|
+
note.textContent = snap.adapter
|
|
73
|
+
? 'XRK Host 聚合(空数据时为 0)'
|
|
74
|
+
: '就绪';
|
|
75
|
+
} catch (err) {
|
|
76
|
+
note.textContent = '无法加载用量:' + (err && err.message ? err.message : String(err));
|
|
77
|
+
}
|
|
78
|
+
})();
|
|
79
|
+
</script>
|
|
80
|
+
</body>
|
|
81
|
+
</html>`;
|
|
82
|
+
}
|
|
83
|
+
export async function handleTokenUsageStatsHttp(req, res, pathname, options = {}) {
|
|
84
|
+
if (!isTokenUsageStatsPath(pathname))
|
|
85
|
+
return false;
|
|
86
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
87
|
+
if ((pathname === "/token-usage-stats" || pathname === "/token-usage-stats/") &&
|
|
88
|
+
(method === "GET" || method === "HEAD")) {
|
|
89
|
+
const html = dashboardHtml();
|
|
90
|
+
res.writeHead(200, {
|
|
91
|
+
"content-type": "text/html; charset=utf-8",
|
|
92
|
+
"cache-control": "no-store",
|
|
93
|
+
"content-length": Buffer.byteLength(html),
|
|
94
|
+
});
|
|
95
|
+
if (method === "HEAD") {
|
|
96
|
+
res.end();
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
res.end(html);
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
if (pathname === "/api/token-usage-stats" ||
|
|
103
|
+
pathname.startsWith("/api/token-usage-stats")) {
|
|
104
|
+
const aggregated = options.aggregateUsage
|
|
105
|
+
? await options.aggregateUsage({})
|
|
106
|
+
: undefined;
|
|
107
|
+
const body = aggregated && typeof aggregated === "object"
|
|
108
|
+
? { ...emptySnapshot(), ...aggregated }
|
|
109
|
+
: emptySnapshot();
|
|
110
|
+
sendJson(res, 200, body);
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
sendJson(res, 200, emptySnapshot());
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=token-usage-stats-dash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-usage-stats-dash.js","sourceRoot":"","sources":["../../src/dsh-compat/token-usage-stats-dash.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,M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,SAAS,CAAC,GAAG,EAAE;YACjB,cAAc,EAAE,0BAA0B;YAC1C,eAAe,EAAE,UAAU;YAC3B,gBAAgB,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;SAC1C,CAAC,CAAC;QACH,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,GAAG,CAAC,GAAG,EAAE,CAAC;YACV,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IACE,QAAQ,KAAK,wBAAwB;QACrC,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAC7C,CAAC;QACD,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc;YACvC,CAAC,CAAC,MAAM,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YAClC,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,IAAI,GACR,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ;YAC1C,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,EAAE,GAAG,UAAU,EAAE;YACvC,CAAC,CAAC,aAAa,EAAE,CAAC;QACtB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -6,6 +6,7 @@ export type Json = null | boolean | number | string | Json[] | {
|
|
|
6
6
|
readonly [k: string]: Json;
|
|
7
7
|
};
|
|
8
8
|
export declare function sendJson(res: ServerResponse, status: number, body: unknown, extra?: Record<string, string>): void;
|
|
9
|
+
export declare function readBodyBuffer(req: IncomingMessage): Promise<Buffer>;
|
|
9
10
|
export declare function readBody(req: IncomingMessage): Promise<string>;
|
|
10
11
|
export declare function rpcOk(rpcId: string, value: unknown): unknown;
|
|
11
12
|
export declare function rpcErr(rpcId: string, code: string, message: string, details?: Record<string, unknown>): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-json.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/http-json.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAM,MAAM,IAAI,GACZ,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,EAAE,GACN;IAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEnC,wBAAgB,QAAQ,CACtB,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACjC,IAAI,CASN;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"http-json.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/http-json.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAM,MAAM,IAAI,GACZ,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,IAAI,EAAE,GACN;IAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEnC,wBAAgB,QAAQ,CACtB,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACjC,IAAI,CASN;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAOpE;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9D;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAM5D;AAED,wBAAgB,MAAM,CACpB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAaT"}
|
|
@@ -8,14 +8,17 @@ export function sendJson(res, status, body, extra = {}) {
|
|
|
8
8
|
});
|
|
9
9
|
res.end(data);
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
11
|
+
export function readBodyBuffer(req) {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
13
|
const chunks = [];
|
|
14
14
|
req.on("data", (c) => chunks.push(Buffer.from(c)));
|
|
15
|
-
req.on("end", () => resolve(Buffer.concat(chunks)
|
|
15
|
+
req.on("end", () => resolve(Buffer.concat(chunks)));
|
|
16
16
|
req.on("error", reject);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
+
export function readBody(req) {
|
|
20
|
+
return readBodyBuffer(req).then((buf) => buf.toString("utf8"));
|
|
21
|
+
}
|
|
19
22
|
export function rpcOk(rpcId, value) {
|
|
20
23
|
return {
|
|
21
24
|
type: "server-response",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-json.js","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/http-json.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,QAAQ,CACtB,GAAmB,EACnB,MAAc,EACd,IAAa,EACb,QAAgC,EAAE;IAElC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAClC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE;QACpB,cAAc,EAAE,iCAAiC;QACjD,eAAe,EAAE,UAAU;QAC3B,gB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IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAc;IACjD,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,KAAK;QACL,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;KAC5B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,MAAM,CACpB,KAAa,EACb,IAAY,EACZ,OAAe,EACf,OAAiC;IAEjC,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,KAAK;QACL,MAAM,EAAE;YACN,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI;gBACJ,OAAO;gBACP,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,OAAO,EAAE;aACnD;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { dataPath, ensureDir, readJsonFile, writeJsonFile, } from "./json-store.js";
|
|
6
6
|
export { createXrkDocStore, type XrkDocStore, } from "./doc-store.js";
|
|
7
|
-
export {
|
|
7
|
+
export { patchPluginSurface, pluginSurfaceStore, readPluginSurface, sanitizePluginSurfaceId, type PluginSurfaceBucket, type PluginSurfaceDoc, } from "./plugin-surface-store.js";
|
|
8
|
+
export { readBody, readBodyBuffer, rpcErr, rpcOk, sendJson, type Json, } from "./http-json.js";
|
|
8
9
|
export { drainMutatingBody, httpMethod, isMutatingMethod, parseJsonBody, } from "./http-kit.js";
|
|
9
10
|
export { applyMobileGateDecision, classifyRequestHost, effectiveRequestHost, evaluateMobileGate, hostOnly, isMobileGateExemptPath, type MobileGateCredentials, type MobileGateDecision, type MobileGateMode, type MobileGateSnapshot, type RequestHostClass, } from "./mobile-gate-kit.js";
|
|
10
11
|
export type { PublicRouteHandlerFn } from "./public-handler.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,IAAI,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,IAAI,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { dataPath, ensureDir, readJsonFile, writeJsonFile, } from "./json-store.js";
|
|
6
6
|
export { createXrkDocStore, } from "./doc-store.js";
|
|
7
|
-
export {
|
|
7
|
+
export { patchPluginSurface, pluginSurfaceStore, readPluginSurface, sanitizePluginSurfaceId, } from "./plugin-surface-store.js";
|
|
8
|
+
export { readBody, readBodyBuffer, rpcErr, rpcOk, sendJson, } from "./http-json.js";
|
|
8
9
|
export { drainMutatingBody, httpMethod, isMutatingMethod, parseJsonBody, } from "./http-kit.js";
|
|
9
10
|
export { applyMobileGateDecision, classifyRequestHost, effectiveRequestHost, evaluateMobileGate, hostOnly, isMobileGateExemptPath, } from "./mobile-gate-kit.js";
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,GAET,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,GAMvB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,GAElB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,MAAM,EACN,KAAK,EACL,QAAQ,GAET,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,sBAAsB,GAMvB,MAAM,sBAAsB,CAAC"}
|
package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-community-plugin surface docs under ~/.xrk/community-surfaces/<id>/.
|
|
3
|
+
* Shared by generic `/_dsh/<pkg>/…` and community-root `…/api/{config,state}`.
|
|
4
|
+
*/
|
|
5
|
+
import { type XrkDocStore } from "./doc-store.js";
|
|
6
|
+
export interface PluginSurfaceDoc {
|
|
7
|
+
config: Record<string, unknown>;
|
|
8
|
+
state: Record<string, unknown>;
|
|
9
|
+
settings: Record<string, unknown>;
|
|
10
|
+
revision: number;
|
|
11
|
+
}
|
|
12
|
+
/** Sanitize a package/slug id for use as a path segment. */
|
|
13
|
+
export declare function sanitizePluginSurfaceId(pluginId: string): string;
|
|
14
|
+
export declare function pluginSurfaceStore(pluginId: string): XrkDocStore<PluginSurfaceDoc>;
|
|
15
|
+
export declare function readPluginSurface(xrkHome: string | undefined, pluginId: string): PluginSurfaceDoc;
|
|
16
|
+
export type PluginSurfaceBucket = "config" | "state" | "settings";
|
|
17
|
+
export declare function patchPluginSurface(xrkHome: string | undefined, pluginId: string, bucket: PluginSurfaceBucket, patch: Record<string, unknown>, mode?: "merge" | "replace"): PluginSurfaceDoc;
|
|
18
|
+
//# sourceMappingURL=plugin-surface-store.d.ts.map
|
package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-surface-store.d.ts","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/plugin-surface-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAWD,4DAA4D;AAC5D,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOhE;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,GACf,WAAW,CAAC,gBAAgB,CAAC,CAW/B;AASD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,GACf,gBAAgB,CAQlB;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAElE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,GAAE,OAAO,GAAG,SAAmB,GAClC,gBAAgB,CAmBlB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-community-plugin surface docs under ~/.xrk/community-surfaces/<id>/.
|
|
3
|
+
* Shared by generic `/_dsh/<pkg>/…` and community-root `…/api/{config,state}`.
|
|
4
|
+
*/
|
|
5
|
+
import { createXrkDocStore } from "./doc-store.js";
|
|
6
|
+
const EMPTY = {
|
|
7
|
+
config: {},
|
|
8
|
+
state: {},
|
|
9
|
+
settings: {},
|
|
10
|
+
revision: 0,
|
|
11
|
+
};
|
|
12
|
+
const stores = new Map();
|
|
13
|
+
/** Sanitize a package/slug id for use as a path segment. */
|
|
14
|
+
export function sanitizePluginSurfaceId(pluginId) {
|
|
15
|
+
const cleaned = pluginId
|
|
16
|
+
.trim()
|
|
17
|
+
.replace(/[^a-zA-Z0-9._@+-]/g, "_")
|
|
18
|
+
.replace(/_+/g, "_")
|
|
19
|
+
.replace(/^_|_$/g, "");
|
|
20
|
+
return (cleaned || "unknown").slice(0, 96);
|
|
21
|
+
}
|
|
22
|
+
export function pluginSurfaceStore(pluginId) {
|
|
23
|
+
const id = sanitizePluginSurfaceId(pluginId);
|
|
24
|
+
let store = stores.get(id);
|
|
25
|
+
if (!store) {
|
|
26
|
+
store = createXrkDocStore(["community-surfaces", id, "surface.json"], EMPTY);
|
|
27
|
+
stores.set(id, store);
|
|
28
|
+
}
|
|
29
|
+
return store;
|
|
30
|
+
}
|
|
31
|
+
function asRecord(value) {
|
|
32
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
export function readPluginSurface(xrkHome, pluginId) {
|
|
38
|
+
const doc = pluginSurfaceStore(pluginId).read(xrkHome).data;
|
|
39
|
+
return {
|
|
40
|
+
config: asRecord(doc.config),
|
|
41
|
+
state: asRecord(doc.state),
|
|
42
|
+
settings: asRecord(doc.settings),
|
|
43
|
+
revision: typeof doc.revision === "number" ? doc.revision : 0,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function patchPluginSurface(xrkHome, pluginId, bucket, patch, mode = "merge") {
|
|
47
|
+
const doc = pluginSurfaceStore(pluginId).patch(xrkHome, (current) => {
|
|
48
|
+
const prev = asRecord(current[bucket]);
|
|
49
|
+
const next = mode === "replace" ? { ...patch } : { ...prev, ...patch };
|
|
50
|
+
return {
|
|
51
|
+
config: asRecord(current.config),
|
|
52
|
+
state: asRecord(current.state),
|
|
53
|
+
settings: asRecord(current.settings),
|
|
54
|
+
[bucket]: next,
|
|
55
|
+
revision: (typeof current.revision === "number" ? current.revision : 0) + 1,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
return {
|
|
59
|
+
config: asRecord(doc.data.config),
|
|
60
|
+
state: asRecord(doc.data.state),
|
|
61
|
+
settings: asRecord(doc.data.settings),
|
|
62
|
+
revision: doc.data.revision,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=plugin-surface-store.js.map
|
package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/plugin-surface-store.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-surface-store.js","sourceRoot":"","sources":["../../../src/dsh-compat/underlying/plugin-surface-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAoB,MAAM,gBAAgB,CAAC;AASrE,MAAM,KAAK,GAAqB;IAC9B,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAyC,CAAC;AAEhE,4DAA4D;AAC5D,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,MAAM,OAAO,GAAG,QAAQ;SACrB,IAAI,EAAE;SACN,OAAO,CAAC,oBAAoB,EAAE,GAAG,CAAC;SAClC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzB,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAgB;IAEhB,MAAM,EAAE,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,iBAAiB,CACvB,CAAC,oBAAoB,EAAE,EAAE,EAAE,cAAc,CAAC,EAC1C,KAAK,CACN,CAAC;QACF,MAAM,CA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YACL,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;YAChC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;YAC9B,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;YACpC,CAAC,MAAM,CAAC,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;SAC5E,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;QACjC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QAC/B,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `dsh-univer-office` — `/univer-api/*` offline gateway the client parses.
|
|
3
|
+
* No Univer process is started; status/state stay stopped with stable codes.
|
|
4
|
+
*/
|
|
5
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
6
|
+
export interface UniverApiOptions {
|
|
7
|
+
readonly xrkHome?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function isUniverApiPath(pathname: string): boolean;
|
|
10
|
+
export declare function handleUniverApiHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: UniverApiOptions): Promise<boolean>;
|
|
11
|
+
//# sourceMappingURL=univer-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"univer-api.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/univer-api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAMjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAuBD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAoGlB"}
|