@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.mjs
CHANGED
|
@@ -1353,7 +1353,7 @@ var Agents = class {
|
|
|
1353
1353
|
/**
|
|
1354
1354
|
* Submit tool outputs for a paused generation
|
|
1355
1355
|
*
|
|
1356
|
-
* Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
|
|
1356
|
+
* 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.
|
|
1357
1357
|
*
|
|
1358
1358
|
*/
|
|
1359
1359
|
static submitAgentToolOutputs(options) {
|
|
@@ -4952,7 +4952,7 @@ var Playbooks = class {
|
|
|
4952
4952
|
*
|
|
4953
4953
|
* 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`.
|
|
4954
4954
|
*
|
|
4955
|
-
* The
|
|
4955
|
+
* 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`).
|
|
4956
4956
|
*/
|
|
4957
4957
|
static createPlaybook(options) {
|
|
4958
4958
|
return (options.client ?? client).post({
|
|
@@ -5006,9 +5006,9 @@ var Playbooks = class {
|
|
|
5006
5006
|
/**
|
|
5007
5007
|
* Update a playbook
|
|
5008
5008
|
*
|
|
5009
|
-
* Updates any of `name`, `description` and `
|
|
5009
|
+
* 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.
|
|
5010
5010
|
*
|
|
5011
|
-
*
|
|
5011
|
+
* 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.
|
|
5012
5012
|
*/
|
|
5013
5013
|
static updatePlaybook(options) {
|
|
5014
5014
|
return (options.client ?? client).patch({
|
|
@@ -5045,7 +5045,7 @@ var Playbooks = class {
|
|
|
5045
5045
|
/**
|
|
5046
5046
|
* Restore an archived playbook version
|
|
5047
5047
|
*
|
|
5048
|
-
* 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
|
|
5048
|
+
* 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.
|
|
5049
5049
|
*/
|
|
5050
5050
|
static restorePlaybookVersion(options) {
|
|
5051
5051
|
return (options.client ?? client).post({
|
|
@@ -5145,7 +5145,7 @@ var Playbooks = class {
|
|
|
5145
5145
|
/**
|
|
5146
5146
|
* Run a node of a case
|
|
5147
5147
|
*
|
|
5148
|
-
* 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
|
|
5148
|
+
* 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`.
|
|
5149
5149
|
*
|
|
5150
5150
|
* 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`.
|
|
5151
5151
|
*
|
|
@@ -5190,7 +5190,7 @@ var Playbooks = class {
|
|
|
5190
5190
|
*
|
|
5191
5191
|
* 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.
|
|
5192
5192
|
*
|
|
5193
|
-
* 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
|
|
5193
|
+
* 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`.
|
|
5194
5194
|
*
|
|
5195
5195
|
* Without `wait` every export answers `running` and settles in the background; with `wait: true` it answers once each has its file or its error.
|
|
5196
5196
|
*/
|
|
@@ -5932,7 +5932,7 @@ var Sessions = class {
|
|
|
5932
5932
|
/**
|
|
5933
5933
|
* Submit tool outputs
|
|
5934
5934
|
*
|
|
5935
|
-
* 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.
|
|
5935
|
+
* 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.
|
|
5936
5936
|
*
|
|
5937
5937
|
*/
|
|
5938
5938
|
static submitSessionToolOutputs(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.245.0",
|
|
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.245.0",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.1",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|