@soat/sdk 0.30.1 → 0.32.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/dist/index.cjs +1 -1
- package/dist/index.d.cts +83 -16
- package/dist/index.d.mts +83 -16
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3655,7 +3655,7 @@ var Tools = class {
|
|
|
3655
3655
|
*
|
|
3656
3656
|
* Directly invokes a tool and returns its output. Supported for `http`, `builtin`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
|
|
3657
3657
|
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. When a `builtin` or `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
|
|
3658
|
-
* `preset_parameters` stored on the tool are
|
|
3658
|
+
* `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
|
|
3659
3659
|
*
|
|
3660
3660
|
*/
|
|
3661
3661
|
static callTool(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1879,6 +1879,12 @@ type EvalRun = {
|
|
|
1879
1879
|
item_count?: number;
|
|
1880
1880
|
completed_count?: number;
|
|
1881
1881
|
errored_count?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* The caller-owned key/value metadata supplied when the run was started, returned verbatim. Null when the run was started without any (a trigger-started run included — see `trigger_id` for that provenance). The server writes nothing here.
|
|
1884
|
+
*/
|
|
1885
|
+
metadata?: {
|
|
1886
|
+
[key: string]: unknown;
|
|
1887
|
+
} | null;
|
|
1882
1888
|
started_at?: Date | null;
|
|
1883
1889
|
finished_at?: Date | null;
|
|
1884
1890
|
created_at?: Date;
|
|
@@ -1916,7 +1922,7 @@ type ExceptionItem = {
|
|
|
1916
1922
|
/**
|
|
1917
1923
|
* How the exception was filed
|
|
1918
1924
|
*/
|
|
1919
|
-
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'manual';
|
|
1925
|
+
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'event_trigger_loop' | 'manual';
|
|
1920
1926
|
/**
|
|
1921
1927
|
* Human-readable one-line summary
|
|
1922
1928
|
*/
|
|
@@ -2684,7 +2690,7 @@ type WebhookResourceProperties = {
|
|
|
2684
2690
|
events: Array<string>;
|
|
2685
2691
|
};
|
|
2686
2692
|
/**
|
|
2687
|
-
* Binds a starter (manual, webhook, or
|
|
2693
|
+
* Binds a starter (manual, webhook, schedule, or event) to an executable target (orchestration, agent, tool, or eval). Firings run under the project owner's confined run-as identity.
|
|
2688
2694
|
*/
|
|
2689
2695
|
type TriggerResourceProperties = {
|
|
2690
2696
|
/**
|
|
@@ -2698,7 +2704,7 @@ type TriggerResourceProperties = {
|
|
|
2698
2704
|
/**
|
|
2699
2705
|
* Starter type. Immutable after creation
|
|
2700
2706
|
*/
|
|
2701
|
-
type: 'manual' | 'webhook' | 'schedule';
|
|
2707
|
+
type: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
2702
2708
|
/**
|
|
2703
2709
|
* The kind of resource this trigger activates
|
|
2704
2710
|
*/
|
|
@@ -2721,6 +2727,10 @@ type TriggerResourceProperties = {
|
|
|
2721
2727
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
2722
2728
|
*/
|
|
2723
2729
|
cron?: string | null;
|
|
2730
|
+
/**
|
|
2731
|
+
* Internal-event subscription pattern (`*`, `prefix.*`, or an exact event name). Required when type is event, rejected otherwise
|
|
2732
|
+
*/
|
|
2733
|
+
event_pattern?: string | null;
|
|
2724
2734
|
/**
|
|
2725
2735
|
* Whether the trigger fires (default true)
|
|
2726
2736
|
*/
|
|
@@ -3095,9 +3105,12 @@ type GuardrailResourceProperties = {
|
|
|
3095
3105
|
};
|
|
3096
3106
|
type ResourceDeclaration = {
|
|
3097
3107
|
/**
|
|
3098
|
-
* Resource type
|
|
3108
|
+
* Resource type. The built-in types are `ai_provider`, `tool`, `agent`, `actor`, `api_key`, `chat`, `conversation`, `dataset`, `dataset_item`, `document`, `file`, `guardrail`, `ingestion_rule`, `memory`, `memory_entry`, `model_route`, `eval`, `orchestration`, `policy`, `project_price`, `quota`, `secret`, `session`, `webhook`, `trigger` and `workflow`.
|
|
3109
|
+
*
|
|
3110
|
+
* This is deliberately not an enum: a deployment operator can register additional resource types backed by their own handler, and those are declared here exactly like a built-in one. The set a given deployment accepts is authoritative in the server, which rejects an unregistered type with `VALIDATION_FAILED` and lists what it does support.
|
|
3111
|
+
*
|
|
3099
3112
|
*/
|
|
3100
|
-
type:
|
|
3113
|
+
type: string;
|
|
3101
3114
|
/**
|
|
3102
3115
|
* Resource properties, as authored in the template and echoed back verbatim. The allowed fields, required fields, and field types for each resource `type` are defined by the corresponding `<Type>ResourceProperties` schema in this document (e.g. `model_route` → `ModelRouteResourceProperties`), which the server enforces at validate/deploy time. The declaration itself is free-form here because property values may be substitution expressions rather than final values: `{ "ref": "logicalId" }` references another resource's physical ID, `{ "param": "ParamName" }` substitutes a parameter value, and `{ "sub": "text ${ParamName}" }` interpolates parameters into a string.
|
|
3103
3116
|
*
|
|
@@ -4574,6 +4587,12 @@ type OrchestrationRun = {
|
|
|
4574
4587
|
tool_context?: {
|
|
4575
4588
|
[key: string]: string;
|
|
4576
4589
|
} | null;
|
|
4590
|
+
/**
|
|
4591
|
+
* The caller-owned key/value metadata supplied at run creation, returned verbatim. Null when the run was started without any. The server writes nothing here and no key is reserved; the bag is never merged into `state`, so nothing in it reaches the graph.
|
|
4592
|
+
*/
|
|
4593
|
+
metadata?: {
|
|
4594
|
+
[key: string]: unknown;
|
|
4595
|
+
} | null;
|
|
4577
4596
|
/**
|
|
4578
4597
|
* Terminal node artifact(s) when the run has succeeded.
|
|
4579
4598
|
*/
|
|
@@ -4712,6 +4731,16 @@ type StartRunRequest = {
|
|
|
4712
4731
|
tool_context?: {
|
|
4713
4732
|
[key: string]: string;
|
|
4714
4733
|
};
|
|
4734
|
+
/**
|
|
4735
|
+
* Caller-supplied key/value metadata attached to the run record for per-run attribution (e.g. which of your own tenants this run belongs to, or the dispatch batch that started it). Round-trips verbatim on every read of the run, on the list as well as the single read.
|
|
4736
|
+
*
|
|
4737
|
+
* The bag is caller-owned and no key is reserved: server-owned state (status, the pinned orchestration version, the trace, usage, artifacts, the run's own `input` and accumulated `state`) lives in its own top-level field and cannot be written from here.
|
|
4738
|
+
*
|
|
4739
|
+
* It is **not** merged into run state: no graph node sees it, and an `input_schema` never has to tolerate it — which is what makes it the place for an infrastructural label, rather than `input`. Keys are never transformed. It is not inherited by the child runs a `loop` or `sub_orchestration` node starts; each child carries whatever the graph gives it, which today is nothing.
|
|
4740
|
+
*/
|
|
4741
|
+
metadata?: {
|
|
4742
|
+
[key: string]: unknown;
|
|
4743
|
+
};
|
|
4715
4744
|
/**
|
|
4716
4745
|
* When true, block until the run reaches a terminal (succeeded/failed) or awaiting_input state and return the settled run. When false (default), return immediately with status "queued" and execute the run in the background.
|
|
4717
4746
|
*/
|
|
@@ -5155,6 +5184,12 @@ type Task = {
|
|
|
5155
5184
|
payload?: {
|
|
5156
5185
|
[key: string]: unknown;
|
|
5157
5186
|
};
|
|
5187
|
+
/**
|
|
5188
|
+
* The caller-owned key/value metadata supplied when the task was created, returned verbatim. Null when the task was created without any. Unlike `payload` it is invisible to guards and to `payload_writes`, so it is the place for an attribution label rather than task data.
|
|
5189
|
+
*/
|
|
5190
|
+
metadata?: {
|
|
5191
|
+
[key: string]: unknown;
|
|
5192
|
+
} | null;
|
|
5158
5193
|
/**
|
|
5159
5194
|
* Server-owned. The result of the current state's last completed dispatch, overwritten on every dispatch. Read-only — exposed to transition guards and `on_complete`/`payload_writes` expressions as `task.last_result`, a namespace a caller cannot write.
|
|
5160
5195
|
*/
|
|
@@ -5235,6 +5270,16 @@ type CreateTaskRequest = {
|
|
|
5235
5270
|
tool_context?: {
|
|
5236
5271
|
[key: string]: string;
|
|
5237
5272
|
};
|
|
5273
|
+
/**
|
|
5274
|
+
* Caller-supplied key/value metadata attached to the task record for attribution — which of your own tenants the task belongs to, the ticket that raised it, the import batch that created it. Round-trips verbatim on every read of the task, the list included, and survives every transition (a transition supplies no metadata of its own).
|
|
5275
|
+
*
|
|
5276
|
+
* The bag is caller-owned and no key is reserved: everything the engine decides about a task (`state`, `status`, `workflow_version`, `last_result`, `active_dispatch`, the automation fields) is a field of its own and cannot be written from here.
|
|
5277
|
+
*
|
|
5278
|
+
* Prefer this over `payload` for anything that is not task data: `payload` is read by every guard as `task.payload` and may be written by the workflow's declared `payload_writes`, so a label parked there is neither invisible to the state machine nor safe from it. A non-object is rejected with `400 VALIDATION_FAILED` and no task is created.
|
|
5279
|
+
*/
|
|
5280
|
+
metadata?: {
|
|
5281
|
+
[key: string]: unknown;
|
|
5282
|
+
};
|
|
5238
5283
|
};
|
|
5239
5284
|
type UpdateTaskRequest = {
|
|
5240
5285
|
title?: string;
|
|
@@ -5321,7 +5366,7 @@ type Tool = {
|
|
|
5321
5366
|
*/
|
|
5322
5367
|
context_keys?: Array<string> | null;
|
|
5323
5368
|
/**
|
|
5324
|
-
* Fixed parameters
|
|
5369
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5325
5370
|
*/
|
|
5326
5371
|
preset_parameters?: {
|
|
5327
5372
|
[key: string]: unknown;
|
|
@@ -5403,7 +5448,7 @@ type CreateToolRequest = {
|
|
|
5403
5448
|
*/
|
|
5404
5449
|
context_keys?: Array<string> | null;
|
|
5405
5450
|
/**
|
|
5406
|
-
* Fixed parameters
|
|
5451
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5407
5452
|
*/
|
|
5408
5453
|
preset_parameters?: {
|
|
5409
5454
|
[key: string]: unknown;
|
|
@@ -5467,7 +5512,7 @@ type UpdateToolRequest = {
|
|
|
5467
5512
|
*/
|
|
5468
5513
|
context_keys?: Array<string> | null;
|
|
5469
5514
|
/**
|
|
5470
|
-
* Fixed parameters
|
|
5515
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5471
5516
|
*/
|
|
5472
5517
|
preset_parameters?: {
|
|
5473
5518
|
[key: string]: unknown;
|
|
@@ -5496,7 +5541,7 @@ type CallToolRequest = {
|
|
|
5496
5541
|
*/
|
|
5497
5542
|
action?: string;
|
|
5498
5543
|
/**
|
|
5499
|
-
* Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution
|
|
5544
|
+
* Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution; a preset value wins over the same key sent here.
|
|
5500
5545
|
*
|
|
5501
5546
|
*/
|
|
5502
5547
|
input?: {
|
|
@@ -5612,7 +5657,7 @@ type Trigger = {
|
|
|
5612
5657
|
project_id?: string;
|
|
5613
5658
|
name?: string;
|
|
5614
5659
|
description?: string | null;
|
|
5615
|
-
type?: 'manual' | 'webhook' | 'schedule';
|
|
5660
|
+
type?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5616
5661
|
target_type?: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
5617
5662
|
/**
|
|
5618
5663
|
* Public ID of the target resource (orchestration, agent, tool, or eval)
|
|
@@ -5632,6 +5677,10 @@ type Trigger = {
|
|
|
5632
5677
|
* 5-field cron expression (UTC). Present only for schedule triggers
|
|
5633
5678
|
*/
|
|
5634
5679
|
cron?: string | null;
|
|
5680
|
+
/**
|
|
5681
|
+
* Internal-event subscription pattern. Present only for event triggers: `*`, `prefix.*`, or an exact event name
|
|
5682
|
+
*/
|
|
5683
|
+
event_pattern?: string | null;
|
|
5635
5684
|
active?: boolean;
|
|
5636
5685
|
/**
|
|
5637
5686
|
* Optional boundary policy that further restricts firings
|
|
@@ -5657,7 +5706,7 @@ type CreateTriggerRequest = {
|
|
|
5657
5706
|
project_id?: string;
|
|
5658
5707
|
name: string;
|
|
5659
5708
|
description?: string;
|
|
5660
|
-
type: 'manual' | 'webhook' | 'schedule';
|
|
5709
|
+
type: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5661
5710
|
target_type: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
5662
5711
|
target_id: string;
|
|
5663
5712
|
/**
|
|
@@ -5671,6 +5720,10 @@ type CreateTriggerRequest = {
|
|
|
5671
5720
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
5672
5721
|
*/
|
|
5673
5722
|
cron?: string;
|
|
5723
|
+
/**
|
|
5724
|
+
* Internal-event subscription pattern. Required when type is event, rejected otherwise. `*` matches every event, `prefix.*` a namespace, or give an exact event name such as `documents.ingested`
|
|
5725
|
+
*/
|
|
5726
|
+
event_pattern?: string;
|
|
5674
5727
|
active?: boolean;
|
|
5675
5728
|
policy_id?: string;
|
|
5676
5729
|
};
|
|
@@ -5684,6 +5737,7 @@ type UpdateTriggerRequest = {
|
|
|
5684
5737
|
[key: string]: unknown;
|
|
5685
5738
|
} | null;
|
|
5686
5739
|
cron?: string | null;
|
|
5740
|
+
event_pattern?: string | null;
|
|
5687
5741
|
active?: boolean;
|
|
5688
5742
|
policy_id?: string | null;
|
|
5689
5743
|
};
|
|
@@ -5702,7 +5756,7 @@ type TriggerFiring = {
|
|
|
5702
5756
|
id?: string;
|
|
5703
5757
|
trigger_id?: string;
|
|
5704
5758
|
project_id?: string;
|
|
5705
|
-
source?: 'manual' | 'webhook' | 'schedule';
|
|
5759
|
+
source?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5706
5760
|
status?: 'pending' | 'running' | 'succeeded' | 'failed';
|
|
5707
5761
|
input?: {
|
|
5708
5762
|
[key: string]: unknown;
|
|
@@ -5991,6 +6045,11 @@ type UsageReceipt = {
|
|
|
5991
6045
|
meter_type?: string;
|
|
5992
6046
|
provider?: string;
|
|
5993
6047
|
model?: string;
|
|
6048
|
+
/**
|
|
6049
|
+
* Orchestration node that produced the event. On a run receipt every line carries it — an `agent` node's `llm_tokens` line and the `compute_execution` line of each node execution alike — so grouping the lines by `node_id` gives the per-node cost the receipt total alone hides. A retried node contributes one line per attempt, all under the same `node_id` — the event records no attempt number — which is the intended reading for spend: a retry is real money. Null when no node produced the event (a standalone generation, a run-level meter).
|
|
6050
|
+
*
|
|
6051
|
+
*/
|
|
6052
|
+
node_id?: string | null;
|
|
5994
6053
|
cost_usd?: number | null;
|
|
5995
6054
|
components?: Array<UsageComponent>;
|
|
5996
6055
|
}>;
|
|
@@ -10226,6 +10285,14 @@ type StartEvalRunData = {
|
|
|
10226
10285
|
* A terminal run of the same eval to compare against. The finished run's `aggregate_scores.baseline` reports per-scorer deltas over the item intersection. A run of a different eval is rejected with 400.
|
|
10227
10286
|
*/
|
|
10228
10287
|
baseline_run_id?: string | null;
|
|
10288
|
+
/**
|
|
10289
|
+
* Caller-supplied key/value metadata attached to the run record for attribution — what this measurement was of (the commit or release candidate being scored, the CI job that asked for it). Round-trips verbatim on every read of the run, the list included.
|
|
10290
|
+
*
|
|
10291
|
+
* The bag is caller-owned and no key is reserved: everything the platform decides about a run (`status`, `agent_version`, `baseline_run_id`, `aggregate_scores`, `passed`, the counts) is a field of its own and cannot be written from here. Nothing in the scoring path reads it. A non-object is rejected with `400 VALIDATION_FAILED` and no run is created.
|
|
10292
|
+
*/
|
|
10293
|
+
metadata?: {
|
|
10294
|
+
[key: string]: unknown;
|
|
10295
|
+
};
|
|
10229
10296
|
};
|
|
10230
10297
|
path: {
|
|
10231
10298
|
/**
|
|
@@ -10414,7 +10481,7 @@ type ListExceptionsData = {
|
|
|
10414
10481
|
/**
|
|
10415
10482
|
* Filter by how the exception was filed
|
|
10416
10483
|
*/
|
|
10417
|
-
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'manual';
|
|
10484
|
+
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'event_trigger_loop' | 'manual';
|
|
10418
10485
|
/**
|
|
10419
10486
|
* Maximum number of results to return
|
|
10420
10487
|
*/
|
|
@@ -13304,7 +13371,7 @@ type StartOrchestrationRunData = {
|
|
|
13304
13371
|
};
|
|
13305
13372
|
type StartOrchestrationRunErrors = {
|
|
13306
13373
|
/**
|
|
13307
|
-
* Validation error
|
|
13374
|
+
* Validation error (e.g. a `tool_context` key that cannot become a header, or `metadata` that is not a JSON object). No run is created.
|
|
13308
13375
|
*/
|
|
13309
13376
|
400: unknown;
|
|
13310
13377
|
/**
|
|
@@ -15447,7 +15514,7 @@ type ListTriggersData = {
|
|
|
15447
15514
|
path?: never;
|
|
15448
15515
|
query?: {
|
|
15449
15516
|
project_id?: string;
|
|
15450
|
-
type?: 'manual' | 'webhook' | 'schedule';
|
|
15517
|
+
type?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
15451
15518
|
target_type?: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
15452
15519
|
/**
|
|
15453
15520
|
* Maximum number of results to return
|
|
@@ -18459,7 +18526,7 @@ declare class Tools {
|
|
|
18459
18526
|
*
|
|
18460
18527
|
* Directly invokes a tool and returns its output. Supported for `http`, `builtin`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
|
|
18461
18528
|
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. When a `builtin` or `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
|
|
18462
|
-
* `preset_parameters` stored on the tool are
|
|
18529
|
+
* `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
|
|
18463
18530
|
*
|
|
18464
18531
|
*/
|
|
18465
18532
|
static callTool<ThrowOnError extends boolean = false>(options: Options<CallToolData, ThrowOnError>): RequestResult<CallToolResponses, CallToolErrors, ThrowOnError>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1879,6 +1879,12 @@ type EvalRun = {
|
|
|
1879
1879
|
item_count?: number;
|
|
1880
1880
|
completed_count?: number;
|
|
1881
1881
|
errored_count?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* The caller-owned key/value metadata supplied when the run was started, returned verbatim. Null when the run was started without any (a trigger-started run included — see `trigger_id` for that provenance). The server writes nothing here.
|
|
1884
|
+
*/
|
|
1885
|
+
metadata?: {
|
|
1886
|
+
[key: string]: unknown;
|
|
1887
|
+
} | null;
|
|
1882
1888
|
started_at?: Date | null;
|
|
1883
1889
|
finished_at?: Date | null;
|
|
1884
1890
|
created_at?: Date;
|
|
@@ -1916,7 +1922,7 @@ type ExceptionItem = {
|
|
|
1916
1922
|
/**
|
|
1917
1923
|
* How the exception was filed
|
|
1918
1924
|
*/
|
|
1919
|
-
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'manual';
|
|
1925
|
+
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'event_trigger_loop' | 'manual';
|
|
1920
1926
|
/**
|
|
1921
1927
|
* Human-readable one-line summary
|
|
1922
1928
|
*/
|
|
@@ -2684,7 +2690,7 @@ type WebhookResourceProperties = {
|
|
|
2684
2690
|
events: Array<string>;
|
|
2685
2691
|
};
|
|
2686
2692
|
/**
|
|
2687
|
-
* Binds a starter (manual, webhook, or
|
|
2693
|
+
* Binds a starter (manual, webhook, schedule, or event) to an executable target (orchestration, agent, tool, or eval). Firings run under the project owner's confined run-as identity.
|
|
2688
2694
|
*/
|
|
2689
2695
|
type TriggerResourceProperties = {
|
|
2690
2696
|
/**
|
|
@@ -2698,7 +2704,7 @@ type TriggerResourceProperties = {
|
|
|
2698
2704
|
/**
|
|
2699
2705
|
* Starter type. Immutable after creation
|
|
2700
2706
|
*/
|
|
2701
|
-
type: 'manual' | 'webhook' | 'schedule';
|
|
2707
|
+
type: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
2702
2708
|
/**
|
|
2703
2709
|
* The kind of resource this trigger activates
|
|
2704
2710
|
*/
|
|
@@ -2721,6 +2727,10 @@ type TriggerResourceProperties = {
|
|
|
2721
2727
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
2722
2728
|
*/
|
|
2723
2729
|
cron?: string | null;
|
|
2730
|
+
/**
|
|
2731
|
+
* Internal-event subscription pattern (`*`, `prefix.*`, or an exact event name). Required when type is event, rejected otherwise
|
|
2732
|
+
*/
|
|
2733
|
+
event_pattern?: string | null;
|
|
2724
2734
|
/**
|
|
2725
2735
|
* Whether the trigger fires (default true)
|
|
2726
2736
|
*/
|
|
@@ -3095,9 +3105,12 @@ type GuardrailResourceProperties = {
|
|
|
3095
3105
|
};
|
|
3096
3106
|
type ResourceDeclaration = {
|
|
3097
3107
|
/**
|
|
3098
|
-
* Resource type
|
|
3108
|
+
* Resource type. The built-in types are `ai_provider`, `tool`, `agent`, `actor`, `api_key`, `chat`, `conversation`, `dataset`, `dataset_item`, `document`, `file`, `guardrail`, `ingestion_rule`, `memory`, `memory_entry`, `model_route`, `eval`, `orchestration`, `policy`, `project_price`, `quota`, `secret`, `session`, `webhook`, `trigger` and `workflow`.
|
|
3109
|
+
*
|
|
3110
|
+
* This is deliberately not an enum: a deployment operator can register additional resource types backed by their own handler, and those are declared here exactly like a built-in one. The set a given deployment accepts is authoritative in the server, which rejects an unregistered type with `VALIDATION_FAILED` and lists what it does support.
|
|
3111
|
+
*
|
|
3099
3112
|
*/
|
|
3100
|
-
type:
|
|
3113
|
+
type: string;
|
|
3101
3114
|
/**
|
|
3102
3115
|
* Resource properties, as authored in the template and echoed back verbatim. The allowed fields, required fields, and field types for each resource `type` are defined by the corresponding `<Type>ResourceProperties` schema in this document (e.g. `model_route` → `ModelRouteResourceProperties`), which the server enforces at validate/deploy time. The declaration itself is free-form here because property values may be substitution expressions rather than final values: `{ "ref": "logicalId" }` references another resource's physical ID, `{ "param": "ParamName" }` substitutes a parameter value, and `{ "sub": "text ${ParamName}" }` interpolates parameters into a string.
|
|
3103
3116
|
*
|
|
@@ -4574,6 +4587,12 @@ type OrchestrationRun = {
|
|
|
4574
4587
|
tool_context?: {
|
|
4575
4588
|
[key: string]: string;
|
|
4576
4589
|
} | null;
|
|
4590
|
+
/**
|
|
4591
|
+
* The caller-owned key/value metadata supplied at run creation, returned verbatim. Null when the run was started without any. The server writes nothing here and no key is reserved; the bag is never merged into `state`, so nothing in it reaches the graph.
|
|
4592
|
+
*/
|
|
4593
|
+
metadata?: {
|
|
4594
|
+
[key: string]: unknown;
|
|
4595
|
+
} | null;
|
|
4577
4596
|
/**
|
|
4578
4597
|
* Terminal node artifact(s) when the run has succeeded.
|
|
4579
4598
|
*/
|
|
@@ -4712,6 +4731,16 @@ type StartRunRequest = {
|
|
|
4712
4731
|
tool_context?: {
|
|
4713
4732
|
[key: string]: string;
|
|
4714
4733
|
};
|
|
4734
|
+
/**
|
|
4735
|
+
* Caller-supplied key/value metadata attached to the run record for per-run attribution (e.g. which of your own tenants this run belongs to, or the dispatch batch that started it). Round-trips verbatim on every read of the run, on the list as well as the single read.
|
|
4736
|
+
*
|
|
4737
|
+
* The bag is caller-owned and no key is reserved: server-owned state (status, the pinned orchestration version, the trace, usage, artifacts, the run's own `input` and accumulated `state`) lives in its own top-level field and cannot be written from here.
|
|
4738
|
+
*
|
|
4739
|
+
* It is **not** merged into run state: no graph node sees it, and an `input_schema` never has to tolerate it — which is what makes it the place for an infrastructural label, rather than `input`. Keys are never transformed. It is not inherited by the child runs a `loop` or `sub_orchestration` node starts; each child carries whatever the graph gives it, which today is nothing.
|
|
4740
|
+
*/
|
|
4741
|
+
metadata?: {
|
|
4742
|
+
[key: string]: unknown;
|
|
4743
|
+
};
|
|
4715
4744
|
/**
|
|
4716
4745
|
* When true, block until the run reaches a terminal (succeeded/failed) or awaiting_input state and return the settled run. When false (default), return immediately with status "queued" and execute the run in the background.
|
|
4717
4746
|
*/
|
|
@@ -5155,6 +5184,12 @@ type Task = {
|
|
|
5155
5184
|
payload?: {
|
|
5156
5185
|
[key: string]: unknown;
|
|
5157
5186
|
};
|
|
5187
|
+
/**
|
|
5188
|
+
* The caller-owned key/value metadata supplied when the task was created, returned verbatim. Null when the task was created without any. Unlike `payload` it is invisible to guards and to `payload_writes`, so it is the place for an attribution label rather than task data.
|
|
5189
|
+
*/
|
|
5190
|
+
metadata?: {
|
|
5191
|
+
[key: string]: unknown;
|
|
5192
|
+
} | null;
|
|
5158
5193
|
/**
|
|
5159
5194
|
* Server-owned. The result of the current state's last completed dispatch, overwritten on every dispatch. Read-only — exposed to transition guards and `on_complete`/`payload_writes` expressions as `task.last_result`, a namespace a caller cannot write.
|
|
5160
5195
|
*/
|
|
@@ -5235,6 +5270,16 @@ type CreateTaskRequest = {
|
|
|
5235
5270
|
tool_context?: {
|
|
5236
5271
|
[key: string]: string;
|
|
5237
5272
|
};
|
|
5273
|
+
/**
|
|
5274
|
+
* Caller-supplied key/value metadata attached to the task record for attribution — which of your own tenants the task belongs to, the ticket that raised it, the import batch that created it. Round-trips verbatim on every read of the task, the list included, and survives every transition (a transition supplies no metadata of its own).
|
|
5275
|
+
*
|
|
5276
|
+
* The bag is caller-owned and no key is reserved: everything the engine decides about a task (`state`, `status`, `workflow_version`, `last_result`, `active_dispatch`, the automation fields) is a field of its own and cannot be written from here.
|
|
5277
|
+
*
|
|
5278
|
+
* Prefer this over `payload` for anything that is not task data: `payload` is read by every guard as `task.payload` and may be written by the workflow's declared `payload_writes`, so a label parked there is neither invisible to the state machine nor safe from it. A non-object is rejected with `400 VALIDATION_FAILED` and no task is created.
|
|
5279
|
+
*/
|
|
5280
|
+
metadata?: {
|
|
5281
|
+
[key: string]: unknown;
|
|
5282
|
+
};
|
|
5238
5283
|
};
|
|
5239
5284
|
type UpdateTaskRequest = {
|
|
5240
5285
|
title?: string;
|
|
@@ -5321,7 +5366,7 @@ type Tool = {
|
|
|
5321
5366
|
*/
|
|
5322
5367
|
context_keys?: Array<string> | null;
|
|
5323
5368
|
/**
|
|
5324
|
-
* Fixed parameters
|
|
5369
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5325
5370
|
*/
|
|
5326
5371
|
preset_parameters?: {
|
|
5327
5372
|
[key: string]: unknown;
|
|
@@ -5403,7 +5448,7 @@ type CreateToolRequest = {
|
|
|
5403
5448
|
*/
|
|
5404
5449
|
context_keys?: Array<string> | null;
|
|
5405
5450
|
/**
|
|
5406
|
-
* Fixed parameters
|
|
5451
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5407
5452
|
*/
|
|
5408
5453
|
preset_parameters?: {
|
|
5409
5454
|
[key: string]: unknown;
|
|
@@ -5467,7 +5512,7 @@ type UpdateToolRequest = {
|
|
|
5467
5512
|
*/
|
|
5468
5513
|
context_keys?: Array<string> | null;
|
|
5469
5514
|
/**
|
|
5470
|
-
* Fixed parameters
|
|
5515
|
+
* Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key.
|
|
5471
5516
|
*/
|
|
5472
5517
|
preset_parameters?: {
|
|
5473
5518
|
[key: string]: unknown;
|
|
@@ -5496,7 +5541,7 @@ type CallToolRequest = {
|
|
|
5496
5541
|
*/
|
|
5497
5542
|
action?: string;
|
|
5498
5543
|
/**
|
|
5499
|
-
* Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution
|
|
5544
|
+
* Input parameters for the tool call. These are merged with the tool's `preset_parameters` before execution; a preset value wins over the same key sent here.
|
|
5500
5545
|
*
|
|
5501
5546
|
*/
|
|
5502
5547
|
input?: {
|
|
@@ -5612,7 +5657,7 @@ type Trigger = {
|
|
|
5612
5657
|
project_id?: string;
|
|
5613
5658
|
name?: string;
|
|
5614
5659
|
description?: string | null;
|
|
5615
|
-
type?: 'manual' | 'webhook' | 'schedule';
|
|
5660
|
+
type?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5616
5661
|
target_type?: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
5617
5662
|
/**
|
|
5618
5663
|
* Public ID of the target resource (orchestration, agent, tool, or eval)
|
|
@@ -5632,6 +5677,10 @@ type Trigger = {
|
|
|
5632
5677
|
* 5-field cron expression (UTC). Present only for schedule triggers
|
|
5633
5678
|
*/
|
|
5634
5679
|
cron?: string | null;
|
|
5680
|
+
/**
|
|
5681
|
+
* Internal-event subscription pattern. Present only for event triggers: `*`, `prefix.*`, or an exact event name
|
|
5682
|
+
*/
|
|
5683
|
+
event_pattern?: string | null;
|
|
5635
5684
|
active?: boolean;
|
|
5636
5685
|
/**
|
|
5637
5686
|
* Optional boundary policy that further restricts firings
|
|
@@ -5657,7 +5706,7 @@ type CreateTriggerRequest = {
|
|
|
5657
5706
|
project_id?: string;
|
|
5658
5707
|
name: string;
|
|
5659
5708
|
description?: string;
|
|
5660
|
-
type: 'manual' | 'webhook' | 'schedule';
|
|
5709
|
+
type: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5661
5710
|
target_type: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
5662
5711
|
target_id: string;
|
|
5663
5712
|
/**
|
|
@@ -5671,6 +5720,10 @@ type CreateTriggerRequest = {
|
|
|
5671
5720
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
5672
5721
|
*/
|
|
5673
5722
|
cron?: string;
|
|
5723
|
+
/**
|
|
5724
|
+
* Internal-event subscription pattern. Required when type is event, rejected otherwise. `*` matches every event, `prefix.*` a namespace, or give an exact event name such as `documents.ingested`
|
|
5725
|
+
*/
|
|
5726
|
+
event_pattern?: string;
|
|
5674
5727
|
active?: boolean;
|
|
5675
5728
|
policy_id?: string;
|
|
5676
5729
|
};
|
|
@@ -5684,6 +5737,7 @@ type UpdateTriggerRequest = {
|
|
|
5684
5737
|
[key: string]: unknown;
|
|
5685
5738
|
} | null;
|
|
5686
5739
|
cron?: string | null;
|
|
5740
|
+
event_pattern?: string | null;
|
|
5687
5741
|
active?: boolean;
|
|
5688
5742
|
policy_id?: string | null;
|
|
5689
5743
|
};
|
|
@@ -5702,7 +5756,7 @@ type TriggerFiring = {
|
|
|
5702
5756
|
id?: string;
|
|
5703
5757
|
trigger_id?: string;
|
|
5704
5758
|
project_id?: string;
|
|
5705
|
-
source?: 'manual' | 'webhook' | 'schedule';
|
|
5759
|
+
source?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
5706
5760
|
status?: 'pending' | 'running' | 'succeeded' | 'failed';
|
|
5707
5761
|
input?: {
|
|
5708
5762
|
[key: string]: unknown;
|
|
@@ -5991,6 +6045,11 @@ type UsageReceipt = {
|
|
|
5991
6045
|
meter_type?: string;
|
|
5992
6046
|
provider?: string;
|
|
5993
6047
|
model?: string;
|
|
6048
|
+
/**
|
|
6049
|
+
* Orchestration node that produced the event. On a run receipt every line carries it — an `agent` node's `llm_tokens` line and the `compute_execution` line of each node execution alike — so grouping the lines by `node_id` gives the per-node cost the receipt total alone hides. A retried node contributes one line per attempt, all under the same `node_id` — the event records no attempt number — which is the intended reading for spend: a retry is real money. Null when no node produced the event (a standalone generation, a run-level meter).
|
|
6050
|
+
*
|
|
6051
|
+
*/
|
|
6052
|
+
node_id?: string | null;
|
|
5994
6053
|
cost_usd?: number | null;
|
|
5995
6054
|
components?: Array<UsageComponent>;
|
|
5996
6055
|
}>;
|
|
@@ -10226,6 +10285,14 @@ type StartEvalRunData = {
|
|
|
10226
10285
|
* A terminal run of the same eval to compare against. The finished run's `aggregate_scores.baseline` reports per-scorer deltas over the item intersection. A run of a different eval is rejected with 400.
|
|
10227
10286
|
*/
|
|
10228
10287
|
baseline_run_id?: string | null;
|
|
10288
|
+
/**
|
|
10289
|
+
* Caller-supplied key/value metadata attached to the run record for attribution — what this measurement was of (the commit or release candidate being scored, the CI job that asked for it). Round-trips verbatim on every read of the run, the list included.
|
|
10290
|
+
*
|
|
10291
|
+
* The bag is caller-owned and no key is reserved: everything the platform decides about a run (`status`, `agent_version`, `baseline_run_id`, `aggregate_scores`, `passed`, the counts) is a field of its own and cannot be written from here. Nothing in the scoring path reads it. A non-object is rejected with `400 VALIDATION_FAILED` and no run is created.
|
|
10292
|
+
*/
|
|
10293
|
+
metadata?: {
|
|
10294
|
+
[key: string]: unknown;
|
|
10295
|
+
};
|
|
10229
10296
|
};
|
|
10230
10297
|
path: {
|
|
10231
10298
|
/**
|
|
@@ -10414,7 +10481,7 @@ type ListExceptionsData = {
|
|
|
10414
10481
|
/**
|
|
10415
10482
|
* Filter by how the exception was filed
|
|
10416
10483
|
*/
|
|
10417
|
-
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'manual';
|
|
10484
|
+
kind?: 'run_failed' | 'guardrail_tripwire' | 'approval_expired' | 'quota_unpriced' | 'event_trigger_loop' | 'manual';
|
|
10418
10485
|
/**
|
|
10419
10486
|
* Maximum number of results to return
|
|
10420
10487
|
*/
|
|
@@ -13304,7 +13371,7 @@ type StartOrchestrationRunData = {
|
|
|
13304
13371
|
};
|
|
13305
13372
|
type StartOrchestrationRunErrors = {
|
|
13306
13373
|
/**
|
|
13307
|
-
* Validation error
|
|
13374
|
+
* Validation error (e.g. a `tool_context` key that cannot become a header, or `metadata` that is not a JSON object). No run is created.
|
|
13308
13375
|
*/
|
|
13309
13376
|
400: unknown;
|
|
13310
13377
|
/**
|
|
@@ -15447,7 +15514,7 @@ type ListTriggersData = {
|
|
|
15447
15514
|
path?: never;
|
|
15448
15515
|
query?: {
|
|
15449
15516
|
project_id?: string;
|
|
15450
|
-
type?: 'manual' | 'webhook' | 'schedule';
|
|
15517
|
+
type?: 'manual' | 'webhook' | 'schedule' | 'event';
|
|
15451
15518
|
target_type?: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
15452
15519
|
/**
|
|
15453
15520
|
* Maximum number of results to return
|
|
@@ -18459,7 +18526,7 @@ declare class Tools {
|
|
|
18459
18526
|
*
|
|
18460
18527
|
* Directly invokes a tool and returns its output. Supported for `http`, `builtin`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
|
|
18461
18528
|
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. When a `builtin` or `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
|
|
18462
|
-
* `preset_parameters` stored on the tool are
|
|
18529
|
+
* `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
|
|
18463
18530
|
*
|
|
18464
18531
|
*/
|
|
18465
18532
|
static callTool<ThrowOnError extends boolean = false>(options: Options<CallToolData, ThrowOnError>): RequestResult<CallToolResponses, CallToolErrors, ThrowOnError>;
|
package/dist/index.mjs
CHANGED
|
@@ -3654,7 +3654,7 @@ var Tools = class {
|
|
|
3654
3654
|
*
|
|
3655
3655
|
* Directly invokes a tool and returns its output. Supported for `http`, `builtin`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input.
|
|
3656
3656
|
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored. When a `builtin` or `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` ("not available on this tool") before any outbound request is made.
|
|
3657
|
-
* `preset_parameters` stored on the tool are
|
|
3657
|
+
* `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent.
|
|
3658
3658
|
*
|
|
3659
3659
|
*/
|
|
3660
3660
|
static callTool(options) {
|