@naturali/sdk 0.133.0 → 0.133.2

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 CHANGED
@@ -420,6 +420,8 @@ type ErrorResponse = {
420
420
  };
421
421
  /**
422
422
  * Key-value labels on a resource. A flat object of string values — an array, a nested object or a number is rejected with `400 VALIDATION_FAILED`, never coerced. Keys are opaque and stored verbatim, so `cost_center` and `costCenter` are two different tags. Matched by JSONB containment wherever tags are read: the `?tags=` filter and knowledge search.
423
+ *
424
+ * Keys beginning `system.` are reserved: the platform writes them to record which conversation, actor, agent and role a row came from, and a write naming one is refused with `400 RESERVED_TAG_KEY`. They are read and filtered like any other tag.
423
425
  */
424
426
  type TagBag = {
425
427
  [key: string]: string;
@@ -761,7 +763,15 @@ type Agent = {
761
763
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
762
764
  */
763
765
  tags?: TagBag;
766
+ /**
767
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
768
+ *
769
+ */
764
770
  min_score?: number;
771
+ /**
772
+ * Maximum number of results to inject. Omitted, 10 are injected.
773
+ *
774
+ */
765
775
  limit?: number;
766
776
  /**
767
777
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -953,7 +963,15 @@ type CreateAgentRequest = {
953
963
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
954
964
  */
955
965
  tags?: TagBag;
966
+ /**
967
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
968
+ *
969
+ */
956
970
  min_score?: number;
971
+ /**
972
+ * Maximum number of results to inject. Omitted, 10 are injected.
973
+ *
974
+ */
957
975
  limit?: number;
958
976
  /**
959
977
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -1043,7 +1061,15 @@ type UpdateAgentRequest = {
1043
1061
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
1044
1062
  */
1045
1063
  tags?: TagBag;
1064
+ /**
1065
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
1066
+ *
1067
+ */
1046
1068
  min_score?: number;
1069
+ /**
1070
+ * Maximum number of results to inject. Omitted, 10 are injected.
1071
+ *
1072
+ */
1047
1073
  limit?: number;
1048
1074
  /**
1049
1075
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -1144,7 +1170,15 @@ type CreateAgentGenerationRequest = {
1144
1170
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
1145
1171
  */
1146
1172
  tags?: TagBag;
1173
+ /**
1174
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
1175
+ *
1176
+ */
1147
1177
  min_score?: number;
1178
+ /**
1179
+ * Maximum number of results to inject. Omitted, 10 are injected.
1180
+ *
1181
+ */
1148
1182
  limit?: number;
1149
1183
  } | null;
1150
1184
  };
@@ -2343,6 +2377,10 @@ type ConversationRecord = {
2343
2377
  * Actor ID associated with this conversation
2344
2378
  */
2345
2379
  actor_id?: string | null;
2380
+ /**
2381
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`.
2382
+ */
2383
+ retrieval?: 'embed' | 'none' | null;
2346
2384
  };
