@naturali/sdk 0.38.0 → 0.39.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 CHANGED
@@ -655,7 +655,7 @@ var Agents = class {
655
655
  /**
656
656
  * Update an agent
657
657
  *
658
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), or the naturali-side status. At least one field is required.
658
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
659
659
  *
660
660
  */
661
661
  static updateAgent(options) {
package/dist/index.d.cts CHANGED
@@ -367,6 +367,13 @@ type Agent = {
367
367
  */
368
368
  tool_ids: Array<string>;
369
369
  tool_choice: ToolChoice;
370
+ /**
371
+ * JSON Schema describing the structured object the model must return. When set, a non-streaming generation is constrained to it and the parsed value comes back as `object` on the generation result. Null (the default) leaves the output unconstrained. Streaming generations are unaffected.
372
+ *
373
+ */
374
+ output_schema: {
375
+ [key: string]: unknown;
376
+ } | null;
370
377
  status: 'active' | 'disabled';
371
378
  created_at: Date;
372
379
  updated_at: Date;
@@ -401,6 +408,13 @@ type AgentCreate = {
401
408
  */
402
409
  tool_ids?: Array<string>;
403
410
  tool_choice?: ToolChoice;
411
+ /**
412
+ * JSON Schema describing the structured object the model must return. When set, a non-streaming generation is constrained to it and the parsed value comes back as `object` on the generation result. Omit (the default) to leave the output unconstrained. Streaming generations are unaffected.
413
+ *
414
+ */
415
+ output_schema?: {
416
+ [key: string]: unknown;
417
+ };
404
418
  };
405
419
  /**
406
420
  * At least one field must be present.
@@ -422,6 +436,13 @@ type AgentUpdate = {
422
436
  */
423
437
  tool_ids?: Array<string>;
424
438
  tool_choice?: ToolChoice;
439
+ /**
440
+ * Replace the agent's structured-output schema. An object constrains non-streaming generations to it; `null` clears it and leaves the output unconstrained.
441
+ *
442
+ */
443
+ output_schema?: {
444
+ [key: string]: unknown;
445
+ } | null;
425
446
  status?: 'active' | 'disabled';
426
447
  };
427
448
  type AgentList = {
@@ -610,7 +631,7 @@ type BoardDispatch = {
610
631
  type BoardCompletionRule = {
611
632
  /**
612
633
  * JSON Logic evaluated against `{ task, result }`. `result` is the dispatch's output: for an agent column its generation output; for a tool column the tool's own result object.
613
- * Routing an agent column on *structured* output (`result.object.…`) needs the agent to declare an output schema, and the Agents API does not expose one yet so today an agent column can only route on what its generation happens to return.
634
+ * Routing an agent column on *structured* output (`result.object.…`) needs the agent to declare an `output_schema` set one and every field of it is addressable here.
614
635
  *
615
636
  */
616
637
  when: unknown;
@@ -732,7 +753,10 @@ type BoardCreate = {
732
753
  */
733
754
  type BoardUpdate = {
734
755
  name?: string;
735
- description?: string;
756
+ /**
757
+ * Send null to clear it.
758
+ */
759
+ description?: string | null;
736
760
  states?: Array<BoardState>;
737
761
  transitions?: Array<BoardTransition>;
738
762
  /**
@@ -1913,7 +1937,8 @@ type Task = {
1913
1937
  */
1914
1938
  automation_status: 'running' | 'completed' | 'failed' | 'unrouted';
1915
1939
  /**
1916
- * The in-flight dispatch, if any. An agent column reports `{ kind: "agent", id, status }`, where `id` is the generation — real provenance, readable through Generations. A tool column reports `{ kind: "tool", tool_id, status }`: the machinery a tool column runs on is naturali's own and is not addressable by a caller, so it is named by the tool it stands for rather than by an internal id.
1940
+ * The in-flight dispatch, if any. `kind` is always the column's own kind the same `agent` / `tool` the board was written with never the name of the machinery underneath.
1941
+ * An agent column reports `{ kind: "agent", id, status }`, where `id` is the generation — real provenance, readable through Generations. A tool column reports `{ kind: "tool", tool_id, status }`: the machinery a tool column runs on is naturali's own and is not addressable by a caller, so it is named by the tool it stands for rather than by an internal id.
1917
1942
  *
1918
1943
  */
1919
1944
  active_dispatch: {
@@ -1955,7 +1980,8 @@ type TaskUpdate = {
1955
1980
  */
1956
1981
  assignee?: string | null;
1957
1982
  /**
1958
- * Shallow-merged over the current payload; omitted keys are preserved.
1983
+ * Shallow-merged over the current payload; omitted keys are preserved. Not nullable — `null` is rejected rather than ignored, since a merge has no meaning to give it. Send `{}` to change nothing.
1984
+ *
1959
1985
  */
1960
1986
  payload?: {
1961
1987
  [key: string]: unknown;
@@ -6019,7 +6045,7 @@ declare class Agents {
6019
6045
  /**
6020
6046
  * Update an agent
6021
6047
  *
6022
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), or the naturali-side status. At least one field is required.
6048
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
6023
6049
  *
6024
6050
  */
6025
6051
  static updateAgent<ThrowOnError extends boolean = false>(options: Options<UpdateAgentData, ThrowOnError>): RequestResult<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError>;
package/dist/index.d.mts CHANGED
@@ -367,6 +367,13 @@ type Agent = {
367
367
  */
368
368
  tool_ids: Array<string>;
369
369
  tool_choice: ToolChoice;
370
+ /**
371
+ * JSON Schema describing the structured object the model must return. When set, a non-streaming generation is constrained to it and the parsed value comes back as `object` on the generation result. Null (the default) leaves the output unconstrained. Streaming generations are unaffected.
372
+ *
373
+ */
374
+ output_schema: {
375
+ [key: string]: unknown;
376
+ } | null;
370
377
  status: 'active' | 'disabled';
371
378
  created_at: Date;
372
379
  updated_at: Date;
@@ -401,6 +408,13 @@ type AgentCreate = {
401
408
  */
402
409
  tool_ids?: Array<string>;
403
410
  tool_choice?: ToolChoice;
411
+ /**
412
+ * JSON Schema describing the structured object the model must return. When set, a non-streaming generation is constrained to it and the parsed value comes back as `object` on the generation result. Omit (the default) to leave the output unconstrained. Streaming generations are unaffected.
413
+ *
414
+ */
415
+ output_schema?: {
416
+ [key: string]: unknown;
417
+ };
404
418
  };
405
419
  /**
406
420
  * At least one field must be present.
@@ -422,6 +436,13 @@ type AgentUpdate = {
422
436
  */
423
437
  tool_ids?: Array<string>;
424
438
  tool_choice?: ToolChoice;
439
+ /**
440
+ * Replace the agent's structured-output schema. An object constrains non-streaming generations to it; `null` clears it and leaves the output unconstrained.
441
+ *
442
+ */
443
+ output_schema?: {
444
+ [key: string]: unknown;
445
+ } | null;
425
446
  status?: 'active' | 'disabled';
426
447
  };
427
448
  type AgentList = {
@@ -610,7 +631,7 @@ type BoardDispatch = {
610
631
  type BoardCompletionRule = {
611
632
  /**
612
633
  * JSON Logic evaluated against `{ task, result }`. `result` is the dispatch's output: for an agent column its generation output; for a tool column the tool's own result object.
613
- * Routing an agent column on *structured* output (`result.object.…`) needs the agent to declare an output schema, and the Agents API does not expose one yet so today an agent column can only route on what its generation happens to return.
634
+ * Routing an agent column on *structured* output (`result.object.…`) needs the agent to declare an `output_schema` set one and every field of it is addressable here.
614
635
  *
615
636
  */
616
637
  when: unknown;
@@ -732,7 +753,10 @@ type BoardCreate = {
732
753
  */
733
754
  type BoardUpdate = {
734
755
  name?: string;
735
- description?: string;
756
+ /**
757
+ * Send null to clear it.
758
+ */
759
+ description?: string | null;
736
760
  states?: Array<BoardState>;
737
761
  transitions?: Array<BoardTransition>;
738
762
  /**
@@ -1913,7 +1937,8 @@ type Task = {
1913
1937
  */
1914
1938
  automation_status: 'running' | 'completed' | 'failed' | 'unrouted';
1915
1939
  /**
1916
- * The in-flight dispatch, if any. An agent column reports `{ kind: "agent", id, status }`, where `id` is the generation — real provenance, readable through Generations. A tool column reports `{ kind: "tool", tool_id, status }`: the machinery a tool column runs on is naturali's own and is not addressable by a caller, so it is named by the tool it stands for rather than by an internal id.
1940
+ * The in-flight dispatch, if any. `kind` is always the column's own kind the same `agent` / `tool` the board was written with never the name of the machinery underneath.
1941
+ * An agent column reports `{ kind: "agent", id, status }`, where `id` is the generation — real provenance, readable through Generations. A tool column reports `{ kind: "tool", tool_id, status }`: the machinery a tool column runs on is naturali's own and is not addressable by a caller, so it is named by the tool it stands for rather than by an internal id.
1917
1942
  *
1918
1943
  */
1919
1944
  active_dispatch: {
@@ -1955,7 +1980,8 @@ type TaskUpdate = {
1955
1980
  */
1956
1981
  assignee?: string | null;
1957
1982
  /**
1958
- * Shallow-merged over the current payload; omitted keys are preserved.
1983
+ * Shallow-merged over the current payload; omitted keys are preserved. Not nullable — `null` is rejected rather than ignored, since a merge has no meaning to give it. Send `{}` to change nothing.
1984
+ *
1959
1985
  */
1960
1986
  payload?: {
1961
1987
  [key: string]: unknown;
@@ -6019,7 +6045,7 @@ declare class Agents {
6019
6045
  /**
6020
6046
  * Update an agent
6021
6047
  *
6022
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), or the naturali-side status. At least one field is required.
6048
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
6023
6049
  *
6024
6050
  */
6025
6051
  static updateAgent<ThrowOnError extends boolean = false>(options: Options<UpdateAgentData, ThrowOnError>): RequestResult<UpdateAgentResponses, UpdateAgentErrors, ThrowOnError>;
package/dist/index.mjs CHANGED
@@ -654,7 +654,7 @@ var Agents = class {
654
654
  /**
655
655
  * Update an agent
656
656
  *
657
- * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), or the naturali-side status. At least one field is required.
657
+ * Change the bound provider, name, model, instructions, sampling/step config, attached tools (tool_ids/tool_choice), the structured-output schema (output_schema), or the naturali-side status. At least one field is required.
658
658
  *
659
659
  */
660
660
  static updateAgent(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -37,7 +37,7 @@
37
37
  "tsx": "^4.23.1",
38
38
  "typescript": "~6.0.3",
39
39
  "vitest": "^4.1.10",
40
- "@naturali/api": "0.38.0"
40
+ "@naturali/api": "0.39.0"
41
41
  },
42
42
  "scripts": {
43
43
  "generate": "tsx scripts/generate.ts",