@naturali/sdk 0.260.3 → 0.261.1
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 +3 -3
- package/dist/index.d.cts +41 -41
- package/dist/index.d.mts +41 -41
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2357,7 +2357,7 @@ var Deciders = class {
|
|
|
2357
2357
|
/**
|
|
2358
2358
|
* Create a decider
|
|
2359
2359
|
*
|
|
2360
|
-
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`) and must not pin `input` or `questions`
|
|
2360
|
+
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`; a `builtin` tool names its `action` in `preset_parameters`) and must not pin `input` or `questions` there, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
2361
2361
|
*/
|
|
2362
2362
|
static createDecider(options) {
|
|
2363
2363
|
return (options.client ?? client).post({
|
|
@@ -6089,8 +6089,8 @@ var Tools = class {
|
|
|
6089
6089
|
/**
|
|
6090
6090
|
* Call a tool
|
|
6091
6091
|
*
|
|
6092
|
-
* Directly invokes a tool and returns its output. Supported for `http`, `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.
|
|
6093
|
-
* For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When
|
|
6092
|
+
* 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.
|
|
6093
|
+
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (`builtin`) 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.
|
|
6094
6094
|
* `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.
|
|
6095
6095
|
* Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is.
|
|
6096
6096
|
*
|
package/dist/index.d.cts
CHANGED
|
@@ -1511,7 +1511,7 @@ type CreateAgentGenerationRequest = {
|
|
|
1511
1511
|
*/
|
|
1512
1512
|
max_call_depth?: number;
|
|
1513
1513
|
/**
|
|
1514
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
1514
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
1515
1515
|
*/
|
|
1516
1516
|
tool_context?: {
|
|
1517
1517
|
[key: string]: string;
|
|
@@ -1576,7 +1576,7 @@ type ToolOutputMessageContent = {
|
|
|
1576
1576
|
*/
|
|
1577
1577
|
tool_id: string;
|
|
1578
1578
|
/**
|
|
1579
|
-
* Optional action name for tools that require action selection (for example
|
|
1579
|
+
* Optional action name for tools that require action selection (for example builtin and mcp tools).
|
|
1580
1580
|
*/
|
|
1581
1581
|
action?: string | null;
|
|
1582
1582
|
/**
|
|
@@ -1747,7 +1747,7 @@ type CreateToolRequest = {
|
|
|
1747
1747
|
/**
|
|
1748
1748
|
* Tool type (default http)
|
|
1749
1749
|
*/
|
|
1750
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
1750
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
1751
1751
|
/**
|
|
1752
1752
|
* What the tool does
|
|
1753
1753
|
*/
|
|
@@ -1761,7 +1761,7 @@ type CreateToolRequest = {
|
|
|
1761
1761
|
execute?: ToolExecuteConfig;
|
|
1762
1762
|
mcp?: ToolMcpConfig;
|
|
1763
1763
|
/**
|
|
1764
|
-
* Allowlist of actions. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface — omit or set `null` to expose every tool the MCP server offers. Ignored for other tool types.
|
|
1764
|
+
* Allowlist of actions. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface — omit or set `null` to expose every tool the MCP server offers. Ignored for other tool types.
|
|
1765
1765
|
*/
|
|
1766
1766
|
actions?: Array<string>;
|
|
1767
1767
|
/**
|
|
@@ -2126,7 +2126,7 @@ type ApprovalItem = {
|
|
|
2126
2126
|
proposed_action?: {
|
|
2127
2127
|
tool_id?: string;
|
|
2128
2128
|
/**
|
|
2129
|
-
* Resolved action name (the action
|
|
2129
|
+
* Resolved action name (the builtin/mcp action) for `tool_call`-origin items — always present there, even for single-action tools. Omitted for `node`-origin items, whose downstream execution is wired by a separate `tool` node in the graph.
|
|
2130
2130
|
*/
|
|
2131
2131
|
action?: string;
|
|
2132
2132
|
arguments?: {
|
|
@@ -3289,7 +3289,7 @@ type CreateDecisionRequest = {
|
|
|
3289
3289
|
*/
|
|
3290
3290
|
metadata?: MetadataBag;
|
|
3291
3291
|
/**
|
|
3292
|
-
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.
|
|
3292
|
+
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once. A tool call, `builtin` or MCP, always waits.
|
|
3293
3293
|
*/
|
|
3294
3294
|
wait?: boolean;
|
|
3295
3295
|
};
|
|
@@ -3312,7 +3312,7 @@ type CreateInlineDecisionRequest = {
|
|
|
3312
3312
|
*/
|
|
3313
3313
|
metadata?: MetadataBag;
|
|
3314
3314
|
/**
|
|
3315
|
-
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.
|
|
3315
|
+
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once. A tool call, `builtin` or MCP, always waits.
|
|
3316
3316
|
*/
|
|
3317
3317
|
wait?: boolean;
|
|
3318
3318
|
};
|
|
@@ -3659,11 +3659,11 @@ type ToolScorer = {
|
|
|
3659
3659
|
*/
|
|
3660
3660
|
name: string;
|
|
3661
3661
|
/**
|
|
3662
|
-
* The tool that scores each item. It must belong to the eval's project and be server-callable (`http`, `mcp`, or `pipeline` — a `client` tool pauses for a calling client an eval run does not have).
|
|
3662
|
+
* The tool that scores each item. It must belong to the eval's project and be server-callable (`http`, `mcp`, `builtin`, or `pipeline` — a `client` tool pauses for a calling client an eval run does not have).
|
|
3663
3663
|
*/
|
|
3664
3664
|
tool_id: string;
|
|
3665
3665
|
/**
|
|
3666
|
-
* The operation to invoke; required when the tool type is `mcp`.
|
|
3666
|
+
* The operation to invoke; required when the tool type is `builtin` or `mcp`.
|
|
3667
3667
|
*/
|
|
3668
3668
|
action?: string | null;
|
|
3669
3669
|
/**
|
|
@@ -4438,7 +4438,7 @@ type ToolResourceProperties = {
|
|
|
4438
4438
|
*/
|
|
4439
4439
|
name: string;
|
|
4440
4440
|
/**
|
|
4441
|
-
* Tool type hint (e.g. http, mcp, pipeline)
|
|
4441
|
+
* Tool type hint (e.g. http, mcp, builtin, pipeline)
|
|
4442
4442
|
*/
|
|
4443
4443
|
type?: string;
|
|
4444
4444
|
/**
|
|
@@ -4539,7 +4539,7 @@ type ToolResourceProperties = {
|
|
|
4539
4539
|
pin_definitions?: boolean;
|
|
4540
4540
|
} | null;
|
|
4541
4541
|
/**
|
|
4542
|
-
* Allowlist of actions the tool exposes. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
4542
|
+
* Allowlist of actions the tool exposes. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
4543
4543
|
*/
|
|
4544
4544
|
actions?: Array<string> | null;
|
|
4545
4545
|
/**
|
|
@@ -4809,7 +4809,7 @@ type TriggerResourceProperties = {
|
|
|
4809
4809
|
*/
|
|
4810
4810
|
target_id: string;
|
|
4811
4811
|
/**
|
|
4812
|
-
* Tool targets only — the action for mcp tools
|
|
4812
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
4813
4813
|
*/
|
|
4814
4814
|
action?: string | null;
|
|
4815
4815
|
/**
|
|
@@ -5056,7 +5056,7 @@ type IngestionRuleResourceProperties = {
|
|
|
5056
5056
|
*/
|
|
5057
5057
|
agent_id?: string | null;
|
|
5058
5058
|
/**
|
|
5059
|
-
* Operation id, required for mcp tool converters
|
|
5059
|
+
* Operation id, required for mcp tool converters, and for builtin unless a preset_parameters (the rule's or the tool's) names action
|
|
5060
5060
|
*/
|
|
5061
5061
|
action?: string | null;
|
|
5062
5062
|
/**
|
|
@@ -5667,7 +5667,7 @@ type PlaybookExecutor = {
|
|
|
5667
5667
|
*/
|
|
5668
5668
|
id: string;
|
|
5669
5669
|
/**
|
|
5670
|
-
* Only on a `tool` executor: which action of a multi-action (`mcp`) tool to call — the same selector an orchestration `tool` node's `operation_id` is. Required by an `mcp` tool.
|
|
5670
|
+
* Only on a `tool` executor: which action of a multi-action (`mcp`, `builtin`) tool to call — the same selector an orchestration `tool` node's `operation_id` is. Required by an `mcp` tool.
|
|
5671
5671
|
*/
|
|
5672
5672
|
operation_id?: string;
|
|
5673
5673
|
/**
|
|
@@ -7189,7 +7189,7 @@ type OrchestrationNode = {
|
|
|
7189
7189
|
*/
|
|
7190
7190
|
tool_id?: string;
|
|
7191
7191
|
/**
|
|
7192
|
-
* For tool and poll nodes — specific operation/action on
|
|
7192
|
+
* For tool and poll nodes — specific operation/action on `mcp` and `builtin` tools.
|
|
7193
7193
|
*/
|
|
7194
7194
|
operation_id?: string;
|
|
7195
7195
|
/**
|
|
@@ -7739,7 +7739,7 @@ type StartOrchestrationRunRequest = {
|
|
|
7739
7739
|
[key: string]: unknown;
|
|
7740
7740
|
};
|
|
7741
7741
|
/**
|
|
7742
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
7742
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
7743
7743
|
*
|
|
7744
7744
|
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. It also does not outlive the run: reaching a terminal status (`completed`, `failed`, `cancelled` or `expired`) clears it. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
7745
7745
|
*
|
|
@@ -8200,7 +8200,7 @@ type ExportPlaybookCaseNodeRequest = {
|
|
|
8200
8200
|
*/
|
|
8201
8201
|
revision?: number;
|
|
8202
8202
|
/**
|
|
8203
|
-
* Answer once every export settles instead of right away.
|
|
8203
|
+
* Answer once every export settles instead of right away. A tool call, `builtin` or MCP, always waits.
|
|
8204
8204
|
*/
|
|
8205
8205
|
wait?: boolean;
|
|
8206
8206
|
};
|
|
@@ -9136,7 +9136,7 @@ type CreateSessionRequest = {
|
|
|
9136
9136
|
*/
|
|
9137
9137
|
auto_generate?: boolean;
|
|
9138
9138
|
/**
|
|
9139
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9139
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this session. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are stored exactly as sent and never case-converted. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY`. `session_id`, `actor_id` and `actor_external_id` are server-derived and dropped from the stored bag, in any casing. Write-only: no read of a session returns it. It also does not outlive the session: closing or expiring it clears the bag.
|
|
9140
9140
|
*/
|
|
9141
9141
|
tool_context?: {
|
|
9142
9142
|
[key: string]: string;
|
|
@@ -9170,7 +9170,7 @@ type UpdateSessionRequest = {
|
|
|
9170
9170
|
*/
|
|
9171
9171
|
auto_generate?: boolean;
|
|
9172
9172
|
/**
|
|
9173
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9173
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this session. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are stored exactly as sent and never case-converted. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY`. `session_id`, `actor_id` and `actor_external_id` are server-derived and dropped from the stored bag, in any casing. Write-only: no read of a session returns it. It also does not outlive the session: closing or expiring it clears the bag.
|
|
9174
9174
|
*/
|
|
9175
9175
|
tool_context?: {
|
|
9176
9176
|
[key: string]: string;
|
|
@@ -9197,7 +9197,7 @@ type AddSessionMessageRequest = {
|
|
|
9197
9197
|
*/
|
|
9198
9198
|
message: string;
|
|
9199
9199
|
/**
|
|
9200
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9200
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9201
9201
|
*/
|
|
9202
9202
|
tool_context?: {
|
|
9203
9203
|
[key: string]: string;
|
|
@@ -9213,7 +9213,7 @@ type AddSessionMessageRequest = {
|
|
|
9213
9213
|
*/
|
|
9214
9214
|
document_id: string;
|
|
9215
9215
|
/**
|
|
9216
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9216
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9217
9217
|
*/
|
|
9218
9218
|
tool_context?: {
|
|
9219
9219
|
[key: string]: string;
|
|
@@ -9239,7 +9239,7 @@ type GenerateSessionRequest = {
|
|
|
9239
9239
|
*/
|
|
9240
9240
|
model?: string;
|
|
9241
9241
|
/**
|
|
9242
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9242
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9243
9243
|
*/
|
|
9244
9244
|
tool_context?: {
|
|
9245
9245
|
[key: string]: string;
|
|
@@ -9449,7 +9449,7 @@ type CreateTaskRequest = {
|
|
|
9449
9449
|
*/
|
|
9450
9450
|
state?: string;
|
|
9451
9451
|
/**
|
|
9452
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9452
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call made by this task's automation dispatches — the agent generations a state's `on_enter` starts, and the agent nodes of any orchestration run it starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
9453
9453
|
* Creation is the task's first move, so this is the bag the entry state's `on_enter` runs with. Each transition may replace it (see `TransitionTaskRequest.tool_context`).
|
|
9454
9454
|
* The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped in any casing and re-derived server-side, so a task-dispatched generation cannot forge them. A key outside the HTTP header-name grammar is rejected with `INVALID_TOOL_CONTEXT_KEY` (400).
|
|
9455
9455
|
* Write-only: the stored bag is never returned by any task read, and it is cleared when the task reaches a terminal state.
|
|
@@ -9539,7 +9539,7 @@ type Tool = {
|
|
|
9539
9539
|
/**
|
|
9540
9540
|
* Tool type
|
|
9541
9541
|
*/
|
|
9542
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
9542
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
9543
9543
|
/**
|
|
9544
9544
|
* What the tool does (sent to the model)
|
|
9545
9545
|
*/
|
|
@@ -9551,7 +9551,7 @@ type Tool = {
|
|
|
9551
9551
|
[key: string]: string;
|
|
9552
9552
|
} | null;
|
|
9553
9553
|
/**
|
|
9554
|
-
* Allowlist of actions to expose. For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
9554
|
+
* Allowlist of actions to expose. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
9555
9555
|
*/
|
|
9556
9556
|
actions?: Array<string> | null;
|
|
9557
9557
|
/**
|
|
@@ -9575,7 +9575,7 @@ type Tool = {
|
|
|
9575
9575
|
};
|
|
9576
9576
|
type UpdateToolRequest = {
|
|
9577
9577
|
name?: string;
|
|
9578
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline';
|
|
9578
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline';
|
|
9579
9579
|
description?: string | null;
|
|
9580
9580
|
parameters?: {
|
|
9581
9581
|
[key: string]: unknown;
|
|
@@ -9587,7 +9587,7 @@ type UpdateToolRequest = {
|
|
|
9587
9587
|
*/
|
|
9588
9588
|
mcp_pins?: null;
|
|
9589
9589
|
/**
|
|
9590
|
-
* Allowlist of actions. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool). Ignored for other tool types.
|
|
9590
|
+
* Allowlist of actions. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool). Ignored for other tool types.
|
|
9591
9591
|
*/
|
|
9592
9592
|
actions?: Array<string> | null;
|
|
9593
9593
|
/**
|
|
@@ -9648,7 +9648,7 @@ type ToolActionList = Page & {
|
|
|
9648
9648
|
};
|
|
9649
9649
|
type CallToolRequest = {
|
|
9650
9650
|
/**
|
|
9651
|
-
* For `mcp` tools: the MCP tool name to invoke (must be in the tool's `actions` allowlist when one is set, and must not be in its `denied_actions` denylist). Ignored for `http` tools.
|
|
9651
|
+
* For `builtin` tools: the action name (must be in the tool's `actions` list). For `mcp` tools: the MCP tool name to invoke (must be in the tool's `actions` allowlist when one is set, and must not be in its `denied_actions` denylist). Ignored for `http` tools.
|
|
9652
9652
|
*
|
|
9653
9653
|
*/
|
|
9654
9654
|
action?: string;
|
|
@@ -9773,7 +9773,7 @@ type Trigger = {
|
|
|
9773
9773
|
*/
|
|
9774
9774
|
target_id?: string;
|
|
9775
9775
|
/**
|
|
9776
|
-
* Tool targets only — the action for mcp tools
|
|
9776
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
9777
9777
|
*/
|
|
9778
9778
|
action?: string | null;
|
|
9779
9779
|
/**
|
|
@@ -9823,7 +9823,7 @@ type CreateTriggerRequest = {
|
|
|
9823
9823
|
target_type: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
9824
9824
|
target_id: string;
|
|
9825
9825
|
/**
|
|
9826
|
-
* Tool targets only — the action for mcp tools
|
|
9826
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
9827
9827
|
*/
|
|
9828
9828
|
action?: string;
|
|
9829
9829
|
input?: {
|
|
@@ -10713,13 +10713,13 @@ type ToolWritable = {
|
|
|
10713
10713
|
/**
|
|
10714
10714
|
* Tool type
|
|
10715
10715
|
*/
|
|
10716
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
10716
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
10717
10717
|
/**
|
|
10718
10718
|
* What the tool does (sent to the model)
|
|
10719
10719
|
*/
|
|
10720
10720
|
description?: string | null;
|
|
10721
10721
|
/**
|
|
10722
|
-
* Allowlist of actions to expose. For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
10722
|
+
* Allowlist of actions to expose. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
10723
10723
|
*/
|
|
10724
10724
|
actions?: Array<string> | null;
|
|
10725
10725
|
/**
|
|
@@ -12619,7 +12619,7 @@ type CreateAgentGenerationData = {
|
|
|
12619
12619
|
};
|
|
12620
12620
|
query?: {
|
|
12621
12621
|
/**
|
|
12622
|
-
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`.
|
|
12622
|
+
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits.
|
|
12623
12623
|
*/
|
|
12624
12624
|
wait?: boolean;
|
|
12625
12625
|
};
|
|
@@ -17341,7 +17341,7 @@ type GenerateConversationMessageData = {
|
|
|
17341
17341
|
*/
|
|
17342
17342
|
stream?: boolean;
|
|
17343
17343
|
/**
|
|
17344
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
17344
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased and keys are never case-converted, so they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
17345
17345
|
*/
|
|
17346
17346
|
tool_context?: {
|
|
17347
17347
|
[key: string]: string;
|
|
@@ -17356,7 +17356,7 @@ type GenerateConversationMessageData = {
|
|
|
17356
17356
|
};
|
|
17357
17357
|
query?: {
|
|
17358
17358
|
/**
|
|
17359
|
-
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result.
|
|
17359
|
+
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result. A tool call, `builtin` or MCP, always waits.
|
|
17360
17360
|
*/
|
|
17361
17361
|
wait?: boolean;
|
|
17362
17362
|
};
|
|
@@ -23565,7 +23565,7 @@ type CreateIngestionRuleData = {
|
|
|
23565
23565
|
*/
|
|
23566
23566
|
agent_id?: string;
|
|
23567
23567
|
/**
|
|
23568
|
-
* Operation id, required for mcp tool converters
|
|
23568
|
+
* Operation id, required for mcp tool converters, and for builtin unless a preset_parameters (the rule's or the tool's) names action
|
|
23569
23569
|
*/
|
|
23570
23570
|
action?: string;
|
|
23571
23571
|
/**
|
|
@@ -32569,7 +32569,7 @@ type GenerateSessionResponseData = {
|
|
|
32569
32569
|
};
|
|
32570
32570
|
query?: {
|
|
32571
32571
|
/**
|
|
32572
|
-
* When omitted or `false` (default), generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result.
|
|
32572
|
+
* When omitted or `false` (default), generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result. A tool call, `builtin` or MCP, always waits.
|
|
32573
32573
|
*/
|
|
32574
32574
|
wait?: boolean;
|
|
32575
32575
|
};
|
|
@@ -34333,7 +34333,7 @@ type CallToolErrors = {
|
|
|
34333
34333
|
type CallToolError = CallToolErrors[keyof CallToolErrors];
|
|
34334
34334
|
type CallToolResponses = {
|
|
34335
34335
|
/**
|
|
34336
|
-
* The raw output returned by the tool — any JSON value (object, array, string, number, boolean). `null` when the tool produced no output —
|
|
34336
|
+
* The raw output returned by the tool — any JSON value (object, array, string, number, boolean). `null` when the tool produced no output — a `builtin` action answering `204 No Content`, for instance.
|
|
34337
34337
|
*/
|
|
34338
34338
|
200: unknown;
|
|
34339
34339
|
};
|
|
@@ -37736,7 +37736,7 @@ export declare class Deciders {
|
|
|
37736
37736
|
/**
|
|
37737
37737
|
* Create a decider
|
|
37738
37738
|
*
|
|
37739
|
-
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`) and must not pin `input` or `questions`
|
|
37739
|
+
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`; a `builtin` tool names its `action` in `preset_parameters`) and must not pin `input` or `questions` there, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
37740
37740
|
*/
|
|
37741
37741
|
static createDecider<ThrowOnError extends boolean = false>(options: Options<CreateDeciderData, ThrowOnError>): RequestResult<CreateDeciderResponses, CreateDeciderErrors, ThrowOnError>;
|
|
37742
37742
|
/**
|
|
@@ -39655,8 +39655,8 @@ export declare class Tools {
|
|
|
39655
39655
|
/**
|
|
39656
39656
|
* Call a tool
|
|
39657
39657
|
*
|
|
39658
|
-
* Directly invokes a tool and returns its output. Supported for `http`, `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.
|
|
39659
|
-
* For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When
|
|
39658
|
+
* 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.
|
|
39659
|
+
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (`builtin`) 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.
|
|
39660
39660
|
* `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.
|
|
39661
39661
|
* Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is.
|
|
39662
39662
|
*
|
package/dist/index.d.mts
CHANGED
|
@@ -1511,7 +1511,7 @@ type CreateAgentGenerationRequest = {
|
|
|
1511
1511
|
*/
|
|
1512
1512
|
max_call_depth?: number;
|
|
1513
1513
|
/**
|
|
1514
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
1514
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
1515
1515
|
*/
|
|
1516
1516
|
tool_context?: {
|
|
1517
1517
|
[key: string]: string;
|
|
@@ -1576,7 +1576,7 @@ type ToolOutputMessageContent = {
|
|
|
1576
1576
|
*/
|
|
1577
1577
|
tool_id: string;
|
|
1578
1578
|
/**
|
|
1579
|
-
* Optional action name for tools that require action selection (for example
|
|
1579
|
+
* Optional action name for tools that require action selection (for example builtin and mcp tools).
|
|
1580
1580
|
*/
|
|
1581
1581
|
action?: string | null;
|
|
1582
1582
|
/**
|
|
@@ -1747,7 +1747,7 @@ type CreateToolRequest = {
|
|
|
1747
1747
|
/**
|
|
1748
1748
|
* Tool type (default http)
|
|
1749
1749
|
*/
|
|
1750
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
1750
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
1751
1751
|
/**
|
|
1752
1752
|
* What the tool does
|
|
1753
1753
|
*/
|
|
@@ -1761,7 +1761,7 @@ type CreateToolRequest = {
|
|
|
1761
1761
|
execute?: ToolExecuteConfig;
|
|
1762
1762
|
mcp?: ToolMcpConfig;
|
|
1763
1763
|
/**
|
|
1764
|
-
* Allowlist of actions. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface — omit or set `null` to expose every tool the MCP server offers. Ignored for other tool types.
|
|
1764
|
+
* Allowlist of actions. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface — omit or set `null` to expose every tool the MCP server offers. Ignored for other tool types.
|
|
1765
1765
|
*/
|
|
1766
1766
|
actions?: Array<string>;
|
|
1767
1767
|
/**
|
|
@@ -2126,7 +2126,7 @@ type ApprovalItem = {
|
|
|
2126
2126
|
proposed_action?: {
|
|
2127
2127
|
tool_id?: string;
|
|
2128
2128
|
/**
|
|
2129
|
-
* Resolved action name (the action
|
|
2129
|
+
* Resolved action name (the builtin/mcp action) for `tool_call`-origin items — always present there, even for single-action tools. Omitted for `node`-origin items, whose downstream execution is wired by a separate `tool` node in the graph.
|
|
2130
2130
|
*/
|
|
2131
2131
|
action?: string;
|
|
2132
2132
|
arguments?: {
|
|
@@ -3289,7 +3289,7 @@ type CreateDecisionRequest = {
|
|
|
3289
3289
|
*/
|
|
3290
3290
|
metadata?: MetadataBag;
|
|
3291
3291
|
/**
|
|
3292
|
-
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.
|
|
3292
|
+
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once. A tool call, `builtin` or MCP, always waits.
|
|
3293
3293
|
*/
|
|
3294
3294
|
wait?: boolean;
|
|
3295
3295
|
};
|
|
@@ -3312,7 +3312,7 @@ type CreateInlineDecisionRequest = {
|
|
|
3312
3312
|
*/
|
|
3313
3313
|
metadata?: MetadataBag;
|
|
3314
3314
|
/**
|
|
3315
|
-
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.
|
|
3315
|
+
* True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once. A tool call, `builtin` or MCP, always waits.
|
|
3316
3316
|
*/
|
|
3317
3317
|
wait?: boolean;
|
|
3318
3318
|
};
|
|
@@ -3659,11 +3659,11 @@ type ToolScorer = {
|
|
|
3659
3659
|
*/
|
|
3660
3660
|
name: string;
|
|
3661
3661
|
/**
|
|
3662
|
-
* The tool that scores each item. It must belong to the eval's project and be server-callable (`http`, `mcp`, or `pipeline` — a `client` tool pauses for a calling client an eval run does not have).
|
|
3662
|
+
* The tool that scores each item. It must belong to the eval's project and be server-callable (`http`, `mcp`, `builtin`, or `pipeline` — a `client` tool pauses for a calling client an eval run does not have).
|
|
3663
3663
|
*/
|
|
3664
3664
|
tool_id: string;
|
|
3665
3665
|
/**
|
|
3666
|
-
* The operation to invoke; required when the tool type is `mcp`.
|
|
3666
|
+
* The operation to invoke; required when the tool type is `builtin` or `mcp`.
|
|
3667
3667
|
*/
|
|
3668
3668
|
action?: string | null;
|
|
3669
3669
|
/**
|
|
@@ -4438,7 +4438,7 @@ type ToolResourceProperties = {
|
|
|
4438
4438
|
*/
|
|
4439
4439
|
name: string;
|
|
4440
4440
|
/**
|
|
4441
|
-
* Tool type hint (e.g. http, mcp, pipeline)
|
|
4441
|
+
* Tool type hint (e.g. http, mcp, builtin, pipeline)
|
|
4442
4442
|
*/
|
|
4443
4443
|
type?: string;
|
|
4444
4444
|
/**
|
|
@@ -4539,7 +4539,7 @@ type ToolResourceProperties = {
|
|
|
4539
4539
|
pin_definitions?: boolean;
|
|
4540
4540
|
} | null;
|
|
4541
4541
|
/**
|
|
4542
|
-
* Allowlist of actions the tool exposes. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
4542
|
+
* Allowlist of actions the tool exposes. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool).
|
|
4543
4543
|
*/
|
|
4544
4544
|
actions?: Array<string> | null;
|
|
4545
4545
|
/**
|
|
@@ -4809,7 +4809,7 @@ type TriggerResourceProperties = {
|
|
|
4809
4809
|
*/
|
|
4810
4810
|
target_id: string;
|
|
4811
4811
|
/**
|
|
4812
|
-
* Tool targets only — the action for mcp tools
|
|
4812
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
4813
4813
|
*/
|
|
4814
4814
|
action?: string | null;
|
|
4815
4815
|
/**
|
|
@@ -5056,7 +5056,7 @@ type IngestionRuleResourceProperties = {
|
|
|
5056
5056
|
*/
|
|
5057
5057
|
agent_id?: string | null;
|
|
5058
5058
|
/**
|
|
5059
|
-
* Operation id, required for mcp tool converters
|
|
5059
|
+
* Operation id, required for mcp tool converters, and for builtin unless a preset_parameters (the rule's or the tool's) names action
|
|
5060
5060
|
*/
|
|
5061
5061
|
action?: string | null;
|
|
5062
5062
|
/**
|
|
@@ -5667,7 +5667,7 @@ type PlaybookExecutor = {
|
|
|
5667
5667
|
*/
|
|
5668
5668
|
id: string;
|
|
5669
5669
|
/**
|
|
5670
|
-
* Only on a `tool` executor: which action of a multi-action (`mcp`) tool to call — the same selector an orchestration `tool` node's `operation_id` is. Required by an `mcp` tool.
|
|
5670
|
+
* Only on a `tool` executor: which action of a multi-action (`mcp`, `builtin`) tool to call — the same selector an orchestration `tool` node's `operation_id` is. Required by an `mcp` tool.
|
|
5671
5671
|
*/
|
|
5672
5672
|
operation_id?: string;
|
|
5673
5673
|
/**
|
|
@@ -7189,7 +7189,7 @@ type OrchestrationNode = {
|
|
|
7189
7189
|
*/
|
|
7190
7190
|
tool_id?: string;
|
|
7191
7191
|
/**
|
|
7192
|
-
* For tool and poll nodes — specific operation/action on
|
|
7192
|
+
* For tool and poll nodes — specific operation/action on `mcp` and `builtin` tools.
|
|
7193
7193
|
*/
|
|
7194
7194
|
operation_id?: string;
|
|
7195
7195
|
/**
|
|
@@ -7739,7 +7739,7 @@ type StartOrchestrationRunRequest = {
|
|
|
7739
7739
|
[key: string]: unknown;
|
|
7740
7740
|
};
|
|
7741
7741
|
/**
|
|
7742
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
7742
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
7743
7743
|
*
|
|
7744
7744
|
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. It also does not outlive the run: reaching a terminal status (`completed`, `failed`, `cancelled` or `expired`) clears it. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
7745
7745
|
*
|
|
@@ -8200,7 +8200,7 @@ type ExportPlaybookCaseNodeRequest = {
|
|
|
8200
8200
|
*/
|
|
8201
8201
|
revision?: number;
|
|
8202
8202
|
/**
|
|
8203
|
-
* Answer once every export settles instead of right away.
|
|
8203
|
+
* Answer once every export settles instead of right away. A tool call, `builtin` or MCP, always waits.
|
|
8204
8204
|
*/
|
|
8205
8205
|
wait?: boolean;
|
|
8206
8206
|
};
|
|
@@ -9136,7 +9136,7 @@ type CreateSessionRequest = {
|
|
|
9136
9136
|
*/
|
|
9137
9137
|
auto_generate?: boolean;
|
|
9138
9138
|
/**
|
|
9139
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9139
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this session. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are stored exactly as sent and never case-converted. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY`. `session_id`, `actor_id` and `actor_external_id` are server-derived and dropped from the stored bag, in any casing. Write-only: no read of a session returns it. It also does not outlive the session: closing or expiring it clears the bag.
|
|
9140
9140
|
*/
|
|
9141
9141
|
tool_context?: {
|
|
9142
9142
|
[key: string]: string;
|
|
@@ -9170,7 +9170,7 @@ type UpdateSessionRequest = {
|
|
|
9170
9170
|
*/
|
|
9171
9171
|
auto_generate?: boolean;
|
|
9172
9172
|
/**
|
|
9173
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9173
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this session. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are stored exactly as sent and never case-converted. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY`. `session_id`, `actor_id` and `actor_external_id` are server-derived and dropped from the stored bag, in any casing. Write-only: no read of a session returns it. It also does not outlive the session: closing or expiring it clears the bag.
|
|
9174
9174
|
*/
|
|
9175
9175
|
tool_context?: {
|
|
9176
9176
|
[key: string]: string;
|
|
@@ -9197,7 +9197,7 @@ type AddSessionMessageRequest = {
|
|
|
9197
9197
|
*/
|
|
9198
9198
|
message: string;
|
|
9199
9199
|
/**
|
|
9200
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9200
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9201
9201
|
*/
|
|
9202
9202
|
tool_context?: {
|
|
9203
9203
|
[key: string]: string;
|
|
@@ -9213,7 +9213,7 @@ type AddSessionMessageRequest = {
|
|
|
9213
9213
|
*/
|
|
9214
9214
|
document_id: string;
|
|
9215
9215
|
/**
|
|
9216
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9216
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9217
9217
|
*/
|
|
9218
9218
|
tool_context?: {
|
|
9219
9219
|
[key: string]: string;
|
|
@@ -9239,7 +9239,7 @@ type GenerateSessionRequest = {
|
|
|
9239
9239
|
*/
|
|
9240
9240
|
model?: string;
|
|
9241
9241
|
/**
|
|
9242
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9242
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
9243
9243
|
*/
|
|
9244
9244
|
tool_context?: {
|
|
9245
9245
|
[key: string]: string;
|
|
@@ -9449,7 +9449,7 @@ type CreateTaskRequest = {
|
|
|
9449
9449
|
*/
|
|
9450
9450
|
state?: string;
|
|
9451
9451
|
/**
|
|
9452
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
9452
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call made by this task's automation dispatches — the agent generations a state's `on_enter` starts, and the agent nodes of any orchestration run it starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
9453
9453
|
* Creation is the task's first move, so this is the bag the entry state's `on_enter` runs with. Each transition may replace it (see `TransitionTaskRequest.tool_context`).
|
|
9454
9454
|
* The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped in any casing and re-derived server-side, so a task-dispatched generation cannot forge them. A key outside the HTTP header-name grammar is rejected with `INVALID_TOOL_CONTEXT_KEY` (400).
|
|
9455
9455
|
* Write-only: the stored bag is never returned by any task read, and it is cleared when the task reaches a terminal state.
|
|
@@ -9539,7 +9539,7 @@ type Tool = {
|
|
|
9539
9539
|
/**
|
|
9540
9540
|
* Tool type
|
|
9541
9541
|
*/
|
|
9542
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
9542
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
9543
9543
|
/**
|
|
9544
9544
|
* What the tool does (sent to the model)
|
|
9545
9545
|
*/
|
|
@@ -9551,7 +9551,7 @@ type Tool = {
|
|
|
9551
9551
|
[key: string]: string;
|
|
9552
9552
|
} | null;
|
|
9553
9553
|
/**
|
|
9554
|
-
* Allowlist of actions to expose. For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
9554
|
+
* Allowlist of actions to expose. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
9555
9555
|
*/
|
|
9556
9556
|
actions?: Array<string> | null;
|
|
9557
9557
|
/**
|
|
@@ -9575,7 +9575,7 @@ type Tool = {
|
|
|
9575
9575
|
};
|
|
9576
9576
|
type UpdateToolRequest = {
|
|
9577
9577
|
name?: string;
|
|
9578
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline';
|
|
9578
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline';
|
|
9579
9579
|
description?: string | null;
|
|
9580
9580
|
parameters?: {
|
|
9581
9581
|
[key: string]: unknown;
|
|
@@ -9587,7 +9587,7 @@ type UpdateToolRequest = {
|
|
|
9587
9587
|
*/
|
|
9588
9588
|
mcp_pins?: null;
|
|
9589
9589
|
/**
|
|
9590
|
-
* Allowlist of actions. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool). Ignored for other tool types.
|
|
9590
|
+
* Allowlist of actions. For `builtin` tools: action names. For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface (`null` exposes every tool). Ignored for other tool types.
|
|
9591
9591
|
*/
|
|
9592
9592
|
actions?: Array<string> | null;
|
|
9593
9593
|
/**
|
|
@@ -9648,7 +9648,7 @@ type ToolActionList = Page & {
|
|
|
9648
9648
|
};
|
|
9649
9649
|
type CallToolRequest = {
|
|
9650
9650
|
/**
|
|
9651
|
-
* For `mcp` tools: the MCP tool name to invoke (must be in the tool's `actions` allowlist when one is set, and must not be in its `denied_actions` denylist). Ignored for `http` tools.
|
|
9651
|
+
* For `builtin` tools: the action name (must be in the tool's `actions` list). For `mcp` tools: the MCP tool name to invoke (must be in the tool's `actions` allowlist when one is set, and must not be in its `denied_actions` denylist). Ignored for `http` tools.
|
|
9652
9652
|
*
|
|
9653
9653
|
*/
|
|
9654
9654
|
action?: string;
|
|
@@ -9773,7 +9773,7 @@ type Trigger = {
|
|
|
9773
9773
|
*/
|
|
9774
9774
|
target_id?: string;
|
|
9775
9775
|
/**
|
|
9776
|
-
* Tool targets only — the action for mcp tools
|
|
9776
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
9777
9777
|
*/
|
|
9778
9778
|
action?: string | null;
|
|
9779
9779
|
/**
|
|
@@ -9823,7 +9823,7 @@ type CreateTriggerRequest = {
|
|
|
9823
9823
|
target_type: 'orchestration' | 'agent' | 'tool' | 'eval';
|
|
9824
9824
|
target_id: string;
|
|
9825
9825
|
/**
|
|
9826
|
-
* Tool targets only — the action for mcp tools
|
|
9826
|
+
* Tool targets only — the action for builtin/mcp tools
|
|
9827
9827
|
*/
|
|
9828
9828
|
action?: string;
|
|
9829
9829
|
input?: {
|
|
@@ -10713,13 +10713,13 @@ type ToolWritable = {
|
|
|
10713
10713
|
/**
|
|
10714
10714
|
* Tool type
|
|
10715
10715
|
*/
|
|
10716
|
-
type?: 'http' | 'client' | 'mcp' | 'pipeline' | 'naturali';
|
|
10716
|
+
type?: 'http' | 'client' | 'mcp' | 'builtin' | 'pipeline' | 'naturali';
|
|
10717
10717
|
/**
|
|
10718
10718
|
* What the tool does (sent to the model)
|
|
10719
10719
|
*/
|
|
10720
10720
|
description?: string | null;
|
|
10721
10721
|
/**
|
|
10722
|
-
* Allowlist of actions to expose. For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
10722
|
+
* Allowlist of actions to expose. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names — when set, only those tools are exposed to the model and callable via `/call`; when `null`, the entire MCP server surface is exposed. Ignored for other tool types.
|
|
10723
10723
|
*/
|
|
10724
10724
|
actions?: Array<string> | null;
|
|
10725
10725
|
/**
|
|
@@ -12619,7 +12619,7 @@ type CreateAgentGenerationData = {
|
|
|
12619
12619
|
};
|
|
12620
12620
|
query?: {
|
|
12621
12621
|
/**
|
|
12622
|
-
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`.
|
|
12622
|
+
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately with a `generation_id` to poll. Pass `true` to block until the generation settles and receive the result. Mutually exclusive with `stream: true`. A tool call, `builtin` or MCP, always waits.
|
|
12623
12623
|
*/
|
|
12624
12624
|
wait?: boolean;
|
|
12625
12625
|
};
|
|
@@ -17341,7 +17341,7 @@ type GenerateConversationMessageData = {
|
|
|
17341
17341
|
*/
|
|
17342
17342
|
stream?: boolean;
|
|
17343
17343
|
/**
|
|
17344
|
-
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `
|
|
17344
|
+
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http`, `mcp` and `builtin` tool call in this generation. The header name is the deployment's configured context prefix (`X-Naturali-Context-` by default) plus the key verbatim — no character is re-cased and keys are never case-converted, so they round-trip exactly as sent. An invalid or colliding key is rejected with `400 INVALID_TOOL_CONTEXT_KEY`.
|
|
17345
17345
|
*/
|
|
17346
17346
|
tool_context?: {
|
|
17347
17347
|
[key: string]: string;
|
|
@@ -17356,7 +17356,7 @@ type GenerateConversationMessageData = {
|
|
|
17356
17356
|
};
|
|
17357
17357
|
query?: {
|
|
17358
17358
|
/**
|
|
17359
|
-
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result.
|
|
17359
|
+
* When omitted or `false` (default), the generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result. A tool call, `builtin` or MCP, always waits.
|
|
17360
17360
|
*/
|
|
17361
17361
|
wait?: boolean;
|
|
17362
17362
|
};
|
|
@@ -23565,7 +23565,7 @@ type CreateIngestionRuleData = {
|
|
|
23565
23565
|
*/
|
|
23566
23566
|
agent_id?: string;
|
|
23567
23567
|
/**
|
|
23568
|
-
* Operation id, required for mcp tool converters
|
|
23568
|
+
* Operation id, required for mcp tool converters, and for builtin unless a preset_parameters (the rule's or the tool's) names action
|
|
23569
23569
|
*/
|
|
23570
23570
|
action?: string;
|
|
23571
23571
|
/**
|
|
@@ -32569,7 +32569,7 @@ type GenerateSessionResponseData = {
|
|
|
32569
32569
|
};
|
|
32570
32570
|
query?: {
|
|
32571
32571
|
/**
|
|
32572
|
-
* When omitted or `false` (default), generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result.
|
|
32572
|
+
* When omitted or `false` (default), generation runs in the background and `202 Accepted` is returned immediately. Pass `true` to block until the generation settles and receive the result. A tool call, `builtin` or MCP, always waits.
|
|
32573
32573
|
*/
|
|
32574
32574
|
wait?: boolean;
|
|
32575
32575
|
};
|
|
@@ -34333,7 +34333,7 @@ type CallToolErrors = {
|
|
|
34333
34333
|
type CallToolError = CallToolErrors[keyof CallToolErrors];
|
|
34334
34334
|
type CallToolResponses = {
|
|
34335
34335
|
/**
|
|
34336
|
-
* The raw output returned by the tool — any JSON value (object, array, string, number, boolean). `null` when the tool produced no output —
|
|
34336
|
+
* The raw output returned by the tool — any JSON value (object, array, string, number, boolean). `null` when the tool produced no output — a `builtin` action answering `204 No Content`, for instance.
|
|
34337
34337
|
*/
|
|
34338
34338
|
200: unknown;
|
|
34339
34339
|
};
|
|
@@ -37736,7 +37736,7 @@ export declare class Deciders {
|
|
|
37736
37736
|
/**
|
|
37737
37737
|
* Create a decider
|
|
37738
37738
|
*
|
|
37739
|
-
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`) and must not pin `input` or `questions`
|
|
37739
|
+
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`; a `builtin` tool names its `action` in `preset_parameters`) and must not pin `input` or `questions` there, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
37740
37740
|
*/
|
|
37741
37741
|
static createDecider<ThrowOnError extends boolean = false>(options: Options<CreateDeciderData, ThrowOnError>): RequestResult<CreateDeciderResponses, CreateDeciderErrors, ThrowOnError>;
|
|
37742
37742
|
/**
|
|
@@ -39655,8 +39655,8 @@ export declare class Tools {
|
|
|
39655
39655
|
/**
|
|
39656
39656
|
* Call a tool
|
|
39657
39657
|
*
|
|
39658
|
-
* Directly invokes a tool and returns its output. Supported for `http`, `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.
|
|
39659
|
-
* For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When
|
|
39658
|
+
* 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.
|
|
39659
|
+
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (`builtin`) 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.
|
|
39660
39660
|
* `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.
|
|
39661
39661
|
* Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is.
|
|
39662
39662
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -2356,7 +2356,7 @@ var Deciders = class {
|
|
|
2356
2356
|
/**
|
|
2357
2357
|
* Create a decider
|
|
2358
2358
|
*
|
|
2359
|
-
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`) and must not pin `input` or `questions`
|
|
2359
|
+
* Creates a decider at version 1: a named question set and the backend that answers it, exactly one of `agent_id` and `tool_id`. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by `active_tool_ids` and no `knowledge_config.write_memory_store_id` — or the create is refused with `400 DECIDER_AGENT_NOT_TOOL_LESS`. A tool must run server-side with no `action` (not `client` or `mcp`; a `builtin` tool names its `action` in `preset_parameters`) and must not pin `input` or `questions` there, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
2360
2360
|
*/
|
|
2361
2361
|
static createDecider(options) {
|
|
2362
2362
|
return (options.client ?? client).post({
|
|
@@ -6088,8 +6088,8 @@ var Tools = class {
|
|
|
6088
6088
|
/**
|
|
6089
6089
|
* Call a tool
|
|
6090
6090
|
*
|
|
6091
|
-
* Directly invokes a tool and returns its output. Supported for `http`, `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.
|
|
6092
|
-
* For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When
|
|
6091
|
+
* 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.
|
|
6092
|
+
* For `builtin` and `mcp` tools the `action` field is required and identifies which action (`builtin`) 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.
|
|
6093
6093
|
* `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.
|
|
6094
6094
|
* Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is.
|
|
6095
6095
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.261.1",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.
|
|
41
|
+
"@naturali/api": "0.261.1",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|