@soat/sdk 0.18.3 → 0.18.5

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
@@ -3173,7 +3173,7 @@ var Tasks = class {
3173
3173
  /**
3174
3174
  * Create a task
3175
3175
  *
3176
- * Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.
3176
+ * Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. "a new recorte for an existing theme by id"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.
3177
3177
  */
3178
3178
  static createTask(options) {
3179
3179
  return (options.client ?? client).post({
package/dist/index.d.cts CHANGED
@@ -1597,13 +1597,9 @@ type DiscussionRunRecord = {
1597
1597
  [key: string]: unknown;
1598
1598
  } | null;
1599
1599
  /**
1600
- * Reserved for the generation that invoked this run as a tool. Not currently populated — see trace_id.
1600
+ * Reserved for the generation that started this run. Not currently populated.
1601
1601
  */
1602
1602
  initiator_generation_id?: string | null;
1603
- /**
1604
- * Trace of the generation that invoked this run as a tool. Null for runs started directly via POST /discussions/{discussion_id}/runs.
1605
- */
1606
- trace_id?: string | null;
1607
1603
  completed_at?: Date | null;
1608
1604
  created_at?: Date;
1609
1605
  updated_at?: Date;
@@ -2221,6 +2217,16 @@ type ToolResourceProperties = {
2221
2217
  headers?: {
2222
2218
  [key: string]: unknown;
2223
2219
  } | null;
2220
+ /**
2221
+ * Request body encoding for `POST`/`PUT`/`PATCH`: `json` (default) or `multipart`. Incompatible with `auth.type: aws_sigv4`.
2222
+ */
2223
+ body_mode?: string | null;
2224
+ /**
2225
+ * Computed request credential. `type` is `aws_sigv4` (with `region`, `service`, `access_key_id`, `secret_access_key` and optional `session_token`) or `gcp_service_account` (with `credentials` and `scopes`). Credential fields accept `{{secret:...}}` references.
2226
+ */
2227
+ auth?: {
2228
+ [key: string]: unknown;
2229
+ } | null;
2224
2230
  } | null;
2225
2231
  /**
2226
2232
  * MCP server connection configuration. Required for `mcp` tools.
@@ -2257,10 +2263,6 @@ type ToolResourceProperties = {
2257
2263
  pipeline?: {
2258
2264
  [key: string]: unknown;
2259
2265
  } | null;
2260
- /**
2261
- * For `discussion` tools: the ID of the discussion to invoke.
2262
- */
2263
- discussion_id?: string | null;
2264
2266
  /**
2265
2267
  * Universal JSON Logic mapping applied to the tool's raw result, for every tool type. Evaluated over `{ output: <raw result> }`, e.g. `{ "var": "output.text" }`. For `pipeline` tools this runs after the pipeline's own `output` mapping.
2266
2268
  */
@@ -4342,7 +4344,7 @@ type Task = {
4342
4344
  };
4343
4345
  assignee?: string | null;
4344
4346
  /**
4345
- * { kind, id, status } of the current state's dispatch, if any.
4347
+ * { kind, id, status } of the current state's dispatch, if any. Carries an additional `attempt` (1-based) while the state's `on_enter.retry` policy is in effect.
4346
4348
  */
4347
4349
  active_dispatch?: {
4348
4350
  [key: string]: unknown;
@@ -4385,6 +4387,10 @@ type CreateTaskRequest = {
4385
4387
  [key: string]: unknown;
4386
4388
  };
4387
4389
  assignee?: string | null;
4390
+ /**
4391
+ * Name of a declared workflow state to create the task in directly, instead of the workflow's `initial` state. Must name a state declared on the workflow, or the request is rejected with `TASK_STATE_NOT_FOUND` (400). Defaults to the `initial` state.
4392
+ */
4393
+ state?: string;
4388
4394
  };
4389
4395
  type UpdateTaskRequest = {
4390
4396
  title?: string;
@@ -4416,7 +4422,7 @@ type Tool = {
4416
4422
  /**
4417
4423
  * Tool type
4418
4424
  */
4419
- type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline' | 'discussion';
4425
+ type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline';
4420
4426
  /**
4421
4427
  * What the tool does (sent to the model)
4422
4428
  */
@@ -4430,6 +4436,13 @@ type Tool = {
4430
4436
  /**
4431
4437
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4432
4438
  *
4439
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4440
+ *
4441
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4442
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4443
+ *
4444
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4445
+ *
4433
4446
  */
4434
4447
  execute?: {
4435
4448
  [key: string]: unknown;
@@ -4461,11 +4474,7 @@ type Tool = {
4461
4474
  [key: string]: unknown;
4462
4475
  } | null;
4463
4476
  /**
4464
- * For `discussion` tools: the ID of the discussion to invoke. Calling the tool with a `topic` runs that discussion synchronously and returns its outcome + run id as the tool result.
4465
- */
4466
- discussion_id?: string | null;
4467
- /**
4468
- * Universal JSON Logic mapping applied to the tool's raw result, for every tool type (`http`, `mcp`, `soat`, `pipeline`, `client`). Evaluated over `{ output: <raw result> }`, so `{ "var": "output.text" }` extracts a bare scalar field instead of requiring a wrapping `pipeline` tool. For `pipeline` tools this runs *after* the pipeline's own `output` mapping, over that mapping's result.
4477
+ * Universal JSON Logic mapping applied to the tool's raw result, for every tool type (`http`, `mcp`, `soat`, `pipeline`, `client`). Evaluated over `{ output: <raw result>, input: <merged input> }`, so `{ "var": "output.text" }` extracts a bare scalar field instead of requiring a wrapping `pipeline` tool, and `{ "var": "input.title" }` echoes back a field of the request that produced the response. For `pipeline` tools this runs *after* the pipeline's own `output` mapping, over that mapping's result.
4469
4478
  */
4470
4479
  output_mapping?: {
4471
4480
  [key: string]: unknown;
@@ -4489,7 +4498,7 @@ type CreateToolRequest = {
4489
4498
  /**
4490
4499
  * Tool type (default http)
4491
4500
  */
4492
- type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline' | 'discussion';
4501
+ type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline';
4493
4502
  /**
4494
4503
  * What the tool does
4495
4504
  */
@@ -4503,6 +4512,13 @@ type CreateToolRequest = {
4503
4512
  /**
4504
4513
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4505
4514
  *
4515
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4516
+ *
4517
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4518
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4519
+ *
4520
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4521
+ *
4506
4522
  */
4507
4523
  execute?: {
4508
4524
  [key: string]: unknown;
@@ -4533,10 +4549,6 @@ type CreateToolRequest = {
4533
4549
  pipeline?: {
4534
4550
  [key: string]: unknown;
4535
4551
  };
4536
- /**
4537
- * For `discussion` tools: the ID of the discussion to invoke.
4538
- */
4539
- discussion_id?: string;
4540
4552
  /**
4541
4553
  * Universal JSON Logic mapping applied to the tool's raw result. See the `output_mapping` field on the Tool schema for details.
4542
4554
  */
@@ -4558,6 +4570,13 @@ type UpdateToolRequest = {
4558
4570
  /**
4559
4571
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4560
4572
  *
4573
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4574
+ *
4575
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4576
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4577
+ *
4578
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4579
+ *
4561
4580
  */
4562
4581
  execute?: {
4563
4582
  [key: string]: unknown;
@@ -4585,10 +4604,6 @@ type UpdateToolRequest = {
4585
4604
  pipeline?: {
4586
4605
  [key: string]: unknown;
4587
4606
  } | null;
4588
- /**
4589
- * For `discussion` tools: the ID of the discussion to invoke.
4590
- */
4591
- discussion_id?: string | null;
4592
4607
  /**
4593
4608
  * Universal JSON Logic mapping applied to the tool's raw result. See the `output_mapping` field on the Tool schema for details.
4594
4609
  */
@@ -5219,7 +5234,7 @@ type DeliveryListResponse = {
5219
5234
  offset?: number;
5220
5235
  };
5221
5236
  /**
5222
- * A named state. Exactly one state must be `initial: true`; any number may be `terminal: true`. A `kind: human` state never dispatches — the task parks until a transition fires. `on_enter` (§5) dispatches one agent generation or orchestration run on entry.
5237
+ * A named state. Exactly one state must be `initial: true`; any number may be `terminal: true`. A `kind: human` state never dispatches — the task parks until a transition fires. `on_enter` (§5) dispatches one agent generation or orchestration run on entry, optionally under a `retry` policy (`max_attempts` 1-10, `backoff_seconds`, `backoff_multiplier`) that re-runs execution failures before `on_failure` applies.
5223
5238
  */
5224
5239
  type WorkflowState = {
5225
5240
  name: string;
@@ -5853,7 +5868,8 @@ type DeleteAgentErrors = {
5853
5868
  */
5854
5869
  404: ErrorResponse;
5855
5870
  /**
5856
- * Agent has dependent generations or traces (pass `force=true` to delete anyway)
5871
+ * Agent has dependent generations or traces (pass `force=true` to delete anyway). `error.meta` carries `generationCount` and `traceCount` so a caller can tell which one is nonzero.
5872
+ *
5857
5873
  */
5858
5874
  409: ErrorResponse;
5859
5875
  };
@@ -12917,7 +12933,7 @@ type CreateTaskData = {
12917
12933
  };
12918
12934
  type CreateTaskErrors = {
12919
12935
  /**
12920
- * Bad request (invalid payload)
12936
+ * Bad request invalid payload (`TASK_PAYLOAD_INVALID`), or `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`)
12921
12937
  */
12922
12938
  400: unknown;
12923
12939
  /**
@@ -16000,7 +16016,7 @@ declare class Tasks {
16000
16016
  /**
16001
16017
  * Create a task
16002
16018
  *
16003
- * Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.
16019
+ * Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. "a new recorte for an existing theme by id"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.
16004
16020
  */
16005
16021
  static createTask<ThrowOnError extends boolean = false>(options: Options<CreateTaskData, ThrowOnError>): RequestResult<CreateTaskResponses, CreateTaskErrors, ThrowOnError>;
16006
16022
  /**
package/dist/index.d.mts CHANGED
@@ -1597,13 +1597,9 @@ type DiscussionRunRecord = {
1597
1597
  [key: string]: unknown;
1598
1598
  } | null;
1599
1599
  /**
1600
- * Reserved for the generation that invoked this run as a tool. Not currently populated — see trace_id.
1600
+ * Reserved for the generation that started this run. Not currently populated.
1601
1601
  */
1602
1602
  initiator_generation_id?: string | null;
1603
- /**
1604
- * Trace of the generation that invoked this run as a tool. Null for runs started directly via POST /discussions/{discussion_id}/runs.
1605
- */
1606
- trace_id?: string | null;
1607
1603
  completed_at?: Date | null;
1608
1604
  created_at?: Date;
1609
1605
  updated_at?: Date;
@@ -2221,6 +2217,16 @@ type ToolResourceProperties = {
2221
2217
  headers?: {
2222
2218
  [key: string]: unknown;
2223
2219
  } | null;
2220
+ /**
2221
+ * Request body encoding for `POST`/`PUT`/`PATCH`: `json` (default) or `multipart`. Incompatible with `auth.type: aws_sigv4`.
2222
+ */
2223
+ body_mode?: string | null;
2224
+ /**
2225
+ * Computed request credential. `type` is `aws_sigv4` (with `region`, `service`, `access_key_id`, `secret_access_key` and optional `session_token`) or `gcp_service_account` (with `credentials` and `scopes`). Credential fields accept `{{secret:...}}` references.
2226
+ */
2227
+ auth?: {
2228
+ [key: string]: unknown;
2229
+ } | null;
2224
2230
  } | null;
2225
2231
  /**
2226
2232
  * MCP server connection configuration. Required for `mcp` tools.
@@ -2257,10 +2263,6 @@ type ToolResourceProperties = {
2257
2263
  pipeline?: {
2258
2264
  [key: string]: unknown;
2259
2265
  } | null;
2260
- /**
2261
- * For `discussion` tools: the ID of the discussion to invoke.
2262
- */
2263
- discussion_id?: string | null;
2264
2266
  /**
2265
2267
  * Universal JSON Logic mapping applied to the tool's raw result, for every tool type. Evaluated over `{ output: <raw result> }`, e.g. `{ "var": "output.text" }`. For `pipeline` tools this runs after the pipeline's own `output` mapping.
2266
2268
  */
@@ -4342,7 +4344,7 @@ type Task = {
4342
4344
  };
4343
4345
  assignee?: string | null;
4344
4346
  /**
4345
- * { kind, id, status } of the current state's dispatch, if any.
4347
+ * { kind, id, status } of the current state's dispatch, if any. Carries an additional `attempt` (1-based) while the state's `on_enter.retry` policy is in effect.
4346
4348
  */
4347
4349
  active_dispatch?: {
4348
4350
  [key: string]: unknown;
@@ -4385,6 +4387,10 @@ type CreateTaskRequest = {
4385
4387
  [key: string]: unknown;
4386
4388
  };
4387
4389
  assignee?: string | null;
4390
+ /**
4391
+ * Name of a declared workflow state to create the task in directly, instead of the workflow's `initial` state. Must name a state declared on the workflow, or the request is rejected with `TASK_STATE_NOT_FOUND` (400). Defaults to the `initial` state.
4392
+ */
4393
+ state?: string;
4388
4394
  };
4389
4395
  type UpdateTaskRequest = {
4390
4396
  title?: string;
@@ -4416,7 +4422,7 @@ type Tool = {
4416
4422
  /**
4417
4423
  * Tool type
4418
4424
  */
4419
- type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline' | 'discussion';
4425
+ type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline';
4420
4426
  /**
4421
4427
  * What the tool does (sent to the model)
4422
4428
  */
@@ -4430,6 +4436,13 @@ type Tool = {
4430
4436
  /**
4431
4437
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4432
4438
  *
4439
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4440
+ *
4441
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4442
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4443
+ *
4444
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4445
+ *
4433
4446
  */
4434
4447
  execute?: {
4435
4448
  [key: string]: unknown;
@@ -4461,11 +4474,7 @@ type Tool = {
4461
4474
  [key: string]: unknown;
4462
4475
  } | null;
4463
4476
  /**
4464
- * For `discussion` tools: the ID of the discussion to invoke. Calling the tool with a `topic` runs that discussion synchronously and returns its outcome + run id as the tool result.
4465
- */
4466
- discussion_id?: string | null;
4467
- /**
4468
- * Universal JSON Logic mapping applied to the tool's raw result, for every tool type (`http`, `mcp`, `soat`, `pipeline`, `client`). Evaluated over `{ output: <raw result> }`, so `{ "var": "output.text" }` extracts a bare scalar field instead of requiring a wrapping `pipeline` tool. For `pipeline` tools this runs *after* the pipeline's own `output` mapping, over that mapping's result.
4477
+ * Universal JSON Logic mapping applied to the tool's raw result, for every tool type (`http`, `mcp`, `soat`, `pipeline`, `client`). Evaluated over `{ output: <raw result>, input: <merged input> }`, so `{ "var": "output.text" }` extracts a bare scalar field instead of requiring a wrapping `pipeline` tool, and `{ "var": "input.title" }` echoes back a field of the request that produced the response. For `pipeline` tools this runs *after* the pipeline's own `output` mapping, over that mapping's result.
4469
4478
  */
4470
4479
  output_mapping?: {
4471
4480
  [key: string]: unknown;
@@ -4489,7 +4498,7 @@ type CreateToolRequest = {
4489
4498
  /**
4490
4499
  * Tool type (default http)
4491
4500
  */
4492
- type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline' | 'discussion';
4501
+ type?: 'http' | 'client' | 'mcp' | 'soat' | 'pipeline';
4493
4502
  /**
4494
4503
  * What the tool does
4495
4504
  */
@@ -4503,6 +4512,13 @@ type CreateToolRequest = {
4503
4512
  /**
4504
4513
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4505
4514
  *
4515
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4516
+ *
4517
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4518
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4519
+ *
4520
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4521
+ *
4506
4522
  */
4507
4523
  execute?: {
4508
4524
  [key: string]: unknown;
@@ -4533,10 +4549,6 @@ type CreateToolRequest = {
4533
4549
  pipeline?: {
4534
4550
  [key: string]: unknown;
4535
4551
  };
4536
- /**
4537
- * For `discussion` tools: the ID of the discussion to invoke.
4538
- */
4539
- discussion_id?: string;
4540
4552
  /**
4541
4553
  * Universal JSON Logic mapping applied to the tool's raw result. See the `output_mapping` field on the Tool schema for details.
4542
4554
  */
@@ -4558,6 +4570,13 @@ type UpdateToolRequest = {
4558
4570
  /**
4559
4571
  * Execution config for http tools. Supported fields: `url` (required), `method` (default `POST`), `headers`, and `body_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself).
4560
4572
  *
4573
+ * `auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:
4574
+ *
4575
+ * - `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.
4576
+ * - `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.
4577
+ *
4578
+ * Credential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.
4579
+ *
4561
4580
  */
4562
4581
  execute?: {
4563
4582
  [key: string]: unknown;
@@ -4585,10 +4604,6 @@ type UpdateToolRequest = {
4585
4604
  pipeline?: {
4586
4605
  [key: string]: unknown;
4587
4606
  } | null;
4588
- /**
4589
- * For `discussion` tools: the ID of the discussion to invoke.
4590
- */
4591
- discussion_id?: string | null;
4592
4607
  /**
4593
4608
  * Universal JSON Logic mapping applied to the tool's raw result. See the `output_mapping` field on the Tool schema for details.
4594
4609
  */
@@ -5219,7 +5234,7 @@ type DeliveryListResponse = {
5219
5234
  offset?: number;
5220
5235
  };
5221
5236
  /**
5222
- * A named state. Exactly one state must be `initial: true`; any number may be `terminal: true`. A `kind: human` state never dispatches — the task parks until a transition fires. `on_enter` (§5) dispatches one agent generation or orchestration run on entry.
5237
+ * A named state. Exactly one state must be `initial: true`; any number may be `terminal: true`. A `kind: human` state never dispatches — the task parks until a transition fires. `on_enter` (§5) dispatches one agent generation or orchestration run on entry, optionally under a `retry` policy (`max_attempts` 1-10, `backoff_seconds`, `backoff_multiplier`) that re-runs execution failures before `on_failure` applies.
5223
5238
  */
5224
5239
  type WorkflowState = {
5225
5240
  name: string;
@@ -5853,7 +5868,8 @@ type DeleteAgentErrors = {
5853
5868
  */
5854
5869
  404: ErrorResponse;
5855
5870
  /**
5856
- * Agent has dependent generations or traces (pass `force=true` to delete anyway)
5871
+ * Agent has dependent generations or traces (pass `force=true` to delete anyway). `error.meta` carries `generationCount` and `traceCount` so a caller can tell which one is nonzero.
5872
+ *
5857
5873
  */
5858
5874
  409: ErrorResponse;
5859
5875
  };
@@ -12917,7 +12933,7 @@ type CreateTaskData = {
12917
12933
  };
12918
12934
  type CreateTaskErrors = {
12919
12935
  /**
12920
- * Bad request (invalid payload)
12936
+ * Bad request invalid payload (`TASK_PAYLOAD_INVALID`), or `state` does not name a declared state of the workflow (`TASK_STATE_NOT_FOUND`)
12921
12937
  */
12922
12938
  400: unknown;
12923
12939
  /**
@@ -16000,7 +16016,7 @@ declare class Tasks {
16000
16016
  /**
16001
16017
  * Create a task
16002
16018
  *
16003
- * Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.
16019
+ * Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. "a new recorte for an existing theme by id"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.
16004
16020
  */
16005
16021
  static createTask<ThrowOnError extends boolean = false>(options: Options<CreateTaskData, ThrowOnError>): RequestResult<CreateTaskResponses, CreateTaskErrors, ThrowOnError>;
16006
16022
  /**
package/dist/index.mjs CHANGED
@@ -3172,7 +3172,7 @@ var Tasks = class {
3172
3172
  /**
3173
3173
  * Create a task
3174
3174
  *
3175
- * Creates a task bound to a workflow. The task is placed in the workflow's initial state and that state's `on_enter` automation fires.
3175
+ * Creates a task bound to a workflow. By default the task is placed in the workflow's initial state; passing `state` places it directly in that named state instead — an alternate entry point for starting a task mid-flow (e.g. "a new recorte for an existing theme by id"), rather than re-submitting from the initial state and hoping a guard or similarity gate recognizes it. Entering the resulting state, initial or named, behaves identically: that state's `on_enter` automation fires and its `stalled_after` clock arms.
3176
3176
  */
3177
3177
  static createTask(options) {
3178
3178
  return (options.client ?? client).post({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soat/sdk",
3
- "version": "0.18.3",
3
+ "version": "0.18.5",
4
4
  "description": "TypeScript SDK for the SOAT API",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",