2347
2385
  type ConversationMessageRecord = {
2348
2386
  /**
@@ -5226,14 +5264,15 @@ type OrchestrationNode = {
5226
5264
  [key: string]: unknown;
5227
5265
  };
5228
5266
  /**
5229
- * Maps state write paths to values. Each key is a `state.<path>` destination (the `state.` prefix is optional); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "output": <node artifact>, "state": <run state> }` — e.g. `{ "summary": {"var": "output.content"} }` writes the artifact's `content` field to `state.summary`. The same evaluator as input_mapping/transform/condition; only the context differs.
5267
+ * Maps state write paths to values. Each key is a `state.<path>` destination (the `state.` prefix is optional); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "output": <node artifact>, "state": <run state> }` — e.g. `{ "summary": {"var": "output.content"} }` writes the artifact's `content` field to `state.summary`. The same evaluator as input_mapping/transform/condition; only the context differs. An `agent` node's artifact always carries both `content` (the text response) and `object` (the parsed value when a schema applied, `null` otherwise), so `output.content` reads the same whether or not the node declares an `output_schema`.
5230
5268
  *
5231
5269
  */
5232
5270
  state_mapping?: {
5233
5271
  [key: string]: unknown;
5234
5272
  };
5235
5273
  /**
5236
- * For agent nodes — JSON Schema for structured output parsing.
5274
+ * For agent nodes — JSON Schema the model's answer is parsed into, reaching the artifact as `object`. Declaring it here is only needed for an agent that carries no `output_schema` of its own: the agent's schema already produces the artifact's `object` wherever that agent generates.
5275
+ *
5237
5276
  */
5238
5277
  output_schema?: {
5239
5278
  [key: string]: unknown;
@@ -5598,6 +5637,11 @@ type NodeExecution = {
5598
5637
  *
5599
5638
  */
5600
5639
  attempt: number;
5640
+ /**
5641
+ * How many times this attempt was dispatched, including the first. A worker that stops mid-node leaves its task to be redelivered, and the redelivery re-runs the node under this same record — so a count above 1 is work the run issued, and was billed for, more than once.
5642
+ *
5643
+ */
5644
+ dispatches: number;
5601
5645
  /**
5602
5646
  * Node execution status. `running` marks an execution record whose node is still in flight. Open set — new statuses may be added in minor releases; clients must tolerate unknown values.
5603
5647
  */
@@ -11246,6 +11290,10 @@ type CreateConversationData = {
11246
11290
  * Actor ID to associate with this conversation
11247
11291
  */
11248
11292
  actor_id?: string | null;
11293
+ /**
11294
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`.
11295
+ */
11296
+ retrieval?: 'embed' | 'none' | null;
11249
11297
  };
11250
11298
  path: {
11251
11299
  /**
@@ -11362,6 +11410,10 @@ type UpdateConversationData = {
11362
11410
  * New conversation name
11363
11411
  */
11364
11412
  name?: string | null;
11413
+ /**
11414
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`. Switching it on embeds the turns already in the conversation, so the whole conversation becomes retrievable rather than only what is said next.
11415
+ */
11416
+ retrieval?: 'embed' | 'none' | null;
11365
11417
  };
11366
11418
  path: {
11367
11419
  /**
@@ -11798,7 +11850,7 @@ type CreateDocumentData = {
11798
11850
  body: {
11799
11851
  content: string;
11800
11852
  /**
11801
- * Logical path within the project (e.g. /reports/q1.txt). Defaults to /filename if omitted.
11853
+ * Logical path within the project (e.g. /reports/q1.txt). Defaults to `/<filename>`, or to `/<document_id>.txt` when neither is given — a document with no path is reachable only by its id, since a prefix filter never matches null.
11802
11854
  */
11803
11855
  path?: string;
11804
11856
  filename?: string;
@@ -13475,6 +13527,10 @@ type ListFilesData = {
13475
13527
  project_id: string;
13476
13528
  };
13477
13529
  query?: {
13530
+ /**
13531
+ * Only files under this directory. The prefix is a path boundary, not a substring: `/reports` returns `/reports/q1.txt` and never `/reports-archive/q1.txt`, and `/` selects the whole project. A leading slash is optional and a trailing one is ignored, so `reports`, `/reports` and `/reports/` are the same filter. `%` and `_` are literal characters, not wildcards. Naming a directory under `/.system/` is what includes platform-written files, which a list without this parameter leaves out.
13532
+ */
13533
+ path_prefix?: string;
13478
13534
  /**
13479
13535
  * Filter by tag pairs, written `key:value` (split on the first colon, so a value may contain colons). Repeat the parameter for several pairs; **all** must be present with exactly that value.
13480
13536
  *
package/dist/index.d.mts CHANGED
@@ -420,6 +420,8 @@ type ErrorResponse = {
420
420
  };
421
421
  /**
422
422
  * Key-value labels on a resource. A flat object of string values — an array, a nested object or a number is rejected with `400 VALIDATION_FAILED`, never coerced. Keys are opaque and stored verbatim, so `cost_center` and `costCenter` are two different tags. Matched by JSONB containment wherever tags are read: the `?tags=` filter and knowledge search.
423
+ *
424
+ * Keys beginning `system.` are reserved: the platform writes them to record which conversation, actor, agent and role a row came from, and a write naming one is refused with `400 RESERVED_TAG_KEY`. They are read and filtered like any other tag.
423
425
  */
424
426
  type TagBag = {
425
427
  [key: string]: string;
@@ -761,7 +763,15 @@ type Agent = {
761
763
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
762
764
  */
763
765
  tags?: TagBag;
766
+ /**
767
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
768
+ *
769
+ */
764
770
  min_score?: number;
771
+ /**
772
+ * Maximum number of results to inject. Omitted, 10 are injected.
773
+ *
774
+ */
765
775
  limit?: number;
766
776
  /**
767
777
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -953,7 +963,15 @@ type CreateAgentRequest = {
953
963
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
954
964
  */
955
965
  tags?: TagBag;
966
+ /**
967
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
968
+ *
969
+ */
956
970
  min_score?: number;
971
+ /**
972
+ * Maximum number of results to inject. Omitted, 10 are injected.
973
+ *
974
+ */
957
975
  limit?: number;
958
976
  /**
959
977
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -1043,7 +1061,15 @@ type UpdateAgentRequest = {
1043
1061
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
1044
1062
  */
1045
1063
  tags?: TagBag;
1064
+ /**
1065
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
1066
+ *
1067
+ */
1046
1068
  min_score?: number;
1069
+ /**
1070
+ * Maximum number of results to inject. Omitted, 10 are injected.
1071
+ *
1072
+ */
1047
1073
  limit?: number;
1048
1074
  /**
1049
1075
  * Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent.
@@ -1144,7 +1170,15 @@ type CreateAgentGenerationRequest = {
1144
1170
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
1145
1171
  */
1146
1172
  tags?: TagBag;
1173
+ /**
1174
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.
1175
+ *
1176
+ */
1147
1177
  min_score?: number;
1178
+ /**
1179
+ * Maximum number of results to inject. Omitted, 10 are injected.
1180
+ *
1181
+ */
1148
1182
  limit?: number;
1149
1183
  } | null;
1150
1184
  };
@@ -2343,6 +2377,10 @@ type ConversationRecord = {
2343
2377
  * Actor ID associated with this conversation
2344
2378
  */
2345
2379
  actor_id?: string | null;
2380
+ /**
2381
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`.
2382
+ */
2383
+ retrieval?: 'embed' | 'none' | null;
2346
2384
  };
2347
2385
  type ConversationMessageRecord = {
2348
2386
  /**
@@ -5226,14 +5264,15 @@ type OrchestrationNode = {
5226
5264
  [key: string]: unknown;
5227
5265
  };
5228
5266
  /**
5229
- * Maps state write paths to values. Each key is a `state.<path>` destination (the `state.` prefix is optional); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "output": <node artifact>, "state": <run state> }` — e.g. `{ "summary": {"var": "output.content"} }` writes the artifact's `content` field to `state.summary`. The same evaluator as input_mapping/transform/condition; only the context differs.
5267
+ * Maps state write paths to values. Each key is a `state.<path>` destination (the `state.` prefix is optional); each value is JSON Logic (https://jsonlogic.com) evaluated against `{ "output": <node artifact>, "state": <run state> }` — e.g. `{ "summary": {"var": "output.content"} }` writes the artifact's `content` field to `state.summary`. The same evaluator as input_mapping/transform/condition; only the context differs. An `agent` node's artifact always carries both `content` (the text response) and `object` (the parsed value when a schema applied, `null` otherwise), so `output.content` reads the same whether or not the node declares an `output_schema`.
5230
5268
  *
5231
5269
  */
5232
5270
  state_mapping?: {
5233
5271
  [key: string]: unknown;
5234
5272
  };
5235
5273
  /**
5236
- * For agent nodes — JSON Schema for structured output parsing.
5274
+ * For agent nodes — JSON Schema the model's answer is parsed into, reaching the artifact as `object`. Declaring it here is only needed for an agent that carries no `output_schema` of its own: the agent's schema already produces the artifact's `object` wherever that agent generates.
5275
+ *
5237
5276
  */
5238
5277
  output_schema?: {
5239
5278
  [key: string]: unknown;
@@ -5598,6 +5637,11 @@ type NodeExecution = {
5598
5637
  *
5599
5638
  */
5600
5639
  attempt: number;
5640
+ /**
5641
+ * How many times this attempt was dispatched, including the first. A worker that stops mid-node leaves its task to be redelivered, and the redelivery re-runs the node under this same record — so a count above 1 is work the run issued, and was billed for, more than once.
5642
+ *
5643
+ */
5644
+ dispatches: number;
5601
5645
  /**
5602
5646
  * Node execution status. `running` marks an execution record whose node is still in flight. Open set — new statuses may be added in minor releases; clients must tolerate unknown values.
5603
5647
  */
@@ -11246,6 +11290,10 @@ type CreateConversationData = {
11246
11290
  * Actor ID to associate with this conversation
11247
11291
  */
11248
11292
  actor_id?: string | null;
11293
+ /**
11294
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`.
11295
+ */
11296
+ retrieval?: 'embed' | 'none' | null;
11249
11297
  };
11250
11298
  path: {
11251
11299
  /**
@@ -11362,6 +11410,10 @@ type UpdateConversationData = {
11362
11410
  * New conversation name
11363
11411
  */
11364
11412
  name?: string | null;
11413
+ /**
11414
+ * Whether this conversation's turns are embedded for vector retrieval. Turns are stored and chunked either way, so `none` leaves them readable and reachable by full-text search without paying for an embedding. `null` (the default) inherits the project's `default_conversation_retrieval`. Switching it on embeds the turns already in the conversation, so the whole conversation becomes retrievable rather than only what is said next.
11415
+ */
11416
+ retrieval?: 'embed' | 'none' | null;
11365
11417
  };
11366
11418
  path: {
11367
11419
  /**
@@ -11798,7 +11850,7 @@ type CreateDocumentData = {
11798
11850
  body: {
11799
11851
  content: string;
11800
11852
  /**
11801
- * Logical path within the project (e.g. /reports/q1.txt). Defaults to /filename if omitted.
11853
+ * Logical path within the project (e.g. /reports/q1.txt). Defaults to `/<filename>`, or to `/<document_id>.txt` when neither is given — a document with no path is reachable only by its id, since a prefix filter never matches null.
11802
11854
  */
11803
11855
  path?: string;
11804
11856
  filename?: string;
@@ -13475,6 +13527,10 @@ type ListFilesData = {
13475
13527
  project_id: string;
13476
13528
  };
13477
13529
  query?: {
13530
+ /**
13531
+ * Only files under this directory. The prefix is a path boundary, not a substring: `/reports` returns `/reports/q1.txt` and never `/reports-archive/q1.txt`, and `/` selects the whole project. A leading slash is optional and a trailing one is ignored, so `reports`, `/reports` and `/reports/` are the same filter. `%` and `_` are literal characters, not wildcards. Naming a directory under `/.system/` is what includes platform-written files, which a list without this parameter leaves out.
13532
+ */
13533
+ path_prefix?: string;
13478
13534
  /**
13479
13535
  * Filter by tag pairs, written `key:value` (split on the first colon, so a value may contain colons). Repeat the parameter for several pairs; **all** must be present with exactly that value.
13480
13536
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturali/sdk",
3
- "version": "0.133.0",
3
+ "version": "0.133.2",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hey-api/openapi-ts": "^0.99.0",
34
- "@naturali/api": "0.133.0",
34
+ "@naturali/api": "0.133.2",
35
35
  "@ttoss/openapi-codegen": "^0.3.1",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",