@soat/sdk 0.55.0 → 0.57.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
@@ -3365,7 +3365,7 @@ var Projects = class {
3365
3365
  /**
3366
3366
  * Update a project
3367
3367
  *
3368
- * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3368
+ * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its priced-model requirement (`require_priced_model`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3369
3369
  */
3370
3370
  static updateProject(options) {
3371
3371
  return (options.client ?? client).patch({
package/dist/index.d.cts CHANGED
@@ -482,7 +482,25 @@ type Agent = {
482
482
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
483
483
  */
484
484
  tags?: TagBag;
485
+ /**
486
+ * 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.
487
+ *
488
+ */
485
489
  min_score?: number;
490
+ /**
491
+ * 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.
492
+ *
493
+ */
494
+ rrf_k?: number;
495
+ /**
496
+ * 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.
497
+ *
498
+ */
499
+ recency_half_life_days?: number;
500
+ /**
501
+ * Maximum number of results to inject. Omitted, 10 are injected.
502
+ *
503
+ */
486
504
  limit?: number;
487
505
  /**
488
506
  * 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.
@@ -678,7 +696,25 @@ type CreateAgentRequest = {
678
696
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
679
697
  */
680
698
  tags?: TagBag;
699
+ /**
700
+ * 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.
701
+ *
702
+ */
681
703
  min_score?: number;
704
+ /**
705
+ * 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.
706
+ *
707
+ */
708
+ rrf_k?: number;
709
+ /**
710
+ * 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.
711
+ *
712
+ */
713
+ recency_half_life_days?: number;
714
+ /**
715
+ * Maximum number of results to inject. Omitted, 10 are injected.
716
+ *
717
+ */
682
718
  limit?: number;
683
719
  /**
684
720
  * 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.
@@ -768,7 +804,25 @@ type UpdateAgentRequest = {
768
804
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
769
805
  */
770
806
  tags?: TagBag;
807
+ /**
808
+ * 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.
809
+ *
810
+ */
771
811
  min_score?: number;
812
+ /**
813
+ * 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.
814
+ *
815
+ */
816
+ rrf_k?: number;
817
+ /**
818
+ * 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.
819
+ *
820
+ */
821
+ recency_half_life_days?: number;
822
+ /**
823
+ * Maximum number of results to inject. Omitted, 10 are injected.
824
+ *
825
+ */
772
826
  limit?: number;
773
827
  /**
774
828
  * 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.
@@ -859,7 +913,7 @@ type CreateAgentGenerationRequest = {
859
913
  [key: string]: unknown;
860
914
  } | null;
861
915
  /**
862
- * 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.
916
+ * 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.
863
917
  */
864
918
  knowledge_config?: {
865
919
  memory_store_ids?: Array<string>;
@@ -869,7 +923,25 @@ type CreateAgentGenerationRequest = {
869
923
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
870
924
  */
871
925
  tags?: TagBag;
926
+ /**
927
+ * 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.
928
+ *
929
+ */
872
930
  min_score?: number;
931
+ /**
932
+ * 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.
933
+ *
934
+ */
935
+ rrf_k?: number;
936
+ /**
937
+ * 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.
938
+ *
939
+ */
940
+ recency_half_life_days?: number;
941
+ /**
942
+ * Maximum number of results to inject. Omitted, 10 are injected.
943
+ *
944
+ */
873
945
  limit?: number;
874
946
  } | null;
875
947
  };
@@ -2407,9 +2479,17 @@ type AgentResourceProperties = {
2407
2479
  */
2408
2480
  tags?: TagBag;
2409
2481
  /**
2410
- * Minimum similarity score (0–1) for retrieved chunks
2482
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked. Omitted, there is no floor.
2411
2483
  */
2412
2484
  min_score?: number;
2485
+ /**
2486
+ * The `k` in the fusion term `1 / (k + rank)`; smaller weights the top of each ranking more heavily
2487
+ */
2488
+ rrf_k?: number;
2489
+ /**
2490
+ * Half-life in days of the decay applied to memory results after fusion; `0` disables it
2491
+ */
2492
+ recency_half_life_days?: number;
2413
2493
  /**
2414
2494
  * Maximum number of chunks to inject
2415
2495
  */
@@ -2883,6 +2963,12 @@ type TriggerResourceProperties = {
2883
2963
  input?: {
2884
2964
  [key: string]: unknown;
2885
2965
  } | null;
2966
+ /**
2967
+ * 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
2968
+ */
2969
+ tool_context?: {
2970
+ [key: string]: string;
2971
+ } | null;
2886
2972
  /**
2887
2973
  * 5-field cron expression (UTC). Required when type is schedule
2888
2974
  */
@@ -4705,14 +4791,15 @@ type OrchestrationNode = {
4705
4791
  [key: string]: unknown;
4706
4792
  };
4707
4793
  /**
4708
- * 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.
4794
+ * 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`.
4709
4795
  *
4710
4796
  */
4711
4797
  state_mapping?: {
4712
4798
  [key: string]: unknown;
4713
4799
  };
4714
4800
  /**
4715
- * For agent nodes — JSON Schema for structured output parsing.
4801
+ * 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.
4802
+ *
4716
4803
  */
4717
4804
  output_schema?: {
4718
4805
  [key: string]: unknown;
@@ -5000,12 +5087,6 @@ type OrchestrationRun = {
5000
5087
  input?: {
5001
5088
  [key: string]: unknown;
5002
5089
  } | null;
5003
- /**
5004
- * The `tool_context` supplied at run creation, forwarded as `X-Soat-Context-<key>` headers on every tool call the run's agent nodes make. Null when the run was started without one.
5005
- */
5006
- tool_context?: {
5007
- [key: string]: string;
5008
- } | null;
5009
5090
  /**
5010
5091
  * 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.
5011
5092
  */
@@ -5081,6 +5162,11 @@ type NodeExecution = {
5081
5162
  *
5082
5163
  */
5083
5164
  attempt: number;
5165
+ /**
5166
+ * 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.
5167
+ *
5168
+ */
5169
+ dispatches: number;
5084
5170
  /**
5085
5171
  * 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.
5086
5172
  */
@@ -5175,7 +5261,7 @@ type StartOrchestrationRunRequest = {
5175
5261
  /**
5176
5262
  * Key-value pairs forwarded as `X-Soat-Context-<key>` headers on every `http`, `mcp` and `builtin` 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-Soat-Context-` plus the key verbatim; no character is re-cased.
5177
5263
  *
5178
- * 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.
5264
+ * 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.
5179
5265
  *
5180
5266
  * The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped at generation time — a caller cannot address them from here.
5181
5267
  */
@@ -5271,6 +5357,10 @@ type ProjectRecord = {
5271
5357
  * Whether `GET` requests naming this project are recorded in the audit log. `false` by default — v1 audits mutations only.
5272
5358
  */
5273
5359
  audit_reads_enabled?: boolean;
5360
+ /**
5361
+ * Whether a generation whose model carries no price row is refused with `409 MODEL_NOT_PRICED`. `false` by default, where an unpriced model runs and meters at `cost_usd: null`.
5362
+ */
5363
+ require_priced_model?: boolean;
5274
5364
  /**
5275
5365
  * What a conversation that names no `retrieval` of its own does. `none` by default.
5276
5366
  */
@@ -6289,6 +6379,17 @@ type CreateTriggerRequest = {
6289
6379
  input?: {
6290
6380
  [key: string]: unknown;
6291
6381
  };
6382
+ /**
6383
+ * 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-Soat-Context-<key>` header.
6384
+ *
6385
+ * **Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.
6386
+ *
6387
+ * 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.
6388
+ *
6389
+ */
6390
+ tool_context?: {
6391
+ [key: string]: string;
6392
+ };
6292
6393
  /**
6293
6394
  * 5-field cron expression (UTC). Required when type is schedule
6294
6395
  */
@@ -6309,6 +6410,13 @@ type UpdateTriggerRequest = {
6309
6410
  input?: {
6310
6411
  [key: string]: unknown;
6311
6412
  } | null;
6413
+ /**
6414
+ * Replaces the stored bag; `null` clears it. Write-only and resolved at fire time — see `CreateTriggerRequest.tool_context`.
6415
+ *
6416
+ */
6417
+ tool_context?: {
6418
+ [key: string]: string;
6419
+ } | null;
6312
6420
  cron?: string | null;
6313
6421
  event_pattern?: string | null;
6314
6422
  active?: boolean;
@@ -6321,6 +6429,15 @@ type FireTriggerRequest = {
6321
6429
  input?: {
6322
6430
  [key: string]: unknown;
6323
6431
  };
6432
+ /**
6433
+ * 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.
6434
+ *
6435
+ * Forwarded exactly as written: a `{{secret:...}}` reference is resolved only in the trigger's stored bag, never in one supplied here.
6436
+ *
6437
+ */
6438
+ tool_context?: {
6439
+ [key: string]: string;
6440
+ };
6324
6441
  };
6325
6442
  type TriggerSecretResponse = {
6326
6443
  secret?: string;
@@ -15459,6 +15576,10 @@ type UpdateProjectData = {
15459
15576
  * Opt the project into read auditing. When true, `GET` requests that name this project are recorded in the audit log alongside mutations. Defaults to `false`.
15460
15577
  */
15461
15578
  audit_reads_enabled?: boolean;
15579
+ /**
15580
+ * Refuse a generation whose model carries no price row for every billable token component, with `409 MODEL_NOT_PRICED`. Defaults to `false`, where an unpriced model runs and meters at `cost_usd: null`. The check runs before the provider is called, so a refused turn spends nothing, and covers every target of a model route the turn may fail over to.
15581
+ */
15582
+ require_priced_model?: boolean;
15462
15583
  /**
15463
15584
  * What a conversation that names no `retrieval` of its own does. `none` by default: a turn is embedded because someone asked for the conversation to be retrievable, never merely because it was said. Turns are stored and chunked on both settings.
15464
15585
  */
@@ -20170,7 +20291,7 @@ export declare class Projects {
20170
20291
  /**
20171
20292
  * Update a project
20172
20293
  *
20173
- * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
20294
+ * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its priced-model requirement (`require_priced_model`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
20174
20295
  */
20175
20296
  static updateProject<ThrowOnError extends boolean = false>(options: Options<UpdateProjectData, ThrowOnError>): RequestResult<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError>;
20176
20297
  /**
package/dist/index.d.mts CHANGED
@@ -482,7 +482,25 @@ type Agent = {
482
482
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
483
483
  */
484
484
  tags?: TagBag;
485
+ /**
486
+ * 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.
487
+ *
488
+ */
485
489
  min_score?: number;
490
+ /**
491
+ * 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.
492
+ *
493
+ */
494
+ rrf_k?: number;
495
+ /**
496
+ * 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.
497
+ *
498
+ */
499
+ recency_half_life_days?: number;
500
+ /**
501
+ * Maximum number of results to inject. Omitted, 10 are injected.
502
+ *
503
+ */
486
504
  limit?: number;
487
505
  /**
488
506
  * 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.
@@ -678,7 +696,25 @@ type CreateAgentRequest = {
678
696
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
679
697
  */
680
698
  tags?: TagBag;
699
+ /**
700
+ * 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.
701
+ *
702
+ */
681
703
  min_score?: number;
704
+ /**
705
+ * 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.
706
+ *
707
+ */
708
+ rrf_k?: number;
709
+ /**
710
+ * 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.
711
+ *
712
+ */
713
+ recency_half_life_days?: number;
714
+ /**
715
+ * Maximum number of results to inject. Omitted, 10 are injected.
716
+ *
717
+ */
682
718
  limit?: number;
683
719
  /**
684
720
  * 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.
@@ -768,7 +804,25 @@ type UpdateAgentRequest = {
768
804
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
769
805
  */
770
806
  tags?: TagBag;
807
+ /**
808
+ * 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.
809
+ *
810
+ */
771
811
  min_score?: number;
812
+ /**
813
+ * 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.
814
+ *
815
+ */
816
+ rrf_k?: number;
817
+ /**
818
+ * 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.
819
+ *
820
+ */
821
+ recency_half_life_days?: number;
822
+ /**
823
+ * Maximum number of results to inject. Omitted, 10 are injected.
824
+ *
825
+ */
772
826
  limit?: number;
773
827
  /**
774
828
  * 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.
@@ -859,7 +913,7 @@ type CreateAgentGenerationRequest = {
859
913
  [key: string]: unknown;
860
914
  } | null;
861
915
  /**
862
- * 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.
916
+ * 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.
863
917
  */
864
918
  knowledge_config?: {
865
919
  memory_store_ids?: Array<string>;
@@ -869,7 +923,25 @@ type CreateAgentGenerationRequest = {
869
923
  * Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.
870
924
  */
871
925
  tags?: TagBag;
926
+ /**
927
+ * 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.
928
+ *
929
+ */
872
930
  min_score?: number;
931
+ /**
932
+ * 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.
933
+ *
934
+ */
935
+ rrf_k?: number;
936
+ /**
937
+ * 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.
938
+ *
939
+ */
940
+ recency_half_life_days?: number;
941
+ /**
942
+ * Maximum number of results to inject. Omitted, 10 are injected.
943
+ *
944
+ */
873
945
  limit?: number;
874
946
  } | null;
875
947
  };
@@ -2407,9 +2479,17 @@ type AgentResourceProperties = {
2407
2479
  */
2408
2480
  tags?: TagBag;
2409
2481
  /**
2410
- * Minimum similarity score (0–1) for retrieved chunks
2482
+ * Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked. Omitted, there is no floor.
2411
2483
  */
2412
2484
  min_score?: number;
2485
+ /**
2486
+ * The `k` in the fusion term `1 / (k + rank)`; smaller weights the top of each ranking more heavily
2487
+ */
2488
+ rrf_k?: number;
2489
+ /**
2490
+ * Half-life in days of the decay applied to memory results after fusion; `0` disables it
2491
+ */
2492
+ recency_half_life_days?: number;
2413
2493
  /**
2414
2494
  * Maximum number of chunks to inject
2415
2495
  */
@@ -2883,6 +2963,12 @@ type TriggerResourceProperties = {
2883
2963
  input?: {
2884
2964
  [key: string]: unknown;
2885
2965
  } | null;
2966
+ /**
2967
+ * 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
2968
+ */
2969
+ tool_context?: {
2970
+ [key: string]: string;
2971
+ } | null;
2886
2972
  /**
2887
2973
  * 5-field cron expression (UTC). Required when type is schedule
2888
2974
  */
@@ -4705,14 +4791,15 @@ type OrchestrationNode = {
4705
4791
  [key: string]: unknown;
4706
4792
  };
4707
4793
  /**
4708
- * 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.
4794
+ * 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`.
4709
4795
  *
4710
4796
  */
4711
4797
  state_mapping?: {
4712
4798
  [key: string]: unknown;
4713
4799
  };
4714
4800
  /**
4715
- * For agent nodes — JSON Schema for structured output parsing.
4801
+ * 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.
4802
+ *
4716
4803
  */
4717
4804
  output_schema?: {
4718
4805
  [key: string]: unknown;
@@ -5000,12 +5087,6 @@ type OrchestrationRun = {
5000
5087
  input?: {
5001
5088
  [key: string]: unknown;
5002
5089
  } | null;
5003
- /**
5004
- * The `tool_context` supplied at run creation, forwarded as `X-Soat-Context-<key>` headers on every tool call the run's agent nodes make. Null when the run was started without one.
5005
- */
5006
- tool_context?: {
5007
- [key: string]: string;
5008
- } | null;
5009
5090
  /**
5010
5091
  * 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.
5011
5092
  */
@@ -5081,6 +5162,11 @@ type NodeExecution = {
5081
5162
  *
5082
5163
  */
5083
5164
  attempt: number;
5165
+ /**
5166
+ * 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.
5167
+ *
5168
+ */
5169
+ dispatches: number;
5084
5170
  /**
5085
5171
  * 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.
5086
5172
  */
@@ -5175,7 +5261,7 @@ type StartOrchestrationRunRequest = {
5175
5261
  /**
5176
5262
  * Key-value pairs forwarded as `X-Soat-Context-<key>` headers on every `http`, `mcp` and `builtin` 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-Soat-Context-` plus the key verbatim; no character is re-cased.
5177
5263
  *
5178
- * 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.
5264
+ * 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.
5179
5265
  *
5180
5266
  * The reserved identity keys (`session_id`, `actor_id`, `actor_external_id`) are stripped at generation time — a caller cannot address them from here.
5181
5267
  */
@@ -5271,6 +5357,10 @@ type ProjectRecord = {
5271
5357
  * Whether `GET` requests naming this project are recorded in the audit log. `false` by default — v1 audits mutations only.
5272
5358
  */
5273
5359
  audit_reads_enabled?: boolean;
5360
+ /**
5361
+ * Whether a generation whose model carries no price row is refused with `409 MODEL_NOT_PRICED`. `false` by default, where an unpriced model runs and meters at `cost_usd: null`.
5362
+ */
5363
+ require_priced_model?: boolean;
5274
5364
  /**
5275
5365
  * What a conversation that names no `retrieval` of its own does. `none` by default.
5276
5366
  */
@@ -6289,6 +6379,17 @@ type CreateTriggerRequest = {
6289
6379
  input?: {
6290
6380
  [key: string]: unknown;
6291
6381
  };
6382
+ /**
6383
+ * 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-Soat-Context-<key>` header.
6384
+ *
6385
+ * **Write-only.** It is accepted here and never returned on a read, so the record cannot be used to recover a value.
6386
+ *
6387
+ * 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.
6388
+ *
6389
+ */
6390
+ tool_context?: {
6391
+ [key: string]: string;
6392
+ };
6292
6393
  /**
6293
6394
  * 5-field cron expression (UTC). Required when type is schedule
6294
6395
  */
@@ -6309,6 +6410,13 @@ type UpdateTriggerRequest = {
6309
6410
  input?: {
6310
6411
  [key: string]: unknown;
6311
6412
  } | null;
6413
+ /**
6414
+ * Replaces the stored bag; `null` clears it. Write-only and resolved at fire time — see `CreateTriggerRequest.tool_context`.
6415
+ *
6416
+ */
6417
+ tool_context?: {
6418
+ [key: string]: string;
6419
+ } | null;
6312
6420
  cron?: string | null;
6313
6421
  event_pattern?: string | null;
6314
6422
  active?: boolean;
@@ -6321,6 +6429,15 @@ type FireTriggerRequest = {
6321
6429
  input?: {
6322
6430
  [key: string]: unknown;
6323
6431
  };
6432
+ /**
6433
+ * 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.
6434
+ *
6435
+ * Forwarded exactly as written: a `{{secret:...}}` reference is resolved only in the trigger's stored bag, never in one supplied here.
6436
+ *
6437
+ */
6438
+ tool_context?: {
6439
+ [key: string]: string;
6440
+ };
6324
6441
  };
6325
6442
  type TriggerSecretResponse = {
6326
6443
  secret?: string;
@@ -15459,6 +15576,10 @@ type UpdateProjectData = {
15459
15576
  * Opt the project into read auditing. When true, `GET` requests that name this project are recorded in the audit log alongside mutations. Defaults to `false`.
15460
15577
  */
15461
15578
  audit_reads_enabled?: boolean;
15579
+ /**
15580
+ * Refuse a generation whose model carries no price row for every billable token component, with `409 MODEL_NOT_PRICED`. Defaults to `false`, where an unpriced model runs and meters at `cost_usd: null`. The check runs before the provider is called, so a refused turn spends nothing, and covers every target of a model route the turn may fail over to.
15581
+ */
15582
+ require_priced_model?: boolean;
15462
15583
  /**
15463
15584
  * What a conversation that names no `retrieval` of its own does. `none` by default: a turn is embedded because someone asked for the conversation to be retrievable, never merely because it was said. Turns are stored and chunked on both settings.
15464
15585
  */
@@ -20170,7 +20291,7 @@ export declare class Projects {
20170
20291
  /**
20171
20292
  * Update a project
20172
20293
  *
20173
- * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
20294
+ * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its priced-model requirement (`require_priced_model`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
20174
20295
  */
20175
20296
  static updateProject<ThrowOnError extends boolean = false>(options: Options<UpdateProjectData, ThrowOnError>): RequestResult<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError>;
20176
20297
  /**
package/dist/index.mjs CHANGED
@@ -3364,7 +3364,7 @@ var Projects = class {
3364
3364
  /**
3365
3365
  * Update a project
3366
3366
  *
3367
- * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3367
+ * Updates a project's name, its attached guardrails (`guardrail_ids` — the project-scope baseline governing every tool call by every agent in the project), its orchestration concurrency limit (`max_concurrent_runs`), its continuation-chain ceiling (`max_chain_generations`), its orchestration nesting bound (`max_orchestration_run_depth`), its inherited model route (`default_model_route_id`), its read-auditing opt-in (`audit_reads_enabled`), its priced-model requirement (`require_priced_model`), its trace-content retention window (`trace_content_retention_days`), and/or its zero-retention setting (`trace_content_mode`). At least one field is required. Requires admin role. Detaching a guardrail (removing an id) additionally requires guardrails:DetachGuardrail.
3368
3368
  */
3369
3369
  static updateProject(options) {
3370
3370
  return (options.client ?? client).patch({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "TypeScript SDK for SOAT — open-source infrastructure for production-ready AI agents.",
5
5
  "keywords": [
6
6
  "ai-agents",