@naturali/sdk 0.133.2 → 0.134.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 +2 -1
- package/dist/index.d.cts +126 -10
- package/dist/index.d.mts +126 -10
- package/dist/index.mjs +2 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3725,8 +3725,9 @@ var Projects = class {
|
|
|
3725
3725
|
/**
|
|
3726
3726
|
* Update a project
|
|
3727
3727
|
*
|
|
3728
|
-
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained.
|
|
3728
|
+
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`), its execution ceilings (`max_concurrent_runs`, `max_chain_generations`, `max_orchestration_run_depth`) and its priced-model gate (`require_priced_model`). Archiving is reversible; resources are retained.
|
|
3729
3729
|
* Requires the `admin` role in the project (an `owner` has it too).
|
|
3730
|
+
* The ceilings and the priced-model gate are uncapped by plan: each one only ever narrows what the project may spend, so setting one takes on a restriction rather than claiming an entitlement. On the three ceilings `null` clears the project's own bound and omission leaves it alone — they are different instructions.
|
|
3730
3731
|
* The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
|
|
3731
3732
|
*
|
|
3732
3733
|
* Your plan sets the longest window you may keep content for. A wider one — `null` included, which keeps content indefinitely — responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit` in days. Anything shorter is always allowed. Moving to a plan with a shorter window takes effect at the end of the billing cycle, and content already stored is then purged by age like everything else.
|
package/dist/index.d.cts
CHANGED
|
@@ -768,6 +768,16 @@ type Agent = {
|
|
|
768
768
|
*
|
|
769
769
|
*/
|
|
770
770
|
min_score?: number;
|
|
771
|
+
/**
|
|
772
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
773
|
+
*
|
|
774
|
+
*/
|
|
775
|
+
rrf_k?: number;
|
|
776
|
+
/**
|
|
777
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
778
|
+
*
|
|
779
|
+
*/
|
|
780
|
+
recency_half_life_days?: number;
|
|
771
781
|
/**
|
|
772
782
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
773
783
|
*
|
|
@@ -968,6 +978,16 @@ type CreateAgentRequest = {
|
|
|
968
978
|
*
|
|
969
979
|
*/
|
|
970
980
|
min_score?: number;
|
|
981
|
+
/**
|
|
982
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
983
|
+
*
|
|
984
|
+
*/
|
|
985
|
+
rrf_k?: number;
|
|
986
|
+
/**
|
|
987
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
988
|
+
*
|
|
989
|
+
*/
|
|
990
|
+
recency_half_life_days?: number;
|
|
971
991
|
/**
|
|
972
992
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
973
993
|
*
|
|
@@ -1066,6 +1086,16 @@ type UpdateAgentRequest = {
|
|
|
1066
1086
|
*
|
|
1067
1087
|
*/
|
|
1068
1088
|
min_score?: number;
|
|
1089
|
+
/**
|
|
1090
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
1091
|
+
*
|
|
1092
|
+
*/
|
|
1093
|
+
rrf_k?: number;
|
|
1094
|
+
/**
|
|
1095
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
1096
|
+
*
|
|
1097
|
+
*/
|
|
1098
|
+
recency_half_life_days?: number;
|
|
1069
1099
|
/**
|
|
1070
1100
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
1071
1101
|
*
|
|
@@ -1160,7 +1190,7 @@ type CreateAgentGenerationRequest = {
|
|
|
1160
1190
|
[key: string]: unknown;
|
|
1161
1191
|
} | null;
|
|
1162
1192
|
/**
|
|
1163
|
-
* Per-generation knowledge retrieval override. Array filters (memory_store_ids, document_ids, document_paths) are unioned with the agent's stored knowledge_config; `tags` pairs are merged with the override winning per key; scalar fields (min_score, limit) use the per-generation value when present.
|
|
1193
|
+
* Per-generation knowledge retrieval override. Array filters (memory_store_ids, document_ids, document_paths) are unioned with the agent's stored knowledge_config; `tags` pairs are merged with the override winning per key; scalar fields (min_score, rrf_k, recency_half_life_days, limit) use the per-generation value when present.
|
|
1164
1194
|
*/
|
|
1165
1195
|
knowledge_config?: {
|
|
1166
1196
|
memory_store_ids?: Array<string>;
|
|
@@ -1175,6 +1205,16 @@ type CreateAgentGenerationRequest = {
|
|
|
1175
1205
|
*
|
|
1176
1206
|
*/
|
|
1177
1207
|
min_score?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
1210
|
+
*
|
|
1211
|
+
*/
|
|
1212
|
+
rrf_k?: number;
|
|
1213
|
+
/**
|
|
1214
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
1215
|
+
*
|
|
1216
|
+
*/
|
|
1217
|
+
recency_half_life_days?: number;
|
|
1178
1218
|
/**
|
|
1179
1219
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
1180
1220
|
*
|
|
@@ -3162,9 +3202,17 @@ type AgentResourceProperties = {
|
|
|
3162
3202
|
*/
|
|
3163
3203
|
tags?: TagBag;
|
|
3164
3204
|
/**
|
|
3165
|
-
* Minimum similarity
|
|
3205
|
+
* Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked. Omitted, there is no floor.
|
|
3166
3206
|
*/
|
|
3167
3207
|
min_score?: number;
|
|
3208
|
+
/**
|
|
3209
|
+
* The `k` in the fusion term `1 / (k + rank)`; smaller weights the top of each ranking more heavily
|
|
3210
|
+
*/
|
|
3211
|
+
rrf_k?: number;
|
|
3212
|
+
/**
|
|
3213
|
+
* Half-life in days of the decay applied to memory results after fusion; `0` disables it
|
|
3214
|
+
*/
|
|
3215
|
+
recency_half_life_days?: number;
|
|
3168
3216
|
/**
|
|
3169
3217
|
* Maximum number of chunks to inject
|
|
3170
3218
|
*/
|
|
@@ -3617,6 +3665,12 @@ type TriggerResourceProperties = {
|
|
|
3617
3665
|
input?: {
|
|
3618
3666
|
[key: string]: unknown;
|
|
3619
3667
|
} | null;
|
|
3668
|
+
/**
|
|
3669
|
+
* Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be scheduled. Write-only. A value may be a `{{secret:...}}` reference, which is what a template should carry — the credential stays in the secret store and only its name is checked in
|
|
3670
|
+
*/
|
|
3671
|
+
tool_context?: {
|
|
3672
|
+
[key: string]: string;
|
|
3673
|
+
} | null;
|
|
3620
3674
|
/**
|
|
3621
3675
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
3622
3676
|
*/
|
|
@@ -5556,12 +5610,6 @@ type OrchestrationRun = {
|
|
|
5556
5610
|
input?: {
|
|
5557
5611
|
[key: string]: unknown;
|
|
5558
5612
|
} | null;
|
|
5559
|
-
/**
|
|
5560
|
-
* The `tool_context` supplied at run creation, forwarded as `X-Naturali-Context-<key>` headers on every tool call the run's agent nodes make. Null when the run was started without one.
|
|
5561
|
-
*/
|
|
5562
|
-
tool_context?: {
|
|
5563
|
-
[key: string]: string;
|
|
5564
|
-
} | null;
|
|
5565
5613
|
/**
|
|
5566
5614
|
* The caller-owned key/value metadata supplied at run creation, returned verbatim. Null when the run was started without any. The server writes nothing here and no key is reserved; the bag is never merged into `state`, so nothing in it reaches the graph.
|
|
5567
5615
|
*/
|
|
@@ -5736,7 +5784,7 @@ type StartOrchestrationRunRequest = {
|
|
|
5736
5784
|
/**
|
|
5737
5785
|
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
5738
5786
|
*
|
|
5739
|
-
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
5787
|
+
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
5740
5788
|
*
|
|
5741
5789
|
* The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped at generation time — a caller cannot address them from here.
|
|
5742
5790
|
*/
|
|
@@ -5799,6 +5847,26 @@ type Project = {
|
|
|
5799
5847
|
*
|
|
5800
5848
|
*/
|
|
5801
5849
|
trace_content_mode: 'full' | 'none';
|
|
5850
|
+
/**
|
|
5851
|
+
* Orchestration runs of this project driven at once. `null` (the default) is unlimited. Enforced when a run is claimed — runs past the limit wait for a slot rather than failing.
|
|
5852
|
+
*
|
|
5853
|
+
*/
|
|
5854
|
+
max_concurrent_runs: number | null;
|
|
5855
|
+
/**
|
|
5856
|
+
* Generations one continuation chain in this project may hold before it stops being resumed. `null` (the default) leaves the platform-wide ceiling in force. The budget actually applied is the smallest of that ceiling, this number, and the agent's own — an agent author can be stricter than this, never looser.
|
|
5857
|
+
*
|
|
5858
|
+
*/
|
|
5859
|
+
max_chain_generations: number | null;
|
|
5860
|
+
/**
|
|
5861
|
+
* Nesting levels a run tree in this project may reach before the next child is refused. `null` (the default) leaves the platform-wide bound in force; the bound applied is the smaller of the two.
|
|
5862
|
+
*
|
|
5863
|
+
*/
|
|
5864
|
+
max_orchestration_run_depth: number | null;
|
|
5865
|
+
/**
|
|
5866
|
+
* Whether a generation whose model carries no price is refused before the provider is called. `false` by default, which runs the model and meters it at no cost. Mainly of use with your own providers — see [Requiring a priced model](/docs/modules/projects#requiring-a-priced-model).
|
|
5867
|
+
*
|
|
5868
|
+
*/
|
|
5869
|
+
require_priced_model: boolean;
|
|
5802
5870
|
created_at: Date;
|
|
5803
5871
|
updated_at: Date;
|
|
5804
5872
|
};
|
|
@@ -5886,6 +5954,26 @@ type ProjectUpdate = {
|
|
|
5886
5954
|
*
|
|
5887
5955
|
*/
|
|
5888
5956
|
trace_content_mode?: 'full' | 'none';
|
|
5957
|
+
/**
|
|
5958
|
+
* Orchestration runs driven at once. Send `null` to lift the limit. Omitting the field leaves it unchanged.
|
|
5959
|
+
*
|
|
5960
|
+
*/
|
|
5961
|
+
max_concurrent_runs?: number | null;
|
|
5962
|
+
/**
|
|
5963
|
+
* Generations one continuation chain may hold. Send `null` to drop back to the platform-wide ceiling. Omitting the field leaves it unchanged.
|
|
5964
|
+
*
|
|
5965
|
+
*/
|
|
5966
|
+
max_chain_generations?: number | null;
|
|
5967
|
+
/**
|
|
5968
|
+
* Nesting levels a run tree may reach. Send `null` to drop back to the platform-wide bound. Omitting the field leaves it unchanged.
|
|
5969
|
+
*
|
|
5970
|
+
*/
|
|
5971
|
+
max_orchestration_run_depth?: number | null;
|
|
5972
|
+
/**
|
|
5973
|
+
* Refuse a generation whose model carries no price, before the provider is called. Uncapped by plan — it only ever narrows what the project may spend.
|
|
5974
|
+
*
|
|
5975
|
+
*/
|
|
5976
|
+
require_priced_model?: boolean;
|
|
5889
5977
|
};
|
|
5890
5978
|
/**
|
|
5891
5979
|
* Token counts (input_tokens already includes cached input).
|
|
@@ -7037,6 +7125,17 @@ type CreateTriggerRequest = {
|
|
|
7037
7125
|
input?: {
|
|
7038
7126
|
[key: string]: unknown;
|
|
7039
7127
|
};
|
|
7128
|
+
/**
|
|
7129
|
+
* Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be put on a schedule — a firing has no request to carry one. Each key is forwarded as one `X-Naturali-Context-<key>` header.
|
|
7130
|
+
*
|
|
7131
|
+
* **Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.
|
|
7132
|
+
*
|
|
7133
|
+
* A value may be a `{{secret:...}}` reference, which keeps the credential in the [secret](/docs/modules/secrets) store and leaves only its name on the trigger; it is resolved at fire time, so rotating the secret changes the next firing without touching the trigger. A reference naming a secret that does not exist in this project is refused here rather than at fire time.
|
|
7134
|
+
*
|
|
7135
|
+
*/
|
|
7136
|
+
tool_context?: {
|
|
7137
|
+
[key: string]: string;
|
|
7138
|
+
};
|
|
7040
7139
|
/**
|
|
7041
7140
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
7042
7141
|
*/
|
|
@@ -7057,6 +7156,13 @@ type UpdateTriggerRequest = {
|
|
|
7057
7156
|
input?: {
|
|
7058
7157
|
[key: string]: unknown;
|
|
7059
7158
|
} | null;
|
|
7159
|
+
/**
|
|
7160
|
+
* Replaces the stored bag; `null` clears it. Write-only and resolved at fire time — see `CreateTriggerRequest.tool_context`.
|
|
7161
|
+
*
|
|
7162
|
+
*/
|
|
7163
|
+
tool_context?: {
|
|
7164
|
+
[key: string]: string;
|
|
7165
|
+
} | null;
|
|
7060
7166
|
cron?: string | null;
|
|
7061
7167
|
event_pattern?: string | null;
|
|
7062
7168
|
active?: boolean;
|
|
@@ -7069,6 +7175,15 @@ type FireTriggerRequest = {
|
|
|
7069
7175
|
input?: {
|
|
7070
7176
|
[key: string]: unknown;
|
|
7071
7177
|
};
|
|
7178
|
+
/**
|
|
7179
|
+
* Fire-time caller context, shallow-merged per key over the trigger's stored `tool_context`. A manual fire has a caller, so this is the one path that can supply a value without storing it.
|
|
7180
|
+
*
|
|
7181
|
+
* Forwarded exactly as written: a `{{secret:...}}` reference is resolved only in the trigger's stored bag, never in one supplied here.
|
|
7182
|
+
*
|
|
7183
|
+
*/
|
|
7184
|
+
tool_context?: {
|
|
7185
|
+
[key: string]: string;
|
|
7186
|
+
};
|
|
7072
7187
|
};
|
|
7073
7188
|
type TriggerSecretResponse = {
|
|
7074
7189
|
secret?: string;
|
|
@@ -22709,8 +22824,9 @@ export declare class Projects {
|
|
|
22709
22824
|
/**
|
|
22710
22825
|
* Update a project
|
|
22711
22826
|
*
|
|
22712
|
-
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained.
|
|
22827
|
+
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`), its execution ceilings (`max_concurrent_runs`, `max_chain_generations`, `max_orchestration_run_depth`) and its priced-model gate (`require_priced_model`). Archiving is reversible; resources are retained.
|
|
22713
22828
|
* Requires the `admin` role in the project (an `owner` has it too).
|
|
22829
|
+
* The ceilings and the priced-model gate are uncapped by plan: each one only ever narrows what the project may spend, so setting one takes on a restriction rather than claiming an entitlement. On the three ceilings `null` clears the project's own bound and omission leaves it alone — they are different instructions.
|
|
22714
22830
|
* The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
|
|
22715
22831
|
*
|
|
22716
22832
|
* Your plan sets the longest window you may keep content for. A wider one — `null` included, which keeps content indefinitely — responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit` in days. Anything shorter is always allowed. Moving to a plan with a shorter window takes effect at the end of the billing cycle, and content already stored is then purged by age like everything else.
|
package/dist/index.d.mts
CHANGED
|
@@ -768,6 +768,16 @@ type Agent = {
|
|
|
768
768
|
*
|
|
769
769
|
*/
|
|
770
770
|
min_score?: number;
|
|
771
|
+
/**
|
|
772
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
773
|
+
*
|
|
774
|
+
*/
|
|
775
|
+
rrf_k?: number;
|
|
776
|
+
/**
|
|
777
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
778
|
+
*
|
|
779
|
+
*/
|
|
780
|
+
recency_half_life_days?: number;
|
|
771
781
|
/**
|
|
772
782
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
773
783
|
*
|
|
@@ -968,6 +978,16 @@ type CreateAgentRequest = {
|
|
|
968
978
|
*
|
|
969
979
|
*/
|
|
970
980
|
min_score?: number;
|
|
981
|
+
/**
|
|
982
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
983
|
+
*
|
|
984
|
+
*/
|
|
985
|
+
rrf_k?: number;
|
|
986
|
+
/**
|
|
987
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
988
|
+
*
|
|
989
|
+
*/
|
|
990
|
+
recency_half_life_days?: number;
|
|
971
991
|
/**
|
|
972
992
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
973
993
|
*
|
|
@@ -1066,6 +1086,16 @@ type UpdateAgentRequest = {
|
|
|
1066
1086
|
*
|
|
1067
1087
|
*/
|
|
1068
1088
|
min_score?: number;
|
|
1089
|
+
/**
|
|
1090
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
1091
|
+
*
|
|
1092
|
+
*/
|
|
1093
|
+
rrf_k?: number;
|
|
1094
|
+
/**
|
|
1095
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
1096
|
+
*
|
|
1097
|
+
*/
|
|
1098
|
+
recency_half_life_days?: number;
|
|
1069
1099
|
/**
|
|
1070
1100
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
1071
1101
|
*
|
|
@@ -1160,7 +1190,7 @@ type CreateAgentGenerationRequest = {
|
|
|
1160
1190
|
[key: string]: unknown;
|
|
1161
1191
|
} | null;
|
|
1162
1192
|
/**
|
|
1163
|
-
* Per-generation knowledge retrieval override. Array filters (memory_store_ids, document_ids, document_paths) are unioned with the agent's stored knowledge_config; `tags` pairs are merged with the override winning per key; scalar fields (min_score, limit) use the per-generation value when present.
|
|
1193
|
+
* Per-generation knowledge retrieval override. Array filters (memory_store_ids, document_ids, document_paths) are unioned with the agent's stored knowledge_config; `tags` pairs are merged with the override winning per key; scalar fields (min_score, rrf_k, recency_half_life_days, limit) use the per-generation value when present.
|
|
1164
1194
|
*/
|
|
1165
1195
|
knowledge_config?: {
|
|
1166
1196
|
memory_store_ids?: Array<string>;
|
|
@@ -1175,6 +1205,16 @@ type CreateAgentGenerationRequest = {
|
|
|
1175
1205
|
*
|
|
1176
1206
|
*/
|
|
1177
1207
|
min_score?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the deployment's `KNOWLEDGE_RRF_K` applies.
|
|
1210
|
+
*
|
|
1211
|
+
*/
|
|
1212
|
+
rrf_k?: number;
|
|
1213
|
+
/**
|
|
1214
|
+
* Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` applies.
|
|
1215
|
+
*
|
|
1216
|
+
*/
|
|
1217
|
+
recency_half_life_days?: number;
|
|
1178
1218
|
/**
|
|
1179
1219
|
* Maximum number of results to inject. Omitted, 10 are injected.
|
|
1180
1220
|
*
|
|
@@ -3162,9 +3202,17 @@ type AgentResourceProperties = {
|
|
|
3162
3202
|
*/
|
|
3163
3203
|
tags?: TagBag;
|
|
3164
3204
|
/**
|
|
3165
|
-
* Minimum similarity
|
|
3205
|
+
* Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked. Omitted, there is no floor.
|
|
3166
3206
|
*/
|
|
3167
3207
|
min_score?: number;
|
|
3208
|
+
/**
|
|
3209
|
+
* The `k` in the fusion term `1 / (k + rank)`; smaller weights the top of each ranking more heavily
|
|
3210
|
+
*/
|
|
3211
|
+
rrf_k?: number;
|
|
3212
|
+
/**
|
|
3213
|
+
* Half-life in days of the decay applied to memory results after fusion; `0` disables it
|
|
3214
|
+
*/
|
|
3215
|
+
recency_half_life_days?: number;
|
|
3168
3216
|
/**
|
|
3169
3217
|
* Maximum number of chunks to inject
|
|
3170
3218
|
*/
|
|
@@ -3617,6 +3665,12 @@ type TriggerResourceProperties = {
|
|
|
3617
3665
|
input?: {
|
|
3618
3666
|
[key: string]: unknown;
|
|
3619
3667
|
} | null;
|
|
3668
|
+
/**
|
|
3669
|
+
* Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be scheduled. Write-only. A value may be a `{{secret:...}}` reference, which is what a template should carry — the credential stays in the secret store and only its name is checked in
|
|
3670
|
+
*/
|
|
3671
|
+
tool_context?: {
|
|
3672
|
+
[key: string]: string;
|
|
3673
|
+
} | null;
|
|
3620
3674
|
/**
|
|
3621
3675
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
3622
3676
|
*/
|
|
@@ -5556,12 +5610,6 @@ type OrchestrationRun = {
|
|
|
5556
5610
|
input?: {
|
|
5557
5611
|
[key: string]: unknown;
|
|
5558
5612
|
} | null;
|
|
5559
|
-
/**
|
|
5560
|
-
* The `tool_context` supplied at run creation, forwarded as `X-Naturali-Context-<key>` headers on every tool call the run's agent nodes make. Null when the run was started without one.
|
|
5561
|
-
*/
|
|
5562
|
-
tool_context?: {
|
|
5563
|
-
[key: string]: string;
|
|
5564
|
-
} | null;
|
|
5565
5613
|
/**
|
|
5566
5614
|
* The caller-owned key/value metadata supplied at run creation, returned verbatim. Null when the run was started without any. The server writes nothing here and no key is reserved; the bag is never merged into `state`, so nothing in it reaches the graph.
|
|
5567
5615
|
*/
|
|
@@ -5736,7 +5784,7 @@ type StartOrchestrationRunRequest = {
|
|
|
5736
5784
|
/**
|
|
5737
5785
|
* Key-value pairs forwarded as `X-Naturali-Context-<key>` headers on every `http` and `mcp` tool call made by an agent node of this run — including the agents of any child run a `loop` or `sub_orchestration` node starts. The header name is `X-Naturali-Context-` plus the key verbatim; no character is re-cased.
|
|
5738
5786
|
*
|
|
5739
|
-
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
5787
|
+
* The bag is stored on the run and re-read on every step, so it survives an `awaiting_input` pause, a `sleeping` wait, a background worker drive and a crash redrive. It is **write-only**: a run is a record every principal who may read runs can read, and a credential in it is not theirs to see, so it is never returned on one. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with `400 INVALID_TOOL_CONTEXT_KEY` and no run is created.
|
|
5740
5788
|
*
|
|
5741
5789
|
* The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped at generation time — a caller cannot address them from here.
|
|
5742
5790
|
*/
|
|
@@ -5799,6 +5847,26 @@ type Project = {
|
|
|
5799
5847
|
*
|
|
5800
5848
|
*/
|
|
5801
5849
|
trace_content_mode: 'full' | 'none';
|
|
5850
|
+
/**
|
|
5851
|
+
* Orchestration runs of this project driven at once. `null` (the default) is unlimited. Enforced when a run is claimed — runs past the limit wait for a slot rather than failing.
|
|
5852
|
+
*
|
|
5853
|
+
*/
|
|
5854
|
+
max_concurrent_runs: number | null;
|
|
5855
|
+
/**
|
|
5856
|
+
* Generations one continuation chain in this project may hold before it stops being resumed. `null` (the default) leaves the platform-wide ceiling in force. The budget actually applied is the smallest of that ceiling, this number, and the agent's own — an agent author can be stricter than this, never looser.
|
|
5857
|
+
*
|
|
5858
|
+
*/
|
|
5859
|
+
max_chain_generations: number | null;
|
|
5860
|
+
/**
|
|
5861
|
+
* Nesting levels a run tree in this project may reach before the next child is refused. `null` (the default) leaves the platform-wide bound in force; the bound applied is the smaller of the two.
|
|
5862
|
+
*
|
|
5863
|
+
*/
|
|
5864
|
+
max_orchestration_run_depth: number | null;
|
|
5865
|
+
/**
|
|
5866
|
+
* Whether a generation whose model carries no price is refused before the provider is called. `false` by default, which runs the model and meters it at no cost. Mainly of use with your own providers — see [Requiring a priced model](/docs/modules/projects#requiring-a-priced-model).
|
|
5867
|
+
*
|
|
5868
|
+
*/
|
|
5869
|
+
require_priced_model: boolean;
|
|
5802
5870
|
created_at: Date;
|
|
5803
5871
|
updated_at: Date;
|
|
5804
5872
|
};
|
|
@@ -5886,6 +5954,26 @@ type ProjectUpdate = {
|
|
|
5886
5954
|
*
|
|
5887
5955
|
*/
|
|
5888
5956
|
trace_content_mode?: 'full' | 'none';
|
|
5957
|
+
/**
|
|
5958
|
+
* Orchestration runs driven at once. Send `null` to lift the limit. Omitting the field leaves it unchanged.
|
|
5959
|
+
*
|
|
5960
|
+
*/
|
|
5961
|
+
max_concurrent_runs?: number | null;
|
|
5962
|
+
/**
|
|
5963
|
+
* Generations one continuation chain may hold. Send `null` to drop back to the platform-wide ceiling. Omitting the field leaves it unchanged.
|
|
5964
|
+
*
|
|
5965
|
+
*/
|
|
5966
|
+
max_chain_generations?: number | null;
|
|
5967
|
+
/**
|
|
5968
|
+
* Nesting levels a run tree may reach. Send `null` to drop back to the platform-wide bound. Omitting the field leaves it unchanged.
|
|
5969
|
+
*
|
|
5970
|
+
*/
|
|
5971
|
+
max_orchestration_run_depth?: number | null;
|
|
5972
|
+
/**
|
|
5973
|
+
* Refuse a generation whose model carries no price, before the provider is called. Uncapped by plan — it only ever narrows what the project may spend.
|
|
5974
|
+
*
|
|
5975
|
+
*/
|
|
5976
|
+
require_priced_model?: boolean;
|
|
5889
5977
|
};
|
|
5890
5978
|
/**
|
|
5891
5979
|
* Token counts (input_tokens already includes cached input).
|
|
@@ -7037,6 +7125,17 @@ type CreateTriggerRequest = {
|
|
|
7037
7125
|
input?: {
|
|
7038
7126
|
[key: string]: unknown;
|
|
7039
7127
|
};
|
|
7128
|
+
/**
|
|
7129
|
+
* Caller context every firing forwards to the run it starts, so an agent whose tools authorize through `{{context:<key>}}` can be put on a schedule — a firing has no request to carry one. Each key is forwarded as one `X-Naturali-Context-<key>` header.
|
|
7130
|
+
*
|
|
7131
|
+
* **Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.
|
|
7132
|
+
*
|
|
7133
|
+
* A value may be a `{{secret:...}}` reference, which keeps the credential in the [secret](/docs/modules/secrets) store and leaves only its name on the trigger; it is resolved at fire time, so rotating the secret changes the next firing without touching the trigger. A reference naming a secret that does not exist in this project is refused here rather than at fire time.
|
|
7134
|
+
*
|
|
7135
|
+
*/
|
|
7136
|
+
tool_context?: {
|
|
7137
|
+
[key: string]: string;
|
|
7138
|
+
};
|
|
7040
7139
|
/**
|
|
7041
7140
|
* 5-field cron expression (UTC). Required when type is schedule
|
|
7042
7141
|
*/
|
|
@@ -7057,6 +7156,13 @@ type UpdateTriggerRequest = {
|
|
|
7057
7156
|
input?: {
|
|
7058
7157
|
[key: string]: unknown;
|
|
7059
7158
|
} | null;
|
|
7159
|
+
/**
|
|
7160
|
+
* Replaces the stored bag; `null` clears it. Write-only and resolved at fire time — see `CreateTriggerRequest.tool_context`.
|
|
7161
|
+
*
|
|
7162
|
+
*/
|
|
7163
|
+
tool_context?: {
|
|
7164
|
+
[key: string]: string;
|
|
7165
|
+
} | null;
|
|
7060
7166
|
cron?: string | null;
|
|
7061
7167
|
event_pattern?: string | null;
|
|
7062
7168
|
active?: boolean;
|
|
@@ -7069,6 +7175,15 @@ type FireTriggerRequest = {
|
|
|
7069
7175
|
input?: {
|
|
7070
7176
|
[key: string]: unknown;
|
|
7071
7177
|
};
|
|
7178
|
+
/**
|
|
7179
|
+
* Fire-time caller context, shallow-merged per key over the trigger's stored `tool_context`. A manual fire has a caller, so this is the one path that can supply a value without storing it.
|
|
7180
|
+
*
|
|
7181
|
+
* Forwarded exactly as written: a `{{secret:...}}` reference is resolved only in the trigger's stored bag, never in one supplied here.
|
|
7182
|
+
*
|
|
7183
|
+
*/
|
|
7184
|
+
tool_context?: {
|
|
7185
|
+
[key: string]: string;
|
|
7186
|
+
};
|
|
7072
7187
|
};
|
|
7073
7188
|
type TriggerSecretResponse = {
|
|
7074
7189
|
secret?: string;
|
|
@@ -22709,8 +22824,9 @@ export declare class Projects {
|
|
|
22709
22824
|
/**
|
|
22710
22825
|
* Update a project
|
|
22711
22826
|
*
|
|
22712
|
-
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained.
|
|
22827
|
+
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`), its execution ceilings (`max_concurrent_runs`, `max_chain_generations`, `max_orchestration_run_depth`) and its priced-model gate (`require_priced_model`). Archiving is reversible; resources are retained.
|
|
22713
22828
|
* Requires the `admin` role in the project (an `owner` has it too).
|
|
22829
|
+
* The ceilings and the priced-model gate are uncapped by plan: each one only ever narrows what the project may spend, so setting one takes on a restriction rather than claiming an entitlement. On the three ceilings `null` clears the project's own bound and omission leaves it alone — they are different instructions.
|
|
22714
22830
|
* The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
|
|
22715
22831
|
*
|
|
22716
22832
|
* Your plan sets the longest window you may keep content for. A wider one — `null` included, which keeps content indefinitely — responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit` in days. Anything shorter is always allowed. Moving to a plan with a shorter window takes effect at the end of the billing cycle, and content already stored is then purged by age like everything else.
|
package/dist/index.mjs
CHANGED
|
@@ -3724,8 +3724,9 @@ var Projects = class {
|
|
|
3724
3724
|
/**
|
|
3725
3725
|
* Update a project
|
|
3726
3726
|
*
|
|
3727
|
-
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`). Archiving is reversible; resources are retained.
|
|
3727
|
+
* Rename or archive a project, and/or change its content-retention settings (`trace_content_retention_days`, `trace_content_mode`), its execution ceilings (`max_concurrent_runs`, `max_chain_generations`, `max_orchestration_run_depth`) and its priced-model gate (`require_priced_model`). Archiving is reversible; resources are retained.
|
|
3728
3728
|
* Requires the `admin` role in the project (an `owner` has it too).
|
|
3729
|
+
* The ceilings and the priced-model gate are uncapped by plan: each one only ever narrows what the project may spend, so setting one takes on a restriction rather than claiming an entitlement. On the three ceilings `null` clears the project's own bound and omission leaves it alone — they are different instructions.
|
|
3729
3730
|
* The two retention controls answer different questions. The window bounds how long content *stays* — a daily sweep purges anything past it, leaving auditable skeletons behind. `trace_content_mode: none` means content is never *written*, which is the stronger guarantee: it cannot be missed by a sweep or survive in a backup.
|
|
3730
3731
|
*
|
|
3731
3732
|
* Your plan sets the longest window you may keep content for. A wider one — `null` included, which keeps content indefinitely — responds `403` with `plan_limit_reached`, whose `details` carry the `plan` and the `limit` in days. Anything shorter is always allowed. Moving to a plan with a shorter window takes effect at the end of the billing cycle, and content already stored is then purged by age like everything else.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.134.0",
|
|
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.
|
|
34
|
+
"@naturali/api": "0.134.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.3.1",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|