@dalmia/calibrate-mcp 0.0.13
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/bin/mcp-server.js +58818 -0
- package/bin/mcp-server.js.map +470 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/agentTestsGetRun.d.ts +16 -0
- package/esm/funcs/agentTestsGetRun.d.ts.map +1 -0
- package/esm/funcs/agentTestsGetRun.js +95 -0
- package/esm/funcs/agentTestsGetRun.js.map +1 -0
- package/esm/funcs/agentTestsRun.d.ts +16 -0
- package/esm/funcs/agentTestsRun.d.ts.map +1 -0
- package/esm/funcs/agentTestsRun.js +96 -0
- package/esm/funcs/agentTestsRun.js.map +1 -0
- package/esm/funcs/agentTestsRunBatch.d.ts +16 -0
- package/esm/funcs/agentTestsRunBatch.d.ts.map +1 -0
- package/esm/funcs/agentTestsRunBatch.js +90 -0
- package/esm/funcs/agentTestsRunBatch.js.map +1 -0
- package/esm/funcs/agentsCreate.d.ts +16 -0
- package/esm/funcs/agentsCreate.d.ts.map +1 -0
- package/esm/funcs/agentsCreate.js +90 -0
- package/esm/funcs/agentsCreate.js.map +1 -0
- package/esm/funcs/agentsGet.d.ts +16 -0
- package/esm/funcs/agentsGet.d.ts.map +1 -0
- package/esm/funcs/agentsGet.js +95 -0
- package/esm/funcs/agentsGet.js.map +1 -0
- package/esm/funcs/agentsList.d.ts +16 -0
- package/esm/funcs/agentsList.d.ts.map +1 -0
- package/esm/funcs/agentsList.js +89 -0
- package/esm/funcs/agentsList.js.map +1 -0
- package/esm/funcs/agentsResolve.d.ts +16 -0
- package/esm/funcs/agentsResolve.d.ts.map +1 -0
- package/esm/funcs/agentsResolve.js +90 -0
- package/esm/funcs/agentsResolve.js.map +1 -0
- package/esm/funcs/agentsUpdate.d.ts +16 -0
- package/esm/funcs/agentsUpdate.d.ts.map +1 -0
- package/esm/funcs/agentsUpdate.js +96 -0
- package/esm/funcs/agentsUpdate.js.map +1 -0
- package/esm/funcs/testsBulkCreate.d.ts +16 -0
- package/esm/funcs/testsBulkCreate.d.ts.map +1 -0
- package/esm/funcs/testsBulkCreate.js +90 -0
- package/esm/funcs/testsBulkCreate.js.map +1 -0
- package/esm/funcs/testsCreate.d.ts +16 -0
- package/esm/funcs/testsCreate.d.ts.map +1 -0
- package/esm/funcs/testsCreate.js +90 -0
- package/esm/funcs/testsCreate.js.map +1 -0
- package/esm/funcs/testsGet.d.ts +16 -0
- package/esm/funcs/testsGet.d.ts.map +1 -0
- package/esm/funcs/testsGet.js +95 -0
- package/esm/funcs/testsGet.js.map +1 -0
- package/esm/funcs/testsList.d.ts +16 -0
- package/esm/funcs/testsList.d.ts.map +1 -0
- package/esm/funcs/testsList.js +89 -0
- package/esm/funcs/testsList.js.map +1 -0
- package/esm/funcs/testsUpdate.d.ts +16 -0
- package/esm/funcs/testsUpdate.d.ts.map +1 -0
- package/esm/funcs/testsUpdate.js +96 -0
- package/esm/funcs/testsUpdate.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +80 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/landing-page.d.ts +5 -0
- package/esm/landing-page.d.ts.map +1 -0
- package/esm/landing-page.js +1059 -0
- package/esm/landing-page.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +29 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +42 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +34 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/encodings.d.ts +53 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +389 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +27 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/primitives.d.ts +12 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +98 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/result.d.ts +31 -0
- package/esm/lib/result.d.ts.map +1 -0
- package/esm/lib/result.js +31 -0
- package/esm/lib/result.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +157 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +19 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +256 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +149 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +22 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/mcp-server/cli/serve/command.d.ts +2 -0
- package/esm/mcp-server/cli/serve/command.d.ts.map +1 -0
- package/esm/mcp-server/cli/serve/command.js +109 -0
- package/esm/mcp-server/cli/serve/command.js.map +1 -0
- package/esm/mcp-server/cli/serve/impl.d.ts +12 -0
- package/esm/mcp-server/cli/serve/impl.d.ts.map +1 -0
- package/esm/mcp-server/cli/serve/impl.js +84 -0
- package/esm/mcp-server/cli/serve/impl.js.map +1 -0
- package/esm/mcp-server/cli/start/command.d.ts +2 -0
- package/esm/mcp-server/cli/start/command.d.ts.map +1 -0
- package/esm/mcp-server/cli/start/command.js +110 -0
- package/esm/mcp-server/cli/start/command.js.map +1 -0
- package/esm/mcp-server/cli/start/impl.d.ts +12 -0
- package/esm/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/esm/mcp-server/cli/start/impl.js +161 -0
- package/esm/mcp-server/cli/start/impl.js.map +1 -0
- package/esm/mcp-server/cli.d.ts +6 -0
- package/esm/mcp-server/cli.d.ts.map +1 -0
- package/esm/mcp-server/cli.js +7 -0
- package/esm/mcp-server/cli.js.map +1 -0
- package/esm/mcp-server/console-logger.d.ts +9 -0
- package/esm/mcp-server/console-logger.d.ts.map +1 -0
- package/esm/mcp-server/console-logger.js +56 -0
- package/esm/mcp-server/console-logger.js.map +1 -0
- package/esm/mcp-server/extensions.d.ts +11 -0
- package/esm/mcp-server/extensions.d.ts.map +1 -0
- package/esm/mcp-server/extensions.js +5 -0
- package/esm/mcp-server/extensions.js.map +1 -0
- package/esm/mcp-server/flags.d.ts +16 -0
- package/esm/mcp-server/flags.d.ts.map +1 -0
- package/esm/mcp-server/flags.js +5 -0
- package/esm/mcp-server/flags.js.map +1 -0
- package/esm/mcp-server/mcp-server.d.ts +2 -0
- package/esm/mcp-server/mcp-server.d.ts.map +1 -0
- package/esm/mcp-server/mcp-server.js +25 -0
- package/esm/mcp-server/mcp-server.js.map +1 -0
- package/esm/mcp-server/prompts.d.ts +23 -0
- package/esm/mcp-server/prompts.d.ts.map +1 -0
- package/esm/mcp-server/prompts.js +47 -0
- package/esm/mcp-server/prompts.js.map +1 -0
- package/esm/mcp-server/resources.d.ts +31 -0
- package/esm/mcp-server/resources.d.ts.map +1 -0
- package/esm/mcp-server/resources.js +55 -0
- package/esm/mcp-server/resources.js.map +1 -0
- package/esm/mcp-server/scopes.d.ts +3 -0
- package/esm/mcp-server/scopes.d.ts.map +1 -0
- package/esm/mcp-server/scopes.js +8 -0
- package/esm/mcp-server/scopes.js.map +1 -0
- package/esm/mcp-server/server.d.ts +24 -0
- package/esm/mcp-server/server.d.ts.map +1 -0
- package/esm/mcp-server/server.js +65 -0
- package/esm/mcp-server/server.js.map +1 -0
- package/esm/mcp-server/shared.d.ts +8 -0
- package/esm/mcp-server/shared.d.ts.map +1 -0
- package/esm/mcp-server/shared.js +61 -0
- package/esm/mcp-server/shared.js.map +1 -0
- package/esm/mcp-server/tools/agentTestsGetRun.d.ts +7 -0
- package/esm/mcp-server/tools/agentTestsGetRun.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentTestsGetRun.js +38 -0
- package/esm/mcp-server/tools/agentTestsGetRun.js.map +1 -0
- package/esm/mcp-server/tools/agentTestsRun.d.ts +7 -0
- package/esm/mcp-server/tools/agentTestsRun.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentTestsRun.js +38 -0
- package/esm/mcp-server/tools/agentTestsRun.js.map +1 -0
- package/esm/mcp-server/tools/agentTestsRunBatch.d.ts +7 -0
- package/esm/mcp-server/tools/agentTestsRunBatch.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentTestsRunBatch.js +38 -0
- package/esm/mcp-server/tools/agentTestsRunBatch.js.map +1 -0
- package/esm/mcp-server/tools/agentsCreate.d.ts +7 -0
- package/esm/mcp-server/tools/agentsCreate.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentsCreate.js +36 -0
- package/esm/mcp-server/tools/agentsCreate.js.map +1 -0
- package/esm/mcp-server/tools/agentsGet.d.ts +7 -0
- package/esm/mcp-server/tools/agentsGet.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentsGet.js +36 -0
- package/esm/mcp-server/tools/agentsGet.js.map +1 -0
- package/esm/mcp-server/tools/agentsList.d.ts +7 -0
- package/esm/mcp-server/tools/agentsList.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentsList.js +37 -0
- package/esm/mcp-server/tools/agentsList.js.map +1 -0
- package/esm/mcp-server/tools/agentsResolve.d.ts +7 -0
- package/esm/mcp-server/tools/agentsResolve.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentsResolve.js +37 -0
- package/esm/mcp-server/tools/agentsResolve.js.map +1 -0
- package/esm/mcp-server/tools/agentsUpdate.d.ts +7 -0
- package/esm/mcp-server/tools/agentsUpdate.d.ts.map +1 -0
- package/esm/mcp-server/tools/agentsUpdate.js +36 -0
- package/esm/mcp-server/tools/agentsUpdate.js.map +1 -0
- package/esm/mcp-server/tools/testsBulkCreate.d.ts +7 -0
- package/esm/mcp-server/tools/testsBulkCreate.d.ts.map +1 -0
- package/esm/mcp-server/tools/testsBulkCreate.js +36 -0
- package/esm/mcp-server/tools/testsBulkCreate.js.map +1 -0
- package/esm/mcp-server/tools/testsCreate.d.ts +7 -0
- package/esm/mcp-server/tools/testsCreate.d.ts.map +1 -0
- package/esm/mcp-server/tools/testsCreate.js +36 -0
- package/esm/mcp-server/tools/testsCreate.js.map +1 -0
- package/esm/mcp-server/tools/testsGet.d.ts +7 -0
- package/esm/mcp-server/tools/testsGet.d.ts.map +1 -0
- package/esm/mcp-server/tools/testsGet.js +36 -0
- package/esm/mcp-server/tools/testsGet.js.map +1 -0
- package/esm/mcp-server/tools/testsList.d.ts +7 -0
- package/esm/mcp-server/tools/testsList.d.ts.map +1 -0
- package/esm/mcp-server/tools/testsList.js +36 -0
- package/esm/mcp-server/tools/testsList.js.map +1 -0
- package/esm/mcp-server/tools/testsUpdate.d.ts +7 -0
- package/esm/mcp-server/tools/testsUpdate.d.ts.map +1 -0
- package/esm/mcp-server/tools/testsUpdate.js +36 -0
- package/esm/mcp-server/tools/testsUpdate.js.map +1 -0
- package/esm/mcp-server/tools.d.ts +56 -0
- package/esm/mcp-server/tools.d.ts.map +1 -0
- package/esm/mcp-server/tools.js +324 -0
- package/esm/mcp-server/tools.js.map +1 -0
- package/esm/models/agentcreate.d.ts +32 -0
- package/esm/models/agentcreate.d.ts.map +1 -0
- package/esm/models/agentcreate.js +24 -0
- package/esm/models/agentcreate.js.map +1 -0
- package/esm/models/agentcreateresponse.d.ts +7 -0
- package/esm/models/agentcreateresponse.d.ts.map +1 -0
- package/esm/models/agentcreateresponse.js +10 -0
- package/esm/models/agentcreateresponse.js.map +1 -0
- package/esm/models/agenttestruncreateresponse.d.ts +23 -0
- package/esm/models/agenttestruncreateresponse.d.ts.map +1 -0
- package/esm/models/agenttestruncreateresponse.js +20 -0
- package/esm/models/agenttestruncreateresponse.js.map +1 -0
- package/esm/models/agentupdate.d.ts +9 -0
- package/esm/models/agentupdate.d.ts.map +1 -0
- package/esm/models/agentupdate.js +9 -0
- package/esm/models/agentupdate.js.map +1 -0
- package/esm/models/batchrunrequest.d.ts +6 -0
- package/esm/models/batchrunrequest.d.ts.map +1 -0
- package/esm/models/batchrunrequest.js +8 -0
- package/esm/models/batchrunrequest.js.map +1 -0
- package/esm/models/batchtestrun.d.ts +25 -0
- package/esm/models/batchtestrun.d.ts.map +1 -0
- package/esm/models/batchtestrun.js +22 -0
- package/esm/models/batchtestrun.js.map +1 -0
- package/esm/models/batchtestrunresponse.d.ts +9 -0
- package/esm/models/batchtestrunresponse.d.ts.map +1 -0
- package/esm/models/batchtestrunresponse.js +12 -0
- package/esm/models/batchtestrunresponse.js.map +1 -0
- package/esm/models/batchtestskip.d.ts +8 -0
- package/esm/models/batchtestskip.d.ts.map +1 -0
- package/esm/models/batchtestskip.js +10 -0
- package/esm/models/batchtestskip.js.map +1 -0
- package/esm/models/bulktestitem.d.ts +12 -0
- package/esm/models/bulktestitem.d.ts.map +1 -0
- package/esm/models/bulktestitem.js +16 -0
- package/esm/models/bulktestitem.js.map +1 -0
- package/esm/models/bulktestupload.d.ts +44 -0
- package/esm/models/bulktestupload.d.ts.map +1 -0
- package/esm/models/bulktestupload.js +33 -0
- package/esm/models/bulktestupload.js.map +1 -0
- package/esm/models/bulktestuploadresponse.d.ts +9 -0
- package/esm/models/bulktestuploadresponse.d.ts.map +1 -0
- package/esm/models/bulktestuploadresponse.js +11 -0
- package/esm/models/bulktestuploadresponse.js.map +1 -0
- package/esm/models/bulkuploadteststestsbulkpostop.d.ts +13 -0
- package/esm/models/bulkuploadteststestsbulkpostop.d.ts.map +1 -0
- package/esm/models/bulkuploadteststestsbulkpostop.js +17 -0
- package/esm/models/bulkuploadteststestsbulkpostop.js.map +1 -0
- package/esm/models/chatmessage.d.ts +30 -0
- package/esm/models/chatmessage.d.ts.map +1 -0
- package/esm/models/chatmessage.js +26 -0
- package/esm/models/chatmessage.js.map +1 -0
- package/esm/models/createagentendpointagentspostop.d.ts +13 -0
- package/esm/models/createagentendpointagentspostop.d.ts.map +1 -0
- package/esm/models/createagentendpointagentspostop.js +17 -0
- package/esm/models/createagentendpointagentspostop.js.map +1 -0
- package/esm/models/createtestendpointtestspostop.d.ts +13 -0
- package/esm/models/createtestendpointtestspostop.d.ts.map +1 -0
- package/esm/models/createtestendpointtestspostop.js +17 -0
- package/esm/models/createtestendpointtestspostop.js.map +1 -0
- package/esm/models/errors/apierror.d.ts +13 -0
- package/esm/models/errors/apierror.d.ts.map +1 -0
- package/esm/models/errors/apierror.js +12 -0
- package/esm/models/errors/apierror.js.map +1 -0
- package/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/esm/models/errors/httpclienterrors.d.ts.map +1 -0
- package/esm/models/errors/httpclienterrors.js +56 -0
- package/esm/models/errors/httpclienterrors.js.map +1 -0
- package/esm/models/errors/sdkvalidationerror.d.ts +20 -0
- package/esm/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/esm/models/errors/sdkvalidationerror.js +38 -0
- package/esm/models/errors/sdkvalidationerror.js.map +1 -0
- package/esm/models/expectedtoolcall.d.ts +10 -0
- package/esm/models/expectedtoolcall.d.ts.map +1 -0
- package/esm/models/expectedtoolcall.js +10 -0
- package/esm/models/expectedtoolcall.js.map +1 -0
- package/esm/models/getagentendpointagentsagentuuidgetop.d.ts +12 -0
- package/esm/models/getagentendpointagentsagentuuidgetop.d.ts.map +1 -0
- package/esm/models/getagentendpointagentsagentuuidgetop.js +16 -0
- package/esm/models/getagentendpointagentsagentuuidgetop.js.map +1 -0
- package/esm/models/getagenttestrunstatusagenttestsruntaskidgetop.d.ts +12 -0
- package/esm/models/getagenttestrunstatusagenttestsruntaskidgetop.d.ts.map +1 -0
- package/esm/models/getagenttestrunstatusagenttestsruntaskidgetop.js +16 -0
- package/esm/models/getagenttestrunstatusagenttestsruntaskidgetop.js.map +1 -0
- package/esm/models/gettestendpointteststestuuidgetop.d.ts +12 -0
- package/esm/models/gettestendpointteststestuuidgetop.d.ts.map +1 -0
- package/esm/models/gettestendpointteststestuuidgetop.js +16 -0
- package/esm/models/gettestendpointteststestuuidgetop.js.map +1 -0
- package/esm/models/httpvalidationerror.d.ts +7 -0
- package/esm/models/httpvalidationerror.d.ts.map +1 -0
- package/esm/models/httpvalidationerror.js +10 -0
- package/esm/models/httpvalidationerror.js.map +1 -0
- package/esm/models/judgeresult.d.ts +13 -0
- package/esm/models/judgeresult.d.ts.map +1 -0
- package/esm/models/judgeresult.js +13 -0
- package/esm/models/judgeresult.js.map +1 -0
- package/esm/models/listagentsagentsgetop.d.ts +11 -0
- package/esm/models/listagentsagentsgetop.d.ts.map +1 -0
- package/esm/models/listagentsagentsgetop.js +15 -0
- package/esm/models/listagentsagentsgetop.js.map +1 -0
- package/esm/models/listteststestsgetop.d.ts +11 -0
- package/esm/models/listteststestsgetop.d.ts.map +1 -0
- package/esm/models/listteststestsgetop.js +15 -0
- package/esm/models/listteststestsgetop.js.map +1 -0
- package/esm/models/resolveagentnamesagentsresolvepostop.d.ts +13 -0
- package/esm/models/resolveagentnamesagentsresolvepostop.d.ts.map +1 -0
- package/esm/models/resolveagentnamesagentsresolvepostop.js +17 -0
- package/esm/models/resolveagentnamesagentsresolvepostop.js.map +1 -0
- package/esm/models/resolveagentnamesrequest.d.ts +6 -0
- package/esm/models/resolveagentnamesrequest.d.ts.map +1 -0
- package/esm/models/resolveagentnamesrequest.js +8 -0
- package/esm/models/resolveagentnamesrequest.js.map +1 -0
- package/esm/models/resolveagentnamesresponse.d.ts +9 -0
- package/esm/models/resolveagentnamesresponse.d.ts.map +1 -0
- package/esm/models/resolveagentnamesresponse.js +9 -0
- package/esm/models/resolveagentnamesresponse.js.map +1 -0
- package/esm/models/routersagentsagentresponse.d.ts +35 -0
- package/esm/models/routersagentsagentresponse.d.ts.map +1 -0
- package/esm/models/routersagentsagentresponse.js +27 -0
- package/esm/models/routersagentsagentresponse.js.map +1 -0
- package/esm/models/routerstestsevaluatorref.d.ts +9 -0
- package/esm/models/routerstestsevaluatorref.d.ts.map +1 -0
- package/esm/models/routerstestsevaluatorref.js +9 -0
- package/esm/models/routerstestsevaluatorref.js.map +1 -0
- package/esm/models/routersteststestresponse.d.ts +46 -0
- package/esm/models/routersteststestresponse.d.ts.map +1 -0
- package/esm/models/routersteststestresponse.js +33 -0
- package/esm/models/routersteststestresponse.js.map +1 -0
- package/esm/models/runagenttestagenttestsagentagentuuidrunpostop.d.ts +14 -0
- package/esm/models/runagenttestagenttestsagentagentuuidrunpostop.d.ts.map +1 -0
- package/esm/models/runagenttestagenttestsagentagentuuidrunpostop.js +18 -0
- package/esm/models/runagenttestagenttestsagentagentuuidrunpostop.js.map +1 -0
- package/esm/models/runtestrequest.d.ts +6 -0
- package/esm/models/runtestrequest.d.ts.map +1 -0
- package/esm/models/runtestrequest.js +8 -0
- package/esm/models/runtestrequest.js.map +1 -0
- package/esm/models/runtestsbatchagenttestsrunpostop.d.ts +13 -0
- package/esm/models/runtestsbatchagenttestsrunpostop.d.ts.map +1 -0
- package/esm/models/runtestsbatchagenttestsrunpostop.js +17 -0
- package/esm/models/runtestsbatchagenttestsrunpostop.js.map +1 -0
- package/esm/models/security.d.ts +6 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +8 -0
- package/esm/models/security.js.map +1 -0
- package/esm/models/taskstatus.d.ts +18 -0
- package/esm/models/taskstatus.d.ts.map +1 -0
- package/esm/models/taskstatus.js +19 -0
- package/esm/models/taskstatus.js.map +1 -0
- package/esm/models/testcaseresult.d.ts +18 -0
- package/esm/models/testcaseresult.d.ts.map +1 -0
- package/esm/models/testcaseresult.js +18 -0
- package/esm/models/testcaseresult.js.map +1 -0
- package/esm/models/testcreate.d.ts +42 -0
- package/esm/models/testcreate.d.ts.map +1 -0
- package/esm/models/testcreate.js +32 -0
- package/esm/models/testcreate.js.map +1 -0
- package/esm/models/testcreateresponse.d.ts +7 -0
- package/esm/models/testcreateresponse.d.ts.map +1 -0
- package/esm/models/testcreateresponse.js +10 -0
- package/esm/models/testcreateresponse.js.map +1 -0
- package/esm/models/testoutput.d.ts +8 -0
- package/esm/models/testoutput.d.ts.map +1 -0
- package/esm/models/testoutput.js +10 -0
- package/esm/models/testoutput.js.map +1 -0
- package/esm/models/testrunevaluator.d.ts +25 -0
- package/esm/models/testrunevaluator.d.ts.map +1 -0
- package/esm/models/testrunevaluator.js +23 -0
- package/esm/models/testrunevaluator.js.map +1 -0
- package/esm/models/testrunstatusresponse.d.ts +27 -0
- package/esm/models/testrunstatusresponse.d.ts.map +1 -0
- package/esm/models/testrunstatusresponse.js +24 -0
- package/esm/models/testrunstatusresponse.js.map +1 -0
- package/esm/models/testupdate.d.ts +24 -0
- package/esm/models/testupdate.d.ts.map +1 -0
- package/esm/models/testupdate.js +23 -0
- package/esm/models/testupdate.js.map +1 -0
- package/esm/models/toolcalloutput.d.ts +10 -0
- package/esm/models/toolcalloutput.d.ts.map +1 -0
- package/esm/models/toolcalloutput.js +10 -0
- package/esm/models/toolcalloutput.js.map +1 -0
- package/esm/models/updateagentendpointagentsagentuuidputop.d.ts +14 -0
- package/esm/models/updateagentendpointagentsagentuuidputop.d.ts.map +1 -0
- package/esm/models/updateagentendpointagentsagentuuidputop.js +18 -0
- package/esm/models/updateagentendpointagentsagentuuidputop.js.map +1 -0
- package/esm/models/updatetestendpointteststestuuidputop.d.ts +14 -0
- package/esm/models/updatetestendpointteststestuuidputop.d.ts.map +1 -0
- package/esm/models/updatetestendpointteststestuuidputop.js +18 -0
- package/esm/models/updatetestendpointteststestuuidputop.js.map +1 -0
- package/esm/models/validationerror.d.ts +10 -0
- package/esm/models/validationerror.d.ts.map +1 -0
- package/esm/models/validationerror.js +17 -0
- package/esm/models/validationerror.js.map +1 -0
- package/esm/tool-names.d.ts +5 -0
- package/esm/tool-names.d.ts.map +1 -0
- package/esm/tool-names.js +56 -0
- package/esm/tool-names.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/bigint.d.ts +6 -0
- package/esm/types/bigint.d.ts.map +1 -0
- package/esm/types/bigint.js +88 -0
- package/esm/types/bigint.js.map +1 -0
- package/esm/types/blobs.d.ts +2 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +20 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/enums.d.ts +12 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +7 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/package.json +45 -0
- package/src/core.ts +13 -0
- package/src/funcs/agentTestsGetRun.ts +163 -0
- package/src/funcs/agentTestsRun.ts +164 -0
- package/src/funcs/agentTestsRunBatch.ts +153 -0
- package/src/funcs/agentsCreate.ts +152 -0
- package/src/funcs/agentsGet.ts +161 -0
- package/src/funcs/agentsList.ts +151 -0
- package/src/funcs/agentsResolve.ts +153 -0
- package/src/funcs/agentsUpdate.ts +162 -0
- package/src/funcs/testsBulkCreate.ts +152 -0
- package/src/funcs/testsCreate.ts +152 -0
- package/src/funcs/testsGet.ts +160 -0
- package/src/funcs/testsList.ts +151 -0
- package/src/funcs/testsUpdate.ts +162 -0
- package/src/hooks/hooks.ts +130 -0
- package/src/hooks/types.ts +107 -0
- package/src/landing-page.ts +1073 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +72 -0
- package/src/lib/encodings.ts +524 -0
- package/src/lib/env.ts +44 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/primitives.ts +129 -0
- package/src/lib/result.ts +50 -0
- package/src/lib/retries.ts +226 -0
- package/src/lib/schemas.ts +79 -0
- package/src/lib/sdks.ts +407 -0
- package/src/lib/security.ts +275 -0
- package/src/lib/url.ts +33 -0
- package/src/mcp-server/cli/serve/command.ts +116 -0
- package/src/mcp-server/cli/serve/impl.ts +113 -0
- package/src/mcp-server/cli/start/command.ts +116 -0
- package/src/mcp-server/cli/start/impl.ts +206 -0
- package/src/mcp-server/cli.ts +13 -0
- package/src/mcp-server/console-logger.ts +76 -0
- package/src/mcp-server/extensions.ts +19 -0
- package/src/mcp-server/flags.ts +20 -0
- package/src/mcp-server/mcp-server.ts +28 -0
- package/src/mcp-server/prompts.ts +111 -0
- package/src/mcp-server/resources.ts +141 -0
- package/src/mcp-server/scopes.ts +10 -0
- package/src/mcp-server/server.ts +111 -0
- package/src/mcp-server/shared.ts +78 -0
- package/src/mcp-server/tools/agentTestsGetRun.ts +47 -0
- package/src/mcp-server/tools/agentTestsRun.ts +47 -0
- package/src/mcp-server/tools/agentTestsRunBatch.ts +47 -0
- package/src/mcp-server/tools/agentsCreate.ts +45 -0
- package/src/mcp-server/tools/agentsGet.ts +45 -0
- package/src/mcp-server/tools/agentsList.ts +46 -0
- package/src/mcp-server/tools/agentsResolve.ts +46 -0
- package/src/mcp-server/tools/agentsUpdate.ts +45 -0
- package/src/mcp-server/tools/testsBulkCreate.ts +45 -0
- package/src/mcp-server/tools/testsCreate.ts +45 -0
- package/src/mcp-server/tools/testsGet.ts +44 -0
- package/src/mcp-server/tools/testsList.ts +45 -0
- package/src/mcp-server/tools/testsUpdate.ts +45 -0
- package/src/mcp-server/tools.ts +498 -0
- package/src/models/agentcreate.ts +47 -0
- package/src/models/agentcreateresponse.ts +13 -0
- package/src/models/agenttestruncreateresponse.ts +39 -0
- package/src/models/agentupdate.ts +19 -0
- package/src/models/batchrunrequest.ts +15 -0
- package/src/models/batchtestrun.ts +39 -0
- package/src/models/batchtestrunresponse.ts +22 -0
- package/src/models/batchtestskip.ts +17 -0
- package/src/models/bulktestitem.ts +36 -0
- package/src/models/bulktestupload.ts +66 -0
- package/src/models/bulktestuploadresponse.ts +25 -0
- package/src/models/bulkuploadteststestsbulkpostop.ts +39 -0
- package/src/models/chatmessage.ts +50 -0
- package/src/models/createagentendpointagentspostop.ts +39 -0
- package/src/models/createtestendpointtestspostop.ts +39 -0
- package/src/models/errors/apierror.ts +21 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/sdkvalidationerror.ts +42 -0
- package/src/models/expectedtoolcall.ts +23 -0
- package/src/models/getagentendpointagentsagentuuidgetop.ts +38 -0
- package/src/models/getagenttestrunstatusagenttestsruntaskidgetop.ts +36 -0
- package/src/models/gettestendpointteststestuuidgetop.ts +38 -0
- package/src/models/httpvalidationerror.ts +18 -0
- package/src/models/judgeresult.ts +35 -0
- package/src/models/listagentsagentsgetop.ts +36 -0
- package/src/models/listteststestsgetop.ts +36 -0
- package/src/models/resolveagentnamesagentsresolvepostop.ts +42 -0
- package/src/models/resolveagentnamesrequest.ts +13 -0
- package/src/models/resolveagentnamesresponse.ts +21 -0
- package/src/models/routersagentsagentresponse.ts +59 -0
- package/src/models/routerstestsevaluatorref.ts +19 -0
- package/src/models/routersteststestresponse.ts +73 -0
- package/src/models/runagenttestagenttestsagentagentuuidrunpostop.ts +39 -0
- package/src/models/runtestrequest.ts +13 -0
- package/src/models/runtestsbatchagenttestsrunpostop.ts +42 -0
- package/src/models/security.ts +13 -0
- package/src/models/taskstatus.ts +23 -0
- package/src/models/testcaseresult.ts +45 -0
- package/src/models/testcreate.ts +64 -0
- package/src/models/testcreateresponse.ts +13 -0
- package/src/models/testoutput.ts +20 -0
- package/src/models/testrunevaluator.ts +53 -0
- package/src/models/testrunstatusresponse.ts +65 -0
- package/src/models/testupdate.ts +46 -0
- package/src/models/toolcalloutput.ts +21 -0
- package/src/models/updateagentendpointagentsagentuuidputop.ts +41 -0
- package/src/models/updatetestendpointteststestuuidputop.ts +41 -0
- package/src/models/validationerror.ts +27 -0
- package/src/tool-names.ts +55 -0
- package/src/types/async.ts +69 -0
- package/src/types/bigint.ts +88 -0
- package/src/types/blobs.ts +23 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
import {
|
|
8
|
+
RoutersTestsEvaluatorRef,
|
|
9
|
+
RoutersTestsEvaluatorRef$zodSchema,
|
|
10
|
+
} from "./routerstestsevaluatorref.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* What the test judges:
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* - `response`: judges the generated reply
|
|
18
|
+
* - `tool_call`: diffs the generated tool calls
|
|
19
|
+
* - `conversation`: judges the full conversation
|
|
20
|
+
*/
|
|
21
|
+
export const TestCreateType = {
|
|
22
|
+
Response: "response",
|
|
23
|
+
ToolCall: "tool_call",
|
|
24
|
+
Conversation: "conversation",
|
|
25
|
+
} as const;
|
|
26
|
+
/**
|
|
27
|
+
* What the test judges:
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
*
|
|
31
|
+
* - `response`: judges the generated reply
|
|
32
|
+
* - `tool_call`: diffs the generated tool calls
|
|
33
|
+
* - `conversation`: judges the full conversation
|
|
34
|
+
*/
|
|
35
|
+
export type TestCreateType = ClosedEnum<typeof TestCreateType>;
|
|
36
|
+
|
|
37
|
+
export const TestCreateType$zodSchema = z.enum([
|
|
38
|
+
"response",
|
|
39
|
+
"tool_call",
|
|
40
|
+
"conversation",
|
|
41
|
+
]).describe(
|
|
42
|
+
"What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export type TestCreate = {
|
|
46
|
+
name: string;
|
|
47
|
+
type: TestCreateType;
|
|
48
|
+
config?: { [k: string]: any } | null | undefined;
|
|
49
|
+
evaluators?: Array<RoutersTestsEvaluatorRef> | null | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const TestCreate$zodSchema: z.ZodType<TestCreate> = z.object({
|
|
53
|
+
config: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
54
|
+
"The calibrate test config. Three top-level keys.\n\n- `history` (array, required): the conversation up to the agent's turn. Each item is `{role, content}` with `role` one of `user`, `assistant`, `tool`. A `tool` message also carries `tool_call_id` and `name`.\n- `evaluation` (object, required): `{type, ...}`, where `type` matches the test's `type` (below).\n- `settings` (object, optional): e.g. `{\"language\": \"en\"}`.\n\n`evaluation` by test type:\n- `response`: judge the agent's reply, graded by the linked evaluators. `{\"type\": \"response\"}`\n- `conversation`: append the reply and judge the whole conversation. `{\"type\": \"conversation\"}`\n- `tool_call`: diff the agent's tool calls against expected ones. Add `tool_calls`, a list of `{tool, arguments, accept_any_arguments?}`.\n\nFor `tool_call`, each expected argument value is one of:\n- `{\"match_type\": \"exact\", \"value\": <any>}`: must equal `value`\n- `{\"match_type\": \"llm_judge\", \"criteria\": \"...\"}`: judged against the criteria\n- `{\"match_type\": \"any\"}`: any value, only checks the argument was passed\n\n`response` / `conversation` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"What is your return policy?\"}],\n \"evaluation\": {\"type\": \"response\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\n`tool_call` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"Book room 101 for tomorrow\"}],\n \"evaluation\": {\n \"type\": \"tool_call\",\n \"tool_calls\": [\n {\n \"tool\": \"book_room\",\n \"arguments\": {\n \"room\": {\"match_type\": \"exact\", \"value\": \"101\"},\n \"date\": {\"match_type\": \"llm_judge\", \"criteria\": \"tomorrow's date\"}\n },\n \"accept_any_arguments\": false\n }\n ]\n }\n}\n```\n\nEvaluators are linked via the separate `evaluators` field, not inside `config`.\n\nOmit to create the test with no config and fill it in later via update.",
|
|
55
|
+
),
|
|
56
|
+
evaluators: z.array(RoutersTestsEvaluatorRef$zodSchema).nullable().optional()
|
|
57
|
+
.describe(
|
|
58
|
+
"Evaluators to link. Used by `response` and `conversation` tests",
|
|
59
|
+
),
|
|
60
|
+
name: z.string().describe("Name of the test, unique within the workspace"),
|
|
61
|
+
type: TestCreateType$zodSchema.describe(
|
|
62
|
+
"What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation",
|
|
63
|
+
),
|
|
64
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type TestCreateResponse = { uuid: string; message: string };
|
|
8
|
+
|
|
9
|
+
export const TestCreateResponse$zodSchema: z.ZodType<TestCreateResponse> = z
|
|
10
|
+
.object({
|
|
11
|
+
message: z.string().describe("Confirmation message"),
|
|
12
|
+
uuid: z.string().describe("ID of the newly created test"),
|
|
13
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ToolCallOutput, ToolCallOutput$zodSchema } from "./toolcalloutput.js";
|
|
7
|
+
|
|
8
|
+
export type TestOutput = {
|
|
9
|
+
response?: string | null | undefined;
|
|
10
|
+
tool_calls?: Array<ToolCallOutput> | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const TestOutput$zodSchema: z.ZodType<TestOutput> = z.object({
|
|
14
|
+
response: z.string().nullable().optional().describe(
|
|
15
|
+
"The agent's generated reply. Null for tool-call-only cases",
|
|
16
|
+
),
|
|
17
|
+
tool_calls: z.array(ToolCallOutput$zodSchema).nullable().optional().describe(
|
|
18
|
+
"Tool calls the agent generated. Null when it made none",
|
|
19
|
+
),
|
|
20
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const OutputType = {
|
|
9
|
+
Binary: "binary",
|
|
10
|
+
Rating: "rating",
|
|
11
|
+
} as const;
|
|
12
|
+
export type OutputType = ClosedEnum<typeof OutputType>;
|
|
13
|
+
|
|
14
|
+
export const OutputType$zodSchema = z.enum([
|
|
15
|
+
"binary",
|
|
16
|
+
"rating",
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export type TestRunEvaluator = {
|
|
20
|
+
uuid?: string | null | undefined;
|
|
21
|
+
name?: string | null | undefined;
|
|
22
|
+
description?: string | null | undefined;
|
|
23
|
+
output_type?: OutputType | null | undefined;
|
|
24
|
+
output_config?: { [k: string]: any } | null | undefined;
|
|
25
|
+
scale_min?: number | null | undefined;
|
|
26
|
+
scale_max?: number | null | undefined;
|
|
27
|
+
version_number?: number | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const TestRunEvaluator$zodSchema: z.ZodType<TestRunEvaluator> = z.object(
|
|
31
|
+
{
|
|
32
|
+
description: z.string().nullable().optional().describe(
|
|
33
|
+
"What the evaluator checks",
|
|
34
|
+
),
|
|
35
|
+
name: z.string().nullable().optional().describe("Name of the evaluator"),
|
|
36
|
+
output_config: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
37
|
+
"Rubric: the scale values, labels, and colors a verdict maps to",
|
|
38
|
+
),
|
|
39
|
+
output_type: OutputType$zodSchema.nullable().optional().describe(
|
|
40
|
+
"Verdict shape: pass/fail or a numeric rating",
|
|
41
|
+
),
|
|
42
|
+
scale_max: z.number().nullable().optional().describe(
|
|
43
|
+
"Highest rating value. Set for rating evaluators",
|
|
44
|
+
),
|
|
45
|
+
scale_min: z.number().nullable().optional().describe(
|
|
46
|
+
"Lowest rating value. Set for rating evaluators",
|
|
47
|
+
),
|
|
48
|
+
uuid: z.string().nullable().optional().describe("ID of the evaluator"),
|
|
49
|
+
version_number: z.int().nullable().optional().describe(
|
|
50
|
+
"Evaluator version this run used",
|
|
51
|
+
),
|
|
52
|
+
},
|
|
53
|
+
);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { TaskStatus, TaskStatus$zodSchema } from "./taskstatus.js";
|
|
7
|
+
import { TestCaseResult, TestCaseResult$zodSchema } from "./testcaseresult.js";
|
|
8
|
+
import {
|
|
9
|
+
TestRunEvaluator,
|
|
10
|
+
TestRunEvaluator$zodSchema,
|
|
11
|
+
} from "./testrunevaluator.js";
|
|
12
|
+
|
|
13
|
+
export type TestRunStatusResponse = {
|
|
14
|
+
task_id: string;
|
|
15
|
+
status: TaskStatus;
|
|
16
|
+
total_tests?: number | null | undefined;
|
|
17
|
+
passed?: number | null | undefined;
|
|
18
|
+
failed?: number | null | undefined;
|
|
19
|
+
latency_ms?: { [k: string]: any } | null | undefined;
|
|
20
|
+
cost?: { [k: string]: any } | null | undefined;
|
|
21
|
+
total_tokens?: { [k: string]: any } | null | undefined;
|
|
22
|
+
evaluators?: Array<TestRunEvaluator> | null | undefined;
|
|
23
|
+
results?: Array<TestCaseResult> | null | undefined;
|
|
24
|
+
error?: boolean | undefined;
|
|
25
|
+
is_public?: boolean | undefined;
|
|
26
|
+
share_token?: string | null | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const TestRunStatusResponse$zodSchema: z.ZodType<TestRunStatusResponse> =
|
|
30
|
+
z.object({
|
|
31
|
+
cost: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
32
|
+
"Aggregated cost `{mean, min, max, count}` (USD)",
|
|
33
|
+
),
|
|
34
|
+
error: z.boolean().default(false).describe("True if the run failed"),
|
|
35
|
+
evaluators: z.array(TestRunEvaluator$zodSchema).nullable().optional()
|
|
36
|
+
.describe(
|
|
37
|
+
"The evaluators used in this run. Each verdict in `judge_results` links to one of these by `evaluator_uuid`",
|
|
38
|
+
),
|
|
39
|
+
failed: z.int().nullable().optional().describe(
|
|
40
|
+
"Number of test cases that failed. Null until done",
|
|
41
|
+
),
|
|
42
|
+
is_public: z.boolean().default(false).describe(
|
|
43
|
+
"Whether the run is shared publicly",
|
|
44
|
+
),
|
|
45
|
+
latency_ms: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
46
|
+
"Aggregated response latency in milliseconds: `{p50, p95, p99, count}`",
|
|
47
|
+
),
|
|
48
|
+
passed: z.int().nullable().optional().describe(
|
|
49
|
+
"Number of test cases that passed. Null until done",
|
|
50
|
+
),
|
|
51
|
+
results: z.array(TestCaseResult$zodSchema).nullable().optional().describe(
|
|
52
|
+
"Results for each test case. Null until available",
|
|
53
|
+
),
|
|
54
|
+
share_token: z.string().nullable().optional().describe(
|
|
55
|
+
"Public share token. Null unless the run is public",
|
|
56
|
+
),
|
|
57
|
+
status: TaskStatus$zodSchema,
|
|
58
|
+
task_id: z.string().describe("Test run job ID"),
|
|
59
|
+
total_tests: z.int().nullable().optional().describe(
|
|
60
|
+
"Total number of test cases. Null until known",
|
|
61
|
+
),
|
|
62
|
+
total_tokens: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
63
|
+
"Aggregated token usage `{mean, min, max, count}`",
|
|
64
|
+
),
|
|
65
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
import {
|
|
8
|
+
RoutersTestsEvaluatorRef,
|
|
9
|
+
RoutersTestsEvaluatorRef$zodSchema,
|
|
10
|
+
} from "./routerstestsevaluatorref.js";
|
|
11
|
+
|
|
12
|
+
export const TestUpdateType = {
|
|
13
|
+
Response: "response",
|
|
14
|
+
ToolCall: "tool_call",
|
|
15
|
+
Conversation: "conversation",
|
|
16
|
+
} as const;
|
|
17
|
+
export type TestUpdateType = ClosedEnum<typeof TestUpdateType>;
|
|
18
|
+
|
|
19
|
+
export const TestUpdateType$zodSchema = z.enum([
|
|
20
|
+
"response",
|
|
21
|
+
"tool_call",
|
|
22
|
+
"conversation",
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export type TestUpdate = {
|
|
26
|
+
name?: string | null | undefined;
|
|
27
|
+
type?: TestUpdateType | null | undefined;
|
|
28
|
+
config?: { [k: string]: any } | null | undefined;
|
|
29
|
+
evaluators?: Array<RoutersTestsEvaluatorRef> | null | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const TestUpdate$zodSchema: z.ZodType<TestUpdate> = z.object({
|
|
33
|
+
config: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
34
|
+
"The calibrate test config. Three top-level keys.\n\n- `history` (array, required): the conversation up to the agent's turn. Each item is `{role, content}` with `role` one of `user`, `assistant`, `tool`. A `tool` message also carries `tool_call_id` and `name`.\n- `evaluation` (object, required): `{type, ...}`, where `type` matches the test's `type` (below).\n- `settings` (object, optional): e.g. `{\"language\": \"en\"}`.\n\n`evaluation` by test type:\n- `response`: judge the agent's reply, graded by the linked evaluators. `{\"type\": \"response\"}`\n- `conversation`: append the reply and judge the whole conversation. `{\"type\": \"conversation\"}`\n- `tool_call`: diff the agent's tool calls against expected ones. Add `tool_calls`, a list of `{tool, arguments, accept_any_arguments?}`.\n\nFor `tool_call`, each expected argument value is one of:\n- `{\"match_type\": \"exact\", \"value\": <any>}`: must equal `value`\n- `{\"match_type\": \"llm_judge\", \"criteria\": \"...\"}`: judged against the criteria\n- `{\"match_type\": \"any\"}`: any value, only checks the argument was passed\n\n`response` / `conversation` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"What is your return policy?\"}],\n \"evaluation\": {\"type\": \"response\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\n`tool_call` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"Book room 101 for tomorrow\"}],\n \"evaluation\": {\n \"type\": \"tool_call\",\n \"tool_calls\": [\n {\n \"tool\": \"book_room\",\n \"arguments\": {\n \"room\": {\"match_type\": \"exact\", \"value\": \"101\"},\n \"date\": {\"match_type\": \"llm_judge\", \"criteria\": \"tomorrow's date\"}\n },\n \"accept_any_arguments\": false\n }\n ]\n }\n}\n```\n\nEvaluators are linked via the separate `evaluators` field, not inside `config`.\n\nReplaces the stored config. Omit to leave unchanged.",
|
|
35
|
+
),
|
|
36
|
+
evaluators: z.array(RoutersTestsEvaluatorRef$zodSchema).nullable().optional()
|
|
37
|
+
.describe(
|
|
38
|
+
"New evaluator links for the test. Omit to leave unchanged. An empty list clears them, except on `conversation` tests, which must keep at least one",
|
|
39
|
+
),
|
|
40
|
+
name: z.string().nullable().optional().describe(
|
|
41
|
+
"New test name. Omit to leave unchanged",
|
|
42
|
+
),
|
|
43
|
+
type: TestUpdateType$zodSchema.nullable().optional().describe(
|
|
44
|
+
"What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n\nImmutable. Omit, or send the existing value. A different value is rejected (400).",
|
|
45
|
+
),
|
|
46
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type ToolCallOutput = {
|
|
8
|
+
tool: string;
|
|
9
|
+
arguments?: { [k: string]: any } | null | undefined;
|
|
10
|
+
output?: any | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const ToolCallOutput$zodSchema: z.ZodType<ToolCallOutput> = z.object({
|
|
14
|
+
arguments: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
15
|
+
"Arguments the agent passed to the tool. Null if none",
|
|
16
|
+
),
|
|
17
|
+
output: z.any().nullable().optional().describe(
|
|
18
|
+
"Tool execution result (any JSON value). Present only when the agent runs the tool and returns its result",
|
|
19
|
+
),
|
|
20
|
+
tool: z.string().describe("Name of the tool the agent called"),
|
|
21
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { AgentUpdate, AgentUpdate$zodSchema } from "./agentupdate.js";
|
|
7
|
+
import {
|
|
8
|
+
HTTPValidationError,
|
|
9
|
+
HTTPValidationError$zodSchema,
|
|
10
|
+
} from "./httpvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
RoutersAgentsAgentResponse,
|
|
13
|
+
RoutersAgentsAgentResponse$zodSchema,
|
|
14
|
+
} from "./routersagentsagentresponse.js";
|
|
15
|
+
|
|
16
|
+
export type UpdateAgentEndpointAgentsAgentUuidPutRequest = {
|
|
17
|
+
agent_uuid: string;
|
|
18
|
+
xAPIKey?: string | null | undefined;
|
|
19
|
+
xOrgUUID?: string | null | undefined;
|
|
20
|
+
body: AgentUpdate;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const UpdateAgentEndpointAgentsAgentUuidPutRequest$zodSchema: z.ZodType<
|
|
24
|
+
UpdateAgentEndpointAgentsAgentUuidPutRequest
|
|
25
|
+
> = z.object({
|
|
26
|
+
agent_uuid: z.string().describe("The agent to update."),
|
|
27
|
+
body: AgentUpdate$zodSchema,
|
|
28
|
+
xAPIKey: z.string().nullable().optional(),
|
|
29
|
+
xOrgUUID: z.string().nullable().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type UpdateAgentEndpointAgentsAgentUuidPutResponse =
|
|
33
|
+
| RoutersAgentsAgentResponse
|
|
34
|
+
| HTTPValidationError;
|
|
35
|
+
|
|
36
|
+
export const UpdateAgentEndpointAgentsAgentUuidPutResponse$zodSchema: z.ZodType<
|
|
37
|
+
UpdateAgentEndpointAgentsAgentUuidPutResponse
|
|
38
|
+
> = z.union([
|
|
39
|
+
RoutersAgentsAgentResponse$zodSchema,
|
|
40
|
+
HTTPValidationError$zodSchema,
|
|
41
|
+
]);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
HTTPValidationError,
|
|
8
|
+
HTTPValidationError$zodSchema,
|
|
9
|
+
} from "./httpvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
RoutersTestsTestResponse,
|
|
12
|
+
RoutersTestsTestResponse$zodSchema,
|
|
13
|
+
} from "./routersteststestresponse.js";
|
|
14
|
+
import { TestUpdate, TestUpdate$zodSchema } from "./testupdate.js";
|
|
15
|
+
|
|
16
|
+
export type UpdateTestEndpointTestsTestUuidPutRequest = {
|
|
17
|
+
test_uuid: string;
|
|
18
|
+
xAPIKey?: string | null | undefined;
|
|
19
|
+
xOrgUUID?: string | null | undefined;
|
|
20
|
+
body: TestUpdate;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const UpdateTestEndpointTestsTestUuidPutRequest$zodSchema: z.ZodType<
|
|
24
|
+
UpdateTestEndpointTestsTestUuidPutRequest
|
|
25
|
+
> = z.object({
|
|
26
|
+
body: TestUpdate$zodSchema,
|
|
27
|
+
test_uuid: z.string().describe("Test to update"),
|
|
28
|
+
xAPIKey: z.string().nullable().optional(),
|
|
29
|
+
xOrgUUID: z.string().nullable().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type UpdateTestEndpointTestsTestUuidPutResponse =
|
|
33
|
+
| RoutersTestsTestResponse
|
|
34
|
+
| HTTPValidationError;
|
|
35
|
+
|
|
36
|
+
export const UpdateTestEndpointTestsTestUuidPutResponse$zodSchema: z.ZodType<
|
|
37
|
+
UpdateTestEndpointTestsTestUuidPutResponse
|
|
38
|
+
> = z.union([
|
|
39
|
+
RoutersTestsTestResponse$zodSchema,
|
|
40
|
+
HTTPValidationError$zodSchema,
|
|
41
|
+
]);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type Loc = string | number;
|
|
8
|
+
|
|
9
|
+
export const Loc$zodSchema: z.ZodType<Loc> = z.union([
|
|
10
|
+
z.string(),
|
|
11
|
+
z.int(),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export type ValidationError = {
|
|
15
|
+
loc: Array<string | number>;
|
|
16
|
+
msg: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const ValidationError$zodSchema: z.ZodType<ValidationError> = z.object({
|
|
21
|
+
loc: z.array(z.union([
|
|
22
|
+
z.string(),
|
|
23
|
+
z.int(),
|
|
24
|
+
])),
|
|
25
|
+
msg: z.string(),
|
|
26
|
+
type: z.string(),
|
|
27
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Auto-generated at build time
|
|
2
|
+
export const toolNames: Array<{ name: string; description: string }>= [
|
|
3
|
+
{
|
|
4
|
+
"name": "resolve-agent-names",
|
|
5
|
+
"description": "Map human-friendly agent names to UUIDs within the caller's org. Each\nname resolves to at most one agent; unknown names are returned under\nnot_found. Use this before run-agent-tests when you have names instead\nof UUIDs. Does not create or modify agents.\n"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "create-agent",
|
|
9
|
+
"description": "Create a new agent in the caller's organization. Provide the agent's\nname, type, and config. Returns the created agent including its UUID.\nRequires a Calibrate API key (CALIBRATE_API_KEY).\n"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "list-agents",
|
|
13
|
+
"description": "List every agent in the caller's organization. Returns each agent's\nUUID, name, type, and config. Use this to discover which agents exist\nbefore resolving names or launching test runs. Requires a Calibrate\nAPI key (CALIBRATE_API_KEY).\n"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "get-agent",
|
|
17
|
+
"description": "Fetch a single agent by UUID within the caller's org. Returns the\nagent's name, type, and config. Fails with 404 if the agent does not\nexist or belongs to another org.\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "update-agent",
|
|
21
|
+
"description": "Update an existing agent by UUID within the caller's org. Supply the\nfields to change (name, type, config). Returns the updated agent.\nFails with 404 if the agent does not exist or belongs to another org.\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "bulk-create-tests",
|
|
25
|
+
"description": "Create multiple tests in the caller's organization in one call. Provide\na list of test definitions (name, type, config). Returns the created\ntests including their UUIDs.\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "create-test",
|
|
29
|
+
"description": "Create a new test in the caller's organization. Provide the test's\nname, type, and config. Returns the created test including its UUID.\nRequires a Calibrate API key (CALIBRATE_API_KEY).\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "list-tests",
|
|
33
|
+
"description": "List every test in the caller's organization. Returns each test's\nUUID, name, type, and config. Use this to discover which tests exist\nbefore creating runs.\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "get-test",
|
|
37
|
+
"description": "Fetch a single test by UUID within the caller's org. Returns the\ntest's name, type, and config. Fails with 404 if the test does not\nexist or belongs to another org.\n"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "update-test",
|
|
41
|
+
"description": "Update an existing test by UUID within the caller's org. Supply the\nfields to change (name, config). Returns the updated test. Fails with\n404 if the test does not exist or belongs to another org.\n"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "run-agent-tests",
|
|
45
|
+
"description": "Start a background LLM unit-test job for one agent. Runs all tests\nlinked to the agent unless test_uuids is provided. Returns a task_id\nto poll with get-agent-test-run. The agent must belong to the caller's\norg and have a verified connection; otherwise the call fails with 400\nor 404.\n"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "run-agent-tests-batch",
|
|
49
|
+
"description": "Launch one test job per agent in the caller's org. Optionally restrict\nto agent_names; omit or pass an empty list to run every org agent.\nAgents with no linked tests or an unverified connection are skipped\n(reported under skipped) rather than failing the batch. Returns\ntask_id values to poll with get-agent-test-run.\n"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "get-agent-test-run",
|
|
53
|
+
"description": "Poll the status and results of an agent test run by task_id. Returns\nqueued, in_progress, completed, failed, or aborted status. When\ncompleted, includes per-test-case pass/fail results and evaluator\njudgments. Use the task_id from run-agent-tests or\nrun-agent-tests-batch.\n"
|
|
54
|
+
}
|
|
55
|
+
];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type APICall =
|
|
6
|
+
| {
|
|
7
|
+
status: "complete";
|
|
8
|
+
request: Request;
|
|
9
|
+
response: Response;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
status: "request-error";
|
|
13
|
+
request: Request;
|
|
14
|
+
response?: undefined;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
status: "invalid";
|
|
18
|
+
request?: undefined;
|
|
19
|
+
response?: undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export class APIPromise<T> implements Promise<T> {
|
|
23
|
+
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
+
#unwrapped: Promise<T> | null;
|
|
25
|
+
|
|
26
|
+
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
|
+
|
|
28
|
+
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
|
+
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#getUnwrapped(): Promise<T> {
|
|
34
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
then<TResult1 = T, TResult2 = never>(
|
|
38
|
+
onfulfilled?:
|
|
39
|
+
| ((value: T) => TResult1 | PromiseLike<TResult1>)
|
|
40
|
+
| null
|
|
41
|
+
| undefined,
|
|
42
|
+
onrejected?:
|
|
43
|
+
| ((reason: any) => TResult2 | PromiseLike<TResult2>)
|
|
44
|
+
| null
|
|
45
|
+
| undefined,
|
|
46
|
+
): Promise<TResult1 | TResult2> {
|
|
47
|
+
return this.#promise.then(
|
|
48
|
+
onfulfilled ? ([value]) => onfulfilled(value) : void 0,
|
|
49
|
+
onrejected,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
catch<TResult = never>(
|
|
54
|
+
onrejected?:
|
|
55
|
+
| ((reason: any) => TResult | PromiseLike<TResult>)
|
|
56
|
+
| null
|
|
57
|
+
| undefined,
|
|
58
|
+
): Promise<T | TResult> {
|
|
59
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
63
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
$inspect(): Promise<[T, APICall]> {
|
|
67
|
+
return this.#promise;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
|
|
7
|
+
export function bigint(): z.ZodType<bigint | string> {
|
|
8
|
+
return z.union([
|
|
9
|
+
z.bigint().transform((v) => String(v)),
|
|
10
|
+
z.string().transform((v, ctx) => {
|
|
11
|
+
try {
|
|
12
|
+
return BigInt(v);
|
|
13
|
+
} catch {
|
|
14
|
+
ctx.addIssue({
|
|
15
|
+
code: z.ZodIssueCode.custom,
|
|
16
|
+
message: "Invalid bigint value",
|
|
17
|
+
});
|
|
18
|
+
return z.NEVER;
|
|
19
|
+
}
|
|
20
|
+
}),
|
|
21
|
+
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
22
|
+
z.union([z.null(), z.undefined()]).transform(() => BigInt(0)),
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function bigintOptional(): z.ZodType<bigint | string | undefined> {
|
|
27
|
+
return z
|
|
28
|
+
.union([
|
|
29
|
+
z.bigint().transform((v) => String(v)),
|
|
30
|
+
z.string().transform((v, ctx) => {
|
|
31
|
+
try {
|
|
32
|
+
return BigInt(v);
|
|
33
|
+
} catch {
|
|
34
|
+
ctx.addIssue({
|
|
35
|
+
code: z.ZodIssueCode.custom,
|
|
36
|
+
message: "Invalid bigint value",
|
|
37
|
+
});
|
|
38
|
+
return z.NEVER;
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
42
|
+
z.null().transform(() => undefined),
|
|
43
|
+
])
|
|
44
|
+
.optional();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function bigintNullable(): z.ZodType<bigint | string | null> {
|
|
48
|
+
return z.union([
|
|
49
|
+
z.bigint().transform((v) => String(v)),
|
|
50
|
+
z.string().transform((v, ctx) => {
|
|
51
|
+
try {
|
|
52
|
+
return BigInt(v);
|
|
53
|
+
} catch {
|
|
54
|
+
ctx.addIssue({
|
|
55
|
+
code: z.ZodIssueCode.custom,
|
|
56
|
+
message: "Invalid bigint value",
|
|
57
|
+
});
|
|
58
|
+
return z.NEVER;
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
62
|
+
z.null(),
|
|
63
|
+
z.undefined().transform(() => null),
|
|
64
|
+
]);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function bigintConst<T extends bigint>(value: T): z.ZodType<T> {
|
|
68
|
+
return z
|
|
69
|
+
.union([
|
|
70
|
+
z.bigint(),
|
|
71
|
+
z.string().transform((v, ctx) => {
|
|
72
|
+
try {
|
|
73
|
+
return BigInt(v);
|
|
74
|
+
} catch {
|
|
75
|
+
ctx.addIssue({
|
|
76
|
+
code: z.ZodIssueCode.custom,
|
|
77
|
+
message: "Invalid bigint value",
|
|
78
|
+
});
|
|
79
|
+
return z.NEVER;
|
|
80
|
+
}
|
|
81
|
+
}),
|
|
82
|
+
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
83
|
+
])
|
|
84
|
+
.refine((v) => v === value, {
|
|
85
|
+
message: `Value must be ${value}`,
|
|
86
|
+
})
|
|
87
|
+
.transform(() => value as T);
|
|
88
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export function isBlobLike(val: unknown): val is Blob {
|
|
6
|
+
if (val instanceof Blob) {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const name = val[Symbol.toStringTag];
|
|
15
|
+
if (typeof name !== "string") {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
if (name !== "Blob" && name !== "File") {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return "stream" in val && typeof val.stream === "function";
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
declare const __brand: unique symbol;
|
|
6
|
+
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
|
|
7
|
+
|
|
8
|
+
export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
|
|
9
|
+
return value as Unrecognized<T>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
13
|
+
export type ClosedEnum<T> = T[keyof T];
|
|
14
|
+
export type OpenEnum<T> =
|
|
15
|
+
| Prettify<T[keyof T]>
|
|
16
|
+
| Unrecognized<T[keyof T] extends number ? number : string>;
|