@naturali/sdk 0.243.2 → 0.245.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 +8 -8
- package/dist/index.d.cts +162 -71
- package/dist/index.d.mts +162 -71
- package/dist/index.mjs +8 -8
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1354,7 +1354,7 @@ var Agents = class {
|
|
|
1354
1354
|
/**
|
|
1355
1355
|
* Submit tool outputs for a paused generation
|
|
1356
1356
|
*
|
|
1357
|
-
* Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
|
|
1357
|
+
* Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call. Requires `agents:CreateAgentGeneration` on the agent in addition to `generations:ResumeGeneration` on the generation. The resumed segment runs under the generation's stored authority held to the caller's, so a resume never widens what the turn may do.
|
|
1358
1358
|
*
|
|
1359
1359
|
*/
|
|
1360
1360
|
static submitAgentToolOutputs(options) {
|
|
@@ -4953,7 +4953,7 @@ var Playbooks = class {
|
|
|
4953
4953
|
*
|
|
4954
4954
|
* Creates a playbook at version 1. The definition is refused with `400 PLAYBOOK_VALIDATION_FAILED` when it holds a duplicate node or input, an input reading a missing node or field, an `execute` node without an executor or another kind with one, transformations on a non-final node, or a cycle; `meta.problems` lists every one. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
4955
4955
|
*
|
|
4956
|
-
* The
|
|
4956
|
+
* The version's executors run under `policy_ids`, required and non-empty (`400 VALIDATION_FAILED`). The caller must hold every grant of each policy it names (`403 POLICY_GRANT_NOT_HELD`) and be allowed to start every executor the definition names (`403 ACTION_NOT_HELD`), and each must exist in the project, or be an agent or tool shared with it (`400 PLAYBOOK_VALIDATION_FAILED`, an `EXECUTOR_NOT_FOUND` problem). A `tool` executor on an `mcp` tool must name in `operation_id` an action the tool's binding allows (`EXECUTOR_ACTION_REQUIRED`, `EXECUTOR_ACTION_UNAVAILABLE`). An executor cannot be a `client` tool (`EXECUTOR_TOOL_UNSUPPORTED`), nor a transformation's tool a `client` or `mcp` tool (`TRANSFORMATION_TOOL_UNSUPPORTED`).
|
|
4957
4957
|
*/
|
|
4958
4958
|
static createPlaybook(options) {
|
|
4959
4959
|
return (options.client ?? client).post({
|
|
@@ -5007,9 +5007,9 @@ var Playbooks = class {
|
|
|
5007
5007
|
/**
|
|
5008
5008
|
* Update a playbook
|
|
5009
5009
|
*
|
|
5010
|
-
* Updates any of `name`, `description` and `
|
|
5010
|
+
* Updates any of `name`, `description`, `definition` and `policy_ids`. Only a change to `definition` or `policy_ids` archives a new version; a rename or a rewrite the playbook already holds leaves `version` where it is. A case keeps the version it was created on.
|
|
5011
5011
|
*
|
|
5012
|
-
*
|
|
5012
|
+
* Every write is checked as on create against the playbook as it stands after it: `400 VALIDATION_FAILED` for one left without `policy_ids`, `403 POLICY_GRANT_NOT_HELD` for a policy whose grants the caller does not hold, `403 ACTION_NOT_HELD` for an executor it may not start, an `EXECUTOR_NOT_FOUND` problem for one that does not exist, `EXECUTOR_ACTION_REQUIRED` or `EXECUTOR_ACTION_UNAVAILABLE` for an `mcp` tool action a run could not call, `EXECUTOR_TOOL_UNSUPPORTED` for a `client` tool executor, `TRANSFORMATION_TOOL_UNSUPPORTED` for a `client` or `mcp` transformation tool.
|
|
5013
5013
|
*/
|
|
5014
5014
|
static updatePlaybook(options) {
|
|
5015
5015
|
return (options.client ?? client).patch({
|
|
@@ -5046,7 +5046,7 @@ var Playbooks = class {
|
|
|
5046
5046
|
/**
|
|
5047
5047
|
* Restore an archived playbook version
|
|
5048
5048
|
*
|
|
5049
|
-
* Writes an archived definition back as the playbook's live one, which archives it again as a new version rather than rewinding the counter. Restoring the definition the playbook already holds is a no-op. The
|
|
5049
|
+
* Writes an archived definition back as the playbook's live one, which archives it again as a new version rather than rewinding the counter. Restoring the definition the playbook already holds is a no-op. The archived `policy_ids` are restored with it, the playbook's own when the version archived none; the write is checked as an update.
|
|
5050
5050
|
*/
|
|
5051
5051
|
static restorePlaybookVersion(options) {
|
|
5052
5052
|
return (options.client ?? client).post({
|
|
@@ -5146,7 +5146,7 @@ var Playbooks = class {
|
|
|
5146
5146
|
/**
|
|
5147
5147
|
* Run a node of a case
|
|
5148
5148
|
*
|
|
5149
|
-
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs
|
|
5149
|
+
* Runs one node now. The cascade already runs every node whose inputs are set once a write, a settle or a resume makes it runnable, and never reruns a `failed` or `done` one: this is how a failed node is retried, and how a `done` node is recomputed after an upgrade changed its executor. A `collect` node takes its own input values as its output, any other node starts its executor with the node's input values mapped through the executor's `input`. The executor runs under the `policy_ids` of the case's playbook version, which must allow starting it (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). Only a `ready`, `stale`, `failed` or `done` node with every required input set runs; anything else is `409 PLAYBOOK_NODE_NOT_RUNNABLE`. A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
5150
5150
|
*
|
|
5151
5151
|
* An `upstream` node has no executor: running it pulls the current output of the node it names in the bound case, which must be `done`. This is the only way to refresh one that an upstream change left `stale`.
|
|
5152
5152
|
*
|
|
@@ -5191,7 +5191,7 @@ var Playbooks = class {
|
|
|
5191
5191
|
*
|
|
5192
5192
|
* Renders one revision of a final node as files, one export per transformation: each transformation's tool is called with the case's `case_id` and `subject`, the `node_id`, the `revision` and that revision's `output`, and must answer a file (`execute.response_mode: base64`) of its `format`'s content type. The file is kept in the project's files under `/.system/playbooks/`. An export never feeds a node.
|
|
5193
5193
|
*
|
|
5194
|
-
* Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs
|
|
5194
|
+
* Without `revision` the node's current output is exported, which needs the node `done` (`409 PLAYBOOK_NODE_NOT_EXPORTABLE`); a `revision` names an earlier output or confirmation of the node. Each tool runs under the `policy_ids` of the case's playbook version, which must allow calling it (`403 PLAYBOOK_EXECUTOR_FORBIDDEN`). A paused case is `409 PLAYBOOK_CASE_PAUSED`, and a case in a paused project `409 PROJECT_PAUSED`.
|
|
5195
5195
|
*
|
|
5196
5196
|
* Without `wait` every export answers `running` and settles in the background; with `wait: true` it answers once each has its file or its error.
|
|
5197
5197
|
*/
|
|
@@ -5933,7 +5933,7 @@ var Sessions = class {
|
|
|
5933
5933
|
/**
|
|
5934
5934
|
* Submit tool outputs
|
|
5935
5935
|
*
|
|
5936
|
-
* Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result. A generation that did not run in the session's conversation is 404 (GENERATION_NOT_FOUND) and receives no outputs.
|
|
5936
|
+
* Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result. A generation that did not run in the session's conversation is 404 (GENERATION_NOT_FOUND) and receives no outputs. Requires `generations:ResumeGeneration` on the generation in addition to `agents:SubmitSessionToolOutputs`; the resumed segment runs under the generation's stored authority held to the caller's.
|
|
5937
5937
|
*
|
|
5938
5938
|
*/
|
|
5939
5939
|
static submitSessionToolOutputs(options) {
|