@naturali/sdk 0.36.0 → 0.37.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.d.cts +12 -11
- package/dist/index.d.mts +12 -11
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -591,9 +591,10 @@ type BoardDispatch = {
|
|
|
591
591
|
*/
|
|
592
592
|
agent_id?: string;
|
|
593
593
|
/**
|
|
594
|
-
* Required when `kind` is `tool` — a tool in this project.
|
|
594
|
+
* Required when `kind` is `tool` — a tool in this project. Null only on a read, and only if the board's internal bookkeeping and its stored definition have drifted: the column still dispatches a tool, but which tool can no longer be resolved. Re-send the definition to repair it.
|
|
595
|
+
*
|
|
595
596
|
*/
|
|
596
|
-
tool_id?: string;
|
|
597
|
+
tool_id?: string | null;
|
|
597
598
|
/**
|
|
598
599
|
* JSON Logic (https://jsonlogic.com) resolving the dispatch input from the card, evaluated against `{ task }` — so `{"var": "task.payload.theme"}` reads the card's payload. Each value is one expression; a plain string, number or boolean is passed through as a literal.
|
|
599
600
|
*
|
|
@@ -608,7 +609,8 @@ type BoardDispatch = {
|
|
|
608
609
|
*/
|
|
609
610
|
type BoardCompletionRule = {
|
|
610
611
|
/**
|
|
611
|
-
* JSON Logic evaluated against `{ task, result }`. `result` is the dispatch's output: for an agent column its generation output
|
|
612
|
+
* 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.
|
|
612
614
|
*
|
|
613
615
|
*/
|
|
614
616
|
when: unknown;
|
|
@@ -631,6 +633,7 @@ type BoardOnEnter = {
|
|
|
631
633
|
on_complete?: Array<BoardCompletionRule>;
|
|
632
634
|
/**
|
|
633
635
|
* Where a card goes when the dispatch fails terminally. Accepts either a declared move, or a column reachable from this one by exactly one declared move (which is resolved to that move — reads report the move name). Omit to leave a failed card in place for a person.
|
|
636
|
+
* Fires for both kinds of column. A failed dispatch never reaches `on_complete`, so a catch-all `{"when": true}` rule cannot advance a card on failed work, and the failure leaves no `last_result` behind.
|
|
634
637
|
*
|
|
635
638
|
*/
|
|
636
639
|
on_failure?: string | null;
|
|
@@ -1803,6 +1806,7 @@ type Task = {
|
|
|
1803
1806
|
status: 'open' | 'closed';
|
|
1804
1807
|
/**
|
|
1805
1808
|
* The card's working data — what a column's `input_mapping` reads and what a completed dispatch writes back to (`payload.last_result`). Store references to artifacts (file and document ids), not the artifacts themselves.
|
|
1809
|
+
* **`last_result` is shaped by the kind of column that wrote it.** An agent column writes its generation output. A **tool** column writes the enclosing run's state, which puts the tool's own result one level down under `nodes.tool` — so a later column chains off a tool column with `{"var": "task.payload.last_result.nodes.tool.<field>"}`, not `last_result.<field>`. (Inside the tool column's *own* `on_complete`, `result.<field>` works as documented; only chaining from a *later* column sees the run-state shape.)
|
|
1806
1810
|
*
|
|
1807
1811
|
*/
|
|
1808
1812
|
payload: {
|
|
@@ -1818,7 +1822,8 @@ type Task = {
|
|
|
1818
1822
|
*/
|
|
1819
1823
|
automation_status: 'running' | 'completed' | 'failed' | 'unrouted';
|
|
1820
1824
|
/**
|
|
1821
|
-
* `{ kind, id, status }`
|
|
1825
|
+
* 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.
|
|
1826
|
+
*
|
|
1822
1827
|
*/
|
|
1823
1828
|
active_dispatch: {
|
|
1824
1829
|
[key: string]: unknown;
|
|
@@ -1891,16 +1896,12 @@ type TaskTransitionRecord = {
|
|
|
1891
1896
|
*/
|
|
1892
1897
|
transition: string | null;
|
|
1893
1898
|
/**
|
|
1894
|
-
* What kind of
|
|
1899
|
+
* What kind of principal made the move. `automation` is a column's own `on_complete` routing or its `on_failure`.
|
|
1895
1900
|
* A move made through this API reports `api_key`: every call naturali makes reaches the platform under one service credential, so the record cannot distinguish a person from an integration. `user` is reserved for when it can.
|
|
1901
|
+
* There is no `principal_id` counterpart. For a human or API move it would identify naturali's own service credential, which says nothing about the caller; for an `automation` move what caused the move is already reported by `generation_id` / `orchestration_run_id`.
|
|
1896
1902
|
*
|
|
1897
1903
|
*/
|
|
1898
|
-
|
|
1899
|
-
/**
|
|
1900
|
-
* For an `automation` move, what caused it (the generation or run). Null otherwise — for a human or API move the underlying value identifies naturali's own service credential, which says nothing about the caller.
|
|
1901
|
-
*
|
|
1902
|
-
*/
|
|
1903
|
-
actor_id: string | null;
|
|
1904
|
+
principal_kind: 'user' | 'api_key' | 'automation';
|
|
1904
1905
|
/**
|
|
1905
1906
|
* The agent generation that caused the move, when one did.
|
|
1906
1907
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -591,9 +591,10 @@ type BoardDispatch = {
|
|
|
591
591
|
*/
|
|
592
592
|
agent_id?: string;
|
|
593
593
|
/**
|
|
594
|
-
* Required when `kind` is `tool` — a tool in this project.
|
|
594
|
+
* Required when `kind` is `tool` — a tool in this project. Null only on a read, and only if the board's internal bookkeeping and its stored definition have drifted: the column still dispatches a tool, but which tool can no longer be resolved. Re-send the definition to repair it.
|
|
595
|
+
*
|
|
595
596
|
*/
|
|
596
|
-
tool_id?: string;
|
|
597
|
+
tool_id?: string | null;
|
|
597
598
|
/**
|
|
598
599
|
* JSON Logic (https://jsonlogic.com) resolving the dispatch input from the card, evaluated against `{ task }` — so `{"var": "task.payload.theme"}` reads the card's payload. Each value is one expression; a plain string, number or boolean is passed through as a literal.
|
|
599
600
|
*
|
|
@@ -608,7 +609,8 @@ type BoardDispatch = {
|
|
|
608
609
|
*/
|
|
609
610
|
type BoardCompletionRule = {
|
|
610
611
|
/**
|
|
611
|
-
* JSON Logic evaluated against `{ task, result }`. `result` is the dispatch's output: for an agent column its generation output
|
|
612
|
+
* 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.
|
|
612
614
|
*
|
|
613
615
|
*/
|
|
614
616
|
when: unknown;
|
|
@@ -631,6 +633,7 @@ type BoardOnEnter = {
|
|
|
631
633
|
on_complete?: Array<BoardCompletionRule>;
|
|
632
634
|
/**
|
|
633
635
|
* Where a card goes when the dispatch fails terminally. Accepts either a declared move, or a column reachable from this one by exactly one declared move (which is resolved to that move — reads report the move name). Omit to leave a failed card in place for a person.
|
|
636
|
+
* Fires for both kinds of column. A failed dispatch never reaches `on_complete`, so a catch-all `{"when": true}` rule cannot advance a card on failed work, and the failure leaves no `last_result` behind.
|
|
634
637
|
*
|
|
635
638
|
*/
|
|
636
639
|
on_failure?: string | null;
|
|
@@ -1803,6 +1806,7 @@ type Task = {
|
|
|
1803
1806
|
status: 'open' | 'closed';
|
|
1804
1807
|
/**
|
|
1805
1808
|
* The card's working data — what a column's `input_mapping` reads and what a completed dispatch writes back to (`payload.last_result`). Store references to artifacts (file and document ids), not the artifacts themselves.
|
|
1809
|
+
* **`last_result` is shaped by the kind of column that wrote it.** An agent column writes its generation output. A **tool** column writes the enclosing run's state, which puts the tool's own result one level down under `nodes.tool` — so a later column chains off a tool column with `{"var": "task.payload.last_result.nodes.tool.<field>"}`, not `last_result.<field>`. (Inside the tool column's *own* `on_complete`, `result.<field>` works as documented; only chaining from a *later* column sees the run-state shape.)
|
|
1806
1810
|
*
|
|
1807
1811
|
*/
|
|
1808
1812
|
payload: {
|
|
@@ -1818,7 +1822,8 @@ type Task = {
|
|
|
1818
1822
|
*/
|
|
1819
1823
|
automation_status: 'running' | 'completed' | 'failed' | 'unrouted';
|
|
1820
1824
|
/**
|
|
1821
|
-
* `{ kind, id, status }`
|
|
1825
|
+
* 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.
|
|
1826
|
+
*
|
|
1822
1827
|
*/
|
|
1823
1828
|
active_dispatch: {
|
|
1824
1829
|
[key: string]: unknown;
|
|
@@ -1891,16 +1896,12 @@ type TaskTransitionRecord = {
|
|
|
1891
1896
|
*/
|
|
1892
1897
|
transition: string | null;
|
|
1893
1898
|
/**
|
|
1894
|
-
* What kind of
|
|
1899
|
+
* What kind of principal made the move. `automation` is a column's own `on_complete` routing or its `on_failure`.
|
|
1895
1900
|
* A move made through this API reports `api_key`: every call naturali makes reaches the platform under one service credential, so the record cannot distinguish a person from an integration. `user` is reserved for when it can.
|
|
1901
|
+
* There is no `principal_id` counterpart. For a human or API move it would identify naturali's own service credential, which says nothing about the caller; for an `automation` move what caused the move is already reported by `generation_id` / `orchestration_run_id`.
|
|
1896
1902
|
*
|
|
1897
1903
|
*/
|
|
1898
|
-
|
|
1899
|
-
/**
|
|
1900
|
-
* For an `automation` move, what caused it (the generation or run). Null otherwise — for a human or API move the underlying value identifies naturali's own service credential, which says nothing about the caller.
|
|
1901
|
-
*
|
|
1902
|
-
*/
|
|
1903
|
-
actor_id: string | null;
|
|
1904
|
+
principal_kind: 'user' | 'api_key' | 'automation';
|
|
1904
1905
|
/**
|
|
1905
1906
|
* The agent generation that caused the move, when one did.
|
|
1906
1907
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.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.
|
|
40
|
+
"@naturali/api": "0.37.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|