@cadenya/cadenya 1.4.0 → 1.6.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/api.md CHANGED
@@ -149,6 +149,54 @@ List workspaces
149
149
  client.workspaces.list(params?: WorkspaceListParams, options?: RequestOptions): Promise<Page<Workspace>>
150
150
  ```
151
151
 
152
+ ## agentPools
153
+
154
+ List agent pools
155
+
156
+ ```ts
157
+ client.agentPools.list(params?: AgentPoolListParams, options?: RequestOptions): Promise<Page<AgentPool>>
158
+ ```
159
+ Create a new agent pool
160
+
161
+ ```ts
162
+ client.agentPools.create(params: AgentPoolCreateParams, options?: RequestOptions): APIPromise<AgentPool>
163
+ ```
164
+ Get an agent pool by ID
165
+
166
+ ```ts
167
+ client.agentPools.retrieve(id: string, params?: AgentPoolRetrieveParams, options?: RequestOptions): APIPromise<AgentPool>
168
+ ```
169
+ Delete an agent pool
170
+
171
+ ```ts
172
+ client.agentPools.delete(id: string, params?: AgentPoolDeleteParams, options?: RequestOptions): APIPromise<void>
173
+ ```
174
+ Update an agent pool
175
+
176
+ ```ts
177
+ client.agentPools.update(id: string, params?: AgentPoolUpdateParams, options?: RequestOptions): APIPromise<AgentPool>
178
+ ```
179
+ Activate an agent pool
180
+
181
+ ```ts
182
+ client.agentPools.activate(id: string, params?: AgentPoolActivateParams, options?: RequestOptions): APIPromise<AgentPool>
183
+ ```
184
+ Archive an agent pool
185
+
186
+ ```ts
187
+ client.agentPools.archive(id: string, params?: AgentPoolArchiveParams, options?: RequestOptions): APIPromise<AgentPool>
188
+ ```
189
+ Deactivate an agent pool
190
+
191
+ ```ts
192
+ client.agentPools.deactivate(id: string, params?: AgentPoolDeactivateParams, options?: RequestOptions): APIPromise<AgentPool>
193
+ ```
194
+ Unarchive an agent pool
195
+
196
+ ```ts
197
+ client.agentPools.unarchive(id: string, params?: AgentPoolUnarchiveParams, options?: RequestOptions): APIPromise<AgentPool>
198
+ ```
199
+
152
200
  ## agents
153
201
 
154
202
  List agents
package/dist/client.d.ts CHANGED
@@ -5,6 +5,7 @@ import { ApiKeys } from './resources/api-keys.js';
5
5
  import { WorkspaceAdmin } from './resources/workspace-admin.js';
6
6
  import { Profiles } from './resources/profiles.js';
7
7
  import { Workspaces } from './resources/workspaces.js';
8
+ import { AgentPools } from './resources/agent-pools.js';
8
9
  import { Agents } from './resources/agents.js';
9
10
  import { AiProviderKeys } from './resources/ai-provider-keys.js';
10
11
  import { Models } from './resources/models.js';
@@ -50,6 +51,7 @@ export declare class Cadenya {
50
51
  readonly workspaceAdmin: WorkspaceAdmin;
51
52
  readonly profiles: Profiles;
52
53
  readonly workspaces: Workspaces;
54
+ readonly agentPools: AgentPools;
53
55
  readonly agents: Agents;
54
56
  readonly aiProviderKeys: AiProviderKeys;
55
57
  readonly models: Models;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,E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AAQ,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;gBAEzB,OAAO,GAAE,aAAkB;CAwCxC"}
package/dist/client.js CHANGED
@@ -6,6 +6,7 @@ import { ApiKeys } from './resources/api-keys.js';
6
6
  import { WorkspaceAdmin } from './resources/workspace-admin.js';
7
7
  import { Profiles } from './resources/profiles.js';
8
8
  import { Workspaces } from './resources/workspaces.js';
9
+ import { AgentPools } from './resources/agent-pools.js';
9
10
  import { Agents } from './resources/agents.js';
10
11
  import { AiProviderKeys } from './resources/ai-provider-keys.js';
11
12
  import { Models } from './resources/models.js';
@@ -24,6 +25,7 @@ export class Cadenya {
24
25
  workspaceAdmin;
25
26
  profiles;
26
27
  workspaces;
28
+ agentPools;
27
29
  agents;
28
30
  aiProviderKeys;
29
31
  models;
@@ -50,7 +52,7 @@ export class Cadenya {
50
52
  authHeader: () => ({ Authorization: `Bearer ${apiKey}` }),
51
53
  maxRetries: options.maxRetries ?? 0,
52
54
  timeout: options.timeout,
53
- defaultHeaders: { ...nodeUserAgent('cadenya-typescript/1.3.0 (api 1.0)'), ...options.defaultHeaders },
55
+ defaultHeaders: { ...nodeUserAgent('cadenya-typescript/1.5.0 (api 1.0)'), ...options.defaultHeaders },
54
56
  fetch: options.fetch,
55
57
  logger: options.logger,
56
58
  logLevel: options.logLevel,
@@ -62,6 +64,7 @@ export class Cadenya {
62
64
  this.workspaceAdmin = new WorkspaceAdmin(this._client);
63
65
  this.profiles = new Profiles(this._client);
64
66
  this.workspaces = new Workspaces(this._client);
67
+ this.agentPools = new AgentPools(this._client);
65
68
  this.agents = new Agents(this._client);
66
69
  this.aiProviderKeys = new AiProviderKeys(this._client);
67
70
  this.models = new Models(this._client);
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,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,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sFAAsF,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;AAClC,CAAC","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient } from './core/http.js';\nimport type { Logger, LogLevel } from './core/http.js';\nimport { Webhooks } from './webhooks.js';\nimport { Accounts } from './resources/accounts.js';\nimport { ApiKeys } from './resources/api-keys.js';\nimport { WorkspaceAdmin } from './resources/workspace-admin.js';\nimport { Profiles } from './resources/profiles.js';\nimport { Workspaces } from './resources/workspaces.js';\nimport { Agents } from './resources/agents.js';\nimport { AiProviderKeys } from './resources/ai-provider-keys.js';\nimport { Models } from './resources/models.js';\nimport { MemoryLayers } from './resources/memory-layers.js';\nimport { Objectives } from './resources/objectives.js';\nimport { ToolSearch } from './resources/tool-search.js';\nimport { Tenants } from './resources/tenants.js';\nimport { ToolSets } from './resources/tool-sets.js';\nimport { Uploads } from './resources/uploads.js';\nimport { WidgetSessions } from './resources/widget-sessions.js';\nimport { Widgets } from './resources/widgets.js';\nimport { WorkspaceSecrets } from './resources/workspace-secrets.js';\n\nexport interface ClientOptions {\n /** API key. Defaults to the CADENYA_API_KEY environment variable. */\n apiKey?: string;\n /** Override the API base URL. Defaults to https://api.cadenya.com. */\n baseURL?: string;\n /** Max automatic retries for retryable failures. Defaults to 0. */\n maxRetries?: number;\n /**\n * Deadline for ordinary (non-streaming) requests in milliseconds; override\n * per request with `options.timeout`. Streams bound only response-header\n * acquisition — body lifetime stays under the caller's AbortSignal.\n * Defaults to 60000; a non-finite or <= 0 value disables the deadline.\n */\n timeout?: number;\n /** Additional request headers. Browsers supply their own User-Agent by default. */\n defaultHeaders?: Record<string, string>;\n /** Custom fetch implementation. */\n fetch?: typeof fetch;\n /** Destination for SDK logs. Defaults to `console`. */\n logger?: Logger;\n /** 'debug' | 'warn' (default) | 'off'. Never logs headers or bodies. */\n logLevel?: LogLevel;\n /** Default `workspaceId` for every call that takes one. Defaults to the CADENYA_WORKSPACE_ID environment variable. */\n workspaceId?: string;\n /** Secret for webhook signature verification. Defaults to the CADENYA_WEBHOOK_SECRET environment variable. */\n webhookSecret?: string;\n}\n\nexport class Cadenya {\n readonly accounts: Accounts;\n readonly apiKeys: ApiKeys;\n readonly workspaceAdmin: WorkspaceAdmin;\n readonly profiles: Profiles;\n readonly workspaces: Workspaces;\n readonly agents: Agents;\n readonly aiProviderKeys: AiProviderKeys;\n readonly models: Models;\n readonly memoryLayers: MemoryLayers;\n readonly objectives: Objectives;\n readonly toolSearch: ToolSearch;\n readonly tenants: Tenants;\n readonly toolSets: ToolSets;\n readonly uploads: Uploads;\n readonly widgetSessions: WidgetSessions;\n readonly widgets: Widgets;\n readonly workspaceSecrets: WorkspaceSecrets;\n readonly webhooks: Webhooks;\n\n private readonly _client: HttpClient;\n\n constructor(options: ClientOptions = {}) {\n // Presence is not validity: empty strings from options or environment\n // are configuration mistakes, not credentials.\n const apiKey = resolveOption('apiKey', options.apiKey, readEnv('CADENYA_API_KEY'));\n if (!apiKey) {\n throw new Error(\n \"Missing API key. Pass it with `new Cadenya({ apiKey })` or set the CADENYA_API_KEY environment variable.\",\n );\n }\n this._client = new HttpClient({\n baseURL: resolveOption('baseURL', options.baseURL, readEnv('CADENYA_BASE_URL')) ?? 'https://api.cadenya.com',\n authHeader: () => ({ Authorization: `Bearer ${apiKey}` }),\n maxRetries: options.maxRetries ?? 0,\n timeout: options.timeout,\n defaultHeaders: { ...nodeUserAgent('cadenya-typescript/1.3.0 (api 1.0)'), ...options.defaultHeaders },\n fetch: options.fetch,\n logger: options.logger,\n logLevel: options.logLevel,\n defaults: { workspaceId: resolveOption('workspaceId', options.workspaceId, readEnv('CADENYA_WORKSPACE_ID')) },\n });\n this.webhooks = new Webhooks(resolveOption('webhookSecret', options.webhookSecret, readEnv('CADENYA_WEBHOOK_SECRET')));\n this.accounts = new Accounts(this._client);\n this.apiKeys = new ApiKeys(this._client);\n this.workspaceAdmin = new WorkspaceAdmin(this._client);\n this.profiles = new Profiles(this._client);\n this.workspaces = new Workspaces(this._client);\n this.agents = new Agents(this._client);\n this.aiProviderKeys = new AiProviderKeys(this._client);\n this.models = new Models(this._client);\n this.memoryLayers = new MemoryLayers(this._client);\n this.objectives = new Objectives(this._client);\n this.toolSearch = new ToolSearch(this._client);\n this.tenants = new Tenants(this._client);\n this.toolSets = new ToolSets(this._client);\n this.uploads = new Uploads(this._client);\n this.widgetSessions = new WidgetSessions(this._client);\n this.widgets = new Widgets(this._client);\n this.workspaceSecrets = new WorkspaceSecrets(this._client);\n }\n}\n\n// Browser-authored User-Agent headers require CORS permission. Only Node-compatible\n// runtimes receive the SDK default; browsers and workers use their native header.\nfunction nodeUserAgent(value: string): Record<string, string> {\n const nodeVersion = (globalThis as { process?: { versions?: { node?: string } } })\n .process?.versions?.node;\n return nodeVersion ? { 'User-Agent': value } : {};\n}\n\nfunction readEnv(name: string): string | undefined {\n const env = (globalThis as { process?: { env?: Record<string, string | undefined> } })\n .process?.env;\n return env?.[name];\n}\n\n// Presence is not validity: an explicitly provided option must be usable —\n// a blank value is a configuration mistake and never silently falls back to\n// the environment or a default. Only an OMITTED option reads the env.\nfunction resolveOption(\n label: string,\n explicit: string | undefined,\n env: string | undefined,\n): string | undefined {\n if (explicit !== undefined) {\n const value = explicit.trim();\n if (!value) {\n throw new Error(\n `${label} must not be blank when provided explicitly; omit it to use the environment instead.`,\n );\n }\n return value;\n }\n return env?.trim() || undefined;\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,E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,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,oFAAoF;AACpF,kFAAkF;AAClF,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,WAAW,GAAI,UAA6D;SAC/E,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC;IAC3B,OAAO,WAAW,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,GAAG,GAAI,UAAyE;SACnF,OAAO,EAAE,GAAG,CAAC;IAChB,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,2EAA2E;AAC3E,4EAA4E;AAC5E,sEAAsE;AACtE,SAAS,aAAa,CACpB,KAAa,EACb,QAA4B,EAC5B,GAAuB;IAEvB,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sFAAsF,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,GAAG,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;AAClC,CAAC","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient } from './core/http.js';\nimport type { Logger, LogLevel } from './core/http.js';\nimport { Webhooks } from './webhooks.js';\nimport { Accounts } from './resources/accounts.js';\nimport { ApiKeys } from './resources/api-keys.js';\nimport { WorkspaceAdmin } from './resources/workspace-admin.js';\nimport { Profiles } from './resources/profiles.js';\nimport { Workspaces } from './resources/workspaces.js';\nimport { AgentPools } from './resources/agent-pools.js';\nimport { Agents } from './resources/agents.js';\nimport { AiProviderKeys } from './resources/ai-provider-keys.js';\nimport { Models } from './resources/models.js';\nimport { MemoryLayers } from './resources/memory-layers.js';\nimport { Objectives } from './resources/objectives.js';\nimport { ToolSearch } from './resources/tool-search.js';\nimport { Tenants } from './resources/tenants.js';\nimport { ToolSets } from './resources/tool-sets.js';\nimport { Uploads } from './resources/uploads.js';\nimport { WidgetSessions } from './resources/widget-sessions.js';\nimport { Widgets } from './resources/widgets.js';\nimport { WorkspaceSecrets } from './resources/workspace-secrets.js';\n\nexport interface ClientOptions {\n /** API key. Defaults to the CADENYA_API_KEY environment variable. */\n apiKey?: string;\n /** Override the API base URL. Defaults to https://api.cadenya.com. */\n baseURL?: string;\n /** Max automatic retries for retryable failures. Defaults to 0. */\n maxRetries?: number;\n /**\n * Deadline for ordinary (non-streaming) requests in milliseconds; override\n * per request with `options.timeout`. Streams bound only response-header\n * acquisition — body lifetime stays under the caller's AbortSignal.\n * Defaults to 60000; a non-finite or <= 0 value disables the deadline.\n */\n timeout?: number;\n /** Additional request headers. Browsers supply their own User-Agent by default. */\n defaultHeaders?: Record<string, string>;\n /** Custom fetch implementation. */\n fetch?: typeof fetch;\n /** Destination for SDK logs. Defaults to `console`. */\n logger?: Logger;\n /** 'debug' | 'warn' (default) | 'off'. Never logs headers or bodies. */\n logLevel?: LogLevel;\n /** Default `workspaceId` for every call that takes one. Defaults to the CADENYA_WORKSPACE_ID environment variable. */\n workspaceId?: string;\n /** Secret for webhook signature verification. Defaults to the CADENYA_WEBHOOK_SECRET environment variable. */\n webhookSecret?: string;\n}\n\nexport class Cadenya {\n readonly accounts: Accounts;\n readonly apiKeys: ApiKeys;\n readonly workspaceAdmin: WorkspaceAdmin;\n readonly profiles: Profiles;\n readonly workspaces: Workspaces;\n readonly agentPools: AgentPools;\n readonly agents: Agents;\n readonly aiProviderKeys: AiProviderKeys;\n readonly models: Models;\n readonly memoryLayers: MemoryLayers;\n readonly objectives: Objectives;\n readonly toolSearch: ToolSearch;\n readonly tenants: Tenants;\n readonly toolSets: ToolSets;\n readonly uploads: Uploads;\n readonly widgetSessions: WidgetSessions;\n readonly widgets: Widgets;\n readonly workspaceSecrets: WorkspaceSecrets;\n readonly webhooks: Webhooks;\n\n private readonly _client: HttpClient;\n\n constructor(options: ClientOptions = {}) {\n // Presence is not validity: empty strings from options or environment\n // are configuration mistakes, not credentials.\n const apiKey = resolveOption('apiKey', options.apiKey, readEnv('CADENYA_API_KEY'));\n if (!apiKey) {\n throw new Error(\n \"Missing API key. Pass it with `new Cadenya({ apiKey })` or set the CADENYA_API_KEY environment variable.\",\n );\n }\n this._client = new HttpClient({\n baseURL: resolveOption('baseURL', options.baseURL, readEnv('CADENYA_BASE_URL')) ?? 'https://api.cadenya.com',\n authHeader: () => ({ Authorization: `Bearer ${apiKey}` }),\n maxRetries: options.maxRetries ?? 0,\n timeout: options.timeout,\n defaultHeaders: { ...nodeUserAgent('cadenya-typescript/1.5.0 (api 1.0)'), ...options.defaultHeaders },\n fetch: options.fetch,\n logger: options.logger,\n logLevel: options.logLevel,\n defaults: { workspaceId: resolveOption('workspaceId', options.workspaceId, readEnv('CADENYA_WORKSPACE_ID')) },\n });\n this.webhooks = new Webhooks(resolveOption('webhookSecret', options.webhookSecret, readEnv('CADENYA_WEBHOOK_SECRET')));\n this.accounts = new Accounts(this._client);\n this.apiKeys = new ApiKeys(this._client);\n this.workspaceAdmin = new WorkspaceAdmin(this._client);\n this.profiles = new Profiles(this._client);\n this.workspaces = new Workspaces(this._client);\n this.agentPools = new AgentPools(this._client);\n this.agents = new Agents(this._client);\n this.aiProviderKeys = new AiProviderKeys(this._client);\n this.models = new Models(this._client);\n this.memoryLayers = new MemoryLayers(this._client);\n this.objectives = new Objectives(this._client);\n this.toolSearch = new ToolSearch(this._client);\n this.tenants = new Tenants(this._client);\n this.toolSets = new ToolSets(this._client);\n this.uploads = new Uploads(this._client);\n this.widgetSessions = new WidgetSessions(this._client);\n this.widgets = new Widgets(this._client);\n this.workspaceSecrets = new WorkspaceSecrets(this._client);\n }\n}\n\n// Browser-authored User-Agent headers require CORS permission. Only Node-compatible\n// runtimes receive the SDK default; browsers and workers use their native header.\nfunction nodeUserAgent(value: string): Record<string, string> {\n const nodeVersion = (globalThis as { process?: { versions?: { node?: string } } })\n .process?.versions?.node;\n return nodeVersion ? { 'User-Agent': value } : {};\n}\n\nfunction readEnv(name: string): string | undefined {\n const env = (globalThis as { process?: { env?: Record<string, string | undefined> } })\n .process?.env;\n return env?.[name];\n}\n\n// Presence is not validity: an explicitly provided option must be usable —\n// a blank value is a configuration mistake and never silently falls back to\n// the environment or a default. Only an OMITTED option reads the env.\nfunction resolveOption(\n label: string,\n explicit: string | undefined,\n env: string | undefined,\n): string | undefined {\n if (explicit !== undefined) {\n const value = explicit.trim();\n if (!value) {\n throw new Error(\n `${label} must not be blank when provided explicitly; omit it to use the environment instead.`,\n );\n }\n return value;\n }\n return env?.trim() || undefined;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export * from './resources/api-keys.js';
15
15
  export * from './resources/workspace-admin.js';
16
16
  export * from './resources/profiles.js';
17
17
  export * from './resources/workspaces.js';
18
+ export * from './resources/agent-pools.js';
18
19
  export * from './resources/agents.js';
19
20
  export * from './resources/agent-schedules.js';
20
21
  export * from './resources/agent-variations.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtI,YAAY,EAAE,cAAc,EAAE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BAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtI,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export * from './resources/api-keys.js';
12
12
  export * from './resources/workspace-admin.js';
13
13
  export * from './resources/profiles.js';
14
14
  export * from './resources/workspaces.js';
15
+ export * from './resources/agent-pools.js';
15
16
  export * from './resources/agents.js';
16
17
  export * from './resources/agent-schedules.js';
17
18
  export * from './resources/agent-variations.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtI,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nexport { Cadenya, Cadenya as default } from './client.js';\nexport type { ClientOptions } from './client.js';\nexport { APIError, APIConnectionError, APIUserAbortError, APIRequestError, APIResponseError, APITimeoutError } from './core/error.js';\nexport type { RequestOptions } from './core/http.js';\nexport { APIPromise } from './core/http.js';\nexport { Page } from './core/pagination.js';\nexport { Stream } from './core/sse.js';\nexport type { ServerSentEvent } from './core/sse.js';\nexport * from './types.js';\nexport * from './webhooks.js';\nexport { WebhookVerifier, WebhookVerificationError } from './core/webhooks.js';\nexport type { WebhookHeaders, WebhookVerifyOptions } from './core/webhooks.js';\nexport * from './resources/accounts.js';\nexport * from './resources/api-keys.js';\nexport * from './resources/workspace-admin.js';\nexport * from './resources/profiles.js';\nexport * from './resources/workspaces.js';\nexport * from './resources/agents.js';\nexport * from './resources/agent-schedules.js';\nexport * from './resources/agent-variations.js';\nexport * from './resources/ai-provider-keys.js';\nexport * from './resources/models.js';\nexport * from './resources/memory-layers.js';\nexport * from './resources/memory-entries.js';\nexport * from './resources/objectives.js';\nexport * from './resources/tool-search.js';\nexport * from './resources/tenants.js';\nexport * from './resources/tool-sets.js';\nexport * from './resources/tool-set-secrets.js';\nexport * from './resources/tools.js';\nexport * from './resources/uploads.js';\nexport * from './resources/widget-sessions.js';\nexport * from './resources/widgets.js';\nexport * from './resources/workspace-secrets.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtI,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE/E,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nexport { Cadenya, Cadenya as default } from './client.js';\nexport type { ClientOptions } from './client.js';\nexport { APIError, APIConnectionError, APIUserAbortError, APIRequestError, APIResponseError, APITimeoutError } from './core/error.js';\nexport type { RequestOptions } from './core/http.js';\nexport { APIPromise } from './core/http.js';\nexport { Page } from './core/pagination.js';\nexport { Stream } from './core/sse.js';\nexport type { ServerSentEvent } from './core/sse.js';\nexport * from './types.js';\nexport * from './webhooks.js';\nexport { WebhookVerifier, WebhookVerificationError } from './core/webhooks.js';\nexport type { WebhookHeaders, WebhookVerifyOptions } from './core/webhooks.js';\nexport * from './resources/accounts.js';\nexport * from './resources/api-keys.js';\nexport * from './resources/workspace-admin.js';\nexport * from './resources/profiles.js';\nexport * from './resources/workspaces.js';\nexport * from './resources/agent-pools.js';\nexport * from './resources/agents.js';\nexport * from './resources/agent-schedules.js';\nexport * from './resources/agent-variations.js';\nexport * from './resources/ai-provider-keys.js';\nexport * from './resources/models.js';\nexport * from './resources/memory-layers.js';\nexport * from './resources/memory-entries.js';\nexport * from './resources/objectives.js';\nexport * from './resources/tool-search.js';\nexport * from './resources/tenants.js';\nexport * from './resources/tool-sets.js';\nexport * from './resources/tool-set-secrets.js';\nexport * from './resources/tools.js';\nexport * from './resources/uploads.js';\nexport * from './resources/widget-sessions.js';\nexport * from './resources/widgets.js';\nexport * from './resources/workspace-secrets.js';\n"]}
@@ -0,0 +1,214 @@
1
+ import { HttpClient, RequestOptions, APIPromise } from '../core/http.js';
2
+ import { Page } from '../core/pagination.js';
3
+ import type { AgentPool, AgentPoolServiceListAgentPoolsState, AgentPoolSpec, AgentPoolUpdateSpec, CreateResourceMetadata, UpdateResourceMetadata } from '../types.js';
4
+ export interface AgentPoolListParams {
5
+ /**
6
+ * Workspace ID.
7
+ *
8
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
9
+ */
10
+ workspaceId?: string;
11
+ /**
12
+ * Maximum number of results to return
13
+ */
14
+ limit?: number;
15
+ /**
16
+ * Pagination cursor from previous response
17
+ */
18
+ cursor?: string;
19
+ /**
20
+ * Filter expression (query param: prefix)
21
+ */
22
+ prefix?: string;
23
+ /**
24
+ * Free-form search query
25
+ */
26
+ query?: string;
27
+ /**
28
+ * Filter by lifecycle state. Unspecified returns active and inactive pools;
29
+ * explicitly select ARCHIVED to list archived pools.
30
+ */
31
+ state?: AgentPoolServiceListAgentPoolsState;
32
+ /**
33
+ * Filters by metadata labels. Comma-separated key=value pairs,
34
+ * e.g. "env=prod,team=ai". A resource matches only if every pair
35
+ * matches exactly (AND semantics).
36
+ */
37
+ labels?: string;
38
+ /**
39
+ * Sort order for results (asc or desc by creation time)
40
+ */
41
+ sortOrder?: string;
42
+ /**
43
+ * When true, the `info` field on each returned agent pool is populated. Requests
44
+ * with this flag count more against your rate limit.
45
+ */
46
+ includeInfo?: boolean;
47
+ }
48
+ export interface AgentPoolCreateParams {
49
+ metadata: CreateResourceMetadata;
50
+ spec: AgentPoolSpec;
51
+ /**
52
+ * Workspace ID.
53
+ *
54
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
55
+ */
56
+ workspaceId?: string;
57
+ }
58
+ export interface AgentPoolRetrieveParams {
59
+ /**
60
+ * Workspace ID.
61
+ *
62
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
63
+ */
64
+ workspaceId?: string;
65
+ }
66
+ export interface AgentPoolDeleteParams {
67
+ /**
68
+ * Workspace ID.
69
+ *
70
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
71
+ */
72
+ workspaceId?: string;
73
+ }
74
+ export interface AgentPoolUpdateParams {
75
+ /**
76
+ * Workspace ID.
77
+ *
78
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
79
+ */
80
+ workspaceId?: string;
81
+ metadata?: UpdateResourceMetadata;
82
+ spec?: AgentPoolUpdateSpec;
83
+ /**
84
+ * Fields to update. Only metadata and spec are mutable; top-level state and info
85
+ * paths are invalid. spec.assignments replaces the entire membership list.
86
+ * A spec mask replaces the full spec; * replaces all mutable fields.
87
+ * Without a mask, infer paths from non-empty fields. Empty or omitted
88
+ * membership then leaves the existing list unchanged. Element/index paths
89
+ * are invalid. Validate the merged pool atomically: an empty description
90
+ * or membership (including an explicitly masked empty list) is invalid.
91
+ */
92
+ updateMask?: string;
93
+ }
94
+ export interface AgentPoolActivateParams {
95
+ /**
96
+ * Workspace ID.
97
+ *
98
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
99
+ */
100
+ workspaceId?: string;
101
+ }
102
+ export interface AgentPoolArchiveParams {
103
+ /**
104
+ * Workspace ID.
105
+ *
106
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
107
+ */
108
+ workspaceId?: string;
109
+ }
110
+ export interface AgentPoolDeactivateParams {
111
+ /**
112
+ * Workspace ID.
113
+ *
114
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
115
+ */
116
+ workspaceId?: string;
117
+ }
118
+ export interface AgentPoolUnarchiveParams {
119
+ /**
120
+ * Workspace ID.
121
+ *
122
+ * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
123
+ */
124
+ workspaceId?: string;
125
+ }
126
+ export declare class AgentPools {
127
+ private readonly _client;
128
+ constructor(_client: HttpClient);
129
+ /**
130
+ * List agent pools
131
+ *
132
+ * @example
133
+ * ```ts
134
+ * const page = await client.agentPools.list();
135
+ * for await (const item of page) {
136
+ * // auto-fetches every page
137
+ * }
138
+ * ```
139
+ */
140
+ list(params?: AgentPoolListParams, options?: RequestOptions): Promise<Page<AgentPool>>;
141
+ /**
142
+ * Create a new agent pool
143
+ *
144
+ * @example
145
+ * ```ts
146
+ * const agentPool = await client.agentPools.create({ metadata: { name: 'sample' }, spec: { assignments: [{ agentId: 'sample' }], description: 'sample' } });
147
+ * ```
148
+ */
149
+ create(params: AgentPoolCreateParams, options?: RequestOptions): APIPromise<AgentPool>;
150
+ /**
151
+ * Get an agent pool by ID
152
+ *
153
+ * @example
154
+ * ```ts
155
+ * const agentPool = await client.agentPools.retrieve('_123');
156
+ * ```
157
+ */
158
+ retrieve(id: string, params?: AgentPoolRetrieveParams, options?: RequestOptions): APIPromise<AgentPool>;
159
+ /**
160
+ * Delete an agent pool
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * await client.agentPools.delete('_123');
165
+ * ```
166
+ */
167
+ delete(id: string, params?: AgentPoolDeleteParams, options?: RequestOptions): APIPromise<void>;
168
+ /**
169
+ * Update an agent pool
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * const agentPool = await client.agentPools.update('_123');
174
+ * ```
175
+ */
176
+ update(id: string, params?: AgentPoolUpdateParams, options?: RequestOptions): APIPromise<AgentPool>;
177
+ /**
178
+ * Activate an agent pool
179
+ *
180
+ * @example
181
+ * ```ts
182
+ * const agentPool = await client.agentPools.activate('_123');
183
+ * ```
184
+ */
185
+ activate(id: string, params?: AgentPoolActivateParams, options?: RequestOptions): APIPromise<AgentPool>;
186
+ /**
187
+ * Archive an agent pool
188
+ *
189
+ * @example
190
+ * ```ts
191
+ * const agentPool = await client.agentPools.archive('_123');
192
+ * ```
193
+ */
194
+ archive(id: string, params?: AgentPoolArchiveParams, options?: RequestOptions): APIPromise<AgentPool>;
195
+ /**
196
+ * Deactivate an agent pool
197
+ *
198
+ * @example
199
+ * ```ts
200
+ * const agentPool = await client.agentPools.deactivate('_123');
201
+ * ```
202
+ */
203
+ deactivate(id: string, params?: AgentPoolDeactivateParams, options?: RequestOptions): APIPromise<AgentPool>;
204
+ /**
205
+ * Unarchive an agent pool
206
+ *
207
+ * @example
208
+ * ```ts
209
+ * const agentPool = await client.agentPools.unarchive('_123');
210
+ * ```
211
+ */
212
+ unarchive(id: string, params?: AgentPoolUnarchiveParams, options?: RequestOptions): APIPromise<AgentPool>;
213
+ }
214
+ //# sourceMappingURL=agent-pools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-pools.d.ts","sourceRoot":"","sources":["../../src/resources/agent-pools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAA+B,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,mCAAmC,EAAE,aAAa,EAAE,mBAAmB,EAAE,sBAAsB,EAA0B,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE9L,M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AAE,MAAM,CAAC,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAQ3G;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;CAO1G"}
@@ -0,0 +1,157 @@
1
+ // Generated by redwood. Do not edit by hand.
2
+ import { pathSegment, snapshotParams } from '../core/http.js';
3
+ import { Page } from '../core/pagination.js';
4
+ export class AgentPools {
5
+ _client;
6
+ constructor(_client) {
7
+ this._client = _client;
8
+ }
9
+ /**
10
+ * List agent pools
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const page = await client.agentPools.list();
15
+ * for await (const item of page) {
16
+ * // auto-fetches every page
17
+ * }
18
+ * ```
19
+ */
20
+ async list(params, options) {
21
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
22
+ if (workspaceId === undefined)
23
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
24
+ const _base = snapshotParams(params);
25
+ const response = await this._client.request({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, labels: params?.labels, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo } }, options);
26
+ return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.list({ ..._base, cursor: cursor }, options));
27
+ }
28
+ /**
29
+ * Create a new agent pool
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const agentPool = await client.agentPools.create({ metadata: { name: 'sample' }, spec: { assignments: [{ agentId: 'sample' }], description: 'sample' } });
34
+ * ```
35
+ */
36
+ create(params, options) {
37
+ return this._client.requestAPI(() => {
38
+ const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
39
+ if (workspaceId === undefined)
40
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
41
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools`, body: { metadata: params.metadata, spec: params.spec } };
42
+ }, options);
43
+ }
44
+ /**
45
+ * Get an agent pool by ID
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const agentPool = await client.agentPools.retrieve('_123');
50
+ * ```
51
+ */
52
+ retrieve(id, params, options) {
53
+ return this._client.requestAPI(() => {
54
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
55
+ if (workspaceId === undefined)
56
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
57
+ return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}` };
58
+ }, options);
59
+ }
60
+ /**
61
+ * Delete an agent pool
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * await client.agentPools.delete('_123');
66
+ * ```
67
+ */
68
+ delete(id, params, options) {
69
+ return this._client.requestAPI(() => {
70
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
71
+ if (workspaceId === undefined)
72
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
73
+ return { method: 'DELETE', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}`, void: true };
74
+ }, options);
75
+ }
76
+ /**
77
+ * Update an agent pool
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const agentPool = await client.agentPools.update('_123');
82
+ * ```
83
+ */
84
+ update(id, params, options) {
85
+ return this._client.requestAPI(() => {
86
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
87
+ if (workspaceId === undefined)
88
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
89
+ return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };
90
+ }, options);
91
+ }
92
+ /**
93
+ * Activate an agent pool
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const agentPool = await client.agentPools.activate('_123');
98
+ * ```
99
+ */
100
+ activate(id, params, options) {
101
+ return this._client.requestAPI(() => {
102
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
103
+ if (workspaceId === undefined)
104
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
105
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:activate` };
106
+ }, options);
107
+ }
108
+ /**
109
+ * Archive an agent pool
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * const agentPool = await client.agentPools.archive('_123');
114
+ * ```
115
+ */
116
+ archive(id, params, options) {
117
+ return this._client.requestAPI(() => {
118
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
119
+ if (workspaceId === undefined)
120
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
121
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:archive` };
122
+ }, options);
123
+ }
124
+ /**
125
+ * Deactivate an agent pool
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * const agentPool = await client.agentPools.deactivate('_123');
130
+ * ```
131
+ */
132
+ deactivate(id, params, options) {
133
+ return this._client.requestAPI(() => {
134
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
135
+ if (workspaceId === undefined)
136
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
137
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:deactivate` };
138
+ }, options);
139
+ }
140
+ /**
141
+ * Unarchive an agent pool
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * const agentPool = await client.agentPools.unarchive('_123');
146
+ * ```
147
+ */
148
+ unarchive(id, params, options) {
149
+ return this._client.requestAPI(() => {
150
+ const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
151
+ if (workspaceId === undefined)
152
+ throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
153
+ return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:unarchive` };
154
+ }, options);
155
+ }
156
+ }
157
+ //# sourceMappingURL=agent-pools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-pools.js","sourceRoot":"","sources":["../../src/resources/agent-pools.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAsI7C,MAAM,OAAO,UAAU;IACQ;IAA7B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAI,CAAC,MAA4B,EAAE,OAAwB;QAC/D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;QAClH,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I,KAAK,CAAC,uHAAuH,CAAC,CAAC;YACxK,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,gBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC;QAC/I,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,EAAU,EAAE,MAAiC,EAAE,OAAwB;QAC/E,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAY,GAAG,EAAE;YAC7C,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;YAClH,IAAI,WAAW,KAAK,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YACxK,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,gBAAgB,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,EAAE,CAAC;QAC9I,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CACF","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient, RequestOptions, APIPromise, pathSegment, snapshotParams } from '../core/http.js';\nimport { Page } from '../core/pagination.js';\nimport type { AgentPool, AgentPoolServiceListAgentPoolsState, AgentPoolSpec, AgentPoolUpdateSpec, CreateResourceMetadata, ListAgentPoolsResponse, UpdateResourceMetadata } from '../types.js';\n\nexport interface AgentPoolListParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Filter expression (query param: prefix)\n */\n prefix?: string;\n /**\n * Free-form search query\n */\n query?: string;\n /**\n * Filter by lifecycle state. Unspecified returns active and inactive pools;\n * explicitly select ARCHIVED to list archived pools.\n */\n state?: AgentPoolServiceListAgentPoolsState;\n /**\n * Filters by metadata labels. Comma-separated key=value pairs,\n * e.g. \"env=prod,team=ai\". A resource matches only if every pair\n * matches exactly (AND semantics).\n */\n labels?: string;\n /**\n * Sort order for results (asc or desc by creation time)\n */\n sortOrder?: string;\n /**\n * When true, the `info` field on each returned agent pool is populated. Requests\n * with this flag count more against your rate limit.\n */\n includeInfo?: boolean;\n}\n\nexport interface AgentPoolCreateParams {\n metadata: CreateResourceMetadata;\n spec: AgentPoolSpec;\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolRetrieveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolDeleteParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolUpdateParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n metadata?: UpdateResourceMetadata;\n spec?: AgentPoolUpdateSpec;\n /**\n * Fields to update. Only metadata and spec are mutable; top-level state and info\n * paths are invalid. spec.assignments replaces the entire membership list.\n * A spec mask replaces the full spec; * replaces all mutable fields.\n * Without a mask, infer paths from non-empty fields. Empty or omitted\n * membership then leaves the existing list unchanged. Element/index paths\n * are invalid. Validate the merged pool atomically: an empty description\n * or membership (including an explicitly masked empty list) is invalid.\n */\n updateMask?: string;\n}\n\nexport interface AgentPoolActivateParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolArchiveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolDeactivateParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface AgentPoolUnarchiveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport class AgentPools {\n constructor(private readonly _client: HttpClient) {}\n\n /**\n * List agent pools\n * \n * @example\n * ```ts\n * const page = await client.agentPools.list();\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async list(params?: AgentPoolListParams, options?: RequestOptions): Promise<Page<AgentPool>> {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n const _base = snapshotParams(params);\n const response = await this._client.request<ListAgentPoolsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, labels: params?.labels, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.list({ ..._base, cursor: cursor }, options));\n }\n\n /**\n * Create a new agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.create({ metadata: { name: 'sample' }, spec: { assignments: [{ agentId: 'sample' }], description: 'sample' } });\n * ```\n */\n create(params: AgentPoolCreateParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools`, body: { metadata: params.metadata, spec: params.spec } };\n }, options);\n }\n\n /**\n * Get an agent pool by ID\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.retrieve('_123');\n * ```\n */\n retrieve(id: string, params?: AgentPoolRetrieveParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}` };\n }, options);\n }\n\n /**\n * Delete an agent pool\n * \n * @example\n * ```ts\n * await client.agentPools.delete('_123');\n * ```\n */\n delete(id: string, params?: AgentPoolDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.requestAPI<void>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'DELETE', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}`, void: true };\n }, options);\n }\n\n /**\n * Update an agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.update('_123');\n * ```\n */\n update(id: string, params?: AgentPoolUpdateParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };\n }, options);\n }\n\n /**\n * Activate an agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.activate('_123');\n * ```\n */\n activate(id: string, params?: AgentPoolActivateParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:activate` };\n }, options);\n }\n\n /**\n * Archive an agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.archive('_123');\n * ```\n */\n archive(id: string, params?: AgentPoolArchiveParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:archive` };\n }, options);\n }\n\n /**\n * Deactivate an agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.deactivate('_123');\n * ```\n */\n deactivate(id: string, params?: AgentPoolDeactivateParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:deactivate` };\n }, options);\n }\n\n /**\n * Unarchive an agent pool\n * \n * @example\n * ```ts\n * const agentPool = await client.agentPools.unarchive('_123');\n * ```\n */\n unarchive(id: string, params?: AgentPoolUnarchiveParams, options?: RequestOptions): APIPromise<AgentPool> {\n return this._client.requestAPI<AgentPool>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n 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.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agent_pools/${pathSegment('id', id)}:unarchive` };\n }, options);\n }\n}\n"]}
@@ -124,7 +124,7 @@ export declare class WidgetSessions {
124
124
  *
125
125
  * @example
126
126
  * ```ts
127
- * const widgetSession = await client.widgetSessions.create({ spec: { widgetId: 'sample' } });
127
+ * const widgetSession = await client.widgetSessions.create({ spec: { subject: { id: 'sample' }, tenant: { id: 'sample' }, widgetId: 'sample' } });
128
128
  * ```
129
129
  */
130
130
  create(params: WidgetSessionCreateParams, options?: RequestOptions): APIPromise<WidgetSession>;