@naturali/cli 0.178.0 → 0.178.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.
Files changed (2) hide show
  1. package/dist/index.mjs +92 -13
  2. 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.178.0";
20
+ var version = "0.178.1";
21
21
  //#endregion
22
22
  //#region ../sdk/src/generated/core/bodySerializer.gen.ts
23
23
  const serializeFormDataPair = (data, key, value) => {
@@ -2106,7 +2106,7 @@ var Deciders = class {
2106
2106
  /**
2107
2107
  * Create a decider
2108
2108
  *
2109
- * 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`.
2109
+ * 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 `input` 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`.
2110
2110
  */
2111
2111
  static createDecider(options) {
2112
2112
  return (options.client ?? client).post({
@@ -2195,11 +2195,11 @@ var Deciders = class {
2195
2195
  /**
2196
2196
  * Request a decision
2197
2197
  *
2198
- * 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.
2198
+ * Evaluates the decider against `input` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. To send the questions with the request, use `POST /v1/projects/{project_id}/decisions`.
2199
2199
  *
2200
2200
  * 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`).
2201
2201
  *
2202
- * 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`.
2202
+ * A tool backend is called with `{ input, questions }` and must answer `{ answers: [{ name, probability | choice | score, probabilities?, confidence? }] }`, the request and response of OpenAI's Decisions API; an answer outside that contract fails the decision with `DECISION_ANSWER_INVALID`.
2203
2203
  *
2204
2204
  * 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.
2205
2205
  */
@@ -2225,6 +2225,23 @@ var Deciders = class {
2225
2225
  });
2226
2226
  }
2227
2227
  /**
2228
+ * Request a decision with inline questions
2229
+ *
2230
+ * Evaluates `questions` sent with the request against `input`, answered by the agent or tool the request names (exactly one of `agent_id` and `tool_id`, held to the same rules as a decider's backend), and records the decision with its questions. The request and answers are those of OpenAI's Decisions API, with the backend in place of `model`.
2231
+ *
2232
+ * No decider names the questions, so the decision carries them in `questions` and has no `decider_id` or `decider_version`. Admission, `wait` and the tool contract are those of `POST /v1/projects/{project_id}/deciders/{decider_id}/decisions`.
2233
+ */
2234
+ static createInlineDecision(options) {
2235
+ return (options.client ?? client).post({
2236
+ url: "/v1/projects/{project_id}/decisions",
2237
+ ...options,
2238
+ headers: {
2239
+ "Content-Type": "application/json",
2240
+ ...options.headers
2241
+ }
2242
+ });
2243
+ }
2244
+ /**
2228
2245
  * Get a decision
2229
2246
  *
2230
2247
  * Returns a decision. Poll it after a `wait: false` request until `status` is `completed` or `failed`.
@@ -11178,7 +11195,7 @@ const routes = {
11178
11195
  "create-decider": {
11179
11196
  serviceClass: "Deciders",
11180
11197
  operationId: "createDecider",
11181
- 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`.",
11198
+ 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 `input` 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`.",
11182
11199
  moduleDocsUrl: "https://naturali.ai/docs/modules/deciders",
11183
11200
  httpMethod: "post",
11184
11201
  pathParams: ["project_id"],
@@ -11223,9 +11240,9 @@ const routes = {
11223
11240
  },
11224
11241
  {
11225
11242
  "name": "questions",
11226
- "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.",
11243
+ "description": "The questions, in the order the model is shown them.",
11227
11244
  "required": true,
11228
- "type": "object",
11245
+ "type": "array",
11229
11246
  "in": "body"
11230
11247
  },
11231
11248
  {
@@ -11323,9 +11340,9 @@ const routes = {
11323
11340
  },
11324
11341
  {
11325
11342
  "name": "questions",
11326
- "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.",
11343
+ "description": "The questions, in the order the model is shown them.",
11327
11344
  "required": false,
11328
- "type": "object",
11345
+ "type": "array",
11329
11346
  "in": "body"
11330
11347
  },
11331
11348
  {
@@ -11495,7 +11512,7 @@ const routes = {
11495
11512
  "create-decision": {
11496
11513
  serviceClass: "Deciders",
11497
11514
  operationId: "createDecision",
11498
- 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.",
11515
+ description: "Evaluates the decider against `input` and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. To send the questions with the request, use `POST /v1/projects/{project_id}/decisions`. 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 `{ input, questions }` and must answer `{ answers: [{ name, probability | choice | score, probabilities?, confidence? }] }`, the request and response of OpenAI's Decisions API; 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.",
11499
11516
  moduleDocsUrl: "https://naturali.ai/docs/modules/deciders",
11500
11517
  httpMethod: "post",
11501
11518
  pathParams: ["project_id", "decider_id"],
@@ -11518,15 +11535,15 @@ const routes = {
11518
11535
  "in": "path"
11519
11536
  },
11520
11537
  {
11521
- "name": "state",
11522
- "description": "What is judged: any JSON value. A string reaches the agent verbatim; anything else is serialized as JSON. Not stored.",
11538
+ "name": "input",
11539
+ "description": "What is judged, not stored: a string; a list of `user` messages whose `content` is a string or `input_text` and `input_image` parts (an image as a base64 data URL); or any other JSON value, which an agent is shown as indented JSON. An array of objects carrying `role` is read as messages.",
11523
11540
  "required": true,
11524
11541
  "type": "unknown",
11525
11542
  "in": "body"
11526
11543
  },
11527
11544
  {
11528
11545
  "name": "metadata",
11529
- "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.",
11546
+ "description": "Caller-owned annotations stored on the decision and returned on every read — typically the id of what was judged, since the input itself is not stored. Written once, with the decision. A non-object is rejected with `400 VALIDATION_FAILED` and no decision is written.",
11530
11547
  "required": false,
11531
11548
  "type": "object",
11532
11549
  "in": "body"
@@ -11593,6 +11610,68 @@ const routes = {
11593
11610
  }
11594
11611
  ]
11595
11612
  },
11613
+ "create-inline-decision": {
11614
+ serviceClass: "Deciders",
11615
+ operationId: "createInlineDecision",
11616
+ description: "Evaluates `questions` sent with the request against `input`, answered by the agent or tool the request names (exactly one of `agent_id` and `tool_id`, held to the same rules as a decider's backend), and records the decision with its questions. The request and answers are those of OpenAI's Decisions API, with the backend in place of `model`. No decider names the questions, so the decision carries them in `questions` and has no `decider_id` or `decider_version`. Admission, `wait` and the tool contract are those of `POST /v1/projects/{project_id}/deciders/{decider_id}/decisions`.",
11617
+ moduleDocsUrl: "https://naturali.ai/docs/modules/deciders",
11618
+ httpMethod: "post",
11619
+ pathParams: ["project_id"],
11620
+ queryParams: [],
11621
+ headerParams: [],
11622
+ cookieParams: [],
11623
+ flags: [
11624
+ {
11625
+ "name": "project_id",
11626
+ "description": "Project public ID (proj_ prefix).",
11627
+ "required": true,
11628
+ "type": "string",
11629
+ "in": "path"
11630
+ },
11631
+ {
11632
+ "name": "agent_id",
11633
+ "description": "A tool-less agent that answers",
11634
+ "required": false,
11635
+ "type": "string",
11636
+ "in": "body"
11637
+ },
11638
+ {
11639
+ "name": "tool_id",
11640
+ "description": "An http or pipeline tool that answers",
11641
+ "required": false,
11642
+ "type": "string",
11643
+ "in": "body"
11644
+ },
11645
+ {
11646
+ "name": "questions",
11647
+ "description": "The questions, in the order the model is shown them.",
11648
+ "required": true,
11649
+ "type": "array",
11650
+ "in": "body"
11651
+ },
11652
+ {
11653
+ "name": "input",
11654
+ "description": "What is judged, not stored: a string; a list of `user` messages whose `content` is a string or `input_text` and `input_image` parts (an image as a base64 data URL); or any other JSON value, which an agent is shown as indented JSON. An array of objects carrying `role` is read as messages.",
11655
+ "required": true,
11656
+ "type": "unknown",
11657
+ "in": "body"
11658
+ },
11659
+ {
11660
+ "name": "metadata",
11661
+ "description": "Caller-owned annotations stored on the decision. A non-object is rejected with `400 VALIDATION_FAILED`.",
11662
+ "required": false,
11663
+ "type": "object",
11664
+ "in": "body"
11665
+ },
11666
+ {
11667
+ "name": "wait",
11668
+ "description": "True evaluates before answering and returns the settled decision. False — the default — returns the `queued` decision at once. An MCP tool call always waits.",
11669
+ "required": false,
11670
+ "type": "boolean",
11671
+ "in": "body"
11672
+ }
11673
+ ]
11674
+ },
11596
11675
  "get-decision": {
11597
11676
  serviceClass: "Deciders",
11598
11677
  operationId: "getDecision",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/cli",
3
- "version": "0.178.0",
3
+ "version": "0.178.1",
4
4
  "description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.9.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@naturali/sdk": "0.178.0",
34
+ "@naturali/sdk": "0.178.1",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",