@naturali/cli 0.153.0 → 0.155.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.mjs +876 -152
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.155.0";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -2004,6 +2004,151 @@ var Conversations = class {
|
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
};
|
|
2007
|
+
var Deciders = class {
|
|
2008
|
+
/**
|
|
2009
|
+
* List deciders
|
|
2010
|
+
*
|
|
2011
|
+
* Returns the deciders defined in a project, newest first.
|
|
2012
|
+
*/
|
|
2013
|
+
static listDeciders(options) {
|
|
2014
|
+
return (options.client ?? client).get({
|
|
2015
|
+
url: "/v1/projects/{project_id}/deciders",
|
|
2016
|
+
...options
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Create a decider
|
|
2021
|
+
*
|
|
2022
|
+
* 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 be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.
|
|
2023
|
+
*/
|
|
2024
|
+
static createDecider(options) {
|
|
2025
|
+
return (options.client ?? client).post({
|
|
2026
|
+
url: "/v1/projects/{project_id}/deciders",
|
|
2027
|
+
...options,
|
|
2028
|
+
headers: {
|
|
2029
|
+
"Content-Type": "application/json",
|
|
2030
|
+
...options.headers
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Delete a decider
|
|
2036
|
+
*
|
|
2037
|
+
* Deletes a decider and its version archive. Its decisions remain and keep naming the decider's ID.
|
|
2038
|
+
*/
|
|
2039
|
+
static deleteDecider(options) {
|
|
2040
|
+
return (options.client ?? client).delete({
|
|
2041
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}",
|
|
2042
|
+
...options
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Get a decider
|
|
2047
|
+
*
|
|
2048
|
+
* Returns a decider with its current question set and version.
|
|
2049
|
+
*/
|
|
2050
|
+
static getDecider(options) {
|
|
2051
|
+
return (options.client ?? client).get({
|
|
2052
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}",
|
|
2053
|
+
...options
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
/**
|
|
2057
|
+
* Update a decider
|
|
2058
|
+
*
|
|
2059
|
+
* Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.
|
|
2060
|
+
*/
|
|
2061
|
+
static updateDecider(options) {
|
|
2062
|
+
return (options.client ?? client).patch({
|
|
2063
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}",
|
|
2064
|
+
...options,
|
|
2065
|
+
headers: {
|
|
2066
|
+
"Content-Type": "application/json",
|
|
2067
|
+
...options.headers
|
|
2068
|
+
}
|
|
2069
|
+
});
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* List a decider's versions
|
|
2073
|
+
*
|
|
2074
|
+
* Returns the decider's archived question sets, newest first. A version is written on create and on every write that changes `questions`.
|
|
2075
|
+
*/
|
|
2076
|
+
static listDeciderVersions(options) {
|
|
2077
|
+
return (options.client ?? client).get({
|
|
2078
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}/versions",
|
|
2079
|
+
...options
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Fetch an archived decider version
|
|
2084
|
+
*
|
|
2085
|
+
* Returns the question set a version held. A decision names the `decider_version` it was answered under, so this is how its criteria are read after the decider has changed.
|
|
2086
|
+
*/
|
|
2087
|
+
static getDeciderVersion(options) {
|
|
2088
|
+
return (options.client ?? client).get({
|
|
2089
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}/versions/{version}",
|
|
2090
|
+
...options
|
|
2091
|
+
});
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* Restore an archived decider version
|
|
2095
|
+
*
|
|
2096
|
+
* Writes an archived question set back as the decider's live one, which archives it again as a new version rather than rewinding the counter. Restoring the question set the decider already holds is a no-op.
|
|
2097
|
+
*/
|
|
2098
|
+
static restoreDeciderVersion(options) {
|
|
2099
|
+
return (options.client ?? client).post({
|
|
2100
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}/versions/{version}/restore",
|
|
2101
|
+
...options,
|
|
2102
|
+
headers: {
|
|
2103
|
+
"Content-Type": "application/json",
|
|
2104
|
+
...options.headers
|
|
2105
|
+
}
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Request a decision
|
|
2110
|
+
*
|
|
2111
|
+
* Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged.
|
|
2112
|
+
*
|
|
2113
|
+
* Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`).
|
|
2114
|
+
*
|
|
2115
|
+
* A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`.
|
|
2116
|
+
*
|
|
2117
|
+
* With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /v1/projects/{project_id}/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.
|
|
2118
|
+
*/
|
|
2119
|
+
static createDecision(options) {
|
|
2120
|
+
return (options.client ?? client).post({
|
|
2121
|
+
url: "/v1/projects/{project_id}/deciders/{decider_id}/decisions",
|
|
2122
|
+
...options,
|
|
2123
|
+
headers: {
|
|
2124
|
+
"Content-Type": "application/json",
|
|
2125
|
+
...options.headers
|
|
2126
|
+
}
|
|
2127
|
+
});
|
|
2128
|
+
}
|
|
2129
|
+
/**
|
|
2130
|
+
* List decisions
|
|
2131
|
+
*
|
|
2132
|
+
* Returns the decisions in a project, newest first.
|
|
2133
|
+
*/
|
|
2134
|
+
static listDecisions(options) {
|
|
2135
|
+
return (options.client ?? client).get({
|
|
2136
|
+
url: "/v1/projects/{project_id}/decisions",
|
|
2137
|
+
...options
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Get a decision
|
|
2142
|
+
*
|
|
2143
|
+
* Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.
|
|
2144
|
+
*/
|
|
2145
|
+
static getDecision(options) {
|
|
2146
|
+
return (options.client ?? client).get({
|
|
2147
|
+
url: "/v1/projects/{project_id}/decisions/{decision_id}",
|
|
2148
|
+
...options
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2007
2152
|
var Documents = class {
|
|
2008
2153
|
/**
|
|
2009
2154
|
* List documents
|
|
@@ -4689,7 +4834,7 @@ var Tools = class {
|
|
|
4689
4834
|
/**
|
|
4690
4835
|
* Delete a tool
|
|
4691
4836
|
*
|
|
4692
|
-
* Deletes a tool by ID.
|
|
4837
|
+
* Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.
|
|
4693
4838
|
*/
|
|
4694
4839
|
static deleteTool(options) {
|
|
4695
4840
|
return (options.client ?? client).delete({
|
|
@@ -4990,6 +5135,46 @@ var Users = class {
|
|
|
4990
5135
|
...options
|
|
4991
5136
|
});
|
|
4992
5137
|
}
|
|
5138
|
+
/**
|
|
5139
|
+
* List what a billing ceiling stopped
|
|
5140
|
+
*
|
|
5141
|
+
* Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first.
|
|
5142
|
+
*
|
|
5143
|
+
* `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A project-confined key sees its own project's stops only.
|
|
5144
|
+
*
|
|
5145
|
+
*/
|
|
5146
|
+
static listCurrentUserStops(options) {
|
|
5147
|
+
return (options?.client ?? client).get({
|
|
5148
|
+
url: "/v1/users/me/stops",
|
|
5149
|
+
...options
|
|
5150
|
+
});
|
|
5151
|
+
}
|
|
5152
|
+
/**
|
|
5153
|
+
* Restore a stopped item
|
|
5154
|
+
*
|
|
5155
|
+
* Turns one stopped item back on — re-enables the schedule trigger, or resumes the orchestration run or workflow task — and stops listing it. An item that is no longer stopped (resumed already, finished or deleted) is marked restored too.
|
|
5156
|
+
*
|
|
5157
|
+
* Refused with `409 stop_ceiling_closed` while a ceiling is still closed, naming it in `details.blocked_by`, and with `409 stop_not_restorable` for a cancelled eval run, which can only be dismissed.
|
|
5158
|
+
*
|
|
5159
|
+
*/
|
|
5160
|
+
static restoreCurrentUserStop(options) {
|
|
5161
|
+
return (options.client ?? client).post({
|
|
5162
|
+
url: "/v1/users/me/stops/{stop_id}/restore",
|
|
5163
|
+
...options
|
|
5164
|
+
});
|
|
5165
|
+
}
|
|
5166
|
+
/**
|
|
5167
|
+
* Dismiss a stopped item
|
|
5168
|
+
*
|
|
5169
|
+
* Stops listing an item without turning it back on. Allowed while a ceiling is still closed.
|
|
5170
|
+
*
|
|
5171
|
+
*/
|
|
5172
|
+
static dismissCurrentUserStop(options) {
|
|
5173
|
+
return (options.client ?? client).delete({
|
|
5174
|
+
url: "/v1/users/me/stops/{stop_id}",
|
|
5175
|
+
...options
|
|
5176
|
+
});
|
|
5177
|
+
}
|
|
4993
5178
|
};
|
|
4994
5179
|
var Webhooks = class {
|
|
4995
5180
|
/**
|
|
@@ -5284,6 +5469,7 @@ var NaturaliClient = class {
|
|
|
5284
5469
|
channels;
|
|
5285
5470
|
auth;
|
|
5286
5471
|
conversations;
|
|
5472
|
+
deciders;
|
|
5287
5473
|
documents;
|
|
5288
5474
|
embeddings;
|
|
5289
5475
|
evaluations;
|
|
@@ -5336,6 +5522,7 @@ var NaturaliClient = class {
|
|
|
5336
5522
|
this.channels = bindResource(Channels, this.http);
|
|
5337
5523
|
this.auth = bindResource(Auth, this.http);
|
|
5338
5524
|
this.conversations = bindResource(Conversations, this.http);
|
|
5525
|
+
this.deciders = bindResource(Deciders, this.http);
|
|
5339
5526
|
this.documents = bindResource(Documents, this.http);
|
|
5340
5527
|
this.embeddings = bindResource(Embeddings, this.http);
|
|
5341
5528
|
this.evaluations = bindResource(Evaluations, this.http);
|
|
@@ -5383,6 +5570,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
5383
5570
|
Chains: () => Chains,
|
|
5384
5571
|
Channels: () => Channels,
|
|
5385
5572
|
Conversations: () => Conversations,
|
|
5573
|
+
Deciders: () => Deciders,
|
|
5386
5574
|
Documents: () => Documents,
|
|
5387
5575
|
Embeddings: () => Embeddings,
|
|
5388
5576
|
Evaluations: () => Evaluations,
|
|
@@ -10016,13 +10204,515 @@ const routes = {
|
|
|
10016
10204
|
}
|
|
10017
10205
|
]
|
|
10018
10206
|
},
|
|
10019
|
-
"delete-conversation": {
|
|
10020
|
-
serviceClass: "Conversations",
|
|
10021
|
-
operationId: "deleteConversation",
|
|
10022
|
-
description: "Deletes a conversation by its ID",
|
|
10023
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10207
|
+
"delete-conversation": {
|
|
10208
|
+
serviceClass: "Conversations",
|
|
10209
|
+
operationId: "deleteConversation",
|
|
10210
|
+
description: "Deletes a conversation by its ID",
|
|
10211
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10212
|
+
httpMethod: "delete",
|
|
10213
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10214
|
+
queryParams: [],
|
|
10215
|
+
headerParams: [],
|
|
10216
|
+
cookieParams: [],
|
|
10217
|
+
flags: [{
|
|
10218
|
+
"name": "project_id",
|
|
10219
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10220
|
+
"required": true,
|
|
10221
|
+
"type": "string",
|
|
10222
|
+
"in": "path"
|
|
10223
|
+
}, {
|
|
10224
|
+
"name": "conversation_id",
|
|
10225
|
+
"description": "Conversation ID",
|
|
10226
|
+
"required": true,
|
|
10227
|
+
"type": "string",
|
|
10228
|
+
"in": "path"
|
|
10229
|
+
}]
|
|
10230
|
+
},
|
|
10231
|
+
"list-conversation-messages": {
|
|
10232
|
+
serviceClass: "Conversations",
|
|
10233
|
+
operationId: "listConversationMessages",
|
|
10234
|
+
description: "Returns all messages (documents) attached to a conversation, ordered by position",
|
|
10235
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10236
|
+
httpMethod: "get",
|
|
10237
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10238
|
+
queryParams: ["limit", "offset"],
|
|
10239
|
+
headerParams: [],
|
|
10240
|
+
cookieParams: [],
|
|
10241
|
+
flags: [
|
|
10242
|
+
{
|
|
10243
|
+
"name": "project_id",
|
|
10244
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10245
|
+
"required": true,
|
|
10246
|
+
"type": "string",
|
|
10247
|
+
"in": "path"
|
|
10248
|
+
},
|
|
10249
|
+
{
|
|
10250
|
+
"name": "conversation_id",
|
|
10251
|
+
"description": "Conversation ID",
|
|
10252
|
+
"required": true,
|
|
10253
|
+
"type": "string",
|
|
10254
|
+
"in": "path"
|
|
10255
|
+
},
|
|
10256
|
+
{
|
|
10257
|
+
"name": "limit",
|
|
10258
|
+
"description": "Maximum number of results to return",
|
|
10259
|
+
"required": false,
|
|
10260
|
+
"type": "integer",
|
|
10261
|
+
"in": "query"
|
|
10262
|
+
},
|
|
10263
|
+
{
|
|
10264
|
+
"name": "offset",
|
|
10265
|
+
"description": "Number of results to skip",
|
|
10266
|
+
"required": false,
|
|
10267
|
+
"type": "integer",
|
|
10268
|
+
"in": "query"
|
|
10269
|
+
}
|
|
10270
|
+
]
|
|
10271
|
+
},
|
|
10272
|
+
"add-conversation-message": {
|
|
10273
|
+
serviceClass: "Conversations",
|
|
10274
|
+
operationId: "addConversationMessage",
|
|
10275
|
+
description: "Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.",
|
|
10276
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10277
|
+
httpMethod: "post",
|
|
10278
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10279
|
+
queryParams: [],
|
|
10280
|
+
headerParams: [],
|
|
10281
|
+
cookieParams: [],
|
|
10282
|
+
flags: [
|
|
10283
|
+
{
|
|
10284
|
+
"name": "project_id",
|
|
10285
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10286
|
+
"required": true,
|
|
10287
|
+
"type": "string",
|
|
10288
|
+
"in": "path"
|
|
10289
|
+
},
|
|
10290
|
+
{
|
|
10291
|
+
"name": "conversation_id",
|
|
10292
|
+
"description": "Conversation ID",
|
|
10293
|
+
"required": true,
|
|
10294
|
+
"type": "string",
|
|
10295
|
+
"in": "path"
|
|
10296
|
+
},
|
|
10297
|
+
{
|
|
10298
|
+
"name": "message",
|
|
10299
|
+
"description": "Message text content to add to the conversation",
|
|
10300
|
+
"required": true,
|
|
10301
|
+
"type": "string",
|
|
10302
|
+
"in": "body"
|
|
10303
|
+
},
|
|
10304
|
+
{
|
|
10305
|
+
"name": "role",
|
|
10306
|
+
"description": "Role of the message sender",
|
|
10307
|
+
"required": true,
|
|
10308
|
+
"type": "string",
|
|
10309
|
+
"in": "body"
|
|
10310
|
+
},
|
|
10311
|
+
{
|
|
10312
|
+
"name": "actor_id",
|
|
10313
|
+
"description": "Optional actor ID to associate with this message (user identity)",
|
|
10314
|
+
"required": false,
|
|
10315
|
+
"type": "string",
|
|
10316
|
+
"in": "body"
|
|
10317
|
+
},
|
|
10318
|
+
{
|
|
10319
|
+
"name": "position",
|
|
10320
|
+
"description": "Zero-based position. Defaults to MAX+1 (append).",
|
|
10321
|
+
"required": false,
|
|
10322
|
+
"type": "integer",
|
|
10323
|
+
"in": "body"
|
|
10324
|
+
},
|
|
10325
|
+
{
|
|
10326
|
+
"name": "metadata",
|
|
10327
|
+
"description": "Caller-owned annotations on the message (e.g. a phone number, a channel), stored as sent and returned verbatim. The platform does not read the bag, so nothing in it reaches the model: a value the model should see belongs in `message`.",
|
|
10328
|
+
"required": false,
|
|
10329
|
+
"type": "object",
|
|
10330
|
+
"in": "body"
|
|
10331
|
+
}
|
|
10332
|
+
]
|
|
10333
|
+
},
|
|
10334
|
+
"generate-conversation-message": {
|
|
10335
|
+
serviceClass: "Conversations",
|
|
10336
|
+
operationId: "generateConversationMessage",
|
|
10337
|
+
description: "Generates the next message using the specified actor's linked agent or chat. Background by default: returns `202 Accepted` immediately and the reply lands as a new ConversationMessage when it completes — poll `GET /v1/projects/{project_id}/conversations/{conversation_id}/messages` for it. Pass `?wait=true` to block and receive the result inline. On `completed`, the reply is persisted as a new ConversationMessage authored by that actor. On `requires_action`, nothing is persisted; the caller must submit tool outputs via the Agents module and re-invoke generate — so a flow using client tools should pass `?wait=true`.",
|
|
10338
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10339
|
+
httpMethod: "post",
|
|
10340
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10341
|
+
queryParams: ["wait"],
|
|
10342
|
+
headerParams: [],
|
|
10343
|
+
cookieParams: [],
|
|
10344
|
+
flags: [
|
|
10345
|
+
{
|
|
10346
|
+
"name": "project_id",
|
|
10347
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10348
|
+
"required": true,
|
|
10349
|
+
"type": "string",
|
|
10350
|
+
"in": "path"
|
|
10351
|
+
},
|
|
10352
|
+
{
|
|
10353
|
+
"name": "conversation_id",
|
|
10354
|
+
"description": "",
|
|
10355
|
+
"required": true,
|
|
10356
|
+
"type": "string",
|
|
10357
|
+
"in": "path"
|
|
10358
|
+
},
|
|
10359
|
+
{
|
|
10360
|
+
"name": "wait",
|
|
10361
|
+
"description": "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.",
|
|
10362
|
+
"required": false,
|
|
10363
|
+
"type": "boolean",
|
|
10364
|
+
"in": "query"
|
|
10365
|
+
},
|
|
10366
|
+
{
|
|
10367
|
+
"name": "agent_id",
|
|
10368
|
+
"description": "ID of the agent that will produce the next message.",
|
|
10369
|
+
"required": true,
|
|
10370
|
+
"type": "string",
|
|
10371
|
+
"in": "body"
|
|
10372
|
+
},
|
|
10373
|
+
{
|
|
10374
|
+
"name": "model",
|
|
10375
|
+
"description": "Optional model override.",
|
|
10376
|
+
"required": false,
|
|
10377
|
+
"type": "string",
|
|
10378
|
+
"in": "body"
|
|
10379
|
+
},
|
|
10380
|
+
{
|
|
10381
|
+
"name": "stream",
|
|
10382
|
+
"description": "If true, stream tokens via SSE. NOT IMPLEMENTED in v1 — returns 501.",
|
|
10383
|
+
"required": false,
|
|
10384
|
+
"type": "boolean",
|
|
10385
|
+
"in": "body"
|
|
10386
|
+
},
|
|
10387
|
+
{
|
|
10388
|
+
"name": "tool_context",
|
|
10389
|
+
"description": "Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` 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`.",
|
|
10390
|
+
"required": false,
|
|
10391
|
+
"type": "object",
|
|
10392
|
+
"in": "body"
|
|
10393
|
+
}
|
|
10394
|
+
]
|
|
10395
|
+
},
|
|
10396
|
+
"remove-conversation-message": {
|
|
10397
|
+
serviceClass: "Conversations",
|
|
10398
|
+
operationId: "removeConversationMessage",
|
|
10399
|
+
description: "Removes a document from a conversation",
|
|
10400
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10401
|
+
httpMethod: "delete",
|
|
10402
|
+
pathParams: [
|
|
10403
|
+
"project_id",
|
|
10404
|
+
"conversation_id",
|
|
10405
|
+
"document_id"
|
|
10406
|
+
],
|
|
10407
|
+
queryParams: [],
|
|
10408
|
+
headerParams: [],
|
|
10409
|
+
cookieParams: [],
|
|
10410
|
+
flags: [
|
|
10411
|
+
{
|
|
10412
|
+
"name": "project_id",
|
|
10413
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10414
|
+
"required": true,
|
|
10415
|
+
"type": "string",
|
|
10416
|
+
"in": "path"
|
|
10417
|
+
},
|
|
10418
|
+
{
|
|
10419
|
+
"name": "conversation_id",
|
|
10420
|
+
"description": "Conversation ID",
|
|
10421
|
+
"required": true,
|
|
10422
|
+
"type": "string",
|
|
10423
|
+
"in": "path"
|
|
10424
|
+
},
|
|
10425
|
+
{
|
|
10426
|
+
"name": "document_id",
|
|
10427
|
+
"description": "Document ID",
|
|
10428
|
+
"required": true,
|
|
10429
|
+
"type": "string",
|
|
10430
|
+
"in": "path"
|
|
10431
|
+
}
|
|
10432
|
+
]
|
|
10433
|
+
},
|
|
10434
|
+
"get-conversation-tags": {
|
|
10435
|
+
serviceClass: "Conversations",
|
|
10436
|
+
operationId: "getConversationTags",
|
|
10437
|
+
description: "Returns all tags attached to the conversation",
|
|
10438
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10439
|
+
httpMethod: "get",
|
|
10440
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10441
|
+
queryParams: [],
|
|
10442
|
+
headerParams: [],
|
|
10443
|
+
cookieParams: [],
|
|
10444
|
+
flags: [{
|
|
10445
|
+
"name": "project_id",
|
|
10446
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10447
|
+
"required": true,
|
|
10448
|
+
"type": "string",
|
|
10449
|
+
"in": "path"
|
|
10450
|
+
}, {
|
|
10451
|
+
"name": "conversation_id",
|
|
10452
|
+
"description": "Conversation ID",
|
|
10453
|
+
"required": true,
|
|
10454
|
+
"type": "string",
|
|
10455
|
+
"in": "path"
|
|
10456
|
+
}]
|
|
10457
|
+
},
|
|
10458
|
+
"replace-conversation-tags": {
|
|
10459
|
+
serviceClass: "Conversations",
|
|
10460
|
+
operationId: "replaceConversationTags",
|
|
10461
|
+
description: "Replaces all tags on the conversation with the provided tags",
|
|
10462
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10463
|
+
httpMethod: "put",
|
|
10464
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10465
|
+
queryParams: [],
|
|
10466
|
+
headerParams: [],
|
|
10467
|
+
cookieParams: [],
|
|
10468
|
+
flags: [{
|
|
10469
|
+
"name": "project_id",
|
|
10470
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10471
|
+
"required": true,
|
|
10472
|
+
"type": "string",
|
|
10473
|
+
"in": "path"
|
|
10474
|
+
}, {
|
|
10475
|
+
"name": "conversation_id",
|
|
10476
|
+
"description": "Conversation ID",
|
|
10477
|
+
"required": true,
|
|
10478
|
+
"type": "string",
|
|
10479
|
+
"in": "path"
|
|
10480
|
+
}]
|
|
10481
|
+
},
|
|
10482
|
+
"merge-conversation-tags": {
|
|
10483
|
+
serviceClass: "Conversations",
|
|
10484
|
+
operationId: "mergeConversationTags",
|
|
10485
|
+
description: "Merges provided tags into the conversation's existing tags (existing tags are preserved unless overridden)",
|
|
10486
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10487
|
+
httpMethod: "patch",
|
|
10488
|
+
pathParams: ["project_id", "conversation_id"],
|
|
10489
|
+
queryParams: [],
|
|
10490
|
+
headerParams: [],
|
|
10491
|
+
cookieParams: [],
|
|
10492
|
+
flags: [{
|
|
10493
|
+
"name": "project_id",
|
|
10494
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10495
|
+
"required": true,
|
|
10496
|
+
"type": "string",
|
|
10497
|
+
"in": "path"
|
|
10498
|
+
}, {
|
|
10499
|
+
"name": "conversation_id",
|
|
10500
|
+
"description": "Conversation ID",
|
|
10501
|
+
"required": true,
|
|
10502
|
+
"type": "string",
|
|
10503
|
+
"in": "path"
|
|
10504
|
+
}]
|
|
10505
|
+
},
|
|
10506
|
+
"list-deciders": {
|
|
10507
|
+
serviceClass: "Deciders",
|
|
10508
|
+
operationId: "listDeciders",
|
|
10509
|
+
description: "Returns the deciders defined in a project, newest first.",
|
|
10510
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10511
|
+
httpMethod: "get",
|
|
10512
|
+
pathParams: ["project_id"],
|
|
10513
|
+
queryParams: ["limit", "offset"],
|
|
10514
|
+
headerParams: [],
|
|
10515
|
+
cookieParams: [],
|
|
10516
|
+
flags: [
|
|
10517
|
+
{
|
|
10518
|
+
"name": "project_id",
|
|
10519
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10520
|
+
"required": true,
|
|
10521
|
+
"type": "string",
|
|
10522
|
+
"in": "path"
|
|
10523
|
+
},
|
|
10524
|
+
{
|
|
10525
|
+
"name": "limit",
|
|
10526
|
+
"description": "Maximum number of results to return",
|
|
10527
|
+
"required": false,
|
|
10528
|
+
"type": "integer",
|
|
10529
|
+
"in": "query"
|
|
10530
|
+
},
|
|
10531
|
+
{
|
|
10532
|
+
"name": "offset",
|
|
10533
|
+
"description": "Number of results to skip",
|
|
10534
|
+
"required": false,
|
|
10535
|
+
"type": "integer",
|
|
10536
|
+
"in": "query"
|
|
10537
|
+
}
|
|
10538
|
+
]
|
|
10539
|
+
},
|
|
10540
|
+
"create-decider": {
|
|
10541
|
+
serviceClass: "Deciders",
|
|
10542
|
+
operationId: "createDecider",
|
|
10543
|
+
description: "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 be `http` or `pipeline` and must not pin `state` or `questions` in its `preset_parameters`, or the create is refused with `400 DECIDER_TOOL_NOT_CALLABLE`. A duplicate `name` in the project is `409 NAME_CONFLICT`.",
|
|
10544
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10545
|
+
httpMethod: "post",
|
|
10546
|
+
pathParams: ["project_id"],
|
|
10547
|
+
queryParams: [],
|
|
10548
|
+
headerParams: [],
|
|
10549
|
+
cookieParams: [],
|
|
10550
|
+
flags: [
|
|
10551
|
+
{
|
|
10552
|
+
"name": "project_id",
|
|
10553
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10554
|
+
"required": true,
|
|
10555
|
+
"type": "string",
|
|
10556
|
+
"in": "path"
|
|
10557
|
+
},
|
|
10558
|
+
{
|
|
10559
|
+
"name": "name",
|
|
10560
|
+
"description": "Human-readable name, unique per project",
|
|
10561
|
+
"required": true,
|
|
10562
|
+
"type": "string",
|
|
10563
|
+
"in": "body"
|
|
10564
|
+
},
|
|
10565
|
+
{
|
|
10566
|
+
"name": "description",
|
|
10567
|
+
"description": "",
|
|
10568
|
+
"required": false,
|
|
10569
|
+
"type": "string",
|
|
10570
|
+
"in": "body"
|
|
10571
|
+
},
|
|
10572
|
+
{
|
|
10573
|
+
"name": "agent_id",
|
|
10574
|
+
"description": "A tool-less agent that answers",
|
|
10575
|
+
"required": false,
|
|
10576
|
+
"type": "string",
|
|
10577
|
+
"in": "body"
|
|
10578
|
+
},
|
|
10579
|
+
{
|
|
10580
|
+
"name": "tool_id",
|
|
10581
|
+
"description": "An http or pipeline tool that answers",
|
|
10582
|
+
"required": false,
|
|
10583
|
+
"type": "string",
|
|
10584
|
+
"in": "body"
|
|
10585
|
+
},
|
|
10586
|
+
{
|
|
10587
|
+
"name": "questions",
|
|
10588
|
+
"description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
|
|
10589
|
+
"required": true,
|
|
10590
|
+
"type": "object",
|
|
10591
|
+
"in": "body"
|
|
10592
|
+
},
|
|
10593
|
+
{
|
|
10594
|
+
"name": "version_label",
|
|
10595
|
+
"description": "Optional tag for version 1, e.g. `initial`",
|
|
10596
|
+
"required": false,
|
|
10597
|
+
"type": "string",
|
|
10598
|
+
"in": "body"
|
|
10599
|
+
}
|
|
10600
|
+
]
|
|
10601
|
+
},
|
|
10602
|
+
"get-decider": {
|
|
10603
|
+
serviceClass: "Deciders",
|
|
10604
|
+
operationId: "getDecider",
|
|
10605
|
+
description: "Returns a decider with its current question set and version.",
|
|
10606
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10607
|
+
httpMethod: "get",
|
|
10608
|
+
pathParams: ["project_id", "decider_id"],
|
|
10609
|
+
queryParams: [],
|
|
10610
|
+
headerParams: [],
|
|
10611
|
+
cookieParams: [],
|
|
10612
|
+
flags: [{
|
|
10613
|
+
"name": "project_id",
|
|
10614
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10615
|
+
"required": true,
|
|
10616
|
+
"type": "string",
|
|
10617
|
+
"in": "path"
|
|
10618
|
+
}, {
|
|
10619
|
+
"name": "decider_id",
|
|
10620
|
+
"description": "The decider ID",
|
|
10621
|
+
"required": true,
|
|
10622
|
+
"type": "string",
|
|
10623
|
+
"in": "path"
|
|
10624
|
+
}]
|
|
10625
|
+
},
|
|
10626
|
+
"update-decider": {
|
|
10627
|
+
serviceClass: "Deciders",
|
|
10628
|
+
operationId: "updateDecider",
|
|
10629
|
+
description: "Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.",
|
|
10630
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10631
|
+
httpMethod: "patch",
|
|
10632
|
+
pathParams: ["project_id", "decider_id"],
|
|
10633
|
+
queryParams: [],
|
|
10634
|
+
headerParams: ["If-Match"],
|
|
10635
|
+
cookieParams: [],
|
|
10636
|
+
flags: [
|
|
10637
|
+
{
|
|
10638
|
+
"name": "project_id",
|
|
10639
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10640
|
+
"required": true,
|
|
10641
|
+
"type": "string",
|
|
10642
|
+
"in": "path"
|
|
10643
|
+
},
|
|
10644
|
+
{
|
|
10645
|
+
"name": "decider_id",
|
|
10646
|
+
"description": "The decider ID",
|
|
10647
|
+
"required": true,
|
|
10648
|
+
"type": "string",
|
|
10649
|
+
"in": "path"
|
|
10650
|
+
},
|
|
10651
|
+
{
|
|
10652
|
+
"name": "If-Match",
|
|
10653
|
+
"description": "The version the caller believes the resource holds, as an entity tag (`3` or `\"3\"`). Equivalent to `expected_version` in the request body; `*` states no precondition beyond the resource existing. A mismatch is `409 VERSION_CONFLICT`.",
|
|
10654
|
+
"required": false,
|
|
10655
|
+
"type": "string",
|
|
10656
|
+
"in": "header"
|
|
10657
|
+
},
|
|
10658
|
+
{
|
|
10659
|
+
"name": "name",
|
|
10660
|
+
"description": "",
|
|
10661
|
+
"required": false,
|
|
10662
|
+
"type": "string",
|
|
10663
|
+
"in": "body"
|
|
10664
|
+
},
|
|
10665
|
+
{
|
|
10666
|
+
"name": "description",
|
|
10667
|
+
"description": "",
|
|
10668
|
+
"required": false,
|
|
10669
|
+
"type": "string",
|
|
10670
|
+
"in": "body"
|
|
10671
|
+
},
|
|
10672
|
+
{
|
|
10673
|
+
"name": "agent_id",
|
|
10674
|
+
"description": "Replaces the backend with this agent",
|
|
10675
|
+
"required": false,
|
|
10676
|
+
"type": "string",
|
|
10677
|
+
"in": "body"
|
|
10678
|
+
},
|
|
10679
|
+
{
|
|
10680
|
+
"name": "tool_id",
|
|
10681
|
+
"description": "Replaces the backend with this tool",
|
|
10682
|
+
"required": false,
|
|
10683
|
+
"type": "string",
|
|
10684
|
+
"in": "body"
|
|
10685
|
+
},
|
|
10686
|
+
{
|
|
10687
|
+
"name": "questions",
|
|
10688
|
+
"description": "Question id → question, 1 to 20 of them. A question id starts with a letter or underscore and holds only letters, digits and underscores (at most 64), since it keys the answer object.",
|
|
10689
|
+
"required": false,
|
|
10690
|
+
"type": "object",
|
|
10691
|
+
"in": "body"
|
|
10692
|
+
},
|
|
10693
|
+
{
|
|
10694
|
+
"name": "version_label",
|
|
10695
|
+
"description": "Optional tag for the version this write archives. Ignored when the write changes no question, since no version is archived.",
|
|
10696
|
+
"required": false,
|
|
10697
|
+
"type": "string",
|
|
10698
|
+
"in": "body"
|
|
10699
|
+
},
|
|
10700
|
+
{
|
|
10701
|
+
"name": "expected_version",
|
|
10702
|
+
"description": "Refuses the write unless the decider is at this version.",
|
|
10703
|
+
"required": false,
|
|
10704
|
+
"type": "integer",
|
|
10705
|
+
"in": "body"
|
|
10706
|
+
}
|
|
10707
|
+
]
|
|
10708
|
+
},
|
|
10709
|
+
"delete-decider": {
|
|
10710
|
+
serviceClass: "Deciders",
|
|
10711
|
+
operationId: "deleteDecider",
|
|
10712
|
+
description: "Deletes a decider and its version archive. Its decisions remain and keep naming the decider's ID.",
|
|
10713
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10024
10714
|
httpMethod: "delete",
|
|
10025
|
-
pathParams: ["project_id", "
|
|
10715
|
+
pathParams: ["project_id", "decider_id"],
|
|
10026
10716
|
queryParams: [],
|
|
10027
10717
|
headerParams: [],
|
|
10028
10718
|
cookieParams: [],
|
|
@@ -10033,20 +10723,20 @@ const routes = {
|
|
|
10033
10723
|
"type": "string",
|
|
10034
10724
|
"in": "path"
|
|
10035
10725
|
}, {
|
|
10036
|
-
"name": "
|
|
10037
|
-
"description": "
|
|
10726
|
+
"name": "decider_id",
|
|
10727
|
+
"description": "The decider ID",
|
|
10038
10728
|
"required": true,
|
|
10039
10729
|
"type": "string",
|
|
10040
10730
|
"in": "path"
|
|
10041
10731
|
}]
|
|
10042
10732
|
},
|
|
10043
|
-
"list-
|
|
10044
|
-
serviceClass: "
|
|
10045
|
-
operationId: "
|
|
10046
|
-
description: "Returns
|
|
10047
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
10733
|
+
"list-decider-versions": {
|
|
10734
|
+
serviceClass: "Deciders",
|
|
10735
|
+
operationId: "listDeciderVersions",
|
|
10736
|
+
description: "Returns the decider's archived question sets, newest first. A version is written on create and on every write that changes `questions`.",
|
|
10737
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10048
10738
|
httpMethod: "get",
|
|
10049
|
-
pathParams: ["project_id", "
|
|
10739
|
+
pathParams: ["project_id", "decider_id"],
|
|
10050
10740
|
queryParams: ["limit", "offset"],
|
|
10051
10741
|
headerParams: [],
|
|
10052
10742
|
cookieParams: [],
|
|
@@ -10059,8 +10749,8 @@ const routes = {
|
|
|
10059
10749
|
"in": "path"
|
|
10060
10750
|
},
|
|
10061
10751
|
{
|
|
10062
|
-
"name": "
|
|
10063
|
-
"description": "
|
|
10752
|
+
"name": "decider_id",
|
|
10753
|
+
"description": "The decider ID",
|
|
10064
10754
|
"required": true,
|
|
10065
10755
|
"type": "string",
|
|
10066
10756
|
"in": "path"
|
|
@@ -10081,13 +10771,17 @@ const routes = {
|
|
|
10081
10771
|
}
|
|
10082
10772
|
]
|
|
10083
10773
|
},
|
|
10084
|
-
"
|
|
10085
|
-
serviceClass: "
|
|
10086
|
-
operationId: "
|
|
10087
|
-
description: "
|
|
10088
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
10089
|
-
httpMethod: "
|
|
10090
|
-
pathParams: [
|
|
10774
|
+
"get-decider-version": {
|
|
10775
|
+
serviceClass: "Deciders",
|
|
10776
|
+
operationId: "getDeciderVersion",
|
|
10777
|
+
description: "Returns the question set a version held. A decision names the `decider_version` it was answered under, so this is how its criteria are read after the decider has changed.",
|
|
10778
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10779
|
+
httpMethod: "get",
|
|
10780
|
+
pathParams: [
|
|
10781
|
+
"project_id",
|
|
10782
|
+
"decider_id",
|
|
10783
|
+
"version"
|
|
10784
|
+
],
|
|
10091
10785
|
queryParams: [],
|
|
10092
10786
|
headerParams: [],
|
|
10093
10787
|
cookieParams: [],
|
|
@@ -10100,57 +10794,74 @@ const routes = {
|
|
|
10100
10794
|
"in": "path"
|
|
10101
10795
|
},
|
|
10102
10796
|
{
|
|
10103
|
-
"name": "
|
|
10104
|
-
"description": "
|
|
10797
|
+
"name": "decider_id",
|
|
10798
|
+
"description": "The decider ID",
|
|
10105
10799
|
"required": true,
|
|
10106
10800
|
"type": "string",
|
|
10107
10801
|
"in": "path"
|
|
10108
10802
|
},
|
|
10109
10803
|
{
|
|
10110
|
-
"name": "
|
|
10111
|
-
"description": "
|
|
10804
|
+
"name": "version",
|
|
10805
|
+
"description": "The archived version number",
|
|
10112
10806
|
"required": true,
|
|
10113
|
-
"type": "
|
|
10114
|
-
"in": "
|
|
10115
|
-
}
|
|
10807
|
+
"type": "integer",
|
|
10808
|
+
"in": "path"
|
|
10809
|
+
}
|
|
10810
|
+
]
|
|
10811
|
+
},
|
|
10812
|
+
"restore-decider-version": {
|
|
10813
|
+
serviceClass: "Deciders",
|
|
10814
|
+
operationId: "restoreDeciderVersion",
|
|
10815
|
+
description: "Writes an archived question set back as the decider's live one, which archives it again as a new version rather than rewinding the counter. Restoring the question set the decider already holds is a no-op.",
|
|
10816
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10817
|
+
httpMethod: "post",
|
|
10818
|
+
pathParams: [
|
|
10819
|
+
"project_id",
|
|
10820
|
+
"decider_id",
|
|
10821
|
+
"version"
|
|
10822
|
+
],
|
|
10823
|
+
queryParams: [],
|
|
10824
|
+
headerParams: [],
|
|
10825
|
+
cookieParams: [],
|
|
10826
|
+
flags: [
|
|
10116
10827
|
{
|
|
10117
|
-
"name": "
|
|
10118
|
-
"description": "
|
|
10828
|
+
"name": "project_id",
|
|
10829
|
+
"description": "Project public ID (proj_ prefix).",
|
|
10119
10830
|
"required": true,
|
|
10120
10831
|
"type": "string",
|
|
10121
|
-
"in": "
|
|
10832
|
+
"in": "path"
|
|
10122
10833
|
},
|
|
10123
10834
|
{
|
|
10124
|
-
"name": "
|
|
10125
|
-
"description": "
|
|
10126
|
-
"required":
|
|
10835
|
+
"name": "decider_id",
|
|
10836
|
+
"description": "The decider ID",
|
|
10837
|
+
"required": true,
|
|
10127
10838
|
"type": "string",
|
|
10128
|
-
"in": "
|
|
10839
|
+
"in": "path"
|
|
10129
10840
|
},
|
|
10130
10841
|
{
|
|
10131
|
-
"name": "
|
|
10132
|
-
"description": "
|
|
10133
|
-
"required":
|
|
10842
|
+
"name": "version",
|
|
10843
|
+
"description": "The archived version number",
|
|
10844
|
+
"required": true,
|
|
10134
10845
|
"type": "integer",
|
|
10135
|
-
"in": "
|
|
10846
|
+
"in": "path"
|
|
10136
10847
|
},
|
|
10137
10848
|
{
|
|
10138
|
-
"name": "
|
|
10139
|
-
"description": "
|
|
10849
|
+
"name": "label",
|
|
10850
|
+
"description": "Optional tag for the new version. Defaults to `restored from vN`.",
|
|
10140
10851
|
"required": false,
|
|
10141
|
-
"type": "
|
|
10852
|
+
"type": "string",
|
|
10142
10853
|
"in": "body"
|
|
10143
10854
|
}
|
|
10144
10855
|
]
|
|
10145
10856
|
},
|
|
10146
|
-
"
|
|
10147
|
-
serviceClass: "
|
|
10148
|
-
operationId: "
|
|
10149
|
-
description: "
|
|
10150
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
10857
|
+
"create-decision": {
|
|
10858
|
+
serviceClass: "Deciders",
|
|
10859
|
+
operationId: "createDecision",
|
|
10860
|
+
description: "Evaluates the decider against `state` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. Everything that can refuse the request is checked before the decision is written, so a refusal is a `4xx` and never a polled failure: the agent's tool surface (`400 DECIDER_AGENT_NOT_TOOL_LESS`), a tool that cannot answer (`400 DECIDER_TOOL_NOT_CALLABLE`), a paused project (`409 PROJECT_PAUSED`) and, for an agent, quota admission (`429 QUOTA_EXCEEDED`). A tool backend is called with `{ state, questions }` and must answer `{ answers: { <question id>: { choice | score | value, probabilities? } } }`; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`. With `wait: false`, the default, the answer is `201` with the decision `queued`; poll `GET /v1/projects/{project_id}/decisions/{decision_id}` or subscribe to `decisions.completed` and `decisions.failed`. With `wait: true` it is `201` with the decision settled.",
|
|
10861
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10151
10862
|
httpMethod: "post",
|
|
10152
|
-
pathParams: ["project_id", "
|
|
10153
|
-
queryParams: [
|
|
10863
|
+
pathParams: ["project_id", "decider_id"],
|
|
10864
|
+
queryParams: [],
|
|
10154
10865
|
headerParams: [],
|
|
10155
10866
|
cookieParams: [],
|
|
10156
10867
|
flags: [
|
|
@@ -10162,61 +10873,48 @@ const routes = {
|
|
|
10162
10873
|
"in": "path"
|
|
10163
10874
|
},
|
|
10164
10875
|
{
|
|
10165
|
-
"name": "
|
|
10166
|
-
"description": "",
|
|
10876
|
+
"name": "decider_id",
|
|
10877
|
+
"description": "The decider ID",
|
|
10167
10878
|
"required": true,
|
|
10168
10879
|
"type": "string",
|
|
10169
10880
|
"in": "path"
|
|
10170
10881
|
},
|
|
10171
10882
|
{
|
|
10172
|
-
"name": "
|
|
10173
|
-
"description": "
|
|
10174
|
-
"required": false,
|
|
10175
|
-
"type": "boolean",
|
|
10176
|
-
"in": "query"
|
|
10177
|
-
},
|
|
10178
|
-
{
|
|
10179
|
-
"name": "agent_id",
|
|
10180
|
-
"description": "ID of the agent that will produce the next message.",
|
|
10883
|
+
"name": "state",
|
|
10884
|
+
"description": "What is judged: any JSON value. A string reaches the agent verbatim; anything else is serialized as JSON. Not stored.",
|
|
10181
10885
|
"required": true,
|
|
10182
10886
|
"type": "string",
|
|
10183
10887
|
"in": "body"
|
|
10184
10888
|
},
|
|
10185
10889
|
{
|
|
10186
|
-
"name": "
|
|
10187
|
-
"description": "
|
|
10890
|
+
"name": "metadata",
|
|
10891
|
+
"description": "Caller-owned annotations stored on the decision and returned on every read — typically the id of what was judged, since the state itself is not stored. Written once, with the decision. A non-object is rejected with `400 VALIDATION_FAILED` and no decision is written.",
|
|
10188
10892
|
"required": false,
|
|
10189
|
-
"type": "
|
|
10893
|
+
"type": "object",
|
|
10190
10894
|
"in": "body"
|
|
10191
10895
|
},
|
|
10192
10896
|
{
|
|
10193
|
-
"name": "
|
|
10194
|
-
"description": "
|
|
10897
|
+
"name": "wait",
|
|
10898
|
+
"description": "True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once.",
|
|
10195
10899
|
"required": false,
|
|
10196
10900
|
"type": "boolean",
|
|
10197
10901
|
"in": "body"
|
|
10198
|
-
},
|
|
10199
|
-
{
|
|
10200
|
-
"name": "tool_context",
|
|
10201
|
-
"description": "Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` 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`.",
|
|
10202
|
-
"required": false,
|
|
10203
|
-
"type": "object",
|
|
10204
|
-
"in": "body"
|
|
10205
10902
|
}
|
|
10206
10903
|
]
|
|
10207
10904
|
},
|
|
10208
|
-
"
|
|
10209
|
-
serviceClass: "
|
|
10210
|
-
operationId: "
|
|
10211
|
-
description: "
|
|
10212
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
10213
|
-
httpMethod: "
|
|
10214
|
-
pathParams: [
|
|
10215
|
-
|
|
10216
|
-
"
|
|
10217
|
-
"
|
|
10905
|
+
"list-decisions": {
|
|
10906
|
+
serviceClass: "Deciders",
|
|
10907
|
+
operationId: "listDecisions",
|
|
10908
|
+
description: "Returns the decisions in a project, newest first.",
|
|
10909
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10910
|
+
httpMethod: "get",
|
|
10911
|
+
pathParams: ["project_id"],
|
|
10912
|
+
queryParams: [
|
|
10913
|
+
"decider_id",
|
|
10914
|
+
"status",
|
|
10915
|
+
"limit",
|
|
10916
|
+
"offset"
|
|
10218
10917
|
],
|
|
10219
|
-
queryParams: [],
|
|
10220
10918
|
headerParams: [],
|
|
10221
10919
|
cookieParams: [],
|
|
10222
10920
|
flags: [
|
|
@@ -10228,76 +10926,42 @@ const routes = {
|
|
|
10228
10926
|
"in": "path"
|
|
10229
10927
|
},
|
|
10230
10928
|
{
|
|
10231
|
-
"name": "
|
|
10232
|
-
"description": "
|
|
10233
|
-
"required":
|
|
10929
|
+
"name": "decider_id",
|
|
10930
|
+
"description": "Only decisions requested from this decider",
|
|
10931
|
+
"required": false,
|
|
10234
10932
|
"type": "string",
|
|
10235
|
-
"in": "
|
|
10933
|
+
"in": "query"
|
|
10236
10934
|
},
|
|
10237
10935
|
{
|
|
10238
|
-
"name": "
|
|
10239
|
-
"description": "
|
|
10240
|
-
"required":
|
|
10936
|
+
"name": "status",
|
|
10937
|
+
"description": "Only decisions in this status",
|
|
10938
|
+
"required": false,
|
|
10241
10939
|
"type": "string",
|
|
10242
|
-
"in": "
|
|
10940
|
+
"in": "query"
|
|
10941
|
+
},
|
|
10942
|
+
{
|
|
10943
|
+
"name": "limit",
|
|
10944
|
+
"description": "Maximum number of results to return",
|
|
10945
|
+
"required": false,
|
|
10946
|
+
"type": "integer",
|
|
10947
|
+
"in": "query"
|
|
10948
|
+
},
|
|
10949
|
+
{
|
|
10950
|
+
"name": "offset",
|
|
10951
|
+
"description": "Number of results to skip",
|
|
10952
|
+
"required": false,
|
|
10953
|
+
"type": "integer",
|
|
10954
|
+
"in": "query"
|
|
10243
10955
|
}
|
|
10244
10956
|
]
|
|
10245
10957
|
},
|
|
10246
|
-
"get-
|
|
10247
|
-
serviceClass: "
|
|
10248
|
-
operationId: "
|
|
10249
|
-
description: "Returns
|
|
10250
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/
|
|
10958
|
+
"get-decision": {
|
|
10959
|
+
serviceClass: "Deciders",
|
|
10960
|
+
operationId: "getDecision",
|
|
10961
|
+
description: "Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.",
|
|
10962
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/deciders",
|
|
10251
10963
|
httpMethod: "get",
|
|
10252
|
-
pathParams: ["project_id", "
|
|
10253
|
-
queryParams: [],
|
|
10254
|
-
headerParams: [],
|
|
10255
|
-
cookieParams: [],
|
|
10256
|
-
flags: [{
|
|
10257
|
-
"name": "project_id",
|
|
10258
|
-
"description": "Project public ID (proj_ prefix).",
|
|
10259
|
-
"required": true,
|
|
10260
|
-
"type": "string",
|
|
10261
|
-
"in": "path"
|
|
10262
|
-
}, {
|
|
10263
|
-
"name": "conversation_id",
|
|
10264
|
-
"description": "Conversation ID",
|
|
10265
|
-
"required": true,
|
|
10266
|
-
"type": "string",
|
|
10267
|
-
"in": "path"
|
|
10268
|
-
}]
|
|
10269
|
-
},
|
|
10270
|
-
"replace-conversation-tags": {
|
|
10271
|
-
serviceClass: "Conversations",
|
|
10272
|
-
operationId: "replaceConversationTags",
|
|
10273
|
-
description: "Replaces all tags on the conversation with the provided tags",
|
|
10274
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10275
|
-
httpMethod: "put",
|
|
10276
|
-
pathParams: ["project_id", "conversation_id"],
|
|
10277
|
-
queryParams: [],
|
|
10278
|
-
headerParams: [],
|
|
10279
|
-
cookieParams: [],
|
|
10280
|
-
flags: [{
|
|
10281
|
-
"name": "project_id",
|
|
10282
|
-
"description": "Project public ID (proj_ prefix).",
|
|
10283
|
-
"required": true,
|
|
10284
|
-
"type": "string",
|
|
10285
|
-
"in": "path"
|
|
10286
|
-
}, {
|
|
10287
|
-
"name": "conversation_id",
|
|
10288
|
-
"description": "Conversation ID",
|
|
10289
|
-
"required": true,
|
|
10290
|
-
"type": "string",
|
|
10291
|
-
"in": "path"
|
|
10292
|
-
}]
|
|
10293
|
-
},
|
|
10294
|
-
"merge-conversation-tags": {
|
|
10295
|
-
serviceClass: "Conversations",
|
|
10296
|
-
operationId: "mergeConversationTags",
|
|
10297
|
-
description: "Merges provided tags into the conversation's existing tags (existing tags are preserved unless overridden)",
|
|
10298
|
-
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/conversations",
|
|
10299
|
-
httpMethod: "patch",
|
|
10300
|
-
pathParams: ["project_id", "conversation_id"],
|
|
10964
|
+
pathParams: ["project_id", "decision_id"],
|
|
10301
10965
|
queryParams: [],
|
|
10302
10966
|
headerParams: [],
|
|
10303
10967
|
cookieParams: [],
|
|
@@ -10308,8 +10972,8 @@ const routes = {
|
|
|
10308
10972
|
"type": "string",
|
|
10309
10973
|
"in": "path"
|
|
10310
10974
|
}, {
|
|
10311
|
-
"name": "
|
|
10312
|
-
"description": "
|
|
10975
|
+
"name": "decision_id",
|
|
10976
|
+
"description": "The decision ID",
|
|
10313
10977
|
"required": true,
|
|
10314
10978
|
"type": "string",
|
|
10315
10979
|
"in": "path"
|
|
@@ -18476,7 +19140,7 @@ const routes = {
|
|
|
18476
19140
|
"delete-tool": {
|
|
18477
19141
|
serviceClass: "Tools",
|
|
18478
19142
|
operationId: "deleteTool",
|
|
18479
|
-
description: "Deletes a tool by ID.",
|
|
19143
|
+
description: "Deletes a tool by ID. A tool that is a decider's backend is refused with `409 TOOL_HAS_DEPENDENTS`.",
|
|
18480
19144
|
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/tools",
|
|
18481
19145
|
httpMethod: "delete",
|
|
18482
19146
|
pathParams: ["project_id", "tool_id"],
|
|
@@ -19188,6 +19852,66 @@ const routes = {
|
|
|
19188
19852
|
cookieParams: [],
|
|
19189
19853
|
flags: []
|
|
19190
19854
|
},
|
|
19855
|
+
"list-current-user-stops": {
|
|
19856
|
+
serviceClass: "Users",
|
|
19857
|
+
operationId: "listCurrentUserStops",
|
|
19858
|
+
description: "Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first. `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A project-confined key sees its own project's stops only.",
|
|
19859
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
19860
|
+
httpMethod: "get",
|
|
19861
|
+
pathParams: [],
|
|
19862
|
+
queryParams: ["limit", "cursor"],
|
|
19863
|
+
headerParams: [],
|
|
19864
|
+
cookieParams: [],
|
|
19865
|
+
flags: [{
|
|
19866
|
+
"name": "limit",
|
|
19867
|
+
"description": "Maximum items per page — an integer from 1 to 100 (default 20).",
|
|
19868
|
+
"required": false,
|
|
19869
|
+
"type": "integer",
|
|
19870
|
+
"in": "query"
|
|
19871
|
+
}, {
|
|
19872
|
+
"name": "cursor",
|
|
19873
|
+
"description": "The `next_cursor` of the previous page.",
|
|
19874
|
+
"required": false,
|
|
19875
|
+
"type": "string",
|
|
19876
|
+
"in": "query"
|
|
19877
|
+
}]
|
|
19878
|
+
},
|
|
19879
|
+
"restore-current-user-stop": {
|
|
19880
|
+
serviceClass: "Users",
|
|
19881
|
+
operationId: "restoreCurrentUserStop",
|
|
19882
|
+
description: "Turns one stopped item back on — re-enables the schedule trigger, or resumes the orchestration run or workflow task — and stops listing it. An item that is no longer stopped (resumed already, finished or deleted) is marked restored too. Refused with `409 stop_ceiling_closed` while a ceiling is still closed, naming it in `details.blocked_by`, and with `409 stop_not_restorable` for a cancelled eval run, which can only be dismissed.",
|
|
19883
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
19884
|
+
httpMethod: "post",
|
|
19885
|
+
pathParams: ["stop_id"],
|
|
19886
|
+
queryParams: [],
|
|
19887
|
+
headerParams: [],
|
|
19888
|
+
cookieParams: [],
|
|
19889
|
+
flags: [{
|
|
19890
|
+
"name": "stop_id",
|
|
19891
|
+
"description": "The stop's ID (sst_ prefix).",
|
|
19892
|
+
"required": true,
|
|
19893
|
+
"type": "string",
|
|
19894
|
+
"in": "path"
|
|
19895
|
+
}]
|
|
19896
|
+
},
|
|
19897
|
+
"dismiss-current-user-stop": {
|
|
19898
|
+
serviceClass: "Users",
|
|
19899
|
+
operationId: "dismissCurrentUserStop",
|
|
19900
|
+
description: "Stops listing an item without turning it back on. Allowed while a ceiling is still closed.",
|
|
19901
|
+
moduleDocsUrl: "https://docs.naturali.ai/docs/modules/users",
|
|
19902
|
+
httpMethod: "delete",
|
|
19903
|
+
pathParams: ["stop_id"],
|
|
19904
|
+
queryParams: [],
|
|
19905
|
+
headerParams: [],
|
|
19906
|
+
cookieParams: [],
|
|
19907
|
+
flags: [{
|
|
19908
|
+
"name": "stop_id",
|
|
19909
|
+
"description": "The stop's ID (sst_ prefix).",
|
|
19910
|
+
"required": true,
|
|
19911
|
+
"type": "string",
|
|
19912
|
+
"in": "path"
|
|
19913
|
+
}]
|
|
19914
|
+
},
|
|
19191
19915
|
"list-webhooks": {
|
|
19192
19916
|
serviceClass: "Webhooks",
|
|
19193
19917
|
operationId: "listWebhooks",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.155.0",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"yaml": "^2.9.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@naturali/sdk": "0.
|
|
28
|
+
"@naturali/sdk": "0.155.0",
|
|
29
29
|
"@ttoss/openapi-codegen": "^0.3.1",
|
|
30
30
|
"@types/node": "^26.5.1",
|
|
31
31
|
"tsdown": "^0.23.0",
|