@cadenya/cadenya 1.0.1 → 1.1.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 +39 -39
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +4 -4
- package/dist/client.js.map +1 -1
- package/dist/core/http.d.ts +6 -1
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +33 -6
- package/dist/core/http.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/agents.d.ts +1 -1
- package/dist/resources/agents.js +1 -1
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/ai-provider-keys.d.ts +11 -1
- package/dist/resources/ai-provider-keys.d.ts.map +1 -1
- package/dist/resources/ai-provider-keys.js +2 -2
- package/dist/resources/ai-provider-keys.js.map +1 -1
- package/dist/resources/memory-layers.d.ts +1 -1
- package/dist/resources/memory-layers.js +1 -1
- package/dist/resources/memory-layers.js.map +1 -1
- package/dist/resources/models.d.ts +51 -1
- package/dist/resources/models.d.ts.map +1 -1
- package/dist/resources/models.js +32 -0
- package/dist/resources/models.js.map +1 -1
- package/dist/resources/objectives.d.ts +8 -50
- package/dist/resources/objectives.d.ts.map +1 -1
- package/dist/resources/objectives.js +1 -36
- package/dist/resources/objectives.js.map +1 -1
- package/dist/resources/tool-search.d.ts +1 -3
- package/dist/resources/tool-search.d.ts.map +1 -1
- package/dist/resources/tool-search.js.map +1 -1
- package/dist/resources/tools.d.ts +9 -1
- package/dist/resources/tools.d.ts.map +1 -1
- package/dist/resources/tools.js +2 -2
- package/dist/resources/tools.js.map +1 -1
- package/dist/types.d.ts +712 -74
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +13 -4
- package/src/client.ts +4 -4
- package/src/core/http.ts +45 -6
- package/src/index.ts +1 -1
- package/src/resources/agents.ts +1 -1
- package/src/resources/ai-provider-keys.ts +13 -3
- package/src/resources/memory-layers.ts +1 -1
- package/src/resources/models.ts +67 -1
- package/src/resources/objectives.ts +8 -66
- package/src/resources/tool-search.ts +1 -3
- package/src/resources/tools.ts +10 -2
- package/src/types.ts +762 -77
package/src/types.ts
CHANGED
|
@@ -10,16 +10,52 @@
|
|
|
10
10
|
export type AIProviderConfig =
|
|
11
11
|
| AIProviderConfig_Openrouter
|
|
12
12
|
| AIProviderConfig_Openai
|
|
13
|
-
| AIProviderConfig_OpenaiCompatible
|
|
13
|
+
| AIProviderConfig_OpenaiCompatible
|
|
14
|
+
| AIProviderConfig_Vertex
|
|
15
|
+
| AIProviderConfig_Bedrock;
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* AIProviderCredential is the secret material used to authenticate with a
|
|
17
19
|
* provider. The set case must correspond to AIProviderKeySpec.provider. The
|
|
18
|
-
* server encrypts
|
|
20
|
+
* server classifies and encrypts sensitive fields at rest and never returns
|
|
21
|
+
* secret values on reads.
|
|
19
22
|
*/
|
|
20
23
|
export type AIProviderCredential =
|
|
21
24
|
| AIProviderCredential_ApiKey
|
|
22
|
-
| AIProviderCredential_Headers
|
|
25
|
+
| AIProviderCredential_Headers
|
|
26
|
+
| AIProviderCredential_GoogleServiceAccount
|
|
27
|
+
| AIProviderCredential_AwsAccessKey;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* AIProviderCredentialFieldStatus is the safe read representation of one
|
|
31
|
+
* credential field. Value is populated only when sensitive is false.
|
|
32
|
+
*/
|
|
33
|
+
export interface AIProviderCredentialFieldStatus {
|
|
34
|
+
name?: string;
|
|
35
|
+
sensitive?: boolean;
|
|
36
|
+
configured?: boolean;
|
|
37
|
+
value?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* AIProviderCredentialPatch changes selected fields of the current credential.
|
|
42
|
+
* Omitted values are retained and clear_fields explicitly removes optional
|
|
43
|
+
* fields. Changing type replaces the credential and requires all mandatory
|
|
44
|
+
* fields for the new type.
|
|
45
|
+
*/
|
|
46
|
+
export interface AIProviderCredentialPatch {
|
|
47
|
+
credentials?: AIProviderCredential;
|
|
48
|
+
clearFields?: Array<string>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* AIProviderCredentialStatus describes the stored authentication method and
|
|
53
|
+
* its fields without returning secret material.
|
|
54
|
+
*/
|
|
55
|
+
export interface AIProviderCredentialStatus {
|
|
56
|
+
type?: string;
|
|
57
|
+
fields?: Array<AIProviderCredentialFieldStatus>;
|
|
58
|
+
}
|
|
23
59
|
|
|
24
60
|
/**
|
|
25
61
|
* AIProviderKey is a credential for an AI provider, scoped to a workspace.
|
|
@@ -38,6 +74,11 @@ export interface AIProviderKey {
|
|
|
38
74
|
info?: AIProviderKeyInfo;
|
|
39
75
|
}
|
|
40
76
|
|
|
77
|
+
/**
|
|
78
|
+
* How models on this key are maintained; see ModelManagement.
|
|
79
|
+
*/
|
|
80
|
+
export type AiProviderKeyInfoModelManagement = 'MODEL_MANAGEMENT_UNSPECIFIED' | 'MODEL_MANAGEMENT_CADENYA' | 'MODEL_MANAGEMENT_SYNCED' | 'MODEL_MANAGEMENT_CUSTOMIZABLE' | 'MODEL_MANAGEMENT_MANUAL';
|
|
81
|
+
|
|
41
82
|
/**
|
|
42
83
|
* AIProviderKeyInfo carries server-derived, read-only details about a key, for
|
|
43
84
|
* AI provider management UIs.
|
|
@@ -56,12 +97,21 @@ export interface AIProviderKeyInfo {
|
|
|
56
97
|
* These are not added or maintained by account administrators.
|
|
57
98
|
*/
|
|
58
99
|
isPromotional: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Safe-to-display credential state. Secret values are never populated;
|
|
102
|
+
* configured reports whether a value is present without revealing it.
|
|
103
|
+
*/
|
|
104
|
+
credentialStatus?: AIProviderCredentialStatus;
|
|
105
|
+
/**
|
|
106
|
+
* How models on this key are maintained; see ModelManagement.
|
|
107
|
+
*/
|
|
108
|
+
modelManagement: AiProviderKeyInfoModelManagement;
|
|
59
109
|
}
|
|
60
110
|
|
|
61
111
|
/**
|
|
62
112
|
* The AI provider this key authenticates against.
|
|
63
113
|
*/
|
|
64
|
-
export type AiProviderKeySpecProvider = 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE';
|
|
114
|
+
export type AiProviderKeySpecProvider = 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE' | 'AI_PROVIDER_VERTEX' | 'AI_PROVIDER_BEDROCK';
|
|
65
115
|
|
|
66
116
|
export interface AIProviderKeySpec {
|
|
67
117
|
/**
|
|
@@ -75,8 +125,9 @@ export interface AIProviderKeySpec {
|
|
|
75
125
|
credentials?: AIProviderCredential;
|
|
76
126
|
/**
|
|
77
127
|
* Non-secret, provider-specific settings (OpenAI org/project, OpenRouter
|
|
78
|
-
* region, OpenAI-compatible base URL
|
|
79
|
-
*
|
|
128
|
+
* region, OpenAI-compatible base URL, Vertex project/location, or Bedrock
|
|
129
|
+
* Region). The set case must correspond to `provider`. Returned on reads.
|
|
130
|
+
* Optional for providers that have usable defaults.
|
|
80
131
|
*/
|
|
81
132
|
config?: AIProviderConfig;
|
|
82
133
|
}
|
|
@@ -442,7 +493,7 @@ export interface AgentScheduleSpec_Schedule {
|
|
|
442
493
|
|
|
443
494
|
/**
|
|
444
495
|
* Controls how variations are automatically selected when creating objectives
|
|
445
|
-
* Defaults to
|
|
496
|
+
* Defaults to WEIGHTED when unspecified
|
|
446
497
|
*/
|
|
447
498
|
export type AgentSpecVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
|
|
448
499
|
|
|
@@ -460,9 +511,9 @@ export interface AgentSpec {
|
|
|
460
511
|
webhookEventsUrl?: string;
|
|
461
512
|
/**
|
|
462
513
|
* Controls how variations are automatically selected when creating objectives
|
|
463
|
-
* Defaults to
|
|
514
|
+
* Defaults to WEIGHTED when unspecified
|
|
464
515
|
*/
|
|
465
|
-
variationSelectionMode
|
|
516
|
+
variationSelectionMode?: AgentSpecVariationSelectionMode;
|
|
466
517
|
/**
|
|
467
518
|
* SystemPromptDataSchema enforces the shape of system_prompt_data when objectives are created. This is valuable when using liquid formatting in agent
|
|
468
519
|
* variation system prompt templates. The schema is also used when the agent is attached as a sub-agent, as it becomes the tool's input parameter schema.
|
|
@@ -637,10 +688,8 @@ export interface AgentVariationSpec_Constraints {
|
|
|
637
688
|
* When not set, objectives are still swept at the system-wide 24 hour
|
|
638
689
|
* maximum — every objective eventually reaches a terminal state.
|
|
639
690
|
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
* Durations — a "<seconds>s" string — so the SDKs must type this as a
|
|
643
|
-
* string (like AgentScheduleSpec.every), not an integer.
|
|
691
|
+
* SDKs represent this as a duration string, like AgentScheduleSpec.every,
|
|
692
|
+
* rather than an integer.
|
|
644
693
|
*/
|
|
645
694
|
inactivityTimeout?: string;
|
|
646
695
|
}
|
|
@@ -658,7 +707,7 @@ export type AgentVariationSpecModelConfigReasoningEffort = 'REASONING_EFFORT_UNS
|
|
|
658
707
|
*/
|
|
659
708
|
export interface AgentVariationSpec_ModelConfig {
|
|
660
709
|
/**
|
|
661
|
-
* The model identifier
|
|
710
|
+
* The model identifier for the agent variation to use. Should be either the reference key (ai-provider.model-name) or the canonical model ID (e.g.: "model_ABC123")
|
|
662
711
|
*/
|
|
663
712
|
modelId: string;
|
|
664
713
|
/**
|
|
@@ -825,11 +874,18 @@ export interface BareMetadata {
|
|
|
825
874
|
/**
|
|
826
875
|
* Human-readable name of the referenced resource, populated by the server
|
|
827
876
|
* on reads for convenience. Absent on references to resources that do not
|
|
828
|
-
* have a name
|
|
877
|
+
* have a name.
|
|
829
878
|
*/
|
|
830
879
|
name?: string;
|
|
831
880
|
}
|
|
832
881
|
|
|
882
|
+
/**
|
|
883
|
+
* BedrockConfig selects the AWS source Region used for Bedrock Runtime calls.
|
|
884
|
+
*/
|
|
885
|
+
export interface BedrockConfig {
|
|
886
|
+
region?: string;
|
|
887
|
+
}
|
|
888
|
+
|
|
833
889
|
/**
|
|
834
890
|
* 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
|
|
835
891
|
* might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
|
|
@@ -1197,6 +1253,26 @@ export interface CreateMemoryLayerRequest {
|
|
|
1197
1253
|
spec: MemoryLayerSpec;
|
|
1198
1254
|
}
|
|
1199
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* Create model request. The model is created on the given AI provider key with
|
|
1258
|
+
* PROVENANCE_MANUALLY_ENTERED and STATE_ENABLED. The key must be customer
|
|
1259
|
+
* provided and its provider must accept manual definitions (see
|
|
1260
|
+
* AIProviderKeyInfo.model_management).
|
|
1261
|
+
*/
|
|
1262
|
+
export interface CreateModelRequest {
|
|
1263
|
+
/**
|
|
1264
|
+
* Workspace ID.
|
|
1265
|
+
*/
|
|
1266
|
+
workspaceId?: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* The AI provider key the model routes through. Accepts the canonical
|
|
1269
|
+
* `aipk_…` form or the `external_id:<value>` form.
|
|
1270
|
+
*/
|
|
1271
|
+
aiProviderKeyId?: string;
|
|
1272
|
+
metadata: CreateResourceMetadata;
|
|
1273
|
+
spec: ModelSpec;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1200
1276
|
/**
|
|
1201
1277
|
* Request to submit feedback for an objective
|
|
1202
1278
|
*/
|
|
@@ -1278,9 +1354,12 @@ export interface CreateObjectiveRequest {
|
|
|
1278
1354
|
subject?: SubjectAssertion;
|
|
1279
1355
|
/**
|
|
1280
1356
|
* Parameters forced onto this objective's tool calls. A pinned parameter
|
|
1281
|
-
* is
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1357
|
+
* is removed from the tool schema the LLM sees, and its value is always
|
|
1358
|
+
* overwritten server-side with the pinned value — the model cannot choose
|
|
1359
|
+
* a different value for it. By default a pinned key applies to every tool
|
|
1360
|
+
* with a top-level parameter of the same name; a tool set's overlays
|
|
1361
|
+
* (ToolSetSpec.overlays) can bind pinned keys to nested paths, differently
|
|
1362
|
+
* named parameters, or a subset of tools.
|
|
1284
1363
|
*/
|
|
1285
1364
|
pinnedParameters?: Record<string, string>;
|
|
1286
1365
|
}
|
|
@@ -1442,6 +1521,24 @@ export interface CredentialAPIKey {
|
|
|
1442
1521
|
apiKey?: string;
|
|
1443
1522
|
}
|
|
1444
1523
|
|
|
1524
|
+
/**
|
|
1525
|
+
* CredentialAWSAccessKey carries AWS SigV4 credentials. Optional presence is
|
|
1526
|
+
* used by credential patches so omitted values remain unchanged.
|
|
1527
|
+
*/
|
|
1528
|
+
export interface CredentialAWSAccessKey {
|
|
1529
|
+
accessKeyId?: string;
|
|
1530
|
+
secretAccessKey?: string;
|
|
1531
|
+
sessionToken?: string;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* CredentialGoogleServiceAccount carries an in-memory Google service-account
|
|
1536
|
+
* credential document.
|
|
1537
|
+
*/
|
|
1538
|
+
export interface CredentialGoogleServiceAccount {
|
|
1539
|
+
json?: string;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1445
1542
|
/**
|
|
1446
1543
|
* CredentialHeaders carries arbitrary HTTP headers sent with every request to
|
|
1447
1544
|
* the provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
@@ -1532,7 +1629,7 @@ export interface EnableModelRequest {
|
|
|
1532
1629
|
|
|
1533
1630
|
export interface GetObjectiveDiagnosticsResponse {
|
|
1534
1631
|
/**
|
|
1535
|
-
*
|
|
1632
|
+
* Context usage from the objective's most recent iteration.
|
|
1536
1633
|
*/
|
|
1537
1634
|
diagnostics: ObjectiveDiagnostics;
|
|
1538
1635
|
}
|
|
@@ -1645,11 +1742,6 @@ export interface ListObjectiveFeedbackResponse {
|
|
|
1645
1742
|
pagination?: Page;
|
|
1646
1743
|
}
|
|
1647
1744
|
|
|
1648
|
-
export interface ListObjectiveTasksResponse {
|
|
1649
|
-
items: Array<ObjectiveTask>;
|
|
1650
|
-
pagination?: Page;
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
1745
|
export interface ListObjectiveToolCallsResponse {
|
|
1654
1746
|
items: Array<ObjectiveToolCall>;
|
|
1655
1747
|
pagination?: Page;
|
|
@@ -1993,6 +2085,13 @@ export interface MemoryReference {
|
|
|
1993
2085
|
*/
|
|
1994
2086
|
export type ModelState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
|
|
1995
2087
|
|
|
2088
|
+
/**
|
|
2089
|
+
* Where this definition came from. Output only; set at creation. Synced
|
|
2090
|
+
* models reject edits to metadata.name and spec, manually entered models
|
|
2091
|
+
* accept them.
|
|
2092
|
+
*/
|
|
2093
|
+
export type ModelProvenance = 'PROVENANCE_UNSPECIFIED' | 'PROVENANCE_SYNCED_FROM_PROVIDER' | 'PROVENANCE_MANUALLY_ENTERED';
|
|
2094
|
+
|
|
1996
2095
|
export interface Model {
|
|
1997
2096
|
/**
|
|
1998
2097
|
* Resource metadata
|
|
@@ -2012,6 +2111,40 @@ export interface Model {
|
|
|
2012
2111
|
* :enable and :disable actions to transition.
|
|
2013
2112
|
*/
|
|
2014
2113
|
state: ModelState;
|
|
2114
|
+
/**
|
|
2115
|
+
* Where this definition came from. Output only; set at creation. Synced
|
|
2116
|
+
* models reject edits to metadata.name and spec, manually entered models
|
|
2117
|
+
* accept them.
|
|
2118
|
+
*/
|
|
2119
|
+
provenance: ModelProvenance;
|
|
2120
|
+
/**
|
|
2121
|
+
* Customer price overrides. Output only here; set through UpdateModel with
|
|
2122
|
+
* pricing_override.* mask paths. When an override is present, spec's price
|
|
2123
|
+
* fields already reflect it (they are the effective prices).
|
|
2124
|
+
*/
|
|
2125
|
+
pricingOverride?: ModelPricingOverride;
|
|
2126
|
+
/**
|
|
2127
|
+
* The rates before any customer override: the catalog rate for a synced
|
|
2128
|
+
* model, the entered rate for a manually entered one. Output only. When a
|
|
2129
|
+
* side matches the spec price, an override may still be present; inspect
|
|
2130
|
+
* pricing_override field presence to determine whether an override is set.
|
|
2131
|
+
*/
|
|
2132
|
+
basePricing: ModelBasePricing;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* ModelBasePricing is a model's default rates in cents per million tokens,
|
|
2137
|
+
* unaffected by pricing overrides. Zero means the rate is not known.
|
|
2138
|
+
*/
|
|
2139
|
+
export interface ModelBasePricing {
|
|
2140
|
+
/**
|
|
2141
|
+
* Default input token rate, in cents per million tokens.
|
|
2142
|
+
*/
|
|
2143
|
+
inputPricePerMillionTokens: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* Default output token rate, in cents per million tokens.
|
|
2146
|
+
*/
|
|
2147
|
+
outputPricePerMillionTokens: string;
|
|
2015
2148
|
}
|
|
2016
2149
|
|
|
2017
2150
|
/**
|
|
@@ -2036,6 +2169,22 @@ export interface ModelInfo {
|
|
|
2036
2169
|
lastUsedAt?: string;
|
|
2037
2170
|
}
|
|
2038
2171
|
|
|
2172
|
+
/**
|
|
2173
|
+
* ModelPricingOverride replaces the catalog prices for a model. Each field is
|
|
2174
|
+
* independent: an absent field keeps the catalog price, a present field (zero
|
|
2175
|
+
* included) replaces it. Prices are cents per million tokens.
|
|
2176
|
+
*/
|
|
2177
|
+
export interface ModelPricingOverride {
|
|
2178
|
+
/**
|
|
2179
|
+
* Override for input token price, in cents per million tokens.
|
|
2180
|
+
*/
|
|
2181
|
+
inputPricePerMillionTokens?: string;
|
|
2182
|
+
/**
|
|
2183
|
+
* Override for output token price, in cents per million tokens.
|
|
2184
|
+
*/
|
|
2185
|
+
outputPricePerMillionTokens?: string;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2039
2188
|
export interface ModelSpec {
|
|
2040
2189
|
/**
|
|
2041
2190
|
* The model provider (e.g., "anthropic", "openai", "google")
|
|
@@ -2054,11 +2203,16 @@ export interface ModelSpec {
|
|
|
2054
2203
|
*/
|
|
2055
2204
|
maxOutputTokens: number;
|
|
2056
2205
|
/**
|
|
2057
|
-
* Cost per million input tokens in cents (e.g., 300 = $3.00)
|
|
2206
|
+
* Cost per million input tokens in cents (e.g., 300 = $3.00). On reads this
|
|
2207
|
+
* is the effective price: the catalog price unless
|
|
2208
|
+
* Model.pricing_override replaces it. Writes only apply to manually
|
|
2209
|
+
* entered models; use UpdateModel's pricing_override paths to override a
|
|
2210
|
+
* synced model's price.
|
|
2058
2211
|
*/
|
|
2059
2212
|
inputPricePerMillionTokens: string;
|
|
2060
2213
|
/**
|
|
2061
|
-
* Cost per million output tokens in cents (e.g., 1500 = $15.00)
|
|
2214
|
+
* Cost per million output tokens in cents (e.g., 1500 = $15.00). Effective
|
|
2215
|
+
* price on reads, see input_price_per_million_tokens.
|
|
2062
2216
|
*/
|
|
2063
2217
|
outputPricePerMillionTokens: string;
|
|
2064
2218
|
/**
|
|
@@ -2067,6 +2221,15 @@ export interface ModelSpec {
|
|
|
2067
2221
|
* (and its mode) lives here too, as the "reasoning" capability.
|
|
2068
2222
|
*/
|
|
2069
2223
|
capabilities: Array<ModelSpec_Capability>;
|
|
2224
|
+
/**
|
|
2225
|
+
* The identifier the provider expects in inference requests, exactly as the
|
|
2226
|
+
* provider spells it: an OpenAI model name, a Vertex publisher model
|
|
2227
|
+
* resource, a Bedrock inference-profile ID or ARN, or an OpenAI-compatible
|
|
2228
|
+
* endpoint's model ID. Distinct from metadata.external_id, which is
|
|
2229
|
+
* Cadenya's slug. Verified with a minimal provider completion on creation
|
|
2230
|
+
* and whenever the identifier changes.
|
|
2231
|
+
*/
|
|
2232
|
+
providerModelId: string;
|
|
2070
2233
|
}
|
|
2071
2234
|
|
|
2072
2235
|
/**
|
|
@@ -2086,7 +2249,7 @@ export type ModelSpec_Capability =
|
|
|
2086
2249
|
export type NoticeLevel = 'LEVEL_UNSPECIFIED' | 'LEVEL_INFO' | 'LEVEL_WARN';
|
|
2087
2250
|
|
|
2088
2251
|
/**
|
|
2089
|
-
* Notice is a non-terminal
|
|
2252
|
+
* Notice is a non-terminal event emitted by the runtime when something
|
|
2090
2253
|
* noteworthy but non-fatal happens during an objective — for example a
|
|
2091
2254
|
* just-in-time tool set failing to load, or a previously loaded tool being
|
|
2092
2255
|
* dropped because it was archived. Notices carry no structured payload; they
|
|
@@ -2259,10 +2422,10 @@ export interface ObjectiveContextWindowInfo {
|
|
|
2259
2422
|
}
|
|
2260
2423
|
|
|
2261
2424
|
/**
|
|
2262
|
-
*
|
|
2263
|
-
*
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2425
|
+
* Context-usage breakdown measured for a single iteration at request-assembly
|
|
2426
|
+
* time. It reports how much of the context window each component occupies so
|
|
2427
|
+
* tool parameters, memory cascades, and prompts can be tuned against real
|
|
2428
|
+
* token usage.
|
|
2266
2429
|
*/
|
|
2267
2430
|
export interface ObjectiveDiagnostics {
|
|
2268
2431
|
/**
|
|
@@ -2465,34 +2628,6 @@ export interface ObjectiveInfo {
|
|
|
2465
2628
|
widget?: BareMetadata;
|
|
2466
2629
|
}
|
|
2467
2630
|
|
|
2468
|
-
/**
|
|
2469
|
-
* ObjectiveTask represents a task within an objective, typically created and managed by an AI agent
|
|
2470
|
-
* to track progress toward completing the objective.
|
|
2471
|
-
*/
|
|
2472
|
-
export interface ObjectiveTask {
|
|
2473
|
-
metadata: BareMetadata;
|
|
2474
|
-
data: ObjectiveTaskData;
|
|
2475
|
-
}
|
|
2476
|
-
|
|
2477
|
-
export interface ObjectiveTaskData {
|
|
2478
|
-
/**
|
|
2479
|
-
* The sequential number of this task within the objective (auto-assigned, 1-based)
|
|
2480
|
-
*/
|
|
2481
|
-
number: number;
|
|
2482
|
-
/**
|
|
2483
|
-
* Description of the task to be completed
|
|
2484
|
-
*/
|
|
2485
|
-
task: string;
|
|
2486
|
-
/**
|
|
2487
|
-
* Whether the task has been completed
|
|
2488
|
-
*/
|
|
2489
|
-
completed: boolean;
|
|
2490
|
-
/**
|
|
2491
|
-
* Timestamp when the task was marked as completed
|
|
2492
|
-
*/
|
|
2493
|
-
completedAt?: string;
|
|
2494
|
-
}
|
|
2495
|
-
|
|
2496
2631
|
/**
|
|
2497
2632
|
* ObjectiveTimedOut is the terminal event written when an objective is
|
|
2498
2633
|
* finalized by the inactivity sweep because it saw no activity (no user
|
|
@@ -2580,6 +2715,12 @@ export interface ObjectiveToolCallInfo {
|
|
|
2580
2715
|
* short-lived signed URLs rather than inline bytes.
|
|
2581
2716
|
*/
|
|
2582
2717
|
export interface ObjectiveToolCallResult {
|
|
2718
|
+
/**
|
|
2719
|
+
* The result content as recorded — which is what the model was shown.
|
|
2720
|
+
* When a tool set overlay transformed the result (ToolOverlay
|
|
2721
|
+
* result_actions), this is the transformed content; the adapter's raw
|
|
2722
|
+
* response is kept in the tool call's debug log, not here.
|
|
2723
|
+
*/
|
|
2583
2724
|
content: Array<ObjectiveToolCallResult_ContentBlock>;
|
|
2584
2725
|
}
|
|
2585
2726
|
|
|
@@ -2632,6 +2773,11 @@ export interface ObjectiveToolCallResult_ImageBlock {
|
|
|
2632
2773
|
|
|
2633
2774
|
export interface ObjectiveToolCallResult_TextBlock {
|
|
2634
2775
|
text: string;
|
|
2776
|
+
/**
|
|
2777
|
+
* Size of the stored text in bytes. Filled by the server at record time;
|
|
2778
|
+
* zero on results recorded before this field existed.
|
|
2779
|
+
*/
|
|
2780
|
+
sizeBytes?: string;
|
|
2635
2781
|
}
|
|
2636
2782
|
|
|
2637
2783
|
/**
|
|
@@ -2770,6 +2916,82 @@ export interface Page {
|
|
|
2770
2916
|
nextCursor: string;
|
|
2771
2917
|
}
|
|
2772
2918
|
|
|
2919
|
+
/**
|
|
2920
|
+
* Default: ON_MISSING_FAIL.
|
|
2921
|
+
*/
|
|
2922
|
+
export type ParameterActionPinOnMissing = 'ON_MISSING_UNSPECIFIED' | 'ON_MISSING_FAIL' | 'ON_MISSING_SKIP';
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Bind the parameter to one of the objective's pinned parameters. It is
|
|
2926
|
+
* deleted from the schema (including any `required` entry), and on every
|
|
2927
|
+
* call the pinned value is written into the arguments, overwriting
|
|
2928
|
+
* anything the model supplied.
|
|
2929
|
+
* This is the authoritative-value action: the model never sees the
|
|
2930
|
+
* parameter and cannot influence it.
|
|
2931
|
+
*
|
|
2932
|
+
* `pin` differs from `set` with `{{ pinned_parameters.key }}` only in
|
|
2933
|
+
* how a missing key is handled (see `on_missing`) and in intent —
|
|
2934
|
+
* reading the tool set config, `pin` says "this comes from the caller".
|
|
2935
|
+
*/
|
|
2936
|
+
export interface ParameterAction_Pin {
|
|
2937
|
+
path: string;
|
|
2938
|
+
/**
|
|
2939
|
+
* Key into the objective's pinned_parameters map. Need not equal the
|
|
2940
|
+
* last segment of `path` — this is how a pinned `orgId` reaches a
|
|
2941
|
+
* tool whose parameter is named `organizationId`.
|
|
2942
|
+
*/
|
|
2943
|
+
pinnedParameter: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* Default: ON_MISSING_FAIL.
|
|
2946
|
+
*/
|
|
2947
|
+
onMissing: ParameterActionPinOnMissing;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Remove the parameter entirely. It is deleted from the schema
|
|
2952
|
+
* (including any `required` entry) and stripped from the arguments if
|
|
2953
|
+
* the model supplies it anyway. The tool receives no value for it — the
|
|
2954
|
+
* upstream default, if any, applies. Use this to save context on
|
|
2955
|
+
* parameters the model has no business setting (pagination cursors,
|
|
2956
|
+
* expansion flags, debug toggles).
|
|
2957
|
+
*/
|
|
2958
|
+
export interface ParameterAction_Remove {
|
|
2959
|
+
path: string;
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
/**
|
|
2963
|
+
* Force the parameter to a value. It is deleted from the schema
|
|
2964
|
+
* (including any `required` entry), and on every call the rendered
|
|
2965
|
+
* value is written into the arguments, overwriting anything the model
|
|
2966
|
+
* supplied.
|
|
2967
|
+
*
|
|
2968
|
+
* `value_template` is a Liquid template rendered against the objective:
|
|
2969
|
+
*
|
|
2970
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
2971
|
+
* {{ objective.id }} the objective's id
|
|
2972
|
+
* {{ objective.external_id }} the objective's external id
|
|
2973
|
+
* {{ objective.labels.<key> }} the objective's labels
|
|
2974
|
+
*
|
|
2975
|
+
* Templates render with strict variables: referencing a pinned
|
|
2976
|
+
* parameter or label that does not exist fails the call rather than
|
|
2977
|
+
* rendering an empty value.
|
|
2978
|
+
*
|
|
2979
|
+
* Tool set secrets are intentionally not exposed here: overlay-set
|
|
2980
|
+
* values are recorded as tool call arguments in events and tool call
|
|
2981
|
+
* history, and would leak. Use adapter headers for credentials.
|
|
2982
|
+
*
|
|
2983
|
+
* The rendered string is coerced to the parameter's declared schema
|
|
2984
|
+
* type: for a non-string parameter (integer, number, boolean, object,
|
|
2985
|
+
* array) the output is parsed as JSON. A value that fails to parse
|
|
2986
|
+
* errors the tool call. Prefer `pin` when the value is simply a pinned
|
|
2987
|
+
* parameter — it fails loudly when the key is absent instead of
|
|
2988
|
+
* rendering an empty string.
|
|
2989
|
+
*/
|
|
2990
|
+
export interface ParameterAction_Set {
|
|
2991
|
+
path: string;
|
|
2992
|
+
valueTemplate: string;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2773
2995
|
/**
|
|
2774
2996
|
* Pause agent schedule request.
|
|
2775
2997
|
*/
|
|
@@ -2934,6 +3156,67 @@ export interface RestoreToolRequest {
|
|
|
2934
3156
|
id?: string;
|
|
2935
3157
|
}
|
|
2936
3158
|
|
|
3159
|
+
/**
|
|
3160
|
+
* Default: ON_ERROR_RAW_CONTENT.
|
|
3161
|
+
*/
|
|
3162
|
+
export type ResultActionTransformOnError = 'ON_ERROR_UNSPECIFIED' | 'ON_ERROR_RAW_CONTENT' | 'ON_ERROR_FAIL';
|
|
3163
|
+
|
|
3164
|
+
/**
|
|
3165
|
+
* Replace the result's text content with a rendered Liquid template.
|
|
3166
|
+
* Used to compact verbose responses to the fields the model actually
|
|
3167
|
+
* needs, or to rewrite a JSON response into a smaller JSON document.
|
|
3168
|
+
*
|
|
3169
|
+
* `content_template` is rendered against the call:
|
|
3170
|
+
*
|
|
3171
|
+
* {{ result.text }} the result's text content (text blocks
|
|
3172
|
+
* joined with newlines)
|
|
3173
|
+
* {{ result.json }} result.text parsed as JSON — objects and
|
|
3174
|
+
* arrays are navigable (`result.json.items`,
|
|
3175
|
+
* `| map: "id"`); absent when the text is not
|
|
3176
|
+
* valid JSON
|
|
3177
|
+
* {{ result.blocks }} every content block: [{type, text?,
|
|
3178
|
+
* mime_type?, size_bytes?}]
|
|
3179
|
+
* {{ parameters }} the arguments the tool was called with,
|
|
3180
|
+
* after parameter actions were applied
|
|
3181
|
+
* {{ tool.name }} the tool's metadata.name
|
|
3182
|
+
* {{ tool.llm_tool_name }} the name the model called it by
|
|
3183
|
+
* {{ pinned_parameters }} the objective's pinned parameters
|
|
3184
|
+
* {{ objective.id }} / {{ objective.external_id }} /
|
|
3185
|
+
* {{ objective.labels.<key> }}
|
|
3186
|
+
*
|
|
3187
|
+
* Templates render with strict variables: referencing `result.json` on
|
|
3188
|
+
* a non-JSON result, or any other undefined variable, is a render error
|
|
3189
|
+
* and `on_error` decides the outcome. The `json` filter pretty-prints a
|
|
3190
|
+
* value as JSON; `sanitized_json` emits it compact and escaped for
|
|
3191
|
+
* embedding.
|
|
3192
|
+
*
|
|
3193
|
+
* Transforms are text-only. `result.text` and `result.json` are built
|
|
3194
|
+
* from the result's text blocks; media blocks (images, audio) are opaque
|
|
3195
|
+
* to the template and pass through unchanged. The rendered text replaces
|
|
3196
|
+
* the text blocks as a single text block. A result with no text blocks
|
|
3197
|
+
* at all (an image-only or audio-only result) is out of scope: the
|
|
3198
|
+
* transform is skipped, the result is recorded as returned, and the
|
|
3199
|
+
* skip is noted in the tool call's debug log — this is not an `on_error`
|
|
3200
|
+
* case, nothing was attempted. The one exception is `expect_json`, where
|
|
3201
|
+
* a result with no text is a violated precondition and `on_error`
|
|
3202
|
+
* applies.
|
|
3203
|
+
*/
|
|
3204
|
+
export interface ResultAction_Transform {
|
|
3205
|
+
contentTemplate: string;
|
|
3206
|
+
/**
|
|
3207
|
+
* Default: ON_ERROR_RAW_CONTENT.
|
|
3208
|
+
*/
|
|
3209
|
+
onError: ResultActionTransformOnError;
|
|
3210
|
+
/**
|
|
3211
|
+
* Require the tool result to have text content that parses as JSON
|
|
3212
|
+
* before rendering. A non-JSON (or text-less) result is then an error
|
|
3213
|
+
* subject to `on_error` even if the template never reads
|
|
3214
|
+
* `result.json`. Off by default: `result.json` is simply absent for
|
|
3215
|
+
* non-JSON results, and text-less results skip the transform.
|
|
3216
|
+
*/
|
|
3217
|
+
expectJson: boolean;
|
|
3218
|
+
}
|
|
3219
|
+
|
|
2937
3220
|
/**
|
|
2938
3221
|
* Resume agent schedule request.
|
|
2939
3222
|
*/
|
|
@@ -3039,6 +3322,26 @@ export interface SearchToolsOrToolSetsResponse {
|
|
|
3039
3322
|
agents: Array<Agent>;
|
|
3040
3323
|
}
|
|
3041
3324
|
|
|
3325
|
+
/**
|
|
3326
|
+
* A single selector condition.
|
|
3327
|
+
*/
|
|
3328
|
+
export type Selector_Condition =
|
|
3329
|
+
| Selector_Condition_Attribute
|
|
3330
|
+
| Selector_Condition_HasParameter
|
|
3331
|
+
| Selector_Condition_Tools;
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* An explicit list of tools, matched on spec.llm_tool_name — the name
|
|
3335
|
+
* the model calls the tool by. It identifies a tool across versions:
|
|
3336
|
+
* just-in-time MCP sets keep one tool per signature and every version
|
|
3337
|
+
* shares the LLM name, so the condition keeps matching as the source
|
|
3338
|
+
* evolves. Any name in the list matches (OR). Names of tools not (or
|
|
3339
|
+
* not yet) present in the set are allowed and match nothing.
|
|
3340
|
+
*/
|
|
3341
|
+
export interface Selector_ToolNames {
|
|
3342
|
+
names?: Array<string>;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3042
3345
|
/**
|
|
3043
3346
|
* SetToolCallContentRequest lets an external API consumer supply the result
|
|
3044
3347
|
* of a bare tool call (one whose tool set has no execution adapter). Used
|
|
@@ -3405,6 +3708,12 @@ export interface ToolCalled {
|
|
|
3405
3708
|
* The arguments passed to the tool.
|
|
3406
3709
|
*/
|
|
3407
3710
|
arguments?: Record<string, unknown>;
|
|
3711
|
+
/**
|
|
3712
|
+
* Whether the runtime authorized this call's arguments to be exposed in
|
|
3713
|
+
* public widget events. This records the resolved policy at call time so
|
|
3714
|
+
* consumers do not need to re-evaluate the tool set's current overlays.
|
|
3715
|
+
*/
|
|
3716
|
+
argumentsExposedInWidgets?: boolean;
|
|
3408
3717
|
}
|
|
3409
3718
|
|
|
3410
3719
|
export interface ToolDenied {
|
|
@@ -3433,9 +3742,205 @@ export interface ToolInfo {
|
|
|
3433
3742
|
* Content signature identifying the tool within its tool set: a hash of the
|
|
3434
3743
|
* sanitized llm_tool_name, description, and canonical parameters. Two tools
|
|
3435
3744
|
* with the same llm_tool_name but different parameters or description (as
|
|
3436
|
-
* MCP servers may return per user) have distinct signatures.
|
|
3745
|
+
* MCP servers may return per user) have distinct signatures. Computed over
|
|
3746
|
+
* the raw spec — overlays do not change a tool's signature.
|
|
3437
3747
|
*/
|
|
3438
3748
|
signature: string;
|
|
3749
|
+
/**
|
|
3750
|
+
* Keys of the tool set's overlays whose selectors match this tool
|
|
3751
|
+
* (ToolSetSpec.overlays), in evaluation order. Disabled overlays are
|
|
3752
|
+
* excluded. An overlay is listed when its selector matches even if none
|
|
3753
|
+
* of its actions changed this tool's schema (all its paths were absent),
|
|
3754
|
+
* so this answers "which policies apply to this tool" — diff
|
|
3755
|
+
* effective_parameters against spec.parameters for "what changed".
|
|
3756
|
+
* Empty when no overlay applies.
|
|
3757
|
+
*/
|
|
3758
|
+
overlays?: Array<string>;
|
|
3759
|
+
/**
|
|
3760
|
+
* The parameter schema as presented to the model: spec.parameters after
|
|
3761
|
+
* every matching overlay's parameter actions have been applied, in order,
|
|
3762
|
+
* including maintenance of the schema's `required` list. Actions whose
|
|
3763
|
+
* outcome depends on the objective (pin with ON_MISSING_SKIP) are applied
|
|
3764
|
+
* as if the pinned key were present, so this reflects the intended steady
|
|
3765
|
+
* state rather than any one objective. Equals spec.parameters when no
|
|
3766
|
+
* overlay applies. Result actions have no effect here.
|
|
3767
|
+
*/
|
|
3768
|
+
effectiveParameters?: Record<string, unknown>;
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
/**
|
|
3772
|
+
* A tool overlay is a policy attached to a tool set that reshapes the tools
|
|
3773
|
+
* the model sees and calls. It pairs a selector (which tools it applies to)
|
|
3774
|
+
* with actions that run before a call — rewriting the tool's parameter
|
|
3775
|
+
* schema and the arguments the model supplied — and after a call —
|
|
3776
|
+
* rewriting the result before it enters the model's context. It can also
|
|
3777
|
+
* explicitly allow the final call arguments to cross the otherwise-private
|
|
3778
|
+
* widget API boundary.
|
|
3779
|
+
*
|
|
3780
|
+
* Overlays exist for three reasons:
|
|
3781
|
+
*
|
|
3782
|
+
* - Authority. Adapter-derived tool sets (OpenAPI especially) expose many
|
|
3783
|
+
* parameters the model must never guess — a workspace id, a tenant id,
|
|
3784
|
+
* an account scope. Overlays bind those parameters to the objective's
|
|
3785
|
+
* `pinned_parameters` (see CreateObjectiveRequest.pinned_parameters):
|
|
3786
|
+
* the parameter disappears from the schema and the value is forced
|
|
3787
|
+
* server-side, so the model has no opportunity to supply a different
|
|
3788
|
+
* one.
|
|
3789
|
+
* - Context. Large specs carry pagination cursors, expansion flags and
|
|
3790
|
+
* verbose responses that cost tokens without helping the model.
|
|
3791
|
+
* Overlays strip parameters, fix them to literals, and compact results.
|
|
3792
|
+
* - Widget presentation. Tool arguments are private by default. An overlay
|
|
3793
|
+
* can opt matching tools into exposing their final call arguments in
|
|
3794
|
+
* visitor-facing widget events so an embedding UI can select a custom
|
|
3795
|
+
* renderer or presentation.
|
|
3796
|
+
*
|
|
3797
|
+
* Pinned parameters and overlays are complementary: pinned parameters are
|
|
3798
|
+
* *data* supplied per objective (or per widget session) by the caller;
|
|
3799
|
+
* overlays are *policy* authored once on the tool set. Pinning by name
|
|
3800
|
+
* still works without an overlay — a pinned key that matches a top-level
|
|
3801
|
+
* parameter name is applied to every tool in the objective — overlays are
|
|
3802
|
+
* for the cases that needs more: nested paths, renamed keys, a subset of
|
|
3803
|
+
* tools, or values that are literals rather than caller-supplied.
|
|
3804
|
+
*
|
|
3805
|
+
* Evaluation model:
|
|
3806
|
+
*
|
|
3807
|
+
* - Overlays are evaluated in list order; within an overlay, actions are
|
|
3808
|
+
* evaluated in list order. Later actions win on the same path (a `set`
|
|
3809
|
+
* followed by a `remove` leaves the parameter removed).
|
|
3810
|
+
* - The parameter schema the model sees is computed when tools are
|
|
3811
|
+
* assembled for an objective, so pre-call actions can consult that
|
|
3812
|
+
* objective's pinned parameters (this is what makes `pin` with
|
|
3813
|
+
* ON_MISSING_SKIP meaningful). Argument rewriting runs on every call.
|
|
3814
|
+
* - An action whose `path` does not exist in the tool's parameter schema
|
|
3815
|
+
* changes nothing in the schema the model sees. This is deliberate: a
|
|
3816
|
+
* broad selector (every `list_*` tool) may match tools with different
|
|
3817
|
+
* shapes, and one overlay should be able to cover all of them without
|
|
3818
|
+
* erroring on the ones that lack a given parameter. At call time the
|
|
3819
|
+
* model's arguments can still not widen what it controls: `remove`
|
|
3820
|
+
* strips the path whether or not it is declared, and `set`/`pin`
|
|
3821
|
+
* overwrite a value the model sent at an undeclared path (a schema this
|
|
3822
|
+
* evaluator cannot see through, e.g. behind $ref/allOf) while injecting
|
|
3823
|
+
* nothing into tools that lack the parameter.
|
|
3824
|
+
* - Overlays apply to just-in-time tool sets as well; the tools are
|
|
3825
|
+
* evaluated against overlays at the moment they are loaded.
|
|
3826
|
+
* - Result actions run once, when the tool call's result is recorded; the
|
|
3827
|
+
* stored result is the transformed one, so every reader (the model,
|
|
3828
|
+
* compaction, the API) sees the same content. They are not supported on
|
|
3829
|
+
* bare tool sets.
|
|
3830
|
+
*/
|
|
3831
|
+
export interface ToolOverlay {
|
|
3832
|
+
/**
|
|
3833
|
+
* Identifies the overlay within its tool set. Unique across the tool
|
|
3834
|
+
* set's overlays (enforced by the server), stable across reorders, and
|
|
3835
|
+
* surfaced in tool call messages ("parameter removed by overlay
|
|
3836
|
+
* strip-list-knobs") so an operator can trace a rewritten call back to
|
|
3837
|
+
* the policy that rewrote it. Referenced by ToolInfo.overlays and the
|
|
3838
|
+
* ListToolsRequest.overlays filter.
|
|
3839
|
+
*/
|
|
3840
|
+
key: string;
|
|
3841
|
+
/**
|
|
3842
|
+
* Which tools this overlay applies to. Required; an empty selector
|
|
3843
|
+
* (no conditions) matches every tool in the set.
|
|
3844
|
+
*/
|
|
3845
|
+
selector: ToolOverlay_Selector;
|
|
3846
|
+
/**
|
|
3847
|
+
* Pre-call actions, applied in order. See ParameterAction.
|
|
3848
|
+
*/
|
|
3849
|
+
parameterActions?: Array<ToolOverlay_ParameterAction>;
|
|
3850
|
+
/**
|
|
3851
|
+
* Post-call actions, applied in order. See ResultAction.
|
|
3852
|
+
*/
|
|
3853
|
+
resultActions?: Array<ToolOverlay_ResultAction>;
|
|
3854
|
+
/**
|
|
3855
|
+
* When true the overlay is retained in the spec but not evaluated. Lets an
|
|
3856
|
+
* operator switch a policy off to diagnose a misbehaving tool without
|
|
3857
|
+
* deleting it and losing the configuration.
|
|
3858
|
+
*/
|
|
3859
|
+
disabled: boolean;
|
|
3860
|
+
/**
|
|
3861
|
+
* Arguments may carry sensitive customer data, including values injected by
|
|
3862
|
+
* parameter actions, so they stay private unless an overlay enables them.
|
|
3863
|
+
*
|
|
3864
|
+
* Unset means this overlay has no opinion. When several enabled overlays
|
|
3865
|
+
* match a tool, they are evaluated in list order and the last overlay that
|
|
3866
|
+
* supplies this policy wins. If none supplies it, arguments stay private.
|
|
3867
|
+
* Disabled overlays never participate.
|
|
3868
|
+
*/
|
|
3869
|
+
widgetArgumentExposure?: ToolOverlay_WidgetArgumentExposure;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
/**
|
|
3873
|
+
* A pre-call action. Parameter actions rewrite the tool's parameter
|
|
3874
|
+
* schema as presented to the model and the arguments the model supplies
|
|
3875
|
+
* when it calls the tool. Both sides are always kept in agreement: a
|
|
3876
|
+
* parameter that is hidden from the schema is also stripped from (or
|
|
3877
|
+
* forced in) the arguments, so the model can neither see nor smuggle it.
|
|
3878
|
+
*/
|
|
3879
|
+
export type ToolOverlay_ParameterAction =
|
|
3880
|
+
| ToolOverlay_ParameterAction_Remove
|
|
3881
|
+
| ToolOverlay_ParameterAction_Set
|
|
3882
|
+
| ToolOverlay_ParameterAction_Pin;
|
|
3883
|
+
|
|
3884
|
+
/**
|
|
3885
|
+
* A dotted path into a tool's parameter schema. Each segment is a property
|
|
3886
|
+
* name; the path `filter.workspaceId` addresses
|
|
3887
|
+
* `properties.filter.properties.workspaceId` in the schema and
|
|
3888
|
+
* `arguments.filter.workspaceId` in the call. Only object properties are
|
|
3889
|
+
* addressable — there is no array indexing, wildcarding or filtering.
|
|
3890
|
+
*
|
|
3891
|
+
* This is deliberately not JSONPath: every action needs a single,
|
|
3892
|
+
* unambiguous location in both the schema and the arguments so that
|
|
3893
|
+
* removing a parameter from the schema and stripping it from the call are
|
|
3894
|
+
* guaranteed to agree.
|
|
3895
|
+
*/
|
|
3896
|
+
export interface ToolOverlay_ParameterPath {
|
|
3897
|
+
path: string;
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
/**
|
|
3901
|
+
* A post-call action. Result actions rewrite a tool call's result after
|
|
3902
|
+
* the adapter returns and before it is recorded: the transformed content
|
|
3903
|
+
* is what is stored and what the model reads (ObjectiveToolCallResult
|
|
3904
|
+
* content). The adapter's raw response is kept in the tool call's debug
|
|
3905
|
+
* log for operators; it is not otherwise retained.
|
|
3906
|
+
*
|
|
3907
|
+
* Result actions apply to MCP, OpenAPI and HTTP tool sets. They are not
|
|
3908
|
+
* supported on bare tool sets — a bare tool's content is supplied by an
|
|
3909
|
+
* external consumer, so there is nothing for the platform to reshape —
|
|
3910
|
+
* and a tool set whose adapter is `bare` rejects overlays that carry
|
|
3911
|
+
* result actions.
|
|
3912
|
+
*
|
|
3913
|
+
* When several matching overlays carry transforms they run in overlay
|
|
3914
|
+
* order, each one reading the previous one's output.
|
|
3915
|
+
*/
|
|
3916
|
+
export type ToolOverlay_ResultAction =
|
|
3917
|
+
| ToolOverlay_ResultAction_Transform;
|
|
3918
|
+
|
|
3919
|
+
/**
|
|
3920
|
+
* Default: OPERATOR_AND.
|
|
3921
|
+
*/
|
|
3922
|
+
export type ToolOverlaySelectorOperator = 'OPERATOR_UNSPECIFIED' | 'OPERATOR_AND' | 'OPERATOR_OR';
|
|
3923
|
+
|
|
3924
|
+
/**
|
|
3925
|
+
* Which tools in the tool set an overlay applies to. Conditions are
|
|
3926
|
+
* combined with `operator`; an overlay with no conditions matches every
|
|
3927
|
+
* tool in the set.
|
|
3928
|
+
*/
|
|
3929
|
+
export interface ToolOverlay_Selector {
|
|
3930
|
+
conditions?: Array<Selector_Condition>;
|
|
3931
|
+
/**
|
|
3932
|
+
* Default: OPERATOR_AND.
|
|
3933
|
+
*/
|
|
3934
|
+
operator: ToolOverlaySelectorOperator;
|
|
3935
|
+
}
|
|
3936
|
+
|
|
3937
|
+
/**
|
|
3938
|
+
* Controls whether matching tool calls may expose their final arguments to
|
|
3939
|
+
* visitor-facing widget events. The containing message's presence means the
|
|
3940
|
+
* overlay has an opinion; enabled selects whether that opinion is on or off.
|
|
3941
|
+
*/
|
|
3942
|
+
export interface ToolOverlay_WidgetArgumentExposure {
|
|
3943
|
+
enabled: boolean;
|
|
3439
3944
|
}
|
|
3440
3945
|
|
|
3441
3946
|
export interface ToolResult {
|
|
@@ -3481,7 +3986,7 @@ export type ToolSetAdapter_ApprovalRequirementFilter =
|
|
|
3481
3986
|
| ToolSetAdapter_ApprovalRequirementFilter_Always
|
|
3482
3987
|
| ToolSetAdapter_ApprovalRequirementFilter_Only;
|
|
3483
3988
|
|
|
3484
|
-
export type ToolSetAdapterAttributeFilterAttribute = 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION';
|
|
3989
|
+
export type ToolSetAdapterAttributeFilterAttribute = 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION' | 'ATTRIBUTE_LLM_TOOL_NAME';
|
|
3485
3990
|
|
|
3486
3991
|
/**
|
|
3487
3992
|
* Single attribute filter
|
|
@@ -3508,6 +4013,27 @@ export interface ToolSetAdapter_Bare {
|
|
|
3508
4013
|
}
|
|
3509
4014
|
|
|
3510
4015
|
export interface ToolSetAdapter_HTTP {
|
|
4016
|
+
/**
|
|
4017
|
+
* Base URL for dispatching tool calls.
|
|
4018
|
+
*
|
|
4019
|
+
* May be templated. Two reference forms are supported, and they resolve
|
|
4020
|
+
* in a single pass each so neither can inject into the other:
|
|
4021
|
+
*
|
|
4022
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
4023
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
4024
|
+
* (see CreateObjectiveRequest.pinned_parameters)
|
|
4025
|
+
*
|
|
4026
|
+
* Pinned parameters are what make a per-tenant host possible: one tool
|
|
4027
|
+
* set can serve every customer of a product that assigns each of them
|
|
4028
|
+
* their own subdomain, e.g.
|
|
4029
|
+
*
|
|
4030
|
+
* https://{{ pinned_parameters.tenant }}.example.com
|
|
4031
|
+
*
|
|
4032
|
+
* Because the value may be a template rather than a literal URL, this
|
|
4033
|
+
* field is not constrained to a URI shape. It is validated as an
|
|
4034
|
+
* absolute http(s) URL after references are resolved, both on write
|
|
4035
|
+
* (with references stubbed) and again before each tool call.
|
|
4036
|
+
*/
|
|
3511
4037
|
baseUrl?: string;
|
|
3512
4038
|
headers?: Record<string, string>;
|
|
3513
4039
|
}
|
|
@@ -3632,6 +4158,15 @@ export interface ToolSetSecretSpec {
|
|
|
3632
4158
|
export interface ToolSetSpec {
|
|
3633
4159
|
description?: string;
|
|
3634
4160
|
adapter: ToolSetAdapter;
|
|
4161
|
+
/**
|
|
4162
|
+
* Overlays applied to this tool set's tools, evaluated in order. See
|
|
4163
|
+
* ToolOverlay. Overlay keys must be unique within the list.
|
|
4164
|
+
*
|
|
4165
|
+
* As a repeated field this is replaced wholesale on update: an
|
|
4166
|
+
* update_mask of `spec.overlays` swaps the entire list for the one in the
|
|
4167
|
+
* request. Read-modify-write to add or remove a single overlay.
|
|
4168
|
+
*/
|
|
4169
|
+
overlays?: Array<ToolOverlay>;
|
|
3635
4170
|
}
|
|
3636
4171
|
|
|
3637
4172
|
/**
|
|
@@ -3668,8 +4203,9 @@ export interface ToolSpec {
|
|
|
3668
4203
|
*/
|
|
3669
4204
|
parameters: Record<string, unknown>;
|
|
3670
4205
|
/**
|
|
3671
|
-
* Configuration for this specific tool.
|
|
3672
|
-
* such as endpoint
|
|
4206
|
+
* Configuration for this specific tool. Its transport is derived from the
|
|
4207
|
+
* tool set adapter, while details such as endpoint and method are stored on
|
|
4208
|
+
* the tool itself.
|
|
3673
4209
|
*
|
|
3674
4210
|
* Required, and exactly one adapter must be set.
|
|
3675
4211
|
*/
|
|
@@ -3766,6 +4302,11 @@ export interface UpdateAIProviderKeyRequest {
|
|
|
3766
4302
|
* Fields to update.
|
|
3767
4303
|
*/
|
|
3768
4304
|
updateMask?: string;
|
|
4305
|
+
/**
|
|
4306
|
+
* Field-level credential changes. This is independent of update_mask;
|
|
4307
|
+
* legacy clients may continue replacing spec.credentials atomically.
|
|
4308
|
+
*/
|
|
4309
|
+
credentialPatch?: AIProviderCredentialPatch;
|
|
3769
4310
|
}
|
|
3770
4311
|
|
|
3771
4312
|
export interface UpdateAPIKeyRequest {
|
|
@@ -3925,6 +4466,42 @@ export interface UpdateMemoryLayerRequest {
|
|
|
3925
4466
|
updateMask?: string;
|
|
3926
4467
|
}
|
|
3927
4468
|
|
|
4469
|
+
/**
|
|
4470
|
+
* Update model request. update_mask must list leaf paths: metadata.name,
|
|
4471
|
+
* metadata.external_id, metadata.labels, spec.provider_model_id,
|
|
4472
|
+
* spec.provider, spec.family, spec.max_input_tokens, spec.max_output_tokens,
|
|
4473
|
+
* spec.capabilities, pricing_override.input_price_per_million_tokens, and
|
|
4474
|
+
* pricing_override.output_price_per_million_tokens. Synced models
|
|
4475
|
+
* (PROVENANCE_SYNCED_FROM_PROVIDER) reject metadata.name and spec.* paths.
|
|
4476
|
+
* spec price fields are never writable; price changes go through
|
|
4477
|
+
* pricing_override, where a masked-but-absent field clears the override.
|
|
4478
|
+
* Metadata and spec must be present when their respective paths are masked.
|
|
4479
|
+
*/
|
|
4480
|
+
export interface UpdateModelRequest {
|
|
4481
|
+
/**
|
|
4482
|
+
* Workspace ID.
|
|
4483
|
+
*/
|
|
4484
|
+
workspaceId?: string;
|
|
4485
|
+
/**
|
|
4486
|
+
* Model ID. Accepts the canonical `model_…` form or the `external_id:<value>` form.
|
|
4487
|
+
*/
|
|
4488
|
+
id?: string;
|
|
4489
|
+
metadata?: UpdateResourceMetadata;
|
|
4490
|
+
/**
|
|
4491
|
+
* When any spec.* path is masked, send the complete spec (current values
|
|
4492
|
+
* plus edits); it is validated as a whole.
|
|
4493
|
+
*/
|
|
4494
|
+
spec?: ModelSpec;
|
|
4495
|
+
/**
|
|
4496
|
+
* Customer price overrides, applied per masked path.
|
|
4497
|
+
*/
|
|
4498
|
+
pricingOverride?: ModelPricingOverride;
|
|
4499
|
+
/**
|
|
4500
|
+
* Fields to update. Required; leaf paths only.
|
|
4501
|
+
*/
|
|
4502
|
+
updateMask?: string;
|
|
4503
|
+
}
|
|
4504
|
+
|
|
3928
4505
|
/**
|
|
3929
4506
|
* UpdateResourceMetadata contains the user-provided fields for updating
|
|
3930
4507
|
* a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id,
|
|
@@ -4165,6 +4742,15 @@ export interface VariationMemoryLayerAssignment {
|
|
|
4165
4742
|
position: number;
|
|
4166
4743
|
}
|
|
4167
4744
|
|
|
4745
|
+
/**
|
|
4746
|
+
* VertexConfig configures the Google Cloud project and location used by the
|
|
4747
|
+
* Vertex AI backend. Both are required for service-account authentication.
|
|
4748
|
+
*/
|
|
4749
|
+
export interface VertexConfig {
|
|
4750
|
+
projectId?: string;
|
|
4751
|
+
location?: string;
|
|
4752
|
+
}
|
|
4753
|
+
|
|
4168
4754
|
export interface WebhookDelivery {
|
|
4169
4755
|
metadata: OperationMetadata;
|
|
4170
4756
|
/**
|
|
@@ -4374,13 +4960,13 @@ export interface WidgetSessionSpec {
|
|
|
4374
4960
|
tokenExpiresAt?: string;
|
|
4375
4961
|
/**
|
|
4376
4962
|
* Parameters forced onto tool calls made by this session's conversations.
|
|
4377
|
-
* A pinned parameter is
|
|
4378
|
-
* is
|
|
4379
|
-
*
|
|
4380
|
-
*
|
|
4381
|
-
*
|
|
4382
|
-
*
|
|
4383
|
-
*
|
|
4963
|
+
* A pinned parameter is removed from the tool schema the LLM sees, and its
|
|
4964
|
+
* value is always overwritten server-side with the pinned value — so the
|
|
4965
|
+
* model cannot be tricked into calling a tool with a different id than the
|
|
4966
|
+
* one the session was minted for (e.g. pin "workspaceId" for an OpenAPI
|
|
4967
|
+
* tool with a /workspaces/{workspaceId} path). Flows to every objective
|
|
4968
|
+
* the session creates. See ToolSetSpec.overlays for binding pinned keys to
|
|
4969
|
+
* nested or differently named parameters.
|
|
4384
4970
|
*/
|
|
4385
4971
|
pinnedParameters?: Record<string, string>;
|
|
4386
4972
|
}
|
|
@@ -4647,6 +5233,17 @@ export interface ToolSetAdapter_OpenAPI_Url {
|
|
|
4647
5233
|
/**
|
|
4648
5234
|
* Base URL for dispatching tool calls. If set, overrides the server
|
|
4649
5235
|
* resolved from the spec's servers array.
|
|
5236
|
+
*
|
|
5237
|
+
* May be templated with the same two reference forms the HTTP adapter's
|
|
5238
|
+
* base_url accepts:
|
|
5239
|
+
*
|
|
5240
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
5241
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
5242
|
+
*
|
|
5243
|
+
* A spec written against a single host can therefore be dispatched to a
|
|
5244
|
+
* per-tenant one, e.g. https://{{ pinned_parameters.tenant }}.example.com,
|
|
5245
|
+
* without cloning the tool set per customer. Validated as an absolute
|
|
5246
|
+
* http(s) URL after references are resolved rather than as a literal URI.
|
|
4650
5247
|
*/
|
|
4651
5248
|
baseUrl?: string;
|
|
4652
5249
|
/**
|
|
@@ -4674,6 +5271,17 @@ export interface ToolSetAdapter_OpenAPI_UploadId {
|
|
|
4674
5271
|
/**
|
|
4675
5272
|
* Base URL for dispatching tool calls. If set, overrides the server
|
|
4676
5273
|
* resolved from the spec's servers array.
|
|
5274
|
+
*
|
|
5275
|
+
* May be templated with the same two reference forms the HTTP adapter's
|
|
5276
|
+
* base_url accepts:
|
|
5277
|
+
*
|
|
5278
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
5279
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
5280
|
+
*
|
|
5281
|
+
* A spec written against a single host can therefore be dispatched to a
|
|
5282
|
+
* per-tenant one, e.g. https://{{ pinned_parameters.tenant }}.example.com,
|
|
5283
|
+
* without cloning the tool set per customer. Validated as an absolute
|
|
5284
|
+
* http(s) URL after references are resolved rather than as a literal URI.
|
|
4677
5285
|
*/
|
|
4678
5286
|
baseUrl?: string;
|
|
4679
5287
|
/**
|
|
@@ -4685,6 +5293,55 @@ export interface ToolSetAdapter_OpenAPI_UploadId {
|
|
|
4685
5293
|
serverName?: string;
|
|
4686
5294
|
}
|
|
4687
5295
|
|
|
5296
|
+
export interface Selector_Condition_Attribute {
|
|
5297
|
+
type: 'attribute';
|
|
5298
|
+
/**
|
|
5299
|
+
* Match on a tool attribute (name, title, description,
|
|
5300
|
+
* llm_tool_name) with a string matcher — the same filter used by
|
|
5301
|
+
* the adapter's include/exclude lists.
|
|
5302
|
+
*/
|
|
5303
|
+
attribute: ToolSetAdapter_AttributeFilter;
|
|
5304
|
+
}
|
|
5305
|
+
|
|
5306
|
+
export interface Selector_Condition_HasParameter {
|
|
5307
|
+
type: 'hasParameter';
|
|
5308
|
+
/**
|
|
5309
|
+
* Match tools whose parameter schema contains the given path. This
|
|
5310
|
+
* is the usual way to target "every tool that takes a workspaceId"
|
|
5311
|
+
* without enumerating tools by name.
|
|
5312
|
+
*/
|
|
5313
|
+
hasParameter: ToolOverlay_ParameterPath;
|
|
5314
|
+
}
|
|
5315
|
+
|
|
5316
|
+
export interface Selector_Condition_Tools {
|
|
5317
|
+
type: 'tools';
|
|
5318
|
+
/**
|
|
5319
|
+
* Match specific tools by LLM tool name. The direct way to assign an
|
|
5320
|
+
* overlay to one tool (or a handful) without writing a matcher.
|
|
5321
|
+
*/
|
|
5322
|
+
tools: Selector_ToolNames;
|
|
5323
|
+
}
|
|
5324
|
+
|
|
5325
|
+
export interface ToolOverlay_ParameterAction_Remove {
|
|
5326
|
+
type: 'remove';
|
|
5327
|
+
remove: ParameterAction_Remove;
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
export interface ToolOverlay_ParameterAction_Set {
|
|
5331
|
+
type: 'set';
|
|
5332
|
+
set: ParameterAction_Set;
|
|
5333
|
+
}
|
|
5334
|
+
|
|
5335
|
+
export interface ToolOverlay_ParameterAction_Pin {
|
|
5336
|
+
type: 'pin';
|
|
5337
|
+
pin: ParameterAction_Pin;
|
|
5338
|
+
}
|
|
5339
|
+
|
|
5340
|
+
export interface ToolOverlay_ResultAction_Transform {
|
|
5341
|
+
type: 'transform';
|
|
5342
|
+
transform: ResultAction_Transform;
|
|
5343
|
+
}
|
|
5344
|
+
|
|
4688
5345
|
export interface ToolSpec_Config_Http {
|
|
4689
5346
|
type: 'http';
|
|
4690
5347
|
http: Config_HTTP;
|
|
@@ -4923,6 +5580,24 @@ export interface AIProviderCredential_Headers {
|
|
|
4923
5580
|
headers: CredentialHeaders;
|
|
4924
5581
|
}
|
|
4925
5582
|
|
|
5583
|
+
export interface AIProviderCredential_GoogleServiceAccount {
|
|
5584
|
+
type: 'googleServiceAccount';
|
|
5585
|
+
/**
|
|
5586
|
+
* Google service-account JSON for Vertex AI. The server accepts only the
|
|
5587
|
+
* service_account credential type and never writes the JSON to plaintext
|
|
5588
|
+
* storage.
|
|
5589
|
+
*/
|
|
5590
|
+
googleServiceAccount: CredentialGoogleServiceAccount;
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
export interface AIProviderCredential_AwsAccessKey {
|
|
5594
|
+
type: 'awsAccessKey';
|
|
5595
|
+
/**
|
|
5596
|
+
* AWS access credentials for Bedrock SigV4 authentication.
|
|
5597
|
+
*/
|
|
5598
|
+
awsAccessKey: CredentialAWSAccessKey;
|
|
5599
|
+
}
|
|
5600
|
+
|
|
4926
5601
|
export interface AIProviderConfig_Openrouter {
|
|
4927
5602
|
type: 'openrouter';
|
|
4928
5603
|
openrouter: OpenRouterConfig;
|
|
@@ -4938,6 +5613,16 @@ export interface AIProviderConfig_OpenaiCompatible {
|
|
|
4938
5613
|
openaiCompatible: OpenAICompatibleConfig;
|
|
4939
5614
|
}
|
|
4940
5615
|
|
|
5616
|
+
export interface AIProviderConfig_Vertex {
|
|
5617
|
+
type: 'vertex';
|
|
5618
|
+
vertex: VertexConfig;
|
|
5619
|
+
}
|
|
5620
|
+
|
|
5621
|
+
export interface AIProviderConfig_Bedrock {
|
|
5622
|
+
type: 'bedrock';
|
|
5623
|
+
bedrock: BedrockConfig;
|
|
5624
|
+
}
|
|
5625
|
+
|
|
4941
5626
|
export interface ModelSpec_Capability_Temperature {
|
|
4942
5627
|
type: 'temperature';
|
|
4943
5628
|
temperature: Capability_Temperature;
|
|
@@ -5073,13 +5758,13 @@ export interface WidgetSessionSpecParam {
|
|
|
5073
5758
|
expiresAt?: string;
|
|
5074
5759
|
/**
|
|
5075
5760
|
* Parameters forced onto tool calls made by this session's conversations.
|
|
5076
|
-
* A pinned parameter is
|
|
5077
|
-
* is
|
|
5078
|
-
*
|
|
5079
|
-
*
|
|
5080
|
-
*
|
|
5081
|
-
*
|
|
5082
|
-
*
|
|
5761
|
+
* A pinned parameter is removed from the tool schema the LLM sees, and its
|
|
5762
|
+
* value is always overwritten server-side with the pinned value — so the
|
|
5763
|
+
* model cannot be tricked into calling a tool with a different id than the
|
|
5764
|
+
* one the session was minted for (e.g. pin "workspaceId" for an OpenAPI
|
|
5765
|
+
* tool with a /workspaces/{workspaceId} path). Flows to every objective
|
|
5766
|
+
* the session creates. See ToolSetSpec.overlays for binding pinned keys to
|
|
5767
|
+
* nested or differently named parameters.
|
|
5083
5768
|
*/
|
|
5084
5769
|
pinnedParameters?: Record<string, string>;
|
|
5085
5770
|
}
|