@soat/cli 0.51.0 → 0.53.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.mjs +269 -34
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import * as os from "node:os";
|
|
|
13
13
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
|
-
var version = "0.
|
|
16
|
+
var version = "0.53.0";
|
|
17
17
|
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/cli-wrappers/wrappers/formations.ts
|
|
@@ -145,7 +145,7 @@ var describeDeployReason = args => {
|
|
|
145
145
|
* The server answers 2xx here on purpose — the operation ran, and partial
|
|
146
146
|
* failure is modelled on the resource — so the body's `status` is the only
|
|
147
147
|
* signal that anything went wrong. Turning it into a non-zero exit is what
|
|
148
|
-
* stops `&&` chains from reporting a deploy that deployed nothing
|
|
148
|
+
* stops `&&` chains from reporting a deploy that deployed nothing.
|
|
149
149
|
*/
|
|
150
150
|
var describeFailedDeploy = args => {
|
|
151
151
|
const {
|
|
@@ -832,7 +832,7 @@ var routes = {
|
|
|
832
832
|
"in": "body"
|
|
833
833
|
}, {
|
|
834
834
|
"name": "boundary_policy",
|
|
835
|
-
"description": "",
|
|
835
|
+
"description": "Restricts which SOAT actions the agent may invoke. Evaluated as the intersection with the caller's own policy, so it can only narrow.",
|
|
836
836
|
"required": false,
|
|
837
837
|
"type": "object",
|
|
838
838
|
"in": "body"
|
|
@@ -996,7 +996,7 @@ var routes = {
|
|
|
996
996
|
"in": "body"
|
|
997
997
|
}, {
|
|
998
998
|
"name": "boundary_policy",
|
|
999
|
-
"description": "",
|
|
999
|
+
"description": "Restricts which SOAT actions the agent may invoke. Evaluated as the intersection with the caller's own policy, so it can only narrow.",
|
|
1000
1000
|
"required": false,
|
|
1001
1001
|
"type": "object",
|
|
1002
1002
|
"in": "body"
|
|
@@ -1144,7 +1144,7 @@ var routes = {
|
|
|
1144
1144
|
"in": "body"
|
|
1145
1145
|
}, {
|
|
1146
1146
|
"name": "boundary_policy",
|
|
1147
|
-
"description": "",
|
|
1147
|
+
"description": "Restricts which SOAT actions the agent may invoke. Evaluated as the intersection with the caller's own policy, so it can only narrow.",
|
|
1148
1148
|
"required": false,
|
|
1149
1149
|
"type": "object",
|
|
1150
1150
|
"in": "body"
|
|
@@ -1306,12 +1306,6 @@ var routes = {
|
|
|
1306
1306
|
"required": false,
|
|
1307
1307
|
"type": "object",
|
|
1308
1308
|
"in": "body"
|
|
1309
|
-
}, {
|
|
1310
|
-
"name": "extract",
|
|
1311
|
-
"description": "Per-turn override of the agent's `knowledge_config.extraction` default. Omit to follow the agent's stored config. Set `false` to suppress automatic memory store extraction for this turn (e.g. an operational or tool-listing turn that would only add noise to a curated memory store). Set `true` to force extraction on for this turn even when the agent does not enable it by default, provided the agent has a `write_memory_store_id`. Has no effect on streaming or `requires_action` turns, which never extract.",
|
|
1312
|
-
"required": false,
|
|
1313
|
-
"type": "boolean",
|
|
1314
|
-
"in": "body"
|
|
1315
1309
|
}, {
|
|
1316
1310
|
"name": "knowledge_config",
|
|
1317
1311
|
"description": "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.",
|
|
@@ -4321,7 +4315,7 @@ var routes = {
|
|
|
4321
4315
|
"list-generations": {
|
|
4322
4316
|
serviceClass: "Generations",
|
|
4323
4317
|
operationId: "listGenerations",
|
|
4324
|
-
description: "Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status.
|
|
4318
|
+
description: "Returns generations the caller can access, optionally filtered by agent, trace, orchestration run, node, and status. The generations of one trace are the `trace_id` filter. Filtering by `orchestration_run_id` is the supported way to get from an orchestration run to the generations its agent nodes produced: a node execution record carries no generation id, so the pointer lives here, alongside the run's other attribution columns.",
|
|
4325
4319
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/generations",
|
|
4326
4320
|
httpMethod: "get",
|
|
4327
4321
|
pathParams: [],
|
|
@@ -4990,12 +4984,6 @@ var routes = {
|
|
|
4990
4984
|
"required": false,
|
|
4991
4985
|
"type": "number",
|
|
4992
4986
|
"in": "body"
|
|
4993
|
-
}, {
|
|
4994
|
-
"name": "min_score",
|
|
4995
|
-
"description": "Deprecated alias for `min_similarity`, with identical behavior. While ranking was single-signal `score` equaled `similarity_score`, so this has only ever filtered cosine and an existing value keeps returning the same results. `min_similarity` wins when both are sent. Removed in v2.",
|
|
4996
|
-
"required": false,
|
|
4997
|
-
"type": "number",
|
|
4998
|
-
"in": "body"
|
|
4999
4987
|
}, {
|
|
5000
4988
|
"name": "rrf_k",
|
|
5001
4989
|
"description": "The `k` in the reciprocal rank fusion term `1 / (k + rank)`, which sets how steeply a result's contribution decays with its position in each ranked list. A smaller value weights the very top of each list more heavily. Defaults to the deployment's `KNOWLEDGE_RRF_K`, itself 60 by default. Only applies when `query` is provided.",
|
|
@@ -5004,7 +4992,7 @@ var routes = {
|
|
|
5004
4992
|
"in": "body"
|
|
5005
4993
|
}, {
|
|
5006
4994
|
"name": "recency_half_life_days",
|
|
5007
|
-
"description": "Half-life, in days, of a recency decay applied to **memory store** results after fusion: a result's `score` is multiplied by `2 ^ (-age_in_days / recency_half_life_days)`, where age is measured from its `updated_at`. Document results are never decayed. `0` — the default, and the default of the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` — disables the blend entirely; it is a switch, not a lower bound, and sending `0` turns off a deployment-wide decay for this one request. Accepts fractions (`0.5` is twelve hours). How many ranks a given half-life costs depends on `rrf_k`. Only applies when `query` is provided.",
|
|
4995
|
+
"description": "Half-life, in days, of a recency decay applied to **memory store** results after fusion: a result's `score` is multiplied by `2 ^ (-age_in_days / recency_half_life_days)`, where age is measured from its `updated_at`. Document results are never decayed. `0` — the default, and the default of the deployment's `KNOWLEDGE_RECENCY_HALF_LIFE_DAYS` — disables the blend entirely; it is a switch, not a lower bound, and sending `0` turns off a deployment-wide decay for this one request. Accepts fractions (`0.5` is twelve hours). How many ranks a given half-life costs depends on `rrf_k`. Only applies when `query` is provided. **No value is known to be safe in general**: every half-life measured against the reference corpus that lifted recency-sensitive queries also cost relevance-sensitive ones, which is why this ships disabled. Measure against your own corpus before setting it — see the Retrieval Quality guide.",
|
|
5008
4996
|
"required": false,
|
|
5009
4997
|
"type": "number",
|
|
5010
4998
|
"in": "body"
|
|
@@ -5014,6 +5002,18 @@ var routes = {
|
|
|
5014
5002
|
"required": false,
|
|
5015
5003
|
"type": "integer",
|
|
5016
5004
|
"in": "body"
|
|
5005
|
+
}, {
|
|
5006
|
+
"name": "include_documents",
|
|
5007
|
+
"description": "Set `false` to leave the document store out of this search. A `query` names no store, so it reaches both; the store-specific filters narrow *within* a store rather than choosing between them. This is the switch, and a filter naming the other store never overrides it. `false` for both stores is `400`.",
|
|
5008
|
+
"required": false,
|
|
5009
|
+
"type": "boolean",
|
|
5010
|
+
"in": "body"
|
|
5011
|
+
}, {
|
|
5012
|
+
"name": "include_memories",
|
|
5013
|
+
"description": "Set `false` to leave the memory store out of this search. The mirror of `include_documents`, for a caller that wants documents alone.",
|
|
5014
|
+
"required": false,
|
|
5015
|
+
"type": "boolean",
|
|
5016
|
+
"in": "body"
|
|
5017
5017
|
}, {
|
|
5018
5018
|
"name": "memory_store_ids",
|
|
5019
5019
|
"description": "Search memories within these specific memory stores",
|
|
@@ -5034,7 +5034,7 @@ var routes = {
|
|
|
5034
5034
|
"in": "body"
|
|
5035
5035
|
}, {
|
|
5036
5036
|
"name": "tags",
|
|
5037
|
-
"description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match).
|
|
5037
|
+
"description": "Filter results to documents and memories whose `tags` contain every one of these key-value pairs (exact, case-sensitive match). Scopes both stores, so passing it alone searches both — as `query` does. For memories it matches at memory granularity: a memory is returned when its parent memory store's tags match or its own do.",
|
|
5038
5038
|
"required": false,
|
|
5039
5039
|
"type": "object",
|
|
5040
5040
|
"in": "body"
|
|
@@ -5083,7 +5083,7 @@ var routes = {
|
|
|
5083
5083
|
"create-memory": {
|
|
5084
5084
|
serviceClass: "Memories",
|
|
5085
5085
|
operationId: "createMemory",
|
|
5086
|
-
description: "Writes a fact to the specified memory store through the standard write algorithm: the content is embedded (or matched to text the store already holds), compared against the most similar currently-valid memory, and resolved to exactly one of three outcomes — `skipped` at or above `duplicate_threshold`, `superseded` at or above `supersede_threshold`, `created` below it. Every call records one assertion, whatever the outcome.",
|
|
5086
|
+
description: "Writes a fact to the specified memory store through the standard write algorithm: the content is embedded (or matched to text the store already holds), compared against the most similar currently-valid memory, and resolved to exactly one of three outcomes — `skipped` at or above `duplicate_threshold`, `superseded` at or above `supersede_threshold`, `created` below it. `supersedes` overrides that comparison entirely, retiring the memory it names. Every call records one assertion, whatever the outcome.",
|
|
5087
5087
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
|
|
5088
5088
|
httpMethod: "post",
|
|
5089
5089
|
pathParams: [],
|
|
@@ -5124,6 +5124,12 @@ var routes = {
|
|
|
5124
5124
|
"required": false,
|
|
5125
5125
|
"type": "object",
|
|
5126
5126
|
"in": "body"
|
|
5127
|
+
}, {
|
|
5128
|
+
"name": "supersedes",
|
|
5129
|
+
"description": "The memory this write replaces, named outright. The declaration outranks the thresholds in both directions: the target is retired and the write returns `superseded` however similar or distant the two texts are. This is what reaches a contradiction cosine cannot see (\"The office is in Lisbon\" then \"We closed the Lisbon office\"). The target must be a still-valid memory in the same memory store, and the caller needs `memories:UpdateMemory` on it as well as `memories:CreateMemory` on the store.",
|
|
5130
|
+
"required": false,
|
|
5131
|
+
"type": "string",
|
|
5132
|
+
"in": "body"
|
|
5127
5133
|
}, {
|
|
5128
5134
|
"name": "duplicate_threshold",
|
|
5129
5135
|
"description": "Cosine similarity at or above which the incoming content is a duplicate of an existing memory and the write is skipped. Overrides the store's `duplicate_threshold` for this call; falls back to the store's value, then to `0.95`.",
|
|
@@ -5280,6 +5286,224 @@ var routes = {
|
|
|
5280
5286
|
"in": "path"
|
|
5281
5287
|
}]
|
|
5282
5288
|
},
|
|
5289
|
+
"list-memory-rules": {
|
|
5290
|
+
serviceClass: "MemoryRules",
|
|
5291
|
+
operationId: "listMemoryRules",
|
|
5292
|
+
description: "Returns memory rules, newest first. Narrow to one store with `memory_store_id` — that form is authorized against the store itself, so it answers \"what feeds this store?\" in one call.",
|
|
5293
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memory-rules",
|
|
5294
|
+
httpMethod: "get",
|
|
5295
|
+
pathParams: [],
|
|
5296
|
+
queryParams: ["memory_store_id", "project_id", "limit", "offset"],
|
|
5297
|
+
flags: [{
|
|
5298
|
+
"name": "memory_store_id",
|
|
5299
|
+
"description": "Only the rules of this memory store",
|
|
5300
|
+
"required": false,
|
|
5301
|
+
"type": "string",
|
|
5302
|
+
"in": "query"
|
|
5303
|
+
}, {
|
|
5304
|
+
"name": "project_id",
|
|
5305
|
+
"description": "Project ID (required if not using project key auth)",
|
|
5306
|
+
"required": false,
|
|
5307
|
+
"type": "string",
|
|
5308
|
+
"in": "query"
|
|
5309
|
+
}, {
|
|
5310
|
+
"name": "limit",
|
|
5311
|
+
"description": "Number of results per page",
|
|
5312
|
+
"required": false,
|
|
5313
|
+
"type": "integer",
|
|
5314
|
+
"in": "query"
|
|
5315
|
+
}, {
|
|
5316
|
+
"name": "offset",
|
|
5317
|
+
"description": "Number of results to skip",
|
|
5318
|
+
"required": false,
|
|
5319
|
+
"type": "integer",
|
|
5320
|
+
"in": "query"
|
|
5321
|
+
}]
|
|
5322
|
+
},
|
|
5323
|
+
"create-memory-rule": {
|
|
5324
|
+
serviceClass: "MemoryRules",
|
|
5325
|
+
operationId: "createMemoryRule",
|
|
5326
|
+
description: "Creates an ingestion rule on a memory store. With neither `agent_id` nor `tool_id` the built-in extractor runs, configurable through `prompt`, `ai_provider_id` and `model`.",
|
|
5327
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memory-rules",
|
|
5328
|
+
httpMethod: "post",
|
|
5329
|
+
pathParams: [],
|
|
5330
|
+
queryParams: [],
|
|
5331
|
+
flags: [{
|
|
5332
|
+
"name": "memory_store_id",
|
|
5333
|
+
"description": "The destination store, and the rule's owning scope",
|
|
5334
|
+
"required": true,
|
|
5335
|
+
"type": "string",
|
|
5336
|
+
"in": "body"
|
|
5337
|
+
}, {
|
|
5338
|
+
"name": "on",
|
|
5339
|
+
"description": "The event a firing reads. `agents.generation.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversations.message.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
5340
|
+
"required": true,
|
|
5341
|
+
"type": "string",
|
|
5342
|
+
"in": "body"
|
|
5343
|
+
}, {
|
|
5344
|
+
"name": "source_agent_ids",
|
|
5345
|
+
"description": "Agents whose turns this rule reads. Omit or send `null` for every agent in the store's project.",
|
|
5346
|
+
"required": false,
|
|
5347
|
+
"type": "array",
|
|
5348
|
+
"in": "body"
|
|
5349
|
+
}, {
|
|
5350
|
+
"name": "agent_id",
|
|
5351
|
+
"description": "Handler agent (mutually exclusive with tool_id)",
|
|
5352
|
+
"required": false,
|
|
5353
|
+
"type": "string",
|
|
5354
|
+
"in": "body"
|
|
5355
|
+
}, {
|
|
5356
|
+
"name": "tool_id",
|
|
5357
|
+
"description": "Handler tool (mutually exclusive with agent_id)",
|
|
5358
|
+
"required": false,
|
|
5359
|
+
"type": "string",
|
|
5360
|
+
"in": "body"
|
|
5361
|
+
}, {
|
|
5362
|
+
"name": "action",
|
|
5363
|
+
"description": "Operation id, for a tool handler",
|
|
5364
|
+
"required": false,
|
|
5365
|
+
"type": "string",
|
|
5366
|
+
"in": "body"
|
|
5367
|
+
}, {
|
|
5368
|
+
"name": "preset_parameters",
|
|
5369
|
+
"description": "Merged into a tool handler's input before invocation. The turn's own fields are reserved and win.",
|
|
5370
|
+
"required": false,
|
|
5371
|
+
"type": "object",
|
|
5372
|
+
"in": "body"
|
|
5373
|
+
}, {
|
|
5374
|
+
"name": "prompt",
|
|
5375
|
+
"description": "Replaces the built-in extractor's task instructions. The JSON response contract and the transcript are always appended. Not valid with a handler.",
|
|
5376
|
+
"required": false,
|
|
5377
|
+
"type": "string",
|
|
5378
|
+
"in": "body"
|
|
5379
|
+
}, {
|
|
5380
|
+
"name": "ai_provider_id",
|
|
5381
|
+
"description": "Provider override for the built-in extractor's completion. Not valid with a handler.",
|
|
5382
|
+
"required": false,
|
|
5383
|
+
"type": "string",
|
|
5384
|
+
"in": "body"
|
|
5385
|
+
}, {
|
|
5386
|
+
"name": "model",
|
|
5387
|
+
"description": "Model override for the built-in extractor's completion. Not valid with a handler.",
|
|
5388
|
+
"required": false,
|
|
5389
|
+
"type": "string",
|
|
5390
|
+
"in": "body"
|
|
5391
|
+
}, {
|
|
5392
|
+
"name": "enabled",
|
|
5393
|
+
"description": "A disabled rule is kept and never fires",
|
|
5394
|
+
"required": false,
|
|
5395
|
+
"type": "boolean",
|
|
5396
|
+
"in": "body"
|
|
5397
|
+
}]
|
|
5398
|
+
},
|
|
5399
|
+
"get-memory-rule": {
|
|
5400
|
+
serviceClass: "MemoryRules",
|
|
5401
|
+
operationId: "getMemoryRule",
|
|
5402
|
+
description: "Returns a specific memory rule",
|
|
5403
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memory-rules",
|
|
5404
|
+
httpMethod: "get",
|
|
5405
|
+
pathParams: ["memory_rule_id"],
|
|
5406
|
+
queryParams: [],
|
|
5407
|
+
flags: [{
|
|
5408
|
+
"name": "memory_rule_id",
|
|
5409
|
+
"description": "Memory rule ID",
|
|
5410
|
+
"required": true,
|
|
5411
|
+
"type": "string",
|
|
5412
|
+
"in": "path"
|
|
5413
|
+
}]
|
|
5414
|
+
},
|
|
5415
|
+
"update-memory-rule": {
|
|
5416
|
+
serviceClass: "MemoryRules",
|
|
5417
|
+
operationId: "updateMemoryRule",
|
|
5418
|
+
description: "Updates a memory rule. Validation runs against the rule as it would stand after the change, so a one-field update cannot pair a handler with a stored extractor override from the side.",
|
|
5419
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memory-rules",
|
|
5420
|
+
httpMethod: "patch",
|
|
5421
|
+
pathParams: ["memory_rule_id"],
|
|
5422
|
+
queryParams: [],
|
|
5423
|
+
flags: [{
|
|
5424
|
+
"name": "memory_rule_id",
|
|
5425
|
+
"description": "Memory rule ID",
|
|
5426
|
+
"required": true,
|
|
5427
|
+
"type": "string",
|
|
5428
|
+
"in": "path"
|
|
5429
|
+
}, {
|
|
5430
|
+
"name": "on",
|
|
5431
|
+
"description": "The event a firing reads. `agents.generation.completed` fires once per completed turn whatever the transport, and is the only event the built-in extractor may bind to. `conversations.message.generated` fires per persisted assistant reply and is conversation-backed, so it is for custom handlers.",
|
|
5432
|
+
"required": false,
|
|
5433
|
+
"type": "string",
|
|
5434
|
+
"in": "body"
|
|
5435
|
+
}, {
|
|
5436
|
+
"name": "source_agent_ids",
|
|
5437
|
+
"description": "Send `null` to widen the rule to every agent in the project",
|
|
5438
|
+
"required": false,
|
|
5439
|
+
"type": "array",
|
|
5440
|
+
"in": "body"
|
|
5441
|
+
}, {
|
|
5442
|
+
"name": "agent_id",
|
|
5443
|
+
"description": "",
|
|
5444
|
+
"required": false,
|
|
5445
|
+
"type": "string",
|
|
5446
|
+
"in": "body"
|
|
5447
|
+
}, {
|
|
5448
|
+
"name": "tool_id",
|
|
5449
|
+
"description": "",
|
|
5450
|
+
"required": false,
|
|
5451
|
+
"type": "string",
|
|
5452
|
+
"in": "body"
|
|
5453
|
+
}, {
|
|
5454
|
+
"name": "action",
|
|
5455
|
+
"description": "",
|
|
5456
|
+
"required": false,
|
|
5457
|
+
"type": "string",
|
|
5458
|
+
"in": "body"
|
|
5459
|
+
}, {
|
|
5460
|
+
"name": "preset_parameters",
|
|
5461
|
+
"description": "",
|
|
5462
|
+
"required": false,
|
|
5463
|
+
"type": "object",
|
|
5464
|
+
"in": "body"
|
|
5465
|
+
}, {
|
|
5466
|
+
"name": "prompt",
|
|
5467
|
+
"description": "",
|
|
5468
|
+
"required": false,
|
|
5469
|
+
"type": "string",
|
|
5470
|
+
"in": "body"
|
|
5471
|
+
}, {
|
|
5472
|
+
"name": "ai_provider_id",
|
|
5473
|
+
"description": "",
|
|
5474
|
+
"required": false,
|
|
5475
|
+
"type": "string",
|
|
5476
|
+
"in": "body"
|
|
5477
|
+
}, {
|
|
5478
|
+
"name": "model",
|
|
5479
|
+
"description": "",
|
|
5480
|
+
"required": false,
|
|
5481
|
+
"type": "string",
|
|
5482
|
+
"in": "body"
|
|
5483
|
+
}, {
|
|
5484
|
+
"name": "enabled",
|
|
5485
|
+
"description": "",
|
|
5486
|
+
"required": false,
|
|
5487
|
+
"type": "boolean",
|
|
5488
|
+
"in": "body"
|
|
5489
|
+
}]
|
|
5490
|
+
},
|
|
5491
|
+
"delete-memory-rule": {
|
|
5492
|
+
serviceClass: "MemoryRules",
|
|
5493
|
+
operationId: "deleteMemoryRule",
|
|
5494
|
+
description: "Deletes a memory rule. The assertions it wrote are kept; their `rule_id` becomes null.",
|
|
5495
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memory-rules",
|
|
5496
|
+
httpMethod: "delete",
|
|
5497
|
+
pathParams: ["memory_rule_id"],
|
|
5498
|
+
queryParams: [],
|
|
5499
|
+
flags: [{
|
|
5500
|
+
"name": "memory_rule_id",
|
|
5501
|
+
"description": "Memory rule ID",
|
|
5502
|
+
"required": true,
|
|
5503
|
+
"type": "string",
|
|
5504
|
+
"in": "path"
|
|
5505
|
+
}]
|
|
5506
|
+
},
|
|
5283
5507
|
"list-memory-stores": {
|
|
5284
5508
|
serviceClass: "MemoryStores",
|
|
5285
5509
|
operationId: "listMemoryStores",
|
|
@@ -6169,7 +6393,7 @@ var routes = {
|
|
|
6169
6393
|
"list-policies": {
|
|
6170
6394
|
serviceClass: "Policies",
|
|
6171
6395
|
operationId: "listPolicies",
|
|
6172
|
-
description: "Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user
|
|
6396
|
+
description: "Returns global policies. Requires admin role. Pass user_id to list only the policies attached to that user.",
|
|
6173
6397
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
|
|
6174
6398
|
httpMethod: "get",
|
|
6175
6399
|
pathParams: [],
|
|
@@ -7526,7 +7750,7 @@ var routes = {
|
|
|
7526
7750
|
"in": "body"
|
|
7527
7751
|
}, {
|
|
7528
7752
|
"name": "context_keys",
|
|
7529
|
-
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Soat-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded
|
|
7753
|
+
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Soat-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded. When set, only the listed keys are, so a per-user credential in `tool_context` can be confined to the tools that need it; `[]` forwards none. The server-pinned identity keys (`session_id`, `actor_id`, `actor_external_id`) are always forwarded. A key consumed by a `{{context:<key>}}` token in this tool's own headers is substituted regardless of this list — the tool declared that header itself.",
|
|
7530
7754
|
"required": false,
|
|
7531
7755
|
"type": "array",
|
|
7532
7756
|
"in": "body"
|
|
@@ -7636,7 +7860,7 @@ var routes = {
|
|
|
7636
7860
|
"in": "body"
|
|
7637
7861
|
}, {
|
|
7638
7862
|
"name": "context_keys",
|
|
7639
|
-
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Soat-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded
|
|
7863
|
+
"description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Soat-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded. When set, only the listed keys are, so a per-user credential in `tool_context` can be confined to the tools that need it; `[]` forwards none. The server-pinned identity keys (`session_id`, `actor_id`, `actor_external_id`) are always forwarded. A key consumed by a `{{context:<key>}}` token in this tool's own headers is substituted regardless of this list — the tool declared that header itself.",
|
|
7640
7864
|
"required": false,
|
|
7641
7865
|
"type": "array",
|
|
7642
7866
|
"in": "body"
|
|
@@ -9159,7 +9383,7 @@ var kebabToSnake = s => {
|
|
|
9159
9383
|
* (e.g. project_id → project-id). Kebab-case is the documented canonical CLI
|
|
9160
9384
|
* flag convention (see the generated docs pages and tutorials); the parser is
|
|
9161
9385
|
* lenient and accepts snake/kebab/camel alike via `toCanonical`, so this only
|
|
9162
|
-
* affects how flags are printed
|
|
9386
|
+
* affects how flags are printed.
|
|
9163
9387
|
*/
|
|
9164
9388
|
var toKebab = s => {
|
|
9165
9389
|
return s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/_/g, "-").toLowerCase();
|
|
@@ -9227,14 +9451,27 @@ var findUnknownFlags = args => {
|
|
|
9227
9451
|
|
|
9228
9452
|
//#endregion
|
|
9229
9453
|
//#region src/webhookSignature.ts
|
|
9454
|
+
/**
|
|
9455
|
+
* Verification of the signature on a payload the local `soat listen` listener
|
|
9456
|
+
* receives. The listener takes two kinds, both under `X-Soat-Signature`,
|
|
9457
|
+
* distinguished by the value's own prefix rather than by header name:
|
|
9458
|
+
*
|
|
9459
|
+
* - A **webhook delivery** carries `t=<unix>,v1=<hex>` — a digest over
|
|
9460
|
+
* `<t>.<raw body>`, so the timestamp is authenticated and a subscriber can
|
|
9461
|
+
* bound a replay by age.
|
|
9462
|
+
* - A **trigger** payload carries `sha256=<hex>`, a digest over the bare
|
|
9463
|
+
* body, which is the scheme a webhook-type trigger's sender signs with.
|
|
9464
|
+
*/
|
|
9465
|
+
/** Only the timestamped scheme starts this way; everything else is bare-body. */
|
|
9466
|
+
var TIMESTAMPED_PREFIX = "t=";
|
|
9230
9467
|
var digestMatches = args => {
|
|
9231
9468
|
const expectedBuffer = Buffer.from(args.expected, "utf8");
|
|
9232
9469
|
const actualBuffer = Buffer.from(args.actual, "utf8");
|
|
9233
9470
|
if (expectedBuffer.length !== actualBuffer.length) return false;
|
|
9234
9471
|
return timingSafeEqual(expectedBuffer, actualBuffer);
|
|
9235
9472
|
};
|
|
9236
|
-
/**
|
|
9237
|
-
var
|
|
9473
|
+
/** The trigger scheme: `sha256=<hex>` over the bare body. */
|
|
9474
|
+
var verifyBareBodySignature = args => {
|
|
9238
9475
|
const expected = createHmac("sha256", args.secret).update(args.payload).digest("hex");
|
|
9239
9476
|
return digestMatches({
|
|
9240
9477
|
expected,
|
|
@@ -9271,10 +9508,8 @@ var headerValue = value => {
|
|
|
9271
9508
|
* Picks the scheme a delivery used and verifies it, when a secret is supplied.
|
|
9272
9509
|
*/
|
|
9273
9510
|
var inspectDeliverySignature = args => {
|
|
9274
|
-
const
|
|
9275
|
-
const
|
|
9276
|
-
const scheme = timestamped ? "v2" : "v1";
|
|
9277
|
-
const signature = timestamped || legacy;
|
|
9511
|
+
const signature = headerValue(args.headers["x-soat-signature"]);
|
|
9512
|
+
const scheme = signature.startsWith(TIMESTAMPED_PREFIX) ? "v2" : "v1";
|
|
9278
9513
|
if (!args.secret) return {
|
|
9279
9514
|
signature,
|
|
9280
9515
|
scheme,
|
|
@@ -9286,11 +9521,11 @@ var inspectDeliverySignature = args => {
|
|
|
9286
9521
|
valid: scheme === "v2" ? verifyTimestampedSignature({
|
|
9287
9522
|
secret: args.secret,
|
|
9288
9523
|
payload: args.payload,
|
|
9289
|
-
header:
|
|
9290
|
-
}) :
|
|
9524
|
+
header: signature
|
|
9525
|
+
}) : verifyBareBodySignature({
|
|
9291
9526
|
secret: args.secret,
|
|
9292
9527
|
payload: args.payload,
|
|
9293
|
-
header:
|
|
9528
|
+
header: signature
|
|
9294
9529
|
})
|
|
9295
9530
|
};
|
|
9296
9531
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "CLI for SOAT — open-source infrastructure for production-ready AI agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@inquirer/input": "^5.1.6",
|
|
24
24
|
"@inquirer/password": "^5.2.2",
|
|
25
|
-
"@soat/sdk": "0.
|
|
25
|
+
"@soat/sdk": "0.53.0",
|
|
26
26
|
"@ttoss/logger": "^0.8.20",
|
|
27
27
|
"commander": "^15.0.0",
|
|
28
28
|
"js-yaml": "^5.4.2"
|