@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/dist/types.d.ts
CHANGED
|
@@ -5,13 +5,42 @@
|
|
|
5
5
|
* is fixed and intentionally not overridable here; use the OpenAI-compatible
|
|
6
6
|
* provider to target a custom endpoint.
|
|
7
7
|
*/
|
|
8
|
-
export type AIProviderConfig = AIProviderConfig_Openrouter | AIProviderConfig_Openai | AIProviderConfig_OpenaiCompatible;
|
|
8
|
+
export type AIProviderConfig = AIProviderConfig_Openrouter | AIProviderConfig_Openai | AIProviderConfig_OpenaiCompatible | AIProviderConfig_Vertex | AIProviderConfig_Bedrock;
|
|
9
9
|
/**
|
|
10
10
|
* AIProviderCredential is the secret material used to authenticate with a
|
|
11
11
|
* provider. The set case must correspond to AIProviderKeySpec.provider. The
|
|
12
|
-
* server encrypts
|
|
12
|
+
* server classifies and encrypts sensitive fields at rest and never returns
|
|
13
|
+
* secret values on reads.
|
|
13
14
|
*/
|
|
14
|
-
export type AIProviderCredential = AIProviderCredential_ApiKey | AIProviderCredential_Headers;
|
|
15
|
+
export type AIProviderCredential = AIProviderCredential_ApiKey | AIProviderCredential_Headers | AIProviderCredential_GoogleServiceAccount | AIProviderCredential_AwsAccessKey;
|
|
16
|
+
/**
|
|
17
|
+
* AIProviderCredentialFieldStatus is the safe read representation of one
|
|
18
|
+
* credential field. Value is populated only when sensitive is false.
|
|
19
|
+
*/
|
|
20
|
+
export interface AIProviderCredentialFieldStatus {
|
|
21
|
+
name?: string;
|
|
22
|
+
sensitive?: boolean;
|
|
23
|
+
configured?: boolean;
|
|
24
|
+
value?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* AIProviderCredentialPatch changes selected fields of the current credential.
|
|
28
|
+
* Omitted values are retained and clear_fields explicitly removes optional
|
|
29
|
+
* fields. Changing type replaces the credential and requires all mandatory
|
|
30
|
+
* fields for the new type.
|
|
31
|
+
*/
|
|
32
|
+
export interface AIProviderCredentialPatch {
|
|
33
|
+
credentials?: AIProviderCredential;
|
|
34
|
+
clearFields?: Array<string>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* AIProviderCredentialStatus describes the stored authentication method and
|
|
38
|
+
* its fields without returning secret material.
|
|
39
|
+
*/
|
|
40
|
+
export interface AIProviderCredentialStatus {
|
|
41
|
+
type?: string;
|
|
42
|
+
fields?: Array<AIProviderCredentialFieldStatus>;
|
|
43
|
+
}
|
|
15
44
|
/**
|
|
16
45
|
* AIProviderKey is a credential for an AI provider, scoped to a workspace.
|
|
17
46
|
* Most keys are customer-provided (BYOK); Cadenya also provisions promotional
|
|
@@ -28,6 +57,10 @@ export interface AIProviderKey {
|
|
|
28
57
|
*/
|
|
29
58
|
info?: AIProviderKeyInfo;
|
|
30
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* How models on this key are maintained; see ModelManagement.
|
|
62
|
+
*/
|
|
63
|
+
export type AiProviderKeyInfoModelManagement = 'MODEL_MANAGEMENT_UNSPECIFIED' | 'MODEL_MANAGEMENT_CADENYA' | 'MODEL_MANAGEMENT_SYNCED' | 'MODEL_MANAGEMENT_CUSTOMIZABLE' | 'MODEL_MANAGEMENT_MANUAL';
|
|
31
64
|
/**
|
|
32
65
|
* AIProviderKeyInfo carries server-derived, read-only details about a key, for
|
|
33
66
|
* AI provider management UIs.
|
|
@@ -46,11 +79,20 @@ export interface AIProviderKeyInfo {
|
|
|
46
79
|
* These are not added or maintained by account administrators.
|
|
47
80
|
*/
|
|
48
81
|
isPromotional: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Safe-to-display credential state. Secret values are never populated;
|
|
84
|
+
* configured reports whether a value is present without revealing it.
|
|
85
|
+
*/
|
|
86
|
+
credentialStatus?: AIProviderCredentialStatus;
|
|
87
|
+
/**
|
|
88
|
+
* How models on this key are maintained; see ModelManagement.
|
|
89
|
+
*/
|
|
90
|
+
modelManagement: AiProviderKeyInfoModelManagement;
|
|
49
91
|
}
|
|
50
92
|
/**
|
|
51
93
|
* The AI provider this key authenticates against.
|
|
52
94
|
*/
|
|
53
|
-
export type AiProviderKeySpecProvider = 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE';
|
|
95
|
+
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';
|
|
54
96
|
export interface AIProviderKeySpec {
|
|
55
97
|
/**
|
|
56
98
|
* The AI provider this key authenticates against.
|
|
@@ -63,8 +105,9 @@ export interface AIProviderKeySpec {
|
|
|
63
105
|
credentials?: AIProviderCredential;
|
|
64
106
|
/**
|
|
65
107
|
* Non-secret, provider-specific settings (OpenAI org/project, OpenRouter
|
|
66
|
-
* region, OpenAI-compatible base URL
|
|
67
|
-
*
|
|
108
|
+
* region, OpenAI-compatible base URL, Vertex project/location, or Bedrock
|
|
109
|
+
* Region). The set case must correspond to `provider`. Returned on reads.
|
|
110
|
+
* Optional for providers that have usable defaults.
|
|
68
111
|
*/
|
|
69
112
|
config?: AIProviderConfig;
|
|
70
113
|
}
|
|
@@ -406,7 +449,7 @@ export interface AgentScheduleSpec_Schedule {
|
|
|
406
449
|
}
|
|
407
450
|
/**
|
|
408
451
|
* Controls how variations are automatically selected when creating objectives
|
|
409
|
-
* Defaults to
|
|
452
|
+
* Defaults to WEIGHTED when unspecified
|
|
410
453
|
*/
|
|
411
454
|
export type AgentSpecVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
|
|
412
455
|
/**
|
|
@@ -423,9 +466,9 @@ export interface AgentSpec {
|
|
|
423
466
|
webhookEventsUrl?: string;
|
|
424
467
|
/**
|
|
425
468
|
* Controls how variations are automatically selected when creating objectives
|
|
426
|
-
* Defaults to
|
|
469
|
+
* Defaults to WEIGHTED when unspecified
|
|
427
470
|
*/
|
|
428
|
-
variationSelectionMode
|
|
471
|
+
variationSelectionMode?: AgentSpecVariationSelectionMode;
|
|
429
472
|
/**
|
|
430
473
|
* SystemPromptDataSchema enforces the shape of system_prompt_data when objectives are created. This is valuable when using liquid formatting in agent
|
|
431
474
|
* 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.
|
|
@@ -595,10 +638,8 @@ export interface AgentVariationSpec_Constraints {
|
|
|
595
638
|
* When not set, objectives are still swept at the system-wide 24 hour
|
|
596
639
|
* maximum — every objective eventually reaches a terminal state.
|
|
597
640
|
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
* Durations — a "<seconds>s" string — so the SDKs must type this as a
|
|
601
|
-
* string (like AgentScheduleSpec.every), not an integer.
|
|
641
|
+
* SDKs represent this as a duration string, like AgentScheduleSpec.every,
|
|
642
|
+
* rather than an integer.
|
|
602
643
|
*/
|
|
603
644
|
inactivityTimeout?: string;
|
|
604
645
|
}
|
|
@@ -614,7 +655,7 @@ export type AgentVariationSpecModelConfigReasoningEffort = 'REASONING_EFFORT_UNS
|
|
|
614
655
|
*/
|
|
615
656
|
export interface AgentVariationSpec_ModelConfig {
|
|
616
657
|
/**
|
|
617
|
-
* The model identifier
|
|
658
|
+
* 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")
|
|
618
659
|
*/
|
|
619
660
|
modelId: string;
|
|
620
661
|
/**
|
|
@@ -772,10 +813,16 @@ export interface BareMetadata {
|
|
|
772
813
|
/**
|
|
773
814
|
* Human-readable name of the referenced resource, populated by the server
|
|
774
815
|
* on reads for convenience. Absent on references to resources that do not
|
|
775
|
-
* have a name
|
|
816
|
+
* have a name.
|
|
776
817
|
*/
|
|
777
818
|
name?: string;
|
|
778
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* BedrockConfig selects the AWS source Region used for Bedrock Runtime calls.
|
|
822
|
+
*/
|
|
823
|
+
export interface BedrockConfig {
|
|
824
|
+
region?: string;
|
|
825
|
+
}
|
|
779
826
|
/**
|
|
780
827
|
* 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
|
|
781
828
|
* might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
|
|
@@ -1110,6 +1157,25 @@ export interface CreateMemoryLayerRequest {
|
|
|
1110
1157
|
metadata: CreateResourceMetadata;
|
|
1111
1158
|
spec: MemoryLayerSpec;
|
|
1112
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Create model request. The model is created on the given AI provider key with
|
|
1162
|
+
* PROVENANCE_MANUALLY_ENTERED and STATE_ENABLED. The key must be customer
|
|
1163
|
+
* provided and its provider must accept manual definitions (see
|
|
1164
|
+
* AIProviderKeyInfo.model_management).
|
|
1165
|
+
*/
|
|
1166
|
+
export interface CreateModelRequest {
|
|
1167
|
+
/**
|
|
1168
|
+
* Workspace ID.
|
|
1169
|
+
*/
|
|
1170
|
+
workspaceId?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* The AI provider key the model routes through. Accepts the canonical
|
|
1173
|
+
* `aipk_…` form or the `external_id:<value>` form.
|
|
1174
|
+
*/
|
|
1175
|
+
aiProviderKeyId?: string;
|
|
1176
|
+
metadata: CreateResourceMetadata;
|
|
1177
|
+
spec: ModelSpec;
|
|
1178
|
+
}
|
|
1113
1179
|
/**
|
|
1114
1180
|
* Request to submit feedback for an objective
|
|
1115
1181
|
*/
|
|
@@ -1190,9 +1256,12 @@ export interface CreateObjectiveRequest {
|
|
|
1190
1256
|
subject?: SubjectAssertion;
|
|
1191
1257
|
/**
|
|
1192
1258
|
* Parameters forced onto this objective's tool calls. A pinned parameter
|
|
1193
|
-
* is
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1259
|
+
* is removed from the tool schema the LLM sees, and its value is always
|
|
1260
|
+
* overwritten server-side with the pinned value — the model cannot choose
|
|
1261
|
+
* a different value for it. By default a pinned key applies to every tool
|
|
1262
|
+
* with a top-level parameter of the same name; a tool set's overlays
|
|
1263
|
+
* (ToolSetSpec.overlays) can bind pinned keys to nested paths, differently
|
|
1264
|
+
* named parameters, or a subset of tools.
|
|
1196
1265
|
*/
|
|
1197
1266
|
pinnedParameters?: Record<string, string>;
|
|
1198
1267
|
}
|
|
@@ -1340,6 +1409,22 @@ export interface CreateWorkspaceSecretRequest {
|
|
|
1340
1409
|
export interface CredentialAPIKey {
|
|
1341
1410
|
apiKey?: string;
|
|
1342
1411
|
}
|
|
1412
|
+
/**
|
|
1413
|
+
* CredentialAWSAccessKey carries AWS SigV4 credentials. Optional presence is
|
|
1414
|
+
* used by credential patches so omitted values remain unchanged.
|
|
1415
|
+
*/
|
|
1416
|
+
export interface CredentialAWSAccessKey {
|
|
1417
|
+
accessKeyId?: string;
|
|
1418
|
+
secretAccessKey?: string;
|
|
1419
|
+
sessionToken?: string;
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* CredentialGoogleServiceAccount carries an in-memory Google service-account
|
|
1423
|
+
* credential document.
|
|
1424
|
+
*/
|
|
1425
|
+
export interface CredentialGoogleServiceAccount {
|
|
1426
|
+
json?: string;
|
|
1427
|
+
}
|
|
1343
1428
|
/**
|
|
1344
1429
|
* CredentialHeaders carries arbitrary HTTP headers sent with every request to
|
|
1345
1430
|
* the provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
|
|
@@ -1423,7 +1508,7 @@ export interface EnableModelRequest {
|
|
|
1423
1508
|
}
|
|
1424
1509
|
export interface GetObjectiveDiagnosticsResponse {
|
|
1425
1510
|
/**
|
|
1426
|
-
*
|
|
1511
|
+
* Context usage from the objective's most recent iteration.
|
|
1427
1512
|
*/
|
|
1428
1513
|
diagnostics: ObjectiveDiagnostics;
|
|
1429
1514
|
}
|
|
@@ -1519,10 +1604,6 @@ export interface ListObjectiveFeedbackResponse {
|
|
|
1519
1604
|
items: Array<ObjectiveFeedback>;
|
|
1520
1605
|
pagination?: Page;
|
|
1521
1606
|
}
|
|
1522
|
-
export interface ListObjectiveTasksResponse {
|
|
1523
|
-
items: Array<ObjectiveTask>;
|
|
1524
|
-
pagination?: Page;
|
|
1525
|
-
}
|
|
1526
1607
|
export interface ListObjectiveToolCallsResponse {
|
|
1527
1608
|
items: Array<ObjectiveToolCall>;
|
|
1528
1609
|
pagination?: Page;
|
|
@@ -1834,6 +1915,12 @@ export interface MemoryReference {
|
|
|
1834
1915
|
* :enable and :disable actions to transition.
|
|
1835
1916
|
*/
|
|
1836
1917
|
export type ModelState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
|
|
1918
|
+
/**
|
|
1919
|
+
* Where this definition came from. Output only; set at creation. Synced
|
|
1920
|
+
* models reject edits to metadata.name and spec, manually entered models
|
|
1921
|
+
* accept them.
|
|
1922
|
+
*/
|
|
1923
|
+
export type ModelProvenance = 'PROVENANCE_UNSPECIFIED' | 'PROVENANCE_SYNCED_FROM_PROVIDER' | 'PROVENANCE_MANUALLY_ENTERED';
|
|
1837
1924
|
export interface Model {
|
|
1838
1925
|
/**
|
|
1839
1926
|
* Resource metadata
|
|
@@ -1853,6 +1940,39 @@ export interface Model {
|
|
|
1853
1940
|
* :enable and :disable actions to transition.
|
|
1854
1941
|
*/
|
|
1855
1942
|
state: ModelState;
|
|
1943
|
+
/**
|
|
1944
|
+
* Where this definition came from. Output only; set at creation. Synced
|
|
1945
|
+
* models reject edits to metadata.name and spec, manually entered models
|
|
1946
|
+
* accept them.
|
|
1947
|
+
*/
|
|
1948
|
+
provenance: ModelProvenance;
|
|
1949
|
+
/**
|
|
1950
|
+
* Customer price overrides. Output only here; set through UpdateModel with
|
|
1951
|
+
* pricing_override.* mask paths. When an override is present, spec's price
|
|
1952
|
+
* fields already reflect it (they are the effective prices).
|
|
1953
|
+
*/
|
|
1954
|
+
pricingOverride?: ModelPricingOverride;
|
|
1955
|
+
/**
|
|
1956
|
+
* The rates before any customer override: the catalog rate for a synced
|
|
1957
|
+
* model, the entered rate for a manually entered one. Output only. When a
|
|
1958
|
+
* side matches the spec price, an override may still be present; inspect
|
|
1959
|
+
* pricing_override field presence to determine whether an override is set.
|
|
1960
|
+
*/
|
|
1961
|
+
basePricing: ModelBasePricing;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* ModelBasePricing is a model's default rates in cents per million tokens,
|
|
1965
|
+
* unaffected by pricing overrides. Zero means the rate is not known.
|
|
1966
|
+
*/
|
|
1967
|
+
export interface ModelBasePricing {
|
|
1968
|
+
/**
|
|
1969
|
+
* Default input token rate, in cents per million tokens.
|
|
1970
|
+
*/
|
|
1971
|
+
inputPricePerMillionTokens: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* Default output token rate, in cents per million tokens.
|
|
1974
|
+
*/
|
|
1975
|
+
outputPricePerMillionTokens: string;
|
|
1856
1976
|
}
|
|
1857
1977
|
/**
|
|
1858
1978
|
* ModelInfo carries server-derived, read-only details about a model.
|
|
@@ -1875,6 +1995,21 @@ export interface ModelInfo {
|
|
|
1875
1995
|
*/
|
|
1876
1996
|
lastUsedAt?: string;
|
|
1877
1997
|
}
|
|
1998
|
+
/**
|
|
1999
|
+
* ModelPricingOverride replaces the catalog prices for a model. Each field is
|
|
2000
|
+
* independent: an absent field keeps the catalog price, a present field (zero
|
|
2001
|
+
* included) replaces it. Prices are cents per million tokens.
|
|
2002
|
+
*/
|
|
2003
|
+
export interface ModelPricingOverride {
|
|
2004
|
+
/**
|
|
2005
|
+
* Override for input token price, in cents per million tokens.
|
|
2006
|
+
*/
|
|
2007
|
+
inputPricePerMillionTokens?: string;
|
|
2008
|
+
/**
|
|
2009
|
+
* Override for output token price, in cents per million tokens.
|
|
2010
|
+
*/
|
|
2011
|
+
outputPricePerMillionTokens?: string;
|
|
2012
|
+
}
|
|
1878
2013
|
export interface ModelSpec {
|
|
1879
2014
|
/**
|
|
1880
2015
|
* The model provider (e.g., "anthropic", "openai", "google")
|
|
@@ -1893,11 +2028,16 @@ export interface ModelSpec {
|
|
|
1893
2028
|
*/
|
|
1894
2029
|
maxOutputTokens: number;
|
|
1895
2030
|
/**
|
|
1896
|
-
* Cost per million input tokens in cents (e.g., 300 = $3.00)
|
|
2031
|
+
* Cost per million input tokens in cents (e.g., 300 = $3.00). On reads this
|
|
2032
|
+
* is the effective price: the catalog price unless
|
|
2033
|
+
* Model.pricing_override replaces it. Writes only apply to manually
|
|
2034
|
+
* entered models; use UpdateModel's pricing_override paths to override a
|
|
2035
|
+
* synced model's price.
|
|
1897
2036
|
*/
|
|
1898
2037
|
inputPricePerMillionTokens: string;
|
|
1899
2038
|
/**
|
|
1900
|
-
* Cost per million output tokens in cents (e.g., 1500 = $15.00)
|
|
2039
|
+
* Cost per million output tokens in cents (e.g., 1500 = $15.00). Effective
|
|
2040
|
+
* price on reads, see input_price_per_million_tokens.
|
|
1901
2041
|
*/
|
|
1902
2042
|
outputPricePerMillionTokens: string;
|
|
1903
2043
|
/**
|
|
@@ -1906,6 +2046,15 @@ export interface ModelSpec {
|
|
|
1906
2046
|
* (and its mode) lives here too, as the "reasoning" capability.
|
|
1907
2047
|
*/
|
|
1908
2048
|
capabilities: Array<ModelSpec_Capability>;
|
|
2049
|
+
/**
|
|
2050
|
+
* The identifier the provider expects in inference requests, exactly as the
|
|
2051
|
+
* provider spells it: an OpenAI model name, a Vertex publisher model
|
|
2052
|
+
* resource, a Bedrock inference-profile ID or ARN, or an OpenAI-compatible
|
|
2053
|
+
* endpoint's model ID. Distinct from metadata.external_id, which is
|
|
2054
|
+
* Cadenya's slug. Verified with a minimal provider completion on creation
|
|
2055
|
+
* and whenever the identifier changes.
|
|
2056
|
+
*/
|
|
2057
|
+
providerModelId: string;
|
|
1909
2058
|
}
|
|
1910
2059
|
/**
|
|
1911
2060
|
* Capability describes one inference knob this model supports, with any
|
|
@@ -1915,7 +2064,7 @@ export interface ModelSpec {
|
|
|
1915
2064
|
export type ModelSpec_Capability = ModelSpec_Capability_Temperature | ModelSpec_Capability_TopP | ModelSpec_Capability_TopK | ModelSpec_Capability_StopSequences | ModelSpec_Capability_MaxOutputTokens | ModelSpec_Capability_Reasoning | ModelSpec_Capability_Caching;
|
|
1916
2065
|
export type NoticeLevel = 'LEVEL_UNSPECIFIED' | 'LEVEL_INFO' | 'LEVEL_WARN';
|
|
1917
2066
|
/**
|
|
1918
|
-
* Notice is a non-terminal
|
|
2067
|
+
* Notice is a non-terminal event emitted by the runtime when something
|
|
1919
2068
|
* noteworthy but non-fatal happens during an objective — for example a
|
|
1920
2069
|
* just-in-time tool set failing to load, or a previously loaded tool being
|
|
1921
2070
|
* dropped because it was archived. Notices carry no structured payload; they
|
|
@@ -2080,10 +2229,10 @@ export interface ObjectiveContextWindowInfo {
|
|
|
2080
2229
|
createdBy?: Profile;
|
|
2081
2230
|
}
|
|
2082
2231
|
/**
|
|
2083
|
-
*
|
|
2084
|
-
*
|
|
2085
|
-
*
|
|
2086
|
-
*
|
|
2232
|
+
* Context-usage breakdown measured for a single iteration at request-assembly
|
|
2233
|
+
* time. It reports how much of the context window each component occupies so
|
|
2234
|
+
* tool parameters, memory cascades, and prompts can be tuned against real
|
|
2235
|
+
* token usage.
|
|
2087
2236
|
*/
|
|
2088
2237
|
export interface ObjectiveDiagnostics {
|
|
2089
2238
|
/**
|
|
@@ -2257,32 +2406,6 @@ export interface ObjectiveInfo {
|
|
|
2257
2406
|
*/
|
|
2258
2407
|
widget?: BareMetadata;
|
|
2259
2408
|
}
|
|
2260
|
-
/**
|
|
2261
|
-
* ObjectiveTask represents a task within an objective, typically created and managed by an AI agent
|
|
2262
|
-
* to track progress toward completing the objective.
|
|
2263
|
-
*/
|
|
2264
|
-
export interface ObjectiveTask {
|
|
2265
|
-
metadata: BareMetadata;
|
|
2266
|
-
data: ObjectiveTaskData;
|
|
2267
|
-
}
|
|
2268
|
-
export interface ObjectiveTaskData {
|
|
2269
|
-
/**
|
|
2270
|
-
* The sequential number of this task within the objective (auto-assigned, 1-based)
|
|
2271
|
-
*/
|
|
2272
|
-
number: number;
|
|
2273
|
-
/**
|
|
2274
|
-
* Description of the task to be completed
|
|
2275
|
-
*/
|
|
2276
|
-
task: string;
|
|
2277
|
-
/**
|
|
2278
|
-
* Whether the task has been completed
|
|
2279
|
-
*/
|
|
2280
|
-
completed: boolean;
|
|
2281
|
-
/**
|
|
2282
|
-
* Timestamp when the task was marked as completed
|
|
2283
|
-
*/
|
|
2284
|
-
completedAt?: string;
|
|
2285
|
-
}
|
|
2286
2409
|
/**
|
|
2287
2410
|
* ObjectiveTimedOut is the terminal event written when an objective is
|
|
2288
2411
|
* finalized by the inactivity sweep because it saw no activity (no user
|
|
@@ -2363,6 +2486,12 @@ export interface ObjectiveToolCallInfo {
|
|
|
2363
2486
|
* short-lived signed URLs rather than inline bytes.
|
|
2364
2487
|
*/
|
|
2365
2488
|
export interface ObjectiveToolCallResult {
|
|
2489
|
+
/**
|
|
2490
|
+
* The result content as recorded — which is what the model was shown.
|
|
2491
|
+
* When a tool set overlay transformed the result (ToolOverlay
|
|
2492
|
+
* result_actions), this is the transformed content; the adapter's raw
|
|
2493
|
+
* response is kept in the tool call's debug log, not here.
|
|
2494
|
+
*/
|
|
2366
2495
|
content: Array<ObjectiveToolCallResult_ContentBlock>;
|
|
2367
2496
|
}
|
|
2368
2497
|
export interface ObjectiveToolCallResult_AudioBlock {
|
|
@@ -2408,6 +2537,11 @@ export interface ObjectiveToolCallResult_ImageBlock {
|
|
|
2408
2537
|
}
|
|
2409
2538
|
export interface ObjectiveToolCallResult_TextBlock {
|
|
2410
2539
|
text: string;
|
|
2540
|
+
/**
|
|
2541
|
+
* Size of the stored text in bytes. Filled by the server at record time;
|
|
2542
|
+
* zero on results recorded before this field existed.
|
|
2543
|
+
*/
|
|
2544
|
+
sizeBytes?: string;
|
|
2411
2545
|
}
|
|
2412
2546
|
/**
|
|
2413
2547
|
* Current status of the tool call
|
|
@@ -2535,6 +2669,78 @@ export interface OperationMetadata {
|
|
|
2535
2669
|
export interface Page {
|
|
2536
2670
|
nextCursor: string;
|
|
2537
2671
|
}
|
|
2672
|
+
/**
|
|
2673
|
+
* Default: ON_MISSING_FAIL.
|
|
2674
|
+
*/
|
|
2675
|
+
export type ParameterActionPinOnMissing = 'ON_MISSING_UNSPECIFIED' | 'ON_MISSING_FAIL' | 'ON_MISSING_SKIP';
|
|
2676
|
+
/**
|
|
2677
|
+
* Bind the parameter to one of the objective's pinned parameters. It is
|
|
2678
|
+
* deleted from the schema (including any `required` entry), and on every
|
|
2679
|
+
* call the pinned value is written into the arguments, overwriting
|
|
2680
|
+
* anything the model supplied.
|
|
2681
|
+
* This is the authoritative-value action: the model never sees the
|
|
2682
|
+
* parameter and cannot influence it.
|
|
2683
|
+
*
|
|
2684
|
+
* `pin` differs from `set` with `{{ pinned_parameters.key }}` only in
|
|
2685
|
+
* how a missing key is handled (see `on_missing`) and in intent —
|
|
2686
|
+
* reading the tool set config, `pin` says "this comes from the caller".
|
|
2687
|
+
*/
|
|
2688
|
+
export interface ParameterAction_Pin {
|
|
2689
|
+
path: string;
|
|
2690
|
+
/**
|
|
2691
|
+
* Key into the objective's pinned_parameters map. Need not equal the
|
|
2692
|
+
* last segment of `path` — this is how a pinned `orgId` reaches a
|
|
2693
|
+
* tool whose parameter is named `organizationId`.
|
|
2694
|
+
*/
|
|
2695
|
+
pinnedParameter: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* Default: ON_MISSING_FAIL.
|
|
2698
|
+
*/
|
|
2699
|
+
onMissing: ParameterActionPinOnMissing;
|
|
2700
|
+
}
|
|
2701
|
+
/**
|
|
2702
|
+
* Remove the parameter entirely. It is deleted from the schema
|
|
2703
|
+
* (including any `required` entry) and stripped from the arguments if
|
|
2704
|
+
* the model supplies it anyway. The tool receives no value for it — the
|
|
2705
|
+
* upstream default, if any, applies. Use this to save context on
|
|
2706
|
+
* parameters the model has no business setting (pagination cursors,
|
|
2707
|
+
* expansion flags, debug toggles).
|
|
2708
|
+
*/
|
|
2709
|
+
export interface ParameterAction_Remove {
|
|
2710
|
+
path: string;
|
|
2711
|
+
}
|
|
2712
|
+
/**
|
|
2713
|
+
* Force the parameter to a value. It is deleted from the schema
|
|
2714
|
+
* (including any `required` entry), and on every call the rendered
|
|
2715
|
+
* value is written into the arguments, overwriting anything the model
|
|
2716
|
+
* supplied.
|
|
2717
|
+
*
|
|
2718
|
+
* `value_template` is a Liquid template rendered against the objective:
|
|
2719
|
+
*
|
|
2720
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
2721
|
+
* {{ objective.id }} the objective's id
|
|
2722
|
+
* {{ objective.external_id }} the objective's external id
|
|
2723
|
+
* {{ objective.labels.<key> }} the objective's labels
|
|
2724
|
+
*
|
|
2725
|
+
* Templates render with strict variables: referencing a pinned
|
|
2726
|
+
* parameter or label that does not exist fails the call rather than
|
|
2727
|
+
* rendering an empty value.
|
|
2728
|
+
*
|
|
2729
|
+
* Tool set secrets are intentionally not exposed here: overlay-set
|
|
2730
|
+
* values are recorded as tool call arguments in events and tool call
|
|
2731
|
+
* history, and would leak. Use adapter headers for credentials.
|
|
2732
|
+
*
|
|
2733
|
+
* The rendered string is coerced to the parameter's declared schema
|
|
2734
|
+
* type: for a non-string parameter (integer, number, boolean, object,
|
|
2735
|
+
* array) the output is parsed as JSON. A value that fails to parse
|
|
2736
|
+
* errors the tool call. Prefer `pin` when the value is simply a pinned
|
|
2737
|
+
* parameter — it fails loudly when the key is absent instead of
|
|
2738
|
+
* rendering an empty string.
|
|
2739
|
+
*/
|
|
2740
|
+
export interface ParameterAction_Set {
|
|
2741
|
+
path: string;
|
|
2742
|
+
valueTemplate: string;
|
|
2743
|
+
}
|
|
2538
2744
|
/**
|
|
2539
2745
|
* Pause agent schedule request.
|
|
2540
2746
|
*/
|
|
@@ -2689,6 +2895,65 @@ export interface RestoreToolRequest {
|
|
|
2689
2895
|
*/
|
|
2690
2896
|
id?: string;
|
|
2691
2897
|
}
|
|
2898
|
+
/**
|
|
2899
|
+
* Default: ON_ERROR_RAW_CONTENT.
|
|
2900
|
+
*/
|
|
2901
|
+
export type ResultActionTransformOnError = 'ON_ERROR_UNSPECIFIED' | 'ON_ERROR_RAW_CONTENT' | 'ON_ERROR_FAIL';
|
|
2902
|
+
/**
|
|
2903
|
+
* Replace the result's text content with a rendered Liquid template.
|
|
2904
|
+
* Used to compact verbose responses to the fields the model actually
|
|
2905
|
+
* needs, or to rewrite a JSON response into a smaller JSON document.
|
|
2906
|
+
*
|
|
2907
|
+
* `content_template` is rendered against the call:
|
|
2908
|
+
*
|
|
2909
|
+
* {{ result.text }} the result's text content (text blocks
|
|
2910
|
+
* joined with newlines)
|
|
2911
|
+
* {{ result.json }} result.text parsed as JSON — objects and
|
|
2912
|
+
* arrays are navigable (`result.json.items`,
|
|
2913
|
+
* `| map: "id"`); absent when the text is not
|
|
2914
|
+
* valid JSON
|
|
2915
|
+
* {{ result.blocks }} every content block: [{type, text?,
|
|
2916
|
+
* mime_type?, size_bytes?}]
|
|
2917
|
+
* {{ parameters }} the arguments the tool was called with,
|
|
2918
|
+
* after parameter actions were applied
|
|
2919
|
+
* {{ tool.name }} the tool's metadata.name
|
|
2920
|
+
* {{ tool.llm_tool_name }} the name the model called it by
|
|
2921
|
+
* {{ pinned_parameters }} the objective's pinned parameters
|
|
2922
|
+
* {{ objective.id }} / {{ objective.external_id }} /
|
|
2923
|
+
* {{ objective.labels.<key> }}
|
|
2924
|
+
*
|
|
2925
|
+
* Templates render with strict variables: referencing `result.json` on
|
|
2926
|
+
* a non-JSON result, or any other undefined variable, is a render error
|
|
2927
|
+
* and `on_error` decides the outcome. The `json` filter pretty-prints a
|
|
2928
|
+
* value as JSON; `sanitized_json` emits it compact and escaped for
|
|
2929
|
+
* embedding.
|
|
2930
|
+
*
|
|
2931
|
+
* Transforms are text-only. `result.text` and `result.json` are built
|
|
2932
|
+
* from the result's text blocks; media blocks (images, audio) are opaque
|
|
2933
|
+
* to the template and pass through unchanged. The rendered text replaces
|
|
2934
|
+
* the text blocks as a single text block. A result with no text blocks
|
|
2935
|
+
* at all (an image-only or audio-only result) is out of scope: the
|
|
2936
|
+
* transform is skipped, the result is recorded as returned, and the
|
|
2937
|
+
* skip is noted in the tool call's debug log — this is not an `on_error`
|
|
2938
|
+
* case, nothing was attempted. The one exception is `expect_json`, where
|
|
2939
|
+
* a result with no text is a violated precondition and `on_error`
|
|
2940
|
+
* applies.
|
|
2941
|
+
*/
|
|
2942
|
+
export interface ResultAction_Transform {
|
|
2943
|
+
contentTemplate: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* Default: ON_ERROR_RAW_CONTENT.
|
|
2946
|
+
*/
|
|
2947
|
+
onError: ResultActionTransformOnError;
|
|
2948
|
+
/**
|
|
2949
|
+
* Require the tool result to have text content that parses as JSON
|
|
2950
|
+
* before rendering. A non-JSON (or text-less) result is then an error
|
|
2951
|
+
* subject to `on_error` even if the template never reads
|
|
2952
|
+
* `result.json`. Off by default: `result.json` is simply absent for
|
|
2953
|
+
* non-JSON results, and text-less results skip the transform.
|
|
2954
|
+
*/
|
|
2955
|
+
expectJson: boolean;
|
|
2956
|
+
}
|
|
2692
2957
|
/**
|
|
2693
2958
|
* Resume agent schedule request.
|
|
2694
2959
|
*/
|
|
@@ -2785,6 +3050,21 @@ export interface SearchToolsOrToolSetsResponse {
|
|
|
2785
3050
|
toolSets: Array<ToolSet>;
|
|
2786
3051
|
agents: Array<Agent>;
|
|
2787
3052
|
}
|
|
3053
|
+
/**
|
|
3054
|
+
* A single selector condition.
|
|
3055
|
+
*/
|
|
3056
|
+
export type Selector_Condition = Selector_Condition_Attribute | Selector_Condition_HasParameter | Selector_Condition_Tools;
|
|
3057
|
+
/**
|
|
3058
|
+
* An explicit list of tools, matched on spec.llm_tool_name — the name
|
|
3059
|
+
* the model calls the tool by. It identifies a tool across versions:
|
|
3060
|
+
* just-in-time MCP sets keep one tool per signature and every version
|
|
3061
|
+
* shares the LLM name, so the condition keeps matching as the source
|
|
3062
|
+
* evolves. Any name in the list matches (OR). Names of tools not (or
|
|
3063
|
+
* not yet) present in the set are allowed and match nothing.
|
|
3064
|
+
*/
|
|
3065
|
+
export interface Selector_ToolNames {
|
|
3066
|
+
names?: Array<string>;
|
|
3067
|
+
}
|
|
2788
3068
|
/**
|
|
2789
3069
|
* SetToolCallContentRequest lets an external API consumer supply the result
|
|
2790
3070
|
* of a bare tool call (one whose tool set has no execution adapter). Used
|
|
@@ -3120,6 +3400,12 @@ export interface ToolCalled {
|
|
|
3120
3400
|
* The arguments passed to the tool.
|
|
3121
3401
|
*/
|
|
3122
3402
|
arguments?: Record<string, unknown>;
|
|
3403
|
+
/**
|
|
3404
|
+
* Whether the runtime authorized this call's arguments to be exposed in
|
|
3405
|
+
* public widget events. This records the resolved policy at call time so
|
|
3406
|
+
* consumers do not need to re-evaluate the tool set's current overlays.
|
|
3407
|
+
*/
|
|
3408
|
+
argumentsExposedInWidgets?: boolean;
|
|
3123
3409
|
}
|
|
3124
3410
|
export interface ToolDenied {
|
|
3125
3411
|
/**
|
|
@@ -3145,9 +3431,194 @@ export interface ToolInfo {
|
|
|
3145
3431
|
* Content signature identifying the tool within its tool set: a hash of the
|
|
3146
3432
|
* sanitized llm_tool_name, description, and canonical parameters. Two tools
|
|
3147
3433
|
* with the same llm_tool_name but different parameters or description (as
|
|
3148
|
-
* MCP servers may return per user) have distinct signatures.
|
|
3434
|
+
* MCP servers may return per user) have distinct signatures. Computed over
|
|
3435
|
+
* the raw spec — overlays do not change a tool's signature.
|
|
3149
3436
|
*/
|
|
3150
3437
|
signature: string;
|
|
3438
|
+
/**
|
|
3439
|
+
* Keys of the tool set's overlays whose selectors match this tool
|
|
3440
|
+
* (ToolSetSpec.overlays), in evaluation order. Disabled overlays are
|
|
3441
|
+
* excluded. An overlay is listed when its selector matches even if none
|
|
3442
|
+
* of its actions changed this tool's schema (all its paths were absent),
|
|
3443
|
+
* so this answers "which policies apply to this tool" — diff
|
|
3444
|
+
* effective_parameters against spec.parameters for "what changed".
|
|
3445
|
+
* Empty when no overlay applies.
|
|
3446
|
+
*/
|
|
3447
|
+
overlays?: Array<string>;
|
|
3448
|
+
/**
|
|
3449
|
+
* The parameter schema as presented to the model: spec.parameters after
|
|
3450
|
+
* every matching overlay's parameter actions have been applied, in order,
|
|
3451
|
+
* including maintenance of the schema's `required` list. Actions whose
|
|
3452
|
+
* outcome depends on the objective (pin with ON_MISSING_SKIP) are applied
|
|
3453
|
+
* as if the pinned key were present, so this reflects the intended steady
|
|
3454
|
+
* state rather than any one objective. Equals spec.parameters when no
|
|
3455
|
+
* overlay applies. Result actions have no effect here.
|
|
3456
|
+
*/
|
|
3457
|
+
effectiveParameters?: Record<string, unknown>;
|
|
3458
|
+
}
|
|
3459
|
+
/**
|
|
3460
|
+
* A tool overlay is a policy attached to a tool set that reshapes the tools
|
|
3461
|
+
* the model sees and calls. It pairs a selector (which tools it applies to)
|
|
3462
|
+
* with actions that run before a call — rewriting the tool's parameter
|
|
3463
|
+
* schema and the arguments the model supplied — and after a call —
|
|
3464
|
+
* rewriting the result before it enters the model's context. It can also
|
|
3465
|
+
* explicitly allow the final call arguments to cross the otherwise-private
|
|
3466
|
+
* widget API boundary.
|
|
3467
|
+
*
|
|
3468
|
+
* Overlays exist for three reasons:
|
|
3469
|
+
*
|
|
3470
|
+
* - Authority. Adapter-derived tool sets (OpenAPI especially) expose many
|
|
3471
|
+
* parameters the model must never guess — a workspace id, a tenant id,
|
|
3472
|
+
* an account scope. Overlays bind those parameters to the objective's
|
|
3473
|
+
* `pinned_parameters` (see CreateObjectiveRequest.pinned_parameters):
|
|
3474
|
+
* the parameter disappears from the schema and the value is forced
|
|
3475
|
+
* server-side, so the model has no opportunity to supply a different
|
|
3476
|
+
* one.
|
|
3477
|
+
* - Context. Large specs carry pagination cursors, expansion flags and
|
|
3478
|
+
* verbose responses that cost tokens without helping the model.
|
|
3479
|
+
* Overlays strip parameters, fix them to literals, and compact results.
|
|
3480
|
+
* - Widget presentation. Tool arguments are private by default. An overlay
|
|
3481
|
+
* can opt matching tools into exposing their final call arguments in
|
|
3482
|
+
* visitor-facing widget events so an embedding UI can select a custom
|
|
3483
|
+
* renderer or presentation.
|
|
3484
|
+
*
|
|
3485
|
+
* Pinned parameters and overlays are complementary: pinned parameters are
|
|
3486
|
+
* *data* supplied per objective (or per widget session) by the caller;
|
|
3487
|
+
* overlays are *policy* authored once on the tool set. Pinning by name
|
|
3488
|
+
* still works without an overlay — a pinned key that matches a top-level
|
|
3489
|
+
* parameter name is applied to every tool in the objective — overlays are
|
|
3490
|
+
* for the cases that needs more: nested paths, renamed keys, a subset of
|
|
3491
|
+
* tools, or values that are literals rather than caller-supplied.
|
|
3492
|
+
*
|
|
3493
|
+
* Evaluation model:
|
|
3494
|
+
*
|
|
3495
|
+
* - Overlays are evaluated in list order; within an overlay, actions are
|
|
3496
|
+
* evaluated in list order. Later actions win on the same path (a `set`
|
|
3497
|
+
* followed by a `remove` leaves the parameter removed).
|
|
3498
|
+
* - The parameter schema the model sees is computed when tools are
|
|
3499
|
+
* assembled for an objective, so pre-call actions can consult that
|
|
3500
|
+
* objective's pinned parameters (this is what makes `pin` with
|
|
3501
|
+
* ON_MISSING_SKIP meaningful). Argument rewriting runs on every call.
|
|
3502
|
+
* - An action whose `path` does not exist in the tool's parameter schema
|
|
3503
|
+
* changes nothing in the schema the model sees. This is deliberate: a
|
|
3504
|
+
* broad selector (every `list_*` tool) may match tools with different
|
|
3505
|
+
* shapes, and one overlay should be able to cover all of them without
|
|
3506
|
+
* erroring on the ones that lack a given parameter. At call time the
|
|
3507
|
+
* model's arguments can still not widen what it controls: `remove`
|
|
3508
|
+
* strips the path whether or not it is declared, and `set`/`pin`
|
|
3509
|
+
* overwrite a value the model sent at an undeclared path (a schema this
|
|
3510
|
+
* evaluator cannot see through, e.g. behind $ref/allOf) while injecting
|
|
3511
|
+
* nothing into tools that lack the parameter.
|
|
3512
|
+
* - Overlays apply to just-in-time tool sets as well; the tools are
|
|
3513
|
+
* evaluated against overlays at the moment they are loaded.
|
|
3514
|
+
* - Result actions run once, when the tool call's result is recorded; the
|
|
3515
|
+
* stored result is the transformed one, so every reader (the model,
|
|
3516
|
+
* compaction, the API) sees the same content. They are not supported on
|
|
3517
|
+
* bare tool sets.
|
|
3518
|
+
*/
|
|
3519
|
+
export interface ToolOverlay {
|
|
3520
|
+
/**
|
|
3521
|
+
* Identifies the overlay within its tool set. Unique across the tool
|
|
3522
|
+
* set's overlays (enforced by the server), stable across reorders, and
|
|
3523
|
+
* surfaced in tool call messages ("parameter removed by overlay
|
|
3524
|
+
* strip-list-knobs") so an operator can trace a rewritten call back to
|
|
3525
|
+
* the policy that rewrote it. Referenced by ToolInfo.overlays and the
|
|
3526
|
+
* ListToolsRequest.overlays filter.
|
|
3527
|
+
*/
|
|
3528
|
+
key: string;
|
|
3529
|
+
/**
|
|
3530
|
+
* Which tools this overlay applies to. Required; an empty selector
|
|
3531
|
+
* (no conditions) matches every tool in the set.
|
|
3532
|
+
*/
|
|
3533
|
+
selector: ToolOverlay_Selector;
|
|
3534
|
+
/**
|
|
3535
|
+
* Pre-call actions, applied in order. See ParameterAction.
|
|
3536
|
+
*/
|
|
3537
|
+
parameterActions?: Array<ToolOverlay_ParameterAction>;
|
|
3538
|
+
/**
|
|
3539
|
+
* Post-call actions, applied in order. See ResultAction.
|
|
3540
|
+
*/
|
|
3541
|
+
resultActions?: Array<ToolOverlay_ResultAction>;
|
|
3542
|
+
/**
|
|
3543
|
+
* When true the overlay is retained in the spec but not evaluated. Lets an
|
|
3544
|
+
* operator switch a policy off to diagnose a misbehaving tool without
|
|
3545
|
+
* deleting it and losing the configuration.
|
|
3546
|
+
*/
|
|
3547
|
+
disabled: boolean;
|
|
3548
|
+
/**
|
|
3549
|
+
* Arguments may carry sensitive customer data, including values injected by
|
|
3550
|
+
* parameter actions, so they stay private unless an overlay enables them.
|
|
3551
|
+
*
|
|
3552
|
+
* Unset means this overlay has no opinion. When several enabled overlays
|
|
3553
|
+
* match a tool, they are evaluated in list order and the last overlay that
|
|
3554
|
+
* supplies this policy wins. If none supplies it, arguments stay private.
|
|
3555
|
+
* Disabled overlays never participate.
|
|
3556
|
+
*/
|
|
3557
|
+
widgetArgumentExposure?: ToolOverlay_WidgetArgumentExposure;
|
|
3558
|
+
}
|
|
3559
|
+
/**
|
|
3560
|
+
* A pre-call action. Parameter actions rewrite the tool's parameter
|
|
3561
|
+
* schema as presented to the model and the arguments the model supplies
|
|
3562
|
+
* when it calls the tool. Both sides are always kept in agreement: a
|
|
3563
|
+
* parameter that is hidden from the schema is also stripped from (or
|
|
3564
|
+
* forced in) the arguments, so the model can neither see nor smuggle it.
|
|
3565
|
+
*/
|
|
3566
|
+
export type ToolOverlay_ParameterAction = ToolOverlay_ParameterAction_Remove | ToolOverlay_ParameterAction_Set | ToolOverlay_ParameterAction_Pin;
|
|
3567
|
+
/**
|
|
3568
|
+
* A dotted path into a tool's parameter schema. Each segment is a property
|
|
3569
|
+
* name; the path `filter.workspaceId` addresses
|
|
3570
|
+
* `properties.filter.properties.workspaceId` in the schema and
|
|
3571
|
+
* `arguments.filter.workspaceId` in the call. Only object properties are
|
|
3572
|
+
* addressable — there is no array indexing, wildcarding or filtering.
|
|
3573
|
+
*
|
|
3574
|
+
* This is deliberately not JSONPath: every action needs a single,
|
|
3575
|
+
* unambiguous location in both the schema and the arguments so that
|
|
3576
|
+
* removing a parameter from the schema and stripping it from the call are
|
|
3577
|
+
* guaranteed to agree.
|
|
3578
|
+
*/
|
|
3579
|
+
export interface ToolOverlay_ParameterPath {
|
|
3580
|
+
path: string;
|
|
3581
|
+
}
|
|
3582
|
+
/**
|
|
3583
|
+
* A post-call action. Result actions rewrite a tool call's result after
|
|
3584
|
+
* the adapter returns and before it is recorded: the transformed content
|
|
3585
|
+
* is what is stored and what the model reads (ObjectiveToolCallResult
|
|
3586
|
+
* content). The adapter's raw response is kept in the tool call's debug
|
|
3587
|
+
* log for operators; it is not otherwise retained.
|
|
3588
|
+
*
|
|
3589
|
+
* Result actions apply to MCP, OpenAPI and HTTP tool sets. They are not
|
|
3590
|
+
* supported on bare tool sets — a bare tool's content is supplied by an
|
|
3591
|
+
* external consumer, so there is nothing for the platform to reshape —
|
|
3592
|
+
* and a tool set whose adapter is `bare` rejects overlays that carry
|
|
3593
|
+
* result actions.
|
|
3594
|
+
*
|
|
3595
|
+
* When several matching overlays carry transforms they run in overlay
|
|
3596
|
+
* order, each one reading the previous one's output.
|
|
3597
|
+
*/
|
|
3598
|
+
export type ToolOverlay_ResultAction = ToolOverlay_ResultAction_Transform;
|
|
3599
|
+
/**
|
|
3600
|
+
* Default: OPERATOR_AND.
|
|
3601
|
+
*/
|
|
3602
|
+
export type ToolOverlaySelectorOperator = 'OPERATOR_UNSPECIFIED' | 'OPERATOR_AND' | 'OPERATOR_OR';
|
|
3603
|
+
/**
|
|
3604
|
+
* Which tools in the tool set an overlay applies to. Conditions are
|
|
3605
|
+
* combined with `operator`; an overlay with no conditions matches every
|
|
3606
|
+
* tool in the set.
|
|
3607
|
+
*/
|
|
3608
|
+
export interface ToolOverlay_Selector {
|
|
3609
|
+
conditions?: Array<Selector_Condition>;
|
|
3610
|
+
/**
|
|
3611
|
+
* Default: OPERATOR_AND.
|
|
3612
|
+
*/
|
|
3613
|
+
operator: ToolOverlaySelectorOperator;
|
|
3614
|
+
}
|
|
3615
|
+
/**
|
|
3616
|
+
* Controls whether matching tool calls may expose their final arguments to
|
|
3617
|
+
* visitor-facing widget events. The containing message's presence means the
|
|
3618
|
+
* overlay has an opinion; enabled selects whether that opinion is on or off.
|
|
3619
|
+
*/
|
|
3620
|
+
export interface ToolOverlay_WidgetArgumentExposure {
|
|
3621
|
+
enabled: boolean;
|
|
3151
3622
|
}
|
|
3152
3623
|
export interface ToolResult {
|
|
3153
3624
|
toolCallId: string;
|
|
@@ -3181,7 +3652,7 @@ export type ToolSetAdapter = ToolSetAdapter_McpVariant | ToolSetAdapter_HttpVari
|
|
|
3181
3652
|
* Approval filters that will automatically set the approval requirement on tools synced from an external source
|
|
3182
3653
|
*/
|
|
3183
3654
|
export type ToolSetAdapter_ApprovalRequirementFilter = ToolSetAdapter_ApprovalRequirementFilter_Always | ToolSetAdapter_ApprovalRequirementFilter_Only;
|
|
3184
|
-
export type ToolSetAdapterAttributeFilterAttribute = 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION';
|
|
3655
|
+
export type ToolSetAdapterAttributeFilterAttribute = 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION' | 'ATTRIBUTE_LLM_TOOL_NAME';
|
|
3185
3656
|
/**
|
|
3186
3657
|
* Single attribute filter
|
|
3187
3658
|
*/
|
|
@@ -3205,6 +3676,27 @@ export interface ToolSetAdapter_Bare {
|
|
|
3205
3676
|
contentTimeout?: number;
|
|
3206
3677
|
}
|
|
3207
3678
|
export interface ToolSetAdapter_HTTP {
|
|
3679
|
+
/**
|
|
3680
|
+
* Base URL for dispatching tool calls.
|
|
3681
|
+
*
|
|
3682
|
+
* May be templated. Two reference forms are supported, and they resolve
|
|
3683
|
+
* in a single pass each so neither can inject into the other:
|
|
3684
|
+
*
|
|
3685
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
3686
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
3687
|
+
* (see CreateObjectiveRequest.pinned_parameters)
|
|
3688
|
+
*
|
|
3689
|
+
* Pinned parameters are what make a per-tenant host possible: one tool
|
|
3690
|
+
* set can serve every customer of a product that assigns each of them
|
|
3691
|
+
* their own subdomain, e.g.
|
|
3692
|
+
*
|
|
3693
|
+
* https://{{ pinned_parameters.tenant }}.example.com
|
|
3694
|
+
*
|
|
3695
|
+
* Because the value may be a template rather than a literal URL, this
|
|
3696
|
+
* field is not constrained to a URI shape. It is validated as an
|
|
3697
|
+
* absolute http(s) URL after references are resolved, both on write
|
|
3698
|
+
* (with references stubbed) and again before each tool call.
|
|
3699
|
+
*/
|
|
3208
3700
|
baseUrl?: string;
|
|
3209
3701
|
headers?: Record<string, string>;
|
|
3210
3702
|
}
|
|
@@ -3305,6 +3797,15 @@ export interface ToolSetSecretSpec {
|
|
|
3305
3797
|
export interface ToolSetSpec {
|
|
3306
3798
|
description?: string;
|
|
3307
3799
|
adapter: ToolSetAdapter;
|
|
3800
|
+
/**
|
|
3801
|
+
* Overlays applied to this tool set's tools, evaluated in order. See
|
|
3802
|
+
* ToolOverlay. Overlay keys must be unique within the list.
|
|
3803
|
+
*
|
|
3804
|
+
* As a repeated field this is replaced wholesale on update: an
|
|
3805
|
+
* update_mask of `spec.overlays` swaps the entire list for the one in the
|
|
3806
|
+
* request. Read-modify-write to add or remove a single overlay.
|
|
3807
|
+
*/
|
|
3808
|
+
overlays?: Array<ToolOverlay>;
|
|
3308
3809
|
}
|
|
3309
3810
|
/**
|
|
3310
3811
|
* ToolSetUsage describes one agent variation that uses the tool set (or, when
|
|
@@ -3339,8 +3840,9 @@ export interface ToolSpec {
|
|
|
3339
3840
|
*/
|
|
3340
3841
|
parameters: Record<string, unknown>;
|
|
3341
3842
|
/**
|
|
3342
|
-
* Configuration for this specific tool.
|
|
3343
|
-
* such as endpoint
|
|
3843
|
+
* Configuration for this specific tool. Its transport is derived from the
|
|
3844
|
+
* tool set adapter, while details such as endpoint and method are stored on
|
|
3845
|
+
* the tool itself.
|
|
3344
3846
|
*
|
|
3345
3847
|
* Required, and exactly one adapter must be set.
|
|
3346
3848
|
*/
|
|
@@ -3427,6 +3929,11 @@ export interface UpdateAIProviderKeyRequest {
|
|
|
3427
3929
|
* Fields to update.
|
|
3428
3930
|
*/
|
|
3429
3931
|
updateMask?: string;
|
|
3932
|
+
/**
|
|
3933
|
+
* Field-level credential changes. This is independent of update_mask;
|
|
3934
|
+
* legacy clients may continue replacing spec.credentials atomically.
|
|
3935
|
+
*/
|
|
3936
|
+
credentialPatch?: AIProviderCredentialPatch;
|
|
3430
3937
|
}
|
|
3431
3938
|
export interface UpdateAPIKeyRequest {
|
|
3432
3939
|
/**
|
|
@@ -3577,6 +4084,41 @@ export interface UpdateMemoryLayerRequest {
|
|
|
3577
4084
|
spec?: MemoryLayerSpec;
|
|
3578
4085
|
updateMask?: string;
|
|
3579
4086
|
}
|
|
4087
|
+
/**
|
|
4088
|
+
* Update model request. update_mask must list leaf paths: metadata.name,
|
|
4089
|
+
* metadata.external_id, metadata.labels, spec.provider_model_id,
|
|
4090
|
+
* spec.provider, spec.family, spec.max_input_tokens, spec.max_output_tokens,
|
|
4091
|
+
* spec.capabilities, pricing_override.input_price_per_million_tokens, and
|
|
4092
|
+
* pricing_override.output_price_per_million_tokens. Synced models
|
|
4093
|
+
* (PROVENANCE_SYNCED_FROM_PROVIDER) reject metadata.name and spec.* paths.
|
|
4094
|
+
* spec price fields are never writable; price changes go through
|
|
4095
|
+
* pricing_override, where a masked-but-absent field clears the override.
|
|
4096
|
+
* Metadata and spec must be present when their respective paths are masked.
|
|
4097
|
+
*/
|
|
4098
|
+
export interface UpdateModelRequest {
|
|
4099
|
+
/**
|
|
4100
|
+
* Workspace ID.
|
|
4101
|
+
*/
|
|
4102
|
+
workspaceId?: string;
|
|
4103
|
+
/**
|
|
4104
|
+
* Model ID. Accepts the canonical `model_…` form or the `external_id:<value>` form.
|
|
4105
|
+
*/
|
|
4106
|
+
id?: string;
|
|
4107
|
+
metadata?: UpdateResourceMetadata;
|
|
4108
|
+
/**
|
|
4109
|
+
* When any spec.* path is masked, send the complete spec (current values
|
|
4110
|
+
* plus edits); it is validated as a whole.
|
|
4111
|
+
*/
|
|
4112
|
+
spec?: ModelSpec;
|
|
4113
|
+
/**
|
|
4114
|
+
* Customer price overrides, applied per masked path.
|
|
4115
|
+
*/
|
|
4116
|
+
pricingOverride?: ModelPricingOverride;
|
|
4117
|
+
/**
|
|
4118
|
+
* Fields to update. Required; leaf paths only.
|
|
4119
|
+
*/
|
|
4120
|
+
updateMask?: string;
|
|
4121
|
+
}
|
|
3580
4122
|
/**
|
|
3581
4123
|
* UpdateResourceMetadata contains the user-provided fields for updating
|
|
3582
4124
|
* a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id,
|
|
@@ -3800,6 +4342,14 @@ export interface VariationMemoryLayerAssignment {
|
|
|
3800
4342
|
*/
|
|
3801
4343
|
position: number;
|
|
3802
4344
|
}
|
|
4345
|
+
/**
|
|
4346
|
+
* VertexConfig configures the Google Cloud project and location used by the
|
|
4347
|
+
* Vertex AI backend. Both are required for service-account authentication.
|
|
4348
|
+
*/
|
|
4349
|
+
export interface VertexConfig {
|
|
4350
|
+
projectId?: string;
|
|
4351
|
+
location?: string;
|
|
4352
|
+
}
|
|
3803
4353
|
export interface WebhookDelivery {
|
|
3804
4354
|
metadata: OperationMetadata;
|
|
3805
4355
|
/**
|
|
@@ -3999,13 +4549,13 @@ export interface WidgetSessionSpec {
|
|
|
3999
4549
|
tokenExpiresAt?: string;
|
|
4000
4550
|
/**
|
|
4001
4551
|
* Parameters forced onto tool calls made by this session's conversations.
|
|
4002
|
-
* A pinned parameter is
|
|
4003
|
-
* is
|
|
4004
|
-
*
|
|
4005
|
-
*
|
|
4006
|
-
*
|
|
4007
|
-
*
|
|
4008
|
-
*
|
|
4552
|
+
* A pinned parameter is removed from the tool schema the LLM sees, and its
|
|
4553
|
+
* value is always overwritten server-side with the pinned value — so the
|
|
4554
|
+
* model cannot be tricked into calling a tool with a different id than the
|
|
4555
|
+
* one the session was minted for (e.g. pin "workspaceId" for an OpenAPI
|
|
4556
|
+
* tool with a /workspaces/{workspaceId} path). Flows to every objective
|
|
4557
|
+
* the session creates. See ToolSetSpec.overlays for binding pinned keys to
|
|
4558
|
+
* nested or differently named parameters.
|
|
4009
4559
|
*/
|
|
4010
4560
|
pinnedParameters?: Record<string, string>;
|
|
4011
4561
|
}
|
|
@@ -4239,6 +4789,17 @@ export interface ToolSetAdapter_OpenAPI_Url {
|
|
|
4239
4789
|
/**
|
|
4240
4790
|
* Base URL for dispatching tool calls. If set, overrides the server
|
|
4241
4791
|
* resolved from the spec's servers array.
|
|
4792
|
+
*
|
|
4793
|
+
* May be templated with the same two reference forms the HTTP adapter's
|
|
4794
|
+
* base_url accepts:
|
|
4795
|
+
*
|
|
4796
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
4797
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
4798
|
+
*
|
|
4799
|
+
* A spec written against a single host can therefore be dispatched to a
|
|
4800
|
+
* per-tenant one, e.g. https://{{ pinned_parameters.tenant }}.example.com,
|
|
4801
|
+
* without cloning the tool set per customer. Validated as an absolute
|
|
4802
|
+
* http(s) URL after references are resolved rather than as a literal URI.
|
|
4242
4803
|
*/
|
|
4243
4804
|
baseUrl?: string;
|
|
4244
4805
|
/**
|
|
@@ -4265,6 +4826,17 @@ export interface ToolSetAdapter_OpenAPI_UploadId {
|
|
|
4265
4826
|
/**
|
|
4266
4827
|
* Base URL for dispatching tool calls. If set, overrides the server
|
|
4267
4828
|
* resolved from the spec's servers array.
|
|
4829
|
+
*
|
|
4830
|
+
* May be templated with the same two reference forms the HTTP adapter's
|
|
4831
|
+
* base_url accepts:
|
|
4832
|
+
*
|
|
4833
|
+
* ${SECRET_NAME} a workspace or tool set secret
|
|
4834
|
+
* {{ pinned_parameters.<key> }} the objective's pinned parameters
|
|
4835
|
+
*
|
|
4836
|
+
* A spec written against a single host can therefore be dispatched to a
|
|
4837
|
+
* per-tenant one, e.g. https://{{ pinned_parameters.tenant }}.example.com,
|
|
4838
|
+
* without cloning the tool set per customer. Validated as an absolute
|
|
4839
|
+
* http(s) URL after references are resolved rather than as a literal URI.
|
|
4268
4840
|
*/
|
|
4269
4841
|
baseUrl?: string;
|
|
4270
4842
|
/**
|
|
@@ -4275,6 +4847,48 @@ export interface ToolSetAdapter_OpenAPI_UploadId {
|
|
|
4275
4847
|
*/
|
|
4276
4848
|
serverName?: string;
|
|
4277
4849
|
}
|
|
4850
|
+
export interface Selector_Condition_Attribute {
|
|
4851
|
+
type: 'attribute';
|
|
4852
|
+
/**
|
|
4853
|
+
* Match on a tool attribute (name, title, description,
|
|
4854
|
+
* llm_tool_name) with a string matcher — the same filter used by
|
|
4855
|
+
* the adapter's include/exclude lists.
|
|
4856
|
+
*/
|
|
4857
|
+
attribute: ToolSetAdapter_AttributeFilter;
|
|
4858
|
+
}
|
|
4859
|
+
export interface Selector_Condition_HasParameter {
|
|
4860
|
+
type: 'hasParameter';
|
|
4861
|
+
/**
|
|
4862
|
+
* Match tools whose parameter schema contains the given path. This
|
|
4863
|
+
* is the usual way to target "every tool that takes a workspaceId"
|
|
4864
|
+
* without enumerating tools by name.
|
|
4865
|
+
*/
|
|
4866
|
+
hasParameter: ToolOverlay_ParameterPath;
|
|
4867
|
+
}
|
|
4868
|
+
export interface Selector_Condition_Tools {
|
|
4869
|
+
type: 'tools';
|
|
4870
|
+
/**
|
|
4871
|
+
* Match specific tools by LLM tool name. The direct way to assign an
|
|
4872
|
+
* overlay to one tool (or a handful) without writing a matcher.
|
|
4873
|
+
*/
|
|
4874
|
+
tools: Selector_ToolNames;
|
|
4875
|
+
}
|
|
4876
|
+
export interface ToolOverlay_ParameterAction_Remove {
|
|
4877
|
+
type: 'remove';
|
|
4878
|
+
remove: ParameterAction_Remove;
|
|
4879
|
+
}
|
|
4880
|
+
export interface ToolOverlay_ParameterAction_Set {
|
|
4881
|
+
type: 'set';
|
|
4882
|
+
set: ParameterAction_Set;
|
|
4883
|
+
}
|
|
4884
|
+
export interface ToolOverlay_ParameterAction_Pin {
|
|
4885
|
+
type: 'pin';
|
|
4886
|
+
pin: ParameterAction_Pin;
|
|
4887
|
+
}
|
|
4888
|
+
export interface ToolOverlay_ResultAction_Transform {
|
|
4889
|
+
type: 'transform';
|
|
4890
|
+
transform: ResultAction_Transform;
|
|
4891
|
+
}
|
|
4278
4892
|
export interface ToolSpec_Config_Http {
|
|
4279
4893
|
type: 'http';
|
|
4280
4894
|
http: Config_HTTP;
|
|
@@ -4478,6 +5092,22 @@ export interface AIProviderCredential_Headers {
|
|
|
4478
5092
|
*/
|
|
4479
5093
|
headers: CredentialHeaders;
|
|
4480
5094
|
}
|
|
5095
|
+
export interface AIProviderCredential_GoogleServiceAccount {
|
|
5096
|
+
type: 'googleServiceAccount';
|
|
5097
|
+
/**
|
|
5098
|
+
* Google service-account JSON for Vertex AI. The server accepts only the
|
|
5099
|
+
* service_account credential type and never writes the JSON to plaintext
|
|
5100
|
+
* storage.
|
|
5101
|
+
*/
|
|
5102
|
+
googleServiceAccount: CredentialGoogleServiceAccount;
|
|
5103
|
+
}
|
|
5104
|
+
export interface AIProviderCredential_AwsAccessKey {
|
|
5105
|
+
type: 'awsAccessKey';
|
|
5106
|
+
/**
|
|
5107
|
+
* AWS access credentials for Bedrock SigV4 authentication.
|
|
5108
|
+
*/
|
|
5109
|
+
awsAccessKey: CredentialAWSAccessKey;
|
|
5110
|
+
}
|
|
4481
5111
|
export interface AIProviderConfig_Openrouter {
|
|
4482
5112
|
type: 'openrouter';
|
|
4483
5113
|
openrouter: OpenRouterConfig;
|
|
@@ -4490,6 +5120,14 @@ export interface AIProviderConfig_OpenaiCompatible {
|
|
|
4490
5120
|
type: 'openaiCompatible';
|
|
4491
5121
|
openaiCompatible: OpenAICompatibleConfig;
|
|
4492
5122
|
}
|
|
5123
|
+
export interface AIProviderConfig_Vertex {
|
|
5124
|
+
type: 'vertex';
|
|
5125
|
+
vertex: VertexConfig;
|
|
5126
|
+
}
|
|
5127
|
+
export interface AIProviderConfig_Bedrock {
|
|
5128
|
+
type: 'bedrock';
|
|
5129
|
+
bedrock: BedrockConfig;
|
|
5130
|
+
}
|
|
4493
5131
|
export interface ModelSpec_Capability_Temperature {
|
|
4494
5132
|
type: 'temperature';
|
|
4495
5133
|
temperature: Capability_Temperature;
|
|
@@ -4598,13 +5236,13 @@ export interface WidgetSessionSpecParam {
|
|
|
4598
5236
|
expiresAt?: string;
|
|
4599
5237
|
/**
|
|
4600
5238
|
* Parameters forced onto tool calls made by this session's conversations.
|
|
4601
|
-
* A pinned parameter is
|
|
4602
|
-
* is
|
|
4603
|
-
*
|
|
4604
|
-
*
|
|
4605
|
-
*
|
|
4606
|
-
*
|
|
4607
|
-
*
|
|
5239
|
+
* A pinned parameter is removed from the tool schema the LLM sees, and its
|
|
5240
|
+
* value is always overwritten server-side with the pinned value — so the
|
|
5241
|
+
* model cannot be tricked into calling a tool with a different id than the
|
|
5242
|
+
* one the session was minted for (e.g. pin "workspaceId" for an OpenAPI
|
|
5243
|
+
* tool with a /workspaces/{workspaceId} path). Flows to every objective
|
|
5244
|
+
* the session creates. See ToolSetSpec.overlays for binding pinned keys to
|
|
5245
|
+
* nested or differently named parameters.
|
|
4608
5246
|
*/
|
|
4609
5247
|
pinnedParameters?: Record<string, string>;
|
|
4610
5248
|
}
|