@cadenya/cadenya 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +664 -0
- package/LICENSE +201 -0
- package/README.md +398 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +269 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +269 -0
- package/client.d.ts.map +1 -0
- package/client.js +550 -0
- package/client.js.map +1 -0
- package/client.mjs +546 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +59 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +59 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +159 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/account.d.mts +72 -0
- package/resources/account.d.mts.map +1 -0
- package/resources/account.d.ts +72 -0
- package/resources/account.d.ts.map +1 -0
- package/resources/account.js +24 -0
- package/resources/account.js.map +1 -0
- package/resources/account.mjs +20 -0
- package/resources/account.mjs.map +1 -0
- package/resources/agents/agents.d.mts +175 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +175 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +65 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +60 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.mts +4 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +4 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +11 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +5 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/variations.d.mts +276 -0
- package/resources/agents/variations.d.mts.map +1 -0
- package/resources/agents/variations.d.ts +276 -0
- package/resources/agents/variations.d.ts.map +1 -0
- package/resources/agents/variations.js +51 -0
- package/resources/agents/variations.js.map +1 -0
- package/resources/agents/variations.mjs +47 -0
- package/resources/agents/variations.mjs.map +1 -0
- package/resources/agents/webhook-deliveries.d.mts +80 -0
- package/resources/agents/webhook-deliveries.d.mts.map +1 -0
- package/resources/agents/webhook-deliveries.d.ts +80 -0
- package/resources/agents/webhook-deliveries.d.ts.map +1 -0
- package/resources/agents/webhook-deliveries.js +25 -0
- package/resources/agents/webhook-deliveries.js.map +1 -0
- package/resources/agents/webhook-deliveries.mjs +21 -0
- package/resources/agents/webhook-deliveries.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/api-keys.d.mts +124 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +124 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +59 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +55 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/index.d.mts +11 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/models.d.mts +93 -0
- package/resources/models.d.mts.map +1 -0
- package/resources/models.d.ts +93 -0
- package/resources/models.d.ts.map +1 -0
- package/resources/models.js +38 -0
- package/resources/models.js.map +1 -0
- package/resources/models.mjs +34 -0
- package/resources/models.mjs.map +1 -0
- package/resources/objectives/feedback.d.mts +74 -0
- package/resources/objectives/feedback.d.mts.map +1 -0
- package/resources/objectives/feedback.d.ts +74 -0
- package/resources/objectives/feedback.d.ts.map +1 -0
- package/resources/objectives/feedback.js +24 -0
- package/resources/objectives/feedback.js.map +1 -0
- package/resources/objectives/feedback.mjs +20 -0
- package/resources/objectives/feedback.mjs.map +1 -0
- package/resources/objectives/index.d.mts +6 -0
- package/resources/objectives/index.d.mts.map +1 -0
- package/resources/objectives/index.d.ts +6 -0
- package/resources/objectives/index.d.ts.map +1 -0
- package/resources/objectives/index.js +15 -0
- package/resources/objectives/index.js.map +1 -0
- package/resources/objectives/index.mjs +7 -0
- package/resources/objectives/index.mjs.map +1 -0
- package/resources/objectives/objectives.d.mts +497 -0
- package/resources/objectives/objectives.d.mts.map +1 -0
- package/resources/objectives/objectives.d.ts +497 -0
- package/resources/objectives/objectives.d.ts.map +1 -0
- package/resources/objectives/objectives.js +75 -0
- package/resources/objectives/objectives.js.map +1 -0
- package/resources/objectives/objectives.mjs +70 -0
- package/resources/objectives/objectives.mjs.map +1 -0
- package/resources/objectives/tasks.d.mts +66 -0
- package/resources/objectives/tasks.d.mts.map +1 -0
- package/resources/objectives/tasks.d.ts +66 -0
- package/resources/objectives/tasks.d.ts.map +1 -0
- package/resources/objectives/tasks.js +24 -0
- package/resources/objectives/tasks.js.map +1 -0
- package/resources/objectives/tasks.mjs +20 -0
- package/resources/objectives/tasks.mjs.map +1 -0
- package/resources/objectives/tool-calls.d.mts +116 -0
- package/resources/objectives/tool-calls.d.mts.map +1 -0
- package/resources/objectives/tool-calls.d.ts +116 -0
- package/resources/objectives/tool-calls.d.ts.map +1 -0
- package/resources/objectives/tool-calls.js +40 -0
- package/resources/objectives/tool-calls.js.map +1 -0
- package/resources/objectives/tool-calls.mjs +36 -0
- package/resources/objectives/tool-calls.mjs.map +1 -0
- package/resources/objectives/tools.d.mts +38 -0
- package/resources/objectives/tools.d.mts.map +1 -0
- package/resources/objectives/tools.d.ts +38 -0
- package/resources/objectives/tools.d.ts.map +1 -0
- package/resources/objectives/tools.js +17 -0
- package/resources/objectives/tools.js.map +1 -0
- package/resources/objectives/tools.mjs +13 -0
- package/resources/objectives/tools.mjs.map +1 -0
- package/resources/objectives.d.mts +2 -0
- package/resources/objectives.d.mts.map +1 -0
- package/resources/objectives.d.ts +2 -0
- package/resources/objectives.d.ts.map +1 -0
- package/resources/objectives.js +6 -0
- package/resources/objectives.js.map +1 -0
- package/resources/objectives.mjs +3 -0
- package/resources/objectives.mjs.map +1 -0
- package/resources/search.d.mts +24 -0
- package/resources/search.d.mts.map +1 -0
- package/resources/search.d.ts +24 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +15 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +11 -0
- package/resources/search.mjs.map +1 -0
- package/resources/shared.d.mts +186 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +186 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tool-sets/index.d.mts +3 -0
- package/resources/tool-sets/index.d.mts.map +1 -0
- package/resources/tool-sets/index.d.ts +3 -0
- package/resources/tool-sets/index.d.ts.map +1 -0
- package/resources/tool-sets/index.js +9 -0
- package/resources/tool-sets/index.js.map +1 -0
- package/resources/tool-sets/index.mjs +4 -0
- package/resources/tool-sets/index.mjs.map +1 -0
- package/resources/tool-sets/tool-sets.d.mts +290 -0
- package/resources/tool-sets/tool-sets.d.mts.map +1 -0
- package/resources/tool-sets/tool-sets.d.ts +290 -0
- package/resources/tool-sets/tool-sets.d.ts.map +1 -0
- package/resources/tool-sets/tool-sets.js +73 -0
- package/resources/tool-sets/tool-sets.js.map +1 -0
- package/resources/tool-sets/tool-sets.mjs +68 -0
- package/resources/tool-sets/tool-sets.mjs.map +1 -0
- package/resources/tool-sets/tools.d.mts +161 -0
- package/resources/tool-sets/tools.d.mts.map +1 -0
- package/resources/tool-sets/tools.d.ts +161 -0
- package/resources/tool-sets/tools.d.ts.map +1 -0
- package/resources/tool-sets/tools.js +62 -0
- package/resources/tool-sets/tools.js.map +1 -0
- package/resources/tool-sets/tools.mjs +58 -0
- package/resources/tool-sets/tools.mjs.map +1 -0
- package/resources/tool-sets.d.mts +2 -0
- package/resources/tool-sets.d.mts.map +1 -0
- package/resources/tool-sets.d.ts +2 -0
- package/resources/tool-sets.d.ts.map +1 -0
- package/resources/tool-sets.js +6 -0
- package/resources/tool-sets.js.map +1 -0
- package/resources/tool-sets.mjs +3 -0
- package/resources/tool-sets.mjs.map +1 -0
- package/resources/workspace-secrets.d.mts +92 -0
- package/resources/workspace-secrets.d.mts.map +1 -0
- package/resources/workspace-secrets.d.ts +92 -0
- package/resources/workspace-secrets.d.ts.map +1 -0
- package/resources/workspace-secrets.js +48 -0
- package/resources/workspace-secrets.js.map +1 -0
- package/resources/workspace-secrets.mjs +44 -0
- package/resources/workspace-secrets.mjs.map +1 -0
- package/resources/workspaces.d.mts +50 -0
- package/resources/workspaces.d.mts.map +1 -0
- package/resources/workspaces.d.ts +50 -0
- package/resources/workspaces.d.ts.map +1 -0
- package/resources/workspaces.js +31 -0
- package/resources/workspaces.js.map +1 -0
- package/resources/workspaces.mjs +27 -0
- package/resources/workspaces.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1067 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +163 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +23 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/account.ts +93 -0
- package/src/resources/agents/agents.ts +296 -0
- package/src/resources/agents/index.ts +39 -0
- package/src/resources/agents/variations.ts +377 -0
- package/src/resources/agents/webhook-deliveries.ts +143 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/api-keys.ts +175 -0
- package/src/resources/index.ts +112 -0
- package/src/resources/models.ts +128 -0
- package/src/resources/objectives/feedback.ts +109 -0
- package/src/resources/objectives/index.ts +66 -0
- package/src/resources/objectives/objectives.ts +762 -0
- package/src/resources/objectives/tasks.ts +99 -0
- package/src/resources/objectives/tool-calls.ts +185 -0
- package/src/resources/objectives/tools.ts +59 -0
- package/src/resources/objectives.ts +3 -0
- package/src/resources/search.ts +39 -0
- package/src/resources/shared.ts +204 -0
- package/src/resources/tool-sets/index.ts +38 -0
- package/src/resources/tool-sets/tool-sets.ts +430 -0
- package/src/resources/tool-sets/tools.ts +240 -0
- package/src/resources/tool-sets.ts +3 -0
- package/src/resources/workspace-secrets.ts +147 -0
- package/src/resources/workspaces.ts +72 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { CadenyaError } from '../../core/error';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Percent-encode everything that isn't safe to have in a path without encoding safe chars.
|
|
5
|
+
*
|
|
6
|
+
* Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3:
|
|
7
|
+
* > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
|
8
|
+
* > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
|
|
9
|
+
* > pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
|
10
|
+
*/
|
|
11
|
+
export function encodeURIPath(str: string) {
|
|
12
|
+
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
16
|
+
|
|
17
|
+
export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
18
|
+
function path(statics: readonly string[], ...params: readonly unknown[]): string {
|
|
19
|
+
// If there are no params, no processing is needed.
|
|
20
|
+
if (statics.length === 1) return statics[0]!;
|
|
21
|
+
|
|
22
|
+
let postPath = false;
|
|
23
|
+
const invalidSegments = [];
|
|
24
|
+
const path = statics.reduce((previousValue, currentValue, index) => {
|
|
25
|
+
if (/[?#]/.test(currentValue)) {
|
|
26
|
+
postPath = true;
|
|
27
|
+
}
|
|
28
|
+
const value = params[index];
|
|
29
|
+
let encoded = (postPath ? encodeURIComponent : pathEncoder)('' + value);
|
|
30
|
+
if (
|
|
31
|
+
index !== params.length &&
|
|
32
|
+
(value == null ||
|
|
33
|
+
(typeof value === 'object' &&
|
|
34
|
+
// handle values from other realms
|
|
35
|
+
value.toString ===
|
|
36
|
+
Object.getPrototypeOf(Object.getPrototypeOf((value as any).hasOwnProperty ?? EMPTY) ?? EMPTY)
|
|
37
|
+
?.toString))
|
|
38
|
+
) {
|
|
39
|
+
encoded = value + '';
|
|
40
|
+
invalidSegments.push({
|
|
41
|
+
start: previousValue.length + currentValue.length,
|
|
42
|
+
length: encoded.length,
|
|
43
|
+
error: `Value of type ${Object.prototype.toString
|
|
44
|
+
.call(value)
|
|
45
|
+
.slice(8, -1)} is not a valid path parameter`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
|
49
|
+
}, '');
|
|
50
|
+
|
|
51
|
+
const pathOnly = path.split(/[?#]/, 1)[0]!;
|
|
52
|
+
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
53
|
+
let match;
|
|
54
|
+
|
|
55
|
+
// Find all invalid segments
|
|
56
|
+
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
57
|
+
invalidSegments.push({
|
|
58
|
+
start: match.index,
|
|
59
|
+
length: match[0].length,
|
|
60
|
+
error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
invalidSegments.sort((a, b) => a.start - b.start);
|
|
65
|
+
|
|
66
|
+
if (invalidSegments.length > 0) {
|
|
67
|
+
let lastEnd = 0;
|
|
68
|
+
const underline = invalidSegments.reduce((acc, segment) => {
|
|
69
|
+
const spaces = ' '.repeat(segment.start - lastEnd);
|
|
70
|
+
const arrows = '^'.repeat(segment.length);
|
|
71
|
+
lastEnd = segment.start + segment.length;
|
|
72
|
+
return acc + spaces + arrows;
|
|
73
|
+
}, '');
|
|
74
|
+
|
|
75
|
+
throw new CadenyaError(
|
|
76
|
+
`Path parameters result in path with invalid segments:\n${invalidSegments
|
|
77
|
+
.map((e) => e.error)
|
|
78
|
+
.join('\n')}\n${path}\n${underline}`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return path;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
87
|
+
*/
|
|
88
|
+
export const path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { CadenyaError } from '../../core/error';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Basic re-implementation of `qs.stringify` for primitive types.
|
|
7
|
+
*/
|
|
8
|
+
export function stringifyQuery(query: object | Record<string, unknown>) {
|
|
9
|
+
return Object.entries(query)
|
|
10
|
+
.filter(([_, value]) => typeof value !== 'undefined')
|
|
11
|
+
.map(([key, value]) => {
|
|
12
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
13
|
+
return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
14
|
+
}
|
|
15
|
+
if (value === null) {
|
|
16
|
+
return `${encodeURIComponent(key)}=`;
|
|
17
|
+
}
|
|
18
|
+
throw new CadenyaError(
|
|
19
|
+
`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
|
|
20
|
+
);
|
|
21
|
+
})
|
|
22
|
+
.join('&');
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* https://stackoverflow.com/a/2117523
|
|
5
|
+
*/
|
|
6
|
+
export let uuid4 = function () {
|
|
7
|
+
const { crypto } = globalThis as any;
|
|
8
|
+
if (crypto?.randomUUID) {
|
|
9
|
+
uuid4 = crypto.randomUUID.bind(crypto);
|
|
10
|
+
return crypto.randomUUID();
|
|
11
|
+
}
|
|
12
|
+
const u8 = new Uint8Array(1);
|
|
13
|
+
const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff;
|
|
14
|
+
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) =>
|
|
15
|
+
(+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16),
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { CadenyaError } from '../../core/error';
|
|
4
|
+
|
|
5
|
+
// https://url.spec.whatwg.org/#url-scheme-string
|
|
6
|
+
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
7
|
+
|
|
8
|
+
export const isAbsoluteURL = (url: string): boolean => {
|
|
9
|
+
return startsWithSchemeRegexp.test(url);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export let isArray = (val: unknown): val is unknown[] => ((isArray = Array.isArray), isArray(val));
|
|
13
|
+
export let isReadonlyArray = isArray as (val: unknown) => val is readonly unknown[];
|
|
14
|
+
|
|
15
|
+
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
16
|
+
export function maybeObj(x: unknown): object {
|
|
17
|
+
if (typeof x !== 'object') {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return x ?? {};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// https://stackoverflow.com/a/34491287
|
|
25
|
+
export function isEmptyObj(obj: Object | null | undefined): boolean {
|
|
26
|
+
if (!obj) return true;
|
|
27
|
+
for (const _k in obj) return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
32
|
+
export function hasOwn<T extends object = object>(obj: T, key: PropertyKey): key is keyof T {
|
|
33
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function isObj(obj: unknown): obj is Record<string, unknown> {
|
|
37
|
+
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const ensurePresent = <T>(value: T | null | undefined): T => {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
throw new CadenyaError(`Expected a value to be given but received ${value} instead.`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return value;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const validatePositiveInteger = (name: string, n: unknown): number => {
|
|
49
|
+
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
50
|
+
throw new CadenyaError(`${name} must be an integer`);
|
|
51
|
+
}
|
|
52
|
+
if (n < 0) {
|
|
53
|
+
throw new CadenyaError(`${name} must be a positive integer`);
|
|
54
|
+
}
|
|
55
|
+
return n;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const coerceInteger = (value: unknown): number => {
|
|
59
|
+
if (typeof value === 'number') return Math.round(value);
|
|
60
|
+
if (typeof value === 'string') return parseInt(value, 10);
|
|
61
|
+
|
|
62
|
+
throw new CadenyaError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const coerceFloat = (value: unknown): number => {
|
|
66
|
+
if (typeof value === 'number') return value;
|
|
67
|
+
if (typeof value === 'string') return parseFloat(value);
|
|
68
|
+
|
|
69
|
+
throw new CadenyaError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const coerceBoolean = (value: unknown): boolean => {
|
|
73
|
+
if (typeof value === 'boolean') return value;
|
|
74
|
+
if (typeof value === 'string') return value === 'true';
|
|
75
|
+
return Boolean(value);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const maybeCoerceInteger = (value: unknown): number | undefined => {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
return coerceInteger(value);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const maybeCoerceFloat = (value: unknown): number | undefined => {
|
|
86
|
+
if (value == null) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return coerceFloat(value);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
return coerceBoolean(value);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const safeJSON = (text: string) => {
|
|
100
|
+
try {
|
|
101
|
+
return JSON.parse(text);
|
|
102
|
+
} catch (err) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './utils/values';
|
|
4
|
+
export * from './utils/base64';
|
|
5
|
+
export * from './utils/env';
|
|
6
|
+
export * from './utils/log';
|
|
7
|
+
export * from './utils/uuid';
|
|
8
|
+
export * from './utils/sleep';
|
|
9
|
+
export * from './utils/query';
|
package/src/lib/.keep
ADDED
package/src/resource.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as Shared from './shared';
|
|
5
|
+
import * as WorkspacesAPI from './workspaces';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* AccountService manages account-level operations.
|
|
11
|
+
* Accounts are the top-level organizational unit in the system.
|
|
12
|
+
* All operations are scoped to the authenticated account determined by the JWT token.
|
|
13
|
+
*
|
|
14
|
+
* Authentication: Bearer token (JWT)
|
|
15
|
+
* Scope: Account-level operations
|
|
16
|
+
*/
|
|
17
|
+
export class AccountResource extends APIResource {
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the current account for the token accessing the API. Useful to check
|
|
20
|
+
* if the credentials are valid.
|
|
21
|
+
*/
|
|
22
|
+
retrieve(options?: RequestOptions): APIPromise<Account> {
|
|
23
|
+
return this._client.get('/v1/account', options);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Account {
|
|
28
|
+
/**
|
|
29
|
+
* AccountResourceMetadata is used to represent a resource that is associated to an
|
|
30
|
+
* account but not to a workspace.
|
|
31
|
+
*/
|
|
32
|
+
metadata: Shared.AccountResourceMetadata;
|
|
33
|
+
|
|
34
|
+
spec: AccountSpec;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface AccountSpec {
|
|
38
|
+
billingEmail?: string;
|
|
39
|
+
|
|
40
|
+
description?: string;
|
|
41
|
+
|
|
42
|
+
domain?: string;
|
|
43
|
+
|
|
44
|
+
workspaces?: Array<WorkspacesAPI.Workspace>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Profile represents a human user at the account level. Profiles are
|
|
49
|
+
* account-scoped resources that can be associated with multiple workspaces through
|
|
50
|
+
* the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
|
|
51
|
+
*/
|
|
52
|
+
export interface Profile {
|
|
53
|
+
/**
|
|
54
|
+
* AccountResourceMetadata is used to represent a resource that is associated to an
|
|
55
|
+
* account but not to a workspace.
|
|
56
|
+
*/
|
|
57
|
+
metadata: Shared.AccountResourceMetadata;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* ProfileSpec contains the profile-specific fields
|
|
61
|
+
*/
|
|
62
|
+
spec: ProfileSpec;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* ProfileSpec contains the profile-specific fields
|
|
67
|
+
*/
|
|
68
|
+
export interface ProfileSpec {
|
|
69
|
+
/**
|
|
70
|
+
* Type is the type of profile. User's are humans, API keys are computers. You know
|
|
71
|
+
* the deal.
|
|
72
|
+
*/
|
|
73
|
+
type: 'PROFILE_TYPE_USER' | 'PROFILE_TYPE_API_KEY' | 'PROFILE_TYPE_SYSTEM';
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Email address of the user (required, unique per account)
|
|
77
|
+
*/
|
|
78
|
+
email?: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Display name for the user (e.g., "Bobby Tables")
|
|
82
|
+
*/
|
|
83
|
+
name?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export declare namespace AccountResource {
|
|
87
|
+
export {
|
|
88
|
+
type Account as Account,
|
|
89
|
+
type AccountSpec as AccountSpec,
|
|
90
|
+
type Profile as Profile,
|
|
91
|
+
type ProfileSpec as ProfileSpec,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as AccountAPI from '../account';
|
|
5
|
+
import * as Shared from '../shared';
|
|
6
|
+
import * as VariationsAPI from './variations';
|
|
7
|
+
import {
|
|
8
|
+
AgentVariation,
|
|
9
|
+
AgentVariationInfo,
|
|
10
|
+
AgentVariationSpec,
|
|
11
|
+
AgentVariationSpecAgentDocument,
|
|
12
|
+
AgentVariationSpecAgentTool,
|
|
13
|
+
AgentVariationSpecConstraints,
|
|
14
|
+
AgentVariationSpecModelConfig,
|
|
15
|
+
AgentVariationSpecToolSelection,
|
|
16
|
+
AgentVariationsCursorPagination,
|
|
17
|
+
ToolSelectionAssignedTools,
|
|
18
|
+
ToolSelectionAutoDiscovery,
|
|
19
|
+
VariationCreateParams,
|
|
20
|
+
VariationDeleteParams,
|
|
21
|
+
VariationListParams,
|
|
22
|
+
VariationRetrieveParams,
|
|
23
|
+
VariationUpdateParams,
|
|
24
|
+
Variations,
|
|
25
|
+
} from './variations';
|
|
26
|
+
import * as WebhookDeliveriesAPI from './webhook-deliveries';
|
|
27
|
+
import {
|
|
28
|
+
WebhookDeliveries,
|
|
29
|
+
WebhookDeliveriesCursorPagination,
|
|
30
|
+
WebhookDelivery,
|
|
31
|
+
WebhookDeliveryData,
|
|
32
|
+
WebhookDeliveryListParams,
|
|
33
|
+
} from './webhook-deliveries';
|
|
34
|
+
import { APIPromise } from '../../core/api-promise';
|
|
35
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
|
|
36
|
+
import { buildHeaders } from '../../internal/headers';
|
|
37
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
38
|
+
import { path } from '../../internal/utils/path';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* AgentService manages AI agents at the WORKSPACE level.
|
|
42
|
+
* Agents are workspace-scoped resources that define AI behavior and tool access.
|
|
43
|
+
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
44
|
+
*
|
|
45
|
+
* Authentication: Bearer token (JWT)
|
|
46
|
+
* Scope: Workspace-level operations
|
|
47
|
+
*/
|
|
48
|
+
export class Agents extends APIResource {
|
|
49
|
+
variations: VariationsAPI.Variations = new VariationsAPI.Variations(this._client);
|
|
50
|
+
webhookDeliveries: WebhookDeliveriesAPI.WebhookDeliveries = new WebhookDeliveriesAPI.WebhookDeliveries(
|
|
51
|
+
this._client,
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new agent in the workspace
|
|
56
|
+
*/
|
|
57
|
+
create(body: AgentCreateParams, options?: RequestOptions): APIPromise<Agent> {
|
|
58
|
+
return this._client.post('/v1/agents', { body, ...options });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves an agent by ID from the workspace
|
|
63
|
+
*/
|
|
64
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Agent> {
|
|
65
|
+
return this._client.get(path`/v1/agents/${id}`, options);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Updates an agent in the workspace
|
|
70
|
+
*/
|
|
71
|
+
update(id: string, body: AgentUpdateParams, options?: RequestOptions): APIPromise<Agent> {
|
|
72
|
+
return this._client.patch(path`/v1/agents/${id}`, { body, ...options });
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Lists all agents in the workspace
|
|
77
|
+
*/
|
|
78
|
+
list(
|
|
79
|
+
query: AgentListParams | null | undefined = {},
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): PagePromise<AgentsCursorPagination, Agent> {
|
|
82
|
+
return this._client.getAPIList('/v1/agents', CursorPagination<Agent>, { query, ...options });
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Deletes an agent from the workspace
|
|
87
|
+
*/
|
|
88
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
89
|
+
return this._client.delete(path`/v1/agents/${id}`, {
|
|
90
|
+
...options,
|
|
91
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type AgentsCursorPagination = CursorPagination<Agent>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Agent resource
|
|
100
|
+
*/
|
|
101
|
+
export interface Agent {
|
|
102
|
+
/**
|
|
103
|
+
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
104
|
+
*/
|
|
105
|
+
metadata: Shared.ResourceMetadata;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Agent specification (user-provided configuration)
|
|
109
|
+
*/
|
|
110
|
+
spec: AgentSpec;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* AgentInfo contains simple information about an agent for display or quick
|
|
114
|
+
* reference
|
|
115
|
+
*/
|
|
116
|
+
info?: AgentInfo;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* AgentInfo contains simple information about an agent for display or quick
|
|
121
|
+
* reference
|
|
122
|
+
*/
|
|
123
|
+
export interface AgentInfo {
|
|
124
|
+
/**
|
|
125
|
+
* Profile represents a human user at the account level. Profiles are
|
|
126
|
+
* account-scoped resources that can be associated with multiple workspaces through
|
|
127
|
+
* the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
|
|
128
|
+
*/
|
|
129
|
+
createdBy?: AccountAPI.Profile;
|
|
130
|
+
|
|
131
|
+
variationCount?: number;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Agent specification (user-provided configuration)
|
|
136
|
+
*/
|
|
137
|
+
export interface AgentSpec {
|
|
138
|
+
/**
|
|
139
|
+
* Status of the agent
|
|
140
|
+
*/
|
|
141
|
+
status:
|
|
142
|
+
| 'AGENT_STATUS_UNSPECIFIED'
|
|
143
|
+
| 'AGENT_STATUS_DRAFT'
|
|
144
|
+
| 'AGENT_STATUS_PUBLISHED'
|
|
145
|
+
| 'AGENT_STATUS_ARCHIVED';
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Controls how variations are automatically selected when creating objectives
|
|
149
|
+
* Defaults to RANDOM when unspecified
|
|
150
|
+
*/
|
|
151
|
+
variationSelectionMode:
|
|
152
|
+
| 'VARIATION_SELECTION_MODE_UNSPECIFIED'
|
|
153
|
+
| 'VARIATION_SELECTION_MODE_RANDOM'
|
|
154
|
+
| 'VARIATION_SELECTION_MODE_WEIGHTED';
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Description of the agent's purpose
|
|
158
|
+
*/
|
|
159
|
+
description?: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The generated secret that will sign all webhooks that are sent to your
|
|
163
|
+
* configured Webhook URL. Formatted as "wh_asdf1234" per the
|
|
164
|
+
* https://www.standardwebhooks.com/ format.
|
|
165
|
+
*/
|
|
166
|
+
webhookEventsHmacSecret?: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The URL that Cadenya will send events for any objective assigned to the agent.
|
|
170
|
+
*/
|
|
171
|
+
webhookEventsUrl?: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface Page {
|
|
175
|
+
nextCursor?: string;
|
|
176
|
+
|
|
177
|
+
total?: number;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface AgentCreateParams {
|
|
181
|
+
/**
|
|
182
|
+
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
183
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
184
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
185
|
+
*/
|
|
186
|
+
metadata: Shared.CreateResourceMetadata;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Agent specification (user-provided configuration)
|
|
190
|
+
*/
|
|
191
|
+
spec: AgentSpec;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Create agent variation request
|
|
195
|
+
*/
|
|
196
|
+
defaultVariation?: AgentCreateParams.DefaultVariation;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export namespace AgentCreateParams {
|
|
200
|
+
/**
|
|
201
|
+
* Create agent variation request
|
|
202
|
+
*/
|
|
203
|
+
export interface DefaultVariation {
|
|
204
|
+
/**
|
|
205
|
+
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
206
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
207
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
208
|
+
*/
|
|
209
|
+
metadata: Shared.CreateResourceMetadata;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* AgentVariationSpec defines the operational configuration for a variation
|
|
213
|
+
*/
|
|
214
|
+
spec: VariationsAPI.AgentVariationSpec;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface AgentUpdateParams {
|
|
219
|
+
/**
|
|
220
|
+
* UpdateResourceMetadata contains the user-provided fields for updating a
|
|
221
|
+
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
222
|
+
* profile_id, created_at) are excluded since they are set by the server.
|
|
223
|
+
*/
|
|
224
|
+
metadata?: Shared.UpdateResourceMetadata;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Agent specification (user-provided configuration)
|
|
228
|
+
*/
|
|
229
|
+
spec?: AgentSpec;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Fields to update
|
|
233
|
+
*/
|
|
234
|
+
updateMask?: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface AgentListParams extends CursorPaginationParams {
|
|
238
|
+
/**
|
|
239
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
240
|
+
*/
|
|
241
|
+
includeInfo?: boolean;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Filter expression (query param: prefix)
|
|
245
|
+
*/
|
|
246
|
+
prefix?: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Sort order for results (asc or desc by creation time)
|
|
250
|
+
*/
|
|
251
|
+
sortOrder?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
Agents.Variations = Variations;
|
|
255
|
+
Agents.WebhookDeliveries = WebhookDeliveries;
|
|
256
|
+
|
|
257
|
+
export declare namespace Agents {
|
|
258
|
+
export {
|
|
259
|
+
type Agent as Agent,
|
|
260
|
+
type AgentInfo as AgentInfo,
|
|
261
|
+
type AgentSpec as AgentSpec,
|
|
262
|
+
type Page as Page,
|
|
263
|
+
type AgentsCursorPagination as AgentsCursorPagination,
|
|
264
|
+
type AgentCreateParams as AgentCreateParams,
|
|
265
|
+
type AgentUpdateParams as AgentUpdateParams,
|
|
266
|
+
type AgentListParams as AgentListParams,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export {
|
|
270
|
+
Variations as Variations,
|
|
271
|
+
type AgentVariation as AgentVariation,
|
|
272
|
+
type AgentVariationInfo as AgentVariationInfo,
|
|
273
|
+
type AgentVariationSpec as AgentVariationSpec,
|
|
274
|
+
type AgentVariationSpecAgentDocument as AgentVariationSpecAgentDocument,
|
|
275
|
+
type AgentVariationSpecAgentTool as AgentVariationSpecAgentTool,
|
|
276
|
+
type AgentVariationSpecConstraints as AgentVariationSpecConstraints,
|
|
277
|
+
type AgentVariationSpecModelConfig as AgentVariationSpecModelConfig,
|
|
278
|
+
type AgentVariationSpecToolSelection as AgentVariationSpecToolSelection,
|
|
279
|
+
type ToolSelectionAssignedTools as ToolSelectionAssignedTools,
|
|
280
|
+
type ToolSelectionAutoDiscovery as ToolSelectionAutoDiscovery,
|
|
281
|
+
type AgentVariationsCursorPagination as AgentVariationsCursorPagination,
|
|
282
|
+
type VariationCreateParams as VariationCreateParams,
|
|
283
|
+
type VariationRetrieveParams as VariationRetrieveParams,
|
|
284
|
+
type VariationUpdateParams as VariationUpdateParams,
|
|
285
|
+
type VariationListParams as VariationListParams,
|
|
286
|
+
type VariationDeleteParams as VariationDeleteParams,
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export {
|
|
290
|
+
WebhookDeliveries as WebhookDeliveries,
|
|
291
|
+
type WebhookDelivery as WebhookDelivery,
|
|
292
|
+
type WebhookDeliveryData as WebhookDeliveryData,
|
|
293
|
+
type WebhookDeliveriesCursorPagination as WebhookDeliveriesCursorPagination,
|
|
294
|
+
type WebhookDeliveryListParams as WebhookDeliveryListParams,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Agents,
|
|
5
|
+
type Agent,
|
|
6
|
+
type AgentInfo,
|
|
7
|
+
type AgentSpec,
|
|
8
|
+
type Page,
|
|
9
|
+
type AgentCreateParams,
|
|
10
|
+
type AgentUpdateParams,
|
|
11
|
+
type AgentListParams,
|
|
12
|
+
type AgentsCursorPagination,
|
|
13
|
+
} from './agents';
|
|
14
|
+
export {
|
|
15
|
+
Variations,
|
|
16
|
+
type AgentVariation,
|
|
17
|
+
type AgentVariationInfo,
|
|
18
|
+
type AgentVariationSpec,
|
|
19
|
+
type AgentVariationSpecAgentDocument,
|
|
20
|
+
type AgentVariationSpecAgentTool,
|
|
21
|
+
type AgentVariationSpecConstraints,
|
|
22
|
+
type AgentVariationSpecModelConfig,
|
|
23
|
+
type AgentVariationSpecToolSelection,
|
|
24
|
+
type ToolSelectionAssignedTools,
|
|
25
|
+
type ToolSelectionAutoDiscovery,
|
|
26
|
+
type VariationCreateParams,
|
|
27
|
+
type VariationRetrieveParams,
|
|
28
|
+
type VariationUpdateParams,
|
|
29
|
+
type VariationListParams,
|
|
30
|
+
type VariationDeleteParams,
|
|
31
|
+
type AgentVariationsCursorPagination,
|
|
32
|
+
} from './variations';
|
|
33
|
+
export {
|
|
34
|
+
WebhookDeliveries,
|
|
35
|
+
type WebhookDelivery,
|
|
36
|
+
type WebhookDeliveryData,
|
|
37
|
+
type WebhookDeliveryListParams,
|
|
38
|
+
type WebhookDeliveriesCursorPagination,
|
|
39
|
+
} from './webhook-deliveries';
|