@cadenya/cadenya 1.1.0 → 1.2.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 +7 -7
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/resources/agent-variations.d.ts +42 -32
- package/dist/resources/agent-variations.d.ts.map +1 -1
- package/dist/resources/agent-variations.js +22 -20
- package/dist/resources/agent-variations.js.map +1 -1
- package/dist/resources/agents.d.ts +3 -1
- package/dist/resources/agents.d.ts.map +1 -1
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/tool-search.d.ts +1 -1
- package/dist/resources/tool-search.js +1 -1
- package/dist/resources/tool-search.js.map +1 -1
- package/dist/types.d.ts +217 -67
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +40 -0
- package/dist/types.js.map +1 -1
- package/dist/webhooks.d.ts +7 -1
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/resources/agent-variations.ts +59 -47
- package/src/resources/agents.ts +3 -1
- package/src/resources/tool-search.ts +1 -1
- package/src/types.ts +266 -69
- package/src/webhooks.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAmN9D,MAAM,OAAO,MAAM;IAGY;IAFpB,SAAS,CAAiB;IAC1B,UAAU,CAAkB;IACrC,YAA6B,OAAmB;QAAnB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equestOptions, APIPromise, pathSegment, snapshotParams } from '../core/http.js';\nimport { Page } from '../core/pagination.js';\nimport { AgentSchedules } from './agent-schedules.js';\nimport { AgentVariations } from './agent-variations.js';\nimport type { Agent, AgentServiceListAgentFeedbackSentiment, AgentServiceListAgentWebhookDeliveriesEventType, AgentServiceListAgentsState, AgentServiceListAgentsVariationSelectionMode, AgentSpec, CreateAgentVariationRequestParam, CreateResourceMetadata, ListAgentFeedbackResponse, ListAgentWebhookDeliveriesResponse, ListAgentsResponse, ObjectiveFeedback, UpdateResourceMetadata, WebhookDelivery } from '../types.js';\nimport { wireCreateAgentVariationRequest } from '../types.js';\n\nexport interface AgentListParams {\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 agent lifecycle state\n */\n state?: AgentServiceListAgentsState;\n /**\n * Filter by variation selection mode\n */\n variationSelectionMode?: AgentServiceListAgentsVariationSelectionMode;\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 is populated. Requests\n * with this flag count more against your rate limit.\n */\n includeInfo?: boolean;\n}\n\nexport interface AgentCreateParams {\n metadata: CreateResourceMetadata;\n spec: AgentSpec;\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 * Optional default variation to add to the agent on create\n */\n defaultVariation?: CreateAgentVariationRequestParam;\n}\n\nexport interface AgentListFeedbackParams {\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 * Free-text search applied to the feedback comment. Case-insensitive substring match.\n */\n query?: string;\n /**\n * Filter by sentiment. UNSPECIFIED returns feedback regardless of score.\n */\n sentiment?: AgentServiceListAgentFeedbackSentiment;\n /**\n * Optional filter to limit results to feedback on objectives run by a single\n * agent variation. Supports \"external_id:\" prefix for external IDs.\n */\n agentVariationId?: string;\n /**\n * Inclusive lower bound on feedback creation time.\n */\n createdAfter?: string;\n /**\n * Exclusive upper bound on feedback creation time.\n */\n createdBefore?: string;\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 * When set to true you may use more of your alloted API rate-limit\n */\n includeInfo?: boolean;\n}\n\nexport interface AgentListWebhookDeliveriesParams {\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 * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Optional filter by objective ID\n */\n objectiveId?: string;\n /**\n * Optional filter by event type\n */\n eventType?: AgentServiceListAgentWebhookDeliveriesEventType;\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\nexport interface AgentRetrieveParams {\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 AgentDeleteParams {\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 AgentUpdateParams {\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?: AgentSpec;\n /**\n * Fields to update\n */\n updateMask?: string;\n}\n\nexport interface AgentArchiveParams {\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 AgentPublishParams {\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 AgentUnarchiveParams {\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 AgentUnpublishParams {\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 Agents {\n readonly schedules: AgentSchedules;\n readonly variations: AgentVariations;\n constructor(private readonly _client: HttpClient) {\n this.schedules = new AgentSchedules(_client);\n this.variations = new AgentVariations(_client);\n }\n\n /**\n * List agents\n * \n * @example\n * ```ts\n * const page = await client.agents.list();\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async list(params?: AgentListParams, options?: RequestOptions): Promise<Page<Agent>> {\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<ListAgentsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, variationSelectionMode: params?.variationSelectionMode, 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\n * \n * @example\n * ```ts\n * const agent = await client.agents.create({ metadata: { name: 'sample' }, spec: { } });\n * ```\n */\n create(params: AgentCreateParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents`, body: { metadata: params.metadata, spec: params.spec, defaultVariation: wireCreateAgentVariationRequest(params.defaultVariation) } };\n }, options);\n }\n\n /**\n * List feedback for an agent\n * \n * @example\n * ```ts\n * const page = await client.agents.listFeedback('agent_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listFeedback(agentId: string, params?: AgentListFeedbackParams, options?: RequestOptions): Promise<Page<ObjectiveFeedback>> {\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<ListAgentFeedbackResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents/${pathSegment('agentId', agentId)}/feedback`, query: { limit: params?.limit, cursor: params?.cursor, query: params?.query, sentiment: params?.sentiment, agentVariationId: params?.agentVariationId, createdAfter: params?.createdAfter, createdBefore: params?.createdBefore, labels: params?.labels, includeInfo: params?.includeInfo } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listFeedback(agentId, { ..._base, cursor: cursor }, options));\n }\n\n /**\n * List webhook deliveries\n * \n * @example\n * ```ts\n * const page = await client.agents.listWebhookDeliveries('agent_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listWebhookDeliveries(agentId: string, params?: AgentListWebhookDeliveriesParams, options?: RequestOptions): Promise<Page<WebhookDelivery>> {\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<ListAgentWebhookDeliveriesResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents/${pathSegment('agentId', agentId)}/webhook_deliveries`, query: { cursor: params?.cursor, limit: params?.limit, objectiveId: params?.objectiveId, eventType: params?.eventType, labels: params?.labels } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listWebhookDeliveries(agentId, { ..._base, cursor: cursor }, options));\n }\n\n /**\n * Get an agent by ID\n * \n * @example\n * ```ts\n * const agent = await client.agents.retrieve('_123');\n * ```\n */\n retrieve(id: string, params?: AgentRetrieveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}` };\n }, options);\n }\n\n /**\n * Delete an agent\n * \n * @example\n * ```ts\n * await client.agents.delete('_123');\n * ```\n */\n delete(id: string, params?: AgentDeleteParams, 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)}/agents/${pathSegment('id', id)}`, void: true };\n }, options);\n }\n\n /**\n * Update an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.update('_123');\n * ```\n */\n update(id: string, params?: AgentUpdateParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };\n }, options);\n }\n\n /**\n * Archive an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.archive('_123');\n * ```\n */\n archive(id: string, params?: AgentArchiveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:archive` };\n }, options);\n }\n\n /**\n * Publish an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.publish('_123');\n * ```\n */\n publish(id: string, params?: AgentPublishParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:publish` };\n }, options);\n }\n\n /**\n * Unarchive an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.unarchive('_123');\n * ```\n */\n unarchive(id: string, params?: AgentUnarchiveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:unarchive` };\n }, options);\n }\n\n /**\n * Unpublish an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.unpublish('_123');\n * ```\n */\n unpublish(id: string, params?: AgentUnpublishParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:unpublish` };\n }, options);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/agents.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,+BAA+B,EAAE,MAAM,a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AAE,CAAC;QACzI,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 { AgentSchedules } from './agent-schedules.js';\nimport { AgentVariations } from './agent-variations.js';\nimport type { Agent, AgentServiceListAgentFeedbackSentiment, AgentServiceListAgentWebhookDeliveriesEventType, AgentServiceListAgentsState, AgentServiceListAgentsVariationSelectionMode, AgentSpec, CreateAgentVariationRequestParam, CreateResourceMetadata, ListAgentFeedbackResponse, ListAgentWebhookDeliveriesResponse, ListAgentsResponse, ObjectiveFeedback, UpdateResourceMetadata, WebhookDelivery } from '../types.js';\nimport { wireCreateAgentVariationRequest } from '../types.js';\n\nexport interface AgentListParams {\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 agent lifecycle state\n */\n state?: AgentServiceListAgentsState;\n /**\n * Filter by variation selection mode\n */\n variationSelectionMode?: AgentServiceListAgentsVariationSelectionMode;\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 is populated. Requests\n * with this flag count more against your rate limit.\n */\n includeInfo?: boolean;\n}\n\nexport interface AgentCreateParams {\n metadata: CreateResourceMetadata;\n spec: AgentSpec;\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 * Optional default variation to add to the agent on create. Its spec accepts\n * assignments and memory_layer_assignments using the same atomic validation\n * as CreateAgentVariation. Failure rejects the entire agent creation.\n */\n defaultVariation?: CreateAgentVariationRequestParam;\n}\n\nexport interface AgentListFeedbackParams {\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 * Free-text search applied to the feedback comment. Case-insensitive substring match.\n */\n query?: string;\n /**\n * Filter by sentiment. UNSPECIFIED returns feedback regardless of score.\n */\n sentiment?: AgentServiceListAgentFeedbackSentiment;\n /**\n * Optional filter to limit results to feedback on objectives run by a single\n * agent variation. Supports \"external_id:\" prefix for external IDs.\n */\n agentVariationId?: string;\n /**\n * Inclusive lower bound on feedback creation time.\n */\n createdAfter?: string;\n /**\n * Exclusive upper bound on feedback creation time.\n */\n createdBefore?: string;\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 * When set to true you may use more of your alloted API rate-limit\n */\n includeInfo?: boolean;\n}\n\nexport interface AgentListWebhookDeliveriesParams {\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 * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Optional filter by objective ID\n */\n objectiveId?: string;\n /**\n * Optional filter by event type\n */\n eventType?: AgentServiceListAgentWebhookDeliveriesEventType;\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\nexport interface AgentRetrieveParams {\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 AgentDeleteParams {\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 AgentUpdateParams {\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?: AgentSpec;\n /**\n * Fields to update\n */\n updateMask?: string;\n}\n\nexport interface AgentArchiveParams {\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 AgentPublishParams {\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 AgentUnarchiveParams {\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 AgentUnpublishParams {\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 Agents {\n readonly schedules: AgentSchedules;\n readonly variations: AgentVariations;\n constructor(private readonly _client: HttpClient) {\n this.schedules = new AgentSchedules(_client);\n this.variations = new AgentVariations(_client);\n }\n\n /**\n * List agents\n * \n * @example\n * ```ts\n * const page = await client.agents.list();\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async list(params?: AgentListParams, options?: RequestOptions): Promise<Page<Agent>> {\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<ListAgentsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, variationSelectionMode: params?.variationSelectionMode, 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\n * \n * @example\n * ```ts\n * const agent = await client.agents.create({ metadata: { name: 'sample' }, spec: { } });\n * ```\n */\n create(params: AgentCreateParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents`, body: { metadata: params.metadata, spec: params.spec, defaultVariation: wireCreateAgentVariationRequest(params.defaultVariation) } };\n }, options);\n }\n\n /**\n * List feedback for an agent\n * \n * @example\n * ```ts\n * const page = await client.agents.listFeedback('agent_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listFeedback(agentId: string, params?: AgentListFeedbackParams, options?: RequestOptions): Promise<Page<ObjectiveFeedback>> {\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<ListAgentFeedbackResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents/${pathSegment('agentId', agentId)}/feedback`, query: { limit: params?.limit, cursor: params?.cursor, query: params?.query, sentiment: params?.sentiment, agentVariationId: params?.agentVariationId, createdAfter: params?.createdAfter, createdBefore: params?.createdBefore, labels: params?.labels, includeInfo: params?.includeInfo } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listFeedback(agentId, { ..._base, cursor: cursor }, options));\n }\n\n /**\n * List webhook deliveries\n * \n * @example\n * ```ts\n * const page = await client.agents.listWebhookDeliveries('agent_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listWebhookDeliveries(agentId: string, params?: AgentListWebhookDeliveriesParams, options?: RequestOptions): Promise<Page<WebhookDelivery>> {\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<ListAgentWebhookDeliveriesResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/agents/${pathSegment('agentId', agentId)}/webhook_deliveries`, query: { cursor: params?.cursor, limit: params?.limit, objectiveId: params?.objectiveId, eventType: params?.eventType, labels: params?.labels } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listWebhookDeliveries(agentId, { ..._base, cursor: cursor }, options));\n }\n\n /**\n * Get an agent by ID\n * \n * @example\n * ```ts\n * const agent = await client.agents.retrieve('_123');\n * ```\n */\n retrieve(id: string, params?: AgentRetrieveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}` };\n }, options);\n }\n\n /**\n * Delete an agent\n * \n * @example\n * ```ts\n * await client.agents.delete('_123');\n * ```\n */\n delete(id: string, params?: AgentDeleteParams, 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)}/agents/${pathSegment('id', id)}`, void: true };\n }, options);\n }\n\n /**\n * Update an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.update('_123');\n * ```\n */\n update(id: string, params?: AgentUpdateParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };\n }, options);\n }\n\n /**\n * Archive an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.archive('_123');\n * ```\n */\n archive(id: string, params?: AgentArchiveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:archive` };\n }, options);\n }\n\n /**\n * Publish an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.publish('_123');\n * ```\n */\n publish(id: string, params?: AgentPublishParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:publish` };\n }, options);\n }\n\n /**\n * Unarchive an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.unarchive('_123');\n * ```\n */\n unarchive(id: string, params?: AgentUnarchiveParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:unarchive` };\n }, options);\n }\n\n /**\n * Unpublish an agent\n * \n * @example\n * ```ts\n * const agent = await client.agents.unpublish('_123');\n * ```\n */\n unpublish(id: string, params?: AgentUnpublishParams, options?: RequestOptions): APIPromise<Agent> {\n return this._client.requestAPI<Agent>(() => {\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)}/agents/${pathSegment('id', id)}:unpublish` };\n }, options);\n }\n}\n"]}
|
|
@@ -17,7 +17,7 @@ export declare class ToolSearch {
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
|
-
* const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: '
|
|
20
|
+
* const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: 'sample' });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
searchOrSets(params: ToolSearchSearchOrSetsParams, options?: RequestOptions): APIPromise<SearchToolsOrToolSetsResponse>;
|
|
@@ -10,7 +10,7 @@ export class ToolSearch {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
|
-
* const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: '
|
|
13
|
+
* const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: 'sample' });
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
searchOrSets(params, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-search.js","sourceRoot":"","sources":["../../src/resources/tool-search.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAatF,MAAM,OAAO,UAAU;IACQ;IAA7B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;;;;OAOG;IACH,YAAY,CAAC,MAAoC,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAgC,GAAG,EAAE;YACjE,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;YACjH,IAAI,WAAW,KAAK,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YACxK,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,4BAA4B,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;QACxJ,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CACF","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient, RequestOptions, APIPromise, pathSegment } from '../core/http.js';\nimport type { SearchToolsOrToolSetsResponse } from '../types.js';\n\nexport interface ToolSearchSearchOrSetsParams {\n query: string;\n /**\n * Workspace that contains the tools and tool sets to search.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport class ToolSearch {\n constructor(private readonly _client: HttpClient) {}\n\n /**\n * Search for tools or tool sets\n * \n * @example\n * ```ts\n * const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: '
|
|
1
|
+
{"version":3,"file":"tool-search.js","sourceRoot":"","sources":["../../src/resources/tool-search.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAatF,MAAM,OAAO,UAAU;IACQ;IAA7B,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;IAAG,CAAC;IAEpD;;;;;;;OAOG;IACH,YAAY,CAAC,MAAoC,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAgC,GAAG,EAAE;YACjE,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;YACjH,IAAI,WAAW,KAAK,SAAS;gBAAE,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;YACxK,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,4BAA4B,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;QACxJ,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CACF","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient, RequestOptions, APIPromise, pathSegment } from '../core/http.js';\nimport type { SearchToolsOrToolSetsResponse } from '../types.js';\n\nexport interface ToolSearchSearchOrSetsParams {\n query: string;\n /**\n * Workspace that contains the tools and tool sets to search.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport class ToolSearch {\n constructor(private readonly _client: HttpClient) {}\n\n /**\n * Search for tools or tool sets\n * \n * @example\n * ```ts\n * const searchToolsOrToolSetsResponse = await client.toolSearch.searchOrSets({ query: 'sample' });\n * ```\n */\n searchOrSets(params: ToolSearchSearchOrSetsParams, options?: RequestOptions): APIPromise<SearchToolsOrToolSetsResponse> {\n return this._client.requestAPI<SearchToolsOrToolSetsResponse>(() => {\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)}/search/tools_or_tool_sets`, query: { query: params.query } };\n }, options);\n }\n}\n"]}
|
package/dist/types.d.ts
CHANGED
|
@@ -245,13 +245,15 @@ export interface AccountSpec {
|
|
|
245
245
|
/**
|
|
246
246
|
* Attach a single tool, tool set, or sub-agent to a variation. Exactly one
|
|
247
247
|
* of the target fields must be set; the assignment kind is inferred from the
|
|
248
|
-
* populated field.
|
|
248
|
+
* populated field. Adding an existing target returns AlreadyExists.
|
|
249
|
+
* All targets must be in the variation's workspace and eligible for assignment.
|
|
249
250
|
*/
|
|
250
251
|
export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId;
|
|
251
252
|
/**
|
|
252
|
-
* Attach a memory layer to a variation.
|
|
253
|
+
* Attach a memory layer to a variation. Use UpdateAgentVariationMemoryLayer or
|
|
254
|
+
* replace the spec list to reposition an existing layer. Rejected when:
|
|
255
|
+
* - the layer is already assigned, regardless of position (AlreadyExists)
|
|
253
256
|
* - the layer is system-managed (FailedPrecondition)
|
|
254
|
-
* - the layer is already assigned to this variation (AlreadyExists)
|
|
255
257
|
* - the variation is already at the 10-assignment cap (FailedPrecondition)
|
|
256
258
|
* - the position is already in use on this variation (InvalidArgument)
|
|
257
259
|
*/
|
|
@@ -544,25 +546,26 @@ export interface AgentVariationInfo {
|
|
|
544
546
|
* Total number of objective feedbacks received for this variation
|
|
545
547
|
*/
|
|
546
548
|
feedbackCount: number;
|
|
547
|
-
/**
|
|
548
|
-
* All tools, tool sets, and sub-agents assigned to this variation.
|
|
549
|
-
* Populated on reads so clients can render a variation's full assignment
|
|
550
|
-
* list without calling the add/remove endpoints just to enumerate.
|
|
551
|
-
*/
|
|
552
|
-
assignments: Array<VariationAssignment>;
|
|
553
|
-
/**
|
|
554
|
-
* Read-only list of memory layer assignments for this variation,
|
|
555
|
-
* returned in ascending `position` (most specific first — resolution
|
|
556
|
-
* order). Capped at 10 entries.
|
|
557
|
-
*/
|
|
558
|
-
memoryLayerAssignments: Array<VariationMemoryLayerAssignment>;
|
|
559
549
|
/**
|
|
560
550
|
* Count of memory layer assignments.
|
|
561
551
|
*/
|
|
562
552
|
memoryLayerCount: number;
|
|
553
|
+
/**
|
|
554
|
+
* Number of distinct callable tools available through this variation's
|
|
555
|
+
* assignments after normalization. Expands tool sets and deduplicates tools
|
|
556
|
+
* also assigned directly. Each sub-agent contributes one callable tool;
|
|
557
|
+
* its own assignments are not expanded. Counts the full normalized set,
|
|
558
|
+
* regardless of which tools progressive discovery has loaded.
|
|
559
|
+
*/
|
|
560
|
+
effectiveToolCount: number;
|
|
563
561
|
}
|
|
564
562
|
/**
|
|
565
|
-
* AgentVariationSpec defines the operational configuration for a
|
|
563
|
+
* AgentVariationSpec defines the complete operational configuration for a
|
|
564
|
+
* variation, including assignments. Reads always populate both assignment lists,
|
|
565
|
+
* even when include_info is false. Create and update validate and persist the
|
|
566
|
+
* configuration atomically: any invalid target or cascade rejects the entire
|
|
567
|
+
* request. Targets must belong to the variation's workspace and pass the same
|
|
568
|
+
* eligibility checks as the dedicated add methods.
|
|
566
569
|
*/
|
|
567
570
|
export interface AgentVariationSpec {
|
|
568
571
|
/**
|
|
@@ -603,6 +606,22 @@ export interface AgentVariationSpec {
|
|
|
603
606
|
* creation is rejected with InvalidArgument.
|
|
604
607
|
*/
|
|
605
608
|
firstUserMessageTemplate?: string;
|
|
609
|
+
/**
|
|
610
|
+
* Complete set of assigned tools, tool sets, and sub-agents. Order has no
|
|
611
|
+
* meaning. Duplicate (target kind, canonical target ID) pairs are collapsed.
|
|
612
|
+
* On create, omitted or empty means no assignments. On update, selecting
|
|
613
|
+
* spec.assignments in update_mask replaces the entire set; empty clears it.
|
|
614
|
+
*/
|
|
615
|
+
assignments?: Array<VariationAssignment>;
|
|
616
|
+
/**
|
|
617
|
+
* Complete baseline memory cascade, returned in ascending position. At most
|
|
618
|
+
* 10 whole layers; system-managed layers cannot be assigned. Duplicate layer
|
|
619
|
+
* IDs (after alias resolution) or positions are InvalidArgument. Validate the
|
|
620
|
+
* final cascade, so swapping two positions in one update is supported.
|
|
621
|
+
* On create, omitted or empty means no layers. On update, selecting
|
|
622
|
+
* spec.memory_layer_assignments replaces the entire list; empty clears it.
|
|
623
|
+
*/
|
|
624
|
+
memoryLayerAssignments?: Array<VariationMemoryLayerAssignment>;
|
|
606
625
|
}
|
|
607
626
|
/**
|
|
608
627
|
* CompactionConfig defines how context window compaction behaves for objectives using this variation.
|
|
@@ -1109,7 +1128,9 @@ export interface CreateAgentRequest {
|
|
|
1109
1128
|
metadata: CreateResourceMetadata;
|
|
1110
1129
|
spec: AgentSpec;
|
|
1111
1130
|
/**
|
|
1112
|
-
* Optional default variation to add to the agent on create
|
|
1131
|
+
* Optional default variation to add to the agent on create. Its spec accepts
|
|
1132
|
+
* assignments and memory_layer_assignments using the same atomic validation
|
|
1133
|
+
* as CreateAgentVariation. Failure rejects the entire agent creation.
|
|
1113
1134
|
*/
|
|
1114
1135
|
defaultVariation?: CreateAgentVariationRequest;
|
|
1115
1136
|
}
|
|
@@ -2086,7 +2107,7 @@ export interface Notice {
|
|
|
2086
2107
|
/**
|
|
2087
2108
|
* The current lifecycle state of the objective.
|
|
2088
2109
|
*/
|
|
2089
|
-
export type ObjectiveState = '
|
|
2110
|
+
export type ObjectiveState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
|
|
2090
2111
|
/**
|
|
2091
2112
|
* Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned
|
|
2092
2113
|
* only with their names, and the output definition is copied from the agent's configuration.
|
|
@@ -2152,7 +2173,7 @@ export interface Objective {
|
|
|
2152
2173
|
memoryCascade: Array<MemoryReference>;
|
|
2153
2174
|
/**
|
|
2154
2175
|
* The output of the objective, populated when the objective completes. Will match the schema of output_json_schema or output_json_inferred.
|
|
2155
|
-
* This will only be set if the state of the objective is set to
|
|
2176
|
+
* This will only be set if the state of the objective is set to OBJECTIVE_STATE_FINALIZED
|
|
2156
2177
|
*/
|
|
2157
2178
|
output?: Record<string, unknown>;
|
|
2158
2179
|
/**
|
|
@@ -2289,7 +2310,7 @@ export interface ObjectiveEvent {
|
|
|
2289
2310
|
*/
|
|
2290
2311
|
startedAt?: string;
|
|
2291
2312
|
}
|
|
2292
|
-
export type ObjectiveEventData = ObjectiveEventData_UserMessage | ObjectiveEventData_ToolApprovalRequested | ObjectiveEventData_ToolApproved | ObjectiveEventData_ToolDenied | ObjectiveEventData_ToolCalled | ObjectiveEventData_Error | ObjectiveEventData_AssistantMessage | ObjectiveEventData_ToolResult | ObjectiveEventData_ToolError | ObjectiveEventData_ContextWindowCompacted | ObjectiveEventData_MemoryRead | ObjectiveEventData_Cancelled | ObjectiveEventData_SubAgentSpawned | ObjectiveEventData_SubAgentUpdated | ObjectiveEventData_Finalized | ObjectiveEventData_Notice | ObjectiveEventData_TimedOut | ObjectiveEventData_Reasoning;
|
|
2313
|
+
export type ObjectiveEventData = ObjectiveEventData_UserMessage | ObjectiveEventData_ToolApprovalRequested | ObjectiveEventData_ToolApproved | ObjectiveEventData_ToolDenied | ObjectiveEventData_ToolCalled | ObjectiveEventData_Error | ObjectiveEventData_AssistantMessage | ObjectiveEventData_ToolResult | ObjectiveEventData_ToolError | ObjectiveEventData_ContextWindowCompacted | ObjectiveEventData_MemoryRead | ObjectiveEventData_Cancelled | ObjectiveEventData_SubAgentSpawned | ObjectiveEventData_SubAgentUpdated | ObjectiveEventData_Finalized | ObjectiveEventData_Notice | ObjectiveEventData_TimedOut | ObjectiveEventData_Reasoning | ObjectiveEventData_StateChanged;
|
|
2293
2314
|
export interface ObjectiveEventInfo {
|
|
2294
2315
|
objective?: OperationMetadata;
|
|
2295
2316
|
createdBy: Profile;
|
|
@@ -2406,6 +2427,38 @@ export interface ObjectiveInfo {
|
|
|
2406
2427
|
*/
|
|
2407
2428
|
widget?: BareMetadata;
|
|
2408
2429
|
}
|
|
2430
|
+
/**
|
|
2431
|
+
* The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
|
|
2432
|
+
* objective was just created.
|
|
2433
|
+
*/
|
|
2434
|
+
export type ObjectiveStateChangedFromState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
|
|
2435
|
+
/**
|
|
2436
|
+
* The state after this write.
|
|
2437
|
+
*/
|
|
2438
|
+
export type ObjectiveStateChangedToState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
|
|
2439
|
+
/**
|
|
2440
|
+
* ObjectiveStateChanged is written every time the objective's lifecycle state
|
|
2441
|
+
* is set, including the initial move into OBJECTIVE_STATE_PENDING at creation. Terminal
|
|
2442
|
+
* transitions also write their dedicated event (cancelled, timedOut,
|
|
2443
|
+
* finalized, error) immediately before this one, so consumers that only care
|
|
2444
|
+
* about the outcome can keep listening for those.
|
|
2445
|
+
*/
|
|
2446
|
+
export interface ObjectiveStateChanged {
|
|
2447
|
+
/**
|
|
2448
|
+
* The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
|
|
2449
|
+
* objective was just created.
|
|
2450
|
+
*/
|
|
2451
|
+
fromState: ObjectiveStateChangedFromState;
|
|
2452
|
+
/**
|
|
2453
|
+
* The state after this write.
|
|
2454
|
+
*/
|
|
2455
|
+
toState: ObjectiveStateChangedToState;
|
|
2456
|
+
/**
|
|
2457
|
+
* The status message recorded with the transition, if any (e.g.
|
|
2458
|
+
* "Continued", or the error summary on a failure).
|
|
2459
|
+
*/
|
|
2460
|
+
message?: string;
|
|
2461
|
+
}
|
|
2409
2462
|
/**
|
|
2410
2463
|
* ObjectiveTimedOut is the terminal event written when an objective is
|
|
2411
2464
|
* finalized by the inactivity sweep because it saw no activity (no user
|
|
@@ -2818,6 +2871,33 @@ export interface Reasoning {
|
|
|
2818
2871
|
*/
|
|
2819
2872
|
content: string;
|
|
2820
2873
|
}
|
|
2874
|
+
/**
|
|
2875
|
+
* Detach a target by its foreign key. Removing an unassigned target returns
|
|
2876
|
+
* NotFound. The parent variation must exist and be accessible.
|
|
2877
|
+
*/
|
|
2878
|
+
export type RemoveAgentVariationAssignmentRequest = RemoveAgentVariationAssignmentRequest_ToolId | RemoveAgentVariationAssignmentRequest_ToolSetId | RemoveAgentVariationAssignmentRequest_SubAgentId;
|
|
2879
|
+
/**
|
|
2880
|
+
* Remove by memory layer ID. An unassigned layer returns NotFound.
|
|
2881
|
+
* The parent variation must still exist and be accessible.
|
|
2882
|
+
*/
|
|
2883
|
+
export interface RemoveAgentVariationMemoryLayerRequest {
|
|
2884
|
+
/**
|
|
2885
|
+
* Workspace ID.
|
|
2886
|
+
*/
|
|
2887
|
+
workspaceId?: string;
|
|
2888
|
+
/**
|
|
2889
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
2890
|
+
*/
|
|
2891
|
+
agentId?: string;
|
|
2892
|
+
/**
|
|
2893
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
2894
|
+
*/
|
|
2895
|
+
variationId?: string;
|
|
2896
|
+
/**
|
|
2897
|
+
* Layer to detach. Accepts memlyr_… or external_id:<value>.
|
|
2898
|
+
*/
|
|
2899
|
+
memoryLayerId: string;
|
|
2900
|
+
}
|
|
2821
2901
|
export type ResolvedSecretSource = 'RESOLVED_SECRET_SOURCE_UNSPECIFIED' | 'RESOLVED_SECRET_SOURCE_WORKSPACE' | 'RESOLVED_SECRET_SOURCE_TOOLSET' | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
|
|
2822
2902
|
/**
|
|
2823
2903
|
* ResolvedSecret is a resolved secret value from the workspace, toolset, or objective. When a tool is called, it will rely
|
|
@@ -4019,7 +4099,7 @@ export interface UpdateAgentScheduleRequest {
|
|
|
4019
4099
|
/**
|
|
4020
4100
|
* Update an existing memory layer assignment. Only `position` is mutable.
|
|
4021
4101
|
* A new position that collides with another assignment on the same variation
|
|
4022
|
-
* is rejected with InvalidArgument.
|
|
4102
|
+
* is rejected with InvalidArgument. An unassigned layer returns NotFound.
|
|
4023
4103
|
*/
|
|
4024
4104
|
export interface UpdateAgentVariationMemoryLayerRequest {
|
|
4025
4105
|
/**
|
|
@@ -4034,11 +4114,14 @@ export interface UpdateAgentVariationMemoryLayerRequest {
|
|
|
4034
4114
|
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
4035
4115
|
*/
|
|
4036
4116
|
variationId?: string;
|
|
4037
|
-
|
|
4117
|
+
/**
|
|
4118
|
+
* Layer to reposition. Accepts memlyr_… or external_id:<value>.
|
|
4119
|
+
*/
|
|
4120
|
+
memoryLayerId: string;
|
|
4038
4121
|
/**
|
|
4039
4122
|
* New position. Only field currently updatable on an assignment.
|
|
4040
4123
|
*/
|
|
4041
|
-
position
|
|
4124
|
+
position: number;
|
|
4042
4125
|
}
|
|
4043
4126
|
/**
|
|
4044
4127
|
* Update agent variation request
|
|
@@ -4059,7 +4142,13 @@ export interface UpdateAgentVariationRequest {
|
|
|
4059
4142
|
metadata?: UpdateResourceMetadata;
|
|
4060
4143
|
spec?: AgentVariationSpec;
|
|
4061
4144
|
/**
|
|
4062
|
-
* Fields to update
|
|
4145
|
+
* Fields to update. Assignment lists are replaced as a whole, never merged.
|
|
4146
|
+
* Select spec.assignments or spec.memory_layer_assignments to replace/clear
|
|
4147
|
+
* one list. Selecting spec replaces the entire spec (including omitted lists);
|
|
4148
|
+
* * replaces all mutable fields. Element/index paths are not supported.
|
|
4149
|
+
* Without a mask, infer paths from non-empty fields: non-empty assignment
|
|
4150
|
+
* lists replace existing lists, while omitted/empty lists remain unchanged.
|
|
4151
|
+
* To clear a list, explicitly include its path in the mask.
|
|
4063
4152
|
*/
|
|
4064
4153
|
updateMask?: string;
|
|
4065
4154
|
}
|
|
@@ -4304,41 +4393,27 @@ export interface UserMessage {
|
|
|
4304
4393
|
content: string;
|
|
4305
4394
|
}
|
|
4306
4395
|
/**
|
|
4307
|
-
* A
|
|
4308
|
-
*
|
|
4309
|
-
*
|
|
4310
|
-
*
|
|
4311
|
-
* The `id` identifies the assignment itself (not the referenced resource) and
|
|
4312
|
-
* is the handle used to remove the assignment. It is returned by the add
|
|
4313
|
-
* endpoint and present on every entry in `AgentVariationInfo.assignments`.
|
|
4396
|
+
* A tool, tool set, or sub-agent assigned to a variation, identified only by
|
|
4397
|
+
* the target resource ID. The same shape is accepted in a spec and returned
|
|
4398
|
+
* on reads. Assignment junction records are an internal implementation detail.
|
|
4314
4399
|
*/
|
|
4315
|
-
export type VariationAssignment =
|
|
4400
|
+
export type VariationAssignment = VariationAssignment_ToolId | VariationAssignment_ToolSetId | VariationAssignment_SubAgentId;
|
|
4316
4401
|
/**
|
|
4317
|
-
*
|
|
4318
|
-
*
|
|
4319
|
-
*
|
|
4320
|
-
*
|
|
4321
|
-
* Variations only support whole-layer attachments — entry pinning is an
|
|
4322
|
-
* objective-level capability.
|
|
4402
|
+
* A whole memory layer in a variation's baseline memory cascade. Identified
|
|
4403
|
+
* by the memory layer ID; no assignment junction ID is exposed. Entry pinning
|
|
4404
|
+
* remains an objective-level capability.
|
|
4323
4405
|
*/
|
|
4324
4406
|
export interface VariationMemoryLayerAssignment {
|
|
4325
4407
|
/**
|
|
4326
|
-
*
|
|
4327
|
-
*
|
|
4328
|
-
*/
|
|
4329
|
-
id: string;
|
|
4330
|
-
/**
|
|
4331
|
-
* The attached memory layer.
|
|
4408
|
+
* Accepts the canonical memlyr_… ID or external_id:<value> on input.
|
|
4409
|
+
* Reads always return the canonical ID.
|
|
4332
4410
|
*/
|
|
4333
|
-
|
|
4411
|
+
memoryLayerId: string;
|
|
4334
4412
|
/**
|
|
4335
|
-
* Position
|
|
4336
|
-
*
|
|
4337
|
-
*
|
|
4338
|
-
*
|
|
4339
|
-
* Positions must be unique within a variation; a request that would
|
|
4340
|
-
* collide with an existing assignment's position is rejected with
|
|
4341
|
-
* InvalidArgument.
|
|
4413
|
+
* Position is specificity: lower positions are consulted first; the highest
|
|
4414
|
+
* position is the most general fallback. Gaps and zero are valid. Positions
|
|
4415
|
+
* must be unique within a variation. Explicitly required in a full spec;
|
|
4416
|
+
* only AddAgentVariationMemoryLayer can choose an append position for you.
|
|
4342
4417
|
*/
|
|
4343
4418
|
position: number;
|
|
4344
4419
|
}
|
|
@@ -4361,7 +4436,7 @@ export type WebhookDeliveryDataStatus = 'WEBHOOK_DELIVERY_STATUS_UNSPECIFIED' |
|
|
|
4361
4436
|
/**
|
|
4362
4437
|
* The type of objective event that triggered this webhook delivery
|
|
4363
4438
|
*/
|
|
4364
|
-
export type WebhookDeliveryDataEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING';
|
|
4439
|
+
export type WebhookDeliveryDataEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED';
|
|
4365
4440
|
export interface WebhookDeliveryData {
|
|
4366
4441
|
/**
|
|
4367
4442
|
* Related resources
|
|
@@ -4685,20 +4760,26 @@ export interface ObjectiveEventWebhookData {
|
|
|
4685
4760
|
*/
|
|
4686
4761
|
data: ObjectiveEventWebhookDataData;
|
|
4687
4762
|
}
|
|
4688
|
-
export interface
|
|
4689
|
-
type: '
|
|
4690
|
-
|
|
4691
|
-
|
|
4763
|
+
export interface VariationAssignment_ToolId {
|
|
4764
|
+
type: 'toolId';
|
|
4765
|
+
/**
|
|
4766
|
+
* Canonical tool ID.
|
|
4767
|
+
*/
|
|
4768
|
+
toolId: string;
|
|
4692
4769
|
}
|
|
4693
|
-
export interface
|
|
4694
|
-
type: '
|
|
4695
|
-
|
|
4696
|
-
|
|
4770
|
+
export interface VariationAssignment_ToolSetId {
|
|
4771
|
+
type: 'toolSetId';
|
|
4772
|
+
/**
|
|
4773
|
+
* Canonical tool set ID.
|
|
4774
|
+
*/
|
|
4775
|
+
toolSetId: string;
|
|
4697
4776
|
}
|
|
4698
|
-
export interface
|
|
4699
|
-
type: '
|
|
4700
|
-
|
|
4701
|
-
|
|
4777
|
+
export interface VariationAssignment_SubAgentId {
|
|
4778
|
+
type: 'subAgentId';
|
|
4779
|
+
/**
|
|
4780
|
+
* Canonical sub-agent ID.
|
|
4781
|
+
*/
|
|
4782
|
+
subAgentId: string;
|
|
4702
4783
|
}
|
|
4703
4784
|
export interface ObjectiveToolCallResult_ContentBlock_Text {
|
|
4704
4785
|
type: 'text';
|
|
@@ -4977,6 +5058,10 @@ export interface ObjectiveEventData_Reasoning {
|
|
|
4977
5058
|
type: 'reasoning';
|
|
4978
5059
|
reasoning: Reasoning;
|
|
4979
5060
|
}
|
|
5061
|
+
export interface ObjectiveEventData_StateChanged {
|
|
5062
|
+
type: 'stateChanged';
|
|
5063
|
+
stateChanged: ObjectiveStateChanged;
|
|
5064
|
+
}
|
|
4980
5065
|
export interface CallableTool_Tool {
|
|
4981
5066
|
type: 'tool';
|
|
4982
5067
|
tool: ResourceMetadata;
|
|
@@ -5076,6 +5161,54 @@ export interface AddAgentVariationAssignmentRequest_SubAgentId {
|
|
|
5076
5161
|
*/
|
|
5077
5162
|
variationId?: string;
|
|
5078
5163
|
}
|
|
5164
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolId {
|
|
5165
|
+
type: 'toolId';
|
|
5166
|
+
toolId: string;
|
|
5167
|
+
/**
|
|
5168
|
+
* Workspace ID.
|
|
5169
|
+
*/
|
|
5170
|
+
workspaceId?: string;
|
|
5171
|
+
/**
|
|
5172
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5173
|
+
*/
|
|
5174
|
+
agentId?: string;
|
|
5175
|
+
/**
|
|
5176
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5177
|
+
*/
|
|
5178
|
+
variationId?: string;
|
|
5179
|
+
}
|
|
5180
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolSetId {
|
|
5181
|
+
type: 'toolSetId';
|
|
5182
|
+
toolSetId: string;
|
|
5183
|
+
/**
|
|
5184
|
+
* Workspace ID.
|
|
5185
|
+
*/
|
|
5186
|
+
workspaceId?: string;
|
|
5187
|
+
/**
|
|
5188
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5189
|
+
*/
|
|
5190
|
+
agentId?: string;
|
|
5191
|
+
/**
|
|
5192
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5193
|
+
*/
|
|
5194
|
+
variationId?: string;
|
|
5195
|
+
}
|
|
5196
|
+
export interface RemoveAgentVariationAssignmentRequest_SubAgentId {
|
|
5197
|
+
type: 'subAgentId';
|
|
5198
|
+
subAgentId: string;
|
|
5199
|
+
/**
|
|
5200
|
+
* Workspace ID.
|
|
5201
|
+
*/
|
|
5202
|
+
workspaceId?: string;
|
|
5203
|
+
/**
|
|
5204
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5205
|
+
*/
|
|
5206
|
+
agentId?: string;
|
|
5207
|
+
/**
|
|
5208
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5209
|
+
*/
|
|
5210
|
+
variationId?: string;
|
|
5211
|
+
}
|
|
5079
5212
|
export interface AIProviderCredential_ApiKey {
|
|
5080
5213
|
type: 'apiKey';
|
|
5081
5214
|
/**
|
|
@@ -5159,10 +5292,10 @@ export interface ModelSpec_Capability_Caching {
|
|
|
5159
5292
|
export type AgentServiceListAgentsState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
|
|
5160
5293
|
export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
|
|
5161
5294
|
export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
|
|
5162
|
-
export type AgentServiceListAgentWebhookDeliveriesEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING';
|
|
5295
|
+
export type AgentServiceListAgentWebhookDeliveriesEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED';
|
|
5163
5296
|
export type MemoryServiceListMemoryLayersType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
|
|
5164
5297
|
export type ModelServiceListModelsState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
|
|
5165
|
-
export type ObjectiveServiceListObjectivesState = '
|
|
5298
|
+
export type ObjectiveServiceListObjectivesState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
|
|
5166
5299
|
export type ObjectiveServiceListObjectiveToolCallsStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
|
|
5167
5300
|
export type ObjectiveServiceListObjectiveToolCallsExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
|
|
5168
5301
|
export type ToolServiceListToolSetsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
|
|
@@ -5209,6 +5342,7 @@ export interface ObjectiveEpisodicConfigParam {
|
|
|
5209
5342
|
*/
|
|
5210
5343
|
key: string;
|
|
5211
5344
|
}
|
|
5345
|
+
export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam;
|
|
5212
5346
|
export interface WidgetSessionSpecParam {
|
|
5213
5347
|
/**
|
|
5214
5348
|
* Widget this session is minted against. Accepts the canonical `wgt_…` form
|
|
@@ -5258,6 +5392,18 @@ export interface AddAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
|
5258
5392
|
type: 'subAgentId';
|
|
5259
5393
|
subAgentId: string;
|
|
5260
5394
|
}
|
|
5395
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolIdParam {
|
|
5396
|
+
type: 'toolId';
|
|
5397
|
+
toolId: string;
|
|
5398
|
+
}
|
|
5399
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolSetIdParam {
|
|
5400
|
+
type: 'toolSetId';
|
|
5401
|
+
toolSetId: string;
|
|
5402
|
+
}
|
|
5403
|
+
export interface RemoveAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
5404
|
+
type: 'subAgentId';
|
|
5405
|
+
subAgentId: string;
|
|
5406
|
+
}
|
|
5261
5407
|
export declare function wireArray<T>(value: Array<T> | null | undefined, fn: (v: T) => unknown): unknown;
|
|
5262
5408
|
export declare function wireMap<T>(value: Record<string, T> | null | undefined, fn: (v: T) => unknown): unknown;
|
|
5263
5409
|
export declare function wireAPIKeySpec(value: APIKeySpecParam | null | undefined): unknown;
|
|
@@ -5265,8 +5411,12 @@ export declare function wireAddAgentVariationAssignmentRequest(value: AddAgentVa
|
|
|
5265
5411
|
export declare function wireCreateAgentVariationRequest(value: CreateAgentVariationRequestParam | null | undefined): unknown;
|
|
5266
5412
|
export declare function wireMemoryLayerSpec(value: MemoryLayerSpecParam | null | undefined): unknown;
|
|
5267
5413
|
export declare function wireObjectiveEpisodicConfig(value: ObjectiveEpisodicConfigParam | null | undefined): unknown;
|
|
5414
|
+
export declare function wireRemoveAgentVariationAssignmentRequest(value: RemoveAgentVariationAssignmentRequestParam | null | undefined): unknown;
|
|
5268
5415
|
export declare function wireWidgetSessionSpec(value: WidgetSessionSpecParam | null | undefined): unknown;
|
|
5269
5416
|
export declare function wireAddAgentVariationAssignmentRequest_ToolId(value: AddAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
|
|
5270
5417
|
export declare function wireAddAgentVariationAssignmentRequest_ToolSetId(value: AddAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
|
|
5271
5418
|
export declare function wireAddAgentVariationAssignmentRequest_SubAgentId(value: AddAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
|
|
5419
|
+
export declare function wireRemoveAgentVariationAssignmentRequest_ToolId(value: RemoveAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
|
|
5420
|
+
export declare function wireRemoveAgentVariationAssignmentRequest_ToolSetId(value: RemoveAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
|
|
5421
|
+
export declare function wireRemoveAgentVariationAssignmentRequest_SubAgentId(value: RemoveAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
|
|
5272
5422
|
//# sourceMappingURL=types.d.ts.map
|