@naturali/sdk 0.36.0 → 0.36.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.
- package/dist/index.d.cts +9 -4
- package/dist/index.d.mts +9 -4
- 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
|
+
* **Known limitation — does not fire for a `tool` column.** The platform underneath reports a failed tool run as a *completed* dispatch, so a tool column's `on_failure` is never reached and its `on_complete` rules are evaluated instead, against the failed run's partial state. A catch-all `{"when": true}` rule on a tool column will therefore fire on failed work — including into a terminal column, which closes the card. Until this is fixed upstream, prefer an explicit rule that tests a field the tool really returns, so a failed run matches nothing and the card parks for a person. Agent columns are unaffected.
|
|
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;
|
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
|
+
* **Known limitation — does not fire for a `tool` column.** The platform underneath reports a failed tool run as a *completed* dispatch, so a tool column's `on_failure` is never reached and its `on_complete` rules are evaluated instead, against the failed run's partial state. A catch-all `{"when": true}` rule on a tool column will therefore fire on failed work — including into a terminal column, which closes the card. Until this is fixed upstream, prefer an explicit rule that tests a field the tool really returns, so a failed run matches nothing and the card parks for a person. Agent columns are unaffected.
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
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.36.
|
|
40
|
+
"@naturali/api": "0.36.1"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|