@mindstone/mcp-server-runway 0.5.0 → 0.7.0
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/README.md +7 -3
- package/dist/auth.js +3 -0
- package/dist/bridge-reader.d.ts +85 -0
- package/dist/bridge-reader.js +125 -0
- package/dist/bridge.d.ts +11 -13
- package/dist/bridge.js +10 -39
- package/dist/client.d.ts +3 -0
- package/dist/client.js +44 -8
- package/dist/file-read-context.d.ts +4 -4
- package/dist/hardened-json-file.d.ts +15 -0
- package/dist/hardened-json-file.js +92 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/key-filter.d.ts +40 -0
- package/dist/key-filter.js +95 -0
- package/dist/server.js +12 -1
- package/dist/tools/audio.js +20 -12
- package/dist/tools/configure.d.ts +2 -0
- package/dist/tools/configure.js +34 -31
- package/dist/tools/image.js +39 -16
- package/dist/tools/resold-models.d.ts +73 -0
- package/dist/tools/resold-models.js +231 -0
- package/dist/tools/resold-specs.generated.d.ts +24 -0
- package/dist/tools/resold-specs.generated.js +46 -0
- package/dist/tools/tasks.js +11 -5
- package/dist/tools/video.js +72 -12
- package/dist/tools/voices.js +3 -2
- package/dist/types.d.ts +18 -4
- package/dist/types.js +30 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +14 -5
- package/node_modules/@hono/node-server/README.md +118 -26
- package/node_modules/@hono/node-server/dist/conninfo.cjs +22 -0
- package/node_modules/@hono/node-server/dist/{conninfo.d.ts → conninfo.d.cts} +4 -3
- package/node_modules/@hono/node-server/dist/conninfo.d.mts +4 -3
- package/node_modules/@hono/node-server/dist/conninfo.mjs +19 -16
- package/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs +5 -0
- package/node_modules/@hono/node-server/dist/constants-BXAKTxRC.cjs +11 -0
- package/node_modules/@hono/node-server/dist/early-hints.cjs +35 -0
- package/node_modules/@hono/node-server/dist/early-hints.d.cts +16 -0
- package/node_modules/@hono/node-server/dist/early-hints.d.mts +16 -0
- package/node_modules/@hono/node-server/dist/early-hints.mjs +33 -0
- package/node_modules/@hono/node-server/dist/index.cjs +1365 -0
- package/node_modules/@hono/node-server/dist/index.d.cts +101 -0
- package/node_modules/@hono/node-server/dist/index.d.mts +101 -8
- package/node_modules/@hono/node-server/dist/index.mjs +1336 -616
- package/node_modules/@hono/node-server/dist/serve-static.cjs +153 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.cts +19 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.mts +15 -13
- package/node_modules/@hono/node-server/dist/serve-static.mjs +145 -145
- package/node_modules/@hono/node-server/dist/utils/response.cjs +8 -0
- package/node_modules/@hono/node-server/dist/utils/response.d.cts +4 -0
- package/node_modules/@hono/node-server/dist/utils/response.d.mts +3 -2
- package/node_modules/@hono/node-server/dist/utils/response.mjs +6 -9
- package/node_modules/@hono/node-server/dist/utils/stream.cjs +65 -0
- package/node_modules/@hono/node-server/dist/utils/stream.d.cts +6 -0
- package/node_modules/@hono/node-server/dist/utils/stream.d.mts +6 -0
- package/node_modules/@hono/node-server/dist/utils/stream.mjs +64 -0
- package/node_modules/@hono/node-server/package.json +80 -55
- package/node_modules/@modelcontextprotocol/sdk/README.md +8 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts +43 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js +26 -5
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts +26 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js +127 -24
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js +1 -12
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js +17 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts +7 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js +9 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +28 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.js +11 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js +63 -20
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js +71 -29
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js +45 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js +71 -31
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js +61 -18
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js +57 -19
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js +64 -17
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js +61 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts +4 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts +17 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js +31 -14
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js +17 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js +6 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/express.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/express.js +3 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/express.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js +1 -12
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts +12 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +56 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/requestBody.d.ts +25 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/requestBody.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/requestBody.js +64 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/requestBody.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js +17 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js +10 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts +31 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js +252 -42
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js +25 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.d.ts +3 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.js +12 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts +32 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js +64 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.js +39 -9
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js +10 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +18 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.js +77 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.d.ts +43 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.js +26 -5
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.d.ts +26 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +127 -24
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +2 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js +18 -5
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts +7 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js +9 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +29 -14
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.js +11 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/demoInMemoryOAuthProvider.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/demoInMemoryOAuthProvider.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.js +63 -20
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.js +71 -29
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.js +45 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.js +71 -31
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.js +61 -18
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.js +57 -19
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.js +64 -17
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.js +61 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts +4 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.d.ts +17 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.js +31 -14
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.js +17 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/providers/proxyProvider.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/providers/proxyProvider.js +6 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/providers/proxyProvider.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.js +3 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +2 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts +12 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +56 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.d.ts +25 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.js +58 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +10 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts +31 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +252 -42
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +25 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.d.ts +3 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js +12 -2
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts +32 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js +57 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +39 -9
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +9 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +18 -8
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js +72 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/package.json +4 -3
- package/node_modules/body-parser/README.md +33 -14
- package/node_modules/body-parser/index.js +4 -20
- package/node_modules/body-parser/lib/read.js +85 -68
- package/node_modules/body-parser/lib/types/json.js +67 -39
- package/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +21 -25
- package/node_modules/body-parser/lib/utils.js +14 -27
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/package.json +24 -16
- package/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/express-rate-limit/dist/index.cjs +142 -23
- package/node_modules/express-rate-limit/dist/index.d.cts +58 -1
- package/node_modules/express-rate-limit/dist/index.d.mts +58 -1
- package/node_modules/express-rate-limit/dist/index.d.ts +58 -1
- package/node_modules/express-rate-limit/dist/index.mjs +128 -23
- package/node_modules/express-rate-limit/{license.md → license} +7 -6
- package/node_modules/express-rate-limit/package.json +21 -17
- package/node_modules/express-rate-limit/readme.md +4 -0
- package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
- package/node_modules/fast-uri/README.md +8 -0
- package/node_modules/fast-uri/index.js +355 -50
- package/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/fast-uri/lib/utils.js +448 -92
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
- package/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +137 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +163 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +139 -0
- package/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/hono/README.md +2 -3
- package/node_modules/hono/dist/_virtual/_rolldown/runtime.js +13 -0
- package/node_modules/hono/dist/adapter/aws-lambda/conninfo.js +42 -23
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +320 -351
- package/node_modules/hono/dist/adapter/aws-lambda/index.js +2 -8
- package/node_modules/hono/dist/adapter/aws-lambda/types.js +1 -0
- package/node_modules/hono/dist/adapter/bun/conninfo.js +20 -25
- package/node_modules/hono/dist/adapter/bun/index.js +3 -13
- package/node_modules/hono/dist/adapter/bun/serve-static.js +27 -27
- package/node_modules/hono/dist/adapter/bun/server.js +11 -5
- package/node_modules/hono/dist/adapter/bun/ssg.js +25 -15
- package/node_modules/hono/dist/adapter/bun/websocket.js +61 -66
- package/node_modules/hono/dist/adapter/cloudflare-pages/conninfo.js +24 -9
- package/node_modules/hono/dist/adapter/cloudflare-pages/handler.js +59 -62
- package/node_modules/hono/dist/adapter/cloudflare-pages/index.js +2 -8
- package/node_modules/hono/dist/adapter/cloudflare-workers/conninfo.js +7 -9
- package/node_modules/hono/dist/adapter/cloudflare-workers/index.js +3 -8
- package/node_modules/hono/dist/adapter/cloudflare-workers/serve-static-module.js +5 -6
- package/node_modules/hono/dist/adapter/cloudflare-workers/serve-static.js +26 -20
- package/node_modules/hono/dist/adapter/cloudflare-workers/utils.js +21 -34
- package/node_modules/hono/dist/adapter/cloudflare-workers/websocket.js +31 -39
- package/node_modules/hono/dist/adapter/deno/conninfo.js +16 -13
- package/node_modules/hono/dist/adapter/deno/deno.d.js +1 -0
- package/node_modules/hono/dist/adapter/deno/index.js +3 -10
- package/node_modules/hono/dist/adapter/deno/serve-static.js +33 -38
- package/node_modules/hono/dist/adapter/deno/ssg.js +27 -16
- package/node_modules/hono/dist/adapter/deno/websocket.js +30 -26
- package/node_modules/hono/dist/adapter/lambda-edge/conninfo.js +7 -9
- package/node_modules/hono/dist/adapter/lambda-edge/handler.js +102 -71
- package/node_modules/hono/dist/adapter/lambda-edge/index.js +2 -6
- package/node_modules/hono/dist/adapter/netlify/conninfo.js +24 -9
- package/node_modules/hono/dist/adapter/netlify/handler.js +10 -8
- package/node_modules/hono/dist/adapter/netlify/index.js +3 -2
- package/node_modules/hono/dist/adapter/netlify/mod.js +2 -6
- package/node_modules/hono/dist/adapter/service-worker/handler.js +15 -19
- package/node_modules/hono/dist/adapter/service-worker/index.js +23 -7
- package/node_modules/hono/dist/adapter/service-worker/types.js +1 -0
- package/node_modules/hono/dist/adapter/vercel/conninfo.js +7 -10
- package/node_modules/hono/dist/adapter/vercel/handler.js +8 -6
- package/node_modules/hono/dist/adapter/vercel/index.js +2 -6
- package/node_modules/hono/dist/cjs/_virtual/_rolldown/runtime.js +33 -0
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/conninfo.js +42 -44
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +328 -380
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/index.js +7 -34
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/types.js +0 -15
- package/node_modules/hono/dist/cjs/adapter/bun/conninfo.js +21 -47
- package/node_modules/hono/dist/cjs/adapter/bun/index.js +14 -45
- package/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +30 -51
- package/node_modules/hono/dist/cjs/adapter/bun/server.js +11 -26
- package/node_modules/hono/dist/cjs/adapter/bun/ssg.js +24 -35
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +63 -89
- package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/conninfo.js +25 -31
- package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/handler.js +61 -85
- package/node_modules/hono/dist/cjs/adapter/cloudflare-pages/index.js +7 -34
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/conninfo.js +8 -31
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/index.js +7 -33
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static-module.js +7 -29
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +28 -43
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/utils.js +21 -55
- package/node_modules/hono/dist/cjs/adapter/cloudflare-workers/websocket.js +33 -62
- package/node_modules/hono/dist/cjs/adapter/deno/conninfo.js +16 -34
- package/node_modules/hono/dist/cjs/adapter/deno/index.js +10 -38
- package/node_modules/hono/dist/cjs/adapter/deno/serve-static.js +34 -60
- package/node_modules/hono/dist/cjs/adapter/deno/ssg.js +27 -37
- package/node_modules/hono/dist/cjs/adapter/deno/websocket.js +32 -49
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/conninfo.js +8 -31
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +105 -103
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/index.js +5 -30
- package/node_modules/hono/dist/cjs/adapter/netlify/conninfo.js +25 -31
- package/node_modules/hono/dist/cjs/adapter/netlify/handler.js +10 -29
- package/node_modules/hono/dist/cjs/adapter/netlify/index.js +5 -21
- package/node_modules/hono/dist/cjs/adapter/netlify/mod.js +5 -30
- package/node_modules/hono/dist/cjs/adapter/service-worker/handler.js +16 -41
- package/node_modules/hono/dist/cjs/adapter/service-worker/index.js +25 -30
- package/node_modules/hono/dist/cjs/adapter/service-worker/types.js +0 -15
- package/node_modules/hono/dist/cjs/adapter/vercel/conninfo.js +8 -32
- package/node_modules/hono/dist/cjs/adapter/vercel/handler.js +8 -27
- package/node_modules/hono/dist/cjs/adapter/vercel/index.js +5 -30
- package/node_modules/hono/dist/cjs/client/client.js +140 -190
- package/node_modules/hono/dist/cjs/client/fetch-result-please.js +62 -80
- package/node_modules/hono/dist/cjs/client/index.js +7 -32
- package/node_modules/hono/dist/cjs/client/types.js +0 -15
- package/node_modules/hono/dist/cjs/client/utils.js +54 -89
- package/node_modules/hono/dist/cjs/compose.js +49 -66
- package/node_modules/hono/dist/cjs/context.js +379 -431
- package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +50 -38
- package/node_modules/hono/dist/cjs/helper/accepts/index.js +3 -27
- package/node_modules/hono/dist/cjs/helper/adapter/index.js +33 -73
- package/node_modules/hono/dist/cjs/helper/conninfo/index.js +0 -15
- package/node_modules/hono/dist/cjs/helper/conninfo/types.js +0 -15
- package/node_modules/hono/dist/cjs/helper/cookie/index.js +75 -116
- package/node_modules/hono/dist/cjs/helper/css/common.js +167 -241
- package/node_modules/hono/dist/cjs/helper/css/index.js +136 -143
- package/node_modules/hono/dist/cjs/helper/dev/index.js +45 -71
- package/node_modules/hono/dist/cjs/helper/factory/index.js +30 -51
- package/node_modules/hono/dist/cjs/helper/html/index.js +32 -62
- package/node_modules/hono/dist/cjs/helper/proxy/index.js +113 -102
- package/node_modules/hono/dist/cjs/helper/route/index.js +125 -66
- package/node_modules/hono/dist/cjs/helper/ssg/index.js +19 -43
- package/node_modules/hono/dist/cjs/helper/ssg/middleware.js +56 -64
- package/node_modules/hono/dist/cjs/helper/ssg/plugins.js +55 -57
- package/node_modules/hono/dist/cjs/helper/ssg/ssg.js +200 -298
- package/node_modules/hono/dist/cjs/helper/ssg/utils.js +53 -76
- package/node_modules/hono/dist/cjs/helper/streaming/index.js +8 -35
- package/node_modules/hono/dist/cjs/helper/streaming/sse.js +53 -84
- package/node_modules/hono/dist/cjs/helper/streaming/stream.js +23 -53
- package/node_modules/hono/dist/cjs/helper/streaming/text.js +10 -32
- package/node_modules/hono/dist/cjs/helper/streaming/utils.js +13 -32
- package/node_modules/hono/dist/cjs/helper/testing/index.js +16 -31
- package/node_modules/hono/dist/cjs/helper/websocket/index.js +51 -76
- package/node_modules/hono/dist/cjs/hono-base.js +346 -396
- package/node_modules/hono/dist/cjs/hono.js +27 -42
- package/node_modules/hono/dist/cjs/http-exception.js +55 -56
- package/node_modules/hono/dist/cjs/index.js +22 -27
- package/node_modules/hono/dist/cjs/jsx/base.js +264 -359
- package/node_modules/hono/dist/cjs/jsx/children.js +16 -41
- package/node_modules/hono/dist/cjs/jsx/components.js +120 -174
- package/node_modules/hono/dist/cjs/jsx/constants.js +17 -42
- package/node_modules/hono/dist/cjs/jsx/context.js +166 -58
- package/node_modules/hono/dist/cjs/jsx/dom/client.js +49 -69
- package/node_modules/hono/dist/cjs/jsx/dom/components.js +23 -52
- package/node_modules/hono/dist/cjs/jsx/dom/context.js +39 -67
- package/node_modules/hono/dist/cjs/jsx/dom/css.js +143 -158
- package/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +55 -64
- package/node_modules/hono/dist/cjs/jsx/dom/index.js +114 -173
- package/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +282 -375
- package/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +14 -49
- package/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js +5 -32
- package/node_modules/hono/dist/cjs/jsx/dom/render.js +471 -587
- package/node_modules/hono/dist/cjs/jsx/dom/server.js +37 -60
- package/node_modules/hono/dist/cjs/jsx/dom/utils.js +7 -30
- package/node_modules/hono/dist/cjs/jsx/hooks/index.js +227 -317
- package/node_modules/hono/dist/cjs/jsx/index.js +86 -135
- package/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js +20 -43
- package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +117 -168
- package/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js +0 -15
- package/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js +14 -39
- package/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +29 -67
- package/node_modules/hono/dist/cjs/jsx/streaming.js +123 -165
- package/node_modules/hono/dist/cjs/jsx/types.js +0 -15
- package/node_modules/hono/dist/cjs/jsx/utils.js +91 -175
- package/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +98 -86
- package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +100 -109
- package/node_modules/hono/dist/cjs/middleware/body-limit/index.js +65 -72
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +168 -114
- package/node_modules/hono/dist/cjs/middleware/combine/index.js +135 -95
- package/node_modules/hono/dist/cjs/middleware/compress/index.js +76 -59
- package/node_modules/hono/dist/cjs/middleware/context-storage/index.js +49 -41
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +107 -107
- package/node_modules/hono/dist/cjs/middleware/csrf/index.js +103 -74
- package/node_modules/hono/dist/cjs/middleware/etag/digest.js +58 -51
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +73 -87
- package/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js +163 -141
- package/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js +99 -77
- package/node_modules/hono/dist/cjs/middleware/jwk/index.js +3 -27
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +118 -130
- package/node_modules/hono/dist/cjs/middleware/jwt/index.js +9 -38
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +120 -136
- package/node_modules/hono/dist/cjs/middleware/language/index.js +7 -35
- package/node_modules/hono/dist/cjs/middleware/language/language.js +184 -197
- package/node_modules/hono/dist/cjs/middleware/logger/index.js +41 -62
- package/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +84 -0
- package/node_modules/hono/dist/cjs/middleware/method-override/index.js +101 -100
- package/node_modules/hono/dist/cjs/middleware/mount/index.js +72 -0
- package/node_modules/hono/dist/cjs/middleware/powered-by/index.js +23 -30
- package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +40 -35
- package/node_modules/hono/dist/cjs/middleware/request-id/index.js +3 -27
- package/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +34 -42
- package/node_modules/hono/dist/cjs/middleware/secure-headers/index.js +4 -29
- package/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +0 -15
- package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +143 -166
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +58 -93
- package/node_modules/hono/dist/cjs/middleware/serve-static/path.js +15 -38
- package/node_modules/hono/dist/cjs/middleware/timeout/index.js +40 -45
- package/node_modules/hono/dist/cjs/middleware/timing/index.js +7 -35
- package/node_modules/hono/dist/cjs/middleware/timing/timing.js +178 -116
- package/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +85 -58
- package/node_modules/hono/dist/cjs/preset/quick.js +18 -37
- package/node_modules/hono/dist/cjs/preset/tiny.js +15 -33
- package/node_modules/hono/dist/cjs/request/constants.js +5 -27
- package/node_modules/hono/dist/cjs/request.js +334 -321
- package/node_modules/hono/dist/cjs/router/linear-router/index.js +3 -27
- package/node_modules/hono/dist/cjs/router/linear-router/router.js +95 -138
- package/node_modules/hono/dist/cjs/router/pattern-router/index.js +3 -27
- package/node_modules/hono/dist/cjs/router/pattern-router/router.js +41 -69
- package/node_modules/hono/dist/cjs/router/reg-exp-router/index.js +7 -34
- package/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js +18 -45
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +95 -131
- package/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +92 -161
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +88 -206
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +83 -80
- package/node_modules/hono/dist/cjs/router/smart-router/index.js +3 -27
- package/node_modules/hono/dist/cjs/router/smart-router/router.js +49 -79
- package/node_modules/hono/dist/cjs/router/trie-router/index.js +3 -27
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +134 -200
- package/node_modules/hono/dist/cjs/router/trie-router/router.js +15 -47
- package/node_modules/hono/dist/cjs/router/utils.js +5 -0
- package/node_modules/hono/dist/cjs/router.js +37 -37
- package/node_modules/hono/dist/cjs/types.js +5 -28
- package/node_modules/hono/dist/cjs/utils/accept.js +177 -228
- package/node_modules/hono/dist/cjs/utils/basic-auth.js +16 -40
- package/node_modules/hono/dist/cjs/utils/body.js +89 -89
- package/node_modules/hono/dist/cjs/utils/buffer.js +43 -90
- package/node_modules/hono/dist/cjs/utils/color.js +35 -44
- package/node_modules/hono/dist/cjs/utils/compress.js +12 -27
- package/node_modules/hono/dist/cjs/utils/concurrent.js +29 -59
- package/node_modules/hono/dist/cjs/utils/constants.js +7 -26
- package/node_modules/hono/dist/cjs/utils/cookie.js +108 -177
- package/node_modules/hono/dist/cjs/utils/crypto.js +30 -61
- package/node_modules/hono/dist/cjs/utils/encode.js +31 -48
- package/node_modules/hono/dist/cjs/utils/filepath.js +23 -54
- package/node_modules/hono/dist/cjs/utils/handler.js +11 -33
- package/node_modules/hono/dist/cjs/utils/headers.js +0 -15
- package/node_modules/hono/dist/cjs/utils/html.js +96 -137
- package/node_modules/hono/dist/cjs/utils/http-status.js +0 -15
- package/node_modules/hono/dist/cjs/utils/ipaddr.js +233 -121
- package/node_modules/hono/dist/cjs/utils/jwt/index.js +14 -27
- package/node_modules/hono/dist/cjs/utils/jwt/jwa.js +25 -42
- package/node_modules/hono/dist/cjs/utils/jwt/jws.js +119 -199
- package/node_modules/hono/dist/cjs/utils/jwt/jwt.js +123 -205
- package/node_modules/hono/dist/cjs/utils/jwt/types.js +122 -159
- package/node_modules/hono/dist/cjs/utils/jwt/utf8.js +9 -28
- package/node_modules/hono/dist/cjs/utils/mime.js +75 -103
- package/node_modules/hono/dist/cjs/utils/mount.js +51 -0
- package/node_modules/hono/dist/cjs/utils/stream.js +88 -100
- package/node_modules/hono/dist/cjs/utils/types.js +0 -15
- package/node_modules/hono/dist/cjs/utils/url.js +199 -228
- package/node_modules/hono/dist/cjs/validator/index.js +3 -27
- package/node_modules/hono/dist/cjs/validator/utils.js +0 -15
- package/node_modules/hono/dist/cjs/validator/validator.js +63 -106
- package/node_modules/hono/dist/client/client.js +139 -175
- package/node_modules/hono/dist/client/fetch-result-please.js +59 -56
- package/node_modules/hono/dist/client/index.js +3 -7
- package/node_modules/hono/dist/client/types.js +1 -0
- package/node_modules/hono/dist/client/utils.js +51 -65
- package/node_modules/hono/dist/compose.js +49 -45
- package/node_modules/hono/dist/context.js +376 -407
- package/node_modules/hono/dist/helper/accepts/accepts.js +49 -16
- package/node_modules/hono/dist/helper/accepts/index.js +1 -4
- package/node_modules/hono/dist/helper/adapter/index.js +33 -52
- package/node_modules/hono/dist/helper/conninfo/index.js +1 -0
- package/node_modules/hono/dist/helper/conninfo/types.js +1 -0
- package/node_modules/hono/dist/helper/cookie/index.js +74 -94
- package/node_modules/hono/dist/helper/css/common.js +169 -222
- package/node_modules/hono/dist/helper/css/index.js +132 -129
- package/node_modules/hono/dist/helper/dev/index.js +44 -49
- package/node_modules/hono/dist/helper/factory/index.js +27 -27
- package/node_modules/hono/dist/helper/html/index.js +30 -39
- package/node_modules/hono/dist/helper/proxy/index.js +116 -84
- package/node_modules/hono/dist/helper/route/index.js +123 -43
- package/node_modules/hono/dist/helper/ssg/index.js +3 -18
- package/node_modules/hono/dist/helper/ssg/middleware.js +53 -40
- package/node_modules/hono/dist/helper/ssg/plugins.js +55 -36
- package/node_modules/hono/dist/helper/ssg/ssg.js +200 -283
- package/node_modules/hono/dist/helper/ssg/utils.js +54 -56
- package/node_modules/hono/dist/helper/streaming/index.js +2 -8
- package/node_modules/hono/dist/helper/streaming/sse.js +50 -60
- package/node_modules/hono/dist/helper/streaming/stream.js +22 -31
- package/node_modules/hono/dist/helper/streaming/text.js +9 -10
- package/node_modules/hono/dist/helper/streaming/utils.js +9 -12
- package/node_modules/hono/dist/helper/testing/index.js +16 -10
- package/node_modules/hono/dist/helper/websocket/index.js +49 -53
- package/node_modules/hono/dist/hono-base.js +343 -372
- package/node_modules/hono/dist/hono.js +26 -20
- package/node_modules/hono/dist/http-exception.js +53 -33
- package/node_modules/hono/dist/index.js +19 -4
- package/node_modules/hono/dist/jsx/base.js +252 -326
- package/node_modules/hono/dist/jsx/children.js +16 -20
- package/node_modules/hono/dist/jsx/components.js +119 -152
- package/node_modules/hono/dist/jsx/constants.js +10 -15
- package/node_modules/hono/dist/jsx/context.js +162 -35
- package/node_modules/hono/dist/jsx/dom/client.js +45 -48
- package/node_modules/hono/dist/jsx/dom/components.js +21 -29
- package/node_modules/hono/dist/jsx/dom/context.js +37 -44
- package/node_modules/hono/dist/jsx/dom/css.js +142 -147
- package/node_modules/hono/dist/jsx/dom/hooks/index.js +52 -40
- package/node_modules/hono/dist/jsx/dom/index.js +71 -134
- package/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +275 -359
- package/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js +14 -18
- package/node_modules/hono/dist/jsx/dom/jsx-runtime.js +2 -8
- package/node_modules/hono/dist/jsx/dom/render.js +492 -593
- package/node_modules/hono/dist/jsx/dom/server.js +33 -29
- package/node_modules/hono/dist/jsx/dom/utils.js +6 -8
- package/node_modules/hono/dist/jsx/hooks/index.js +238 -307
- package/node_modules/hono/dist/jsx/index.js +45 -98
- package/node_modules/hono/dist/jsx/intrinsic-element/common.js +20 -22
- package/node_modules/hono/dist/jsx/intrinsic-element/components.js +113 -154
- package/node_modules/hono/dist/jsx/intrinsic-elements.js +1 -0
- package/node_modules/hono/dist/jsx/jsx-dev-runtime.js +12 -16
- package/node_modules/hono/dist/jsx/jsx-runtime.js +25 -42
- package/node_modules/hono/dist/jsx/streaming.js +121 -142
- package/node_modules/hono/dist/jsx/types.js +1 -0
- package/node_modules/hono/dist/jsx/utils.js +105 -168
- package/node_modules/hono/dist/middleware/basic-auth/index.js +96 -63
- package/node_modules/hono/dist/middleware/bearer-auth/index.js +101 -89
- package/node_modules/hono/dist/middleware/body-limit/index.js +65 -51
- package/node_modules/hono/dist/middleware/cache/index.js +169 -94
- package/node_modules/hono/dist/middleware/combine/index.js +134 -73
- package/node_modules/hono/dist/middleware/compress/index.js +76 -39
- package/node_modules/hono/dist/middleware/context-storage/index.js +49 -19
- package/node_modules/hono/dist/middleware/cors/index.js +107 -86
- package/node_modules/hono/dist/middleware/csrf/index.js +103 -53
- package/node_modules/hono/dist/middleware/etag/digest.js +59 -31
- package/node_modules/hono/dist/middleware/etag/index.js +73 -66
- package/node_modules/hono/dist/middleware/ip-restriction/index.js +163 -127
- package/node_modules/hono/dist/middleware/jsx-renderer/index.js +97 -54
- package/node_modules/hono/dist/middleware/jwk/index.js +1 -4
- package/node_modules/hono/dist/middleware/jwk/jwk.js +116 -107
- package/node_modules/hono/dist/middleware/jwt/index.js +2 -10
- package/node_modules/hono/dist/middleware/jwt/jwt.js +114 -109
- package/node_modules/hono/dist/middleware/language/index.js +2 -15
- package/node_modules/hono/dist/middleware/language/language.js +180 -172
- package/node_modules/hono/dist/middleware/logger/index.js +43 -37
- package/node_modules/hono/dist/middleware/method-not-allowed/index.js +83 -0
- package/node_modules/hono/dist/middleware/method-override/index.js +101 -79
- package/node_modules/hono/dist/middleware/mount/index.js +71 -0
- package/node_modules/hono/dist/middleware/powered-by/index.js +23 -9
- package/node_modules/hono/dist/middleware/pretty-json/index.js +40 -14
- package/node_modules/hono/dist/middleware/request-id/index.js +1 -4
- package/node_modules/hono/dist/middleware/request-id/request-id.js +33 -20
- package/node_modules/hono/dist/middleware/secure-headers/index.js +1 -5
- package/node_modules/hono/dist/middleware/secure-headers/permissions-policy.js +1 -0
- package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +145 -147
- package/node_modules/hono/dist/middleware/serve-static/index.js +58 -72
- package/node_modules/hono/dist/middleware/serve-static/path.js +15 -17
- package/node_modules/hono/dist/middleware/timeout/index.js +40 -23
- package/node_modules/hono/dist/middleware/timing/index.js +2 -9
- package/node_modules/hono/dist/middleware/timing/timing.js +178 -95
- package/node_modules/hono/dist/middleware/trailing-slash/index.js +85 -37
- package/node_modules/hono/dist/preset/quick.js +17 -15
- package/node_modules/hono/dist/preset/tiny.js +14 -11
- package/node_modules/hono/dist/request/constants.js +4 -5
- package/node_modules/hono/dist/request.js +329 -295
- package/node_modules/hono/dist/router/linear-router/index.js +1 -4
- package/node_modules/hono/dist/router/linear-router/router.js +93 -115
- package/node_modules/hono/dist/router/pattern-router/index.js +1 -4
- package/node_modules/hono/dist/router/pattern-router/router.js +39 -46
- package/node_modules/hono/dist/router/reg-exp-router/index.js +1 -7
- package/node_modules/hono/dist/router/reg-exp-router/matcher.js +17 -23
- package/node_modules/hono/dist/router/reg-exp-router/node.js +90 -108
- package/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +89 -137
- package/node_modules/hono/dist/router/reg-exp-router/router.js +82 -183
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +80 -56
- package/node_modules/hono/dist/router/smart-router/index.js +1 -4
- package/node_modules/hono/dist/router/smart-router/router.js +46 -55
- package/node_modules/hono/dist/router/trie-router/index.js +1 -4
- package/node_modules/hono/dist/router/trie-router/node.js +132 -177
- package/node_modules/hono/dist/router/trie-router/router.js +11 -22
- package/node_modules/hono/dist/router/utils.js +4 -0
- package/node_modules/hono/dist/router.js +35 -14
- package/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +4 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +150 -104
- package/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts +4 -8
- package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +152 -113
- package/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +4 -1
- package/node_modules/hono/dist/types/adapter/bun/index.d.ts +6 -10
- package/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts +8 -3
- package/node_modules/hono/dist/types/adapter/bun/server.d.ts +4 -5
- package/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +5 -1
- package/node_modules/hono/dist/types/adapter/bun/websocket.d.ts +31 -16
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +4 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +29 -17
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts +3 -7
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts +4 -7
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +5 -2
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +11 -6
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +10 -2
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +4 -1
- package/node_modules/hono/dist/types/adapter/deno/deno.d.ts +1 -0
- package/node_modules/hono/dist/types/adapter/deno/index.d.ts +5 -8
- package/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts +8 -3
- package/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +5 -1
- package/node_modules/hono/dist/types/adapter/deno/websocket.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +84 -58
- package/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts +3 -7
- package/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +4 -1
- package/node_modules/hono/dist/types/adapter/netlify/handler.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/netlify/index.d.ts +3 -5
- package/node_modules/hono/dist/types/adapter/netlify/mod.d.ts +3 -2
- package/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts +9 -7
- package/node_modules/hono/dist/types/adapter/service-worker/index.d.ts +7 -9
- package/node_modules/hono/dist/types/adapter/service-worker/types.d.ts +12 -7
- package/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/vercel/handler.d.ts +6 -1
- package/node_modules/hono/dist/types/adapter/vercel/index.d.ts +3 -6
- package/node_modules/hono/dist/types/client/client.d.ts +5 -3
- package/node_modules/hono/dist/types/client/fetch-result-please.d.ts +21 -19
- package/node_modules/hono/dist/types/client/index.d.ts +5 -7
- package/node_modules/hono/dist/types/client/types.d.ts +135 -160
- package/node_modules/hono/dist/types/client/utils.d.ts +6 -4
- package/node_modules/hono/dist/types/compose.d.ts +4 -2
- package/node_modules/hono/dist/types/context.d.ts +335 -331
- package/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +11 -9
- package/node_modules/hono/dist/types/helper/accepts/index.d.ts +2 -5
- package/node_modules/hono/dist/types/helper/adapter/index.d.ts +4 -6
- package/node_modules/hono/dist/types/helper/conninfo/index.d.ts +2 -5
- package/node_modules/hono/dist/types/helper/conninfo/types.d.ts +25 -23
- package/node_modules/hono/dist/types/helper/cookie/index.d.ts +10 -12
- package/node_modules/hono/dist/types/helper/css/common.d.ts +11 -9
- package/node_modules/hono/dist/types/helper/css/index.d.ts +26 -28
- package/node_modules/hono/dist/types/helper/dev/index.d.ts +10 -12
- package/node_modules/hono/dist/types/helper/factory/index.d.ts +26 -73
- package/node_modules/hono/dist/types/helper/html/index.d.ts +4 -7
- package/node_modules/hono/dist/types/helper/proxy/index.d.ts +20 -22
- package/node_modules/hono/dist/types/helper/route/index.d.ts +6 -4
- package/node_modules/hono/dist/types/helper/ssg/index.d.ts +4 -7
- package/node_modules/hono/dist/types/helper/ssg/middleware.d.ts +8 -6
- package/node_modules/hono/dist/types/helper/ssg/plugins.d.ts +3 -1
- package/node_modules/hono/dist/types/helper/ssg/ssg.d.ts +44 -37
- package/node_modules/hono/dist/types/helper/ssg/utils.d.ts +5 -3
- package/node_modules/hono/dist/types/helper/streaming/index.d.ts +4 -8
- package/node_modules/hono/dist/types/helper/streaming/sse.d.ts +10 -8
- package/node_modules/hono/dist/types/helper/streaming/stream.d.ts +4 -2
- package/node_modules/hono/dist/types/helper/streaming/text.d.ts +4 -2
- package/node_modules/hono/dist/types/helper/streaming/utils.d.ts +2 -0
- package/node_modules/hono/dist/types/helper/testing/index.d.ts +8 -9
- package/node_modules/hono/dist/types/helper/websocket/index.d.ts +30 -33
- package/node_modules/hono/dist/types/hono-base.d.ts +225 -210
- package/node_modules/hono/dist/types/hono.d.ts +11 -10
- package/node_modules/hono/dist/types/http-exception.d.ts +20 -22
- package/node_modules/hono/dist/types/index.d.ts +6 -36
- package/node_modules/hono/dist/types/jsx/base.d.ts +45 -38
- package/node_modules/hono/dist/types/jsx/children.d.ts +8 -6
- package/node_modules/hono/dist/types/jsx/components.d.ts +8 -5
- package/node_modules/hono/dist/types/jsx/constants.d.ts +3 -0
- package/node_modules/hono/dist/types/jsx/context.d.ts +48 -6
- package/node_modules/hono/dist/types/jsx/dom/client.d.ts +9 -10
- package/node_modules/hono/dist/types/jsx/dom/components.d.ts +9 -6
- package/node_modules/hono/dist/types/jsx/dom/context.d.ts +3 -1
- package/node_modules/hono/dist/types/jsx/dom/css.d.ts +27 -30
- package/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts +11 -12
- package/node_modules/hono/dist/types/jsx/dom/index.d.ts +79 -83
- package/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +10 -6
- package/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +4 -6
- package/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts +3 -7
- package/node_modules/hono/dist/types/jsx/dom/render.d.ts +32 -50
- package/node_modules/hono/dist/types/jsx/dom/server.d.ts +87 -85
- package/node_modules/hono/dist/types/jsx/dom/utils.d.ts +2 -0
- package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +22 -20
- package/node_modules/hono/dist/types/jsx/index.d.ts +71 -73
- package/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts +3 -1
- package/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts +7 -4
- package/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts +708 -708
- package/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts +4 -7
- package/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts +8 -10
- package/node_modules/hono/dist/types/jsx/streaming.d.ts +10 -10
- package/node_modules/hono/dist/types/jsx/types.d.ts +12 -13
- package/node_modules/hono/dist/types/jsx/utils.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +17 -19
- package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +52 -52
- package/node_modules/hono/dist/types/middleware/body-limit/index.d.ts +6 -8
- package/node_modules/hono/dist/types/middleware/cache/index.d.ts +18 -18
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +8 -8
- package/node_modules/hono/dist/types/middleware/compress/index.d.ts +17 -7
- package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +6 -8
- package/node_modules/hono/dist/types/middleware/cors/index.d.ts +11 -13
- package/node_modules/hono/dist/types/middleware/csrf/index.d.ts +6 -8
- package/node_modules/hono/dist/types/middleware/etag/digest.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/etag/index.d.ts +6 -8
- package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +11 -12
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +13 -13
- package/node_modules/hono/dist/types/middleware/jwk/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +21 -22
- package/node_modules/hono/dist/types/middleware/jwt/index.d.ts +7 -6
- package/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +29 -29
- package/node_modules/hono/dist/types/middleware/language/index.d.ts +6 -5
- package/node_modules/hono/dist/types/middleware/language/language.d.ts +60 -44
- package/node_modules/hono/dist/types/middleware/logger/index.d.ts +3 -5
- package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +47 -0
- package/node_modules/hono/dist/types/middleware/method-override/index.d.ts +14 -16
- package/node_modules/hono/dist/types/middleware/mount/index.d.ts +48 -0
- package/node_modules/hono/dist/types/middleware/powered-by/index.d.ts +8 -10
- package/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts +18 -20
- package/node_modules/hono/dist/types/middleware/request-id/index.d.ts +6 -5
- package/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +9 -11
- package/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts +6 -6
- package/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +5 -3
- package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +55 -57
- package/node_modules/hono/dist/types/middleware/serve-static/index.d.ts +24 -24
- package/node_modules/hono/dist/types/middleware/serve-static/path.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/timeout/index.d.ts +5 -7
- package/node_modules/hono/dist/types/middleware/timing/index.d.ts +6 -5
- package/node_modules/hono/dist/types/middleware/timing/timing.d.ts +17 -20
- package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +35 -37
- package/node_modules/hono/dist/types/preset/quick.d.ts +6 -9
- package/node_modules/hono/dist/types/preset/tiny.d.ts +6 -9
- package/node_modules/hono/dist/types/request/constants.d.ts +2 -0
- package/node_modules/hono/dist/types/request.d.ts +288 -273
- package/node_modules/hono/dist/types/router/linear-router/index.d.ts +2 -5
- package/node_modules/hono/dist/types/router/linear-router/router.d.ts +7 -5
- package/node_modules/hono/dist/types/router/pattern-router/index.d.ts +2 -5
- package/node_modules/hono/dist/types/router/pattern-router/router.d.ts +7 -5
- package/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts +3 -6
- package/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts +3 -1
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +9 -4
- package/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +11 -10
- package/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts +10 -9
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +7 -4
- package/node_modules/hono/dist/types/router/smart-router/index.d.ts +2 -5
- package/node_modules/hono/dist/types/router/smart-router/router.d.ts +11 -9
- package/node_modules/hono/dist/types/router/trie-router/index.d.ts +2 -5
- package/node_modules/hono/dist/types/router/trie-router/node.d.ts +6 -5
- package/node_modules/hono/dist/types/router/trie-router/router.d.ts +7 -6
- package/node_modules/hono/dist/types/router/utils.d.ts +3 -0
- package/node_modules/hono/dist/types/router.d.ts +24 -23
- package/node_modules/hono/dist/types/types.d.ts +146 -505
- package/node_modules/hono/dist/types/utils/accept.d.ts +5 -3
- package/node_modules/hono/dist/types/utils/basic-auth.d.ts +4 -2
- package/node_modules/hono/dist/types/utils/body.d.ts +46 -50
- package/node_modules/hono/dist/types/utils/buffer.d.ts +7 -5
- package/node_modules/hono/dist/types/utils/color.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/compress.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/concurrent.d.ts +6 -4
- package/node_modules/hono/dist/types/utils/constants.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/cookie.d.ts +21 -19
- package/node_modules/hono/dist/types/utils/crypto.d.ts +5 -7
- package/node_modules/hono/dist/types/utils/encode.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/filepath.d.ts +5 -3
- package/node_modules/hono/dist/types/utils/handler.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/headers.d.ts +4 -2
- package/node_modules/hono/dist/types/utils/html.d.ts +11 -9
- package/node_modules/hono/dist/types/utils/http-status.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/ipaddr.d.ts +7 -5
- package/node_modules/hono/dist/types/utils/jwt/index.d.ts +18 -12
- package/node_modules/hono/dist/types/utils/jwt/jwa.d.ts +15 -13
- package/node_modules/hono/dist/types/utils/jwt/jws.d.ts +4 -7
- package/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +26 -29
- package/node_modules/hono/dist/types/utils/jwt/types.d.ts +48 -45
- package/node_modules/hono/dist/types/utils/jwt/utf8.d.ts +2 -0
- package/node_modules/hono/dist/types/utils/mime.d.ts +60 -57
- package/node_modules/hono/dist/types/utils/mount.d.ts +4 -0
- package/node_modules/hono/dist/types/utils/stream.d.ts +27 -25
- package/node_modules/hono/dist/types/utils/types.d.ts +15 -27
- package/node_modules/hono/dist/types/utils/url.d.ts +7 -0
- package/node_modules/hono/dist/types/validator/index.d.ts +3 -7
- package/node_modules/hono/dist/types/validator/utils.d.ts +6 -8
- package/node_modules/hono/dist/types/validator/validator.d.ts +11 -9
- package/node_modules/hono/dist/types.js +4 -6
- package/node_modules/hono/dist/utils/accept.js +185 -215
- package/node_modules/hono/dist/utils/basic-auth.js +18 -21
- package/node_modules/hono/dist/utils/body.js +88 -67
- package/node_modules/hono/dist/utils/buffer.js +44 -70
- package/node_modules/hono/dist/utils/color.js +33 -21
- package/node_modules/hono/dist/utils/compress.js +11 -5
- package/node_modules/hono/dist/utils/concurrent.js +29 -38
- package/node_modules/hono/dist/utils/constants.js +7 -5
- package/node_modules/hono/dist/utils/cookie.js +115 -163
- package/node_modules/hono/dist/utils/crypto.js +30 -40
- package/node_modules/hono/dist/utils/encode.js +30 -26
- package/node_modules/hono/dist/utils/filepath.js +23 -33
- package/node_modules/hono/dist/utils/handler.js +10 -11
- package/node_modules/hono/dist/utils/headers.js +1 -0
- package/node_modules/hono/dist/utils/html.js +97 -117
- package/node_modules/hono/dist/utils/http-status.js +1 -0
- package/node_modules/hono/dist/utils/ipaddr.js +231 -99
- package/node_modules/hono/dist/utils/jwt/index.js +12 -4
- package/node_modules/hono/dist/utils/jwt/jwa.js +24 -20
- package/node_modules/hono/dist/utils/jwt/jws.js +115 -174
- package/node_modules/hono/dist/utils/jwt/jwt.js +121 -197
- package/node_modules/hono/dist/utils/jwt/types.js +79 -95
- package/node_modules/hono/dist/utils/jwt/utf8.js +9 -7
- package/node_modules/hono/dist/utils/mime.js +74 -81
- package/node_modules/hono/dist/utils/mount.js +50 -0
- package/node_modules/hono/dist/utils/stream.js +86 -77
- package/node_modules/hono/dist/utils/types.js +1 -0
- package/node_modules/hono/dist/utils/url.js +199 -208
- package/node_modules/hono/dist/validator/index.js +1 -4
- package/node_modules/hono/dist/validator/utils.js +1 -0
- package/node_modules/hono/dist/validator/validator.js +61 -83
- package/node_modules/hono/package.json +69 -47
- package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
- package/node_modules/iconv-lite/encodings/utf32.js +10 -3
- package/node_modules/iconv-lite/package.json +2 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
- package/node_modules/ip-address/README.md +173 -143
- package/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/ip-address/dist/common.d.ts +54 -0
- package/node_modules/ip-address/dist/common.js +93 -6
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +88 -8
- package/node_modules/ip-address/dist/ipv4.js +146 -29
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +156 -11
- package/node_modules/ip-address/dist/ipv6.js +340 -96
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +17 -0
- package/node_modules/ip-address/dist/v6/constants.js +53 -3
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +8 -5
- package/node_modules/proxy-addr/HISTORY.md +60 -54
- package/node_modules/proxy-addr/README.md +1 -1
- package/node_modules/proxy-addr/index.js +32 -0
- package/node_modules/proxy-addr/package.json +8 -4
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/THREAT_MODEL.md +6 -4
- package/node_modules/qs/CHANGELOG.md +125 -0
- package/node_modules/qs/README.md +108 -9
- package/node_modules/qs/dist/qs.js +27 -27
- package/node_modules/qs/eslint.config.mjs +61 -49
- package/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/qs/lib/parse.js +188 -39
- package/node_modules/qs/lib/stringify.js +42 -18
- package/node_modules/qs/lib/utils.js +213 -24
- package/node_modules/qs/package.json +11 -10
- package/node_modules/qs/test/parse.js +977 -2
- package/node_modules/qs/test/stringify.js +898 -0
- package/node_modules/qs/test/utils.js +450 -2
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/type-is/index.js +8 -18
- package/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/type-is/package.json +9 -5
- package/package.json +1 -1
- package/node_modules/@hono/node-server/dist/conninfo.js +0 -42
- package/node_modules/@hono/node-server/dist/globals.d.mts +0 -2
- package/node_modules/@hono/node-server/dist/globals.d.ts +0 -2
- package/node_modules/@hono/node-server/dist/globals.js +0 -29
- package/node_modules/@hono/node-server/dist/globals.mjs +0 -5
- package/node_modules/@hono/node-server/dist/index.d.ts +0 -8
- package/node_modules/@hono/node-server/dist/index.js +0 -680
- package/node_modules/@hono/node-server/dist/listener.d.mts +0 -13
- package/node_modules/@hono/node-server/dist/listener.d.ts +0 -13
- package/node_modules/@hono/node-server/dist/listener.js +0 -648
- package/node_modules/@hono/node-server/dist/listener.mjs +0 -613
- package/node_modules/@hono/node-server/dist/request.d.mts +0 -25
- package/node_modules/@hono/node-server/dist/request.d.ts +0 -25
- package/node_modules/@hono/node-server/dist/request.js +0 -227
- package/node_modules/@hono/node-server/dist/request.mjs +0 -195
- package/node_modules/@hono/node-server/dist/response.d.mts +0 -26
- package/node_modules/@hono/node-server/dist/response.d.ts +0 -26
- package/node_modules/@hono/node-server/dist/response.js +0 -101
- package/node_modules/@hono/node-server/dist/response.mjs +0 -74
- package/node_modules/@hono/node-server/dist/serve-static.d.ts +0 -17
- package/node_modules/@hono/node-server/dist/serve-static.js +0 -177
- package/node_modules/@hono/node-server/dist/server.d.mts +0 -10
- package/node_modules/@hono/node-server/dist/server.d.ts +0 -10
- package/node_modules/@hono/node-server/dist/server.js +0 -674
- package/node_modules/@hono/node-server/dist/server.mjs +0 -638
- package/node_modules/@hono/node-server/dist/types.d.mts +0 -44
- package/node_modules/@hono/node-server/dist/types.d.ts +0 -44
- package/node_modules/@hono/node-server/dist/types.js +0 -18
- package/node_modules/@hono/node-server/dist/types.mjs +0 -0
- package/node_modules/@hono/node-server/dist/utils/response/constants.d.mts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response/constants.d.ts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response/constants.js +0 -30
- package/node_modules/@hono/node-server/dist/utils/response/constants.mjs +0 -5
- package/node_modules/@hono/node-server/dist/utils/response.d.ts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response.js +0 -37
- package/node_modules/@hono/node-server/dist/utils.d.mts +0 -9
- package/node_modules/@hono/node-server/dist/utils.d.ts +0 -9
- package/node_modules/@hono/node-server/dist/utils.js +0 -99
- package/node_modules/@hono/node-server/dist/utils.mjs +0 -71
- package/node_modules/@hono/node-server/dist/vercel.d.mts +0 -7
- package/node_modules/@hono/node-server/dist/vercel.d.ts +0 -7
- package/node_modules/@hono/node-server/dist/vercel.js +0 -655
- package/node_modules/@hono/node-server/dist/vercel.mjs +0 -618
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { RunwayError } from '../types.js';
|
|
2
|
+
import { IMAGE_TO_VIDEO, TEXT_TO_VIDEO, TEXT_TO_IMAGE } from './resold-specs.generated.js';
|
|
3
|
+
// Models Runway resells from other makers. Each one rejects request fields it
|
|
4
|
+
// does not list (the API's schemas set additionalProperties: false), so the
|
|
5
|
+
// connector sends a resold model only the fields its own spec allows, and
|
|
6
|
+
// refuses any other option with a plain message naming the model, before any
|
|
7
|
+
// upload or request. The fields and limits come from Runway's published API
|
|
8
|
+
// spec (resold-specs.generated.ts); the defaults and prices below are typed by
|
|
9
|
+
// hand from Runway's pricing guide (docs.dev.runwayml.com/guides/pricing).
|
|
10
|
+
// These models were added from the documentation and never called (FOX-12868),
|
|
11
|
+
// so a mistake here fails for that one model only.
|
|
12
|
+
export const RESOLD_VIDEO_MODELS = [
|
|
13
|
+
'kling_4', 'kling_4_flash', 'seedance2_5', 'seedance2_5_flash', 'gemini_omni_flash_1.2', 'hailuo3', 'h3_max',
|
|
14
|
+
'wan3', 'wan3_prime', 'grok_imagine_1_5', 'grok_imagine_1_5_lite', 'happyhorse_1_0',
|
|
15
|
+
];
|
|
16
|
+
export const RESOLD_IMAGE_MODELS = [
|
|
17
|
+
'gemini_image3_pro', 'gpt_image_2_6_sunburst', 'gpt_image_2_6_flare', 'gemini_image3.1_flash', 'gemini_image3.1_flash_lite',
|
|
18
|
+
'nano_banana_2.1', 'seedream5.5', 'minimax_h3_image', 'ideogram_4_5', 'grok_imagine_image_2', 'muse_image', 'bria_fibo_1_5',
|
|
19
|
+
];
|
|
20
|
+
export function isResoldVideoModel(model) {
|
|
21
|
+
return RESOLD_VIDEO_MODELS.includes(model);
|
|
22
|
+
}
|
|
23
|
+
export function isResoldImageModel(model) {
|
|
24
|
+
return RESOLD_IMAGE_MODELS.includes(model);
|
|
25
|
+
}
|
|
26
|
+
export function videoSpec(model, kind) {
|
|
27
|
+
return (kind === 'image' ? IMAGE_TO_VIDEO : TEXT_TO_VIDEO)[model];
|
|
28
|
+
}
|
|
29
|
+
// ── Price tiers ────────────────────────────────────────────────────────
|
|
30
|
+
// Runway prices a ratio by the resolution it belongs to. A ratio named auto_<tier>
|
|
31
|
+
// is that tier; any other W:H is the tier nearest its pixel count (checked
|
|
32
|
+
// against every listed ratio in resold-models.test.ts), unless overridden.
|
|
33
|
+
const VIDEO_TIER_PIXELS = {
|
|
34
|
+
'360p': 640 * 360, '480p': 854 * 480, '720p': 1280 * 720, '768p': 1366 * 768, '1080p': 1920 * 1080, '2k': 2560 * 1440, '4k': 3840 * 2160,
|
|
35
|
+
};
|
|
36
|
+
const IMAGE_TIER_PIXELS = {
|
|
37
|
+
'512': 512 * 512, '1k': 1024 * 1024, '1.5k': 1536 * 1536, '2k': 2048 * 2048, '4k': 4096 * 4096,
|
|
38
|
+
};
|
|
39
|
+
export function tierOf(ratio, tiers, pixels, overrides = {}) {
|
|
40
|
+
if (overrides[ratio])
|
|
41
|
+
return overrides[ratio];
|
|
42
|
+
if (tiers.length === 1)
|
|
43
|
+
return tiers[0];
|
|
44
|
+
const named = ratio.match(/^auto_(.+)$/)?.[1];
|
|
45
|
+
if (named && tiers.includes(named))
|
|
46
|
+
return named;
|
|
47
|
+
const [w, h] = ratio.split(':').map(Number);
|
|
48
|
+
const distance = (tier) => Math.abs(Math.log((w * h) / pixels[tier]));
|
|
49
|
+
return tiers.reduce((best, tier) => (distance(tier) < distance(best) ? tier : best));
|
|
50
|
+
}
|
|
51
|
+
const WIDE = { image: { ratio: 'auto_720p' }, text: { ratio: '1280:720' } };
|
|
52
|
+
export const VIDEO_PRICING = {
|
|
53
|
+
// List price; Runway charges 20% less until 30 Nov 2026.
|
|
54
|
+
kling_4: { ...WIDE, rates: { '720p': 15.7, '1080p': 23.5 } },
|
|
55
|
+
kling_4_flash: { ...WIDE, rates: { '720p': 9.4 }, minimum: 29 },
|
|
56
|
+
seedance2_5: { image: { ratio: '1280:720' }, text: { ratio: '1280:720' }, rates: { '480p': 20, '720p': 30, '1080p': 68, '4k': 110 }, minimum: 80 },
|
|
57
|
+
seedance2_5_flash: { image: { ratio: '1280:720' }, text: { ratio: '1280:720' }, rates: { '480p': 13, '720p': 20 }, minimum: 52 },
|
|
58
|
+
'gemini_omni_flash_1.2': { image: { ratio: '1280:720' }, text: { ratio: '1280:720' }, rates: { '360p': 2, '720p': 7, '1080p': 10, '4k': 21 }, minimum: 6, perFrame: 1 },
|
|
59
|
+
hailuo3: { image: { ratio: 'adaptive', resolution: '768p' }, text: { ratio: '16:9', resolution: '768p' }, rates: { '768p': 10, '2k': 15 }, perFrame: 2 },
|
|
60
|
+
h3_max: { image: { resolution: '768p' }, text: { resolution: '768p' }, rates: { '480p': 5, '768p': 8 } },
|
|
61
|
+
// Runway: keyframe image-to-video requests must use an auto_ ratio, which follows the first frame.
|
|
62
|
+
wan3: { ...WIDE, rates: { '480p': 5, '720p': 10, '1080p': 20 }, imageRatios: ['auto_480p', 'auto_720p', 'auto_1080p'] },
|
|
63
|
+
wan3_prime: { ...WIDE, rates: { '480p': 6.8, '720p': 14, '1080p': 28 }, imageRatios: ['auto_480p', 'auto_720p', 'auto_1080p'] },
|
|
64
|
+
grok_imagine_1_5: { image: { resolution: '720p' }, text: { ratio: '16:9', resolution: '720p' }, rates: { '480p': 10, '720p': 16, '1080p': 29 }, perFrame: 1 },
|
|
65
|
+
// Runway lists 720:720 with the 720p sizes.
|
|
66
|
+
grok_imagine_1_5_lite: { ...WIDE, rates: { '480p': 2, '720p': 3, '1080p': 14 }, perFrame: 1, tierOverrides: { '720:720': '720p' } },
|
|
67
|
+
happyhorse_1_0: { image: { resolution: '720p' }, text: { ratio: '1280:720' }, rates: { '720p': 15, '1080p': 30 } },
|
|
68
|
+
};
|
|
69
|
+
const VIDEO_OPTIONS = { audio: 'audio', seed: 'seed', negative_prompt: 'negativePrompt', content_moderation: 'contentModeration' };
|
|
70
|
+
function refuse(message, hint) {
|
|
71
|
+
throw new RunwayError(message, 'INVALID_INPUT', hint);
|
|
72
|
+
}
|
|
73
|
+
function checkPrompt(model, spec, prompt) {
|
|
74
|
+
if (prompt === undefined) {
|
|
75
|
+
if (spec.promptRequired)
|
|
76
|
+
refuse(`${model} needs a prompt here.`, 'Pass prompt_text describing the video or image.');
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const max = spec.maxPrompt ?? Infinity;
|
|
80
|
+
if (prompt.length < spec.minPrompt || prompt.length > max) {
|
|
81
|
+
refuse(`Prompt is ${prompt.length} characters; ${model} takes ${spec.minPrompt} to ${max}.`, prompt.length > max ? `Shorten the prompt to ${max} characters or fewer.` : `Write a prompt of at least ${spec.minPrompt} characters.`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function pick(model, name, given, fallback, allowed) {
|
|
85
|
+
if (allowed.length === 0) {
|
|
86
|
+
if (given !== undefined)
|
|
87
|
+
refuse(`${model} does not take a ${name} here.`, `Leave ${name} out when using ${model}.`);
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
const value = given ?? fallback;
|
|
91
|
+
if (value === undefined || !allowed.includes(value)) {
|
|
92
|
+
refuse(`${model} does not support ${name} ${value} here.`, `Use one of: ${allowed.join(', ')}.`);
|
|
93
|
+
}
|
|
94
|
+
return value;
|
|
95
|
+
}
|
|
96
|
+
function checkSeed(model, spec, seed) {
|
|
97
|
+
const max = spec.seedMax ?? 4294967295;
|
|
98
|
+
if (typeof seed !== 'number' || !Number.isInteger(seed) || seed < 0 || seed > max) {
|
|
99
|
+
refuse(`${model} takes a seed from 0 to ${max}; got ${seed}.`, `Pick a seed from 0 to ${max}, or leave it out.`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Check a resold model's prompt, ratio, resolution, duration, frames and options,
|
|
104
|
+
* and return the body fields to send (besides model, promptImage and promptText)
|
|
105
|
+
* with the estimated credits. Throws INVALID_INPUT, naming the model, for
|
|
106
|
+
* anything its spec does not allow, before any request is made.
|
|
107
|
+
*/
|
|
108
|
+
export function resoldVideoFields(model, kind, args) {
|
|
109
|
+
const spec = videoSpec(model, kind);
|
|
110
|
+
const pricing = VIDEO_PRICING[model];
|
|
111
|
+
const defaults = pricing[kind];
|
|
112
|
+
checkPrompt(model, spec, args.prompt_text);
|
|
113
|
+
if (kind === 'text' && args.ratio === 'adaptive') {
|
|
114
|
+
refuse(`${model} takes ratio adaptive only from an image.`, `Pick a fixed ratio: ${spec.ratios.filter((r) => r !== 'adaptive').join(', ')}.`);
|
|
115
|
+
}
|
|
116
|
+
const ratio = pick(model, 'ratio', args.ratio, defaults.ratio, (kind === 'image' && pricing.imageRatios) || spec.ratios);
|
|
117
|
+
const resolution = pick(model, 'resolution', args.resolution, defaults.resolution, spec.resolutions);
|
|
118
|
+
const duration = args.duration ?? 5;
|
|
119
|
+
const range = spec.duration ?? { min: 5, max: 5 };
|
|
120
|
+
if (!Number.isInteger(duration) || duration < range.min || duration > range.max) {
|
|
121
|
+
refuse(`${model} takes a whole number of seconds from ${range.min} to ${range.max}; got ${duration}.`, `Pick a duration from ${range.min} to ${range.max} seconds.`);
|
|
122
|
+
}
|
|
123
|
+
if (args.last_frame_image !== undefined && !spec.lastFrame) {
|
|
124
|
+
refuse(`${model} takes only a first frame, not a last frame.`, `Leave last_frame_image out when using ${model}.`);
|
|
125
|
+
}
|
|
126
|
+
const fields = { duration };
|
|
127
|
+
if (ratio !== undefined)
|
|
128
|
+
fields.ratio = ratio;
|
|
129
|
+
if (resolution !== undefined)
|
|
130
|
+
fields.resolution = resolution;
|
|
131
|
+
for (const option of Object.keys(VIDEO_OPTIONS)) {
|
|
132
|
+
const value = args[option];
|
|
133
|
+
if (value === undefined || (option === 'content_moderation' && value === 'auto'))
|
|
134
|
+
continue;
|
|
135
|
+
const key = VIDEO_OPTIONS[option];
|
|
136
|
+
if (!spec.fields.includes(key))
|
|
137
|
+
refuse(`${model} does not accept ${option}.`, `Leave ${option} out when using ${model}.`);
|
|
138
|
+
if (option === 'seed')
|
|
139
|
+
checkSeed(model, spec, value);
|
|
140
|
+
fields[key] = option === 'content_moderation' ? { publicFigureThreshold: value } : value;
|
|
141
|
+
}
|
|
142
|
+
const tier = resolution ?? tierOf(ratio ?? '', Object.keys(pricing.rates), VIDEO_TIER_PIXELS, pricing.tierOverrides);
|
|
143
|
+
const frames = kind === 'image' ? (args.last_frame_image !== undefined ? 2 : 1) : 0;
|
|
144
|
+
const credits = Math.max(pricing.minimum ?? 0, Math.ceil(pricing.rates[tier] * duration + frames * (pricing.perFrame ?? 0)));
|
|
145
|
+
return { fields, duration, credits };
|
|
146
|
+
}
|
|
147
|
+
// ── Images ─────────────────────────────────────────────────────────────
|
|
148
|
+
// GPT Image 2.6 at the default high quality, by tier and shape (Runway's
|
|
149
|
+
// pricing guide). Each tier lists its ten ratios in this shape order.
|
|
150
|
+
const GPT_IMAGE_2_6_SHAPES = ['21:9', '16:9', '3:2', '4:3', '5:4', '1:1', '5:4', '4:3', '3:2', '16:9'];
|
|
151
|
+
const GPT_IMAGE_2_6_HIGH = [
|
|
152
|
+
{ '1:1': 11, '5:4': 8, '4:3': 7, '3:2': 6, '16:9': 5, '21:9': 4 },
|
|
153
|
+
{ '1:1': 16, '5:4': 11, '4:3': 10, '3:2': 8, '16:9': 6, '21:9': 5 },
|
|
154
|
+
{ '1:1': 19, '5:4': 15, '4:3': 14, '3:2': 13, '16:9': 11, '21:9': 7 },
|
|
155
|
+
];
|
|
156
|
+
function gptImage26Credits(ratio, references) {
|
|
157
|
+
const index = TEXT_TO_IMAGE.gpt_image_2_6_flare.ratios.indexOf(ratio);
|
|
158
|
+
// With ratio "auto", Runway charges 19 credits up front at high quality.
|
|
159
|
+
const perImage = ratio === 'auto' || index < 0 ? 19 : GPT_IMAGE_2_6_HIGH[Math.floor(index / 10)][GPT_IMAGE_2_6_SHAPES[index % 10]];
|
|
160
|
+
return perImage + references;
|
|
161
|
+
}
|
|
162
|
+
// MiniMax H3 Image at the default (not highspeed): credits by reference count (row) and 1K, 2K, 4K.
|
|
163
|
+
const MINIMAX_H3_IMAGE = [
|
|
164
|
+
[3, 3, 7], [3, 3, 8], [4, 4, 8], [4, 5, 8], [5, 5, 9], [6, 6, 10], [6, 7, 11], [7, 8, 11], [8, 8, 12],
|
|
165
|
+
[9, 9, 13], [9, 10, 14], [10, 11, 14], [11, 12, 15], [12, 12, 16], [12, 13, 17], [13, 14, 18], [14, 15, 18],
|
|
166
|
+
];
|
|
167
|
+
/** Credits per image by tier, from the ratio's pixel count. */
|
|
168
|
+
const byTier = (table) => (ratio) => table[tierOf(ratio, Object.keys(table), IMAGE_TIER_PIXELS)];
|
|
169
|
+
export const IMAGE_PRICING = {
|
|
170
|
+
gemini_image3_pro: { defaultRatio: '1344:768', credits: byTier({ '1k': 20, '2k': 20, '4k': 40 }) },
|
|
171
|
+
// Runway lists both 2.6 variants with one description and one price table.
|
|
172
|
+
gpt_image_2_6_sunburst: { defaultRatio: '1920:1088', credits: gptImage26Credits },
|
|
173
|
+
gpt_image_2_6_flare: { defaultRatio: '1920:1088', credits: gptImage26Credits },
|
|
174
|
+
'gemini_image3.1_flash': { defaultRatio: '1344:768', credits: byTier({ '512': 5, '1k': 7, '2k': 11, '4k': 16 }) },
|
|
175
|
+
'gemini_image3.1_flash_lite': { defaultRatio: '1376:768', credits: () => 4 },
|
|
176
|
+
'nano_banana_2.1': { defaultRatio: '1376:768', credits: byTier({ '1k': 4, '2k': 6, '4k': 12 }) },
|
|
177
|
+
'seedream5.5': { defaultRatio: '1424:800', credits: (ratio, refs) => Math.ceil(byTier({ '1k': 2, '1.5k': 2, '2k': 4 })(ratio) + refs * 0.8) },
|
|
178
|
+
minimax_h3_image: { defaultRatio: '1376:768', credits: (ratio, refs) => MINIMAX_H3_IMAGE[refs][['1k', '2k', '4k'].indexOf(tierOf(ratio, ['1k', '2k', '4k'], IMAGE_TIER_PIXELS))] },
|
|
179
|
+
// Runway's default quality: medium with reference images, high without.
|
|
180
|
+
ideogram_4_5: {
|
|
181
|
+
defaultRatio: '1280:720',
|
|
182
|
+
credits: (_ratio, refs) => (refs > 0 ? 8 : 25),
|
|
183
|
+
withReferences: { '1280:720': '1024:576', '720:1280': '576:1024', '1440:720': '1408:704', '720:1440': '704:1408' },
|
|
184
|
+
},
|
|
185
|
+
// Default quality medium; 1 credit per reference image.
|
|
186
|
+
grok_imagine_image_2: { defaultRatio: '1280:720', credits: (ratio, refs) => byTier({ '1k': 6, '2k': 8 })(ratio) + refs },
|
|
187
|
+
muse_image: { defaultRatio: '2016:1152', credits: () => 1 },
|
|
188
|
+
// 1MP and 4MP sizes.
|
|
189
|
+
bria_fibo_1_5: { defaultRatio: '1024:576', credits: byTier({ '1k': 5, '2k': 10 }) },
|
|
190
|
+
};
|
|
191
|
+
const REFERENCE_TAG = /^[a-z][a-z0-9_]{2,15}$/;
|
|
192
|
+
/** Check a resold image model's prompt, ratio, references and options; throws INVALID_INPUT naming the model. */
|
|
193
|
+
export function resoldImageFields(model, args) {
|
|
194
|
+
const spec = TEXT_TO_IMAGE[model];
|
|
195
|
+
const pricing = IMAGE_PRICING[model];
|
|
196
|
+
checkPrompt(model, spec, args.prompt_text);
|
|
197
|
+
const max = spec.maxReferences ?? 0;
|
|
198
|
+
if (args.references.length > max) {
|
|
199
|
+
refuse(`${model} takes at most ${max} reference images; got ${args.references.length}.`, `Pass ${max} reference images or fewer.`);
|
|
200
|
+
}
|
|
201
|
+
const tags = args.references.flatMap((r) => (r.tag === undefined ? [] : [r.tag]));
|
|
202
|
+
if (tags.length > 0 && !spec.referenceTags) {
|
|
203
|
+
refuse(`${model} does not take reference tags.`, 'Leave the tags out and refer to reference images by order ("the first image").');
|
|
204
|
+
}
|
|
205
|
+
const badTag = tags.find((tag) => !REFERENCE_TAG.test(tag));
|
|
206
|
+
if (badTag !== undefined) {
|
|
207
|
+
refuse(`${model} does not accept the reference tag "${badTag}".`, 'A tag is 3-16 characters: a lowercase letter, then lowercase letters, digits or underscores.');
|
|
208
|
+
}
|
|
209
|
+
if (new Set(tags).size !== tags.length) {
|
|
210
|
+
refuse(`${model} needs a different tag on each reference image.`, 'Give each reference image its own tag, or leave tags out.');
|
|
211
|
+
}
|
|
212
|
+
const swap = pricing.withReferences ?? {};
|
|
213
|
+
const withRefs = args.references.length > 0;
|
|
214
|
+
const allowed = spec.ratios.filter((r) => !(withRefs ? r in swap : Object.values(swap).includes(r)));
|
|
215
|
+
const fallback = withRefs ? (swap[pricing.defaultRatio] ?? pricing.defaultRatio) : pricing.defaultRatio;
|
|
216
|
+
const ratio = pick(model, 'ratio', args.ratio, fallback, allowed);
|
|
217
|
+
const fields = {};
|
|
218
|
+
if (args.seed !== undefined) {
|
|
219
|
+
if (!spec.fields.includes('seed'))
|
|
220
|
+
refuse(`${model} does not accept seed.`, `Leave seed out when using ${model}.`);
|
|
221
|
+
checkSeed(model, spec, args.seed);
|
|
222
|
+
fields.seed = args.seed;
|
|
223
|
+
}
|
|
224
|
+
if (args.content_moderation !== undefined && args.content_moderation !== 'auto') {
|
|
225
|
+
if (!spec.fields.includes('contentModeration'))
|
|
226
|
+
refuse(`${model} does not accept content_moderation.`, `Leave content_moderation out when using ${model}.`);
|
|
227
|
+
fields.contentModeration = { publicFigureThreshold: args.content_moderation };
|
|
228
|
+
}
|
|
229
|
+
return { ratio, fields, credits: pricing.credits(ratio, args.references.length) };
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=resold-models.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ResoldFieldSpec {
|
|
2
|
+
/** Request fields the model accepts, besides model. Anything else is refused by Runway. */
|
|
3
|
+
fields: readonly string[];
|
|
4
|
+
promptRequired: boolean;
|
|
5
|
+
minPrompt: number;
|
|
6
|
+
maxPrompt: number | null;
|
|
7
|
+
/** Allowed ratios; empty when the model takes no ratio here. */
|
|
8
|
+
ratios: readonly string[];
|
|
9
|
+
/** Allowed resolutions, lowercased; empty when the model takes none. */
|
|
10
|
+
resolutions: readonly string[];
|
|
11
|
+
duration?: {
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
};
|
|
15
|
+
seedMax?: number;
|
|
16
|
+
/** Image-to-video: whether promptImage may carry a last frame as well as the first. */
|
|
17
|
+
lastFrame?: boolean;
|
|
18
|
+
maxReferences?: number;
|
|
19
|
+
referenceTags?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const IMAGE_TO_VIDEO: Record<string, ResoldFieldSpec>;
|
|
22
|
+
export declare const TEXT_TO_VIDEO: Record<string, ResoldFieldSpec>;
|
|
23
|
+
export declare const TEXT_TO_IMAGE: Record<string, ResoldFieldSpec>;
|
|
24
|
+
//# sourceMappingURL=resold-specs.generated.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Generated by scripts/generate-resold-specs.mjs from Runway's published API spec. Do not edit by hand.
|
|
2
|
+
// Source: https://docs.dev.runwayml.com/openapi.json, version 2024-11-06, sha256 a617495a5ebb91c0bb0d1a4476115d9cd1f3c262100859c00eda15b856465221.
|
|
3
|
+
// The models were read from the documentation, never called (FOX-12868).
|
|
4
|
+
export const IMAGE_TO_VIDEO = {
|
|
5
|
+
"kling_4": { "fields": ["duration", "promptImage", "promptText", "ratio", "referenceVideos", "references"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 26000, "ratios": ["auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 3, "max": 30 }, "lastFrame": true },
|
|
6
|
+
"kling_4_flash": { "fields": ["duration", "promptImage", "promptText", "ratio", "referenceVideos", "references"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 26000, "ratios": ["auto_720p"], "resolutions": [], "duration": { "min": 3, "max": 20 }, "lastFrame": false },
|
|
7
|
+
"seedance2_5": { "fields": ["audio", "draft", "duration", "outputFormat", "promptImage", "promptText", "ratio", "referenceAudio", "seed"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 15000, "ratios": ["992:432", "854:480", "752:560", "640:640", "560:752", "480:854", "1470:630", "1280:720", "1112:834", "960:960", "834:1112", "720:1280", "2206:946", "1920:1080", "1664:1248", "1440:1440", "1248:1664", "1080:1920", "3840:1646", "3840:2160", "3840:2880", "3840:3840", "2880:3840", "2160:3840"], "resolutions": [], "duration": { "min": 4, "max": 30 }, "seedMax": 4294967295, "lastFrame": true },
|
|
8
|
+
"seedance2_5_flash": { "fields": ["audio", "duration", "outputFormat", "promptImage", "promptText", "ratio", "referenceAudio", "seed"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 15000, "ratios": ["992:432", "854:480", "752:560", "640:640", "560:752", "480:854", "1470:630", "1280:720", "1112:834", "960:960", "834:1112", "720:1280"], "resolutions": [], "duration": { "min": 4, "max": 30 }, "seedMax": 4294967295, "lastFrame": true },
|
|
9
|
+
"gemini_omni_flash_1.2": { "fields": ["duration", "promptImage", "promptText", "ratio"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 4000, "ratios": ["640:360", "360:640", "1280:720", "720:1280", "1920:1080", "1080:1920", "3840:2160", "2160:3840"], "resolutions": [], "duration": { "min": 3, "max": 15 }, "lastFrame": true },
|
|
10
|
+
"hailuo3": { "fields": ["duration", "promptImage", "promptText", "ratio", "referenceAudio", "resolution"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 6000, "ratios": ["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "resolutions": ["768p", "2k"], "duration": { "min": 5, "max": 15 }, "lastFrame": true },
|
|
11
|
+
"h3_max": { "fields": ["duration", "promptExpansionMode", "promptImage", "promptText", "resolution", "seed"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 6000, "ratios": [], "resolutions": ["480p", "768p"], "duration": { "min": 5, "max": 15 }, "seedMax": 4294967295, "lastFrame": true },
|
|
12
|
+
"wan3": { "fields": ["audio", "duration", "promptImage", "promptText", "ratio", "referenceAudio", "referenceVideos"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 20000, "ratios": ["832:480", "720:544", "624:624", "544:720", "480:832", "1280:720", "1104:832", "960:960", "832:1104", "720:1280", "1920:1080", "1648:1248", "1440:1440", "1248:1648", "1080:1920", "auto_480p", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 2, "max": 30 }, "lastFrame": true },
|
|
13
|
+
"wan3_prime": { "fields": ["audio", "duration", "promptImage", "promptText", "ratio", "referenceAudio", "referenceVideos"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 20000, "ratios": ["832:480", "720:544", "624:624", "544:720", "480:832", "1280:720", "1104:832", "960:960", "832:1104", "720:1280", "1920:1080", "1648:1248", "1440:1440", "1248:1648", "1080:1920", "auto_480p", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 2, "max": 30 }, "lastFrame": true },
|
|
14
|
+
"grok_imagine_1_5": { "fields": ["duration", "promptImage", "promptText", "resolution"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 2500, "ratios": [], "resolutions": ["480p", "720p", "1080p"], "duration": { "min": 1, "max": 15 }, "lastFrame": false },
|
|
15
|
+
"grok_imagine_1_5_lite": { "fields": ["duration", "promptImage", "promptText", "ratio"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 2500, "ratios": ["auto_480p", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 1, "max": 15 }, "lastFrame": false },
|
|
16
|
+
"happyhorse_1_0": { "fields": ["duration", "promptImage", "promptText", "resolution"], "promptRequired": false, "minPrompt": 2, "maxPrompt": 2500, "ratios": [], "resolutions": ["720p", "1080p"], "duration": { "min": 3, "max": 15 }, "lastFrame": false },
|
|
17
|
+
};
|
|
18
|
+
export const TEXT_TO_VIDEO = {
|
|
19
|
+
"kling_4": { "fields": ["duration", "promptText", "ratio", "referenceVideos", "references"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 26000, "ratios": ["1280:720", "720:1280", "940:940", "1460:624", "1920:1080", "1080:1920", "1440:1440", "2200:940", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 3, "max": 30 } },
|
|
20
|
+
"kling_4_flash": { "fields": ["duration", "promptText", "ratio", "referenceVideos", "references"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 26000, "ratios": ["1280:720", "720:1280", "960:960", "1464:628", "auto_720p", "940:940", "1460:624"], "resolutions": [], "duration": { "min": 3, "max": 20 } },
|
|
21
|
+
"seedance2_5": { "fields": ["audio", "draft", "draftTaskId", "duration", "outputFormat", "promptText", "ratio", "referenceAudio", "referenceVideos", "references", "seed"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 15000, "ratios": ["992:432", "854:480", "752:560", "640:640", "560:752", "480:854", "1470:630", "1280:720", "1112:834", "960:960", "834:1112", "720:1280", "2206:946", "1920:1080", "1664:1248", "1440:1440", "1248:1664", "1080:1920", "3840:1646", "3840:2160", "3840:2880", "3840:3840", "2880:3840", "2160:3840"], "resolutions": [], "duration": { "min": 4, "max": 30 }, "seedMax": 4294967295 },
|
|
22
|
+
"seedance2_5_flash": { "fields": ["audio", "duration", "outputFormat", "promptText", "ratio", "referenceAudio", "referenceVideos", "references", "seed"], "promptRequired": false, "minPrompt": 1, "maxPrompt": 15000, "ratios": ["992:432", "854:480", "752:560", "640:640", "560:752", "480:854", "1470:630", "1280:720", "1112:834", "960:960", "834:1112", "720:1280"], "resolutions": [], "duration": { "min": 4, "max": 30 }, "seedMax": 4294967295 },
|
|
23
|
+
"gemini_omni_flash_1.2": { "fields": ["duration", "promptText", "ratio", "referenceVideos", "references"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 4000, "ratios": ["640:360", "360:640", "1280:720", "720:1280", "1920:1080", "1080:1920", "3840:2160", "2160:3840"], "resolutions": [], "duration": { "min": 3, "max": 15 } },
|
|
24
|
+
"hailuo3": { "fields": ["duration", "promptText", "ratio", "referenceAudio", "referenceVideos", "references", "resolution"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 6000, "ratios": ["adaptive", "21:9", "16:9", "4:3", "1:1", "3:4", "9:16"], "resolutions": ["768p", "2k"], "duration": { "min": 5, "max": 15 } },
|
|
25
|
+
"h3_max": { "fields": ["duration", "promptExpansionMode", "promptText", "resolution", "seed"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 6000, "ratios": [], "resolutions": ["480p", "768p"], "duration": { "min": 5, "max": 15 }, "seedMax": 4294967295 },
|
|
26
|
+
"wan3": { "fields": ["audio", "duration", "promptText", "ratio", "referenceAudio", "referenceVideos", "references"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 20000, "ratios": ["832:480", "720:544", "624:624", "544:720", "480:832", "1280:720", "1104:832", "960:960", "832:1104", "720:1280", "1920:1080", "1648:1248", "1440:1440", "1248:1648", "1080:1920", "auto_480p", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 2, "max": 30 } },
|
|
27
|
+
"wan3_prime": { "fields": ["audio", "duration", "promptText", "ratio", "referenceAudio", "referenceVideos", "references"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 20000, "ratios": ["832:480", "720:544", "624:624", "544:720", "480:832", "1280:720", "1104:832", "960:960", "832:1104", "720:1280", "1920:1080", "1648:1248", "1440:1440", "1248:1648", "1080:1920", "auto_480p", "auto_720p", "auto_1080p"], "resolutions": [], "duration": { "min": 2, "max": 30 } },
|
|
28
|
+
"grok_imagine_1_5": { "fields": ["duration", "promptText", "ratio", "referenceAudio", "references", "resolution"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 2500, "ratios": ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"], "resolutions": ["480p", "720p", "1080p"], "duration": { "min": 1, "max": 15 } },
|
|
29
|
+
"grok_imagine_1_5_lite": { "fields": ["duration", "promptText", "ratio"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 2500, "ratios": ["848:480", "480:848", "480:480", "640:480", "480:640", "720:480", "480:720", "1280:720", "720:1280", "720:720", "960:720", "720:960", "1088:720", "720:1088", "1904:1072", "1072:1904", "1424:1424", "1648:1232", "1232:1648", "1744:1152", "1152:1744"], "resolutions": [], "duration": { "min": 1, "max": 15 } },
|
|
30
|
+
"happyhorse_1_0": { "fields": ["duration", "promptText", "ratio"], "promptRequired": true, "minPrompt": 2, "maxPrompt": 2500, "ratios": ["1280:720", "720:1280", "960:960", "1108:832", "832:1108", "1920:1080", "1080:1920", "1440:1440", "1662:1248", "1248:1662"], "resolutions": [], "duration": { "min": 3, "max": 15 } },
|
|
31
|
+
};
|
|
32
|
+
export const TEXT_TO_IMAGE = {
|
|
33
|
+
"gemini_image3_pro": { "fields": ["outputCount", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 3, "maxPrompt": 45000, "ratios": ["1344:768", "768:1344", "1024:1024", "1184:864", "864:1184", "1536:672", "832:1248", "1248:832", "896:1152", "1152:896", "2048:2048", "1696:2528", "2528:1696", "1792:2400", "2400:1792", "1856:2304", "2304:1856", "1536:2752", "2752:1536", "3168:1344", "4096:4096", "3392:5056", "5056:3392", "3584:4800", "4800:3584", "3712:4608", "4608:3712", "3072:5504", "5504:3072", "6336:2688"], "resolutions": [], "maxReferences": 14, "referenceTags": true },
|
|
34
|
+
"gpt_image_2_6_sunburst": { "fields": ["background", "frameCount", "frameDurationMs", "outputCount", "outputFormat", "promptText", "quality", "ratio", "reasoningEffort", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 32000, "ratios": ["2048:880", "1920:1088", "1920:1280", "1920:1440", "1920:1536", "1920:1920", "1536:1920", "1440:1920", "1280:1920", "1088:1920", "2912:1248", "2560:1440", "2560:1712", "2560:1920", "2560:2048", "2560:2560", "2048:2560", "1920:2560", "1712:2560", "1440:2560", "3840:1648", "3840:2160", "3504:2336", "3264:2448", "3200:2560", "2880:2880", "2560:3200", "2448:3264", "2336:3504", "2160:3840", "auto"], "resolutions": [], "maxReferences": 16, "referenceTags": true },
|
|
35
|
+
"gpt_image_2_6_flare": { "fields": ["background", "frameCount", "frameDurationMs", "outputCount", "outputFormat", "promptText", "quality", "ratio", "reasoningEffort", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 32000, "ratios": ["2048:880", "1920:1088", "1920:1280", "1920:1440", "1920:1536", "1920:1920", "1536:1920", "1440:1920", "1280:1920", "1088:1920", "2912:1248", "2560:1440", "2560:1712", "2560:1920", "2560:2048", "2560:2560", "2048:2560", "1920:2560", "1712:2560", "1440:2560", "3840:1648", "3840:2160", "3504:2336", "3264:2448", "3200:2560", "2880:2880", "2560:3200", "2448:3264", "2336:3504", "2160:3840", "auto"], "resolutions": [], "maxReferences": 16, "referenceTags": true },
|
|
36
|
+
"gemini_image3.1_flash": { "fields": ["outputCount", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 45000, "ratios": ["512:512", "416:624", "624:416", "432:592", "592:432", "448:576", "576:448", "384:672", "672:384", "768:336", "256:1024", "1024:256", "176:1408", "1408:176", "1024:1024", "832:1248", "1248:832", "864:1184", "1184:864", "896:1152", "1152:896", "768:1344", "1344:768", "1536:672", "512:2048", "2048:512", "352:2816", "2816:352", "2048:2048", "1696:2528", "2528:1696", "1792:2400", "2400:1792", "1856:2304", "2304:1856", "1536:2752", "2752:1536", "3168:1344", "1024:4096", "4096:1024", "704:5632", "5632:704", "4096:4096", "3392:5056", "5056:3392", "3584:4800", "4800:3584", "3712:4608", "4608:3712", "3072:5504", "5504:3072", "6336:2688", "2048:8192", "8192:2048", "1408:11264", "11264:1408"], "resolutions": [], "maxReferences": 14, "referenceTags": true },
|
|
37
|
+
"gemini_image3.1_flash_lite": { "fields": ["outputCount", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 45000, "ratios": ["1024:1024", "848:1264", "1264:848", "896:1200", "1200:896", "928:1152", "1152:928", "768:1376", "1376:768", "1584:672"], "resolutions": [], "maxReferences": 14, "referenceTags": true },
|
|
38
|
+
"nano_banana_2.1": { "fields": ["outputCount", "promptText", "ratio", "referenceImages", "thinkingLevel"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 45000, "ratios": ["1024:1024", "848:1264", "1264:848", "896:1200", "1200:896", "928:1152", "1152:928", "768:1376", "1376:768", "1584:672", "512:2064", "2064:512", "352:2928", "2928:352", "2048:2048", "1696:2528", "2528:1696", "1792:2400", "2400:1792", "1856:2304", "2304:1856", "1536:2752", "2752:1536", "3168:1344", "1024:4128", "4128:1024", "704:5856", "5856:704", "4096:4096", "3392:5056", "5056:3392", "3584:4800", "4800:3584", "3712:4608", "4608:3712", "3072:5504", "5504:3072", "6336:2688", "2048:8256", "8256:2048", "1408:11712", "11712:1408"], "resolutions": [], "maxReferences": 14, "referenceTags": true },
|
|
39
|
+
"seedream5.5": { "fields": ["background", "outputCount", "outputFormat", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 4000, "ratios": ["1024:1024", "1152:864", "864:1152", "1424:800", "800:1424", "1248:832", "832:1248", "1568:672", "1536:1536", "1792:1344", "1344:1792", "2048:1152", "1152:2048", "1872:1248", "1248:1872", "2352:1008", "2048:2048", "2368:1776", "1776:2368", "2816:1584", "1584:2816", "2496:1664", "1664:2496", "3136:1344", "auto_1k", "auto_1.5k", "auto_2k"], "resolutions": [], "maxReferences": 10, "referenceTags": false },
|
|
40
|
+
"minimax_h3_image": { "fields": ["highspeed", "outputCount", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 32000, "ratios": ["1024:1024", "1152:928", "928:1152", "1184:896", "896:1184", "1248:832", "832:1248", "1376:768", "768:1376", "1440:736", "736:1440", "1568:672", "672:1568", "1760:576", "576:1760", "2048:2048", "2304:1824", "1824:2304", "2368:1760", "1760:2368", "2496:1664", "1664:2496", "2720:1536", "1536:2720", "2912:1440", "1440:2912", "3136:1344", "1344:3136", "3552:1184", "1184:3552", "4096:4096", "4576:3648", "3648:4576", "4736:3552", "3552:4736", "5024:3360", "3360:5024", "5472:3072", "3072:5472", "5792:2912", "2912:5792", "6272:2688", "2688:6272", "7104:2368", "2368:7104", "auto_1k", "auto_2k", "auto_4k"], "resolutions": [], "maxReferences": 16, "referenceTags": false },
|
|
41
|
+
"ideogram_4_5": { "fields": ["contextWindow", "maskUri", "outputCount", "preciseEdit", "promptText", "quality", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 10000, "ratios": ["1024:1024", "1280:720", "720:1280", "1152:864", "864:1152", "1248:832", "832:1248", "1120:896", "896:1120", "1440:720", "720:1440", "2048:2048", "2560:1440", "1440:2560", "2304:1728", "1728:2304", "2496:1664", "1664:2496", "2240:1792", "1792:2240", "2880:1440", "1440:2880", "1024:576", "576:1024", "1408:704", "704:1408", "auto"], "resolutions": [], "maxReferences": 5, "referenceTags": false },
|
|
42
|
+
"grok_imagine_image_2": { "fields": ["edit", "outputCount", "promptText", "quality", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 2500, "ratios": ["1024:1024", "1280:720", "720:1280", "1152:864", "864:1152", "1248:832", "832:1248", "1248:576", "576:1248", "1280:576", "576:1280", "1408:704", "704:1408", "2048:2048", "2816:1584", "1584:2816", "2368:1776", "1776:2368", "2496:1664", "1664:2496", "2912:1344", "1344:2912", "3200:1440", "1440:3200", "2912:1456", "1456:2912", "auto_1k", "auto_2k"], "resolutions": [], "maxReferences": 3, "referenceTags": false },
|
|
43
|
+
"muse_image": { "fields": ["outputCount", "outputFormat", "promptText", "ratio", "referenceImages"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 4000, "ratios": ["2352:1008", "2016:1152", "1920:1280", "1792:1344", "1600:1600", "1344:1792", "1280:1920", "1152:2016", "auto"], "resolutions": [], "maxReferences": 10, "referenceTags": false },
|
|
44
|
+
"bria_fibo_1_5": { "fields": ["outputFormat", "promptText", "ratio", "referenceImages", "seed"], "promptRequired": true, "minPrompt": 1, "maxPrompt": 10000, "ratios": ["1024:1024", "768:1152", "1152:768", "768:1024", "1024:768", "768:960", "960:768", "576:1024", "1024:576", "2048:2048", "1536:2304", "2304:1536", "1536:2048", "2048:1536", "1536:1920", "1920:1536", "1152:2048", "2048:1152"], "resolutions": [], "seedMax": 2147483647, "maxReferences": 1, "referenceTags": false },
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=resold-specs.generated.js.map
|
package/dist/tools/tasks.js
CHANGED
|
@@ -4,8 +4,15 @@ import { centralReadPath, fileReadContext } from '../file-read-context.js';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { runwayFetch, runwayRawFetch, validateDownloadUrl, assertDownloadPathInRoot, RUNWAY_API_SOURCE, } from '../client.js';
|
|
6
6
|
import { RunwayError } from '../types.js';
|
|
7
|
+
import { redactCredentials } from '../key-filter.js';
|
|
7
8
|
import { pathSegment, withErrorHandling } from '../utils.js';
|
|
8
9
|
import { wrapUntrusted } from '../untrusted-content.js';
|
|
10
|
+
/** Envelope a 2xx task's vendor text with any echoed API key removed first. */
|
|
11
|
+
function safeUpstreamText(text) {
|
|
12
|
+
if (text === undefined || text === null)
|
|
13
|
+
return undefined;
|
|
14
|
+
return wrapUntrusted(redactCredentials(text), RUNWAY_API_SOURCE);
|
|
15
|
+
}
|
|
9
16
|
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
10
17
|
export function registerTaskTools(server) {
|
|
11
18
|
// ── Check Task ────────────────────────────────────────────────────────
|
|
@@ -34,9 +41,8 @@ export function registerTaskTools(server) {
|
|
|
34
41
|
}
|
|
35
42
|
else if (result.status === 'FAILED') {
|
|
36
43
|
response.ok = false;
|
|
37
|
-
response.error = result.failure
|
|
38
|
-
|
|
39
|
-
response.failure_code = wrapUntrusted(result.failureCode, RUNWAY_API_SOURCE);
|
|
44
|
+
response.error = result.failure ? safeUpstreamText(result.failure) : 'Generation failed.';
|
|
45
|
+
response.failure_code = safeUpstreamText(result.failureCode);
|
|
40
46
|
}
|
|
41
47
|
return JSON.stringify(response);
|
|
42
48
|
}));
|
|
@@ -82,8 +88,8 @@ export function registerTaskTools(server) {
|
|
|
82
88
|
if (result.status === 'FAILED') {
|
|
83
89
|
return JSON.stringify({
|
|
84
90
|
ok: false, task_id: result.id, status: 'FAILED',
|
|
85
|
-
error: result.failure ?
|
|
86
|
-
failure_code:
|
|
91
|
+
error: result.failure ? safeUpstreamText(result.failure) : 'Generation failed.',
|
|
92
|
+
failure_code: safeUpstreamText(result.failureCode),
|
|
87
93
|
elapsed_seconds: Math.round((Date.now() - startTime) / 1000),
|
|
88
94
|
});
|
|
89
95
|
}
|
package/dist/tools/video.js
CHANGED
|
@@ -1,22 +1,49 @@
|
|
|
1
1
|
import { fileReadContext } from '../file-read-context.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { runwayFetch, resolveMediaInput, costEstimate, addContentModeration } from '../client.js';
|
|
4
|
+
import { RunwayError } from '../types.js';
|
|
4
5
|
import { withErrorHandling } from '../utils.js';
|
|
6
|
+
import { RESOLD_VIDEO_MODELS, isResoldVideoModel, resoldVideoFields } from './resold-models.js';
|
|
7
|
+
// Runway's own and Veo models keep the ratios they always took; each resold
|
|
8
|
+
// model's ratios are checked against its own spec in resold-models.ts.
|
|
9
|
+
const RUNWAY_IMAGE_RATIOS = ['1280:720', '720:1280', '960:960', '1104:832', '832:1104', '1584:672'];
|
|
10
|
+
const RUNWAY_TEXT_RATIOS = ['1280:720', '720:1280'];
|
|
11
|
+
function checkRunwayModel(model, ratio, allowed, resolution) {
|
|
12
|
+
if (!allowed.includes(ratio)) {
|
|
13
|
+
throw new RunwayError(`${model} does not support ratio ${ratio}.`, 'INVALID_INPUT', `Use one of: ${allowed.join(', ')}.`);
|
|
14
|
+
}
|
|
15
|
+
if (resolution !== undefined) {
|
|
16
|
+
throw new RunwayError(`${model} does not take a resolution; its ratio sets the size.`, 'INVALID_INPUT', `Leave resolution out when using ${model}.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Shown to the model choosing; every detail is checked in code before any request.
|
|
20
|
+
const RESOLD_VIDEO_GUIDE = 'kling_4 (Kling 4.0, 3-30s, up to 1080p), kling_4_flash (Kling 4.0 Flash, 720p, 3-20s, cheapest Kling), ' +
|
|
21
|
+
'seedance2_5 (Seedance 2.5, 4-30s, 480p to 4K, audio), seedance2_5_flash (480p/720p, audio), ' +
|
|
22
|
+
'gemini_omni_flash_1.2 (Google, 3-15s, 360p to 4K, needs a prompt), hailuo3 (MiniMax Hailuo 3, 5-15s, resolution 768p or 2k), ' +
|
|
23
|
+
'h3_max (MiniMax H3 Max, 5-15s, resolution 480p or 768p, no ratio), wan3 and wan3_prime (Wan 3, 2-30s, 480p to 1080p, audio), ' +
|
|
24
|
+
'grok_imagine_1_5 (xAI, 1-15s, resolution 480p to 1080p), grok_imagine_1_5_lite (1-15s, cheap), happyhorse_1_0 (3-15s, 720p/1080p). ' +
|
|
25
|
+
'Models made by others take only their own options; a wrong one is refused with the reason, nothing is charged. ' +
|
|
26
|
+
'Their prices are estimated from Runway\'s published rates.';
|
|
27
|
+
const RATIO_GUIDE = 'Output size or shape. Runway models default to 1280:720. Models made by others each take their own list ' +
|
|
28
|
+
'(e.g. auto_720p to follow the image, W:H sizes, or shapes like 16:9) and default to a 720p size; an unsupported one is refused with the list.';
|
|
29
|
+
const RESOLUTION_GUIDE = 'Only for hailuo3 (768p, 2k), h3_max (480p, 768p), grok_imagine_1_5 (480p, 720p, 1080p) and happyhorse_1_0 from an image (720p, 1080p). Defaults to 720p or 768p.';
|
|
5
30
|
export function registerVideoTools(server) {
|
|
6
31
|
// ── Image-to-Video ────────────────────────────────────────────────────
|
|
7
32
|
server.registerTool('generate_video_from_image', {
|
|
8
33
|
description: 'Animate a still image into a video. Supports first-frame (and optionally last-frame) keyframe control. ' +
|
|
9
|
-
'MODELS: gen4.5 (flagship), gen4_turbo (fast/cheap), veo3.1 (best quality + audio), veo3.1_fast
|
|
34
|
+
'MODELS: gen4.5 (flagship), gen4_turbo (fast/cheap), veo3.1 (best quality + audio), veo3.1_fast, ' +
|
|
35
|
+
RESOLD_VIDEO_GUIDE + ' Last frame: gen4/veo, kling_4, seedance2_5(_flash), gemini_omni_flash_1.2, hailuo3, h3_max, wan3(_prime). ' +
|
|
10
36
|
'WORKFLOW: Returns task_id → poll with check_runway_task or use wait_for_runway_task.',
|
|
11
37
|
_meta: { 'files/readInputs': { version: 1, inputs: [{ selector: ['prompt_image'], base: 'connectorCwd', expandTilde: false, nonLocalPrefixes: ['https://', 'data:', 'runway://'] }, { selector: ['last_frame_image'], base: 'connectorCwd', expandTilde: false, nonLocalPrefixes: ['https://', 'data:', 'runway://'] }] } },
|
|
12
38
|
inputSchema: z.object({
|
|
13
39
|
prompt_image: z.string().describe('First frame image. HTTPS URL, Runway URI, or local file path.'),
|
|
14
40
|
last_frame_image: z.string().optional().describe('Optional last frame image for transition.'),
|
|
15
|
-
prompt_text: z.string().optional().describe('Describe the desired motion.'),
|
|
16
|
-
model: z.enum(['gen4.5', 'gen4_turbo', 'veo3.1', 'veo3.1_fast']).optional().describe('Default: gen4_turbo.'),
|
|
17
|
-
ratio: z.
|
|
18
|
-
|
|
19
|
-
|
|
41
|
+
prompt_text: z.string().optional().describe('Describe the desired motion. Required for gemini_omni_flash_1.2, hailuo3, h3_max, wan3 and wan3_prime. kling_4 takes up to 26000 characters, wan3 20000, seedance2_5 15000.'),
|
|
42
|
+
model: z.enum(['gen4.5', 'gen4_turbo', 'veo3.1', 'veo3.1_fast', ...RESOLD_VIDEO_MODELS]).optional().describe('Default: gen4_turbo.'),
|
|
43
|
+
ratio: z.string().optional().describe(`${RATIO_GUIDE} gen4/veo: 1280:720, 720:1280, 960:960, 1104:832, 832:1104, 1584:672.`),
|
|
44
|
+
resolution: z.enum(['480p', '720p', '768p', '1080p', '2k']).optional().describe(RESOLUTION_GUIDE),
|
|
45
|
+
duration: z.number().optional().describe('Seconds. gen4: 2-10 (default 5). veo: 4,6,8 (default 8). Models made by others: their own range (default 5).'),
|
|
46
|
+
audio: z.boolean().optional().describe('Generate audio (veo, seedance2_5(_flash), wan3(_prime)). Default: true.'),
|
|
20
47
|
negative_prompt: z.string().max(1000).optional().describe('What should NOT appear in the output (veo models only, max 1000 chars). Omit to use the default negative prompt.'),
|
|
21
48
|
content_moderation: z.enum(['auto', 'low']).optional().describe('Public figure threshold.'),
|
|
22
49
|
seed: z.number().int().optional().describe('Random seed (0-4294967295) for reproducibility.'),
|
|
@@ -25,8 +52,14 @@ export function registerVideoTools(server) {
|
|
|
25
52
|
}, withErrorHandling(async (args, extra) => {
|
|
26
53
|
const reads = fileReadContext(server.server.getClientCapabilities(), extra);
|
|
27
54
|
const model = args.model || 'gen4_turbo';
|
|
55
|
+
// Checked before any upload or request, so a wrong option fails for this model only.
|
|
56
|
+
const resold = isResoldVideoModel(model)
|
|
57
|
+
? resoldVideoFields(model, 'image', { ...args, prompt_text: args.prompt_text || undefined, last_frame_image: args.last_frame_image || undefined })
|
|
58
|
+
: undefined;
|
|
28
59
|
const isRunwayModel = ['gen4.5', 'gen4_turbo'].includes(model);
|
|
29
60
|
const ratio = args.ratio || '1280:720';
|
|
61
|
+
if (!resold)
|
|
62
|
+
checkRunwayModel(model, ratio, RUNWAY_IMAGE_RATIOS, args.resolution);
|
|
30
63
|
const duration = args.duration || (isRunwayModel ? 5 : 8);
|
|
31
64
|
const audio = args.audio;
|
|
32
65
|
const seed = args.seed;
|
|
@@ -42,6 +75,18 @@ export function registerVideoTools(server) {
|
|
|
42
75
|
else {
|
|
43
76
|
promptImage = firstImage;
|
|
44
77
|
}
|
|
78
|
+
if (resold) {
|
|
79
|
+
const body = { model, promptImage, ...resold.fields };
|
|
80
|
+
if (args.prompt_text)
|
|
81
|
+
body.promptText = args.prompt_text;
|
|
82
|
+
const result = await runwayFetch('/image_to_video', { method: 'POST', body: JSON.stringify(body) });
|
|
83
|
+
return JSON.stringify({
|
|
84
|
+
ok: true, task_id: result.id, status: 'PENDING', model, duration: resold.duration,
|
|
85
|
+
estimated_credits: resold.credits, estimated_cost: `$${(resold.credits * 0.01).toFixed(2)}`,
|
|
86
|
+
keyframes: args.last_frame_image ? 'first+last' : 'first',
|
|
87
|
+
message: `Image-to-video started (${model}, ${resold.duration}s). Poll with check_runway_task("${result.id}") every 30s, or use wait_for_runway_task.`,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
45
90
|
const body = { model, promptImage, ratio, duration };
|
|
46
91
|
if (args.prompt_text)
|
|
47
92
|
body.promptText = args.prompt_text;
|
|
@@ -64,14 +109,15 @@ export function registerVideoTools(server) {
|
|
|
64
109
|
// ── Text-to-Video ─────────────────────────────────────────────────────
|
|
65
110
|
server.registerTool('generate_video_from_text', {
|
|
66
111
|
description: 'Create a video entirely from a text description. ' +
|
|
67
|
-
'MODELS: gen4.5 (flagship), veo3.1 (best + audio), veo3.1_fast
|
|
112
|
+
'MODELS: gen4.5 (flagship), veo3.1 (best + audio), veo3.1_fast, ' + RESOLD_VIDEO_GUIDE + ' ' +
|
|
68
113
|
'WORKFLOW: Returns task_id → poll or use wait_for_runway_task.',
|
|
69
114
|
inputSchema: z.object({
|
|
70
|
-
prompt_text: z.string().max(
|
|
71
|
-
model: z.enum(['gen4.5', 'veo3.1', 'veo3.1_fast']).optional().describe('Default: gen4.5.'),
|
|
72
|
-
ratio: z.
|
|
73
|
-
|
|
74
|
-
|
|
115
|
+
prompt_text: z.string().max(26000).describe('Detailed video description. Max 1000 chars for gen4.5/veo; models made by others take more (kling_4 26000, wan3 20000, seedance2_5 15000).'),
|
|
116
|
+
model: z.enum(['gen4.5', 'veo3.1', 'veo3.1_fast', ...RESOLD_VIDEO_MODELS]).optional().describe('Default: gen4.5.'),
|
|
117
|
+
ratio: z.string().optional().describe(`${RATIO_GUIDE} gen4.5/veo: 1280:720 or 720:1280.`),
|
|
118
|
+
resolution: z.enum(['480p', '720p', '768p', '1080p', '2k']).optional().describe(RESOLUTION_GUIDE),
|
|
119
|
+
duration: z.number().optional().describe('Seconds. gen4.5: 2-10 (default 5). veo: 4,6,8 (default 8). Models made by others: their own range (default 5).'),
|
|
120
|
+
audio: z.boolean().optional().describe('Generate audio (veo, seedance2_5(_flash), wan3(_prime)). Default: true.'),
|
|
75
121
|
negative_prompt: z.string().max(1000).optional().describe('What should NOT appear in the output (veo models only, max 1000 chars). Omit to use the default negative prompt.'),
|
|
76
122
|
content_moderation: z.enum(['auto', 'low']).optional().describe('Public figure threshold.'),
|
|
77
123
|
seed: z.number().int().optional().describe('Random seed (0-4294967295).'),
|
|
@@ -79,8 +125,22 @@ export function registerVideoTools(server) {
|
|
|
79
125
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
80
126
|
}, withErrorHandling(async (args) => {
|
|
81
127
|
const model = args.model || 'gen4.5';
|
|
128
|
+
if (isResoldVideoModel(model)) {
|
|
129
|
+
const resold = resoldVideoFields(model, 'text', args);
|
|
130
|
+
const body = { model, promptText: args.prompt_text, ...resold.fields };
|
|
131
|
+
const result = await runwayFetch('/text_to_video', { method: 'POST', body: JSON.stringify(body) });
|
|
132
|
+
return JSON.stringify({
|
|
133
|
+
ok: true, task_id: result.id, status: 'PENDING', model, duration: resold.duration,
|
|
134
|
+
estimated_credits: resold.credits, estimated_cost: `$${(resold.credits * 0.01).toFixed(2)}`,
|
|
135
|
+
message: `Text-to-video started (${model}, ${resold.duration}s). Poll with check_runway_task("${result.id}") every 30s, or use wait_for_runway_task.`,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
if (args.prompt_text.length > 1000) {
|
|
139
|
+
throw new RunwayError(`Prompt is ${args.prompt_text.length} characters; ${model} supports at most 1000.`, 'INVALID_INPUT', 'Shorten the prompt to 1000 characters, or use a model that takes more, such as kling_4 (up to 26000) or seedance2_5 (up to 15000).');
|
|
140
|
+
}
|
|
82
141
|
const isGen45 = model === 'gen4.5';
|
|
83
142
|
const ratio = args.ratio || '1280:720';
|
|
143
|
+
checkRunwayModel(model, ratio, RUNWAY_TEXT_RATIOS, args.resolution);
|
|
84
144
|
const duration = args.duration || (isGen45 ? 5 : 8);
|
|
85
145
|
const audio = args.audio !== false;
|
|
86
146
|
const seed = args.seed;
|
package/dist/tools/voices.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { runwayFetch, runwayRawFetch } from '../client.js';
|
|
3
3
|
import { wrapUntrusted } from '../untrusted-content.js';
|
|
4
4
|
import { RunwayError } from '../types.js';
|
|
5
|
+
import { redactCredentials } from '../key-filter.js';
|
|
5
6
|
import { pathSegment, withErrorHandling } from '../utils.js';
|
|
6
7
|
/**
|
|
7
8
|
* External-response schema for GET /v1/voices. `name` and `description` are
|
|
@@ -33,8 +34,8 @@ export function registerVoiceTools(server) {
|
|
|
33
34
|
const result = voiceListResponseSchema.parse(raw);
|
|
34
35
|
const voices = result.data.map(v => ({
|
|
35
36
|
id: v.id,
|
|
36
|
-
name: wrapUntrusted(v.name, 'runway-voice'),
|
|
37
|
-
description: wrapUntrusted(v.description || '', 'runway-voice'),
|
|
37
|
+
name: wrapUntrusted(redactCredentials(v.name), 'runway-voice'),
|
|
38
|
+
description: wrapUntrusted(redactCredentials(v.description || ''), 'runway-voice'),
|
|
38
39
|
status: v.status, created: v.createdAt,
|
|
39
40
|
}));
|
|
40
41
|
return JSON.stringify({
|
package/dist/types.d.ts
CHANGED
|
@@ -37,15 +37,29 @@ export declare const DEFAULT_UPLOAD_TIMEOUT_MS = 600000;
|
|
|
37
37
|
* (positive integer, <= 30 min ceiling).
|
|
38
38
|
*/
|
|
39
39
|
export declare function getUploadTimeoutMs(): number;
|
|
40
|
-
export interface BridgeState {
|
|
41
|
-
port: number;
|
|
42
|
-
token: string;
|
|
43
|
-
}
|
|
44
40
|
export declare class RunwayError extends Error {
|
|
45
41
|
readonly code: string;
|
|
46
42
|
readonly resolution: string;
|
|
47
43
|
constructor(message: string, code: string, resolution: string);
|
|
48
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Which kind of request failed, so the fixed error text can say what to do
|
|
47
|
+
* next. Runway generations are async tasks: a request that started one may
|
|
48
|
+
* have created the task even when no complete response came back.
|
|
49
|
+
*/
|
|
50
|
+
export type RequestKind = 'request' | 'status_check';
|
|
51
|
+
/**
|
|
52
|
+
* Fixed text for a request to Runway that failed without an HTTP response.
|
|
53
|
+
* The underlying error text can quote anything (headers, URLs, the key), so
|
|
54
|
+
* it never reaches a tool result.
|
|
55
|
+
*/
|
|
56
|
+
export declare function runwayNetworkError(kind?: RequestKind): RunwayError;
|
|
57
|
+
/** Fixed text for a successful (2xx) Runway response whose body is not readable JSON. */
|
|
58
|
+
export declare function runwayParseError(kind?: RequestKind): RunwayError;
|
|
59
|
+
/** Fixed text for an error no other branch recognised. */
|
|
60
|
+
export declare function unexpectedError(): RunwayError;
|
|
61
|
+
/** Error text for stderr: no credential seen this session appears in it. */
|
|
62
|
+
export declare function describeForLog(error: unknown): string;
|
|
49
63
|
export interface TaskResponse {
|
|
50
64
|
id: string;
|
|
51
65
|
}
|