@coro-ai/runner 0.1.33 → 0.1.36
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/dashboard-dist/assets/{index-C7l2FOsX.js → index-DVdRvXW2.js} +1 -1
- package/dashboard-dist/index.html +1 -1
- package/dist/src/clients/github.d.ts +21 -10
- package/dist/src/clients/github.js +48 -40
- package/dist/src/clients/github.js.map +1 -1
- package/dist/src/clients/tracker/jira.js +6 -0
- package/dist/src/clients/tracker/jira.js.map +1 -1
- package/dist/src/clients/tracker/linear.js +6 -2
- package/dist/src/clients/tracker/linear.js.map +1 -1
- package/dist/src/clients/tracker/types.d.ts +11 -0
- package/dist/src/cloud/db/postgres-backend.js +21 -13
- package/dist/src/cloud/db/postgres-backend.js.map +1 -1
- package/dist/src/cloud/db/schema.d.ts +1 -1
- package/dist/src/intake/system-prompt.js +3 -0
- package/dist/src/intake/system-prompt.js.map +1 -1
- package/dist/src/jobs/phase-assignment.d.ts +42 -0
- package/dist/src/jobs/phase-assignment.js +46 -43
- package/dist/src/jobs/phase-assignment.js.map +1 -1
- package/dist/src/jobs/runner.js +63 -34
- package/dist/src/jobs/runner.js.map +1 -1
- package/dist/src/mcp-handlers.d.ts +1 -0
- package/dist/src/mcp-handlers.js +6 -2
- package/dist/src/mcp-handlers.js.map +1 -1
- package/dist/src/mcp-server.js +6 -1
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/plugins/builtin/github-tracker/intelligence/snippets/github-issues-keys.md +4 -1
- package/dist/src/plugins/builtin/jira/index.js +12 -0
- package/dist/src/plugins/builtin/jira/index.js.map +1 -1
- package/dist/src/plugins/builtin/jira/intelligence/snippets/jira-transitions.md +6 -1
- package/dist/src/plugins/builtin/linear/index.js +12 -0
- package/dist/src/plugins/builtin/linear/index.js.map +1 -1
- package/dist/src/plugins/builtin/linear/intelligence/snippets/linear-keys.md +6 -2
- package/dist/src/plugins/refs.d.ts +50 -1
- package/dist/src/plugins/refs.js +97 -1
- package/dist/src/plugins/refs.js.map +1 -1
- package/dist/src/plugins/registry.d.ts +6 -0
- package/dist/src/plugins/registry.js +11 -2
- package/dist/src/plugins/registry.js.map +1 -1
- package/dist/src/plugins/types.d.ts +13 -1
- package/dist/src/prompt/builder.d.ts +2 -1
- package/dist/src/prompt/builder.js +42 -1
- package/dist/src/prompt/builder.js.map +1 -1
- package/dist/src/runner/build-settings.js +16 -4
- package/dist/src/runner/build-settings.js.map +1 -1
- package/dist/src/state/polling-transport.d.ts +41 -12
- package/dist/src/state/polling-transport.js +95 -56
- package/dist/src/state/polling-transport.js.map +1 -1
- package/dist/src/state/sqlite-backend.js +19 -13
- package/dist/src/state/sqlite-backend.js.map +1 -1
- package/dist/src/tools/run-subagent.js +10 -5
- package/dist/src/tools/run-subagent.js.map +1 -1
- package/node_modules/@coro-ai/cloud-protocol/package.json +1 -1
- package/node_modules/@coro-ai/intelligence-base/layer/agents/coder.md +1 -1
- package/node_modules/@coro-ai/intelligence-base/layer/agents/planner.md +1 -1
- package/node_modules/@coro-ai/intelligence-base/package.json +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts +58 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js +278 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts +12 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js +85 -46
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js +4 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts +2 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.js +6 -2
- package/node_modules/@coro-ai/llm-anthropic/dist/index.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts +11 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js +112 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts +0 -26
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js +40 -106
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/package.json +1 -1
- package/node_modules/@coro-ai/llm-openai/README.md +3 -3
- package/node_modules/@coro-ai/llm-openai/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/executor.js +13 -10
- package/node_modules/@coro-ai/llm-openai/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/models.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/models.js +27 -0
- package/node_modules/@coro-ai/llm-openai/dist/models.js.map +1 -1
- package/node_modules/@coro-ai/llm-openai/package.json +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts +10 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js +16 -2
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts +27 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js +47 -0
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts +79 -4
- package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/package.json +1 -1
- package/node_modules/@hono/node-server/README.md +104 -25
- 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 +1176 -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 +1146 -637
- package/node_modules/@hono/node-server/dist/serve-static.cjs +151 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.cts +18 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.mts +14 -13
- package/node_modules/@hono/node-server/dist/serve-static.mjs +143 -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 +78 -54
- 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/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.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +5 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.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/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 +21 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js +239 -41
- 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/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/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/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/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.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +5 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.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/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 +21 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +239 -41
- 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/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/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/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite/encodings/utf32.js +10 -3
- package/node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite/package.json +2 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite/types/encodings.d.ts +2 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/README.md +15 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/index.js +0 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/package.json +16 -12
- package/node_modules/@modelcontextprotocol/sdk/package.json +4 -3
- package/node_modules/body-parser/HISTORY.md +7 -1
- package/node_modules/body-parser/lib/types/json.js +7 -3
- package/node_modules/body-parser/lib/types/raw.js +7 -3
- package/node_modules/body-parser/lib/types/text.js +7 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +7 -3
- package/node_modules/body-parser/package.json +1 -1
- package/node_modules/express-rate-limit/dist/index.cjs +75 -6
- package/node_modules/express-rate-limit/dist/index.d.cts +16 -0
- package/node_modules/express-rate-limit/dist/index.d.mts +16 -0
- package/node_modules/express-rate-limit/dist/index.d.ts +16 -0
- package/node_modules/express-rate-limit/dist/index.mjs +61 -6
- package/node_modules/express-rate-limit/node_modules/debug/LICENSE +20 -0
- package/node_modules/express-rate-limit/node_modules/debug/README.md +481 -0
- package/node_modules/express-rate-limit/node_modules/debug/package.json +64 -0
- package/node_modules/express-rate-limit/node_modules/debug/src/browser.js +272 -0
- package/node_modules/express-rate-limit/node_modules/debug/src/common.js +292 -0
- package/node_modules/express-rate-limit/node_modules/debug/src/index.js +10 -0
- package/node_modules/express-rate-limit/node_modules/debug/src/node.js +263 -0
- package/node_modules/express-rate-limit/node_modules/ms/index.js +162 -0
- package/node_modules/express-rate-limit/node_modules/ms/license.md +21 -0
- package/node_modules/express-rate-limit/node_modules/ms/package.json +38 -0
- package/node_modules/express-rate-limit/node_modules/ms/readme.md +59 -0
- package/node_modules/express-rate-limit/package.json +12 -9
- package/node_modules/fast-copy/README.md +46 -46
- package/node_modules/fast-copy/dist/cjs/index.cjs +13 -19
- package/node_modules/fast-copy/dist/cjs/index.cjs.map +1 -1
- package/node_modules/fast-copy/dist/cjs/index.d.cts +40 -6
- package/node_modules/fast-copy/dist/es/index.d.mts +40 -6
- package/node_modules/fast-copy/dist/es/index.mjs +13 -19
- package/node_modules/fast-copy/dist/es/index.mjs.map +1 -1
- package/node_modules/fast-copy/dist/umd/index.d.ts +40 -6
- package/node_modules/fast-copy/dist/umd/index.js +13 -19
- package/node_modules/fast-copy/dist/umd/index.js.map +1 -1
- package/node_modules/fast-copy/index.d.ts +22 -22
- package/node_modules/fast-copy/package.json +30 -23
- package/node_modules/fast-uri/index.js +55 -2
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security.test.js +226 -0
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +2 -5
- package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/adapter/lambda-edge/handler.js +12 -2
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +2 -5
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +12 -2
- package/node_modules/hono/dist/cjs/client/client.js +10 -1
- package/node_modules/hono/dist/cjs/client/utils.js +1 -1
- package/node_modules/hono/dist/cjs/context.js +28 -13
- package/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/cjs/hono-base.js +3 -2
- package/node_modules/hono/dist/cjs/jsx/base.js +27 -23
- package/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +104 -9
- package/node_modules/hono/dist/cjs/middleware/compress/index.js +7 -1
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +5 -1
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/hono/dist/cjs/middleware/method-override/index.js +5 -3
- package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/cjs/request.js +14 -11
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +55 -56
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +64 -85
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +13 -5
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +10 -1
- package/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/hono/dist/cjs/utils/body.js +18 -4
- package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
- package/node_modules/hono/dist/cjs/utils/cookie.js +3 -2
- package/node_modules/hono/dist/cjs/utils/stream.js +5 -2
- package/node_modules/hono/dist/cjs/utils/url.js +8 -8
- package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
- package/node_modules/hono/dist/client/client.js +10 -1
- package/node_modules/hono/dist/client/utils.js +1 -1
- package/node_modules/hono/dist/context.js +28 -13
- package/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/hono-base.js +3 -2
- package/node_modules/hono/dist/jsx/base.js +27 -23
- package/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/hono/dist/middleware/cache/index.js +104 -9
- package/node_modules/hono/dist/middleware/compress/index.js +7 -1
- package/node_modules/hono/dist/middleware/cors/index.js +2 -2
- package/node_modules/hono/dist/middleware/etag/index.js +5 -1
- package/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/hono/dist/middleware/method-override/index.js +5 -3
- package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/request.js +15 -12
- package/node_modules/hono/dist/router/reg-exp-router/node.js +55 -56
- package/node_modules/hono/dist/router/reg-exp-router/router.js +64 -85
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +13 -5
- package/node_modules/hono/dist/router/trie-router/node.js +10 -1
- package/node_modules/hono/dist/router.js +1 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +1 -1
- package/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/hono/dist/types/helper/websocket/index.d.ts +1 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/hono/dist/types/jsx/base.d.ts +4 -2
- package/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
- package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/language/language.d.ts +18 -0
- package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +1 -1
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/hono/dist/types/utils/types.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
- package/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/hono/dist/utils/body.js +18 -4
- package/node_modules/hono/dist/utils/buffer.js +2 -1
- package/node_modules/hono/dist/utils/cookie.js +4 -3
- package/node_modules/hono/dist/utils/stream.js +5 -2
- package/node_modules/hono/dist/utils/url.js +6 -7
- package/node_modules/hono/dist/validator/validator.js +3 -3
- package/node_modules/hono/package.json +19 -11
- package/node_modules/ip-address/README.md +146 -126
- package/node_modules/ip-address/dist/common.d.ts +29 -0
- package/node_modules/ip-address/dist/common.js +44 -5
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +8 -1
- package/node_modules/ip-address/dist/ipv4.js +24 -20
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +68 -3
- package/node_modules/ip-address/dist/ipv6.js +180 -53
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v4/constants.js +5 -1
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.js +3 -2
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +6 -4
- package/node_modules/jose/README.md +13 -16
- package/node_modules/jose/dist/types/index.d.ts +6 -5
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
- package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
- package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
- package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
- package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
- package/node_modules/jose/dist/types/key/export.d.ts +0 -14
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
- package/node_modules/jose/dist/types/key/import.d.ts +18 -28
- package/node_modules/jose/dist/types/types.d.ts +239 -222
- package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
- package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +4 -22
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +23 -3
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +66 -82
- package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
- package/node_modules/jose/dist/webapi/jwks/local.js +32 -73
- package/node_modules/jose/dist/webapi/jwks/remote.js +19 -28
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +4 -16
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -65
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
- package/node_modules/jose/dist/webapi/jws/general/sign.js +19 -15
- package/node_modules/jose/dist/webapi/jws/general/verify.js +29 -9
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +5 -5
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
- package/node_modules/jose/dist/webapi/jwt/verify.js +6 -6
- package/node_modules/jose/dist/webapi/key/export.js +37 -4
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +33 -82
- package/node_modules/jose/dist/webapi/key/generate_secret.js +2 -2
- package/node_modules/jose/dist/webapi/key/import.js +8 -8
- package/node_modules/jose/dist/webapi/lib/asn1.js +53 -122
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +34 -109
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +18 -126
- package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +186 -0
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +110 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +8 -98
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +73 -0
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +74 -0
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +68 -109
- package/node_modules/jose/dist/webapi/lib/key.js +132 -0
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
- package/node_modules/jose/dist/webapi/lib/key_management.js +162 -92
- package/node_modules/jose/dist/webapi/lib/options.js +48 -0
- package/node_modules/jose/dist/webapi/lib/signing.js +14 -56
- package/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
- package/node_modules/jose/dist/webapi/util/base64url.js +13 -4
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
- package/node_modules/jose/dist/webapi/util/errors.js +1 -1
- package/node_modules/jose/package.json +2 -4
- package/node_modules/js-yaml/README.md +5 -3
- package/node_modules/js-yaml/dist/js-yaml.js +3012 -2402
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -33
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +3073 -2381
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/loader.js +7 -11
- package/node_modules/js-yaml/lib/type/float.js +1 -1
- package/node_modules/js-yaml/lib/type/int.js +4 -4
- package/node_modules/js-yaml/lib/type/omap.js +3 -3
- package/node_modules/js-yaml/package.json +10 -4
- package/node_modules/node-abi/abi_registry.json +8 -1
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/openai/CHANGELOG.md +101 -0
- package/node_modules/openai/README.md +9 -2
- package/node_modules/openai/azure.d.mts.map +1 -1
- package/node_modules/openai/azure.d.ts.map +1 -1
- package/node_modules/openai/azure.js +5 -1
- package/node_modules/openai/azure.js.map +1 -1
- package/node_modules/openai/azure.mjs +5 -1
- package/node_modules/openai/azure.mjs.map +1 -1
- package/node_modules/openai/client.d.mts +1 -0
- package/node_modules/openai/client.d.mts.map +1 -1
- package/node_modules/openai/client.d.ts +1 -0
- package/node_modules/openai/client.d.ts.map +1 -1
- package/node_modules/openai/client.js +11 -5
- package/node_modules/openai/client.js.map +1 -1
- package/node_modules/openai/client.mjs +11 -5
- package/node_modules/openai/client.mjs.map +1 -1
- package/node_modules/openai/core/streaming.d.mts.map +1 -1
- package/node_modules/openai/core/streaming.d.ts.map +1 -1
- package/node_modules/openai/core/streaming.js +38 -6
- package/node_modules/openai/core/streaming.js.map +1 -1
- package/node_modules/openai/core/streaming.mjs +38 -6
- package/node_modules/openai/core/streaming.mjs.map +1 -1
- package/node_modules/openai/core/uploads.d.mts +1 -1
- package/node_modules/openai/core/uploads.d.mts.map +1 -1
- package/node_modules/openai/core/uploads.d.ts +1 -1
- package/node_modules/openai/core/uploads.d.ts.map +1 -1
- package/node_modules/openai/core/uploads.js +3 -1
- package/node_modules/openai/core/uploads.js.map +1 -1
- package/node_modules/openai/core/uploads.mjs +1 -0
- package/node_modules/openai/core/uploads.mjs.map +1 -1
- package/node_modules/openai/helpers/audio.d.mts.map +1 -1
- package/node_modules/openai/helpers/audio.d.ts.map +1 -1
- package/node_modules/openai/helpers/audio.js +16 -3
- package/node_modules/openai/helpers/audio.js.map +1 -1
- package/node_modules/openai/helpers/audio.mjs +17 -4
- package/node_modules/openai/helpers/audio.mjs.map +1 -1
- package/node_modules/openai/helpers/standard-schema.d.mts +104 -0
- package/node_modules/openai/helpers/standard-schema.d.mts.map +1 -0
- package/node_modules/openai/helpers/standard-schema.d.ts +104 -0
- package/node_modules/openai/helpers/standard-schema.d.ts.map +1 -0
- package/node_modules/openai/helpers/standard-schema.js +320 -0
- package/node_modules/openai/helpers/standard-schema.js.map +1 -0
- package/node_modules/openai/helpers/standard-schema.mjs +314 -0
- package/node_modules/openai/helpers/standard-schema.mjs.map +1 -0
- package/node_modules/openai/helpers/zod.d.mts +45 -9
- package/node_modules/openai/helpers/zod.d.mts.map +1 -1
- package/node_modules/openai/helpers/zod.d.ts +45 -9
- package/node_modules/openai/helpers/zod.d.ts.map +1 -1
- package/node_modules/openai/helpers/zod.js +120 -18
- package/node_modules/openai/helpers/zod.js.map +1 -1
- package/node_modules/openai/helpers/zod.mjs +119 -18
- package/node_modules/openai/helpers/zod.mjs.map +1 -1
- package/node_modules/openai/index.d.mts +1 -1
- package/node_modules/openai/index.d.mts.map +1 -1
- package/node_modules/openai/index.d.ts +1 -1
- package/node_modules/openai/index.d.ts.map +1 -1
- package/node_modules/openai/index.js +2 -1
- package/node_modules/openai/index.js.map +1 -1
- package/node_modules/openai/index.mjs +1 -1
- package/node_modules/openai/index.mjs.map +1 -1
- package/node_modules/openai/internal/headers.d.mts.map +1 -1
- package/node_modules/openai/internal/headers.d.ts.map +1 -1
- package/node_modules/openai/internal/headers.js +7 -3
- package/node_modules/openai/internal/headers.js.map +1 -1
- package/node_modules/openai/internal/headers.mjs +7 -3
- package/node_modules/openai/internal/headers.mjs.map +1 -1
- package/node_modules/openai/internal/uploads.d.mts +26 -1
- package/node_modules/openai/internal/uploads.d.mts.map +1 -1
- package/node_modules/openai/internal/uploads.d.ts +26 -1
- package/node_modules/openai/internal/uploads.d.ts.map +1 -1
- package/node_modules/openai/internal/uploads.js +169 -1
- package/node_modules/openai/internal/uploads.js.map +1 -1
- package/node_modules/openai/internal/uploads.mjs +169 -2
- package/node_modules/openai/internal/uploads.mjs.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts +3 -3
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts +3 -3
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js +61 -4
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +61 -4
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/node_modules/openai/lib/AssistantStream.d.mts.map +1 -1
- package/node_modules/openai/lib/AssistantStream.d.ts.map +1 -1
- package/node_modules/openai/lib/AssistantStream.js +4 -3
- package/node_modules/openai/lib/AssistantStream.js.map +1 -1
- package/node_modules/openai/lib/AssistantStream.mjs +4 -3
- package/node_modules/openai/lib/AssistantStream.mjs.map +1 -1
- package/node_modules/openai/lib/ChatCompletionRunner.d.mts +26 -2
- package/node_modules/openai/lib/ChatCompletionRunner.d.mts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionRunner.d.ts +26 -2
- package/node_modules/openai/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionRunner.js.map +1 -1
- package/node_modules/openai/lib/ChatCompletionRunner.mjs.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.mts +15 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.mts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.ts +15 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.ts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.js +128 -30
- package/node_modules/openai/lib/ChatCompletionStream.js.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.mjs +127 -30
- package/node_modules/openai/lib/ChatCompletionStream.mjs.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts +25 -2
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.d.mts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts +25 -2
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.js +77 -0
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs +78 -1
- package/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/node_modules/openai/lib/EventStream.d.mts +13 -0
- package/node_modules/openai/lib/EventStream.d.mts.map +1 -1
- package/node_modules/openai/lib/EventStream.d.ts +13 -0
- package/node_modules/openai/lib/EventStream.d.ts.map +1 -1
- package/node_modules/openai/lib/EventStream.js +107 -2
- package/node_modules/openai/lib/EventStream.js.map +1 -1
- package/node_modules/openai/lib/EventStream.mjs +107 -2
- package/node_modules/openai/lib/EventStream.mjs.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.d.mts.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.d.ts.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.js +3 -5
- package/node_modules/openai/lib/ResponsesParser.js.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.mjs +3 -5
- package/node_modules/openai/lib/ResponsesParser.mjs.map +1 -1
- package/node_modules/openai/lib/RunnableFunction.d.mts +38 -21
- package/node_modules/openai/lib/RunnableFunction.d.mts.map +1 -1
- package/node_modules/openai/lib/RunnableFunction.d.ts +38 -21
- package/node_modules/openai/lib/RunnableFunction.d.ts.map +1 -1
- package/node_modules/openai/lib/RunnableFunction.js.map +1 -1
- package/node_modules/openai/lib/RunnableFunction.mjs.map +1 -1
- package/node_modules/openai/lib/jsonschema.d.mts +3 -0
- package/node_modules/openai/lib/jsonschema.d.mts.map +1 -1
- package/node_modules/openai/lib/jsonschema.d.ts +3 -0
- package/node_modules/openai/lib/jsonschema.d.ts.map +1 -1
- package/node_modules/openai/lib/parser.d.mts +2 -2
- package/node_modules/openai/lib/parser.d.mts.map +1 -1
- package/node_modules/openai/lib/parser.d.ts +2 -2
- package/node_modules/openai/lib/parser.d.ts.map +1 -1
- package/node_modules/openai/lib/parser.js.map +1 -1
- package/node_modules/openai/lib/parser.mjs.map +1 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.d.mts +6 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.d.mts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.d.ts +6 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.d.ts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.js +1 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.js.map +1 -1
- package/node_modules/openai/lib/responses/ResponseAccumulator.mjs +1 -0
- package/node_modules/openai/lib/responses/ResponseAccumulator.mjs.map +1 -1
- package/node_modules/openai/lib/responses/ResponseInputItems.d.mts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseInputItems.d.ts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseInputItems.js +2 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.js.map +1 -1
- package/node_modules/openai/lib/responses/ResponseInputItems.mjs +2 -0
- package/node_modules/openai/lib/responses/ResponseInputItems.mjs.map +1 -1
- package/node_modules/openai/lib/responses/ResponseStream.d.mts +6 -1
- package/node_modules/openai/lib/responses/ResponseStream.d.mts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseStream.d.ts +6 -1
- package/node_modules/openai/lib/responses/ResponseStream.d.ts.map +1 -1
- package/node_modules/openai/lib/responses/ResponseStream.js +21 -0
- package/node_modules/openai/lib/responses/ResponseStream.js.map +1 -1
- package/node_modules/openai/lib/responses/ResponseStream.mjs +21 -0
- package/node_modules/openai/lib/responses/ResponseStream.mjs.map +1 -1
- package/node_modules/openai/lib/transform.d.mts +25 -1
- package/node_modules/openai/lib/transform.d.mts.map +1 -1
- package/node_modules/openai/lib/transform.d.ts +25 -1
- package/node_modules/openai/lib/transform.d.ts.map +1 -1
- package/node_modules/openai/lib/transform.js +1521 -82
- package/node_modules/openai/lib/transform.js.map +1 -1
- package/node_modules/openai/lib/transform.mjs +1515 -82
- package/node_modules/openai/lib/transform.mjs.map +1 -1
- package/node_modules/openai/package.json +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.d.mts +2 -2
- package/node_modules/openai/resources/admin/organization/audit-logs.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/audit-logs.d.ts +2 -2
- package/node_modules/openai/resources/admin/organization/audit-logs.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.d.mts +1 -0
- package/node_modules/openai/resources/admin/organization/index.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.d.ts +1 -0
- package/node_modules/openai/resources/admin/organization/index.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.js +3 -1
- package/node_modules/openai/resources/admin/organization/index.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.mjs +1 -0
- package/node_modules/openai/resources/admin/organization/index.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.d.mts +4 -0
- package/node_modules/openai/resources/admin/organization/organization.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.d.ts +4 -0
- package/node_modules/openai/resources/admin/organization/organization.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.js +4 -0
- package/node_modules/openai/resources/admin/organization/organization.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/organization.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.d.mts +12 -0
- package/node_modules/openai/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/api-keys.d.ts +12 -0
- package/node_modules/openai/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts +2 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts +2 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js +7 -5
- package/node_modules/openai/resources/admin/organization/projects/index.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.mjs +2 -1
- package/node_modules/openai/resources/admin/organization/projects/index.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts +6 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts +6 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.js +6 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs +6 -2
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.d.mts +58 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.d.ts +58 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js +26 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.mjs +22 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/api-keys.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.d.mts +3 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.d.ts +3 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.js +9 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/index.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +177 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +177 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js +109 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.mjs +104 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.d.mts +1 -167
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.d.ts +1 -167
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.js +2 -97
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs +1 -95
- package/node_modules/openai/resources/admin/organization/projects/service-accounts.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts +115 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts +115 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js +67 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs +63 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.mts +108 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.ts +108 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.js +59 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs +55 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/usage.d.mts +517 -88
- package/node_modules/openai/resources/admin/organization/usage.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/usage.d.ts +517 -88
- package/node_modules/openai/resources/admin/organization/usage.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/assistants.d.mts +12 -26
- package/node_modules/openai/resources/beta/assistants.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/assistants.d.ts +12 -26
- package/node_modules/openai/resources/beta/assistants.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/beta.d.mts +6 -1
- package/node_modules/openai/resources/beta/beta.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/beta.d.ts +6 -1
- package/node_modules/openai/resources/beta/beta.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/beta.js +4 -0
- package/node_modules/openai/resources/beta/beta.js.map +1 -1
- package/node_modules/openai/resources/beta/beta.mjs +4 -0
- package/node_modules/openai/resources/beta/beta.mjs.map +1 -1
- package/node_modules/openai/resources/beta/index.d.mts +1 -0
- package/node_modules/openai/resources/beta/index.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/index.d.ts +1 -0
- package/node_modules/openai/resources/beta/index.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/index.js +5 -3
- package/node_modules/openai/resources/beta/index.js.map +1 -1
- package/node_modules/openai/resources/beta/index.mjs +1 -0
- package/node_modules/openai/resources/beta/index.mjs.map +1 -1
- package/node_modules/openai/resources/beta/responses/index.d.mts +6 -0
- package/node_modules/openai/resources/beta/responses/index.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/index.d.ts +6 -0
- package/node_modules/openai/resources/beta/responses/index.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/index.js +11 -0
- package/node_modules/openai/resources/beta/responses/index.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/index.mjs +5 -0
- package/node_modules/openai/resources/beta/responses/index.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-items.d.mts +69 -0
- package/node_modules/openai/resources/beta/responses/input-items.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-items.d.ts +69 -0
- package/node_modules/openai/resources/beta/responses/input-items.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-items.js +37 -0
- package/node_modules/openai/resources/beta/responses/input-items.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-items.mjs +33 -0
- package/node_modules/openai/resources/beta/responses/input-items.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.d.mts +195 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.d.ts +195 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.js +34 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.mjs +30 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/internal-base.d.mts +71 -0
- package/node_modules/openai/resources/beta/responses/internal-base.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/internal-base.d.ts +71 -0
- package/node_modules/openai/resources/beta/responses/internal-base.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/internal-base.js +48 -0
- package/node_modules/openai/resources/beta/responses/internal-base.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/internal-base.mjs +42 -0
- package/node_modules/openai/resources/beta/responses/internal-base.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/responses.d.mts +9996 -0
- package/node_modules/openai/resources/beta/responses/responses.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/responses.d.ts +9996 -0
- package/node_modules/openai/resources/beta/responses/responses.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/responses.js +121 -0
- package/node_modules/openai/resources/beta/responses/responses.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/responses.mjs +116 -0
- package/node_modules/openai/resources/beta/responses/responses.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws-base.d.mts +106 -0
- package/node_modules/openai/resources/beta/responses/ws-base.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws-base.d.ts +106 -0
- package/node_modules/openai/resources/beta/responses/ws-base.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws-base.js +476 -0
- package/node_modules/openai/resources/beta/responses/ws-base.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws-base.mjs +472 -0
- package/node_modules/openai/resources/beta/responses/ws-base.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws.d.mts +13 -0
- package/node_modules/openai/resources/beta/responses/ws.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws.d.ts +13 -0
- package/node_modules/openai/resources/beta/responses/ws.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws.js +31 -0
- package/node_modules/openai/resources/beta/responses/ws.js.map +1 -0
- package/node_modules/openai/resources/beta/responses/ws.mjs +26 -0
- package/node_modules/openai/resources/beta/responses/ws.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses.d.mts +2 -0
- package/node_modules/openai/resources/beta/responses.d.mts.map +1 -0
- package/node_modules/openai/resources/beta/responses.d.ts +2 -0
- package/node_modules/openai/resources/beta/responses.d.ts.map +1 -0
- package/node_modules/openai/resources/beta/responses.js +6 -0
- package/node_modules/openai/resources/beta/responses.js.map +1 -0
- package/node_modules/openai/resources/beta/responses.mjs +3 -0
- package/node_modules/openai/resources/beta/responses.mjs.map +1 -0
- package/node_modules/openai/resources/beta/threads/runs/runs.d.mts +6 -13
- package/node_modules/openai/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/threads/runs/runs.d.ts +6 -13
- package/node_modules/openai/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/threads/runs/runs.js.map +1 -1
- package/node_modules/openai/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.d.mts +174 -23
- package/node_modules/openai/resources/chat/completions/completions.d.mts.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.d.ts +174 -23
- package/node_modules/openai/resources/chat/completions/completions.d.ts.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.js.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.mjs.map +1 -1
- package/node_modules/openai/resources/completions.d.mts +4 -0
- package/node_modules/openai/resources/completions.d.mts.map +1 -1
- package/node_modules/openai/resources/completions.d.ts +4 -0
- package/node_modules/openai/resources/completions.d.ts.map +1 -1
- package/node_modules/openai/resources/conversations/conversations.d.mts +19 -0
- package/node_modules/openai/resources/conversations/conversations.d.mts.map +1 -1
- package/node_modules/openai/resources/conversations/conversations.d.ts +19 -0
- package/node_modules/openai/resources/conversations/conversations.d.ts.map +1 -1
- package/node_modules/openai/resources/conversations/conversations.js.map +1 -1
- package/node_modules/openai/resources/conversations/conversations.mjs.map +1 -1
- package/node_modules/openai/resources/conversations/items.d.mts +45 -1
- package/node_modules/openai/resources/conversations/items.d.mts.map +1 -1
- package/node_modules/openai/resources/conversations/items.d.ts +45 -1
- package/node_modules/openai/resources/conversations/items.d.ts.map +1 -1
- package/node_modules/openai/resources/evals/runs/runs.d.mts +66 -143
- package/node_modules/openai/resources/evals/runs/runs.d.mts.map +1 -1
- package/node_modules/openai/resources/evals/runs/runs.d.ts +66 -143
- package/node_modules/openai/resources/evals/runs/runs.d.ts.map +1 -1
- package/node_modules/openai/resources/evals/runs/runs.js.map +1 -1
- package/node_modules/openai/resources/evals/runs/runs.mjs.map +1 -1
- package/node_modules/openai/resources/graders/grader-models.d.mts +6 -13
- package/node_modules/openai/resources/graders/grader-models.d.mts.map +1 -1
- package/node_modules/openai/resources/graders/grader-models.d.ts +6 -13
- package/node_modules/openai/resources/graders/grader-models.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/calls.d.mts +1 -1
- package/node_modules/openai/resources/realtime/calls.d.mts.map +1 -1
- package/node_modules/openai/resources/realtime/calls.d.ts +1 -1
- package/node_modules/openai/resources/realtime/calls.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.mts +5 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.mts.map +1 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.ts +5 -1
- package/node_modules/openai/resources/realtime/client-secrets.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.d.mts +9 -1
- package/node_modules/openai/resources/realtime/realtime.d.mts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.d.ts +9 -1
- package/node_modules/openai/resources/realtime/realtime.d.ts.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.js.map +1 -1
- package/node_modules/openai/resources/realtime/realtime.mjs.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.mts +9 -2
- package/node_modules/openai/resources/responses/input-tokens.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.ts +9 -2
- package/node_modules/openai/resources/responses/input-tokens.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.mts +827 -33
- package/node_modules/openai/resources/responses/responses.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.ts +827 -33
- package/node_modules/openai/resources/responses/responses.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.js +1 -1
- package/node_modules/openai/resources/responses/responses.js.map +1 -1
- package/node_modules/openai/resources/responses/responses.mjs +1 -1
- package/node_modules/openai/resources/responses/responses.mjs.map +1 -1
- package/node_modules/openai/resources/shared.d.mts +24 -29
- package/node_modules/openai/resources/shared.d.mts.map +1 -1
- package/node_modules/openai/resources/shared.d.ts +24 -29
- package/node_modules/openai/resources/shared.d.ts.map +1 -1
- package/node_modules/openai/src/azure.ts +5 -1
- package/node_modules/openai/src/client.ts +13 -5
- package/node_modules/openai/src/core/streaming.ts +36 -8
- package/node_modules/openai/src/core/uploads.ts +6 -1
- package/node_modules/openai/src/helpers/audio.ts +18 -4
- package/node_modules/openai/src/helpers/standard-schema.ts +570 -0
- package/node_modules/openai/src/helpers/zod.ts +218 -50
- package/node_modules/openai/src/index.ts +1 -1
- package/node_modules/openai/src/internal/headers.ts +7 -3
- package/node_modules/openai/src/internal/uploads.ts +214 -4
- package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +75 -10
- package/node_modules/openai/src/lib/AssistantStream.ts +4 -3
- package/node_modules/openai/src/lib/ChatCompletionRunner.ts +46 -6
- package/node_modules/openai/src/lib/ChatCompletionStream.ts +171 -25
- package/node_modules/openai/src/lib/ChatCompletionStreamingRunner.ts +144 -7
- package/node_modules/openai/src/lib/EventStream.ts +114 -4
- package/node_modules/openai/src/lib/ResponsesParser.ts +7 -5
- package/node_modules/openai/src/lib/RunnableFunction.ts +60 -31
- package/node_modules/openai/src/lib/jsonschema.ts +3 -0
- package/node_modules/openai/src/lib/parser.ts +4 -0
- package/node_modules/openai/src/lib/responses/ResponseAccumulator.ts +10 -1
- package/node_modules/openai/src/lib/responses/ResponseInputItems.ts +2 -0
- package/node_modules/openai/src/lib/responses/ResponseStream.ts +29 -1
- package/node_modules/openai/src/lib/transform.ts +1930 -103
- package/node_modules/openai/src/resources/admin/organization/audit-logs.ts +169 -1
- package/node_modules/openai/src/resources/admin/organization/index.ts +6 -0
- package/node_modules/openai/src/resources/admin/organization/organization.ts +16 -0
- package/node_modules/openai/src/resources/admin/organization/projects/api-keys.ts +15 -1
- package/node_modules/openai/src/resources/admin/organization/projects/index.ts +7 -1
- package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +29 -13
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/api-keys.ts +80 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/index.ts +15 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +284 -0
- package/node_modules/openai/src/resources/admin/organization/projects/service-accounts.ts +1 -264
- package/node_modules/openai/src/resources/admin/organization/projects/spend-limit.ts +156 -0
- package/node_modules/openai/src/resources/admin/organization/spend-limit.ts +144 -0
- package/node_modules/openai/src/resources/admin/organization/usage.ts +616 -88
- package/node_modules/openai/src/resources/beta/assistants.ts +12 -26
- package/node_modules/openai/src/resources/beta/beta.ts +330 -2
- package/node_modules/openai/src/resources/beta/index.ts +163 -0
- package/node_modules/openai/src/resources/beta/responses/index.ts +169 -0
- package/node_modules/openai/src/resources/beta/responses/input-items.ts +105 -0
- package/node_modules/openai/src/resources/beta/responses/input-tokens.ts +249 -0
- package/node_modules/openai/src/resources/beta/responses/internal-base.ts +117 -0
- package/node_modules/openai/src/resources/beta/responses/responses.ts +12644 -0
- package/node_modules/openai/src/resources/beta/responses/ws-base.ts +615 -0
- package/node_modules/openai/src/resources/beta/responses/ws.ts +38 -0
- package/node_modules/openai/src/resources/beta/responses.ts +3 -0
- package/node_modules/openai/src/resources/beta/threads/runs/runs.ts +6 -13
- package/node_modules/openai/src/resources/chat/completions/completions.ts +241 -26
- package/node_modules/openai/src/resources/completions.ts +5 -0
- package/node_modules/openai/src/resources/conversations/conversations.ts +21 -0
- package/node_modules/openai/src/resources/conversations/items.ts +56 -0
- package/node_modules/openai/src/resources/evals/runs/runs.ts +66 -143
- package/node_modules/openai/src/resources/graders/grader-models.ts +6 -13
- package/node_modules/openai/src/resources/realtime/calls.ts +2 -0
- package/node_modules/openai/src/resources/realtime/client-secrets.ts +7 -0
- package/node_modules/openai/src/resources/realtime/realtime.ts +12 -0
- package/node_modules/openai/src/resources/responses/input-tokens.ts +10 -1
- package/node_modules/openai/src/resources/responses/responses.ts +962 -24
- package/node_modules/openai/src/resources/shared.ts +27 -28
- package/node_modules/openai/src/version.ts +1 -1
- package/node_modules/openai/version.d.mts +1 -1
- package/node_modules/openai/version.d.ts +1 -1
- package/node_modules/openai/version.js +1 -1
- package/node_modules/openai/version.mjs +1 -1
- package/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/process-warning/README.md +41 -2
- package/node_modules/process-warning/index.js +85 -17
- package/node_modules/process-warning/package.json +6 -7
- package/node_modules/process-warning/test/emit-once-only.test.js +3 -3
- package/node_modules/process-warning/test/emit-reset.test.js +4 -4
- package/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
- package/node_modules/process-warning/test/spy-warning.test.js +143 -0
- package/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/process-warning/types/index.tst.ts +48 -0
- package/node_modules/tar-fs/index.js +39 -10
- package/node_modules/tar-fs/package.json +6 -1
- package/node_modules/tar-fs/test/index.js +111 -0
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/package.json +6 -6
- 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 -702
- 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 -670
- package/node_modules/@hono/node-server/dist/listener.mjs +0 -635
- 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 -238
- package/node_modules/@hono/node-server/dist/request.mjs +0 -206
- 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 -112
- package/node_modules/@hono/node-server/dist/response.mjs +0 -85
- 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 -696
- package/node_modules/@hono/node-server/dist/server.mjs +0 -660
- 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 -677
- package/node_modules/@hono/node-server/dist/vercel.mjs +0 -640
- package/node_modules/fast-copy/CHANGELOG.md +0 -176
- package/node_modules/fast-copy/dist/cjs/copier.d.cts +0 -75
- package/node_modules/fast-copy/dist/cjs/options.d.cts +0 -69
- package/node_modules/fast-copy/dist/cjs/utils.d.cts +0 -13
- package/node_modules/fast-copy/dist/es/copier.d.mts +0 -75
- package/node_modules/fast-copy/dist/es/options.d.mts +0 -69
- package/node_modules/fast-copy/dist/es/utils.d.mts +0 -13
- package/node_modules/fast-copy/dist/umd/copier.d.ts +0 -72
- package/node_modules/fast-copy/dist/umd/options.d.ts +0 -65
- package/node_modules/fast-copy/dist/umd/utils.d.ts +0 -13
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
- package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -31
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
- package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
- package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
- package/node_modules/process-warning/types/index.test-d.ts +0 -36
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.standardResponseFormat = standardResponseFormat;
|
|
4
|
+
exports.standardTextFormat = standardTextFormat;
|
|
5
|
+
exports.standardFunction = standardFunction;
|
|
6
|
+
exports.standardResponsesFunction = standardResponsesFunction;
|
|
7
|
+
const error_1 = require("../error.js");
|
|
8
|
+
const parser_1 = require("../lib/parser.js");
|
|
9
|
+
const ResponsesParser_1 = require("../lib/ResponsesParser.js");
|
|
10
|
+
const transform_1 = require("../lib/transform.js");
|
|
11
|
+
function isPromiseLike(value) {
|
|
12
|
+
return typeof value === 'object' && value !== null && 'then' in value && typeof value.then === 'function';
|
|
13
|
+
}
|
|
14
|
+
function formatStandardSchemaIssues(issues) {
|
|
15
|
+
return issues
|
|
16
|
+
.map((issue) => {
|
|
17
|
+
const path = issue.path
|
|
18
|
+
?.map((segment) => typeof segment === 'object' && segment !== null && 'key' in segment ? segment.key : segment)
|
|
19
|
+
.map(String)
|
|
20
|
+
.join('.');
|
|
21
|
+
return path ? `${path}: ${issue.message}` : issue.message;
|
|
22
|
+
})
|
|
23
|
+
.join('; ');
|
|
24
|
+
}
|
|
25
|
+
const JSON_SCHEMA_TYPES = new Set(['string', 'number', 'integer', 'boolean', 'object', 'array', 'null']);
|
|
26
|
+
function getSchemaTypes(schema) {
|
|
27
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
28
|
+
return undefined;
|
|
29
|
+
const type = schema['type'];
|
|
30
|
+
if (type === undefined) {
|
|
31
|
+
return getLiteralSchemaTypes(schema);
|
|
32
|
+
}
|
|
33
|
+
const types = Array.isArray(type) ? type : [type];
|
|
34
|
+
if (types.length === 0 ||
|
|
35
|
+
!types.every((value) => typeof value === 'string' && JSON_SCHEMA_TYPES.has(value))) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return new Set(types);
|
|
39
|
+
}
|
|
40
|
+
function isJSONPrimitive(value) {
|
|
41
|
+
return (value === null ||
|
|
42
|
+
typeof value === 'string' ||
|
|
43
|
+
typeof value === 'boolean' ||
|
|
44
|
+
(typeof value === 'number' && Number.isFinite(value)));
|
|
45
|
+
}
|
|
46
|
+
function getLiteralValues(schema) {
|
|
47
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
48
|
+
return undefined;
|
|
49
|
+
const record = schema;
|
|
50
|
+
if ('const' in record && isJSONPrimitive(record['const'])) {
|
|
51
|
+
return [record['const']];
|
|
52
|
+
}
|
|
53
|
+
const enumValues = record['enum'];
|
|
54
|
+
if (Array.isArray(enumValues) && enumValues.length > 0 && enumValues.every(isJSONPrimitive)) {
|
|
55
|
+
return enumValues;
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
function getLiteralSchemaTypes(schema) {
|
|
60
|
+
const literalValues = getLiteralValues(schema);
|
|
61
|
+
if (!literalValues)
|
|
62
|
+
return undefined;
|
|
63
|
+
return new Set(literalValues.map((value) => {
|
|
64
|
+
if (value === null)
|
|
65
|
+
return 'null';
|
|
66
|
+
return typeof value;
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
function haveDisjointLiteralValues(left, right) {
|
|
70
|
+
const leftValues = getLiteralValues(left);
|
|
71
|
+
const rightValues = getLiteralValues(right);
|
|
72
|
+
if (!leftValues || !rightValues)
|
|
73
|
+
return false;
|
|
74
|
+
return leftValues.every((leftValue) => !rightValues.some((rightValue) => leftValue === rightValue));
|
|
75
|
+
}
|
|
76
|
+
function schemaTypesOverlap(left, right) {
|
|
77
|
+
return (left === right || (left === 'integer' && right === 'number') || (left === 'number' && right === 'integer'));
|
|
78
|
+
}
|
|
79
|
+
function isObjectOnlySchema(schema) {
|
|
80
|
+
const types = getSchemaTypes(schema);
|
|
81
|
+
return types?.size === 1 && types.has('object');
|
|
82
|
+
}
|
|
83
|
+
function haveDisjointObjectDiscriminator(left, right, root) {
|
|
84
|
+
if (!isObjectOnlySchema(left) || !isObjectOnlySchema(right))
|
|
85
|
+
return false;
|
|
86
|
+
const leftRecord = left;
|
|
87
|
+
const rightRecord = right;
|
|
88
|
+
const leftProperties = leftRecord['properties'];
|
|
89
|
+
const rightProperties = rightRecord['properties'];
|
|
90
|
+
const leftRequired = leftRecord['required'];
|
|
91
|
+
const rightRequired = rightRecord['required'];
|
|
92
|
+
if (!leftProperties ||
|
|
93
|
+
typeof leftProperties !== 'object' ||
|
|
94
|
+
Array.isArray(leftProperties) ||
|
|
95
|
+
!rightProperties ||
|
|
96
|
+
typeof rightProperties !== 'object' ||
|
|
97
|
+
Array.isArray(rightProperties) ||
|
|
98
|
+
!Array.isArray(leftRequired) ||
|
|
99
|
+
!Array.isArray(rightRequired)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
for (const property of leftRequired) {
|
|
103
|
+
if (typeof property === 'string' &&
|
|
104
|
+
rightRequired.includes(property) &&
|
|
105
|
+
haveDisjointLiteralValues(resolveLocalRefForExclusivity(leftProperties[property], root), resolveLocalRefForExclusivity(rightProperties[property], root))) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
function getClosedObjectPropertySet(schema) {
|
|
112
|
+
if (!isObjectOnlySchema(schema))
|
|
113
|
+
return undefined;
|
|
114
|
+
const record = schema;
|
|
115
|
+
const properties = record['properties'];
|
|
116
|
+
const required = record['required'];
|
|
117
|
+
if (record['additionalProperties'] !== false ||
|
|
118
|
+
!properties ||
|
|
119
|
+
typeof properties !== 'object' ||
|
|
120
|
+
Array.isArray(properties) ||
|
|
121
|
+
!Array.isArray(required) ||
|
|
122
|
+
required.some((property) => typeof property !== 'string')) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const propertySet = new Set(Object.keys(properties));
|
|
126
|
+
const requiredProperties = required;
|
|
127
|
+
// A required undeclared property makes a closed branch unsatisfiable, but
|
|
128
|
+
// the strictifier rejects that shape rather than representing it. Keep this
|
|
129
|
+
// exclusivity proof conservative and let the normal validation path fail.
|
|
130
|
+
if (requiredProperties.some((property) => !propertySet.has(property))) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
return { properties: propertySet, required: requiredProperties };
|
|
134
|
+
}
|
|
135
|
+
function haveDisjointClosedObjectPropertySets(left, right) {
|
|
136
|
+
const leftShape = getClosedObjectPropertySet(left);
|
|
137
|
+
const rightShape = getClosedObjectPropertySet(right);
|
|
138
|
+
if (!leftShape || !rightShape)
|
|
139
|
+
return false;
|
|
140
|
+
// If either closed branch requires a property the other branch does not
|
|
141
|
+
// declare, every instance satisfying the first is rejected by the second as
|
|
142
|
+
// an additional property. This proves oneOf exclusivity without widening
|
|
143
|
+
// overlapping closed shapes.
|
|
144
|
+
return (leftShape.required.some((property) => !rightShape.properties.has(property)) ||
|
|
145
|
+
rightShape.required.some((property) => !leftShape.properties.has(property)));
|
|
146
|
+
}
|
|
147
|
+
function areMutuallyExclusive(left, right, root) {
|
|
148
|
+
const leftTypes = getSchemaTypes(left);
|
|
149
|
+
const rightTypes = getSchemaTypes(right);
|
|
150
|
+
if (leftTypes &&
|
|
151
|
+
rightTypes &&
|
|
152
|
+
[...leftTypes].every((leftType) => [...rightTypes].every((rightType) => !schemaTypesOverlap(leftType, rightType)))) {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
return (haveDisjointLiteralValues(left, right) ||
|
|
156
|
+
haveDisjointObjectDiscriminator(left, right, root) ||
|
|
157
|
+
haveDisjointClosedObjectPropertySets(left, right));
|
|
158
|
+
}
|
|
159
|
+
function resolveLocalRefForExclusivity(schema, root, seenRefs = new Set()) {
|
|
160
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
161
|
+
return schema;
|
|
162
|
+
const record = schema;
|
|
163
|
+
const ref = record['$ref'];
|
|
164
|
+
if (ref !== undefined) {
|
|
165
|
+
// Annotation keywords do not affect Draft 7 validation, so they are safe
|
|
166
|
+
// to retain while proving the referenced branches are mutually exclusive.
|
|
167
|
+
// Keep the proof conservative for every other sibling constraint.
|
|
168
|
+
if (typeof ref !== 'string' || !(0, transform_1.hasOnlyRefAndAnnotations)(record)) {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
if (seenRefs.has(ref))
|
|
172
|
+
return undefined;
|
|
173
|
+
const resolved = (0, transform_1.resolveLocalRef)(root, ref);
|
|
174
|
+
if (resolved === undefined)
|
|
175
|
+
return undefined;
|
|
176
|
+
return resolveLocalRefForExclusivity(resolved, root, new Set([...seenRefs, ref]));
|
|
177
|
+
}
|
|
178
|
+
if (record['allOf'] !== undefined) {
|
|
179
|
+
if (!Array.isArray(record['allOf']))
|
|
180
|
+
return undefined;
|
|
181
|
+
const normalized = (0, transform_1.normalizeObjectAllOfForExclusivity)(record, root);
|
|
182
|
+
if (normalized === undefined)
|
|
183
|
+
return undefined;
|
|
184
|
+
// Flattening a singleton allOf can expose a bare local ref. Feed that
|
|
185
|
+
// result through this same resolver so URI-fragment decoding and the
|
|
186
|
+
// existing local-ref cycle guard still apply before exclusivity analysis.
|
|
187
|
+
return resolveLocalRefForExclusivity(normalized, root, seenRefs);
|
|
188
|
+
}
|
|
189
|
+
return schema;
|
|
190
|
+
}
|
|
191
|
+
function areOneOfBranchesMutuallyExclusive(branches, root) {
|
|
192
|
+
for (let index = 0; index < branches.length; index++) {
|
|
193
|
+
for (let otherIndex = index + 1; otherIndex < branches.length; otherIndex++) {
|
|
194
|
+
const left = resolveLocalRefForExclusivity(branches[index], root);
|
|
195
|
+
const right = resolveLocalRefForExclusivity(branches[otherIndex], root);
|
|
196
|
+
if (left === undefined || right === undefined || !areMutuallyExclusive(left, right, root)) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
function normalizeStructuredOutputSchema(schema) {
|
|
204
|
+
(0, transform_1.assertNoNestedSchemaIds)(schema);
|
|
205
|
+
const normalizedSchema = structuredClone(schema);
|
|
206
|
+
const oneOfSchemas = [];
|
|
207
|
+
const visitedSchemas = new Set();
|
|
208
|
+
const visitSchema = (value) => {
|
|
209
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
210
|
+
return;
|
|
211
|
+
const record = value;
|
|
212
|
+
if (visitedSchemas.has(record))
|
|
213
|
+
return;
|
|
214
|
+
visitedSchemas.add(record);
|
|
215
|
+
if (record['oneOf'] !== undefined) {
|
|
216
|
+
if (!Array.isArray(record['oneOf'])) {
|
|
217
|
+
throw new error_1.OpenAIError('Standard JSON Schema generated an invalid `oneOf`, which cannot be represented in an OpenAI strict schema');
|
|
218
|
+
}
|
|
219
|
+
if (record['anyOf'] !== undefined) {
|
|
220
|
+
throw new error_1.OpenAIError('Standard JSON Schema generated both `anyOf` and `oneOf`, which cannot be represented in an OpenAI strict schema');
|
|
221
|
+
}
|
|
222
|
+
// `false` can never validate, so it cannot overlap another oneOf
|
|
223
|
+
// branch. Keep it in place until the existing anyOf normalization runs
|
|
224
|
+
// so local refs into surviving branch indices can be rewritten before
|
|
225
|
+
// the impossible alternatives are removed.
|
|
226
|
+
const possibleBranches = record['oneOf'].filter((branch) => branch !== false);
|
|
227
|
+
if (!areOneOfBranchesMutuallyExclusive(possibleBranches, normalizedSchema)) {
|
|
228
|
+
throw new error_1.OpenAIError('Standard JSON Schema generated a `oneOf` whose branches are not provably mutually exclusive. OpenAI strict schemas do not support `oneOf`; use `anyOf` or add a discriminator with distinct literal values.');
|
|
229
|
+
}
|
|
230
|
+
oneOfSchemas.push(record);
|
|
231
|
+
}
|
|
232
|
+
(0, transform_1.forEachJSONSchemaChild)(record, [], (child) => visitSchema(child));
|
|
233
|
+
};
|
|
234
|
+
visitSchema(normalizedSchema);
|
|
235
|
+
(0, transform_1.rewriteLocalRefsIntoMovedOneOfBranches)(normalizedSchema);
|
|
236
|
+
for (const record of oneOfSchemas) {
|
|
237
|
+
record['anyOf'] = record['oneOf'];
|
|
238
|
+
delete record['oneOf'];
|
|
239
|
+
}
|
|
240
|
+
return normalizedSchema;
|
|
241
|
+
}
|
|
242
|
+
function parseStandardSchema(standardSchema, content) {
|
|
243
|
+
const result = standardSchema['~standard'].validate(JSON.parse(content));
|
|
244
|
+
if (isPromiseLike(result)) {
|
|
245
|
+
void Promise.resolve(result).catch(() => undefined);
|
|
246
|
+
throw new error_1.OpenAIError('Standard Schema helpers only support synchronous validation. Use a schema with a synchronous `~standard.validate()` implementation.');
|
|
247
|
+
}
|
|
248
|
+
if (result.issues) {
|
|
249
|
+
throw new error_1.OpenAIError(`Standard Schema validation failed: ${formatStandardSchemaIssues(result.issues)}`);
|
|
250
|
+
}
|
|
251
|
+
return result.value;
|
|
252
|
+
}
|
|
253
|
+
function resolveStandardJSONSchema(standardSchema, schemaOverride) {
|
|
254
|
+
const schema = (schemaOverride ?? standardSchema['~standard'].jsonSchema?.input({ target: 'draft-07' }));
|
|
255
|
+
if (!schema) {
|
|
256
|
+
throw new error_1.OpenAIError('Standard Schema helpers require a JSON Schema. Pass `schema` or use a schema that implements `~standard.jsonSchema.input()`.');
|
|
257
|
+
}
|
|
258
|
+
return (0, transform_1.toStrictJsonSchema)(normalizeStructuredOutputSchema(schema));
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Creates a chat completion `JSONSchema` response format from a Standard
|
|
262
|
+
* Schema validator.
|
|
263
|
+
*
|
|
264
|
+
* The helper uses `~standard.jsonSchema.input()` for the model-facing schema
|
|
265
|
+
* and `~standard.validate()` for parsed output. Validation must be
|
|
266
|
+
* synchronous because the SDK's parse helpers are synchronous.
|
|
267
|
+
*/
|
|
268
|
+
function standardResponseFormat(standardSchema, name, props) {
|
|
269
|
+
const { schema, ...formatProps } = props ?? {};
|
|
270
|
+
return (0, parser_1.makeParseableResponseFormat)({
|
|
271
|
+
type: 'json_schema',
|
|
272
|
+
json_schema: {
|
|
273
|
+
...formatProps,
|
|
274
|
+
name,
|
|
275
|
+
strict: true,
|
|
276
|
+
schema: resolveStandardJSONSchema(standardSchema, schema),
|
|
277
|
+
},
|
|
278
|
+
}, (content) => parseStandardSchema(standardSchema, content));
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Creates a Responses API `json_schema` text format from a Standard Schema
|
|
282
|
+
* validator.
|
|
283
|
+
*/
|
|
284
|
+
function standardTextFormat(standardSchema, name, props) {
|
|
285
|
+
const { schema, ...formatProps } = props ?? {};
|
|
286
|
+
return (0, parser_1.makeParseableTextFormat)({
|
|
287
|
+
type: 'json_schema',
|
|
288
|
+
...formatProps,
|
|
289
|
+
name,
|
|
290
|
+
strict: true,
|
|
291
|
+
schema: resolveStandardJSONSchema(standardSchema, schema),
|
|
292
|
+
}, (content) => parseStandardSchema(standardSchema, content));
|
|
293
|
+
}
|
|
294
|
+
function standardFunction(options) {
|
|
295
|
+
return (0, parser_1.makeParseableTool)({
|
|
296
|
+
type: 'function',
|
|
297
|
+
function: {
|
|
298
|
+
name: options.name,
|
|
299
|
+
parameters: resolveStandardJSONSchema(options.parameters, options.schema),
|
|
300
|
+
strict: true,
|
|
301
|
+
...(options.description ? { description: options.description } : undefined),
|
|
302
|
+
},
|
|
303
|
+
}, {
|
|
304
|
+
callback: options.function,
|
|
305
|
+
parser: (args) => parseStandardSchema(options.parameters, args),
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function standardResponsesFunction(options) {
|
|
309
|
+
return (0, ResponsesParser_1.makeParseableResponseTool)({
|
|
310
|
+
type: 'function',
|
|
311
|
+
name: options.name,
|
|
312
|
+
parameters: resolveStandardJSONSchema(options.parameters, options.schema),
|
|
313
|
+
strict: true,
|
|
314
|
+
...(options.description ? { description: options.description } : undefined),
|
|
315
|
+
}, {
|
|
316
|
+
callback: options.function,
|
|
317
|
+
parser: (args) => parseStandardSchema(options.parameters, args),
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
//# sourceMappingURL=standard-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-schema.js","sourceRoot":"","sources":["../src/helpers/standard-schema.ts"],"names":[],"mappings":";;AAwcA,wDAmBC;AAMD,gDAiBC;AAkBD,4CAkBC;AAmBD,8DAgBC;AAzjBD,uCAAuC;AACvC,6CAOuB;AACvB,+DAA8F;AAE9F,mDAQ0B;AA4F1B,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AAC5G,CAAC;AAED,SAAS,0BAA0B,CAAC,MAA0C;IAC5E,OAAO,MAAM;SACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI;YACrB,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAChB,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAC5F;aACA,GAAG,CAAC,MAAM,CAAC;aACX,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;IAC5D,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,Q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AE,UAAU;QAChB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC;QACzE,MAAM,EAAE,IAAI;QACZ,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KAC5E,EACD;QACE,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC;KAChE,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { OpenAIError } from "../error.mjs";
|
|
2
|
+
import { makeParseableResponseFormat, makeParseableTextFormat, makeParseableTool, } from "../lib/parser.mjs";
|
|
3
|
+
import { makeParseableResponseTool } from "../lib/ResponsesParser.mjs";
|
|
4
|
+
import { assertNoNestedSchemaIds, forEachJSONSchemaChild, hasOnlyRefAndAnnotations, normalizeObjectAllOfForExclusivity, resolveLocalRef, rewriteLocalRefsIntoMovedOneOfBranches, toStrictJsonSchema, } from "../lib/transform.mjs";
|
|
5
|
+
function isPromiseLike(value) {
|
|
6
|
+
return typeof value === 'object' && value !== null && 'then' in value && typeof value.then === 'function';
|
|
7
|
+
}
|
|
8
|
+
function formatStandardSchemaIssues(issues) {
|
|
9
|
+
return issues
|
|
10
|
+
.map((issue) => {
|
|
11
|
+
const path = issue.path
|
|
12
|
+
?.map((segment) => typeof segment === 'object' && segment !== null && 'key' in segment ? segment.key : segment)
|
|
13
|
+
.map(String)
|
|
14
|
+
.join('.');
|
|
15
|
+
return path ? `${path}: ${issue.message}` : issue.message;
|
|
16
|
+
})
|
|
17
|
+
.join('; ');
|
|
18
|
+
}
|
|
19
|
+
const JSON_SCHEMA_TYPES = new Set(['string', 'number', 'integer', 'boolean', 'object', 'array', 'null']);
|
|
20
|
+
function getSchemaTypes(schema) {
|
|
21
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
22
|
+
return undefined;
|
|
23
|
+
const type = schema['type'];
|
|
24
|
+
if (type === undefined) {
|
|
25
|
+
return getLiteralSchemaTypes(schema);
|
|
26
|
+
}
|
|
27
|
+
const types = Array.isArray(type) ? type : [type];
|
|
28
|
+
if (types.length === 0 ||
|
|
29
|
+
!types.every((value) => typeof value === 'string' && JSON_SCHEMA_TYPES.has(value))) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return new Set(types);
|
|
33
|
+
}
|
|
34
|
+
function isJSONPrimitive(value) {
|
|
35
|
+
return (value === null ||
|
|
36
|
+
typeof value === 'string' ||
|
|
37
|
+
typeof value === 'boolean' ||
|
|
38
|
+
(typeof value === 'number' && Number.isFinite(value)));
|
|
39
|
+
}
|
|
40
|
+
function getLiteralValues(schema) {
|
|
41
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
42
|
+
return undefined;
|
|
43
|
+
const record = schema;
|
|
44
|
+
if ('const' in record && isJSONPrimitive(record['const'])) {
|
|
45
|
+
return [record['const']];
|
|
46
|
+
}
|
|
47
|
+
const enumValues = record['enum'];
|
|
48
|
+
if (Array.isArray(enumValues) && enumValues.length > 0 && enumValues.every(isJSONPrimitive)) {
|
|
49
|
+
return enumValues;
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
function getLiteralSchemaTypes(schema) {
|
|
54
|
+
const literalValues = getLiteralValues(schema);
|
|
55
|
+
if (!literalValues)
|
|
56
|
+
return undefined;
|
|
57
|
+
return new Set(literalValues.map((value) => {
|
|
58
|
+
if (value === null)
|
|
59
|
+
return 'null';
|
|
60
|
+
return typeof value;
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
function haveDisjointLiteralValues(left, right) {
|
|
64
|
+
const leftValues = getLiteralValues(left);
|
|
65
|
+
const rightValues = getLiteralValues(right);
|
|
66
|
+
if (!leftValues || !rightValues)
|
|
67
|
+
return false;
|
|
68
|
+
return leftValues.every((leftValue) => !rightValues.some((rightValue) => leftValue === rightValue));
|
|
69
|
+
}
|
|
70
|
+
function schemaTypesOverlap(left, right) {
|
|
71
|
+
return (left === right || (left === 'integer' && right === 'number') || (left === 'number' && right === 'integer'));
|
|
72
|
+
}
|
|
73
|
+
function isObjectOnlySchema(schema) {
|
|
74
|
+
const types = getSchemaTypes(schema);
|
|
75
|
+
return types?.size === 1 && types.has('object');
|
|
76
|
+
}
|
|
77
|
+
function haveDisjointObjectDiscriminator(left, right, root) {
|
|
78
|
+
if (!isObjectOnlySchema(left) || !isObjectOnlySchema(right))
|
|
79
|
+
return false;
|
|
80
|
+
const leftRecord = left;
|
|
81
|
+
const rightRecord = right;
|
|
82
|
+
const leftProperties = leftRecord['properties'];
|
|
83
|
+
const rightProperties = rightRecord['properties'];
|
|
84
|
+
const leftRequired = leftRecord['required'];
|
|
85
|
+
const rightRequired = rightRecord['required'];
|
|
86
|
+
if (!leftProperties ||
|
|
87
|
+
typeof leftProperties !== 'object' ||
|
|
88
|
+
Array.isArray(leftProperties) ||
|
|
89
|
+
!rightProperties ||
|
|
90
|
+
typeof rightProperties !== 'object' ||
|
|
91
|
+
Array.isArray(rightProperties) ||
|
|
92
|
+
!Array.isArray(leftRequired) ||
|
|
93
|
+
!Array.isArray(rightRequired)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
for (const property of leftRequired) {
|
|
97
|
+
if (typeof property === 'string' &&
|
|
98
|
+
rightRequired.includes(property) &&
|
|
99
|
+
haveDisjointLiteralValues(resolveLocalRefForExclusivity(leftProperties[property], root), resolveLocalRefForExclusivity(rightProperties[property], root))) {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
function getClosedObjectPropertySet(schema) {
|
|
106
|
+
if (!isObjectOnlySchema(schema))
|
|
107
|
+
return undefined;
|
|
108
|
+
const record = schema;
|
|
109
|
+
const properties = record['properties'];
|
|
110
|
+
const required = record['required'];
|
|
111
|
+
if (record['additionalProperties'] !== false ||
|
|
112
|
+
!properties ||
|
|
113
|
+
typeof properties !== 'object' ||
|
|
114
|
+
Array.isArray(properties) ||
|
|
115
|
+
!Array.isArray(required) ||
|
|
116
|
+
required.some((property) => typeof property !== 'string')) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
const propertySet = new Set(Object.keys(properties));
|
|
120
|
+
const requiredProperties = required;
|
|
121
|
+
// A required undeclared property makes a closed branch unsatisfiable, but
|
|
122
|
+
// the strictifier rejects that shape rather than representing it. Keep this
|
|
123
|
+
// exclusivity proof conservative and let the normal validation path fail.
|
|
124
|
+
if (requiredProperties.some((property) => !propertySet.has(property))) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
return { properties: propertySet, required: requiredProperties };
|
|
128
|
+
}
|
|
129
|
+
function haveDisjointClosedObjectPropertySets(left, right) {
|
|
130
|
+
const leftShape = getClosedObjectPropertySet(left);
|
|
131
|
+
const rightShape = getClosedObjectPropertySet(right);
|
|
132
|
+
if (!leftShape || !rightShape)
|
|
133
|
+
return false;
|
|
134
|
+
// If either closed branch requires a property the other branch does not
|
|
135
|
+
// declare, every instance satisfying the first is rejected by the second as
|
|
136
|
+
// an additional property. This proves oneOf exclusivity without widening
|
|
137
|
+
// overlapping closed shapes.
|
|
138
|
+
return (leftShape.required.some((property) => !rightShape.properties.has(property)) ||
|
|
139
|
+
rightShape.required.some((property) => !leftShape.properties.has(property)));
|
|
140
|
+
}
|
|
141
|
+
function areMutuallyExclusive(left, right, root) {
|
|
142
|
+
const leftTypes = getSchemaTypes(left);
|
|
143
|
+
const rightTypes = getSchemaTypes(right);
|
|
144
|
+
if (leftTypes &&
|
|
145
|
+
rightTypes &&
|
|
146
|
+
[...leftTypes].every((leftType) => [...rightTypes].every((rightType) => !schemaTypesOverlap(leftType, rightType)))) {
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
149
|
+
return (haveDisjointLiteralValues(left, right) ||
|
|
150
|
+
haveDisjointObjectDiscriminator(left, right, root) ||
|
|
151
|
+
haveDisjointClosedObjectPropertySets(left, right));
|
|
152
|
+
}
|
|
153
|
+
function resolveLocalRefForExclusivity(schema, root, seenRefs = new Set()) {
|
|
154
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
155
|
+
return schema;
|
|
156
|
+
const record = schema;
|
|
157
|
+
const ref = record['$ref'];
|
|
158
|
+
if (ref !== undefined) {
|
|
159
|
+
// Annotation keywords do not affect Draft 7 validation, so they are safe
|
|
160
|
+
// to retain while proving the referenced branches are mutually exclusive.
|
|
161
|
+
// Keep the proof conservative for every other sibling constraint.
|
|
162
|
+
if (typeof ref !== 'string' || !hasOnlyRefAndAnnotations(record)) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
if (seenRefs.has(ref))
|
|
166
|
+
return undefined;
|
|
167
|
+
const resolved = resolveLocalRef(root, ref);
|
|
168
|
+
if (resolved === undefined)
|
|
169
|
+
return undefined;
|
|
170
|
+
return resolveLocalRefForExclusivity(resolved, root, new Set([...seenRefs, ref]));
|
|
171
|
+
}
|
|
172
|
+
if (record['allOf'] !== undefined) {
|
|
173
|
+
if (!Array.isArray(record['allOf']))
|
|
174
|
+
return undefined;
|
|
175
|
+
const normalized = normalizeObjectAllOfForExclusivity(record, root);
|
|
176
|
+
if (normalized === undefined)
|
|
177
|
+
return undefined;
|
|
178
|
+
// Flattening a singleton allOf can expose a bare local ref. Feed that
|
|
179
|
+
// result through this same resolver so URI-fragment decoding and the
|
|
180
|
+
// existing local-ref cycle guard still apply before exclusivity analysis.
|
|
181
|
+
return resolveLocalRefForExclusivity(normalized, root, seenRefs);
|
|
182
|
+
}
|
|
183
|
+
return schema;
|
|
184
|
+
}
|
|
185
|
+
function areOneOfBranchesMutuallyExclusive(branches, root) {
|
|
186
|
+
for (let index = 0; index < branches.length; index++) {
|
|
187
|
+
for (let otherIndex = index + 1; otherIndex < branches.length; otherIndex++) {
|
|
188
|
+
const left = resolveLocalRefForExclusivity(branches[index], root);
|
|
189
|
+
const right = resolveLocalRefForExclusivity(branches[otherIndex], root);
|
|
190
|
+
if (left === undefined || right === undefined || !areMutuallyExclusive(left, right, root)) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
function normalizeStructuredOutputSchema(schema) {
|
|
198
|
+
assertNoNestedSchemaIds(schema);
|
|
199
|
+
const normalizedSchema = structuredClone(schema);
|
|
200
|
+
const oneOfSchemas = [];
|
|
201
|
+
const visitedSchemas = new Set();
|
|
202
|
+
const visitSchema = (value) => {
|
|
203
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
204
|
+
return;
|
|
205
|
+
const record = value;
|
|
206
|
+
if (visitedSchemas.has(record))
|
|
207
|
+
return;
|
|
208
|
+
visitedSchemas.add(record);
|
|
209
|
+
if (record['oneOf'] !== undefined) {
|
|
210
|
+
if (!Array.isArray(record['oneOf'])) {
|
|
211
|
+
throw new OpenAIError('Standard JSON Schema generated an invalid `oneOf`, which cannot be represented in an OpenAI strict schema');
|
|
212
|
+
}
|
|
213
|
+
if (record['anyOf'] !== undefined) {
|
|
214
|
+
throw new OpenAIError('Standard JSON Schema generated both `anyOf` and `oneOf`, which cannot be represented in an OpenAI strict schema');
|
|
215
|
+
}
|
|
216
|
+
// `false` can never validate, so it cannot overlap another oneOf
|
|
217
|
+
// branch. Keep it in place until the existing anyOf normalization runs
|
|
218
|
+
// so local refs into surviving branch indices can be rewritten before
|
|
219
|
+
// the impossible alternatives are removed.
|
|
220
|
+
const possibleBranches = record['oneOf'].filter((branch) => branch !== false);
|
|
221
|
+
if (!areOneOfBranchesMutuallyExclusive(possibleBranches, normalizedSchema)) {
|
|
222
|
+
throw new OpenAIError('Standard JSON Schema generated a `oneOf` whose branches are not provably mutually exclusive. OpenAI strict schemas do not support `oneOf`; use `anyOf` or add a discriminator with distinct literal values.');
|
|
223
|
+
}
|
|
224
|
+
oneOfSchemas.push(record);
|
|
225
|
+
}
|
|
226
|
+
forEachJSONSchemaChild(record, [], (child) => visitSchema(child));
|
|
227
|
+
};
|
|
228
|
+
visitSchema(normalizedSchema);
|
|
229
|
+
rewriteLocalRefsIntoMovedOneOfBranches(normalizedSchema);
|
|
230
|
+
for (const record of oneOfSchemas) {
|
|
231
|
+
record['anyOf'] = record['oneOf'];
|
|
232
|
+
delete record['oneOf'];
|
|
233
|
+
}
|
|
234
|
+
return normalizedSchema;
|
|
235
|
+
}
|
|
236
|
+
function parseStandardSchema(standardSchema, content) {
|
|
237
|
+
const result = standardSchema['~standard'].validate(JSON.parse(content));
|
|
238
|
+
if (isPromiseLike(result)) {
|
|
239
|
+
void Promise.resolve(result).catch(() => undefined);
|
|
240
|
+
throw new OpenAIError('Standard Schema helpers only support synchronous validation. Use a schema with a synchronous `~standard.validate()` implementation.');
|
|
241
|
+
}
|
|
242
|
+
if (result.issues) {
|
|
243
|
+
throw new OpenAIError(`Standard Schema validation failed: ${formatStandardSchemaIssues(result.issues)}`);
|
|
244
|
+
}
|
|
245
|
+
return result.value;
|
|
246
|
+
}
|
|
247
|
+
function resolveStandardJSONSchema(standardSchema, schemaOverride) {
|
|
248
|
+
const schema = (schemaOverride ?? standardSchema['~standard'].jsonSchema?.input({ target: 'draft-07' }));
|
|
249
|
+
if (!schema) {
|
|
250
|
+
throw new OpenAIError('Standard Schema helpers require a JSON Schema. Pass `schema` or use a schema that implements `~standard.jsonSchema.input()`.');
|
|
251
|
+
}
|
|
252
|
+
return toStrictJsonSchema(normalizeStructuredOutputSchema(schema));
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Creates a chat completion `JSONSchema` response format from a Standard
|
|
256
|
+
* Schema validator.
|
|
257
|
+
*
|
|
258
|
+
* The helper uses `~standard.jsonSchema.input()` for the model-facing schema
|
|
259
|
+
* and `~standard.validate()` for parsed output. Validation must be
|
|
260
|
+
* synchronous because the SDK's parse helpers are synchronous.
|
|
261
|
+
*/
|
|
262
|
+
export function standardResponseFormat(standardSchema, name, props) {
|
|
263
|
+
const { schema, ...formatProps } = props ?? {};
|
|
264
|
+
return makeParseableResponseFormat({
|
|
265
|
+
type: 'json_schema',
|
|
266
|
+
json_schema: {
|
|
267
|
+
...formatProps,
|
|
268
|
+
name,
|
|
269
|
+
strict: true,
|
|
270
|
+
schema: resolveStandardJSONSchema(standardSchema, schema),
|
|
271
|
+
},
|
|
272
|
+
}, (content) => parseStandardSchema(standardSchema, content));
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Creates a Responses API `json_schema` text format from a Standard Schema
|
|
276
|
+
* validator.
|
|
277
|
+
*/
|
|
278
|
+
export function standardTextFormat(standardSchema, name, props) {
|
|
279
|
+
const { schema, ...formatProps } = props ?? {};
|
|
280
|
+
return makeParseableTextFormat({
|
|
281
|
+
type: 'json_schema',
|
|
282
|
+
...formatProps,
|
|
283
|
+
name,
|
|
284
|
+
strict: true,
|
|
285
|
+
schema: resolveStandardJSONSchema(standardSchema, schema),
|
|
286
|
+
}, (content) => parseStandardSchema(standardSchema, content));
|
|
287
|
+
}
|
|
288
|
+
export function standardFunction(options) {
|
|
289
|
+
return makeParseableTool({
|
|
290
|
+
type: 'function',
|
|
291
|
+
function: {
|
|
292
|
+
name: options.name,
|
|
293
|
+
parameters: resolveStandardJSONSchema(options.parameters, options.schema),
|
|
294
|
+
strict: true,
|
|
295
|
+
...(options.description ? { description: options.description } : undefined),
|
|
296
|
+
},
|
|
297
|
+
}, {
|
|
298
|
+
callback: options.function,
|
|
299
|
+
parser: (args) => parseStandardSchema(options.parameters, args),
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
export function standardResponsesFunction(options) {
|
|
303
|
+
return makeParseableResponseTool({
|
|
304
|
+
type: 'function',
|
|
305
|
+
name: options.name,
|
|
306
|
+
parameters: resolveStandardJSONSchema(options.parameters, options.schema),
|
|
307
|
+
strict: true,
|
|
308
|
+
...(options.description ? { description: options.description } : undefined),
|
|
309
|
+
}, {
|
|
310
|
+
callback: options.function,
|
|
311
|
+
parser: (args) => parseStandardSchema(options.parameters, args),
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=standard-schema.mjs.map
|