@xrkseek/harness 0.4.3 → 0.4.5
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/a2a/README.md +43 -0
- package/node_modules/@xrkseek/a2a/dist/client.d.ts +35 -0
- package/node_modules/@xrkseek/a2a/dist/client.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/client.js +229 -0
- package/node_modules/@xrkseek/a2a/dist/client.js.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/inbound.d.ts +42 -0
- package/node_modules/@xrkseek/a2a/dist/inbound.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/inbound.js +263 -0
- package/node_modules/@xrkseek/a2a/dist/inbound.js.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/index.d.ts +6 -0
- package/node_modules/@xrkseek/a2a/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/index.js +6 -0
- package/node_modules/@xrkseek/a2a/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/peers.d.ts +25 -0
- package/node_modules/@xrkseek/a2a/dist/peers.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/peers.js +90 -0
- package/node_modules/@xrkseek/a2a/dist/peers.js.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.d.ts +45 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.js +172 -0
- package/node_modules/@xrkseek/a2a/dist/protocol.js.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/tools.d.ts +10 -0
- package/node_modules/@xrkseek/a2a/dist/tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/a2a/dist/tools.js +145 -0
- package/node_modules/@xrkseek/a2a/dist/tools.js.map +1 -0
- package/node_modules/@xrkseek/a2a/package.json +28 -0
- package/node_modules/@xrkseek/attachment/README.md +23 -17
- package/node_modules/@xrkseek/attachment/dist/image-tokens.d.ts +30 -0
- package/node_modules/@xrkseek/attachment/dist/image-tokens.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment/dist/image-tokens.js +142 -0
- package/node_modules/@xrkseek/attachment/dist/image-tokens.js.map +1 -0
- package/node_modules/@xrkseek/attachment/dist/index.d.ts +2 -0
- package/node_modules/@xrkseek/attachment/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/index.js +2 -0
- package/node_modules/@xrkseek/attachment/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/request-projection.d.ts +20 -0
- package/node_modules/@xrkseek/attachment/dist/request-projection.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment/dist/request-projection.js +49 -0
- package/node_modules/@xrkseek/attachment/dist/request-projection.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts +2 -11
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js +3 -29
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/README.md +4 -2
- package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts +6 -0
- package/node_modules/@xrkseek/checkpoint/dist/process-git.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/process-git.js +23 -1
- package/node_modules/@xrkseek/checkpoint/dist/process-git.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts +30 -2
- package/node_modules/@xrkseek/checkpoint/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/store.js +58 -15
- package/node_modules/@xrkseek/checkpoint/dist/store.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts +14 -4
- package/node_modules/@xrkseek/checkpoint/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/checkpoint/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/checkpoint/package.json +4 -1
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts +14 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/context-fragments/dist/index.js +33 -0
- package/node_modules/@xrkseek/context-fragments/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts +7 -0
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.js +6 -0
- package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/compaction.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/compaction.js +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/compaction.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +12 -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 +95 -50
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts +14 -0
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.js +41 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/package.json +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/time-context.d.ts +22 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/time-context.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/time-context.js +47 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/time-context.js.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/definition.d.ts +14 -0
- package/node_modules/@xrkseek/core-tools/dist/definition.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/definition.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.js +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/materialize.d.ts +9 -3
- package/node_modules/@xrkseek/core-tools/dist/materialize.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/materialize.js +38 -8
- package/node_modules/@xrkseek/core-tools/dist/materialize.js.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts +2 -0
- package/node_modules/@xrkseek/exec-computer-use/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js +4 -1
- package/node_modules/@xrkseek/exec-computer-use/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-environment/README.md +21 -0
- package/node_modules/@xrkseek/exec-environment/dist/http.d.ts +34 -0
- package/node_modules/@xrkseek/exec-environment/dist/http.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/http.js +259 -0
- package/node_modules/@xrkseek/exec-environment/dist/http.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.d.ts +5 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.js +4 -0
- package/node_modules/@xrkseek/exec-environment/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/local.d.ts +11 -0
- package/node_modules/@xrkseek/exec-environment/dist/local.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/local.js +30 -0
- package/node_modules/@xrkseek/exec-environment/dist/local.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts +23 -0
- package/node_modules/@xrkseek/exec-environment/dist/resolve.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/resolve.js +39 -0
- package/node_modules/@xrkseek/exec-environment/dist/resolve.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/types.d.ts +33 -0
- package/node_modules/@xrkseek/exec-environment/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-environment/dist/types.js +9 -0
- package/node_modules/@xrkseek/exec-environment/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/exec-environment/package.json +28 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/present.d.ts +5 -2
- package/node_modules/@xrkseek/exec-fs/dist/present.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/present.js +22 -4
- package/node_modules/@xrkseek/exec-fs/dist/present.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/README.md +6 -4
- package/node_modules/@xrkseek/exec-image-gen/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js +6 -3
- package/node_modules/@xrkseek/exec-image-gen/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts +4 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js +4 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.d.ts +4 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.js +16 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/memory.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.d.ts +5 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.js +88 -38
- package/node_modules/@xrkseek/exec-image-gen/dist/openai-http.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/references.d.ts +21 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/references.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/references.js +145 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/references.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.d.ts +15 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.js +67 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/schema.js.map +1 -0
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.d.ts +5 -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 -36
- package/node_modules/@xrkseek/exec-image-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/types.d.ts +34 -2
- package/node_modules/@xrkseek/exec-image-gen/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/types.js +16 -1
- package/node_modules/@xrkseek/exec-image-gen/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/README.md +3 -2
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/exec-memory/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/index.js +2 -1
- package/node_modules/@xrkseek/exec-memory/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/provider.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts +15 -4
- package/node_modules/@xrkseek/exec-memory/dist/resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/resolve.js +13 -3
- package/node_modules/@xrkseek/exec-memory/dist/resolve.js.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/sqlite.d.ts +19 -0
- package/node_modules/@xrkseek/exec-memory/dist/sqlite.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/sqlite.js +190 -0
- package/node_modules/@xrkseek/exec-memory/dist/sqlite.js.map +1 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts +21 -0
- package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js +128 -25
- package/node_modules/@xrkseek/exec-memory/dist/write-path.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/README.md +27 -19
- package/node_modules/@xrkseek/exec-video-gen/dist/catalog.d.ts +16 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/catalog.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/catalog.js +90 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/catalog.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/format.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js +3 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/format.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts +5 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js +5 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.d.ts +3 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.js +45 -4
- package/node_modules/@xrkseek/exec-video-gen/dist/memory.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.d.ts +3 -6
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.js +81 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/openai-http.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/references.d.ts +24 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/references.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/references.js +151 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/references.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/schema.d.ts +15 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/schema.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/schema.js +104 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/schema.js.map +1 -0
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts +4 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js +99 -70
- package/node_modules/@xrkseek/exec-video-gen/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/types.d.ts +73 -2
- package/node_modules/@xrkseek/exec-video-gen/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/types.js +20 -1
- package/node_modules/@xrkseek/exec-video-gen/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/README.md +2 -2
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts +3 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js +3 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/browser-vault-tools.d.ts +32 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-vault-tools.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-vault-tools.js +141 -0
- package/node_modules/@xrkseek/exec-web/dist/browser-vault-tools.js.map +1 -0
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/exec-web/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/index.js +1 -0
- package/node_modules/@xrkseek/exec-web/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js +2 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.d.ts +13 -3
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.js +27 -4
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/README.md +8 -8
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +11 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +11 -3
- 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/README.md +2 -2
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/README.md +5 -5
- package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js +3 -2
- package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +9 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js +9 -0
- package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/server-config/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/index.js +1 -0
- package/node_modules/@xrkseek/server-config/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-config/dist/json-text.d.ts +8 -0
- package/node_modules/@xrkseek/server-config/dist/json-text.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-config/dist/json-text.js +12 -0
- package/node_modules/@xrkseek/server-config/dist/json-text.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/README.md +3 -2
- package/node_modules/@xrkseek/server-cron/dist/executions.d.ts +31 -0
- package/node_modules/@xrkseek/server-cron/dist/executions.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/executions.js +95 -0
- package/node_modules/@xrkseek/server-cron/dist/executions.js.map +1 -0
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/server-cron/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/index.js +6 -0
- package/node_modules/@xrkseek/server-cron/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/scheduler.d.ts +4 -0
- package/node_modules/@xrkseek/server-cron/dist/scheduler.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/scheduler.js +33 -24
- package/node_modules/@xrkseek/server-cron/dist/scheduler.js.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-cron/dist/tools.js +44 -6
- package/node_modules/@xrkseek/server-cron/dist/tools.js.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 +2 -0
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts +37 -2
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js +191 -28
- package/node_modules/@xrkseek/server-face/dist/external-agent-runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts +10 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js +33 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/worktree.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts +9 -0
- package/node_modules/@xrkseek/server-face/dist/host-open-path.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/host-open-path.js +13 -7
- package/node_modules/@xrkseek/server-face/dist/host-open-path.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-provider-context.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/llm-provider-context.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-provider-context.js +13 -0
- package/node_modules/@xrkseek/server-face/dist/llm-provider-context.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js +3 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts +4 -0
- package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js +24 -5
- package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.js +5 -5
- package/node_modules/@xrkseek/server-face/dist/presets-catalog.js.map +1 -1
- 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/select-session-model.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js +8 -0
- package/node_modules/@xrkseek/server-face/dist/select-session-model.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-model-store.d.ts +11 -0
- package/node_modules/@xrkseek/server-face/dist/session-model-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-model-store.js +66 -0
- package/node_modules/@xrkseek/server-face/dist/session-model-store.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +64 -13
- package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/session-status.js +173 -5
- package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js +4 -5
- 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 +36 -4
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +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 +1 -1
- package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts +15 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js +35 -7
- package/node_modules/@xrkseek/server-face/dist/workspace-checkpoint.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.d.ts +11 -0
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.js +22 -0
- package/node_modules/@xrkseek/server-host/dist/a2a-inbound-public.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +3 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +178 -48
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js +3 -3
- package/node_modules/@xrkseek/server-host/dist/mcp-wire.js.map +1 -1
- package/node_modules/@xrkseek/server-host/package.json +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/embedded-vector-store.d.ts +2 -2
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/embedded-vector-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/embedded-vector-store.js +9 -4
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/embedded-vector-store.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts +37 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js +125 -9
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memory-embeddings.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +1 -0
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-curator.d.ts +46 -0
- package/node_modules/@xrkseek/workspace/dist/skill-curator.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/skill-curator.js +114 -0
- package/node_modules/@xrkseek/workspace/dist/skill-curator.js.map +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve Hermes-style `image_url` / `first_frame` / `reference_image_urls` /
|
|
3
|
+
* attachment ids into decoded {@link VideoGenSourceImage} rows for i2v.
|
|
4
|
+
*/
|
|
5
|
+
import { VideoGenError } from "./types.js";
|
|
6
|
+
const ATTACHMENT_PREFIX = "attachment:";
|
|
7
|
+
function sniffMime(bytes, hint) {
|
|
8
|
+
if (hint === "image/jpeg" || hint === "image/png" || hint === "image/webp") {
|
|
9
|
+
return hint;
|
|
10
|
+
}
|
|
11
|
+
if (bytes.length >= 3 && bytes[0] === 0xff && bytes[1] === 0xd8 && bytes[2] === 0xff) {
|
|
12
|
+
return "image/jpeg";
|
|
13
|
+
}
|
|
14
|
+
if (bytes.length >= 12 &&
|
|
15
|
+
bytes[0] === 0x52 &&
|
|
16
|
+
bytes[1] === 0x49 &&
|
|
17
|
+
bytes[2] === 0x46 &&
|
|
18
|
+
bytes[3] === 0x46) {
|
|
19
|
+
return "image/webp";
|
|
20
|
+
}
|
|
21
|
+
return "image/png";
|
|
22
|
+
}
|
|
23
|
+
function parseDataUrl(url) {
|
|
24
|
+
const match = /^data:(image\/(?:png|jpeg|jpg|webp));base64,(.+)$/iu.exec(url.trim());
|
|
25
|
+
if (!match) {
|
|
26
|
+
throw new VideoGenError("data: image_url must be image/png|jpeg|webp base64", "VIDEO_GEN_BAD_ARGS");
|
|
27
|
+
}
|
|
28
|
+
const mimeHint = match[1].toLowerCase().replace("image/jpg", "image/jpeg");
|
|
29
|
+
const bytes = Uint8Array.from(Buffer.from(match[2], "base64"));
|
|
30
|
+
if (bytes.byteLength === 0) {
|
|
31
|
+
throw new VideoGenError("empty data: image", "VIDEO_GEN_BAD_ARGS");
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
bytes,
|
|
35
|
+
mimeType: sniffMime(bytes, mimeHint),
|
|
36
|
+
label: "data-url",
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
async function fetchHttpImage(url, fetchImpl) {
|
|
40
|
+
let parsed;
|
|
41
|
+
try {
|
|
42
|
+
parsed = new URL(url);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
throw new VideoGenError(`invalid image_url: ${url.slice(0, 80)}`, "VIDEO_GEN_BAD_ARGS");
|
|
46
|
+
}
|
|
47
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
48
|
+
throw new VideoGenError("image_url must be http(s), data:, or attachment:<id>", "VIDEO_GEN_BAD_ARGS");
|
|
49
|
+
}
|
|
50
|
+
// Block obvious loopback / link-local SSRF (Hermes-style safety floor).
|
|
51
|
+
const host = parsed.hostname.toLowerCase();
|
|
52
|
+
if (host === "localhost" ||
|
|
53
|
+
host === "127.0.0.1" ||
|
|
54
|
+
host === "::1" ||
|
|
55
|
+
host === "0.0.0.0" ||
|
|
56
|
+
host.endsWith(".local") ||
|
|
57
|
+
host.startsWith("169.254.") ||
|
|
58
|
+
host.startsWith("10.") ||
|
|
59
|
+
/^192\.168\./u.test(host) ||
|
|
60
|
+
/^172\.(1[6-9]|2\d|3[0-1])\./u.test(host)) {
|
|
61
|
+
throw new VideoGenError(`image_url host blocked for SSRF safety: ${host}`, "VIDEO_GEN_BAD_ARGS");
|
|
62
|
+
}
|
|
63
|
+
const res = await fetchImpl(url);
|
|
64
|
+
if (!res.ok) {
|
|
65
|
+
throw new VideoGenError(`image_url fetch HTTP ${res.status}`, "VIDEO_GEN_BACKEND");
|
|
66
|
+
}
|
|
67
|
+
const buf = new Uint8Array(await res.arrayBuffer());
|
|
68
|
+
if (buf.byteLength === 0) {
|
|
69
|
+
throw new VideoGenError("image_url returned empty body", "VIDEO_GEN_BAD_ARGS");
|
|
70
|
+
}
|
|
71
|
+
const ct = res.headers.get("content-type")?.split(";")[0]?.trim();
|
|
72
|
+
return {
|
|
73
|
+
bytes: buf,
|
|
74
|
+
mimeType: sniffMime(buf, ct),
|
|
75
|
+
label: parsed.pathname.split("/").pop() || "http-image",
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function loadAttachment(id, attachments) {
|
|
79
|
+
const stored = await attachments.readImage(id);
|
|
80
|
+
return {
|
|
81
|
+
bytes: stored.data,
|
|
82
|
+
mimeType: sniffMime(stored.data, stored.ref.mediaType),
|
|
83
|
+
label: id,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Collect `first_frame` / `image_url` + refs + attachment ids.
|
|
88
|
+
* First non-empty of first_frame / image_url is the primary still (OpenAI
|
|
89
|
+
* `input_reference`). Throws when i2v is requested but maxReferenceImages === 0.
|
|
90
|
+
*/
|
|
91
|
+
export async function resolveVideoGenReferenceImages(options) {
|
|
92
|
+
const urls = [];
|
|
93
|
+
const primary = options.firstFrame?.trim() || options.imageUrl?.trim() || "";
|
|
94
|
+
if (primary)
|
|
95
|
+
urls.push(primary);
|
|
96
|
+
// If both first_frame and image_url were set and differ, keep the second as a ref.
|
|
97
|
+
const imageUrl = options.imageUrl?.trim();
|
|
98
|
+
const firstFrame = options.firstFrame?.trim();
|
|
99
|
+
if (firstFrame && imageUrl && firstFrame !== imageUrl) {
|
|
100
|
+
urls.push(imageUrl);
|
|
101
|
+
}
|
|
102
|
+
for (const raw of options.referenceImageUrls ?? []) {
|
|
103
|
+
const u = String(raw ?? "").trim();
|
|
104
|
+
if (u)
|
|
105
|
+
urls.push(u);
|
|
106
|
+
}
|
|
107
|
+
const attachmentIds = (options.referenceAttachmentIds ?? [])
|
|
108
|
+
.map((id) => String(id ?? "").trim())
|
|
109
|
+
.filter((id) => id.length > 0);
|
|
110
|
+
if (urls.length === 0 && attachmentIds.length === 0) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
if (options.maxReferenceImages <= 0) {
|
|
114
|
+
throw new VideoGenError("This video Provider does not support first-frame / reference images (i2v). Omit first_frame, image_url and reference_* args, or switch Provider.", "VIDEO_GEN_BAD_ARGS");
|
|
115
|
+
}
|
|
116
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
117
|
+
const out = [];
|
|
118
|
+
for (const url of urls) {
|
|
119
|
+
if (out.length >= options.maxReferenceImages)
|
|
120
|
+
break;
|
|
121
|
+
if (url.startsWith("data:")) {
|
|
122
|
+
out.push(parseDataUrl(url));
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (url.startsWith(ATTACHMENT_PREFIX)) {
|
|
126
|
+
const id = url.slice(ATTACHMENT_PREFIX.length).trim();
|
|
127
|
+
if (!id) {
|
|
128
|
+
throw new VideoGenError("attachment: image_url missing id", "VIDEO_GEN_BAD_ARGS");
|
|
129
|
+
}
|
|
130
|
+
if (!options.attachments) {
|
|
131
|
+
throw new VideoGenError("attachment: references require Host AttachmentStore", "VIDEO_GEN_BAD_ARGS");
|
|
132
|
+
}
|
|
133
|
+
out.push(await loadAttachment(id, options.attachments));
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
out.push(await fetchHttpImage(url, fetchImpl));
|
|
137
|
+
}
|
|
138
|
+
for (const id of attachmentIds) {
|
|
139
|
+
if (out.length >= options.maxReferenceImages)
|
|
140
|
+
break;
|
|
141
|
+
if (!options.attachments) {
|
|
142
|
+
throw new VideoGenError("reference_attachment_ids require Host AttachmentStore", "VIDEO_GEN_BAD_ARGS");
|
|
143
|
+
}
|
|
144
|
+
out.push(await loadAttachment(id, options.attachments));
|
|
145
|
+
}
|
|
146
|
+
if (out.length > options.maxReferenceImages) {
|
|
147
|
+
throw new VideoGenError(`at most ${options.maxReferenceImages} reference image(s) allowed`, "VIDEO_GEN_BAD_ARGS");
|
|
148
|
+
}
|
|
149
|
+
return out;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=references.js.map
|
|
@@ -0,0 +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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a,CACrB,kCAAkC,EAClC,oBAAoB,CACrB,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;gBACzB,MAAM,IAAI,aAAa,CACrB,qDAAqD,EACrD,oBAAoB,CACrB,CAAC;YACJ,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,MAAM,cAAc,CAAC,EAAE,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;YACxD,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,MAAM,cAAc,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,MAAM,EAAE,IAAI,aAAa,EAAE,CAAC;QAC/B,IAAI,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,kBAAkB;YAAE,MAAM;QACpD,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YACzB,MAAM,IAAI,aAAa,CACrB,uDAAuD,EACvD,oBAAoB,CACrB,CAAC;QACJ,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,MAAM,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build model-facing tool parameters from Provider capabilities
|
|
3
|
+
* (Hermes `_build_dynamic_video_schema`).
|
|
4
|
+
*/
|
|
5
|
+
import { type VideoGenCapabilities } from "./types.js";
|
|
6
|
+
export interface VideoGenToolParameters {
|
|
7
|
+
readonly type: "object";
|
|
8
|
+
readonly properties: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/** Actions exposed given caps (edit/extend only when supported). */
|
|
11
|
+
export declare function videoGenActionsForCapabilities(caps: VideoGenCapabilities): readonly string[];
|
|
12
|
+
/** Static base + i2v / edit / extend args only when capabilities allow. */
|
|
13
|
+
export declare function buildVideoGenToolParameters(caps: VideoGenCapabilities): VideoGenToolParameters;
|
|
14
|
+
export declare function buildVideoGenToolDescription(caps: VideoGenCapabilities): string;
|
|
15
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9C;AAID,oEAAoE;AACpE,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,oBAAoB,GACzB,SAAS,MAAM,EAAE,CAKnB;AAED,2EAA2E;AAC3E,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,oBAAoB,GACzB,sBAAsB,CAyExB;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,oBAAoB,GACzB,MAAM,CAyBR"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build model-facing tool parameters from Provider capabilities
|
|
3
|
+
* (Hermes `_build_dynamic_video_schema`).
|
|
4
|
+
*/
|
|
5
|
+
import { VIDEO_GEN_SECONDS, VIDEO_GEN_SIZES } from "./catalog.js";
|
|
6
|
+
import { videoGenSupportsI2v, } from "./types.js";
|
|
7
|
+
const BASE_ACTIONS = ["start", "status", "content", "wait", "catalog"];
|
|
8
|
+
/** Actions exposed given caps (edit/extend only when supported). */
|
|
9
|
+
export function videoGenActionsForCapabilities(caps) {
|
|
10
|
+
const actions = [...BASE_ACTIONS];
|
|
11
|
+
if (caps.supportsEdit)
|
|
12
|
+
actions.push("edit");
|
|
13
|
+
if (caps.supportsExtend)
|
|
14
|
+
actions.push("extend");
|
|
15
|
+
return actions;
|
|
16
|
+
}
|
|
17
|
+
/** Static base + i2v / edit / extend args only when capabilities allow. */
|
|
18
|
+
export function buildVideoGenToolParameters(caps) {
|
|
19
|
+
const actions = videoGenActionsForCapabilities(caps);
|
|
20
|
+
const properties = {
|
|
21
|
+
action: {
|
|
22
|
+
type: "string",
|
|
23
|
+
enum: [...actions],
|
|
24
|
+
description: "start (default, t2v/i2v) | status | content | wait | catalog" +
|
|
25
|
+
(caps.supportsEdit ? " | edit" : "") +
|
|
26
|
+
(caps.supportsExtend ? " | extend" : "") +
|
|
27
|
+
". start needs `prompt`; status/content/wait need `job_id`; " +
|
|
28
|
+
"edit/extend need `job_id` (source) + `prompt`; catalog lists families.",
|
|
29
|
+
},
|
|
30
|
+
prompt: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Complete visual prompt for start/edit/extend (subject, motion, camera, lighting).",
|
|
33
|
+
},
|
|
34
|
+
job_id: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Job id from start (status/content/wait), or source video id for edit/extend.",
|
|
37
|
+
},
|
|
38
|
+
model: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Optional model / family override (e.g. sora-2, sora-2-pro). See action=catalog.",
|
|
41
|
+
},
|
|
42
|
+
seconds: {
|
|
43
|
+
type: "number",
|
|
44
|
+
enum: [...VIDEO_GEN_SECONDS],
|
|
45
|
+
description: "Clip duration in seconds (default 4; also used by extend).",
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
type: "string",
|
|
49
|
+
enum: [...VIDEO_GEN_SIZES],
|
|
50
|
+
description: "Output size (provider-dependent; default 1280x720).",
|
|
51
|
+
},
|
|
52
|
+
timeout_ms: {
|
|
53
|
+
type: "number",
|
|
54
|
+
description: "action=wait: give up after this long (default 120000).",
|
|
55
|
+
},
|
|
56
|
+
poll_interval_ms: {
|
|
57
|
+
type: "number",
|
|
58
|
+
description: "action=wait: poll spacing (default 10000).",
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
if (videoGenSupportsI2v(caps)) {
|
|
62
|
+
properties.first_frame = {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "First-frame still for image-to-video: https URL, data:image/…;base64,…, or attachment:<attachmentId>. Alias of image_url.",
|
|
65
|
+
};
|
|
66
|
+
properties.image_url = {
|
|
67
|
+
type: "string",
|
|
68
|
+
description: "Hermes-compatible alias of first_frame (same schemes). Prefer first_frame when both are set as primary.",
|
|
69
|
+
};
|
|
70
|
+
properties.reference_image_urls = {
|
|
71
|
+
type: "array",
|
|
72
|
+
items: { type: "string" },
|
|
73
|
+
description: `Additional reference still URLs (same schemes). Max ${caps.maxReferenceImages} source(s) total (OpenAI first-frame = 1).`,
|
|
74
|
+
};
|
|
75
|
+
properties.reference_attachment_ids = {
|
|
76
|
+
type: "array",
|
|
77
|
+
items: { type: "string" },
|
|
78
|
+
description: "Host AttachmentStore image ids as first-frame / refs (preferred when already attached).",
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return { type: "object", properties };
|
|
82
|
+
}
|
|
83
|
+
export function buildVideoGenToolDescription(caps) {
|
|
84
|
+
const parts = [
|
|
85
|
+
"Generate a video via the Host video Provider. Renders are asynchronous: " +
|
|
86
|
+
"action=start (default) returns a jobId; poll with action=status (or action=wait); " +
|
|
87
|
+
"action=content downloads the MP4. action=catalog lists model families.",
|
|
88
|
+
];
|
|
89
|
+
if (videoGenSupportsI2v(caps)) {
|
|
90
|
+
parts.push(`With first_frame / image_url / reference_* (≤${caps.maxReferenceImages}) → image-to-video (first frame).`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
parts.push("This Provider is text-to-video only (no first-frame input).");
|
|
94
|
+
}
|
|
95
|
+
if (caps.supportsEdit) {
|
|
96
|
+
parts.push("action=edit: rewrite an existing completed video (job_id + prompt).");
|
|
97
|
+
}
|
|
98
|
+
if (caps.supportsExtend) {
|
|
99
|
+
parts.push("action=extend: continue a completed video (job_id + prompt; optional seconds).");
|
|
100
|
+
}
|
|
101
|
+
parts.push("The MP4 is saved to the Host attachment store when one is wired; video bytes are never inlined into tool text.");
|
|
102
|
+
return parts.join(" ");
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,mBAAmB,GAEpB,MAAM,YAAY,CAAC;AAOpB,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAEhF,oEAAoE;AACpE,MAAM,UAAU,8BAA8B,CAC5C,IAA0B;IAE1B,MAAM,OAAO,GAAa,CAAC,GAAG,YAAY,CAAC,CAAC;IAC5C,IAAI,IAAI,CAAC,YAAY;QAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,IAAI,CAAC,cAAc;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,2BAA2B,CACzC,IAA0B;IAE1B,MAAM,OAAO,GAAG,8BAA8B,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,UAAU,GAA4B;QAC1C,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC;YAClB,WAAW,EACT,8DAA8D;gBAC9D,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CA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E,IAAI,EAAE,QAAQ,EAAE;YACzB,WAAW,EACT,yFAAyF;SAC5F,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,IAA0B;IAE1B,MAAM,KAAK,GAAG;QACZ,0EAA0E;YACxE,oFAAoF;YACpF,wEAAwE;KAC3E,CAAC;IACF,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CACR,gDAAgD,IAAI,CAAC,kBAAkB,mCAAmC,CAC3G,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC5E,CAAC;IACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IACpF,CAAC;IACD,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CACR,gFAAgF,CACjF,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,IAAI,CACR,gHAAgH,CACjH,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -17,12 +17,14 @@ export interface CreateVideoGenToolsOptions {
|
|
|
17
17
|
/** Injected sleep for `action=wait`; tests avoid real polling delays. */
|
|
18
18
|
readonly sleep?: (ms: number) => Promise<void>;
|
|
19
19
|
readonly now?: () => number;
|
|
20
|
+
readonly fetchImpl?: typeof fetch;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Model-facing `video_generate` tool.
|
|
23
24
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* Static fields are an initial bake; `dynamicSchema` rebuilds from live
|
|
26
|
+
* Provider `capabilities()` on each materialize (Hermes get_definitions).
|
|
27
|
+
* Video renders are asynchronous: `start` → `status` / `wait` → `content`.
|
|
26
28
|
*/
|
|
27
29
|
export declare function createVideoGenTools(options?: CreateVideoGenToolsOptions): ToolDefinition[];
|
|
28
30
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -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,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAOpD,OAAO,EASL,KAAK,eAAe,EAErB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,wBAAgB,0BAA0B,CACxC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACnC,MAAM,CAsBR;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,sEAAsE;IACtE,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;IACvC,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CACnC;AAqED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,0BAA+B,GACvC,cAAc,EAAE,CA0OlB"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
+
import { formatVideoGenCatalog, VIDEO_GEN_SECONDS, VIDEO_GEN_SIZES } from "./catalog.js";
|
|
1
2
|
import { VIDEO_GEN_PROMPT_TEXT } from "./format.js";
|
|
2
|
-
import {
|
|
3
|
+
import { resolveVideoGenReferenceImages } from "./references.js";
|
|
4
|
+
import { buildVideoGenToolDescription, buildVideoGenToolParameters, videoGenActionsForCapabilities, } from "./schema.js";
|
|
5
|
+
import { VideoGenError, isTerminalStatus, isVideoGenError, resolveVideoGenCapabilities, videoGenSupportsI2v, } from "./types.js";
|
|
3
6
|
export { VIDEO_GEN_PROMPT_TEXT };
|
|
4
|
-
const SIZES = [
|
|
5
|
-
"720x1280",
|
|
6
|
-
"1280x720",
|
|
7
|
-
"1024x1792",
|
|
8
|
-
"1792x1024",
|
|
9
|
-
];
|
|
10
|
-
const SECONDS = [4, 8, 12];
|
|
11
|
-
const ACTIONS = ["start", "status", "content", "wait"];
|
|
12
7
|
export function videoGenUnavailableMessage(env = process.env, product) {
|
|
13
8
|
const envRaw = String(env.XRK_VIDEO_GEN ?? "").trim();
|
|
14
9
|
const flag = envRaw !== ""
|
|
@@ -36,21 +31,12 @@ function fail(err) {
|
|
|
36
31
|
function clamp(value, min, max) {
|
|
37
32
|
return Math.min(Math.max(value, min), max);
|
|
38
33
|
}
|
|
39
|
-
function parseAction(raw) {
|
|
40
|
-
if (raw === undefined || raw === null || raw === "")
|
|
41
|
-
return "start";
|
|
42
|
-
const a = String(raw).trim().toLowerCase();
|
|
43
|
-
if (!ACTIONS.includes(a)) {
|
|
44
|
-
throw new VideoGenError(`action must be one of ${ACTIONS.join(", ")}`, "VIDEO_GEN_BAD_ARGS");
|
|
45
|
-
}
|
|
46
|
-
return a;
|
|
47
|
-
}
|
|
48
34
|
function parseSize(raw) {
|
|
49
35
|
if (raw === undefined || raw === null || raw === "")
|
|
50
36
|
return undefined;
|
|
51
37
|
const s = String(raw).trim();
|
|
52
|
-
if (!
|
|
53
|
-
throw new VideoGenError(`size must be one of ${
|
|
38
|
+
if (!VIDEO_GEN_SIZES.includes(s)) {
|
|
39
|
+
throw new VideoGenError(`size must be one of ${VIDEO_GEN_SIZES.join(", ")}`, "VIDEO_GEN_BAD_ARGS");
|
|
54
40
|
}
|
|
55
41
|
return s;
|
|
56
42
|
}
|
|
@@ -58,8 +44,8 @@ function parseSeconds(raw) {
|
|
|
58
44
|
if (raw === undefined || raw === null || raw === "")
|
|
59
45
|
return undefined;
|
|
60
46
|
const n = Number(raw);
|
|
61
|
-
if (!
|
|
62
|
-
throw new VideoGenError(`seconds must be one of ${
|
|
47
|
+
if (!VIDEO_GEN_SECONDS.includes(n)) {
|
|
48
|
+
throw new VideoGenError(`seconds must be one of ${VIDEO_GEN_SECONDS.join(", ")}`, "VIDEO_GEN_BAD_ARGS");
|
|
63
49
|
}
|
|
64
50
|
return n;
|
|
65
51
|
}
|
|
@@ -72,6 +58,8 @@ function formatJob(job) {
|
|
|
72
58
|
job.model ? `model=${job.model}` : "",
|
|
73
59
|
job.seconds !== undefined ? `seconds=${job.seconds}` : "",
|
|
74
60
|
job.size ? `size=${job.size}` : "",
|
|
61
|
+
job.kind ? `kind=${job.kind}` : "",
|
|
62
|
+
job.modality ? `modality=${job.modality}` : "",
|
|
75
63
|
job.note ? `note=${job.note}` : "",
|
|
76
64
|
]
|
|
77
65
|
.filter(Boolean)
|
|
@@ -80,8 +68,9 @@ function formatJob(job) {
|
|
|
80
68
|
/**
|
|
81
69
|
* Model-facing `video_generate` tool.
|
|
82
70
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
71
|
+
* Static fields are an initial bake; `dynamicSchema` rebuilds from live
|
|
72
|
+
* Provider `capabilities()` on each materialize (Hermes get_definitions).
|
|
73
|
+
* Video renders are asynchronous: `start` → `status` / `wait` → `content`.
|
|
85
74
|
*/
|
|
86
75
|
export function createVideoGenTools(options = {}) {
|
|
87
76
|
const missing = videoGenUnavailableMessage(options.env ?? process.env, options.product);
|
|
@@ -90,51 +79,26 @@ export function createVideoGenTools(options = {}) {
|
|
|
90
79
|
const now = options.now ?? (() => Date.now());
|
|
91
80
|
const sleep = options.sleep ??
|
|
92
81
|
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
82
|
+
const caps = resolveVideoGenCapabilities(service);
|
|
83
|
+
const parseAction = (raw, allowed) => {
|
|
84
|
+
if (raw === undefined || raw === null || raw === "")
|
|
85
|
+
return "start";
|
|
86
|
+
const a = String(raw).trim().toLowerCase();
|
|
87
|
+
if (!allowed.includes(a)) {
|
|
88
|
+
throw new VideoGenError(`action must be one of ${allowed.join(", ")}`, "VIDEO_GEN_BAD_ARGS");
|
|
89
|
+
}
|
|
90
|
+
return a;
|
|
91
|
+
};
|
|
93
92
|
const tool = {
|
|
94
93
|
name: "video_generate",
|
|
95
|
-
description:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
type: "string",
|
|
104
|
-
enum: [...ACTIONS],
|
|
105
|
-
description: "start (default) | status | content | wait. start needs `prompt`; the others need `job_id`.",
|
|
106
|
-
},
|
|
107
|
-
prompt: {
|
|
108
|
-
type: "string",
|
|
109
|
-
description: "Complete visual prompt for action=start (subject, motion, camera, lighting).",
|
|
110
|
-
},
|
|
111
|
-
job_id: {
|
|
112
|
-
type: "string",
|
|
113
|
-
description: "Job id returned by action=start.",
|
|
114
|
-
},
|
|
115
|
-
model: {
|
|
116
|
-
type: "string",
|
|
117
|
-
description: "Optional model override (e.g. sora-2, sora-2-pro).",
|
|
118
|
-
},
|
|
119
|
-
seconds: {
|
|
120
|
-
type: "number",
|
|
121
|
-
enum: [...SECONDS],
|
|
122
|
-
description: "Clip duration in seconds (default 4).",
|
|
123
|
-
},
|
|
124
|
-
size: {
|
|
125
|
-
type: "string",
|
|
126
|
-
enum: [...SIZES],
|
|
127
|
-
description: "Output size (provider-dependent; default 1280x720).",
|
|
128
|
-
},
|
|
129
|
-
timeout_ms: {
|
|
130
|
-
type: "number",
|
|
131
|
-
description: "action=wait: give up after this long (default 120000).",
|
|
132
|
-
},
|
|
133
|
-
poll_interval_ms: {
|
|
134
|
-
type: "number",
|
|
135
|
-
description: "action=wait: poll spacing (default 10000).",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
94
|
+
description: buildVideoGenToolDescription(caps),
|
|
95
|
+
parameters: buildVideoGenToolParameters(caps),
|
|
96
|
+
dynamicSchema: () => {
|
|
97
|
+
const live = resolveVideoGenCapabilities(service);
|
|
98
|
+
return {
|
|
99
|
+
description: buildVideoGenToolDescription(live),
|
|
100
|
+
parameters: buildVideoGenToolParameters(live),
|
|
101
|
+
};
|
|
138
102
|
},
|
|
139
103
|
presentCall: (args) => ({
|
|
140
104
|
card: "generic",
|
|
@@ -146,19 +110,84 @@ export function createVideoGenTools(options = {}) {
|
|
|
146
110
|
if (!service)
|
|
147
111
|
return { content: missing, isError: true };
|
|
148
112
|
try {
|
|
149
|
-
const
|
|
150
|
-
|
|
113
|
+
const liveCaps = resolveVideoGenCapabilities(service);
|
|
114
|
+
const allowedActions = videoGenActionsForCapabilities(liveCaps);
|
|
115
|
+
const action = parseAction(args.action, allowedActions);
|
|
116
|
+
if (action === "catalog") {
|
|
117
|
+
const families = liveCaps.families ?? [];
|
|
118
|
+
return { content: formatVideoGenCatalog(families) };
|
|
119
|
+
}
|
|
120
|
+
if (action === "start" || action === "edit" || action === "extend") {
|
|
151
121
|
const prompt = String(args.prompt ?? "").trim();
|
|
152
122
|
if (!prompt) {
|
|
153
|
-
throw new VideoGenError(
|
|
123
|
+
throw new VideoGenError(`prompt is required for action=${action}`, "VIDEO_GEN_BAD_ARGS");
|
|
154
124
|
}
|
|
155
125
|
const seconds = parseSeconds(args.seconds);
|
|
156
126
|
const size = parseSize(args.size);
|
|
127
|
+
const kind = action === "edit"
|
|
128
|
+
? "edit"
|
|
129
|
+
: action === "extend"
|
|
130
|
+
? "extend"
|
|
131
|
+
: "generate";
|
|
132
|
+
if (kind === "edit" || kind === "extend") {
|
|
133
|
+
const sourceVideoId = String(args.job_id ?? "").trim();
|
|
134
|
+
if (!sourceVideoId) {
|
|
135
|
+
throw new VideoGenError(`job_id (source video) is required for action=${action}`, "VIDEO_GEN_BAD_ARGS");
|
|
136
|
+
}
|
|
137
|
+
const job = await service.create({
|
|
138
|
+
prompt,
|
|
139
|
+
kind,
|
|
140
|
+
sourceVideoId,
|
|
141
|
+
...(seconds !== undefined ? { seconds } : {}),
|
|
142
|
+
...(args.model ? { model: String(args.model) } : {}),
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
content: [
|
|
146
|
+
`provider=${job.provider} delivery=${job.delivery}`,
|
|
147
|
+
formatJob(job),
|
|
148
|
+
"Next: action=status with job_id until status=completed, then action=content.",
|
|
149
|
+
].join("\n"),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// start — t2v / i2v
|
|
153
|
+
let firstFrame;
|
|
154
|
+
let referenceImages;
|
|
155
|
+
if (videoGenSupportsI2v(liveCaps)) {
|
|
156
|
+
const stills = await resolveVideoGenReferenceImages({
|
|
157
|
+
...(args.first_frame ? { firstFrame: args.first_frame } : {}),
|
|
158
|
+
...(args.image_url ? { imageUrl: args.image_url } : {}),
|
|
159
|
+
...(args.reference_image_urls
|
|
160
|
+
? { referenceImageUrls: args.reference_image_urls }
|
|
161
|
+
: {}),
|
|
162
|
+
...(args.reference_attachment_ids
|
|
163
|
+
? { referenceAttachmentIds: args.reference_attachment_ids }
|
|
164
|
+
: {}),
|
|
165
|
+
...(attachments ? { attachments } : {}),
|
|
166
|
+
maxReferenceImages: liveCaps.maxReferenceImages,
|
|
167
|
+
...(options.fetchImpl ? { fetchImpl: options.fetchImpl } : {}),
|
|
168
|
+
});
|
|
169
|
+
if (stills.length > 0) {
|
|
170
|
+
firstFrame = stills[0];
|
|
171
|
+
if (stills.length > 1) {
|
|
172
|
+
referenceImages = stills.slice(1);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else if (args.first_frame ||
|
|
177
|
+
args.image_url ||
|
|
178
|
+
(args.reference_image_urls && args.reference_image_urls.length > 0) ||
|
|
179
|
+
(args.reference_attachment_ids &&
|
|
180
|
+
args.reference_attachment_ids.length > 0)) {
|
|
181
|
+
throw new VideoGenError("This video Provider does not support first-frame / reference images (i2v).", "VIDEO_GEN_BAD_ARGS");
|
|
182
|
+
}
|
|
157
183
|
const job = await service.create({
|
|
158
184
|
prompt,
|
|
185
|
+
kind: "generate",
|
|
159
186
|
...(seconds !== undefined ? { seconds } : {}),
|
|
160
187
|
...(size ? { size } : {}),
|
|
161
188
|
...(args.model ? { model: String(args.model) } : {}),
|
|
189
|
+
...(firstFrame ? { firstFrame } : {}),
|
|
190
|
+
...(referenceImages ? { referenceImages } : {}),
|
|
162
191
|
});
|
|
163
192
|
return {
|
|
164
193
|
content: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,GAKhB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,KAAK,GAA4B;IACrC,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;CACZ,CAAC;AAEF,MAAM,OAAO,GAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAEvD,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