@xrkseek/harness 0.4.12 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/core-session/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js +3 -0
- package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +16 -0
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/store.d.ts +5 -0
- package/node_modules/@xrkseek/core-session/dist/store.d.ts.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/canvas-store.d.ts +63 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-store.js +235 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-store.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-tools.d.ts +14 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-tools.js +229 -0
- package/node_modules/@xrkseek/server-face/dist/canvas-tools.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +21 -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 +13 -3
- 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/goal-store.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.js +6 -0
- package/node_modules/@xrkseek/server-face/dist/goal-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/canvas.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/canvas.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/canvas.js +70 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/canvas.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/catalog.js +2 -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 +6 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js +90 -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 +8 -3
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +8 -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 +22 -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/wire/paths.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js +15 -0
- package/node_modules/@xrkseek/server-face/dist/wire/rpc-error.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts +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 +33 -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 +61 -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 +258 -128
- 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/boot-inject.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/boot-inject.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js +31 -0
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +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 +2 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +2 -1
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/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,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@linxin666/dsh-client-ui-skin-center` Host surface (`/api/skin-center/*`).
|
|
3
|
+
*
|
|
4
|
+
* Serves catalog + active preference + static skin files (stylesheet / patches /
|
|
5
|
+
* hooks / assets) from staged `skin.json` packs and bundled `skins/` dirs.
|
|
6
|
+
*/
|
|
7
|
+
import { createReadStream, existsSync, readdirSync, statSync, } from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { dataPath } from "./underlying/json-store.js";
|
|
10
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
11
|
+
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
12
|
+
import { httpMethod, isMutatingMethod, parseJsonBody, } from "./underlying/http-kit.js";
|
|
13
|
+
import { discoverInstalledSkins, findSkinById, resolveSkinRelative, } from "./skin-discover.js";
|
|
14
|
+
function listWallpapersFromUploads(options) {
|
|
15
|
+
const dir = dataPath(options.xrkHome, "wallpaper-engine", "uploads");
|
|
16
|
+
if (!existsSync(dir))
|
|
17
|
+
return [];
|
|
18
|
+
const out = [];
|
|
19
|
+
for (const name of readdirSync(dir)) {
|
|
20
|
+
const abs = path.join(dir, name);
|
|
21
|
+
try {
|
|
22
|
+
const st = statSync(abs);
|
|
23
|
+
if (!st.isFile())
|
|
24
|
+
continue;
|
|
25
|
+
out.push({
|
|
26
|
+
id: name,
|
|
27
|
+
title: path.parse(name).name,
|
|
28
|
+
kind: "upload",
|
|
29
|
+
bytes: st.size,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
/* skip */
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
const EMPTY_STATE = {
|
|
39
|
+
active: null,
|
|
40
|
+
background: null,
|
|
41
|
+
};
|
|
42
|
+
const STORE = createXrkDocStore(["skin-center", "active.json"], EMPTY_STATE);
|
|
43
|
+
function loadState(options) {
|
|
44
|
+
const raw = STORE.read(options.xrkHome).data;
|
|
45
|
+
return {
|
|
46
|
+
active: typeof raw.active === "string" ? raw.active : null,
|
|
47
|
+
background: raw.background ?? null,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function saveState(options, state) {
|
|
51
|
+
return STORE.write(options.xrkHome, state).revision;
|
|
52
|
+
}
|
|
53
|
+
export function isSkinCenterPath(pathname) {
|
|
54
|
+
return (pathname === "/api/skin-center" || pathname.startsWith("/api/skin-center/"));
|
|
55
|
+
}
|
|
56
|
+
function contentTypeFor(file) {
|
|
57
|
+
if (file.endsWith(".css"))
|
|
58
|
+
return "text/css; charset=utf-8";
|
|
59
|
+
if (file.endsWith(".mjs") || file.endsWith(".js")) {
|
|
60
|
+
return "text/javascript; charset=utf-8";
|
|
61
|
+
}
|
|
62
|
+
if (file.endsWith(".json"))
|
|
63
|
+
return "application/json; charset=utf-8";
|
|
64
|
+
if (file.endsWith(".webp"))
|
|
65
|
+
return "image/webp";
|
|
66
|
+
if (file.endsWith(".png"))
|
|
67
|
+
return "image/png";
|
|
68
|
+
if (file.endsWith(".jpg") || file.endsWith(".jpeg"))
|
|
69
|
+
return "image/jpeg";
|
|
70
|
+
if (file.endsWith(".svg"))
|
|
71
|
+
return "image/svg+xml";
|
|
72
|
+
if (file.endsWith(".mp4"))
|
|
73
|
+
return "video/mp4";
|
|
74
|
+
if (file.endsWith(".webm"))
|
|
75
|
+
return "video/webm";
|
|
76
|
+
return "application/octet-stream";
|
|
77
|
+
}
|
|
78
|
+
function sendFile(req, res, abs) {
|
|
79
|
+
const method = (req.method ?? "GET").toUpperCase();
|
|
80
|
+
const st = statSync(abs);
|
|
81
|
+
const headers = {
|
|
82
|
+
"Content-Type": contentTypeFor(abs),
|
|
83
|
+
"Content-Length": String(st.size),
|
|
84
|
+
"Cache-Control": "public, max-age=60",
|
|
85
|
+
"X-Content-Type-Options": "nosniff",
|
|
86
|
+
};
|
|
87
|
+
res.writeHead(200, headers);
|
|
88
|
+
if (method === "HEAD") {
|
|
89
|
+
res.end();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
createReadStream(abs).pipe(res);
|
|
93
|
+
}
|
|
94
|
+
function catalogPayload(options) {
|
|
95
|
+
const skins = discoverInstalledSkins(options).map((skin) => {
|
|
96
|
+
const manifest = { ...skin.manifest };
|
|
97
|
+
if (!manifest.version)
|
|
98
|
+
manifest.version = skin.version;
|
|
99
|
+
if (!manifest.id)
|
|
100
|
+
manifest.id = skin.id;
|
|
101
|
+
// Ensure contributes.stylesheet shape for v2 clients when only legacy fields exist.
|
|
102
|
+
if (!manifest.contributes && existsSync(path.join(skin.dir, "skin.css"))) {
|
|
103
|
+
manifest.contributes = {
|
|
104
|
+
stylesheet: "skin.css",
|
|
105
|
+
...(existsSync(path.join(skin.dir, "patches.css"))
|
|
106
|
+
? { patches: "patches.css" }
|
|
107
|
+
: {}),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
manifest,
|
|
112
|
+
...(skin.channel ? { channel: skin.channel } : {}),
|
|
113
|
+
origin: skin.origin,
|
|
114
|
+
package: skin.packageName,
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
return { skins, diagnostics: [] };
|
|
118
|
+
}
|
|
119
|
+
async function handleWe(req, res, pathname, options) {
|
|
120
|
+
const method = httpMethod(req);
|
|
121
|
+
const weBase = "/api/skin-center/we";
|
|
122
|
+
if (pathname === `${weBase}/inventory` && (method === "GET" || method === "HEAD")) {
|
|
123
|
+
const wallpapers = listWallpapersFromUploads(options);
|
|
124
|
+
sendJson(res, 200, {
|
|
125
|
+
ok: true,
|
|
126
|
+
wallpapers,
|
|
127
|
+
total: wallpapers.length,
|
|
128
|
+
});
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
if (pathname === `${weBase}/scene-probe` && (method === "GET" || method === "HEAD")) {
|
|
132
|
+
sendJson(res, 200, {
|
|
133
|
+
ok: true,
|
|
134
|
+
video: false,
|
|
135
|
+
webgl: false,
|
|
136
|
+
note: "Scene probe is a no-op on XRK Host",
|
|
137
|
+
});
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
if (pathname.startsWith(`${weBase}/`) && isMutatingMethod(method)) {
|
|
141
|
+
await parseJsonBody(req);
|
|
142
|
+
sendJson(res, 200, {
|
|
143
|
+
ok: true,
|
|
144
|
+
path: pathname,
|
|
145
|
+
note: "Wallpaper Engine actions are not wired on XRK Host",
|
|
146
|
+
});
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
if (pathname === weBase || pathname.startsWith(`${weBase}/`)) {
|
|
150
|
+
sendJson(res, 200, { ok: true, path: pathname, adapter: "xrk-skin-center" });
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
export async function handleSkinCenterHttp(req, res, pathname, options = {}) {
|
|
156
|
+
if (!isSkinCenterPath(pathname))
|
|
157
|
+
return false;
|
|
158
|
+
const method = httpMethod(req);
|
|
159
|
+
if (await handleWe(req, res, pathname, options))
|
|
160
|
+
return true;
|
|
161
|
+
const v2 = "/api/skin-center/v2";
|
|
162
|
+
if (pathname === `${v2}/catalog` && (method === "GET" || method === "HEAD")) {
|
|
163
|
+
sendJson(res, 200, catalogPayload(options));
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
if (pathname === `${v2}/active`) {
|
|
167
|
+
if (method === "GET" || method === "HEAD") {
|
|
168
|
+
const state = loadState(options);
|
|
169
|
+
sendJson(res, 200, {
|
|
170
|
+
ok: true,
|
|
171
|
+
active: state.active,
|
|
172
|
+
background: state.background,
|
|
173
|
+
});
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
if (isMutatingMethod(method)) {
|
|
177
|
+
const body = await parseJsonBody(req);
|
|
178
|
+
const state = loadState(options);
|
|
179
|
+
const next = { ...state };
|
|
180
|
+
if ("active" in body) {
|
|
181
|
+
next.active =
|
|
182
|
+
typeof body.active === "string"
|
|
183
|
+
? body.active
|
|
184
|
+
: body.active === null
|
|
185
|
+
? null
|
|
186
|
+
: state.active;
|
|
187
|
+
}
|
|
188
|
+
if ("background" in body) {
|
|
189
|
+
next.background = body.background;
|
|
190
|
+
}
|
|
191
|
+
saveState(options, next);
|
|
192
|
+
sendJson(res, 200, {
|
|
193
|
+
ok: true,
|
|
194
|
+
active: next.active,
|
|
195
|
+
background: next.background,
|
|
196
|
+
});
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (pathname === `${v2}/verify` && isMutatingMethod(method)) {
|
|
201
|
+
await parseJsonBody(req);
|
|
202
|
+
const skins = discoverInstalledSkins(options);
|
|
203
|
+
const details = skins.map((skin) => ({
|
|
204
|
+
id: skin.id,
|
|
205
|
+
ok: true,
|
|
206
|
+
issues: [],
|
|
207
|
+
}));
|
|
208
|
+
sendJson(res, 200, {
|
|
209
|
+
ok: true,
|
|
210
|
+
total: skins.length,
|
|
211
|
+
valid: skins.length,
|
|
212
|
+
issues: 0,
|
|
213
|
+
repaired: [],
|
|
214
|
+
repairFailed: [],
|
|
215
|
+
details,
|
|
216
|
+
});
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
// `/api/skin-center/v2/skins/<id>/…`
|
|
220
|
+
const skinMatch = pathname.match(/^\/api\/skin-center\/v2\/skins\/([^/]+)(?:\/(.*))?$/);
|
|
221
|
+
if (skinMatch) {
|
|
222
|
+
const skinId = decodeURIComponent(skinMatch[1]);
|
|
223
|
+
const rest = skinMatch[2] ?? "";
|
|
224
|
+
const skin = findSkinById(options, skinId);
|
|
225
|
+
if (!skin) {
|
|
226
|
+
sendJson(res, 404, { ok: false, error: "skin-not-found" });
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
if (rest === "uninstall" && isMutatingMethod(method)) {
|
|
230
|
+
sendJson(res, 200, {
|
|
231
|
+
ok: true,
|
|
232
|
+
removed: false,
|
|
233
|
+
note: "Uninstall via xrkh plugin remove; Host does not delete staged packs here.",
|
|
234
|
+
});
|
|
235
|
+
return true;
|
|
236
|
+
}
|
|
237
|
+
if (method !== "GET" && method !== "HEAD") {
|
|
238
|
+
sendJson(res, 405, { ok: false, error: "method-not-allowed" });
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
const contributes = skin.manifest.contributes;
|
|
242
|
+
if (rest === "stylesheet") {
|
|
243
|
+
const rel = (typeof contributes?.stylesheet === "string"
|
|
244
|
+
? contributes.stylesheet
|
|
245
|
+
: undefined) ?? "skin.css";
|
|
246
|
+
const abs = resolveSkinRelative(skin.dir, rel);
|
|
247
|
+
if (!abs) {
|
|
248
|
+
res.writeHead(404).end();
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
sendFile(req, res, abs);
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
if (rest === "patches") {
|
|
255
|
+
const rel = typeof contributes?.patches === "string" ? contributes.patches : undefined;
|
|
256
|
+
if (!rel) {
|
|
257
|
+
res.writeHead(404).end();
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
const abs = resolveSkinRelative(skin.dir, rel);
|
|
261
|
+
if (!abs) {
|
|
262
|
+
res.writeHead(404).end();
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
sendFile(req, res, abs);
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
if (rest === "hooks.mjs") {
|
|
269
|
+
const facets = skin.manifest.facets;
|
|
270
|
+
const entry = facets?.client?.entry ?? "hooks.mjs";
|
|
271
|
+
const abs = resolveSkinRelative(skin.dir, entry);
|
|
272
|
+
if (!abs) {
|
|
273
|
+
res.writeHead(404).end();
|
|
274
|
+
return true;
|
|
275
|
+
}
|
|
276
|
+
sendFile(req, res, abs);
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
// Background media + preview assets: `/skins/<id>/<relpath>`
|
|
280
|
+
if (rest) {
|
|
281
|
+
const abs = resolveSkinRelative(skin.dir, rest);
|
|
282
|
+
if (!abs) {
|
|
283
|
+
res.writeHead(404).end();
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
sendFile(req, res, abs);
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
// Bare skin id → manifest snapshot
|
|
290
|
+
sendJson(res, 200, {
|
|
291
|
+
ok: true,
|
|
292
|
+
manifest: skin.manifest,
|
|
293
|
+
package: skin.packageName,
|
|
294
|
+
});
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
sendJson(res, 200, {
|
|
298
|
+
ok: true,
|
|
299
|
+
path: pathname,
|
|
300
|
+
adapter: "xrk-skin-center",
|
|
301
|
+
});
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
/** Test helper — expose catalog builder. */
|
|
305
|
+
export function readSkinCenterCatalogForTest(options) {
|
|
306
|
+
return catalogPayload(options);
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=skin-center.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skin-center.js","sourceRoot":"","sources":["../../src/dsh-compat/skin-center.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GAEpB,MAAM,oBAAoB,CAAC;AAM5B,SAAS,yBAAyB,CAAC,OAA0B;IAC3D,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAC;IACrE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAChC,MAAM,GAAG,GAAc,EAAE,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC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AAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,4BAA4B,CAAC,OAA0B;IACrE,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type XrkPluginServicesOptions } from "../xrk/plugin-services.js";
|
|
2
|
+
export type SkinDiscoverOptions = XrkPluginServicesOptions;
|
|
3
|
+
/** Heuristic package-name hints when `skin.json` is absent. */
|
|
4
|
+
export declare const SKIN_NAME_HINTS: readonly ["skin", "dream-skin", "liang-intensity", "whale-girl", "whale", "maid", "atelier", "theme", "beauty", "endfield", "deep-whale", "open-sea", "custom-skin", "aqua", "orca"];
|
|
5
|
+
export interface DiscoveredSkin {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly nameEn?: string;
|
|
9
|
+
readonly tagline?: string;
|
|
10
|
+
readonly taglineEn?: string;
|
|
11
|
+
readonly packageName: string;
|
|
12
|
+
readonly version: string;
|
|
13
|
+
readonly bodyAttr?: string;
|
|
14
|
+
readonly wiringId?: string;
|
|
15
|
+
readonly dshCompatibility?: string;
|
|
16
|
+
readonly accent?: string;
|
|
17
|
+
readonly dir: string;
|
|
18
|
+
readonly manifest: Record<string, unknown>;
|
|
19
|
+
/** skin-center v2 manifests carry `contributes`. */
|
|
20
|
+
readonly channel?: string;
|
|
21
|
+
readonly origin: "plugin" | "bundled";
|
|
22
|
+
}
|
|
23
|
+
export declare function isSkinPackageName(id: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Scan staged client plugins for `skin.json` (root or bundled `skins/*`).
|
|
26
|
+
* Later plugin roots win over bundled duplicates with the same id.
|
|
27
|
+
*/
|
|
28
|
+
export declare function discoverInstalledSkins(options?: SkinDiscoverOptions): DiscoveredSkin[];
|
|
29
|
+
export declare function findSkinById(options: SkinDiscoverOptions, id: string): DiscoveredSkin | undefined;
|
|
30
|
+
/** Resolve a path under a skin dir; rejects traversal. */
|
|
31
|
+
export declare function resolveSkinRelative(skinDir: string, rel: string): string | undefined;
|
|
32
|
+
//# sourceMappingURL=skin-discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skin-discover.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/skin-discover.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AAE3D,+DAA+D;AAC/D,eAAO,MAAM,eAAe,sLAgBlB,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,oDAAoD;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;CACvC;AAaD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAGrD;AA4HD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,mBAAwB,GAChC,cAAc,EAAE,CAkBlB;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,MAAM,GACT,cAAc,GAAG,SAAS,CAE5B;AAED,0DAA0D;AAC1D,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAWpB"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discover installed community skins under `{pluginsDir}/web/plugins`.
|
|
3
|
+
* Shared by `/api/dsh/skins`, `/api/skin-center`, `/dsh-skin-market`, and audits.
|
|
4
|
+
*/
|
|
5
|
+
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { readXrkPluginInventory, resolvePluginsDir, } from "../xrk/plugin-services.js";
|
|
8
|
+
/** Heuristic package-name hints when `skin.json` is absent. */
|
|
9
|
+
export const SKIN_NAME_HINTS = [
|
|
10
|
+
"skin",
|
|
11
|
+
"dream-skin",
|
|
12
|
+
"liang-intensity",
|
|
13
|
+
"whale-girl",
|
|
14
|
+
"whale",
|
|
15
|
+
"maid",
|
|
16
|
+
"atelier",
|
|
17
|
+
"theme",
|
|
18
|
+
"beauty",
|
|
19
|
+
"endfield",
|
|
20
|
+
"deep-whale",
|
|
21
|
+
"open-sea",
|
|
22
|
+
"custom-skin",
|
|
23
|
+
"aqua",
|
|
24
|
+
"orca",
|
|
25
|
+
];
|
|
26
|
+
function asRecord(value) {
|
|
27
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
function asString(value) {
|
|
33
|
+
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
34
|
+
}
|
|
35
|
+
export function isSkinPackageName(id) {
|
|
36
|
+
const lower = id.toLowerCase();
|
|
37
|
+
return SKIN_NAME_HINTS.some((h) => lower.includes(h));
|
|
38
|
+
}
|
|
39
|
+
function packageNameFromDir(pluginsWeb, dir) {
|
|
40
|
+
const rel = path.relative(pluginsWeb, dir).split(path.sep).join("/");
|
|
41
|
+
return rel || path.basename(dir);
|
|
42
|
+
}
|
|
43
|
+
function readPackageVersion(dir) {
|
|
44
|
+
try {
|
|
45
|
+
const raw = JSON.parse(readFileSync(path.join(dir, "package.json"), "utf8"));
|
|
46
|
+
return asString(raw.version) ?? "0.0.0";
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return "0.0.0";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function parseSkinJson(dir, packageName, origin, channel) {
|
|
53
|
+
const skinJson = path.join(dir, "skin.json");
|
|
54
|
+
if (!existsSync(skinJson))
|
|
55
|
+
return undefined;
|
|
56
|
+
let raw;
|
|
57
|
+
try {
|
|
58
|
+
raw = JSON.parse(readFileSync(skinJson, "utf8"));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
const id = asString(raw.id);
|
|
64
|
+
const name = asString(raw.name);
|
|
65
|
+
if (!id || !name)
|
|
66
|
+
return undefined;
|
|
67
|
+
const wiring = asRecord(raw.wiring);
|
|
68
|
+
const declaredPackage = asString(raw.package) ?? packageName;
|
|
69
|
+
const version = asString(raw.version) ?? readPackageVersion(dir);
|
|
70
|
+
const nameEn = asString(raw.nameEn);
|
|
71
|
+
const tagline = asString(raw.tagline);
|
|
72
|
+
const taglineEn = asString(raw.taglineEn);
|
|
73
|
+
const bodyAttr = asString(raw.bodyAttr);
|
|
74
|
+
const wiringId = asString(wiring?.id);
|
|
75
|
+
const dshCompatibility = asString(raw.dshCompatibility);
|
|
76
|
+
const accent = asString(raw.accent);
|
|
77
|
+
return {
|
|
78
|
+
id,
|
|
79
|
+
name,
|
|
80
|
+
...(nameEn ? { nameEn } : {}),
|
|
81
|
+
...(tagline ? { tagline } : {}),
|
|
82
|
+
...(taglineEn ? { taglineEn } : {}),
|
|
83
|
+
packageName: declaredPackage,
|
|
84
|
+
version,
|
|
85
|
+
...(bodyAttr ? { bodyAttr } : {}),
|
|
86
|
+
...(wiringId ? { wiringId } : {}),
|
|
87
|
+
...(dshCompatibility ? { dshCompatibility } : {}),
|
|
88
|
+
...(accent ? { accent } : {}),
|
|
89
|
+
dir,
|
|
90
|
+
manifest: raw,
|
|
91
|
+
...(channel ? { channel } : {}),
|
|
92
|
+
origin,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function visitPluginTree(pluginsWeb, dir, out) {
|
|
96
|
+
let entries;
|
|
97
|
+
try {
|
|
98
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const packageName = packageNameFromDir(pluginsWeb, dir);
|
|
104
|
+
const rootSkin = parseSkinJson(dir, packageName, "plugin");
|
|
105
|
+
if (rootSkin && !out.has(rootSkin.id)) {
|
|
106
|
+
out.set(rootSkin.id, rootSkin);
|
|
107
|
+
}
|
|
108
|
+
// Bundled skins next to a manager/center package: `skins/<id>/skin.json`
|
|
109
|
+
const skinsDir = path.join(dir, "skins");
|
|
110
|
+
if (existsSync(skinsDir)) {
|
|
111
|
+
try {
|
|
112
|
+
for (const ent of readdirSync(skinsDir, { withFileTypes: true })) {
|
|
113
|
+
if (!ent.isDirectory())
|
|
114
|
+
continue;
|
|
115
|
+
const nested = path.join(skinsDir, ent.name);
|
|
116
|
+
const nestedSkin = parseSkinJson(nested, `${packageName}/skins/${ent.name}`, "bundled", "bundled");
|
|
117
|
+
if (nestedSkin && !out.has(nestedSkin.id)) {
|
|
118
|
+
out.set(nestedSkin.id, nestedSkin);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
/* skip */
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
for (const ent of entries) {
|
|
127
|
+
if (!ent.isDirectory())
|
|
128
|
+
continue;
|
|
129
|
+
if (ent.name === "node_modules" ||
|
|
130
|
+
ent.name === "chunks" ||
|
|
131
|
+
ent.name === "assets" ||
|
|
132
|
+
ent.name === "skins" ||
|
|
133
|
+
ent.name === "preview" ||
|
|
134
|
+
ent.name === "locale" ||
|
|
135
|
+
ent.name === "kws" ||
|
|
136
|
+
ent.name === "static") {
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
visitPluginTree(pluginsWeb, path.join(dir, ent.name), out);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Scan staged client plugins for `skin.json` (root or bundled `skins/*`).
|
|
144
|
+
* Later plugin roots win over bundled duplicates with the same id.
|
|
145
|
+
*/
|
|
146
|
+
export function discoverInstalledSkins(options = {}) {
|
|
147
|
+
const pluginsDir = resolvePluginsDir(options);
|
|
148
|
+
const web = path.join(pluginsDir, "web", "plugins");
|
|
149
|
+
const byId = new Map();
|
|
150
|
+
if (existsSync(web)) {
|
|
151
|
+
visitPluginTree(web, web, byId);
|
|
152
|
+
}
|
|
153
|
+
// Prefer inventory package versions when present.
|
|
154
|
+
const inv = readXrkPluginInventory(options);
|
|
155
|
+
for (const skin of byId.values()) {
|
|
156
|
+
const fromInv = inv.installedMap[skin.packageName]?.version;
|
|
157
|
+
if (fromInv && skin.version === "0.0.0") {
|
|
158
|
+
byId.set(skin.id, { ...skin, version: fromInv });
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return [...byId.values()].sort((a, b) => a.id.localeCompare(b.id));
|
|
162
|
+
}
|
|
163
|
+
export function findSkinById(options, id) {
|
|
164
|
+
return discoverInstalledSkins(options).find((s) => s.id === id);
|
|
165
|
+
}
|
|
166
|
+
/** Resolve a path under a skin dir; rejects traversal. */
|
|
167
|
+
export function resolveSkinRelative(skinDir, rel) {
|
|
168
|
+
if (!rel || rel.includes("\0") || path.isAbsolute(rel))
|
|
169
|
+
return undefined;
|
|
170
|
+
const target = path.resolve(skinDir, rel);
|
|
171
|
+
const base = path.resolve(skinDir);
|
|
172
|
+
if (target !== base && !target.startsWith(base + path.sep))
|
|
173
|
+
return undefined;
|
|
174
|
+
try {
|
|
175
|
+
if (statSync(target).isFile())
|
|
176
|
+
return target;
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=skin-discover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skin-discover.js","sourceRoot":"","sources":["../../src/dsh-compat/skin-discover.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AAInC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM;IACN,YAAY;IACZ,iBAAiB;IACjB,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,UAAU;IACV,aAAa;IACb,MAAM;IACN,MAAM;CACE,CAAC;AAqBX,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO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,OAA4B,EAC5B,EAAU;IAEV,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,GAAW;IAEX,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7E,IAAI,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE;YAAE,OAAO,MAAM,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
5
5
|
import { type XrkPluginServicesOptions } from "../xrk/plugin-services.js";
|
|
6
|
+
import { isSkinPackageName, SKIN_NAME_HINTS } from "./skin-discover.js";
|
|
7
|
+
export { SKIN_NAME_HINTS, isSkinPackageName };
|
|
6
8
|
export interface SkinMarketOptions extends XrkPluginServicesOptions {
|
|
7
9
|
readonly xrkHome?: string;
|
|
8
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skin-market.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/skin-market.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"skin-market.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/skin-market.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAEL,iBAAiB,EACjB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAE9C,MAAM,WAAW,iBAAkB,SAAQ,wBAAwB;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AA2ED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,OAAO,CAAC,CAkDlB;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,GACpB,MAAM,CAOR"}
|
|
@@ -2,13 +2,8 @@ import { sendJson } from "./underlying/http-json.js";
|
|
|
2
2
|
import { readXrkPluginInventory, } from "../xrk/plugin-services.js";
|
|
3
3
|
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
4
4
|
import { httpMethod, isMutatingMethod, parseJsonBody } from "./underlying/http-kit.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"dream-skin",
|
|
8
|
-
"liang-intensity",
|
|
9
|
-
"whale-girl",
|
|
10
|
-
"theme",
|
|
11
|
-
];
|
|
5
|
+
import { discoverInstalledSkins, isSkinPackageName, SKIN_NAME_HINTS, } from "./skin-discover.js";
|
|
6
|
+
export { SKIN_NAME_HINTS, isSkinPackageName };
|
|
12
7
|
const EMPTY_STATE = {
|
|
13
8
|
activeSkinId: null,
|
|
14
9
|
skins: [],
|
|
@@ -17,15 +12,22 @@ const SKIN_MARKET_STORE = createXrkDocStore(["skin-market", "state.json"], EMPTY
|
|
|
17
12
|
function loadState(options) {
|
|
18
13
|
return SKIN_MARKET_STORE.read(options.xrkHome).data;
|
|
19
14
|
}
|
|
20
|
-
function isSkinPlugin(id) {
|
|
21
|
-
const lower = id.toLowerCase();
|
|
22
|
-
return SKIN_NAME_HINTS.some((h) => lower.includes(h));
|
|
23
|
-
}
|
|
24
15
|
function buildCatalog(options) {
|
|
16
|
+
const discovered = discoverInstalledSkins(options);
|
|
17
|
+
if (discovered.length > 0) {
|
|
18
|
+
return discovered.map((skin) => ({
|
|
19
|
+
id: skin.id,
|
|
20
|
+
name: skin.name,
|
|
21
|
+
version: skin.version,
|
|
22
|
+
description: skin.tagline ?? `Installed skin (${skin.packageName})`,
|
|
23
|
+
package: skin.packageName,
|
|
24
|
+
source: "xrk-skin-json",
|
|
25
|
+
...(skin.accent ? { accent: skin.accent } : {}),
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
// Fallback: inventory name hints when no skin.json staged yet.
|
|
25
29
|
const inv = readXrkPluginInventory(options);
|
|
26
|
-
return inv.present
|
|
27
|
-
.filter(isSkinPlugin)
|
|
28
|
-
.map((id) => ({
|
|
30
|
+
return inv.present.filter(isSkinPackageName).map((id) => ({
|
|
29
31
|
id,
|
|
30
32
|
name: id,
|
|
31
33
|
version: inv.installedMap[id]?.version ?? "0.0.0",
|
|
@@ -40,11 +42,13 @@ function buildStatePayload(options) {
|
|
|
40
42
|
const skins = stored.skins.length
|
|
41
43
|
? stored.skins
|
|
42
44
|
: stored.activeSkinId && catalogIds.has(stored.activeSkinId)
|
|
43
|
-
? [
|
|
45
|
+
? [
|
|
46
|
+
{
|
|
44
47
|
skinId: stored.activeSkinId,
|
|
45
48
|
primary: true,
|
|
46
49
|
activation: "active",
|
|
47
|
-
}
|
|
50
|
+
},
|
|
51
|
+
]
|
|
48
52
|
: [];
|
|
49
53
|
return {
|
|
50
54
|
skins,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skin-market.js","sourceRoot":"","sources":["../../src/dsh-compat/skin-market.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EACL,sBAAsB,GAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"skin-market.js","sourceRoot":"","sources":["../../src/dsh-compat/skin-market.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EACL,sBAAsB,GAEvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAe9C,MAAM,WAAW,GAAoB;IACnC,YAAY,EAAE,IAAI;IAClB,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,iBAAiB,GAAG,iBAAiB,CACzC,CAAC,aAAa,EAAE,YAAY,CAAC,EAC7B,WAAW,CACZ,CAAC;AAEF,SAAS,SAAS,CAAC,OAA0B;IAC3C,OAAO,iBAAiB,CAAC,IAAI,CAAC,OAAO,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