@cadenya/cadenya 0.135.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -358
- package/api.md +781 -0
- package/dist/client.d.ts +69 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +97 -0
- package/dist/client.js.map +1 -0
- package/dist/core/error.d.ts +39 -0
- package/dist/core/error.d.ts.map +1 -0
- package/dist/core/error.js +56 -0
- package/dist/core/error.js.map +1 -0
- package/dist/core/http.d.ts +140 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +525 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/pagination.d.ts +12 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +29 -0
- package/dist/core/pagination.js.map +1 -0
- package/dist/core/sse.d.ts +44 -0
- package/dist/core/sse.d.ts.map +1 -0
- package/dist/core/sse.js +350 -0
- package/dist/core/sse.js.map +1 -0
- package/dist/core/webhooks.d.ts +25 -0
- package/dist/core/webhooks.d.ts.map +1 -0
- package/dist/core/webhooks.js +124 -0
- package/dist/core/webhooks.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/accounts.d.ts +34 -0
- package/dist/resources/accounts.d.ts.map +1 -0
- package/dist/resources/accounts.js +47 -0
- package/dist/resources/accounts.js.map +1 -0
- package/dist/resources/agent-schedules.d.ts +186 -0
- package/dist/resources/agent-schedules.d.ts.map +1 -0
- package/dist/resources/agent-schedules.js +141 -0
- package/dist/resources/agent-schedules.js.map +1 -0
- package/dist/resources/agent-variations.d.ts +230 -0
- package/dist/resources/agent-variations.d.ts.map +1 -0
- package/dist/resources/agent-variations.js +174 -0
- package/dist/resources/agent-variations.js.map +1 -0
- package/dist/resources/agents.d.ts +318 -0
- package/dist/resources/agents.d.ts.map +1 -0
- package/dist/resources/agents.js +202 -0
- package/dist/resources/agents.js.map +1 -0
- package/dist/resources/ai-provider-keys.d.ts +141 -0
- package/dist/resources/ai-provider-keys.d.ts.map +1 -0
- package/dist/resources/ai-provider-keys.js +93 -0
- package/dist/resources/ai-provider-keys.js.map +1 -0
- package/dist/resources/api-keys.d.ts +222 -0
- package/dist/resources/api-keys.d.ts.map +1 -0
- package/dist/resources/api-keys.js +194 -0
- package/dist/resources/api-keys.js.map +1 -0
- package/dist/resources/memory-entries.d.ts +122 -0
- package/dist/resources/memory-entries.d.ts.map +1 -0
- package/dist/resources/memory-entries.js +93 -0
- package/dist/resources/memory-entries.js.map +1 -0
- package/dist/resources/memory-layers.d.ts +137 -0
- package/dist/resources/memory-layers.d.ts.map +1 -0
- package/dist/resources/memory-layers.js +97 -0
- package/dist/resources/memory-layers.js.map +1 -0
- package/dist/resources/models.d.ts +148 -0
- package/dist/resources/models.d.ts.map +1 -0
- package/dist/resources/models.js +93 -0
- package/dist/resources/models.js.map +1 -0
- package/dist/resources/objectives.d.ts +602 -0
- package/dist/resources/objectives.d.ts.map +1 -0
- package/dist/resources/objectives.js +356 -0
- package/dist/resources/objectives.js.map +1 -0
- package/dist/resources/profiles.d.ts +16 -0
- package/dist/resources/profiles.d.ts.map +1 -0
- package/dist/resources/profiles.js +21 -0
- package/dist/resources/profiles.js.map +1 -0
- package/dist/resources/tenants.d.ts +135 -0
- package/dist/resources/tenants.d.ts.map +1 -0
- package/dist/resources/tenants.js +80 -0
- package/dist/resources/tenants.js.map +1 -0
- package/dist/resources/tool-search.d.ts +27 -0
- package/dist/resources/tool-search.d.ts.map +1 -0
- package/dist/resources/tool-search.js +25 -0
- package/dist/resources/tool-search.js.map +1 -0
- package/dist/resources/tool-set-secrets.d.ts +128 -0
- package/dist/resources/tool-set-secrets.d.ts.map +1 -0
- package/dist/resources/tool-set-secrets.js +93 -0
- package/dist/resources/tool-set-secrets.js.map +1 -0
- package/dist/resources/tool-sets.d.ts +271 -0
- package/dist/resources/tool-sets.d.ts.map +1 -0
- package/dist/resources/tool-sets.js +185 -0
- package/dist/resources/tool-sets.js.map +1 -0
- package/dist/resources/tools.d.ts +178 -0
- package/dist/resources/tools.d.ts.map +1 -0
- package/dist/resources/tools.js +125 -0
- package/dist/resources/tools.js.map +1 -0
- package/dist/resources/uploads.d.ts +43 -0
- package/dist/resources/uploads.d.ts.map +1 -0
- package/dist/resources/uploads.js +41 -0
- package/dist/resources/uploads.js.map +1 -0
- package/dist/resources/widget-sessions.d.ts +168 -0
- package/dist/resources/widget-sessions.d.ts.map +1 -0
- package/dist/resources/widget-sessions.js +110 -0
- package/dist/resources/widget-sessions.js.map +1 -0
- package/dist/resources/widgets.d.ts +166 -0
- package/dist/resources/widgets.d.ts.map +1 -0
- package/dist/resources/widgets.js +125 -0
- package/dist/resources/widgets.js.map +1 -0
- package/dist/resources/workspace-admin.d.ts +214 -0
- package/dist/resources/workspace-admin.d.ts.map +1 -0
- package/dist/resources/workspace-admin.js +154 -0
- package/dist/resources/workspace-admin.js.map +1 -0
- package/dist/resources/workspace-secrets.d.ts +134 -0
- package/dist/resources/workspace-secrets.d.ts.map +1 -0
- package/dist/resources/workspace-secrets.js +93 -0
- package/dist/resources/workspace-secrets.js.map +1 -0
- package/dist/resources/workspaces.d.ts +44 -0
- package/dist/resources/workspaces.d.ts.map +1 -0
- package/dist/resources/workspaces.js +26 -0
- package/dist/resources/workspaces.js.map +1 -0
- package/dist/types.d.ts +4634 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +103 -0
- package/dist/types.js.map +1 -0
- package/dist/webhooks.d.ts +93 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +21 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +24 -165
- package/src/client.ts +124 -1532
- package/src/core/error.ts +50 -109
- package/src/core/http.ts +639 -0
- package/src/core/pagination.ts +16 -150
- package/src/core/sse.ts +338 -0
- package/src/core/webhooks.ts +141 -0
- package/src/index.ts +35 -20
- package/src/resources/accounts.ts +50 -0
- package/src/resources/agent-schedules.ts +251 -0
- package/src/resources/agent-variations.ts +312 -0
- package/src/resources/agents.ts +411 -1
- package/src/resources/ai-provider-keys.ts +119 -309
- package/src/resources/api-keys.ts +219 -276
- package/src/resources/memory-entries.ts +163 -0
- package/src/resources/memory-layers.ts +181 -1
- package/src/resources/models.ts +125 -372
- package/src/resources/objectives.ts +764 -1
- package/src/resources/profiles.ts +17 -13
- package/src/resources/tenants.ts +168 -1
- package/src/resources/tool-search.ts +36 -0
- package/src/resources/tool-set-secrets.ts +169 -0
- package/src/resources/tool-sets.ts +355 -1
- package/src/resources/tools.ts +235 -0
- package/src/resources/uploads.ts +42 -127
- package/src/resources/widget-sessions.ts +148 -437
- package/src/resources/widgets.ts +155 -247
- package/src/resources/workspace-admin.ts +281 -1
- package/src/resources/workspace-secrets.ts +121 -159
- package/src/resources/workspaces.ts +32 -75
- package/src/types.ts +5188 -0
- package/src/webhooks.ts +107 -0
- package/CHANGELOG.md +0 -1542
- package/api-promise.d.mts +0 -3
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -3
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -6
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -3
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -335
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -335
- package/client.d.ts.map +0 -1
- package/client.js +0 -630
- package/client.js.map +0 -1
- package/client.mjs +0 -626
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -46
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -46
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -73
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -69
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -46
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -46
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -112
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -96
- package/core/error.mjs.map +0 -1
- package/core/pagination.d.mts +0 -59
- package/core/pagination.d.mts.map +0 -1
- package/core/pagination.d.ts +0 -59
- package/core/pagination.d.ts.map +0 -1
- package/core/pagination.js +0 -100
- package/core/pagination.js.map +0 -1
- package/core/pagination.mjs +0 -94
- package/core/pagination.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -10
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -6
- package/core/resource.mjs.map +0 -1
- package/core/streaming.d.mts +0 -33
- package/core/streaming.d.mts.map +0 -1
- package/core/streaming.d.ts +0 -33
- package/core/streaming.d.ts.map +0 -1
- package/core/streaming.js +0 -268
- package/core/streaming.js.map +0 -1
- package/core/streaming.mjs +0 -263
- package/core/streaming.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -3
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -3
- package/error.d.ts.map +0 -1
- package/error.js +0 -6
- package/error.js.map +0 -1
- package/error.mjs +0 -3
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -7
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -7
- package/index.d.ts.map +0 -1
- package/index.js +0 -31
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -73
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -73
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -3
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -2
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/decoders/line.d.mts +0 -17
- package/internal/decoders/line.d.mts.map +0 -1
- package/internal/decoders/line.d.ts +0 -17
- package/internal/decoders/line.d.ts.map +0 -1
- package/internal/decoders/line.js +0 -113
- package/internal/decoders/line.js.map +0 -1
- package/internal/decoders/line.mjs +0 -108
- package/internal/decoders/line.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -161
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -156
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -40
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -35
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -20
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -20
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -78
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -73
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -12
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -12
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -49
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -46
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -7
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -7
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -13
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -9
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -277
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -274
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -15
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -15
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -230
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -77
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -77
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -13
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -9
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -17
- package/internal/shim-types.d.mts.map +0 -1
- package/internal/shim-types.d.ts +0 -17
- package/internal/shim-types.d.ts.map +0 -1
- package/internal/shim-types.js +0 -9
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -8
- package/internal/shim-types.mjs.map +0 -1
- package/internal/shims.d.mts +0 -26
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -26
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -97
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -90
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -45
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -45
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -88
- package/internal/to-file.mjs.map +0 -1
- package/internal/tslib.js +0 -81
- package/internal/tslib.mjs +0 -17
- package/internal/types.d.mts +0 -69
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -69
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -3
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -2
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -42
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -42
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -141
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -131
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -37
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -32
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/bytes.d.mts +0 -4
- package/internal/utils/bytes.d.mts.map +0 -1
- package/internal/utils/bytes.d.ts +0 -4
- package/internal/utils/bytes.d.ts.map +0 -1
- package/internal/utils/bytes.js +0 -31
- package/internal/utils/bytes.js.map +0 -1
- package/internal/utils/bytes.mjs +0 -26
- package/internal/utils/bytes.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -21
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -17
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -37
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -37
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -79
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -74
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/query.d.mts +0 -2
- package/internal/utils/query.d.mts.map +0 -1
- package/internal/utils/query.d.ts +0 -2
- package/internal/utils/query.d.ts.map +0 -1
- package/internal/utils/query.js +0 -9
- package/internal/utils/query.js.map +0 -1
- package/internal/utils/query.mjs +0 -5
- package/internal/utils/query.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -6
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -2
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -18
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -14
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -18
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -18
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -111
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -93
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -8
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -8
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -11
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- package/internal/utils.mjs.map +0 -1
- package/pagination.d.mts +0 -3
- package/pagination.d.mts.map +0 -1
- package/pagination.d.ts +0 -3
- package/pagination.d.ts.map +0 -1
- package/pagination.js +0 -6
- package/pagination.js.map +0 -1
- package/pagination.mjs +0 -3
- package/pagination.mjs.map +0 -1
- package/resource.d.mts +0 -3
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -3
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -6
- package/resource.js.map +0 -1
- package/resource.mjs +0 -3
- package/resource.mjs.map +0 -1
- package/resources/account.d.mts +0 -124
- package/resources/account.d.mts.map +0 -1
- package/resources/account.d.ts +0 -124
- package/resources/account.d.ts.map +0 -1
- package/resources/account.js +0 -32
- package/resources/account.js.map +0 -1
- package/resources/account.mjs +0 -28
- package/resources/account.mjs.map +0 -1
- package/resources/agents/agents.d.mts +0 -379
- package/resources/agents/agents.d.mts.map +0 -1
- package/resources/agents/agents.d.ts +0 -379
- package/resources/agents/agents.d.ts.map +0 -1
- package/resources/agents/agents.js +0 -191
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -186
- package/resources/agents/agents.mjs.map +0 -1
- package/resources/agents/feedback.d.mts +0 -71
- package/resources/agents/feedback.d.mts.map +0 -1
- package/resources/agents/feedback.d.ts +0 -71
- package/resources/agents/feedback.d.ts.map +0 -1
- package/resources/agents/feedback.js +0 -33
- package/resources/agents/feedback.js.map +0 -1
- package/resources/agents/feedback.mjs +0 -29
- package/resources/agents/feedback.mjs.map +0 -1
- package/resources/agents/index.d.mts +0 -6
- package/resources/agents/index.d.mts.map +0 -1
- package/resources/agents/index.d.ts +0 -6
- package/resources/agents/index.d.ts.map +0 -1
- package/resources/agents/index.js +0 -14
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -6
- package/resources/agents/index.mjs.map +0 -1
- package/resources/agents/schedules.d.mts +0 -383
- package/resources/agents/schedules.d.mts.map +0 -1
- package/resources/agents/schedules.d.ts +0 -383
- package/resources/agents/schedules.d.ts.map +0 -1
- package/resources/agents/schedules.js +0 -171
- package/resources/agents/schedules.js.map +0 -1
- package/resources/agents/schedules.mjs +0 -167
- package/resources/agents/schedules.mjs.map +0 -1
- package/resources/agents/variations.d.mts +0 -723
- package/resources/agents/variations.d.mts.map +0 -1
- package/resources/agents/variations.d.ts +0 -723
- package/resources/agents/variations.d.ts.map +0 -1
- package/resources/agents/variations.js +0 -208
- package/resources/agents/variations.js.map +0 -1
- package/resources/agents/variations.mjs +0 -204
- package/resources/agents/variations.mjs.map +0 -1
- package/resources/agents/webhook-deliveries.d.mts +0 -96
- package/resources/agents/webhook-deliveries.d.mts.map +0 -1
- package/resources/agents/webhook-deliveries.d.ts +0 -96
- package/resources/agents/webhook-deliveries.d.ts.map +0 -1
- package/resources/agents/webhook-deliveries.js +0 -31
- package/resources/agents/webhook-deliveries.js.map +0 -1
- package/resources/agents/webhook-deliveries.mjs +0 -27
- package/resources/agents/webhook-deliveries.mjs.map +0 -1
- package/resources/agents.d.mts +0 -2
- package/resources/agents.d.mts.map +0 -1
- package/resources/agents.d.ts +0 -2
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js +0 -5
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -2
- package/resources/agents.mjs.map +0 -1
- package/resources/ai-provider-keys.d.mts +0 -269
- package/resources/ai-provider-keys.d.mts.map +0 -1
- package/resources/ai-provider-keys.d.ts +0 -269
- package/resources/ai-provider-keys.d.ts.map +0 -1
- package/resources/ai-provider-keys.js +0 -52
- package/resources/ai-provider-keys.js.map +0 -1
- package/resources/ai-provider-keys.mjs +0 -48
- package/resources/ai-provider-keys.mjs.map +0 -1
- package/resources/api-keys.d.mts +0 -268
- package/resources/api-keys.d.mts.map +0 -1
- package/resources/api-keys.d.ts +0 -268
- package/resources/api-keys.d.ts.map +0 -1
- package/resources/api-keys.js +0 -83
- package/resources/api-keys.js.map +0 -1
- package/resources/api-keys.mjs +0 -79
- package/resources/api-keys.mjs.map +0 -1
- package/resources/global-api-key.d.mts +0 -33
- package/resources/global-api-key.d.mts.map +0 -1
- package/resources/global-api-key.d.ts +0 -33
- package/resources/global-api-key.d.ts.map +0 -1
- package/resources/global-api-key.js +0 -42
- package/resources/global-api-key.js.map +0 -1
- package/resources/global-api-key.mjs +0 -38
- package/resources/global-api-key.mjs.map +0 -1
- package/resources/index.d.mts +0 -21
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -21
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -44
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -21
- package/resources/index.mjs.map +0 -1
- package/resources/memory-layers/entries.d.mts +0 -257
- package/resources/memory-layers/entries.d.mts.map +0 -1
- package/resources/memory-layers/entries.d.ts +0 -257
- package/resources/memory-layers/entries.d.ts.map +0 -1
- package/resources/memory-layers/entries.js +0 -58
- package/resources/memory-layers/entries.js.map +0 -1
- package/resources/memory-layers/entries.mjs +0 -54
- package/resources/memory-layers/entries.mjs.map +0 -1
- package/resources/memory-layers/index.d.mts +0 -3
- package/resources/memory-layers/index.d.mts.map +0 -1
- package/resources/memory-layers/index.d.ts +0 -3
- package/resources/memory-layers/index.d.ts.map +0 -1
- package/resources/memory-layers/index.js +0 -8
- package/resources/memory-layers/index.js.map +0 -1
- package/resources/memory-layers/index.mjs +0 -3
- package/resources/memory-layers/index.mjs.map +0 -1
- package/resources/memory-layers/memory-layers.d.mts +0 -196
- package/resources/memory-layers/memory-layers.d.mts.map +0 -1
- package/resources/memory-layers/memory-layers.d.ts +0 -196
- package/resources/memory-layers/memory-layers.d.ts.map +0 -1
- package/resources/memory-layers/memory-layers.js +0 -63
- package/resources/memory-layers/memory-layers.js.map +0 -1
- package/resources/memory-layers/memory-layers.mjs +0 -58
- package/resources/memory-layers/memory-layers.mjs.map +0 -1
- package/resources/memory-layers.d.mts +0 -2
- package/resources/memory-layers.d.mts.map +0 -1
- package/resources/memory-layers.d.ts +0 -2
- package/resources/memory-layers.d.ts.map +0 -1
- package/resources/memory-layers.js +0 -5
- package/resources/memory-layers.js.map +0 -1
- package/resources/memory-layers.mjs +0 -2
- package/resources/memory-layers.mjs.map +0 -1
- package/resources/models.d.mts +0 -315
- package/resources/models.d.mts.map +0 -1
- package/resources/models.d.ts +0 -315
- package/resources/models.d.ts.map +0 -1
- package/resources/models.js +0 -59
- package/resources/models.js.map +0 -1
- package/resources/models.mjs +0 -55
- package/resources/models.mjs.map +0 -1
- package/resources/objectives/feedback.d.mts +0 -126
- package/resources/objectives/feedback.d.mts.map +0 -1
- package/resources/objectives/feedback.d.ts +0 -126
- package/resources/objectives/feedback.d.ts.map +0 -1
- package/resources/objectives/feedback.js +0 -52
- package/resources/objectives/feedback.js.map +0 -1
- package/resources/objectives/feedback.mjs +0 -48
- package/resources/objectives/feedback.mjs.map +0 -1
- package/resources/objectives/index.d.mts +0 -6
- package/resources/objectives/index.d.mts.map +0 -1
- package/resources/objectives/index.d.ts +0 -6
- package/resources/objectives/index.d.ts.map +0 -1
- package/resources/objectives/index.js +0 -14
- package/resources/objectives/index.js.map +0 -1
- package/resources/objectives/index.mjs +0 -6
- package/resources/objectives/index.mjs.map +0 -1
- package/resources/objectives/objectives.d.mts +0 -1280
- package/resources/objectives/objectives.d.mts.map +0 -1
- package/resources/objectives/objectives.d.ts +0 -1280
- package/resources/objectives/objectives.d.ts.map +0 -1
- package/resources/objectives/objectives.js +0 -213
- package/resources/objectives/objectives.js.map +0 -1
- package/resources/objectives/objectives.mjs +0 -208
- package/resources/objectives/objectives.mjs.map +0 -1
- package/resources/objectives/tasks.d.mts +0 -88
- package/resources/objectives/tasks.d.mts.map +0 -1
- package/resources/objectives/tasks.d.ts +0 -88
- package/resources/objectives/tasks.d.ts.map +0 -1
- package/resources/objectives/tasks.js +0 -45
- package/resources/objectives/tasks.js.map +0 -1
- package/resources/objectives/tasks.mjs +0 -41
- package/resources/objectives/tasks.mjs.map +0 -1
- package/resources/objectives/tool-calls.d.mts +0 -379
- package/resources/objectives/tool-calls.d.mts.map +0 -1
- package/resources/objectives/tool-calls.d.ts +0 -379
- package/resources/objectives/tool-calls.d.ts.map +0 -1
- package/resources/objectives/tool-calls.js +0 -110
- package/resources/objectives/tool-calls.js.map +0 -1
- package/resources/objectives/tool-calls.mjs +0 -106
- package/resources/objectives/tool-calls.mjs.map +0 -1
- package/resources/objectives/tools.d.mts +0 -53
- package/resources/objectives/tools.d.mts.map +0 -1
- package/resources/objectives/tools.d.ts +0 -53
- package/resources/objectives/tools.d.ts.map +0 -1
- package/resources/objectives/tools.js +0 -28
- package/resources/objectives/tools.js.map +0 -1
- package/resources/objectives/tools.mjs +0 -24
- package/resources/objectives/tools.mjs.map +0 -1
- package/resources/objectives.d.mts +0 -2
- package/resources/objectives.d.mts.map +0 -1
- package/resources/objectives.d.ts +0 -2
- package/resources/objectives.d.ts.map +0 -1
- package/resources/objectives.js +0 -5
- package/resources/objectives.js.map +0 -1
- package/resources/objectives.mjs +0 -2
- package/resources/objectives.mjs.map +0 -1
- package/resources/profiles.d.mts +0 -16
- package/resources/profiles.d.mts.map +0 -1
- package/resources/profiles.d.ts +0 -16
- package/resources/profiles.d.ts.map +0 -1
- package/resources/profiles.js +0 -19
- package/resources/profiles.js.map +0 -1
- package/resources/profiles.mjs +0 -15
- package/resources/profiles.mjs.map +0 -1
- package/resources/search.d.mts +0 -33
- package/resources/search.d.mts.map +0 -1
- package/resources/search.d.ts +0 -33
- package/resources/search.d.ts.map +0 -1
- package/resources/search.js +0 -19
- package/resources/search.js.map +0 -1
- package/resources/search.mjs +0 -15
- package/resources/search.mjs.map +0 -1
- package/resources/shared.d.mts +0 -215
- package/resources/shared.d.mts.map +0 -1
- package/resources/shared.d.ts +0 -215
- package/resources/shared.d.ts.map +0 -1
- package/resources/shared.js +0 -3
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -2
- package/resources/shared.mjs.map +0 -1
- package/resources/tenants/index.d.mts +0 -3
- package/resources/tenants/index.d.mts.map +0 -1
- package/resources/tenants/index.d.ts +0 -3
- package/resources/tenants/index.d.ts.map +0 -1
- package/resources/tenants/index.js +0 -8
- package/resources/tenants/index.js.map +0 -1
- package/resources/tenants/index.mjs +0 -3
- package/resources/tenants/index.mjs.map +0 -1
- package/resources/tenants/subjects.d.mts +0 -43
- package/resources/tenants/subjects.d.mts.map +0 -1
- package/resources/tenants/subjects.d.ts +0 -43
- package/resources/tenants/subjects.d.ts.map +0 -1
- package/resources/tenants/subjects.js +0 -26
- package/resources/tenants/subjects.js.map +0 -1
- package/resources/tenants/subjects.mjs +0 -22
- package/resources/tenants/subjects.mjs.map +0 -1
- package/resources/tenants/tenants.d.mts +0 -158
- package/resources/tenants/tenants.d.mts.map +0 -1
- package/resources/tenants/tenants.d.ts +0 -158
- package/resources/tenants/tenants.d.ts.map +0 -1
- package/resources/tenants/tenants.js +0 -57
- package/resources/tenants/tenants.js.map +0 -1
- package/resources/tenants/tenants.mjs +0 -52
- package/resources/tenants/tenants.mjs.map +0 -1
- package/resources/tenants.d.mts +0 -2
- package/resources/tenants.d.mts.map +0 -1
- package/resources/tenants.d.ts +0 -2
- package/resources/tenants.d.ts.map +0 -1
- package/resources/tenants.js +0 -5
- package/resources/tenants.js.map +0 -1
- package/resources/tenants.mjs +0 -2
- package/resources/tenants.mjs.map +0 -1
- package/resources/tool-sets/index.d.mts +0 -4
- package/resources/tool-sets/index.d.mts.map +0 -1
- package/resources/tool-sets/index.d.ts +0 -4
- package/resources/tool-sets/index.d.ts.map +0 -1
- package/resources/tool-sets/index.js +0 -10
- package/resources/tool-sets/index.js.map +0 -1
- package/resources/tool-sets/index.mjs +0 -4
- package/resources/tool-sets/index.mjs.map +0 -1
- package/resources/tool-sets/secrets.d.mts +0 -135
- package/resources/tool-sets/secrets.d.mts.map +0 -1
- package/resources/tool-sets/secrets.d.ts +0 -135
- package/resources/tool-sets/secrets.d.ts.map +0 -1
- package/resources/tool-sets/secrets.js +0 -62
- package/resources/tool-sets/secrets.js.map +0 -1
- package/resources/tool-sets/secrets.mjs +0 -58
- package/resources/tool-sets/secrets.mjs.map +0 -1
- package/resources/tool-sets/tool-sets.d.mts +0 -595
- package/resources/tool-sets/tool-sets.d.mts.map +0 -1
- package/resources/tool-sets/tool-sets.d.ts +0 -595
- package/resources/tool-sets/tool-sets.d.ts.map +0 -1
- package/resources/tool-sets/tool-sets.js +0 -122
- package/resources/tool-sets/tool-sets.js.map +0 -1
- package/resources/tool-sets/tool-sets.mjs +0 -117
- package/resources/tool-sets/tool-sets.mjs.map +0 -1
- package/resources/tool-sets/tools.d.mts +0 -305
- package/resources/tool-sets/tools.d.mts.map +0 -1
- package/resources/tool-sets/tools.d.ts +0 -305
- package/resources/tool-sets/tools.d.ts.map +0 -1
- package/resources/tool-sets/tools.js +0 -84
- package/resources/tool-sets/tools.js.map +0 -1
- package/resources/tool-sets/tools.mjs +0 -80
- package/resources/tool-sets/tools.mjs.map +0 -1
- package/resources/tool-sets.d.mts +0 -2
- package/resources/tool-sets.d.mts.map +0 -1
- package/resources/tool-sets.d.ts +0 -2
- package/resources/tool-sets.d.ts.map +0 -1
- package/resources/tool-sets.js +0 -5
- package/resources/tool-sets.js.map +0 -1
- package/resources/tool-sets.mjs +0 -2
- package/resources/tool-sets.mjs.map +0 -1
- package/resources/uploads.d.mts +0 -107
- package/resources/uploads.d.mts.map +0 -1
- package/resources/uploads.d.ts +0 -107
- package/resources/uploads.d.ts.map +0 -1
- package/resources/uploads.js +0 -30
- package/resources/uploads.js.map +0 -1
- package/resources/uploads.mjs +0 -26
- package/resources/uploads.mjs.map +0 -1
- package/resources/webhooks.d.mts +0 -92
- package/resources/webhooks.d.mts.map +0 -1
- package/resources/webhooks.d.ts +0 -92
- package/resources/webhooks.d.ts.map +0 -1
- package/resources/webhooks.js +0 -22
- package/resources/webhooks.js.map +0 -1
- package/resources/webhooks.mjs +0 -18
- package/resources/webhooks.mjs.map +0 -1
- package/resources/widget-sessions.d.mts +0 -388
- package/resources/widget-sessions.d.mts.map +0 -1
- package/resources/widget-sessions.d.ts +0 -388
- package/resources/widget-sessions.d.ts.map +0 -1
- package/resources/widget-sessions.js +0 -78
- package/resources/widget-sessions.js.map +0 -1
- package/resources/widget-sessions.mjs +0 -74
- package/resources/widget-sessions.mjs.map +0 -1
- package/resources/widgets.d.mts +0 -225
- package/resources/widgets.d.mts.map +0 -1
- package/resources/widgets.d.ts +0 -225
- package/resources/widgets.d.ts.map +0 -1
- package/resources/widgets.js +0 -82
- package/resources/widgets.js.map +0 -1
- package/resources/widgets.mjs +0 -78
- package/resources/widgets.mjs.map +0 -1
- package/resources/workspace-admin/index.d.mts +0 -4
- package/resources/workspace-admin/index.d.mts.map +0 -1
- package/resources/workspace-admin/index.d.ts +0 -4
- package/resources/workspace-admin/index.d.ts.map +0 -1
- package/resources/workspace-admin/index.js +0 -10
- package/resources/workspace-admin/index.js.map +0 -1
- package/resources/workspace-admin/index.mjs +0 -4
- package/resources/workspace-admin/index.mjs.map +0 -1
- package/resources/workspace-admin/members.d.mts +0 -90
- package/resources/workspace-admin/members.d.mts.map +0 -1
- package/resources/workspace-admin/members.d.ts +0 -90
- package/resources/workspace-admin/members.d.ts.map +0 -1
- package/resources/workspace-admin/members.js +0 -73
- package/resources/workspace-admin/members.js.map +0 -1
- package/resources/workspace-admin/members.mjs +0 -69
- package/resources/workspace-admin/members.mjs.map +0 -1
- package/resources/workspace-admin/profiles.d.mts +0 -46
- package/resources/workspace-admin/profiles.d.mts.map +0 -1
- package/resources/workspace-admin/profiles.d.ts +0 -46
- package/resources/workspace-admin/profiles.d.ts.map +0 -1
- package/resources/workspace-admin/profiles.js +0 -35
- package/resources/workspace-admin/profiles.js.map +0 -1
- package/resources/workspace-admin/profiles.mjs +0 -31
- package/resources/workspace-admin/profiles.mjs.map +0 -1
- package/resources/workspace-admin/workspace-admin.d.mts +0 -227
- package/resources/workspace-admin/workspace-admin.d.mts.map +0 -1
- package/resources/workspace-admin/workspace-admin.d.ts +0 -227
- package/resources/workspace-admin/workspace-admin.d.ts.map +0 -1
- package/resources/workspace-admin/workspace-admin.js +0 -111
- package/resources/workspace-admin/workspace-admin.js.map +0 -1
- package/resources/workspace-admin/workspace-admin.mjs +0 -106
- package/resources/workspace-admin/workspace-admin.mjs.map +0 -1
- package/resources/workspace-admin.d.mts +0 -2
- package/resources/workspace-admin.d.mts.map +0 -1
- package/resources/workspace-admin.d.ts +0 -2
- package/resources/workspace-admin.d.ts.map +0 -1
- package/resources/workspace-admin.js +0 -5
- package/resources/workspace-admin.js.map +0 -1
- package/resources/workspace-admin.mjs +0 -2
- package/resources/workspace-admin.mjs.map +0 -1
- package/resources/workspace-secrets.d.mts +0 -134
- package/resources/workspace-secrets.d.mts.map +0 -1
- package/resources/workspace-secrets.d.ts +0 -134
- package/resources/workspace-secrets.d.ts.map +0 -1
- package/resources/workspace-secrets.js +0 -52
- package/resources/workspace-secrets.js.map +0 -1
- package/resources/workspace-secrets.mjs +0 -48
- package/resources/workspace-secrets.mjs.map +0 -1
- package/resources/workspaces.d.mts +0 -70
- package/resources/workspaces.d.mts.map +0 -1
- package/resources/workspaces.d.ts +0 -70
- package/resources/workspaces.d.ts.map +0 -1
- package/resources/workspaces.js +0 -23
- package/resources/workspaces.js.map +0 -1
- package/resources/workspaces.mjs +0 -19
- package/resources/workspaces.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -5
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -90
- package/src/core/resource.ts +0 -9
- package/src/core/streaming.ts +0 -319
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -91
- package/src/internal/decoders/line.ts +0 -135
- package/src/internal/detect-platform.ts +0 -194
- package/src/internal/errors.ts +0 -31
- package/src/internal/headers.ts +0 -95
- package/src/internal/parse.ts +0 -68
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -10
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -385
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/internal/request-options.ts +0 -91
- package/src/internal/shim-types.ts +0 -24
- package/src/internal/shims.ts +0 -105
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -91
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -38
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -16
- package/src/internal/utils/log.ts +0 -126
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/query.ts +0 -5
- package/src/internal/utils/sleep.ts +0 -1
- package/src/internal/utils/uuid.ts +0 -15
- package/src/internal/utils/values.ts +0 -103
- package/src/internal/utils.ts +0 -7
- package/src/lib/.keep +0 -3
- package/src/pagination.ts +0 -2
- package/src/resource.ts +0 -2
- package/src/resources/account.ts +0 -158
- package/src/resources/agents/agents.ts +0 -616
- package/src/resources/agents/feedback.ts +0 -96
- package/src/resources/agents/index.ts +0 -75
- package/src/resources/agents/schedules.ts +0 -541
- package/src/resources/agents/variations.ts +0 -981
- package/src/resources/agents/webhook-deliveries.ts +0 -176
- package/src/resources/global-api-key.ts +0 -44
- package/src/resources/index.ts +0 -307
- package/src/resources/memory-layers/entries.ts +0 -373
- package/src/resources/memory-layers/index.ts +0 -29
- package/src/resources/memory-layers/memory-layers.ts +0 -314
- package/src/resources/objectives/feedback.ts +0 -171
- package/src/resources/objectives/index.ts +0 -115
- package/src/resources/objectives/objectives.ts +0 -1787
- package/src/resources/objectives/tasks.ts +0 -129
- package/src/resources/objectives/tool-calls.ts +0 -572
- package/src/resources/objectives/tools.ts +0 -74
- package/src/resources/search.ts +0 -52
- package/src/resources/shared.ts +0 -234
- package/src/resources/tenants/index.ts +0 -13
- package/src/resources/tenants/subjects.ts +0 -61
- package/src/resources/tenants/tenants.ts +0 -218
- package/src/resources/tool-sets/index.ts +0 -87
- package/src/resources/tool-sets/secrets.ts +0 -223
- package/src/resources/tool-sets/tool-sets.ts +0 -934
- package/src/resources/tool-sets/tools.ts +0 -456
- package/src/resources/webhooks.ts +0 -122
- package/src/resources/workspace-admin/index.ts +0 -12
- package/src/resources/workspace-admin/members.ts +0 -131
- package/src/resources/workspace-admin/profiles.ts +0 -58
- package/src/resources/workspace-admin/workspace-admin.ts +0 -302
- package/src/resources.ts +0 -1
- package/src/streaming.ts +0 -2
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/streaming.d.mts +0 -3
- package/streaming.d.mts.map +0 -1
- package/streaming.d.ts +0 -3
- package/streaming.d.ts.map +0 -1
- package/streaming.js +0 -6
- package/streaming.js.map +0 -1
- package/streaming.mjs +0 -3
- package/streaming.mjs.map +0 -1
- package/uploads.d.mts +0 -3
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -3
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -6
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -3
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
|
@@ -1 +1,764 @@
|
|
|
1
|
-
|
|
1
|
+
// Generated by redwood. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
import { HttpClient, RequestOptions, RequestSpec, APIPromise, pathSegment, snapshotParams } from '../core/http.js';
|
|
4
|
+
import { Page } from '../core/pagination.js';
|
|
5
|
+
import { Stream } from '../core/sse.js';
|
|
6
|
+
import type { AgentVariationSpec_CompactionConfig, CompactObjectiveResponse, CreateObjectiveRequest_Secret, CreateOperationMetadata, GetObjectiveDiagnosticsResponse, ListObjectiveContextWindowsResponse, ListObjectiveEventsResponse, ListObjectiveFeedbackResponse, ListObjectiveTasksResponse, ListObjectiveToolCallsResponse, ListObjectiveToolsResponse, ListObjectivesResponse, MemoryReference, Objective, ObjectiveContextWindow, ObjectiveEpisodicConfigParam, ObjectiveEvent, ObjectiveFeedback, ObjectiveFeedbackData, ObjectiveServiceListObjectiveToolCallsExecutionStatus, ObjectiveServiceListObjectiveToolCallsStatus, ObjectiveServiceListObjectivesState, ObjectiveTask, ObjectiveTool, ObjectiveToolCall, ObjectiveToolCallWithResult, SetToolCallContentRequest_ContentBlock, SubjectAssertion, TenantAssertion } from '../types.js';
|
|
7
|
+
import { wireObjectiveEpisodicConfig } from '../types.js';
|
|
8
|
+
|
|
9
|
+
export interface ObjectiveListParams {
|
|
10
|
+
/**
|
|
11
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
12
|
+
*/
|
|
13
|
+
workspaceId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum number of results to return
|
|
16
|
+
*/
|
|
17
|
+
limit?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Pagination cursor from previous response
|
|
20
|
+
*/
|
|
21
|
+
cursor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Agent ID for filtering
|
|
24
|
+
*/
|
|
25
|
+
agentId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional filters
|
|
28
|
+
*/
|
|
29
|
+
parentObjectiveId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Filter by state
|
|
32
|
+
*/
|
|
33
|
+
state?: ObjectiveServiceListObjectivesState;
|
|
34
|
+
profileId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Sort order for results (asc or desc by creation time)
|
|
37
|
+
*/
|
|
38
|
+
sortOrder?: string;
|
|
39
|
+
/**
|
|
40
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
41
|
+
*/
|
|
42
|
+
includeInfo?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Filter to objectives produced by a specific AgentSchedule. Accepts
|
|
45
|
+
* canonical as_… form or external_id:<value> form.
|
|
46
|
+
*/
|
|
47
|
+
agentScheduleId?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
50
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
51
|
+
* matches exactly (AND semantics).
|
|
52
|
+
*/
|
|
53
|
+
labels?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Filter to objectives associated with a tenant. Accepts the canonical
|
|
56
|
+
* `tenant_…` form or the `external_id:<value>` form.
|
|
57
|
+
*/
|
|
58
|
+
tenantId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Filter to objectives associated with a subject. Accepts the canonical
|
|
61
|
+
* `subj_…` form or the `external_id:<value>` form; the external_id form is
|
|
62
|
+
* scoped within a tenant and requires `tenant_id` to also be set.
|
|
63
|
+
*/
|
|
64
|
+
subjectId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Filter to objectives whose conversation ran through a widget. Accepts
|
|
67
|
+
* the canonical `wgt_…` form or the `external_id:<value>` form.
|
|
68
|
+
*/
|
|
69
|
+
widgetId?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Filter to objectives created by a specific widget session.
|
|
72
|
+
*/
|
|
73
|
+
widgetSessionId?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface ObjectiveCreateParams {
|
|
77
|
+
agentId: string;
|
|
78
|
+
/**
|
|
79
|
+
* Arbitrary data rendered into the selected variation's system_prompt_template
|
|
80
|
+
* (liquid) to produce the objective's system prompt. If the agent has a
|
|
81
|
+
* system_prompt_data_schema, this must satisfy it.
|
|
82
|
+
*/
|
|
83
|
+
systemPromptData: Record<string, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
86
|
+
*/
|
|
87
|
+
workspaceId?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Optional explicit variation selection. Overrides the agent's variation_selection_mode.
|
|
90
|
+
*/
|
|
91
|
+
variationId?: string;
|
|
92
|
+
metadata?: CreateOperationMetadata;
|
|
93
|
+
/**
|
|
94
|
+
* Optional explicit first user message for the LLM chat history. When not set,
|
|
95
|
+
* the selected variation's first_user_message_template is rendered with
|
|
96
|
+
* first_user_message_data instead. If neither this field nor a
|
|
97
|
+
* first_user_message_template is present, the request is rejected with InvalidArgument.
|
|
98
|
+
*/
|
|
99
|
+
firstUserMessage?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Secrets that can be used in the headers for tool calls using the secret interpolation format.
|
|
102
|
+
*/
|
|
103
|
+
secrets?: Array<CreateObjectiveRequest_Secret>;
|
|
104
|
+
/**
|
|
105
|
+
* Memory layers/entries layered over the baseline cascade inherited
|
|
106
|
+
* from the selected variation — element-level rules over inherited
|
|
107
|
+
* styles, in CSS terms.
|
|
108
|
+
*
|
|
109
|
+
* Array order is resolution order: EARLIER elements are more specific
|
|
110
|
+
* and are consulted first. Entries pinned via memory_entry_id behave
|
|
111
|
+
* as single-entry layers at their position.
|
|
112
|
+
*
|
|
113
|
+
* System-managed layers (e.g., episodic) cannot be referenced here;
|
|
114
|
+
* they attach themselves automatically based on the episodic key.
|
|
115
|
+
*
|
|
116
|
+
* Size cap: the TOTAL effective cascade (this field + the variation's
|
|
117
|
+
* memory layer assignments) must not exceed 10 entries. A request
|
|
118
|
+
* that would produce a larger cascade is rejected with
|
|
119
|
+
* InvalidArgument.
|
|
120
|
+
*/
|
|
121
|
+
memoryCascade?: Array<MemoryReference>;
|
|
122
|
+
/**
|
|
123
|
+
* Arbitrary data rendered into the selected variation's first_user_message_template
|
|
124
|
+
* (liquid) to produce the first user message. Separate from `system_prompt_data`,
|
|
125
|
+
* which renders the system prompt template.
|
|
126
|
+
*/
|
|
127
|
+
firstUserMessageData?: Record<string, unknown>;
|
|
128
|
+
/**
|
|
129
|
+
* If the agent variation that is selected has episodic memory enabled, then this key is used to create/update a memory layer
|
|
130
|
+
* specific to the episodic memory. The layer may have a TTL configured by the variation.
|
|
131
|
+
*/
|
|
132
|
+
episodicMemory?: ObjectiveEpisodicConfigParam;
|
|
133
|
+
/**
|
|
134
|
+
* Optional tenant assertion — the customer's org/company identifier for the
|
|
135
|
+
* end user this objective serves. Upserts the tenant record in the
|
|
136
|
+
* workspace and associates the objective with it.
|
|
137
|
+
*/
|
|
138
|
+
tenant?: TenantAssertion;
|
|
139
|
+
/**
|
|
140
|
+
* Optional subject assertion — the person within the tenant this objective
|
|
141
|
+
* serves. Requires `tenant`; a subject asserted without a tenant is
|
|
142
|
+
* rejected with InvalidArgument.
|
|
143
|
+
*/
|
|
144
|
+
subject?: SubjectAssertion;
|
|
145
|
+
/**
|
|
146
|
+
* Parameters forced onto this objective's tool calls. A pinned parameter
|
|
147
|
+
* is an overlay on a tool's JSON schema: the parameter is removed from
|
|
148
|
+
* what the LLM sees, and its value is always overwritten server-side with
|
|
149
|
+
* the pinned value — the model cannot choose a different value for it.
|
|
150
|
+
*/
|
|
151
|
+
pinnedParameters?: Record<string, string>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface ObjectiveRetrieveParams {
|
|
155
|
+
/**
|
|
156
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
157
|
+
*/
|
|
158
|
+
workspaceId?: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface ObjectiveListContextWindowsParams {
|
|
162
|
+
/**
|
|
163
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
164
|
+
*/
|
|
165
|
+
workspaceId?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Maximum number of results to return
|
|
168
|
+
*/
|
|
169
|
+
limit?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Pagination cursor from previous response
|
|
172
|
+
*/
|
|
173
|
+
cursor?: string;
|
|
174
|
+
/**
|
|
175
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
176
|
+
*/
|
|
177
|
+
includeInfo?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
180
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
181
|
+
* matches exactly (AND semantics).
|
|
182
|
+
*/
|
|
183
|
+
labels?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface ObjectiveRetrieveDiagnosticsParams {
|
|
187
|
+
/**
|
|
188
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
189
|
+
*/
|
|
190
|
+
workspaceId?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface ObjectiveListEventsParams {
|
|
194
|
+
/**
|
|
195
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
196
|
+
*/
|
|
197
|
+
workspaceId?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Maximum number of results to return
|
|
200
|
+
*/
|
|
201
|
+
limit?: number;
|
|
202
|
+
/**
|
|
203
|
+
* Pagination cursor from previous response
|
|
204
|
+
*/
|
|
205
|
+
cursor?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Sort order for results (asc or desc by creation time)
|
|
208
|
+
*/
|
|
209
|
+
sortOrder?: string;
|
|
210
|
+
/**
|
|
211
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
212
|
+
*/
|
|
213
|
+
includeInfo?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Optional context window ID to filter events by
|
|
216
|
+
*/
|
|
217
|
+
windowId?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Optional string to fetch events since an ID
|
|
220
|
+
*/
|
|
221
|
+
sinceEventId?: string;
|
|
222
|
+
/**
|
|
223
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
224
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
225
|
+
* matches exactly (AND semantics).
|
|
226
|
+
*/
|
|
227
|
+
labels?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface ObjectiveStreamEventsParams {
|
|
231
|
+
/**
|
|
232
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
233
|
+
*/
|
|
234
|
+
workspaceId?: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface ObjectiveListFeedbackParams {
|
|
238
|
+
/**
|
|
239
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
240
|
+
*/
|
|
241
|
+
workspaceId?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Maximum number of results to return
|
|
244
|
+
*/
|
|
245
|
+
limit?: number;
|
|
246
|
+
/**
|
|
247
|
+
* Pagination cursor from previous response
|
|
248
|
+
*/
|
|
249
|
+
cursor?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
252
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
253
|
+
* matches exactly (AND semantics).
|
|
254
|
+
*/
|
|
255
|
+
labels?: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface ObjectiveCreateFeedbackParams {
|
|
259
|
+
metadata: CreateOperationMetadata;
|
|
260
|
+
data: ObjectiveFeedbackData;
|
|
261
|
+
/**
|
|
262
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
263
|
+
*/
|
|
264
|
+
workspaceId?: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface ObjectiveListTasksParams {
|
|
268
|
+
/**
|
|
269
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
270
|
+
*/
|
|
271
|
+
workspaceId?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Maximum number of results to return
|
|
274
|
+
*/
|
|
275
|
+
limit?: number;
|
|
276
|
+
/**
|
|
277
|
+
* Pagination cursor from previous response
|
|
278
|
+
*/
|
|
279
|
+
cursor?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Sort order for results
|
|
282
|
+
*/
|
|
283
|
+
sortOrder?: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface ObjectiveRetrieveTaskParams {
|
|
287
|
+
/**
|
|
288
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
289
|
+
*/
|
|
290
|
+
workspaceId?: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface ObjectiveListToolCallsParams {
|
|
294
|
+
/**
|
|
295
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
296
|
+
*/
|
|
297
|
+
workspaceId?: string;
|
|
298
|
+
/**
|
|
299
|
+
* Maximum number of results to return
|
|
300
|
+
*/
|
|
301
|
+
limit?: number;
|
|
302
|
+
/**
|
|
303
|
+
* Pagination cursor from previous response
|
|
304
|
+
*/
|
|
305
|
+
cursor?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Filter by tool call status
|
|
308
|
+
*/
|
|
309
|
+
status?: ObjectiveServiceListObjectiveToolCallsStatus;
|
|
310
|
+
/**
|
|
311
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
312
|
+
*/
|
|
313
|
+
includeInfo?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Filter by tool call execution status. Useful for reverse-harness
|
|
316
|
+
* polling of bare tool calls waiting for externally supplied content
|
|
317
|
+
* (TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT).
|
|
318
|
+
*/
|
|
319
|
+
executionStatus?: ObjectiveServiceListObjectiveToolCallsExecutionStatus;
|
|
320
|
+
/**
|
|
321
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
322
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
323
|
+
* matches exactly (AND semantics).
|
|
324
|
+
*/
|
|
325
|
+
labels?: string;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export interface ObjectiveRetrieveToolCallParams {
|
|
329
|
+
/**
|
|
330
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
331
|
+
*/
|
|
332
|
+
workspaceId?: string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface ObjectiveApproveToolCallParams {
|
|
336
|
+
/**
|
|
337
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
338
|
+
*/
|
|
339
|
+
workspaceId?: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface ObjectiveDenyToolCallParams {
|
|
343
|
+
/**
|
|
344
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
345
|
+
*/
|
|
346
|
+
workspaceId?: string;
|
|
347
|
+
/**
|
|
348
|
+
* A memo to associate to the tool call denial. Use a memo to steer the LLM to a different decision or usage of the tool.
|
|
349
|
+
*/
|
|
350
|
+
memo?: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface ObjectiveSetToolCallContentParams {
|
|
354
|
+
/**
|
|
355
|
+
* The content to set on the tool call. Mirrors
|
|
356
|
+
* ObjectiveToolCallResult.ContentBlock but writable: media blocks carry
|
|
357
|
+
* raw data on input where the result-side carries a signed url on output.
|
|
358
|
+
*/
|
|
359
|
+
content: Array<SetToolCallContentRequest_ContentBlock>;
|
|
360
|
+
/**
|
|
361
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
362
|
+
*/
|
|
363
|
+
workspaceId?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface ObjectiveListToolsParams {
|
|
367
|
+
/**
|
|
368
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
369
|
+
*/
|
|
370
|
+
workspaceId?: string;
|
|
371
|
+
/**
|
|
372
|
+
* Maximum number of results to return
|
|
373
|
+
*/
|
|
374
|
+
limit?: number;
|
|
375
|
+
/**
|
|
376
|
+
* Pagination cursor from previous response
|
|
377
|
+
*/
|
|
378
|
+
cursor?: string;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export interface ObjectiveCancelParams {
|
|
382
|
+
/**
|
|
383
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
384
|
+
*/
|
|
385
|
+
workspaceId?: string;
|
|
386
|
+
/**
|
|
387
|
+
* Optional reason for cancellation
|
|
388
|
+
*/
|
|
389
|
+
reason?: string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export interface ObjectiveCompactParams {
|
|
393
|
+
/**
|
|
394
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
395
|
+
*/
|
|
396
|
+
workspaceId?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Optional compaction config override. When not set, uses the variation's compaction_config.
|
|
399
|
+
*/
|
|
400
|
+
compactionConfig?: AgentVariationSpec_CompactionConfig;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface ObjectiveContinueParams {
|
|
404
|
+
/**
|
|
405
|
+
* The message to continue an objective that has completed (or you are enqueing)
|
|
406
|
+
*/
|
|
407
|
+
message: string;
|
|
408
|
+
/**
|
|
409
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
410
|
+
*/
|
|
411
|
+
workspaceId?: string;
|
|
412
|
+
/**
|
|
413
|
+
* When set to true, the message will be enqueued for when the agent loop is available to process it.
|
|
414
|
+
*/
|
|
415
|
+
enqueue?: boolean;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export class Objectives {
|
|
419
|
+
constructor(private readonly _client: HttpClient) {}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* List objectives
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* ```ts
|
|
426
|
+
* const page = await client.objectives.list();
|
|
427
|
+
* for await (const item of page) {
|
|
428
|
+
* // auto-fetches every page
|
|
429
|
+
* }
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
async list(params?: ObjectiveListParams, options?: RequestOptions): Promise<Page<Objective>> {
|
|
433
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
434
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
435
|
+
const _base = snapshotParams(params);
|
|
436
|
+
const response = await this._client.request<ListObjectivesResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives`, query: { limit: params?.limit, cursor: params?.cursor, agentId: params?.agentId, parentObjectiveId: params?.parentObjectiveId, state: params?.state, profileId: params?.profileId, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo, agentScheduleId: params?.agentScheduleId, labels: params?.labels, tenantId: params?.tenantId, subjectId: params?.subjectId, widgetId: params?.widgetId, widgetSessionId: params?.widgetSessionId } }, options);
|
|
437
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.list({ ..._base, cursor: cursor }, options));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Create a new objective
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```ts
|
|
445
|
+
* const objective = await client.objectives.create({ agentId: 'sample', systemPromptData: { } });
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
create(params: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
|
|
449
|
+
return this._client.requestAPI<Objective>(() => {
|
|
450
|
+
const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
451
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
452
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives`, body: { agentId: params.agentId, variationId: params.variationId, metadata: params.metadata, systemPromptData: params.systemPromptData, firstUserMessage: params.firstUserMessage, secrets: params.secrets, memoryCascade: params.memoryCascade, firstUserMessageData: params.firstUserMessageData, episodicMemory: wireObjectiveEpisodicConfig(params.episodicMemory), tenant: params.tenant, subject: params.subject, pinnedParameters: params.pinnedParameters } };
|
|
453
|
+
}, options);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Get an objective by ID
|
|
458
|
+
*
|
|
459
|
+
* @example
|
|
460
|
+
* ```ts
|
|
461
|
+
* const objective = await client.objectives.retrieve('_123');
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
retrieve(id: string, params?: ObjectiveRetrieveParams, options?: RequestOptions): APIPromise<Objective> {
|
|
465
|
+
return this._client.requestAPI<Objective>(() => {
|
|
466
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
467
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
468
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('id', id)}` };
|
|
469
|
+
}, options);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* List objective context windows
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* ```ts
|
|
477
|
+
* const page = await client.objectives.listContextWindows('objective_123');
|
|
478
|
+
* for await (const item of page) {
|
|
479
|
+
* // auto-fetches every page
|
|
480
|
+
* }
|
|
481
|
+
* ```
|
|
482
|
+
*/
|
|
483
|
+
async listContextWindows(objectiveId: string, params?: ObjectiveListContextWindowsParams, options?: RequestOptions): Promise<Page<ObjectiveContextWindow>> {
|
|
484
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
485
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
486
|
+
const _base = snapshotParams(params);
|
|
487
|
+
const response = await this._client.request<ListObjectiveContextWindowsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/context_windows`, query: { limit: params?.limit, cursor: params?.cursor, includeInfo: params?.includeInfo, labels: params?.labels } }, options);
|
|
488
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listContextWindows(objectiveId, { ..._base, cursor: cursor }, options));
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Get objective context diagnostics
|
|
493
|
+
*
|
|
494
|
+
* @example
|
|
495
|
+
* ```ts
|
|
496
|
+
* const getObjectiveDiagnosticsResponse = await client.objectives.retrieveDiagnostics('objective_123');
|
|
497
|
+
* ```
|
|
498
|
+
*/
|
|
499
|
+
retrieveDiagnostics(objectiveId: string, params?: ObjectiveRetrieveDiagnosticsParams, options?: RequestOptions): APIPromise<GetObjectiveDiagnosticsResponse> {
|
|
500
|
+
return this._client.requestAPI<GetObjectiveDiagnosticsResponse>(() => {
|
|
501
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
502
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
503
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/diagnostics` };
|
|
504
|
+
}, options);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* List objective events
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```ts
|
|
512
|
+
* const page = await client.objectives.listEvents('objective_123');
|
|
513
|
+
* for await (const item of page) {
|
|
514
|
+
* // auto-fetches every page
|
|
515
|
+
* }
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
async listEvents(objectiveId: string, params?: ObjectiveListEventsParams, options?: RequestOptions): Promise<Page<ObjectiveEvent>> {
|
|
519
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
520
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
521
|
+
const _base = snapshotParams(params);
|
|
522
|
+
const response = await this._client.request<ListObjectiveEventsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/events`, query: { limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo, windowId: params?.windowId, sinceEventId: params?.sinceEventId, labels: params?.labels } }, options);
|
|
523
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listEvents(objectiveId, { ..._base, cursor: cursor }, options));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Stream objective events
|
|
528
|
+
*
|
|
529
|
+
* @example
|
|
530
|
+
* ```ts
|
|
531
|
+
* const stream = await client.objectives.streamEvents('objective_123');
|
|
532
|
+
* for await (const event of stream) {
|
|
533
|
+
* // typed event payloads; housekeeping frames are skipped
|
|
534
|
+
* }
|
|
535
|
+
* ```
|
|
536
|
+
*/
|
|
537
|
+
async streamEvents(objectiveId: string, params?: ObjectiveStreamEventsParams, options?: RequestOptions): Promise<Stream<ObjectiveEvent>> {
|
|
538
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
539
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
540
|
+
const _spec: RequestSpec = { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/events:stream`, stream: true };
|
|
541
|
+
const response = await this._client.rawRequest(_spec, options);
|
|
542
|
+
return new Stream<ObjectiveEvent>(response, options?.signal, options?.lastEventId, ['ping', 'open'], options?.reconnect === false ? undefined : (lastEventId, signal) => this._client.rawRequest(_spec, { ...options, lastEventId, signal }));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* List feedback for an objective
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```ts
|
|
550
|
+
* const page = await client.objectives.listFeedback('objective_123');
|
|
551
|
+
* for await (const item of page) {
|
|
552
|
+
* // auto-fetches every page
|
|
553
|
+
* }
|
|
554
|
+
* ```
|
|
555
|
+
*/
|
|
556
|
+
async listFeedback(objectiveId: string, params?: ObjectiveListFeedbackParams, options?: RequestOptions): Promise<Page<ObjectiveFeedback>> {
|
|
557
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
558
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
559
|
+
const _base = snapshotParams(params);
|
|
560
|
+
const response = await this._client.request<ListObjectiveFeedbackResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/feedback`, query: { limit: params?.limit, cursor: params?.cursor, labels: params?.labels } }, options);
|
|
561
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listFeedback(objectiveId, { ..._base, cursor: cursor }, options));
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Submit feedback for an objective
|
|
566
|
+
*
|
|
567
|
+
* @example
|
|
568
|
+
* ```ts
|
|
569
|
+
* const objectiveFeedback = await client.objectives.createFeedback('objective_123', { metadata: { }, data: { } });
|
|
570
|
+
* ```
|
|
571
|
+
*/
|
|
572
|
+
createFeedback(objectiveId: string, params: ObjectiveCreateFeedbackParams, options?: RequestOptions): APIPromise<ObjectiveFeedback> {
|
|
573
|
+
return this._client.requestAPI<ObjectiveFeedback>(() => {
|
|
574
|
+
const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
575
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
576
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/feedback`, body: { metadata: params.metadata, data: params.data } };
|
|
577
|
+
}, options);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* List objective tasks
|
|
582
|
+
*
|
|
583
|
+
* @example
|
|
584
|
+
* ```ts
|
|
585
|
+
* const page = await client.objectives.listTasks('objective_123');
|
|
586
|
+
* for await (const item of page) {
|
|
587
|
+
* // auto-fetches every page
|
|
588
|
+
* }
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
async listTasks(objectiveId: string, params?: ObjectiveListTasksParams, options?: RequestOptions): Promise<Page<ObjectiveTask>> {
|
|
592
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
593
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
594
|
+
const _base = snapshotParams(params);
|
|
595
|
+
const response = await this._client.request<ListObjectiveTasksResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tasks`, query: { limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder } }, options);
|
|
596
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listTasks(objectiveId, { ..._base, cursor: cursor }, options));
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Get an objective task by ID
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* const objectiveTask = await client.objectives.retrieveTask('objective_123', '_123');
|
|
605
|
+
* ```
|
|
606
|
+
*/
|
|
607
|
+
retrieveTask(objectiveId: string, id: string, params?: ObjectiveRetrieveTaskParams, options?: RequestOptions): APIPromise<ObjectiveTask> {
|
|
608
|
+
return this._client.requestAPI<ObjectiveTask>(() => {
|
|
609
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
610
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
611
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tasks/${pathSegment('id', id)}` };
|
|
612
|
+
}, options);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* List objective tool calls
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* ```ts
|
|
620
|
+
* const page = await client.objectives.listToolCalls('objective_123');
|
|
621
|
+
* for await (const item of page) {
|
|
622
|
+
* // auto-fetches every page
|
|
623
|
+
* }
|
|
624
|
+
* ```
|
|
625
|
+
*/
|
|
626
|
+
async listToolCalls(objectiveId: string, params?: ObjectiveListToolCallsParams, options?: RequestOptions): Promise<Page<ObjectiveToolCall>> {
|
|
627
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
628
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
629
|
+
const _base = snapshotParams(params);
|
|
630
|
+
const response = await this._client.request<ListObjectiveToolCallsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tool_calls`, query: { limit: params?.limit, cursor: params?.cursor, status: params?.status, includeInfo: params?.includeInfo, executionStatus: params?.executionStatus, labels: params?.labels } }, options);
|
|
631
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listToolCalls(objectiveId, { ..._base, cursor: cursor }, options));
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Get an objective tool call by ID
|
|
636
|
+
*
|
|
637
|
+
* @example
|
|
638
|
+
* ```ts
|
|
639
|
+
* const objectiveToolCallWithResult = await client.objectives.retrieveToolCall('objective_123', 'tool_call_123');
|
|
640
|
+
* ```
|
|
641
|
+
*/
|
|
642
|
+
retrieveToolCall(objectiveId: string, toolCallId: string, params?: ObjectiveRetrieveToolCallParams, options?: RequestOptions): APIPromise<ObjectiveToolCallWithResult> {
|
|
643
|
+
return this._client.requestAPI<ObjectiveToolCallWithResult>(() => {
|
|
644
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
645
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
646
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tool_calls/${pathSegment('toolCallId', toolCallId)}` };
|
|
647
|
+
}, options);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Approve a tool call
|
|
652
|
+
*
|
|
653
|
+
* @example
|
|
654
|
+
* ```ts
|
|
655
|
+
* const objectiveToolCall = await client.objectives.approveToolCall('objective_123', 'tool_call_123');
|
|
656
|
+
* ```
|
|
657
|
+
*/
|
|
658
|
+
approveToolCall(objectiveId: string, toolCallId: string, params?: ObjectiveApproveToolCallParams, options?: RequestOptions): APIPromise<ObjectiveToolCall> {
|
|
659
|
+
return this._client.requestAPI<ObjectiveToolCall>(() => {
|
|
660
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
661
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
662
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tool_calls/${pathSegment('toolCallId', toolCallId)}:approve` };
|
|
663
|
+
}, options);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Deny a tool call
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* ```ts
|
|
671
|
+
* const objectiveToolCall = await client.objectives.denyToolCall('objective_123', 'tool_call_123');
|
|
672
|
+
* ```
|
|
673
|
+
*/
|
|
674
|
+
denyToolCall(objectiveId: string, toolCallId: string, params?: ObjectiveDenyToolCallParams, options?: RequestOptions): APIPromise<ObjectiveToolCall> {
|
|
675
|
+
return this._client.requestAPI<ObjectiveToolCall>(() => {
|
|
676
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
677
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
678
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tool_calls/${pathSegment('toolCallId', toolCallId)}:deny`, body: { memo: params?.memo } };
|
|
679
|
+
}, options);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Set a bare tool call's content
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* ```ts
|
|
687
|
+
* const objectiveToolCall = await client.objectives.setToolCallContent('objective_123', 'tool_call_123', { content: [{ text: { text: 'sample' }, type: 'text' }] });
|
|
688
|
+
* ```
|
|
689
|
+
*/
|
|
690
|
+
setToolCallContent(objectiveId: string, toolCallId: string, params: ObjectiveSetToolCallContentParams, options?: RequestOptions): APIPromise<ObjectiveToolCall> {
|
|
691
|
+
return this._client.requestAPI<ObjectiveToolCall>(() => {
|
|
692
|
+
const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
693
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
694
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tool_calls/${pathSegment('toolCallId', toolCallId)}:setContent`, body: { content: params.content } };
|
|
695
|
+
}, options);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* List objective tools
|
|
700
|
+
*
|
|
701
|
+
* @example
|
|
702
|
+
* ```ts
|
|
703
|
+
* const page = await client.objectives.listTools('objective_123');
|
|
704
|
+
* for await (const item of page) {
|
|
705
|
+
* // auto-fetches every page
|
|
706
|
+
* }
|
|
707
|
+
* ```
|
|
708
|
+
*/
|
|
709
|
+
async listTools(objectiveId: string, params?: ObjectiveListToolsParams, options?: RequestOptions): Promise<Page<ObjectiveTool>> {
|
|
710
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
711
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
712
|
+
const _base = snapshotParams(params);
|
|
713
|
+
const response = await this._client.request<ListObjectiveToolsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}/tools`, query: { limit: params?.limit, cursor: params?.cursor } }, options);
|
|
714
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listTools(objectiveId, { ..._base, cursor: cursor }, options));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Cancel an objective
|
|
719
|
+
*
|
|
720
|
+
* @example
|
|
721
|
+
* ```ts
|
|
722
|
+
* const objective = await client.objectives.cancel('objective_123');
|
|
723
|
+
* ```
|
|
724
|
+
*/
|
|
725
|
+
cancel(objectiveId: string, params?: ObjectiveCancelParams, options?: RequestOptions): APIPromise<Objective> {
|
|
726
|
+
return this._client.requestAPI<Objective>(() => {
|
|
727
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
728
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
729
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}:cancel`, body: { reason: params?.reason } };
|
|
730
|
+
}, options);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Compact an objective
|
|
735
|
+
*
|
|
736
|
+
* @example
|
|
737
|
+
* ```ts
|
|
738
|
+
* const compactObjectiveResponse = await client.objectives.compact('objective_123');
|
|
739
|
+
* ```
|
|
740
|
+
*/
|
|
741
|
+
compact(objectiveId: string, params?: ObjectiveCompactParams, options?: RequestOptions): APIPromise<CompactObjectiveResponse> {
|
|
742
|
+
return this._client.requestAPI<CompactObjectiveResponse>(() => {
|
|
743
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
744
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
745
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}:compact`, body: { compactionConfig: params?.compactionConfig } };
|
|
746
|
+
}, options);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Continue an objective
|
|
751
|
+
*
|
|
752
|
+
* @example
|
|
753
|
+
* ```ts
|
|
754
|
+
* const objectiveEvent = await client.objectives.continue('objective_123', { message: 'sample' });
|
|
755
|
+
* ```
|
|
756
|
+
*/
|
|
757
|
+
continue(objectiveId: string, params: ObjectiveContinueParams, options?: RequestOptions): APIPromise<ObjectiveEvent> {
|
|
758
|
+
return this._client.requestAPI<ObjectiveEvent>(() => {
|
|
759
|
+
const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
760
|
+
if (workspaceId === undefined) throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
761
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/objectives/${pathSegment('objectiveId', objectiveId)}:continue`, body: { message: params.message, enqueue: params.enqueue } };
|
|
762
|
+
}, options);
|
|
763
|
+
}
|
|
764
|
+
}
|