@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 +48 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-pools.d.ts +214 -0
- package/dist/resources/agent-pools.d.ts.map +1 -0
- package/dist/resources/agent-pools.js +157 -0
- package/dist/resources/agent-pools.js.map +1 -0
- package/dist/resources/widget-sessions.d.ts +1 -1
- package/dist/resources/widget-sessions.js +1 -1
- package/dist/resources/widget-sessions.js.map +1 -1
- package/dist/types.d.ts +360 -43
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +4 -1
- package/src/index.ts +1 -0
- package/src/resources/agent-pools.ts +287 -0
- package/src/resources/widget-sessions.ts +1 -1
- package/src/types.ts +406 -43
package/dist/types.d.ts
CHANGED
|
@@ -243,12 +243,25 @@ export interface AccountSpec {
|
|
|
243
243
|
workspaces: Array<Workspace>;
|
|
244
244
|
}
|
|
245
245
|
/**
|
|
246
|
-
*
|
|
246
|
+
* Activate an inactive pool.
|
|
247
|
+
*/
|
|
248
|
+
export interface ActivateAgentPoolRequest {
|
|
249
|
+
/**
|
|
250
|
+
* Workspace ID.
|
|
251
|
+
*/
|
|
252
|
+
workspaceId?: string;
|
|
253
|
+
/**
|
|
254
|
+
* AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
|
|
255
|
+
*/
|
|
256
|
+
id?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Attach a single tool, tool set, sub-agent, or agent pool to a variation. Exactly one
|
|
247
260
|
* of the target fields must be set; the assignment kind is inferred from the
|
|
248
261
|
* populated field. Adding an existing target returns AlreadyExists.
|
|
249
262
|
* All targets must be in the variation's workspace and eligible for assignment.
|
|
250
263
|
*/
|
|
251
|
-
export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId;
|
|
264
|
+
export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId | AddAgentVariationAssignmentRequest_AgentPoolId;
|
|
252
265
|
/**
|
|
253
266
|
* Attach a memory layer to a variation. Use UpdateAgentVariationMemoryLayer or
|
|
254
267
|
* replace the spec list to reposition an existing layer. Rejected when:
|
|
@@ -337,6 +350,97 @@ export interface AgentInfo {
|
|
|
337
350
|
variationCount: number;
|
|
338
351
|
createdBy?: Profile;
|
|
339
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Output only. Pools are created INACTIVE. Use :activate, :deactivate,
|
|
355
|
+
* :archive, and :unarchive to transition states. Unarchive returns INACTIVE.
|
|
356
|
+
*/
|
|
357
|
+
export type AgentPoolState = 'AGENT_POOL_STATE_UNSPECIFIED' | 'AGENT_POOL_STATE_ACTIVE' | 'AGENT_POOL_STATE_INACTIVE' | 'AGENT_POOL_STATE_ARCHIVED';
|
|
358
|
+
/**
|
|
359
|
+
* A workspace-scoped group of agents. When assigned to a variation, the pool
|
|
360
|
+
* exposes one callable target that routes a request to a member agent.
|
|
361
|
+
* Pool membership references agents; variation assignments reference the pool.
|
|
362
|
+
*/
|
|
363
|
+
export interface AgentPool {
|
|
364
|
+
metadata: ResourceMetadata;
|
|
365
|
+
spec: AgentPoolSpec;
|
|
366
|
+
info?: AgentPoolInfo;
|
|
367
|
+
/**
|
|
368
|
+
* Output only. Pools are created INACTIVE. Use :activate, :deactivate,
|
|
369
|
+
* :archive, and :unarchive to transition states. Unarchive returns INACTIVE.
|
|
370
|
+
*/
|
|
371
|
+
state: AgentPoolState;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* A member of a pool, identified by its agent ID. This is distinct from a
|
|
375
|
+
* VariationAssignment, which attaches the entire pool to a variation.
|
|
376
|
+
*/
|
|
377
|
+
export interface AgentPoolAssignment {
|
|
378
|
+
/**
|
|
379
|
+
* Canonical ID of an agent in the pool's workspace.
|
|
380
|
+
*/
|
|
381
|
+
agentId: string;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* AgentPoolInfo represents the information of an agent pool.
|
|
385
|
+
*/
|
|
386
|
+
export interface AgentPoolInfo {
|
|
387
|
+
/**
|
|
388
|
+
* Number of member agents in spec.assignments.
|
|
389
|
+
*/
|
|
390
|
+
assignedAgents: number;
|
|
391
|
+
createdBy: Profile;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* AgentPoolSpec describes the pool's purpose, membership, input schema, and routing instructions.
|
|
395
|
+
*/
|
|
396
|
+
export interface AgentPoolSpec {
|
|
397
|
+
/**
|
|
398
|
+
* Describes when a calling agent should use this pool.
|
|
399
|
+
*/
|
|
400
|
+
description: string;
|
|
401
|
+
/**
|
|
402
|
+
* JSON Schema defining the input arguments for this pool's callable tool.
|
|
403
|
+
* When the pool is assigned to an agent variation, this schema tells the LLM
|
|
404
|
+
* what arguments to supply. The supplied arguments provide the context used
|
|
405
|
+
* to route the request to an agent in the pool.
|
|
406
|
+
*/
|
|
407
|
+
state?: Record<string, unknown>;
|
|
408
|
+
/**
|
|
409
|
+
* Complete set of member agents, all in the pool's workspace. At least one
|
|
410
|
+
* member is required. Order has no meaning; duplicate agent IDs are invalid.
|
|
411
|
+
*/
|
|
412
|
+
assignments: Array<AgentPoolAssignment>;
|
|
413
|
+
/**
|
|
414
|
+
* Instructions for routing requests to an agent in the pool.
|
|
415
|
+
* If empty, defaults to "Which agent is best suited to handle this request?".
|
|
416
|
+
*/
|
|
417
|
+
instructions?: string;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Partial input for UpdateAgentPool. The server applies update_mask, then
|
|
421
|
+
* validates the resulting AgentPoolSpec before persisting any changes.
|
|
422
|
+
*/
|
|
423
|
+
export interface AgentPoolUpdateSpec {
|
|
424
|
+
/**
|
|
425
|
+
* Omit to leave unchanged, unless the mask selects this field or all of spec.
|
|
426
|
+
*/
|
|
427
|
+
description?: string;
|
|
428
|
+
/**
|
|
429
|
+
* JSON Schema for the pool's callable input arguments. Update through
|
|
430
|
+
* spec.state in the update mask.
|
|
431
|
+
*/
|
|
432
|
+
state?: Record<string, unknown>;
|
|
433
|
+
/**
|
|
434
|
+
* Replacement membership. A selected empty list is invalid because a pool
|
|
435
|
+
* must retain at least one member. Unselected fields remain unchanged.
|
|
436
|
+
*/
|
|
437
|
+
assignments?: Array<AgentPoolAssignment>;
|
|
438
|
+
/**
|
|
439
|
+
* Routing instructions to update through spec.instructions in the update
|
|
440
|
+
* mask. Selecting this field with an empty value restores the default question.
|
|
441
|
+
*/
|
|
442
|
+
instructions?: string;
|
|
443
|
+
}
|
|
340
444
|
/**
|
|
341
445
|
* The current lifecycle state of the schedule. Output only. Schedules are
|
|
342
446
|
* created STATE_ACTIVE; use the :pause, :resume, and :archive actions to
|
|
@@ -553,23 +657,27 @@ export interface AgentVariationInfo {
|
|
|
553
657
|
/**
|
|
554
658
|
* Number of distinct callable tools available through this variation's
|
|
555
659
|
* assignments after normalization. Expands tool sets and deduplicates tools
|
|
556
|
-
* also assigned directly. Each sub-agent contributes one callable
|
|
557
|
-
*
|
|
558
|
-
* regardless of which tools progressive discovery has loaded.
|
|
660
|
+
* also assigned directly. Each sub-agent or pool contributes one callable
|
|
661
|
+
* tool; sub-agent assignments and pool members are not expanded. Counts the
|
|
662
|
+
* full normalized set, regardless of which tools progressive discovery has loaded.
|
|
559
663
|
*/
|
|
560
664
|
effectiveToolCount: number;
|
|
561
665
|
/**
|
|
562
666
|
* Current display metadata for targets explicitly referenced by
|
|
563
667
|
* spec.assignments and spec.memory_layer_assignments, keyed by canonical
|
|
564
|
-
* resource ID. Includes tools, tool sets, sub-agents,
|
|
565
|
-
* one map; each value's id equals its key. Does not expand
|
|
566
|
-
* assigned tool sets
|
|
668
|
+
* resource ID. Includes tools, tool sets, sub-agents, agent pools,
|
|
669
|
+
* and memory layers in one map; each value's id equals its key. Does not expand
|
|
670
|
+
* tools within assigned tool sets, assignments within sub-agents, or pool members.
|
|
567
671
|
* Populated whenever info is returned; empty when there are no assignments.
|
|
568
672
|
* Missing or inaccessible targets are omitted, and names may be absent.
|
|
569
673
|
* Clients use spec for assignment type/order and fall back to the ID when
|
|
570
674
|
* display metadata is unavailable. This map never accepts assignment writes.
|
|
571
675
|
*/
|
|
572
676
|
assignmentMetadata: Record<string, BareMetadata>;
|
|
677
|
+
/**
|
|
678
|
+
* Number of agent pools assigned to this variation.
|
|
679
|
+
*/
|
|
680
|
+
agentPoolCount: number;
|
|
573
681
|
}
|
|
574
682
|
/**
|
|
575
683
|
* AgentVariationSpec defines the complete operational configuration for a
|
|
@@ -589,7 +697,7 @@ export interface AgentVariationSpec {
|
|
|
589
697
|
* ProgressiveDiscovery is an optional config that, when set, will load a Cadenya provided tool that
|
|
590
698
|
* can search for tools in the assigned tool sets or tools.
|
|
591
699
|
*
|
|
592
|
-
* Note: Sub-agents are always loaded as
|
|
700
|
+
* Note: Sub-agents and agent pools are always loaded as tools regardless of this value.
|
|
593
701
|
*/
|
|
594
702
|
progressiveDiscovery?: AgentVariationSpec_ProgressiveDiscovery;
|
|
595
703
|
/**
|
|
@@ -619,7 +727,7 @@ export interface AgentVariationSpec {
|
|
|
619
727
|
*/
|
|
620
728
|
firstUserMessageTemplate?: string;
|
|
621
729
|
/**
|
|
622
|
-
* Complete set of assigned tools, tool sets,
|
|
730
|
+
* Complete set of assigned tools, tool sets, sub-agents, and agent pools. Order has no
|
|
623
731
|
* meaning. Duplicate (target kind, canonical target ID) pairs are collapsed.
|
|
624
732
|
* On create, omitted or empty means no assignments. On update, selecting
|
|
625
733
|
* spec.assignments in update_mask replaces the entire set; empty clears it.
|
|
@@ -764,6 +872,19 @@ export interface ApproveToolCallRequest {
|
|
|
764
872
|
*/
|
|
765
873
|
toolCallId?: string;
|
|
766
874
|
}
|
|
875
|
+
/**
|
|
876
|
+
* Archive an active or inactive pool, preserving membership and assignments.
|
|
877
|
+
*/
|
|
878
|
+
export interface ArchiveAgentPoolRequest {
|
|
879
|
+
/**
|
|
880
|
+
* Workspace ID.
|
|
881
|
+
*/
|
|
882
|
+
workspaceId?: string;
|
|
883
|
+
/**
|
|
884
|
+
* AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
|
|
885
|
+
*/
|
|
886
|
+
id?: string;
|
|
887
|
+
}
|
|
767
888
|
/**
|
|
768
889
|
* Archive agent request
|
|
769
890
|
*/
|
|
@@ -858,7 +979,7 @@ export interface BedrockConfig {
|
|
|
858
979
|
* CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective
|
|
859
980
|
* might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
|
|
860
981
|
*/
|
|
861
|
-
export type CallableTool = CallableTool_Tool | CallableTool_Agent | CallableTool_CadenyaProvidedTool;
|
|
982
|
+
export type CallableTool = CallableTool_Tool | CallableTool_Agent | CallableTool_CadenyaProvidedTool | CallableTool_AgentPool;
|
|
862
983
|
export interface CancelObjectiveRequest {
|
|
863
984
|
workspaceId?: string;
|
|
864
985
|
/**
|
|
@@ -1129,6 +1250,17 @@ export interface CreateAccountResourceMetadata {
|
|
|
1129
1250
|
*/
|
|
1130
1251
|
labels?: Record<string, string>;
|
|
1131
1252
|
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Create a pool in INACTIVE state. Validate and persist membership atomically.
|
|
1255
|
+
*/
|
|
1256
|
+
export interface CreateAgentPoolRequest {
|
|
1257
|
+
/**
|
|
1258
|
+
* Workspace ID.
|
|
1259
|
+
*/
|
|
1260
|
+
workspaceId?: string;
|
|
1261
|
+
metadata: CreateResourceMetadata;
|
|
1262
|
+
spec: AgentPoolSpec;
|
|
1263
|
+
}
|
|
1132
1264
|
/**
|
|
1133
1265
|
* Create agent request
|
|
1134
1266
|
*/
|
|
@@ -1465,6 +1597,19 @@ export interface CredentialGoogleServiceAccount {
|
|
|
1465
1597
|
export interface CredentialHeaders {
|
|
1466
1598
|
headers?: Record<string, string>;
|
|
1467
1599
|
}
|
|
1600
|
+
/**
|
|
1601
|
+
* Deactivate an active pool.
|
|
1602
|
+
*/
|
|
1603
|
+
export interface DeactivateAgentPoolRequest {
|
|
1604
|
+
/**
|
|
1605
|
+
* Workspace ID.
|
|
1606
|
+
*/
|
|
1607
|
+
workspaceId?: string;
|
|
1608
|
+
/**
|
|
1609
|
+
* AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
|
|
1610
|
+
*/
|
|
1611
|
+
id?: string;
|
|
1612
|
+
}
|
|
1468
1613
|
/**
|
|
1469
1614
|
* Delete tenant widget sessions response.
|
|
1470
1615
|
*/
|
|
@@ -1579,6 +1724,13 @@ export interface ListAgentFeedbackResponse {
|
|
|
1579
1724
|
items: Array<ObjectiveFeedback>;
|
|
1580
1725
|
pagination?: Page;
|
|
1581
1726
|
}
|
|
1727
|
+
/**
|
|
1728
|
+
* List agent pools response
|
|
1729
|
+
*/
|
|
1730
|
+
export interface ListAgentPoolsResponse {
|
|
1731
|
+
items: Array<AgentPool>;
|
|
1732
|
+
pagination?: Page;
|
|
1733
|
+
}
|
|
1582
1734
|
/**
|
|
1583
1735
|
* List agent schedules response.
|
|
1584
1736
|
*/
|
|
@@ -2899,7 +3051,7 @@ export interface Reasoning {
|
|
|
2899
3051
|
* Detach a target by its foreign key. Removing an unassigned target returns
|
|
2900
3052
|
* NotFound. The parent variation must exist and be accessible.
|
|
2901
3053
|
*/
|
|
2902
|
-
export type RemoveAgentVariationAssignmentRequest = RemoveAgentVariationAssignmentRequest_ToolId | RemoveAgentVariationAssignmentRequest_ToolSetId | RemoveAgentVariationAssignmentRequest_SubAgentId;
|
|
3054
|
+
export type RemoveAgentVariationAssignmentRequest = RemoveAgentVariationAssignmentRequest_ToolId | RemoveAgentVariationAssignmentRequest_ToolSetId | RemoveAgentVariationAssignmentRequest_SubAgentId | RemoveAgentVariationAssignmentRequest_AgentPoolId;
|
|
2903
3055
|
/**
|
|
2904
3056
|
* Remove by memory layer ID. An unassigned layer returns NotFound.
|
|
2905
3057
|
* The parent variation must still exist and be accessible.
|
|
@@ -3220,6 +3372,7 @@ export interface SetToolCallContentRequest_ImageBlock {
|
|
|
3220
3372
|
export interface SetToolCallContentRequest_TextBlock {
|
|
3221
3373
|
text: string;
|
|
3222
3374
|
}
|
|
3375
|
+
export type StatusDetails = WidgetSessionErrorInfo | GoogleProtobufAny;
|
|
3223
3376
|
/**
|
|
3224
3377
|
* The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
3225
3378
|
*/
|
|
@@ -3235,7 +3388,7 @@ export interface Status {
|
|
|
3235
3388
|
/**
|
|
3236
3389
|
* A list of messages that carry the error details. There is a common set of message types for APIs to use.
|
|
3237
3390
|
*/
|
|
3238
|
-
details?: Array<
|
|
3391
|
+
details?: Array<StatusDetails>;
|
|
3239
3392
|
}
|
|
3240
3393
|
export interface SubAgentSpawned {
|
|
3241
3394
|
agent: ResourceMetadata;
|
|
@@ -3965,6 +4118,19 @@ export interface ToolSpec {
|
|
|
3965
4118
|
* If the tool is an inline tool, the adapter will be Inline.
|
|
3966
4119
|
*/
|
|
3967
4120
|
export type ToolSpec_Config = ToolSpec_Config_Http | ToolSpec_Config_Mcp | ToolSpec_Config_Openapi | ToolSpec_Config_Bare;
|
|
4121
|
+
/**
|
|
4122
|
+
* Restore an archived pool to INACTIVE; activate it separately to route requests.
|
|
4123
|
+
*/
|
|
4124
|
+
export interface UnarchiveAgentPoolRequest {
|
|
4125
|
+
/**
|
|
4126
|
+
* Workspace ID.
|
|
4127
|
+
*/
|
|
4128
|
+
workspaceId?: string;
|
|
4129
|
+
/**
|
|
4130
|
+
* AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
|
|
4131
|
+
*/
|
|
4132
|
+
id?: string;
|
|
4133
|
+
}
|
|
3968
4134
|
/**
|
|
3969
4135
|
* Unarchive agent request
|
|
3970
4136
|
*/
|
|
@@ -4078,6 +4244,31 @@ export interface UpdateAccountResourceMetadata {
|
|
|
4078
4244
|
*/
|
|
4079
4245
|
labels?: Record<string, string>;
|
|
4080
4246
|
}
|
|
4247
|
+
/**
|
|
4248
|
+
* Update agent pool request
|
|
4249
|
+
*/
|
|
4250
|
+
export interface UpdateAgentPoolRequest {
|
|
4251
|
+
/**
|
|
4252
|
+
* Workspace ID.
|
|
4253
|
+
*/
|
|
4254
|
+
workspaceId?: string;
|
|
4255
|
+
/**
|
|
4256
|
+
* AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
|
|
4257
|
+
*/
|
|
4258
|
+
id?: string;
|
|
4259
|
+
metadata?: UpdateResourceMetadata;
|
|
4260
|
+
spec?: AgentPoolUpdateSpec;
|
|
4261
|
+
/**
|
|
4262
|
+
* Fields to update. Only metadata and spec are mutable; top-level state and info
|
|
4263
|
+
* paths are invalid. spec.assignments replaces the entire membership list.
|
|
4264
|
+
* A spec mask replaces the full spec; * replaces all mutable fields.
|
|
4265
|
+
* Without a mask, infer paths from non-empty fields. Empty or omitted
|
|
4266
|
+
* membership then leaves the existing list unchanged. Element/index paths
|
|
4267
|
+
* are invalid. Validate the merged pool atomically: an empty description
|
|
4268
|
+
* or membership (including an explicitly masked empty list) is invalid.
|
|
4269
|
+
*/
|
|
4270
|
+
updateMask?: string;
|
|
4271
|
+
}
|
|
4081
4272
|
/**
|
|
4082
4273
|
* Update agent request
|
|
4083
4274
|
*/
|
|
@@ -4417,11 +4608,11 @@ export interface UserMessage {
|
|
|
4417
4608
|
content: string;
|
|
4418
4609
|
}
|
|
4419
4610
|
/**
|
|
4420
|
-
* A tool, tool set,
|
|
4611
|
+
* A tool, tool set, sub-agent, or agent pool assigned to a variation, identified only by
|
|
4421
4612
|
* the target resource ID. The same shape is accepted in a spec and returned
|
|
4422
4613
|
* on reads. Assignment junction records are an internal implementation detail.
|
|
4423
4614
|
*/
|
|
4424
|
-
export type VariationAssignment = VariationAssignment_ToolId | VariationAssignment_ToolSetId | VariationAssignment_SubAgentId;
|
|
4615
|
+
export type VariationAssignment = VariationAssignment_ToolId | VariationAssignment_ToolSetId | VariationAssignment_SubAgentId | VariationAssignment_AgentPoolId;
|
|
4425
4616
|
/**
|
|
4426
4617
|
* A whole memory layer in a variation's baseline memory cascade. Identified
|
|
4427
4618
|
* by the memory layer ID; no assignment junction ID is exposed. Entry pinning
|
|
@@ -4550,8 +4741,9 @@ export type WidgetSessionState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_E
|
|
|
4550
4741
|
* a widget, minted server-to-server by the customer's backend. The session
|
|
4551
4742
|
* carries all customer-asserted context — tenant, subject, labels, secrets —
|
|
4552
4743
|
* and every conversation (objective) created through the widget inherits it.
|
|
4553
|
-
* The
|
|
4554
|
-
*
|
|
4744
|
+
* The browser renews short-lived bearer tokens at the widget host with
|
|
4745
|
+
* RenewWidgetSession, authenticated by its existing token. Renewal preserves
|
|
4746
|
+
* this bounded grant and does not extend its hard expiry.
|
|
4555
4747
|
*/
|
|
4556
4748
|
export interface WidgetSession {
|
|
4557
4749
|
metadata: OperationMetadata;
|
|
@@ -4568,6 +4760,44 @@ export interface WidgetSession {
|
|
|
4568
4760
|
* headers server-side — never returned by any API.
|
|
4569
4761
|
*/
|
|
4570
4762
|
secrets: Array<WidgetSession_Secret>;
|
|
4763
|
+
/**
|
|
4764
|
+
* Present only on creation. The same envelope is returned by
|
|
4765
|
+
* RenewWidgetSession on the widget host. Omitted on reads, lists, and revocation.
|
|
4766
|
+
* Existing spec.token/spec.token_expires_at and info.host remain populated
|
|
4767
|
+
* on creation for v1 compatibility and agree with these credentials.
|
|
4768
|
+
*/
|
|
4769
|
+
credentials?: WidgetSessionCredentials;
|
|
4770
|
+
}
|
|
4771
|
+
/**
|
|
4772
|
+
* WidgetSessionCredentials is the only credential envelope the customer's
|
|
4773
|
+
* backend forwards to the browser. Never log or persist its token. Responses
|
|
4774
|
+
* containing credentials use Cache-Control: no-store. Both initial and later
|
|
4775
|
+
* issuance use the same schema; no refresh token or management key is included.
|
|
4776
|
+
*/
|
|
4777
|
+
export interface WidgetSessionCredentials {
|
|
4778
|
+
/**
|
|
4779
|
+
* Canonical wsess_ identifier. Ordinary renewal cannot change the session.
|
|
4780
|
+
*/
|
|
4781
|
+
sessionId: string;
|
|
4782
|
+
/**
|
|
4783
|
+
* Authoritative hostname, without a scheme or path. Use HTTPS with this
|
|
4784
|
+
* host; never construct it or accept a host change during renewal.
|
|
4785
|
+
*/
|
|
4786
|
+
host: string;
|
|
4787
|
+
/**
|
|
4788
|
+
* Short-lived bearer credential for the widget host only.
|
|
4789
|
+
*/
|
|
4790
|
+
token: string;
|
|
4791
|
+
/**
|
|
4792
|
+
* Exact token expiry, at most 15 minutes after issuance and never later
|
|
4793
|
+
* than session_expires_at. Equals JWT exp without the 60-second validation
|
|
4794
|
+
* tolerance added. Renew proactively before this timestamp.
|
|
4795
|
+
*/
|
|
4796
|
+
tokenExpiresAt: string;
|
|
4797
|
+
/**
|
|
4798
|
+
* Immutable hard session expiry. Issuance never extends this deadline.
|
|
4799
|
+
*/
|
|
4800
|
+
sessionExpiresAt: string;
|
|
4571
4801
|
}
|
|
4572
4802
|
/**
|
|
4573
4803
|
* WidgetSessionInfo provides read-only server-derived data about a session.
|
|
@@ -4603,7 +4833,7 @@ export interface WidgetSessionInfo {
|
|
|
4603
4833
|
messageCount: number;
|
|
4604
4834
|
/**
|
|
4605
4835
|
* When the session last created a conversation, sent a message, or
|
|
4606
|
-
*
|
|
4836
|
+
* received a newly issued token.
|
|
4607
4837
|
*/
|
|
4608
4838
|
lastActiveAt?: string;
|
|
4609
4839
|
}
|
|
@@ -4617,18 +4847,19 @@ export interface WidgetSessionSpec {
|
|
|
4617
4847
|
*/
|
|
4618
4848
|
widgetId: string;
|
|
4619
4849
|
/**
|
|
4620
|
-
*
|
|
4621
|
-
*
|
|
4622
|
-
*
|
|
4623
|
-
* host is scoped to this tenant.
|
|
4850
|
+
* Required tenant assertion — the customer's organization identifier.
|
|
4851
|
+
* Upserts the tenant record in the workspace. Every conversation created
|
|
4852
|
+
* through this session inherits the tenant and subject identity.
|
|
4624
4853
|
*/
|
|
4625
|
-
tenant
|
|
4854
|
+
tenant: TenantAssertion;
|
|
4626
4855
|
/**
|
|
4627
|
-
*
|
|
4628
|
-
*
|
|
4629
|
-
*
|
|
4856
|
+
* Required subject assertion — the visitor's ID within the tenant.
|
|
4857
|
+
* Sessions with the same tenant and subject share conversation history on
|
|
4858
|
+
* the same widget and agent, subject to the current session's permissions.
|
|
4859
|
+
* A static ID deliberately shares that history; use a distinct ID per
|
|
4860
|
+
* visitor when their conversations should be separate.
|
|
4630
4861
|
*/
|
|
4631
|
-
subject
|
|
4862
|
+
subject: SubjectAssertion;
|
|
4632
4863
|
/**
|
|
4633
4864
|
* Hard session expiry. Tokens never outlive it; after it passes the session
|
|
4634
4865
|
* transitions to STATE_EXPIRED. Defaults to a server-chosen horizon when
|
|
@@ -4636,14 +4867,14 @@ export interface WidgetSessionSpec {
|
|
|
4636
4867
|
*/
|
|
4637
4868
|
expiresAt?: string;
|
|
4638
4869
|
/**
|
|
4639
|
-
*
|
|
4640
|
-
*
|
|
4641
|
-
*
|
|
4870
|
+
* Legacy creation-only alias of credentials.token; omitted on reads.
|
|
4871
|
+
* Supported throughout v1. New clients should consume credentials.
|
|
4872
|
+
* The browser obtains replacements with RenewWidgetSession at the widget host.
|
|
4642
4873
|
*/
|
|
4643
4874
|
token: string;
|
|
4644
4875
|
/**
|
|
4645
|
-
*
|
|
4646
|
-
* which bounds the session itself.
|
|
4876
|
+
* Legacy creation-only alias of credentials.token_expires_at, supported
|
|
4877
|
+
* throughout v1. Distinct from expires_at, which bounds the session itself.
|
|
4647
4878
|
*/
|
|
4648
4879
|
tokenExpiresAt?: string;
|
|
4649
4880
|
/**
|
|
@@ -4805,6 +5036,13 @@ export interface VariationAssignment_SubAgentId {
|
|
|
4805
5036
|
*/
|
|
4806
5037
|
subAgentId: string;
|
|
4807
5038
|
}
|
|
5039
|
+
export interface VariationAssignment_AgentPoolId {
|
|
5040
|
+
type: 'agentPoolId';
|
|
5041
|
+
/**
|
|
5042
|
+
* Canonical agent pool ID. Attaches the pool as a single callable target.
|
|
5043
|
+
*/
|
|
5044
|
+
agentPoolId: string;
|
|
5045
|
+
}
|
|
4808
5046
|
export interface ObjectiveToolCallResult_ContentBlock_Text {
|
|
4809
5047
|
type: 'text';
|
|
4810
5048
|
text: ObjectiveToolCallResult_TextBlock;
|
|
@@ -5102,6 +5340,13 @@ export interface CallableTool_CadenyaProvidedTool {
|
|
|
5102
5340
|
type: 'cadenyaProvidedTool';
|
|
5103
5341
|
cadenyaProvidedTool: ResourceMetadata;
|
|
5104
5342
|
}
|
|
5343
|
+
export interface CallableTool_AgentPool {
|
|
5344
|
+
type: 'agentPool';
|
|
5345
|
+
/**
|
|
5346
|
+
* Agent pool responsible for routing this call to a member agent.
|
|
5347
|
+
*/
|
|
5348
|
+
agentPool: ResourceMetadata;
|
|
5349
|
+
}
|
|
5105
5350
|
export interface MemoryEntryCreateSpec_Content {
|
|
5106
5351
|
type: 'content';
|
|
5107
5352
|
/**
|
|
@@ -5189,6 +5434,25 @@ export interface AddAgentVariationAssignmentRequest_SubAgentId {
|
|
|
5189
5434
|
*/
|
|
5190
5435
|
variationId?: string;
|
|
5191
5436
|
}
|
|
5437
|
+
export interface AddAgentVariationAssignmentRequest_AgentPoolId {
|
|
5438
|
+
type: 'agentPoolId';
|
|
5439
|
+
/**
|
|
5440
|
+
* Canonical agent pool ID in the variation's workspace.
|
|
5441
|
+
*/
|
|
5442
|
+
agentPoolId: string;
|
|
5443
|
+
/**
|
|
5444
|
+
* Workspace ID.
|
|
5445
|
+
*/
|
|
5446
|
+
workspaceId?: string;
|
|
5447
|
+
/**
|
|
5448
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5449
|
+
*/
|
|
5450
|
+
agentId?: string;
|
|
5451
|
+
/**
|
|
5452
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5453
|
+
*/
|
|
5454
|
+
variationId?: string;
|
|
5455
|
+
}
|
|
5192
5456
|
export interface RemoveAgentVariationAssignmentRequest_ToolId {
|
|
5193
5457
|
type: 'toolId';
|
|
5194
5458
|
toolId: string;
|
|
@@ -5237,6 +5501,25 @@ export interface RemoveAgentVariationAssignmentRequest_SubAgentId {
|
|
|
5237
5501
|
*/
|
|
5238
5502
|
variationId?: string;
|
|
5239
5503
|
}
|
|
5504
|
+
export interface RemoveAgentVariationAssignmentRequest_AgentPoolId {
|
|
5505
|
+
type: 'agentPoolId';
|
|
5506
|
+
/**
|
|
5507
|
+
* Canonical agent pool ID in the variation's workspace.
|
|
5508
|
+
*/
|
|
5509
|
+
agentPoolId: string;
|
|
5510
|
+
/**
|
|
5511
|
+
* Workspace ID.
|
|
5512
|
+
*/
|
|
5513
|
+
workspaceId?: string;
|
|
5514
|
+
/**
|
|
5515
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5516
|
+
*/
|
|
5517
|
+
agentId?: string;
|
|
5518
|
+
/**
|
|
5519
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5520
|
+
*/
|
|
5521
|
+
variationId?: string;
|
|
5522
|
+
}
|
|
5240
5523
|
export interface AIProviderCredential_ApiKey {
|
|
5241
5524
|
type: 'apiKey';
|
|
5242
5525
|
/**
|
|
@@ -5317,6 +5600,23 @@ export interface ModelSpec_Capability_Caching {
|
|
|
5317
5600
|
type: 'caching';
|
|
5318
5601
|
caching: Capability_Caching;
|
|
5319
5602
|
}
|
|
5603
|
+
/**
|
|
5604
|
+
* TOKEN_EXPIRED identifies access-token expiry beyond the 60-second clock-skew tolerance. That token cannot renew; use already-installed newer credentials or require explicit app reauthentication. SESSION_* reasons are terminal. Never infer renewability from HTTP status alone.
|
|
5605
|
+
*/
|
|
5606
|
+
export type WidgetSessionErrorReason = 'TOKEN_EXPIRED' | 'SESSION_REVOKED' | 'SESSION_EXPIRED' | 'SESSION_EXHAUSTED';
|
|
5607
|
+
/**
|
|
5608
|
+
* google.rpc.ErrorInfo detail for widget lifecycle failures. Match both domain and reason; ignore unknown reasons rather than renewing automatically.
|
|
5609
|
+
*/
|
|
5610
|
+
export interface WidgetSessionErrorInfo {
|
|
5611
|
+
'@type': 'type.googleapis.com/google.rpc.ErrorInfo';
|
|
5612
|
+
domain: 'api.cadenya.com';
|
|
5613
|
+
reason: WidgetSessionErrorReason;
|
|
5614
|
+
/**
|
|
5615
|
+
* Optional non-sensitive context. Never contains tokens or secrets.
|
|
5616
|
+
*/
|
|
5617
|
+
metadata?: Record<string, string>;
|
|
5618
|
+
}
|
|
5619
|
+
export type AgentPoolServiceListAgentPoolsState = 'AGENT_POOL_STATE_UNSPECIFIED' | 'AGENT_POOL_STATE_ACTIVE' | 'AGENT_POOL_STATE_INACTIVE' | 'AGENT_POOL_STATE_ARCHIVED';
|
|
5320
5620
|
export type AgentServiceListAgentsState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
|
|
5321
5621
|
export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
|
|
5322
5622
|
export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
|
|
@@ -5350,7 +5650,7 @@ export interface APIKeySpecParam {
|
|
|
5350
5650
|
*/
|
|
5351
5651
|
permissions?: Array<string>;
|
|
5352
5652
|
}
|
|
5353
|
-
export type AddAgentVariationAssignmentRequestParam = AddAgentVariationAssignmentRequest_ToolIdParam | AddAgentVariationAssignmentRequest_ToolSetIdParam | AddAgentVariationAssignmentRequest_SubAgentIdParam;
|
|
5653
|
+
export type AddAgentVariationAssignmentRequestParam = AddAgentVariationAssignmentRequest_ToolIdParam | AddAgentVariationAssignmentRequest_ToolSetIdParam | AddAgentVariationAssignmentRequest_SubAgentIdParam | AddAgentVariationAssignmentRequest_AgentPoolIdParam;
|
|
5354
5654
|
export interface CreateAgentVariationRequestParam {
|
|
5355
5655
|
metadata: CreateResourceMetadata;
|
|
5356
5656
|
spec: AgentVariationSpec;
|
|
@@ -5370,7 +5670,7 @@ export interface ObjectiveEpisodicConfigParam {
|
|
|
5370
5670
|
*/
|
|
5371
5671
|
key: string;
|
|
5372
5672
|
}
|
|
5373
|
-
export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam;
|
|
5673
|
+
export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam | RemoveAgentVariationAssignmentRequest_AgentPoolIdParam;
|
|
5374
5674
|
export interface WidgetSessionSpecParam {
|
|
5375
5675
|
/**
|
|
5376
5676
|
* Widget this session is minted against. Accepts the canonical `wgt_…` form
|
|
@@ -5378,18 +5678,19 @@ export interface WidgetSessionSpecParam {
|
|
|
5378
5678
|
*/
|
|
5379
5679
|
widgetId: string;
|
|
5380
5680
|
/**
|
|
5381
|
-
*
|
|
5382
|
-
*
|
|
5383
|
-
*
|
|
5384
|
-
* host is scoped to this tenant.
|
|
5681
|
+
* Required tenant assertion — the customer's organization identifier.
|
|
5682
|
+
* Upserts the tenant record in the workspace. Every conversation created
|
|
5683
|
+
* through this session inherits the tenant and subject identity.
|
|
5385
5684
|
*/
|
|
5386
|
-
tenant
|
|
5685
|
+
tenant: TenantAssertion;
|
|
5387
5686
|
/**
|
|
5388
|
-
*
|
|
5389
|
-
*
|
|
5390
|
-
*
|
|
5687
|
+
* Required subject assertion — the visitor's ID within the tenant.
|
|
5688
|
+
* Sessions with the same tenant and subject share conversation history on
|
|
5689
|
+
* the same widget and agent, subject to the current session's permissions.
|
|
5690
|
+
* A static ID deliberately shares that history; use a distinct ID per
|
|
5691
|
+
* visitor when their conversations should be separate.
|
|
5391
5692
|
*/
|
|
5392
|
-
subject
|
|
5693
|
+
subject: SubjectAssertion;
|
|
5393
5694
|
/**
|
|
5394
5695
|
* Hard session expiry. Tokens never outlive it; after it passes the session
|
|
5395
5696
|
* transitions to STATE_EXPIRED. Defaults to a server-chosen horizon when
|
|
@@ -5420,6 +5721,13 @@ export interface AddAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
|
5420
5721
|
type: 'subAgentId';
|
|
5421
5722
|
subAgentId: string;
|
|
5422
5723
|
}
|
|
5724
|
+
export interface AddAgentVariationAssignmentRequest_AgentPoolIdParam {
|
|
5725
|
+
type: 'agentPoolId';
|
|
5726
|
+
/**
|
|
5727
|
+
* Canonical agent pool ID in the variation's workspace.
|
|
5728
|
+
*/
|
|
5729
|
+
agentPoolId: string;
|
|
5730
|
+
}
|
|
5423
5731
|
export interface RemoveAgentVariationAssignmentRequest_ToolIdParam {
|
|
5424
5732
|
type: 'toolId';
|
|
5425
5733
|
toolId: string;
|
|
@@ -5432,6 +5740,13 @@ export interface RemoveAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
|
5432
5740
|
type: 'subAgentId';
|
|
5433
5741
|
subAgentId: string;
|
|
5434
5742
|
}
|
|
5743
|
+
export interface RemoveAgentVariationAssignmentRequest_AgentPoolIdParam {
|
|
5744
|
+
type: 'agentPoolId';
|
|
5745
|
+
/**
|
|
5746
|
+
* Canonical agent pool ID in the variation's workspace.
|
|
5747
|
+
*/
|
|
5748
|
+
agentPoolId: string;
|
|
5749
|
+
}
|
|
5435
5750
|
export declare function wireArray<T>(value: Array<T> | null | undefined, fn: (v: T) => unknown): unknown;
|
|
5436
5751
|
export declare function wireMap<T>(value: Record<string, T> | null | undefined, fn: (v: T) => unknown): unknown;
|
|
5437
5752
|
export declare function wireAPIKeySpec(value: APIKeySpecParam | null | undefined): unknown;
|
|
@@ -5444,7 +5759,9 @@ export declare function wireWidgetSessionSpec(value: WidgetSessionSpecParam | nu
|
|
|
5444
5759
|
export declare function wireAddAgentVariationAssignmentRequest_ToolId(value: AddAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
|
|
5445
5760
|
export declare function wireAddAgentVariationAssignmentRequest_ToolSetId(value: AddAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
|
|
5446
5761
|
export declare function wireAddAgentVariationAssignmentRequest_SubAgentId(value: AddAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
|
|
5762
|
+
export declare function wireAddAgentVariationAssignmentRequest_AgentPoolId(value: AddAgentVariationAssignmentRequest_AgentPoolIdParam | null | undefined): unknown;
|
|
5447
5763
|
export declare function wireRemoveAgentVariationAssignmentRequest_ToolId(value: RemoveAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
|
|
5448
5764
|
export declare function wireRemoveAgentVariationAssignmentRequest_ToolSetId(value: RemoveAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
|
|
5449
5765
|
export declare function wireRemoveAgentVariationAssignmentRequest_SubAgentId(value: RemoveAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
|
|
5766
|
+
export declare function wireRemoveAgentVariationAssignmentRequest_AgentPoolId(value: RemoveAgentVariationAssignmentRequest_AgentPoolIdParam | null | undefined): unknown;
|
|
5450
5767
|
//# sourceMappingURL=types.d.ts.map
|