@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
|
@@ -31,17 +31,31 @@ export function formatImageReadOutput(displayPath, image) {
|
|
|
31
31
|
`(${image.cropOffset.x}, ${image.cropOffset.y}); coordinates are relative ` +
|
|
32
32
|
`to that crop origin — add the offset to map back to the full image`;
|
|
33
33
|
}
|
|
34
|
-
return `<path>${displayPath}</path>
|
|
35
|
-
<type>image</type>
|
|
36
|
-
<content>
|
|
37
|
-
${image.mediaType} image, ${image.width}x${image.height} px, ${image.bytes} bytes${scaled}${cropNote}
|
|
34
|
+
return `<path>${displayPath}</path>
|
|
35
|
+
<type>image</type>
|
|
36
|
+
<content>
|
|
37
|
+
${image.mediaType} image, ${image.width}x${image.height} px, ${image.bytes} bytes${scaled}${cropNote}
|
|
38
38
|
</content>`;
|
|
39
39
|
}
|
|
40
|
+
/** Host attachment id (`sha256:…`) or `attachment:<id>` — not a workspace path. */
|
|
41
|
+
export function parseAttachmentFilePath(filePath) {
|
|
42
|
+
const raw = filePath.trim();
|
|
43
|
+
if (!raw)
|
|
44
|
+
return undefined;
|
|
45
|
+
if (raw.toLowerCase().startsWith("attachment:")) {
|
|
46
|
+
const id = raw.slice("attachment:".length).trim();
|
|
47
|
+
return id || undefined;
|
|
48
|
+
}
|
|
49
|
+
if (/^sha256:[a-f0-9]+$/i.test(raw))
|
|
50
|
+
return raw;
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
40
53
|
export function createReadImageTool(options) {
|
|
41
54
|
const { fs, attachments, routeAllowsImage } = options;
|
|
42
55
|
return {
|
|
43
56
|
name: "read_image",
|
|
44
|
-
description: "Read a PNG/JPEG/WebP/GIF
|
|
57
|
+
description: "Read a PNG/JPEG/WebP/GIF from a workspace path OR a Host attachment id " +
|
|
58
|
+
"(sha256:… / attachment:sha256:… from image_generate). " +
|
|
45
59
|
"Large images are normalized before the next model request. " +
|
|
46
60
|
"Optional region [x1,y1,x2,y2] crops in original-image pixels before downscaling " +
|
|
47
61
|
"(full-resolution zoom into small text or fine detail).",
|
|
@@ -50,7 +64,8 @@ export function createReadImageTool(options) {
|
|
|
50
64
|
properties: {
|
|
51
65
|
file_path: {
|
|
52
66
|
type: "string",
|
|
53
|
-
description: "Workspace-relative path
|
|
67
|
+
description: "Workspace-relative image path, or attachment id " +
|
|
68
|
+
"(sha256:… or attachment:sha256:…).",
|
|
54
69
|
},
|
|
55
70
|
region: {
|
|
56
71
|
type: "array",
|
|
@@ -87,37 +102,60 @@ export function createReadImageTool(options) {
|
|
|
87
102
|
}
|
|
88
103
|
region = parsed;
|
|
89
104
|
}
|
|
90
|
-
const mediaType = imageMediaTypeForPath(filePath);
|
|
91
|
-
if (mediaType === undefined) {
|
|
92
|
-
return {
|
|
93
|
-
content: `cannot read "${filePath}": read_image only accepts PNG/JPEG/WebP/GIF paths`,
|
|
94
|
-
isError: true,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
if (!attachments.imageLimits.mediaTypes.includes(mediaType)) {
|
|
98
|
-
return {
|
|
99
|
-
content: `cannot read "${filePath}": ${mediaType} images are not accepted`,
|
|
100
|
-
isError: true,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
105
|
if (routeAllowsImage && !routeAllowsImage()) {
|
|
104
106
|
return {
|
|
105
107
|
content: `cannot read "${filePath}" as an image: current model route does not declare image input`,
|
|
106
108
|
isError: true,
|
|
107
109
|
};
|
|
108
110
|
}
|
|
111
|
+
const attachmentId = parseAttachmentFilePath(filePath);
|
|
109
112
|
try {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
isError: true,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const byteCap = Math.min(attachments.imageLimits.maxImageBytes, attachments.imageLimits.maxMessageImageBytes);
|
|
118
|
-
let data = await fs.readBytes(filePath, byteCap);
|
|
119
|
-
let saveMediaType = mediaType;
|
|
113
|
+
let data;
|
|
114
|
+
let saveMediaType;
|
|
115
|
+
let displayPath;
|
|
116
|
+
let name;
|
|
120
117
|
let cropOffset;
|
|
118
|
+
if (attachmentId !== undefined) {
|
|
119
|
+
const stored = await attachments.readImage(attachmentId);
|
|
120
|
+
data = stored.data;
|
|
121
|
+
saveMediaType = stored.ref.mediaType;
|
|
122
|
+
displayPath = `attachment:${stored.ref.attachmentId}`;
|
|
123
|
+
name = stored.ref.name ?? stored.ref.attachmentId;
|
|
124
|
+
if (!attachments.imageLimits.mediaTypes.includes(saveMediaType)) {
|
|
125
|
+
return {
|
|
126
|
+
content: `cannot read "${filePath}": ${saveMediaType} images are not accepted`,
|
|
127
|
+
isError: true,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const mediaType = imageMediaTypeForPath(filePath);
|
|
133
|
+
if (mediaType === undefined) {
|
|
134
|
+
return {
|
|
135
|
+
content: `cannot read "${filePath}": read_image accepts PNG/JPEG/WebP/GIF paths ` +
|
|
136
|
+
`or attachment ids (sha256:… / attachment:sha256:…)`,
|
|
137
|
+
isError: true,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (!attachments.imageLimits.mediaTypes.includes(mediaType)) {
|
|
141
|
+
return {
|
|
142
|
+
content: `cannot read "${filePath}": ${mediaType} images are not accepted`,
|
|
143
|
+
isError: true,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const stat = await fs.stat(filePath);
|
|
147
|
+
if (!stat.isFile) {
|
|
148
|
+
return {
|
|
149
|
+
content: `cannot read "${filePath}": not a regular file`,
|
|
150
|
+
isError: true,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const byteCap = Math.min(attachments.imageLimits.maxImageBytes, attachments.imageLimits.maxMessageImageBytes);
|
|
154
|
+
data = await fs.readBytes(filePath, byteCap);
|
|
155
|
+
saveMediaType = mediaType;
|
|
156
|
+
displayPath = filePath;
|
|
157
|
+
name = basename(filePath);
|
|
158
|
+
}
|
|
121
159
|
if (region !== undefined) {
|
|
122
160
|
const cropped = await attachments.cropImageRegion(data, region);
|
|
123
161
|
data = cropped.data;
|
|
@@ -127,10 +165,10 @@ export function createReadImageTool(options) {
|
|
|
127
165
|
const ref = await attachments.saveImage({
|
|
128
166
|
data,
|
|
129
167
|
mediaType: saveMediaType,
|
|
130
|
-
name:
|
|
168
|
+
name: name ?? "image",
|
|
131
169
|
});
|
|
132
170
|
const value = {
|
|
133
|
-
path:
|
|
171
|
+
path: displayPath,
|
|
134
172
|
image: {
|
|
135
173
|
attachmentId: ref.attachmentId,
|
|
136
174
|
mediaType: ref.mediaType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G,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC7C,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-prompt.d.ts","sourceRoot":"","sources":["../src/routing-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAMjE,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"routing-prompt.d.ts","sourceRoot":"","sources":["../src/routing-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAMjE,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,CAoDpE;AAED,qFAAqF;AACrF,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,CAsCvE;AAED,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,QAOjC,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,QAWpC,CAAC"}
|
|
@@ -18,6 +18,9 @@ export function formatFsRoutingPrompt(available) {
|
|
|
18
18
|
if (names.has("read_file")) {
|
|
19
19
|
lines.push("- Inspect: prefer `read_file` (use offset/limit on large files) over cat/head/sed.");
|
|
20
20
|
}
|
|
21
|
+
if (names.has("read_image")) {
|
|
22
|
+
lines.push("- Images: `read_image` for workspace PNG/JPEG/WebP/GIF paths, or `sha256:…` / `attachment:sha256:…` ids from `image_generate` (not a disk hunt).");
|
|
23
|
+
}
|
|
21
24
|
if (names.has("apply_edit") || names.has("write_file") || names.has("apply_patch")) {
|
|
22
25
|
lines.push("- Edit: prefer `apply_edit` for a unique snippet; `apply_patch` for multi-file / structured hunks; `write_file` only to create or fully replace.");
|
|
23
26
|
}
|
|
@@ -27,12 +30,17 @@ export function formatFsRoutingPrompt(available) {
|
|
|
27
30
|
names.has("apply_patch"))) {
|
|
28
31
|
lines.push("- Read a path in this turn before `apply_edit` / `write_file` / `apply_patch` Update|Delete (write-intent).");
|
|
29
32
|
}
|
|
33
|
+
if (names.has("present")) {
|
|
34
|
+
lines.push("- Deliverables: after creating user-facing files (including via bash), call `present` with their paths before the final reply.");
|
|
35
|
+
}
|
|
30
36
|
if (names.has("glob") ||
|
|
31
37
|
names.has("grep") ||
|
|
32
38
|
names.has("read_file") ||
|
|
39
|
+
names.has("read_image") ||
|
|
33
40
|
names.has("apply_edit") ||
|
|
34
41
|
names.has("write_file") ||
|
|
35
|
-
names.has("apply_patch")
|
|
42
|
+
names.has("apply_patch") ||
|
|
43
|
+
names.has("present")) {
|
|
36
44
|
lines.push("- Paths may be workspace-relative or absolute under the workspace root.");
|
|
37
45
|
}
|
|
38
46
|
if (lines.length === 0)
|
|
@@ -46,6 +54,7 @@ export function formatShellRoutingPrompt(available) {
|
|
|
46
54
|
if (names.has("bash")) {
|
|
47
55
|
lines.push("- `bash` runs in the session workspace cwd by default (pwd should be the workspace).");
|
|
48
56
|
lines.push("- Use `bash` for builds, git, package managers, and one-shot commands.");
|
|
57
|
+
lines.push("- Screenshots / downloads from tools: write under the workspace (or an absolute path you control), then `read_image` / `present` that path — do not assume Desktop or Host cwd.");
|
|
49
58
|
}
|
|
50
59
|
const hasTerminal = names.has("terminal_open") ||
|
|
51
60
|
names.has("terminal_send") ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-prompt.js","sourceRoot":"","sources":["../src/routing-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,SA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QAC1B,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;QAC1B,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;QAC1B,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;QAC1B,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC;QAC3B,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC/B,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CACR,uEAAuE,CACxE,CAAC;IACJ,CAAC;IACD,IACE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;QACjB,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC;YACpB,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;YACvB,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,EACxB,CAAC;QACD,KAAK,CAAC,IAAI,CACR,8FAA8F,CAC/F,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAClC,OAAO,CAAC,mBAAmB,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACpD,CAAC;AAED,oDAAoD;AACpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;IAC1D,MAAM;IACN,MAAM;IACN,WAAW;IACX,YAAY;IACZ,aAAa;IACb,YAAY;CACb,CAAC,CAAC;AAEH,sDAAsD;AACtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC;IAChE,MAAM;IACN,eAAe;IACf,eAAe;IACf,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,UAAU;IACV,YAAY;IACZ,UAAU;CACX,CAAC,CAAC"}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-facing image_generate envelopes — short, location-clear (Codex-style).
|
|
3
|
+
*/
|
|
1
4
|
export declare const IMAGE_GEN_PROMPT_TEXT: string;
|
|
5
|
+
/** One generated image row in the model-visible tool text. */
|
|
6
|
+
export declare function formatImageGenImageLines(input: {
|
|
7
|
+
readonly index: number;
|
|
8
|
+
readonly mimeType: string;
|
|
9
|
+
readonly bytes: number;
|
|
10
|
+
readonly width?: number;
|
|
11
|
+
readonly height?: number;
|
|
12
|
+
readonly attachmentId?: string;
|
|
13
|
+
readonly revisedPrompt?: string;
|
|
14
|
+
readonly url?: string;
|
|
15
|
+
}): string[];
|
|
2
16
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,qBAAqB,QAOtB,CAAC;AAEb,8DAA8D;AAC9D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,EAAE,CAoBX"}
|
|
@@ -1,10 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-facing image_generate envelopes — short, location-clear (Codex-style).
|
|
3
|
+
*/
|
|
1
4
|
export const IMAGE_GEN_PROMPT_TEXT = [
|
|
2
5
|
"Image generation:",
|
|
3
|
-
"-
|
|
4
|
-
"-
|
|
5
|
-
"-
|
|
6
|
-
"-
|
|
7
|
-
"-
|
|
8
|
-
"- Without Settings Image gen / `XRK_IMAGE_GEN=1` (+ key) / `memory`, the tool stays visible and fails honestly.",
|
|
6
|
+
"- Call `image_generate` with a full visual `prompt` (optional `size` / `n`). Edit/i2i when the Provider allows refs.",
|
|
7
|
+
"- Edit refs: pass `reference_attachment_ids` (or `image_url=attachment:<id>` / https). Never paste `data:image/…;base64,…` into tool args — the call truncates (INCOMPLETE_TOOL_CALL).",
|
|
8
|
+
"- Result: chat shows the image; text gives `attachmentId=sha256:…`. That id is the durable address — not a filesystem path.",
|
|
9
|
+
"- Re-inspect or zoom: `read_image` with `file_path` set to that id (or `attachment:<id>`). Do not search `~/.xrk` or invent paths.",
|
|
10
|
+
"- Reuse as edit input: `reference_attachment_ids` / `image_url=attachment:<id>`.",
|
|
9
11
|
].join("\n");
|
|
12
|
+
/** One generated image row in the model-visible tool text. */
|
|
13
|
+
export function formatImageGenImageLines(input) {
|
|
14
|
+
const lines = [`--- image ${input.index} ---`];
|
|
15
|
+
const size = input.width !== undefined && input.height !== undefined
|
|
16
|
+
? ` ${input.width}x${input.height}`
|
|
17
|
+
: "";
|
|
18
|
+
lines.push(`mime=${input.mimeType} bytes=${input.bytes}${size}`);
|
|
19
|
+
if (input.revisedPrompt)
|
|
20
|
+
lines.push(`revised_prompt=${input.revisedPrompt}`);
|
|
21
|
+
if (input.url)
|
|
22
|
+
lines.push(`url=${input.url}`);
|
|
23
|
+
if (input.attachmentId) {
|
|
24
|
+
lines.push(`attachmentId=${input.attachmentId}`);
|
|
25
|
+
lines.push("use=Shown in chat. Re-inspect: read_image file_path=<attachmentId>. Not a disk path.");
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
lines.push("use=No AttachmentStore — image not durable; enable Host attachments for chat preview.");
|
|
29
|
+
}
|
|
30
|
+
return lines;
|
|
31
|
+
}
|
|
10
32
|
//# sourceMappingURL=format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,mBAAmB;IACnB,
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,mBAAmB;IACnB,sHAAsH;IACtH,wLAAwL;IACxL,6HAA6H;IAC7H,oIAAoI;IACpI,kFAAkF;CACnF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,8DAA8D;AAC9D,MAAM,UAAU,wBAAwB,CAAC,KASxC;IACC,MAAM,KAAK,GAAa,CAAC,aAAa,KAAK,CAAC,KAAK,MAAM,CAAC,CAAC;IACzD,MAAM,IAAI,GACR,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QACrD,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;QACnC,CAAC,CAAC,EAAE,CAAC;IACT,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,QAAQ,UAAU,KAAK,CAAC,KAAK,GAAG,IAAI,EAAE,CAAC,CAAC;IACjE,IAAI,KAAK,CAAC,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC;IAC7E,IAAI,KAAK,CAAC,GAAG;QAAE,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9C,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;QACjD,KAAK,CAAC,IAAI,CACR,sFAAsF,CACvF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CACR,uFAAuF,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ImageGenService } from "./types.js";
|
|
2
2
|
export { ImageGenError, IMAGE_GEN_CAPABILITIES_TEXT_ONLY, imageGenSupportsEdit, isImageGenError, resolveImageGenCapabilities, type ImageGenCapabilities, type ImageGenDelivery, type ImageGenErrorCode, type ImageGenImage, type ImageGenRequest, type ImageGenResult, type ImageGenService, type ImageGenSize, type ImageGenSourceImage, } from "./types.js";
|
|
3
3
|
export { FAL_IMAGE_DEFAULT_MODEL, FAL_IMAGE_MODELS, resolveFalImageModel, type FalImageModelEntry, } from "./catalog.js";
|
|
4
|
-
export { IMAGE_GEN_PROMPT_TEXT } from "./format.js";
|
|
4
|
+
export { IMAGE_GEN_PROMPT_TEXT, formatImageGenImageLines } from "./format.js";
|
|
5
5
|
export { createMemoryImageGenProvider, minimalPngBytes, type MemoryImageGenOptions, } from "./memory.js";
|
|
6
6
|
export { createOpenAiImageGenProvider, type OpenAiImageGenOptions, } from "./openai-http.js";
|
|
7
7
|
export { createFalImageGenProvider, type FalImageGenOptions, } from "./fal-http.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,oBAAoB,EACpB,eAAe,EACf,2BAA2B,EAC3B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EA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K,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,KAAK,0BAA0B,GAChC,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,wFAS1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,sCAAsC;AACtC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAgED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,GAAE,4BAAiC,GACzC,qBAAqB,CAqHvB"}
|
|
@@ -9,7 +9,7 @@ import { createXaiImageGenProvider } from "./xai-http.js";
|
|
|
9
9
|
import { imageGenUnavailableMessage } from "./tools.js";
|
|
10
10
|
export { ImageGenError, IMAGE_GEN_CAPABILITIES_TEXT_ONLY, imageGenSupportsEdit, isImageGenError, resolveImageGenCapabilities, } from "./types.js";
|
|
11
11
|
export { FAL_IMAGE_DEFAULT_MODEL, FAL_IMAGE_MODELS, resolveFalImageModel, } from "./catalog.js";
|
|
12
|
-
export { IMAGE_GEN_PROMPT_TEXT } from "./format.js";
|
|
12
|
+
export { IMAGE_GEN_PROMPT_TEXT, formatImageGenImageLines } from "./format.js";
|
|
13
13
|
export { createMemoryImageGenProvider, minimalPngBytes, } from "./memory.js";
|
|
14
14
|
export { createOpenAiImageGenProvider, } from "./openai-http.js";
|
|
15
15
|
export { createFalImageGenProvider, } from "./fal-http.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EACL,aAAa,EACb,gCAAgC,EAChC,oBAAoB,EACpB,eAAe,EACf,2BAA2B,GAU5B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,GAErB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],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kBAAkB,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AA+HrE,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAqEzC"}
|
|
@@ -20,8 +20,15 @@ function sniffMime(bytes, hint) {
|
|
|
20
20
|
}
|
|
21
21
|
return "image/png";
|
|
22
22
|
}
|
|
23
|
+
/** Inline data URLs larger than this truncate model tool JSON (INCOMPLETE_TOOL_CALL). */
|
|
24
|
+
const MAX_DATA_URL_CHARS = 8_192;
|
|
23
25
|
function parseDataUrl(url) {
|
|
24
|
-
const
|
|
26
|
+
const trimmed = url.trim();
|
|
27
|
+
if (trimmed.length > MAX_DATA_URL_CHARS) {
|
|
28
|
+
throw new ImageGenError("data:image base64 in tool args is too large and truncates the call. " +
|
|
29
|
+
"Use reference_attachment_ids (or image_url=attachment:<id>) for chat attachments / prior image_generate results.", "IMAGE_GEN_BAD_ARGS");
|
|
30
|
+
}
|
|
31
|
+
const match = /^data:(image\/(?:png|jpeg|jpg|webp));base64,(.+)$/iu.exec(trimmed);
|
|
25
32
|
if (!match) {
|
|
26
33
|
throw new ImageGenError("data: image_url must be image/png|jpeg|webp base64", "IMAGE_GEN_BAD_ARGS");
|
|
27
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.js","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAErE,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAExC,SAAS,SAAS,CAChB,KAAiB,EACjB,IAAa;IAEb,IAAI,IAAI,KAAK,YAAY,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC3E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACrF,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,IACE,KAAK,CAAC,MAAM,IAAI,EAAE;QAClB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI;QACjB,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,EACjB,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,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M,cAAc,CAAC,EAAE,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC5C,MAAM,IAAI,aAAa,CACrB,WAAW,OAAO,CAAC,kBAAkB,6BAA6B,EAClE,oBAAoB,CACrB,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAMlD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,2EAA2E;AAC3E,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,oBAAoB,GACzB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAMlD,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,2EAA2E;AAC3E,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,oBAAoB,GACzB,sBAAsB,CAgDxB;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAiB/E"}
|
|
@@ -34,17 +34,18 @@ export function buildImageGenToolParameters(caps) {
|
|
|
34
34
|
if (imageGenSupportsEdit(caps)) {
|
|
35
35
|
properties.image_url = {
|
|
36
36
|
type: "string",
|
|
37
|
-
description: "Primary reference
|
|
37
|
+
description: "Primary reference for edit / i2i: prefer attachment:<attachmentId> or https URL. " +
|
|
38
|
+
"Do NOT paste data:image/…;base64,… (truncates the tool call). Use reference_attachment_ids instead.",
|
|
38
39
|
};
|
|
39
40
|
properties.reference_image_urls = {
|
|
40
41
|
type: "array",
|
|
41
42
|
items: { type: "string" },
|
|
42
|
-
description: `Additional
|
|
43
|
+
description: `Additional https / attachment:<id> refs (same rules as image_url; no base64 data URLs). Max ${caps.maxReferenceImages} sources total.`,
|
|
43
44
|
};
|
|
44
45
|
properties.reference_attachment_ids = {
|
|
45
46
|
type: "array",
|
|
46
47
|
items: { type: "string" },
|
|
47
|
-
description: "Host AttachmentStore image ids
|
|
48
|
+
description: "Preferred edit references: Host AttachmentStore image ids from chat attachments or prior image_generate results.",
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
return {
|
|
@@ -56,12 +57,15 @@ export function buildImageGenToolParameters(caps) {
|
|
|
56
57
|
export function buildImageGenToolDescription(caps) {
|
|
57
58
|
if (imageGenSupportsEdit(caps)) {
|
|
58
59
|
return ("Generate or edit an image via the Host image Provider. " +
|
|
59
|
-
"Text-only prompt → text-to-image;
|
|
60
|
-
`
|
|
61
|
-
"
|
|
60
|
+
"Text-only prompt → text-to-image; for edit prefer reference_attachment_ids " +
|
|
61
|
+
`(or image_url=attachment:<id> / https; ≤${caps.maxReferenceImages}). ` +
|
|
62
|
+
"Never paste data:image base64 into args (call truncates). " +
|
|
63
|
+
"Chat shows the image; result text gives attachmentId=sha256:… " +
|
|
64
|
+
"(re-inspect with read_image; not a filesystem path).");
|
|
62
65
|
}
|
|
63
66
|
return ("Generate an image from a text prompt via the Host text-to-image Provider. " +
|
|
64
67
|
"This Provider does not accept reference images. " +
|
|
65
|
-
"
|
|
68
|
+
"Chat shows the image; result text gives attachmentId=sha256:… " +
|
|
69
|
+
"(re-inspect with read_image; not a filesystem path).");
|
|
66
70
|
}
|
|
67
71
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,oBAAoB,GAGrB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,eAAe,GAA4B;IACtD,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,WAAW;CACZ,CAAC;AAQF,2EAA2E;AAC3E,MAAM,UAAU,2BAA2B,CACzC,IAA0B;IAE1B,MAAM,UAAU,GAA4B;QAC1C,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,+EAA+E;SAClF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,eAAe,CAAC;YAC1B,WAAW,EAAE,sDAAsD;SACpE;QACD,CAAC,EAAE;YACD,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4CAA4C;SAC1D;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uDAAuD;SACrE;KACF,CAAC;IAEF,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,UAAU,CAAC,SAAS,GAAG;YACrB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,oBAA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AE,CAAC;QAC/B,OAAO,CACL,yDAAyD;YACzD,6EAA6E;YAC7E,2CAA2C,IAAI,CAAC,kBAAkB,KAAK;YACvE,4DAA4D;YAC5D,gEAAgE;YAChE,sDAAsD,CACvD,CAAC;IACJ,CAAC;IACD,OAAO,CACL,4EAA4E;QAC5E,kDAAkD;QAClD,gEAAgE;QAChE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AttachmentStore } from "@xrkseek/attachment";
|
|
2
2
|
import type { ToolDefinition } from "@xrkseek/core-tools";
|
|
3
|
-
import { IMAGE_GEN_PROMPT_TEXT } from "./format.js";
|
|
3
|
+
import { formatImageGenImageLines, IMAGE_GEN_PROMPT_TEXT } from "./format.js";
|
|
4
4
|
import { type ImageGenService } from "./types.js";
|
|
5
|
-
export { IMAGE_GEN_PROMPT_TEXT };
|
|
5
|
+
export { IMAGE_GEN_PROMPT_TEXT, formatImageGenImageLines };
|
|
6
6
|
export declare function imageGenUnavailableMessage(env?: NodeJS.ProcessEnv, product?: {
|
|
7
7
|
readonly mode?: string;
|
|
8
8
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AAE3D,wBAAgB,0BAA0B,CACxC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC,MAAM,CAyER;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACnC;AAgCD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,0BAA+B,GACvC,cAAc,EAAE,CAiIlB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IMAGE_GEN_PROMPT_TEXT } from "./format.js";
|
|
1
|
+
import { formatImageGenImageLines, IMAGE_GEN_PROMPT_TEXT, } from "./format.js";
|
|
2
2
|
import { resolveImageGenReferenceImages } from "./references.js";
|
|
3
3
|
import { buildImageGenToolDescription, buildImageGenToolParameters, IMAGE_GEN_SIZES, } from "./schema.js";
|
|
4
4
|
import { ImageGenError, isImageGenError, resolveImageGenCapabilities, } from "./types.js";
|
|
5
|
-
export { IMAGE_GEN_PROMPT_TEXT };
|
|
5
|
+
export { IMAGE_GEN_PROMPT_TEXT, formatImageGenImageLines };
|
|
6
6
|
export function imageGenUnavailableMessage(env = process.env, product) {
|
|
7
7
|
const envRaw = String(env.XRK_IMAGE_GEN ?? "").trim();
|
|
8
8
|
const productMode = String(product?.mode ?? "").trim().toLowerCase();
|
|
@@ -140,9 +140,12 @@ export function createImageGenTools(options = {}) {
|
|
|
140
140
|
];
|
|
141
141
|
if (result.note)
|
|
142
142
|
lines.push(`note=${result.note}`);
|
|
143
|
+
const imageBlocks = [];
|
|
143
144
|
for (let i = 0; i < result.images.length; i += 1) {
|
|
144
145
|
const img = result.images[i];
|
|
145
146
|
let attachmentId;
|
|
147
|
+
let width;
|
|
148
|
+
let height;
|
|
146
149
|
if (attachments) {
|
|
147
150
|
const ref = await attachments.saveImage({
|
|
148
151
|
data: img.bytes,
|
|
@@ -150,20 +153,41 @@ export function createImageGenTools(options = {}) {
|
|
|
150
153
|
name: `image_generate_${i + 1}.png`,
|
|
151
154
|
});
|
|
152
155
|
attachmentId = ref.attachmentId;
|
|
156
|
+
width = ref.width;
|
|
157
|
+
height = ref.height;
|
|
158
|
+
imageBlocks.push({
|
|
159
|
+
type: "image",
|
|
160
|
+
attachment: {
|
|
161
|
+
attachmentId: ref.attachmentId,
|
|
162
|
+
mediaType: ref.mediaType,
|
|
163
|
+
bytes: ref.bytes,
|
|
164
|
+
width: ref.width,
|
|
165
|
+
height: ref.height,
|
|
166
|
+
...(ref.name !== undefined ? { name: ref.name } : {}),
|
|
167
|
+
...(ref.originalDimensions !== undefined
|
|
168
|
+
? { originalDimensions: { ...ref.originalDimensions } }
|
|
169
|
+
: {}),
|
|
170
|
+
},
|
|
171
|
+
});
|
|
153
172
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
173
|
+
lines.push(...formatImageGenImageLines({
|
|
174
|
+
index: i + 1,
|
|
175
|
+
mimeType: img.mimeType,
|
|
176
|
+
bytes: img.bytes.byteLength,
|
|
177
|
+
...(width !== undefined ? { width } : {}),
|
|
178
|
+
...(height !== undefined ? { height } : {}),
|
|
179
|
+
...(attachmentId ? { attachmentId } : {}),
|
|
180
|
+
...(img.revisedPrompt ? { revisedPrompt: img.revisedPrompt } : {}),
|
|
181
|
+
...(img.url ? { url: img.url } : {}),
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
const text = lines.join("\n");
|
|
185
|
+
if (imageBlocks.length === 0) {
|
|
186
|
+
return { content: text };
|
|
165
187
|
}
|
|
166
|
-
return {
|
|
188
|
+
return {
|
|
189
|
+
content: [{ type: "text", text }, ...imageBlocks],
|
|
190
|
+
};
|
|
167
191
|
}
|
|
168
192
|
catch (err) {
|
|
169
193
|
return fail(err);
|