@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 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-connector.js","sourceRoot":"","sources":["../../src/dsh-compat/mcp-connector.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAsBrE,MAAM,KAAK,GAAG,iBAAiB,CAAS,CAAC,mBAAmB,EAAE,YAAY,CAAC,EAAE;IAC3E,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AAEH,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,OAAO,CACL,QAAQ,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AE,EAAE,KAAK;YACT,KAAK,EAAE,gCAAgC;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QAChE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;QACjB,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;KACvD,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/api/michengai/<pkg>/update|check` — shared update-probe for MiChengAI packs.
|
|
3
|
+
* Previously dumped into im-connect empty channels (wrong).
|
|
4
|
+
*/
|
|
5
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
6
|
+
export interface MichengaiOptions {
|
|
7
|
+
readonly xrkHome?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function isMichengaiPath(pathname: string): boolean;
|
|
10
|
+
/** True for im-connect nested under michengai — leave to im-connect handler. */
|
|
11
|
+
export declare function isMichengaiImConnectPath(pathname: string): boolean;
|
|
12
|
+
export declare function handleMichengaiHttp(req: IncomingMessage, res: ServerResponse, pathname: string, options?: MichengaiOptions): Promise<boolean>;
|
|
13
|
+
//# sourceMappingURL=michengai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"michengai.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/michengai.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;AAsCD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED,gFAAgF;AAChF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKlE;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CA8HlB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { sendJson } from "./underlying/http-json.js";
|
|
2
|
+
import { createXrkDocStore } from "./underlying/doc-store.js";
|
|
3
|
+
import { httpMethod, parseJsonBody } from "./underlying/http-kit.js";
|
|
4
|
+
import { DSH_COMPAT_ADAPTER } from "./meta.js";
|
|
5
|
+
const STORE = createXrkDocStore(["dsh-michengai", "state.json"], {
|
|
6
|
+
schedules: [],
|
|
7
|
+
archives: [],
|
|
8
|
+
agents: [],
|
|
9
|
+
});
|
|
10
|
+
function updateProbe(packageName) {
|
|
11
|
+
return {
|
|
12
|
+
ok: true,
|
|
13
|
+
packageName,
|
|
14
|
+
current: null,
|
|
15
|
+
latest: null,
|
|
16
|
+
updateAvailable: false,
|
|
17
|
+
checkedAt: Date.now(),
|
|
18
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
19
|
+
note: "XRK update probe; install/update via dshmarket / xrkh plugin.",
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function isMichengaiPath(pathname) {
|
|
23
|
+
return (pathname === "/api/michengai" || pathname.startsWith("/api/michengai/"));
|
|
24
|
+
}
|
|
25
|
+
/** True for im-connect nested under michengai — leave to im-connect handler. */
|
|
26
|
+
export function isMichengaiImConnectPath(pathname) {
|
|
27
|
+
return (pathname === "/api/michengai/dsh-im-connect" ||
|
|
28
|
+
pathname.startsWith("/api/michengai/dsh-im-connect/"));
|
|
29
|
+
}
|
|
30
|
+
export async function handleMichengaiHttp(req, res, pathname, options = {}) {
|
|
31
|
+
if (!isMichengaiPath(pathname) || isMichengaiImConnectPath(pathname)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const method = httpMethod(req);
|
|
35
|
+
const parts = pathname.split("/").filter(Boolean);
|
|
36
|
+
// /api/michengai/<pkg>/...
|
|
37
|
+
const pkg = parts[2] ?? "";
|
|
38
|
+
const action = parts[3] ?? "";
|
|
39
|
+
const xrkHome = options.xrkHome;
|
|
40
|
+
if (action === "update" || action === "check" || action === "version") {
|
|
41
|
+
if (method === "POST" || method === "PUT")
|
|
42
|
+
await parseJsonBody(req);
|
|
43
|
+
const packageName = pkg ? `@michengai/${pkg}` : "unknown";
|
|
44
|
+
sendJson(res, 200, updateProbe(packageName));
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
// Automation schedule catalog
|
|
48
|
+
if (pkg === "dsh-automation" || pkg === "automation") {
|
|
49
|
+
if (action === "tasks" || action === "schedules" || action === "") {
|
|
50
|
+
if (method === "GET" || method === "HEAD") {
|
|
51
|
+
sendJson(res, 200, {
|
|
52
|
+
ok: true,
|
|
53
|
+
tasks: STORE.read(xrkHome).data.schedules,
|
|
54
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
55
|
+
});
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
if (method === "POST") {
|
|
59
|
+
const body = await parseJsonBody(req);
|
|
60
|
+
const now = new Date().toISOString();
|
|
61
|
+
const id = typeof body.id === "string" && body.id
|
|
62
|
+
? body.id
|
|
63
|
+
: `sched-${Date.now()}`;
|
|
64
|
+
const task = {
|
|
65
|
+
id,
|
|
66
|
+
name: typeof body.name === "string" ? body.name : "Untitled",
|
|
67
|
+
prompt: typeof body.prompt === "string" ? body.prompt : "",
|
|
68
|
+
scheduleKind: typeof body.scheduleKind === "string"
|
|
69
|
+
? body.scheduleKind
|
|
70
|
+
: "daily",
|
|
71
|
+
enabled: body.enabled !== false,
|
|
72
|
+
createdAt: now,
|
|
73
|
+
updatedAt: now,
|
|
74
|
+
...body,
|
|
75
|
+
};
|
|
76
|
+
STORE.patch(xrkHome, (doc) => ({
|
|
77
|
+
...doc,
|
|
78
|
+
schedules: [...doc.schedules.filter((t) => t.id !== id), task],
|
|
79
|
+
}));
|
|
80
|
+
sendJson(res, 200, {
|
|
81
|
+
ok: true,
|
|
82
|
+
task,
|
|
83
|
+
tasks: STORE.read(xrkHome).data.schedules,
|
|
84
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
85
|
+
});
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Archive manager list
|
|
91
|
+
if (pkg === "dsh-archive-manager" || pkg === "archive-manager") {
|
|
92
|
+
if (method === "GET" || method === "HEAD") {
|
|
93
|
+
sendJson(res, 200, {
|
|
94
|
+
ok: true,
|
|
95
|
+
archives: STORE.read(xrkHome).data.archives,
|
|
96
|
+
items: STORE.read(xrkHome).data.archives,
|
|
97
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
98
|
+
});
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
if (method === "POST") {
|
|
102
|
+
const body = await parseJsonBody(req);
|
|
103
|
+
STORE.patch(xrkHome, (doc) => ({
|
|
104
|
+
...doc,
|
|
105
|
+
archives: [body, ...doc.archives].slice(0, 200),
|
|
106
|
+
}));
|
|
107
|
+
sendJson(res, 200, {
|
|
108
|
+
ok: true,
|
|
109
|
+
archives: STORE.read(xrkHome).data.archives,
|
|
110
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
111
|
+
});
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Agency agents catalog
|
|
116
|
+
if (pkg === "dsh-agency-agents" || pkg === "agency-agents") {
|
|
117
|
+
if (method === "GET" || method === "HEAD") {
|
|
118
|
+
sendJson(res, 200, {
|
|
119
|
+
ok: true,
|
|
120
|
+
agents: STORE.read(xrkHome).data.agents,
|
|
121
|
+
items: STORE.read(xrkHome).data.agents,
|
|
122
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
123
|
+
});
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
if (method === "POST") {
|
|
127
|
+
const body = await parseJsonBody(req);
|
|
128
|
+
STORE.patch(xrkHome, (doc) => ({
|
|
129
|
+
...doc,
|
|
130
|
+
agents: [body, ...doc.agents].slice(0, 200),
|
|
131
|
+
}));
|
|
132
|
+
sendJson(res, 200, {
|
|
133
|
+
ok: true,
|
|
134
|
+
agents: STORE.read(xrkHome).data.agents,
|
|
135
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
136
|
+
});
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (method === "POST" || method === "PUT" || method === "PATCH") {
|
|
141
|
+
await parseJsonBody(req).catch(() => ({}));
|
|
142
|
+
}
|
|
143
|
+
sendJson(res, 200, {
|
|
144
|
+
ok: true,
|
|
145
|
+
path: pathname,
|
|
146
|
+
package: pkg || null,
|
|
147
|
+
adapter: DSH_COMPAT_ADAPTER,
|
|
148
|
+
});
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=michengai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"michengai.js","sourceRoot":"","sources":["../../src/dsh-compat/michengai.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAuB/C,MAAM,KAAK,GAAG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xrkHome: string | undefined, payload: Record<string, unknown>): MnemonDocument;
|
|
18
18
|
export declare function getMnemonDocument(xrkHome: string | undefined, id: string): MnemonDocument | null;
|
|
19
|
+
/** Soft-archive (forget) — keeps the row for capacity / pack export. */
|
|
20
|
+
export declare function archiveMnemonDocument(xrkHome: string | undefined, id: string): MnemonDocument | null;
|
|
21
|
+
/** Hard delete — used by body-delete when client asks for removal. */
|
|
22
|
+
export declare function deleteMnemonDocument(xrkHome: string | undefined, id: string): boolean;
|
|
23
|
+
/** Import pack rows (merge by id). */
|
|
24
|
+
export declare function importMnemonDocuments(xrkHome: string | undefined, rows: readonly Record<string, unknown>[]): MnemonDocument[];
|
|
19
25
|
//# sourceMappingURL=mnemon-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemon-store.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mnemon-store.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,CAEtE;AAED,6CAA6C;AAC7C,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,CAEzE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAWA;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,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AAM,GACT,OAAO,CAQT;AAED,sCAAsC;AACtC,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACvC,cAAc,EAAE,CAMlB"}
|
|
@@ -53,4 +53,38 @@ export function upsertMnemonDocument(xrkHome, payload) {
|
|
|
53
53
|
export function getMnemonDocument(xrkHome, id) {
|
|
54
54
|
return (MNEMON_DOCS.read(xrkHome).data.documents.find((d) => d.id === id) ?? null);
|
|
55
55
|
}
|
|
56
|
+
/** Soft-archive (forget) — keeps the row for capacity / pack export. */
|
|
57
|
+
export function archiveMnemonDocument(xrkHome, id) {
|
|
58
|
+
const now = new Date().toISOString();
|
|
59
|
+
let row = null;
|
|
60
|
+
MNEMON_DOCS.patch(xrkHome, (store) => {
|
|
61
|
+
const idx = store.documents.findIndex((d) => d.id === id);
|
|
62
|
+
if (idx < 0)
|
|
63
|
+
return store;
|
|
64
|
+
const prev = store.documents[idx];
|
|
65
|
+
row = { ...prev, archived: true, updatedAt: now };
|
|
66
|
+
const documents = [...store.documents];
|
|
67
|
+
documents[idx] = row;
|
|
68
|
+
return { documents };
|
|
69
|
+
});
|
|
70
|
+
return row;
|
|
71
|
+
}
|
|
72
|
+
/** Hard delete — used by body-delete when client asks for removal. */
|
|
73
|
+
export function deleteMnemonDocument(xrkHome, id) {
|
|
74
|
+
let removed = false;
|
|
75
|
+
MNEMON_DOCS.patch(xrkHome, (store) => {
|
|
76
|
+
const next = store.documents.filter((d) => d.id !== id);
|
|
77
|
+
removed = next.length !== store.documents.length;
|
|
78
|
+
return { documents: next };
|
|
79
|
+
});
|
|
80
|
+
return removed;
|
|
81
|
+
}
|
|
82
|
+
/** Import pack rows (merge by id). */
|
|
83
|
+
export function importMnemonDocuments(xrkHome, rows) {
|
|
84
|
+
const imported = [];
|
|
85
|
+
for (const raw of rows) {
|
|
86
|
+
imported.push(upsertMnemonDocument(xrkHome, raw));
|
|
87
|
+
}
|
|
88
|
+
return imported;
|
|
89
|
+
}
|
|
56
90
|
//# sourceMappingURL=mnemon-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemon-store.js","sourceRoot":"","sources":["../../src/dsh-compat/mnemon-store.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAe9D,MAAM,WAAW,GAAG,iBAAiB,CACnC,CAAC,QAAQ,EAAE,WAAW,EAAE,YAAY,CAAC,EACrC,EAAE,SAAS,EAAE,EAAE,EAAE,CAClB,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IAKnD,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;IACtD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,KAAK,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KA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AAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -6,6 +6,8 @@ export declare function buildMnemonStatus(options?: MnemonStatusOptions): unknow
|
|
|
6
6
|
export declare function buildMnemonVersions(): unknown;
|
|
7
7
|
export declare const MNEMON_SETTINGS_DEFAULTS: Record<string, unknown>;
|
|
8
8
|
export declare const MNEMON_UI_SETTINGS_DEFAULTS: Record<string, unknown>;
|
|
9
|
+
/** View-protocol settings (`/dsh-mnemon-view-settings`, ns `mnemon-view`). */
|
|
10
|
+
export declare const MNEMON_VIEW_SETTINGS_DEFAULTS: Record<string, unknown>;
|
|
9
11
|
/** Provider catalog shape expected by dsh-mnemon settings (`catalog.providers.map`). */
|
|
10
12
|
export declare function buildMnemonProviderCatalog(): {
|
|
11
13
|
readonly providers: ReadonlyArray<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mnemon.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mnemon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mnemon.d.ts","sourceRoot":"","sources":["../../src/dsh-compat/mnemon.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AA0DD,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAiE5E;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CA0B7C;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAM5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAG/D,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAGjE,CAAC;AAaF,wFAAwF;AACxF,wBAAgB,0BAA0B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ments, searchMnemonDocuments, } from "./mnemon-engine.js";
|
|
11
11
|
import { resolveCompatHome } from "./underlying/json-store.js";
|
|
12
|
-
import { countMnemonDocuments, getMnemonDocument, listAllMnemonDocuments, listMnemonDocuments, upsertMnemonDocument, } from "./mnemon-store.js";
|
|
12
|
+
import { archiveMnemonDocument, countMnemonDocuments, deleteMnemonDocument, getMnemonDocument, importMnemonDocuments, listAllMnemonDocuments, listMnemonDocuments, upsertMnemonDocument, } from "./mnemon-store.js";
|
|
13
|
+
/** Soft active-byte cap for capacity-plan (document engine, not Mnemon CLI). */
|
|
14
|
+
const DOCUMENTS_ACTIVE_LIMIT_BYTES = 32 * 1024 * 1024;
|
|
13
15
|
function area(kind, root, details, itemCount = 0) {
|
|
14
16
|
const dir = kind === "runtime"
|
|
15
17
|
? path.join(root, "runtime")
|
|
@@ -143,6 +145,11 @@ export const MNEMON_UI_SETTINGS_DEFAULTS = {
|
|
|
143
145
|
turnBar: true,
|
|
144
146
|
saveAction: true,
|
|
145
147
|
};
|
|
148
|
+
/** View-protocol settings (`/dsh-mnemon-view-settings`, ns `mnemon-view`). */
|
|
149
|
+
export const MNEMON_VIEW_SETTINGS_DEFAULTS = {
|
|
150
|
+
displayMode: "sidebar",
|
|
151
|
+
entry: "sidebar",
|
|
152
|
+
};
|
|
146
153
|
/** Engine RPCs over stored documents (keyword search · mention graph · bodies). */
|
|
147
154
|
const MNEMON_ENGINE_ENDPOINTS = new Set([
|
|
148
155
|
"entities",
|
|
@@ -152,7 +159,6 @@ const MNEMON_ENGINE_ENDPOINTS = new Set([
|
|
|
152
159
|
"bodies",
|
|
153
160
|
"body-directory",
|
|
154
161
|
"runtime-memory",
|
|
155
|
-
"turn-activities",
|
|
156
162
|
]);
|
|
157
163
|
/** Provider catalog shape expected by dsh-mnemon settings (`catalog.providers.map`). */
|
|
158
164
|
export function buildMnemonProviderCatalog() {
|
|
@@ -269,22 +275,153 @@ function queryMnemonEngine(endpoint, docs, payload) {
|
|
|
269
275
|
}));
|
|
270
276
|
return { ok: true, endpoint, engine, items };
|
|
271
277
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
278
|
+
return { ok: true, endpoint, engine, items: [] };
|
|
279
|
+
}
|
|
280
|
+
function docBytes(doc) {
|
|
281
|
+
return (Buffer.byteLength(doc.body, "utf8") + Buffer.byteLength(doc.title, "utf8"));
|
|
282
|
+
}
|
|
283
|
+
function snapshotDocument(doc) {
|
|
284
|
+
const status = doc.archived ? "archived" : "active";
|
|
285
|
+
const filename = `${doc.id}.md`;
|
|
286
|
+
return {
|
|
287
|
+
id: doc.id,
|
|
288
|
+
title: doc.title || doc.id,
|
|
289
|
+
description: doc.body.slice(0, 240),
|
|
290
|
+
status,
|
|
291
|
+
filename,
|
|
292
|
+
relativePath: `documents/${status}/${filename}`,
|
|
293
|
+
sourcePaths: [],
|
|
294
|
+
memoryBodyIds: doc.archived ? [] : [doc.id],
|
|
295
|
+
revision: 1,
|
|
296
|
+
contentHash: `${doc.updatedAt}:${docBytes(doc)}`,
|
|
297
|
+
sizeBytes: docBytes(doc),
|
|
298
|
+
...(doc.archived ? { archivedAt: doc.updatedAt } : {}),
|
|
299
|
+
updatedAt: doc.updatedAt,
|
|
300
|
+
createdAt: doc.createdAt,
|
|
301
|
+
body: doc.body,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function buildDocumentsSnapshot(home) {
|
|
305
|
+
const docs = listAllMnemonDocuments(home);
|
|
306
|
+
const documents = docs.map(snapshotDocument);
|
|
307
|
+
const activeBytes = documents
|
|
308
|
+
.filter((d) => d.status === "active")
|
|
309
|
+
.reduce((sum, d) => sum + d.sizeBytes, 0);
|
|
310
|
+
return {
|
|
311
|
+
version: 1,
|
|
312
|
+
documents,
|
|
313
|
+
items: documents.filter((d) => d.status === "active"),
|
|
314
|
+
activeBytes,
|
|
315
|
+
limitBytes: DOCUMENTS_ACTIVE_LIMIT_BYTES,
|
|
316
|
+
generatedAt: new Date().toISOString(),
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function buildCapacityPlan(home, payload) {
|
|
320
|
+
const snapshot = buildDocumentsSnapshot(home);
|
|
321
|
+
const projected = typeof payload.projected === "number" && Number.isFinite(payload.projected)
|
|
322
|
+
? Math.max(0, Math.floor(payload.projected))
|
|
323
|
+
: snapshot.activeBytes;
|
|
324
|
+
const limit = typeof payload.limit === "number" && Number.isFinite(payload.limit)
|
|
325
|
+
? Math.max(1, Math.floor(payload.limit))
|
|
326
|
+
: DOCUMENTS_ACTIVE_LIMIT_BYTES;
|
|
327
|
+
const candidates = snapshot.documents
|
|
328
|
+
.filter((d) => d.status === "active")
|
|
329
|
+
.slice()
|
|
330
|
+
.sort((a, b) => a.updatedAt.localeCompare(b.updatedAt));
|
|
331
|
+
return {
|
|
332
|
+
fits: projected <= limit,
|
|
333
|
+
projected,
|
|
334
|
+
limit,
|
|
335
|
+
candidates,
|
|
336
|
+
revision: snapshot.documents.length,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
function buildMaintenancePlan(home, payload) {
|
|
340
|
+
const counts = countMnemonDocuments(home);
|
|
341
|
+
const active = listMnemonDocuments(home);
|
|
342
|
+
const revision = typeof payload.expectedRevision === "number"
|
|
343
|
+
? Math.floor(payload.expectedRevision)
|
|
344
|
+
: counts.active + counts.archived;
|
|
345
|
+
const over = counts.bytes > DOCUMENTS_ACTIVE_LIMIT_BYTES ||
|
|
346
|
+
payload.force === true;
|
|
347
|
+
return {
|
|
348
|
+
revision,
|
|
349
|
+
requiresMaintenance: over,
|
|
350
|
+
entries: over
|
|
351
|
+
? active
|
|
352
|
+
.slice()
|
|
353
|
+
.sort((a, b) => a.updatedAt.localeCompare(b.updatedAt))
|
|
354
|
+
.slice(0, 12)
|
|
355
|
+
.map((doc) => ({
|
|
356
|
+
id: doc.id,
|
|
357
|
+
title: doc.title,
|
|
358
|
+
sizeBytes: docBytes(doc),
|
|
359
|
+
updatedAt: doc.updatedAt,
|
|
360
|
+
}))
|
|
361
|
+
: [],
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
function buildPrepareBodyPlacement(payload) {
|
|
365
|
+
const name = typeof payload.name === "string" && payload.name.trim()
|
|
366
|
+
? payload.name.trim()
|
|
367
|
+
: "memory-body";
|
|
368
|
+
const description = typeof payload.description === "string" ? payload.description : "";
|
|
369
|
+
return {
|
|
370
|
+
prompt: `Place memory body "${name}"`,
|
|
371
|
+
selectorBrief: description.slice(0, 400) || "default mnemon-native provider",
|
|
372
|
+
candidates: [{ id: "mnemon-native", label: "mnemon" }],
|
|
373
|
+
name,
|
|
374
|
+
description,
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
function buildFinalizePlacement(payload) {
|
|
378
|
+
const prepared = payload.prepared && typeof payload.prepared === "object"
|
|
379
|
+
? payload.prepared
|
|
380
|
+
: {};
|
|
381
|
+
const selection = payload.selection && typeof payload.selection === "object"
|
|
382
|
+
? payload.selection
|
|
383
|
+
: {};
|
|
384
|
+
const providerId = typeof selection.providerId === "string" && selection.providerId.trim()
|
|
385
|
+
? selection.providerId.trim()
|
|
386
|
+
: "mnemon-native";
|
|
387
|
+
return {
|
|
388
|
+
providerId,
|
|
389
|
+
reason: typeof selection.reason === "string" && selection.reason.trim()
|
|
390
|
+
? selection.reason.trim()
|
|
391
|
+
: "compat-default",
|
|
392
|
+
confidence: typeof selection.confidence === "string" ? selection.confidence : "high",
|
|
393
|
+
prepared,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
function buildMetadataSample(home, payload) {
|
|
397
|
+
const id = typeof payload.memoryBodyId === "string"
|
|
398
|
+
? payload.memoryBodyId
|
|
399
|
+
: typeof payload.id === "string"
|
|
400
|
+
? payload.id
|
|
276
401
|
: "";
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
402
|
+
const doc = id ? getMnemonDocument(home, id) : null;
|
|
403
|
+
const evidence = doc
|
|
404
|
+
? [
|
|
405
|
+
{
|
|
406
|
+
category: "document",
|
|
407
|
+
entities: collectMnemonEntities([doc]).map((e) => e.label),
|
|
408
|
+
content: `${doc.title}\n${doc.body}`.slice(0, 1200),
|
|
409
|
+
},
|
|
410
|
+
]
|
|
286
411
|
: [];
|
|
287
|
-
return {
|
|
412
|
+
return {
|
|
413
|
+
memoryBodyId: id || "unknown",
|
|
414
|
+
evidence,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
/** Client turn-activity projection — `{ cursor, activities }` (rpcOk wraps as value). */
|
|
418
|
+
function buildTurnActivities(payload) {
|
|
419
|
+
const sessionId = typeof payload.sessionId === "string" ? payload.sessionId : "";
|
|
420
|
+
return {
|
|
421
|
+
cursor: 0,
|
|
422
|
+
activities: [],
|
|
423
|
+
sessionId,
|
|
424
|
+
};
|
|
288
425
|
}
|
|
289
426
|
export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
290
427
|
const home = options.xrkHome?.trim();
|
|
@@ -296,6 +433,34 @@ export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
|
296
433
|
if (endpoint === "documents" || endpoint === "list") {
|
|
297
434
|
return listMnemonDocuments(home);
|
|
298
435
|
}
|
|
436
|
+
if (endpoint === "snapshot") {
|
|
437
|
+
return buildDocumentsSnapshot(home);
|
|
438
|
+
}
|
|
439
|
+
if (endpoint === "capacity-plan") {
|
|
440
|
+
return buildCapacityPlan(home, payload);
|
|
441
|
+
}
|
|
442
|
+
if (endpoint === "maintenance-plan") {
|
|
443
|
+
return buildMaintenancePlan(home, payload);
|
|
444
|
+
}
|
|
445
|
+
if (endpoint === "prepare-body-placement") {
|
|
446
|
+
return buildPrepareBodyPlacement(payload);
|
|
447
|
+
}
|
|
448
|
+
if (endpoint === "finalize-placement") {
|
|
449
|
+
return buildFinalizePlacement(payload);
|
|
450
|
+
}
|
|
451
|
+
if (endpoint === "metadata-sample") {
|
|
452
|
+
return buildMetadataSample(home, payload);
|
|
453
|
+
}
|
|
454
|
+
if (endpoint === "turn-activities" || endpoint === "turn-activity") {
|
|
455
|
+
const snap = buildTurnActivities(payload);
|
|
456
|
+
if (endpoint === "turn-activity") {
|
|
457
|
+
const turn = typeof payload.turn === "number"
|
|
458
|
+
? payload.turn
|
|
459
|
+
: Number(payload.turn);
|
|
460
|
+
return (snap.activities.find((activity) => activity.turn === turn) ?? null);
|
|
461
|
+
}
|
|
462
|
+
return snap;
|
|
463
|
+
}
|
|
299
464
|
if (MNEMON_ENGINE_ENDPOINTS.has(endpoint)) {
|
|
300
465
|
return queryMnemonEngine(endpoint, listAllMnemonDocuments(home), payload);
|
|
301
466
|
}
|
|
@@ -304,7 +469,8 @@ export function handleMnemonRead(endpoint, options, payload = {}) {
|
|
|
304
469
|
}
|
|
305
470
|
if (endpoint === "document") {
|
|
306
471
|
const id = typeof payload.id === "string" ? payload.id : "";
|
|
307
|
-
|
|
472
|
+
const doc = id ? getMnemonDocument(home, id) : null;
|
|
473
|
+
return doc ? snapshotDocument(doc) : null;
|
|
308
474
|
}
|
|
309
475
|
if (endpoint === "task-agent-models") {
|
|
310
476
|
return buildMnemonTaskAgentModels();
|
|
@@ -336,9 +502,94 @@ export function handleMnemonWrite(endpoint, payload, options = {}) {
|
|
|
336
502
|
if (endpoint === "document" ||
|
|
337
503
|
endpoint === "document-upsert" ||
|
|
338
504
|
endpoint === "upsert" ||
|
|
339
|
-
endpoint === "save"
|
|
340
|
-
|
|
341
|
-
|
|
505
|
+
endpoint === "save" ||
|
|
506
|
+
endpoint === "write" ||
|
|
507
|
+
endpoint === "body-create" ||
|
|
508
|
+
endpoint === "body-update" ||
|
|
509
|
+
endpoint === "body-merge") {
|
|
510
|
+
if (endpoint === "document" &&
|
|
511
|
+
(payload.action === "archive" || payload.action === "forget")) {
|
|
512
|
+
const id = typeof payload.id === "string"
|
|
513
|
+
? payload.id
|
|
514
|
+
: typeof payload.documentId === "string"
|
|
515
|
+
? payload.documentId
|
|
516
|
+
: "";
|
|
517
|
+
const archived = id ? archiveMnemonDocument(home, id) : null;
|
|
518
|
+
return {
|
|
519
|
+
ok: Boolean(archived),
|
|
520
|
+
action: archived ? "forgotten" : "missing",
|
|
521
|
+
document: archived,
|
|
522
|
+
maintenance: { memoryBodyIds: archived ? [archived.id] : [] },
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
const request = payload.request && typeof payload.request === "object"
|
|
526
|
+
? payload.request
|
|
527
|
+
: payload;
|
|
528
|
+
const doc = upsertMnemonDocument(home, {
|
|
529
|
+
...request,
|
|
530
|
+
...(typeof request.name === "string" && !request.title
|
|
531
|
+
? { title: request.name }
|
|
532
|
+
: {}),
|
|
533
|
+
...(typeof request.description === "string" && !request.body
|
|
534
|
+
? { body: request.description }
|
|
535
|
+
: {}),
|
|
536
|
+
});
|
|
537
|
+
return { ok: true, document: doc, action: "written" };
|
|
538
|
+
}
|
|
539
|
+
if (endpoint === "archive" ||
|
|
540
|
+
endpoint === "forget" ||
|
|
541
|
+
endpoint === "body-delete" ||
|
|
542
|
+
endpoint === "delete") {
|
|
543
|
+
const id = typeof payload.id === "string"
|
|
544
|
+
? payload.id
|
|
545
|
+
: typeof payload.documentId === "string"
|
|
546
|
+
? payload.documentId
|
|
547
|
+
: typeof payload.memoryBodyId === "string"
|
|
548
|
+
? payload.memoryBodyId
|
|
549
|
+
: "";
|
|
550
|
+
if (endpoint === "body-delete" || endpoint === "delete") {
|
|
551
|
+
const removed = id ? deleteMnemonDocument(home, id) : false;
|
|
552
|
+
return {
|
|
553
|
+
ok: removed,
|
|
554
|
+
action: removed ? "forgotten" : "missing",
|
|
555
|
+
id,
|
|
556
|
+
summary: removed ? "" : "document not found",
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
const archived = id ? archiveMnemonDocument(home, id) : null;
|
|
560
|
+
return {
|
|
561
|
+
ok: Boolean(archived),
|
|
562
|
+
action: archived ? "forgotten" : "missing",
|
|
563
|
+
document: archived,
|
|
564
|
+
summary: archived ? "" : "document not found",
|
|
565
|
+
maintenance: { memoryBodyIds: archived ? [archived.id] : [] },
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
if (endpoint === "import") {
|
|
569
|
+
const rows = Array.isArray(payload.documents)
|
|
570
|
+
? payload.documents
|
|
571
|
+
: Array.isArray(payload.items)
|
|
572
|
+
? payload.items
|
|
573
|
+
: [];
|
|
574
|
+
const documents = importMnemonDocuments(home, rows);
|
|
575
|
+
return {
|
|
576
|
+
ok: true,
|
|
577
|
+
mode: "merge",
|
|
578
|
+
imported: documents.length,
|
|
579
|
+
documents,
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
if (endpoint === "link") {
|
|
583
|
+
return {
|
|
584
|
+
ok: true,
|
|
585
|
+
action: "linked",
|
|
586
|
+
from: typeof payload.from === "string"
|
|
587
|
+
? payload.from
|
|
588
|
+
: typeof payload.id === "string"
|
|
589
|
+
? payload.id
|
|
590
|
+
: "",
|
|
591
|
+
to: typeof payload.to === "string" ? payload.to : "",
|
|
592
|
+
};
|
|
342
593
|
}
|
|
343
594
|
if (endpoint === "pack" || endpoint === "export") {
|
|
344
595
|
return {
|