@soat/cli 0.5.4 → 0.5.6

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.
Files changed (3) hide show
  1. package/bin/soat +3 -1
  2. package/dist/esm/index.js +2525 -299
  3. package/package.json +7 -5
package/dist/esm/index.js CHANGED
@@ -8,20 +8,21 @@ var __name = (target, value) => __defProp(target, "name", {
8
8
  // src/index.ts
9
9
  import { createHmac, timingSafeEqual } from "crypto";
10
10
  import { createServer } from "http";
11
- import input from "@inquirer/input";
12
- import password from "@inquirer/password";
11
+ import * as nodePath from "path";
12
+ import { fileURLToPath } from "url";
13
13
  import * as sdk from "@soat/sdk";
14
14
  import { program } from "commander";
15
15
 
16
16
  // package.json
17
17
  var package_default = {
18
18
  name: "@soat/cli",
19
- version: "0.5.4",
19
+ version: "0.5.6",
20
20
  type: "module",
21
21
  scripts: {
22
22
  generate: "tsx scripts/generate.ts",
23
- lint: "eslint src",
24
- typecheck: "tsc --noEmit",
23
+ lint: "eslint src tests",
24
+ test: "jest --config tests/unit/jest.config.ts --coverage=false",
25
+ typecheck: "tsc --noEmit && tsc --noEmit -p tests/tsconfig.json",
25
26
  build: "pnpm generate && tsup"
26
27
  },
27
28
  dependencies: {
@@ -29,15 +30,16 @@ var package_default = {
29
30
  "@inquirer/password": "^5.0.12",
30
31
  "@soat/sdk": "workspace:*",
31
32
  "@ttoss/logger": "^0.8.10",
32
- commander: "^14.0.3"
33
+ commander: "^14.0.3",
34
+ "js-yaml": "^4.1.1"
33
35
  },
34
36
  devDependencies: {
35
37
  "@ttoss/config": "^1.37.10",
38
+ "@ttoss/test-utils": "^4.2.10",
36
39
  "@types/jest": "^30.0.0",
37
40
  "@types/js-yaml": "^4.0.9",
38
41
  "@types/node": "^24",
39
42
  jest: "^30.3.0",
40
- "js-yaml": "^4.1.1",
41
43
  tsup: "^8.5.1",
42
44
  tsx: "^4.21.0"
43
45
  },
@@ -55,15 +57,268 @@ var package_default = {
55
57
  }
56
58
  };
57
59
 
58
- // src/config.ts
60
+ // src/cli-wrappers/wrappers/agentFormations.ts
59
61
  import * as fs from "fs";
62
+ import yaml from "js-yaml";
63
+ var FORMATION_COMMANDS = ["validate-agent-formation", "plan-agent-formation", "create-agent-formation", "update-agent-formation"];
64
+ var TEMPLATE_PATH_FLAG = "template-path";
65
+ var TEMPLATE_FILE_FLAG = "template-file";
66
+ var ENV_FILE_FLAG = "env-file";
67
+ var PARAMETER_FLAG = "parameter";
68
+ var TEMPLATE_FIELD = "template";
69
+ var PARAMETERS_FIELD = "parameters";
70
+ var parseEnvFile = /* @__PURE__ */__name(args => {
71
+ const {
72
+ envPath
73
+ } = args;
74
+ let content;
75
+ try {
76
+ content = fs.readFileSync(envPath, "utf8");
77
+ } catch {
78
+ throw new Error(`Unable to read env file: ${envPath}`);
79
+ }
80
+ const vars = {};
81
+ for (const rawLine of content.split(/\r?\n/)) {
82
+ const line = rawLine.trim();
83
+ if (!line || line.startsWith("#")) continue;
84
+ const withoutExport = line.startsWith("export ") ? line.slice("export ".length).trim() : line;
85
+ const eqIdx = withoutExport.indexOf("=");
86
+ if (eqIdx <= 0) continue;
87
+ const key = withoutExport.slice(0, eqIdx).trim();
88
+ let value = withoutExport.slice(eqIdx + 1).trim();
89
+ if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
90
+ value = value.slice(1, -1);
91
+ }
92
+ vars[key] = value;
93
+ }
94
+ return vars;
95
+ }, "parseEnvFile");
96
+ var readTemplateFromPath = /* @__PURE__ */__name(args => {
97
+ const {
98
+ templatePath
99
+ } = args;
100
+ let content;
101
+ try {
102
+ content = fs.readFileSync(templatePath, "utf8");
103
+ } catch {
104
+ throw new Error(`Unable to read template file: ${templatePath}`);
105
+ }
106
+ const trimmed = content.trim();
107
+ if (!trimmed) {
108
+ throw new Error(`Template file is empty: ${templatePath}`);
109
+ }
110
+ try {
111
+ return JSON.parse(trimmed);
112
+ } catch {}
113
+ try {
114
+ return yaml.load(trimmed);
115
+ } catch {
116
+ throw new Error(`Template file must contain valid JSON or YAML: ${templatePath}`);
117
+ }
118
+ }, "readTemplateFromPath");
119
+ var resolveEnvRef = /* @__PURE__ */__name(args => {
120
+ const {
121
+ value,
122
+ env
123
+ } = args;
124
+ const simple = /^\$([A-Za-z_][A-Za-z0-9_]*)$/.exec(value);
125
+ if (simple) {
126
+ const resolved = env[simple[1]];
127
+ if (resolved === void 0) {
128
+ throw new Error(`Missing environment variable: ${simple[1]}`);
129
+ }
130
+ return resolved;
131
+ }
132
+ const bracketed = /^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/.exec(value);
133
+ if (bracketed) {
134
+ const resolved = env[bracketed[1]];
135
+ if (resolved === void 0) {
136
+ throw new Error(`Missing environment variable: ${bracketed[1]}`);
137
+ }
138
+ return resolved;
139
+ }
140
+ return value;
141
+ }, "resolveEnvRef");
142
+ var agentFormationsWrapper = {
143
+ id: "agent-formations-wrapper",
144
+ commands: FORMATION_COMMANDS,
145
+ helpFlags: [{
146
+ name: "template-path",
147
+ description: "Path to template file (JSON or YAML). Alias: --template-file",
148
+ required: false,
149
+ type: "string"
150
+ }, {
151
+ name: "parameter",
152
+ description: "Template parameter in key=value format (repeatable). Values may reference env vars ($VAR)",
153
+ required: false,
154
+ type: "string"
155
+ }, {
156
+ name: "env-file",
157
+ description: "Path to .env file for parameter variable substitution",
158
+ required: false,
159
+ type: "string"
160
+ }],
161
+ // eslint-disable-next-line complexity
162
+ apply: /* @__PURE__ */__name(({
163
+ context
164
+ }) => {
165
+ const forcedBody = {};
166
+ const flags = {
167
+ single: {
168
+ ...context.parsedFlags.single
169
+ },
170
+ repeated: {
171
+ ...context.parsedFlags.repeated
172
+ }
173
+ };
174
+ const templatePath = flags.single[TEMPLATE_PATH_FLAG];
175
+ const templateFile = flags.single[TEMPLATE_FILE_FLAG];
176
+ const templateInline = flags.single[TEMPLATE_FIELD];
177
+ const parametersInline = flags.single[PARAMETERS_FIELD];
178
+ const parameterValues = flags.repeated[PARAMETER_FLAG] ?? [];
179
+ const envFile = flags.single[ENV_FILE_FLAG];
180
+ if (templatePath && templateFile) {
181
+ throw new Error(`Use either --${TEMPLATE_PATH_FLAG} or --${TEMPLATE_FILE_FLAG}, not both.`);
182
+ }
183
+ const effectiveTemplatePath = templatePath ?? templateFile;
184
+ if (templateInline && effectiveTemplatePath) {
185
+ throw new Error(`Use either --${TEMPLATE_FIELD} or --${TEMPLATE_PATH_FLAG}, not both.`);
186
+ }
187
+ if (parametersInline && parameterValues.length > 0) {
188
+ throw new Error(`Use either --${PARAMETERS_FIELD} or repeatable --${PARAMETER_FLAG}, not both.`);
189
+ }
190
+ let envFileVars = {};
191
+ if (envFile) {
192
+ envFileVars = parseEnvFile({
193
+ envPath: envFile
194
+ });
195
+ }
196
+ const mergedEnv = {
197
+ ...envFileVars,
198
+ ...process.env
199
+ };
200
+ if (effectiveTemplatePath) {
201
+ forcedBody[TEMPLATE_FIELD] = readTemplateFromPath({
202
+ templatePath: effectiveTemplatePath
203
+ });
204
+ }
205
+ if (parameterValues.length > 0) {
206
+ const resolvedParameters = {};
207
+ for (const pair of parameterValues) {
208
+ const eqIdx = pair.indexOf("=");
209
+ if (eqIdx <= 0) {
210
+ throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Expected key=value.`);
211
+ }
212
+ const key = pair.slice(0, eqIdx).trim();
213
+ const rawValue = pair.slice(eqIdx + 1);
214
+ if (!key) {
215
+ throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
216
+ }
217
+ resolvedParameters[key] = resolveEnvRef({
218
+ value: rawValue,
219
+ env: mergedEnv
220
+ });
221
+ }
222
+ forcedBody[PARAMETERS_FIELD] = resolvedParameters;
223
+ }
224
+ delete flags.single[TEMPLATE_PATH_FLAG];
225
+ delete flags.single[TEMPLATE_FILE_FLAG];
226
+ delete flags.single[ENV_FILE_FLAG];
227
+ delete flags.single[PARAMETER_FLAG];
228
+ delete flags.repeated[PARAMETER_FLAG];
229
+ return {
230
+ flags,
231
+ forcedBody
232
+ };
233
+ }, "apply")
234
+ };
235
+
236
+ // src/cli-wrappers/flagParser.ts
237
+ var parseUnknownWithRepeats = /* @__PURE__ */__name(args => {
238
+ const {
239
+ cliArgs
240
+ } = args;
241
+ const single = {};
242
+ const repeated = {};
243
+ for (let i = 0; i < cliArgs.length; i++) {
244
+ const arg = cliArgs[i];
245
+ if (!arg?.startsWith("--")) continue;
246
+ const inlineSplitIdx = arg.indexOf("=");
247
+ const hasInlineValue = inlineSplitIdx > 2;
248
+ const key = hasInlineValue ? arg.slice(2, inlineSplitIdx) : arg.slice(2);
249
+ let value;
250
+ if (hasInlineValue) {
251
+ value = arg.slice(inlineSplitIdx + 1);
252
+ } else {
253
+ const next = cliArgs[i + 1];
254
+ if (next !== void 0 && !next.startsWith("--")) {
255
+ value = next;
256
+ i++;
257
+ } else {
258
+ value = "true";
259
+ }
260
+ }
261
+ single[key] = value;
262
+ if (!repeated[key]) {
263
+ repeated[key] = [];
264
+ }
265
+ repeated[key].push(value);
266
+ }
267
+ return {
268
+ single,
269
+ repeated
270
+ };
271
+ }, "parseUnknownWithRepeats");
272
+
273
+ // src/cli-wrappers/index.ts
274
+ var WRAPPERS = [agentFormationsWrapper];
275
+ var resolveWrapperForCommand = /* @__PURE__ */__name(args => {
276
+ const {
277
+ commandName
278
+ } = args;
279
+ return WRAPPERS.find(wrapper => {
280
+ return wrapper.commands.includes(commandName);
281
+ });
282
+ }, "resolveWrapperForCommand");
283
+ var applyWrapperForCommand = /* @__PURE__ */__name(args => {
284
+ const {
285
+ commandName,
286
+ route,
287
+ parsedFlags
288
+ } = args;
289
+ const wrapper = resolveWrapperForCommand({
290
+ commandName
291
+ });
292
+ if (!wrapper) {
293
+ return {
294
+ flags: parsedFlags,
295
+ forcedBody: {}
296
+ };
297
+ }
298
+ return wrapper.apply({
299
+ context: {
300
+ commandName,
301
+ route,
302
+ parsedFlags
303
+ }
304
+ });
305
+ }, "applyWrapperForCommand");
306
+ var getWrapperHelpFlags = /* @__PURE__ */__name(commandName => {
307
+ const wrapper = WRAPPERS.find(w => {
308
+ return w.commands.includes(commandName);
309
+ });
310
+ return wrapper?.helpFlags ?? [];
311
+ }, "getWrapperHelpFlags");
312
+
313
+ // src/config.ts
314
+ import * as fs2 from "fs";
60
315
  import * as os from "os";
61
316
  import * as path from "path";
62
317
  import { createClient, createConfig } from "@soat/sdk";
63
318
  var CONFIG_FILE = path.join(os.homedir(), ".soat", "config.json");
64
319
  var readConfig = /* @__PURE__ */__name(() => {
65
320
  try {
66
- return JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
321
+ return JSON.parse(fs2.readFileSync(CONFIG_FILE, "utf8"));
67
322
  } catch {
68
323
  return {};
69
324
  }
@@ -71,10 +326,10 @@ var readConfig = /* @__PURE__ */__name(() => {
71
326
  var writeProfile = /* @__PURE__ */__name((name, profile) => {
72
327
  const config = readConfig();
73
328
  config[name] = profile;
74
- fs.mkdirSync(path.dirname(CONFIG_FILE), {
329
+ fs2.mkdirSync(path.dirname(CONFIG_FILE), {
75
330
  recursive: true
76
331
  });
77
- fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
332
+ fs2.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
78
333
  }, "writeProfile");
79
334
  var resolveClient = /* @__PURE__ */__name(profileName => {
80
335
  const envBaseUrl = process.env["SOAT_BASE_URL"];
@@ -112,940 +367,2870 @@ var routes = {
112
367
  "list-actors": {
113
368
  serviceClass: "Actors",
114
369
  operationId: "listActors",
115
- description: "List actors",
370
+ description: "Returns all actors the caller has access to. If projectId is provided, returns only actors in that project. project keys are scoped to a single project automatically. JWT users without projectId receive actors across all their accessible projects.",
371
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
116
372
  pathParams: [],
117
- queryParams: ["project_id", "external_id", "limit", "offset"]
373
+ queryParams: ["project_id", "external_id", "limit", "offset"],
374
+ flags: [{
375
+ "name": "project_id",
376
+ "description": "Project ID (optional)",
377
+ "required": false,
378
+ "type": "string",
379
+ "in": "query"
380
+ }, {
381
+ "name": "external_id",
382
+ "description": "External ID to filter by (e.g. WhatsApp phone number)",
383
+ "required": false,
384
+ "type": "string",
385
+ "in": "query"
386
+ }, {
387
+ "name": "limit",
388
+ "description": "Maximum number of results to return",
389
+ "required": false,
390
+ "type": "integer",
391
+ "in": "query"
392
+ }, {
393
+ "name": "offset",
394
+ "description": "Number of results to skip",
395
+ "required": false,
396
+ "type": "integer",
397
+ "in": "query"
398
+ }]
118
399
  },
119
400
  "create-actor": {
120
401
  serviceClass: "Actors",
121
402
  operationId: "createActor",
122
- description: "Create an actor",
403
+ description: "Creates a new actor. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.",
404
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
123
405
  pathParams: [],
124
- queryParams: []
406
+ queryParams: [],
407
+ flags: [{
408
+ "name": "project_id",
409
+ "description": "Project ID. Required for JWT auth; omit when using an project key.",
410
+ "required": false,
411
+ "type": "string",
412
+ "in": "body"
413
+ }, {
414
+ "name": "name",
415
+ "description": "",
416
+ "required": true,
417
+ "type": "string",
418
+ "in": "body"
419
+ }, {
420
+ "name": "external_id",
421
+ "description": "Optional external identifier (e.g. WhatsApp phone number). If provided and an actor with this externalId already exists in the project, the existing actor is returned (idempotent \u2014 200 OK).",
422
+ "required": false,
423
+ "type": "string",
424
+ "in": "body"
425
+ }, {
426
+ "name": "memory_id",
427
+ "description": "Memory ID to link to this actor. Mutually exclusive with auto_create_memory.",
428
+ "required": false,
429
+ "type": "string",
430
+ "in": "body"
431
+ }, {
432
+ "name": "auto_create_memory",
433
+ "description": "When true, automatically creates a new memory container for this actor and links it. Ignored if memory_id is set. With external_id (idempotent), memory is only created on first creation.",
434
+ "required": false,
435
+ "type": "boolean",
436
+ "in": "body"
437
+ }]
125
438
  },
126
439
  "get-actor": {
127
440
  serviceClass: "Actors",
128
441
  operationId: "getActor",
129
- description: "Get an actor by ID",
442
+ description: "Returns an actor by its ID",
443
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
130
444
  pathParams: ["actor_id"],
131
- queryParams: []
445
+ queryParams: [],
446
+ flags: [{
447
+ "name": "actor_id",
448
+ "description": "Actor ID",
449
+ "required": true,
450
+ "type": "string",
451
+ "in": "path"
452
+ }]
132
453
  },
133
454
  "update-actor": {
134
455
  serviceClass: "Actors",
135
456
  operationId: "updateActor",
136
- description: "Update an actor",
457
+ description: "Updates an actor's properties",
458
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
137
459
  pathParams: ["actor_id"],
138
- queryParams: []
460
+ queryParams: [],
461
+ flags: [{
462
+ "name": "actor_id",
463
+ "description": "Actor ID",
464
+ "required": true,
465
+ "type": "string",
466
+ "in": "path"
467
+ }, {
468
+ "name": "name",
469
+ "description": "",
470
+ "required": false,
471
+ "type": "string",
472
+ "in": "body"
473
+ }, {
474
+ "name": "instructions",
475
+ "description": "Persona-specific instructions",
476
+ "required": false,
477
+ "type": "string",
478
+ "in": "body"
479
+ }, {
480
+ "name": "memory_id",
481
+ "description": "Memory ID to link to this actor. Set to null to unlink.",
482
+ "required": false,
483
+ "type": "string",
484
+ "in": "body"
485
+ }, {
486
+ "name": "tags",
487
+ "description": "",
488
+ "required": false,
489
+ "type": "object",
490
+ "in": "body"
491
+ }]
139
492
  },
140
493
  "delete-actor": {
141
494
  serviceClass: "Actors",
142
495
  operationId: "deleteActor",
143
- description: "Delete an actor",
496
+ description: "Deletes an actor by its ID",
497
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
144
498
  pathParams: ["actor_id"],
145
- queryParams: []
499
+ queryParams: [],
500
+ flags: [{
501
+ "name": "actor_id",
502
+ "description": "Actor ID",
503
+ "required": true,
504
+ "type": "string",
505
+ "in": "path"
506
+ }]
146
507
  },
147
508
  "get-actor-tags": {
148
509
  serviceClass: "Actors",
149
510
  operationId: "getActorTags",
150
- description: "Get actor tags",
511
+ description: "Returns all tags attached to the actor",
512
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
151
513
  pathParams: ["actor_id"],
152
- queryParams: []
514
+ queryParams: [],
515
+ flags: [{
516
+ "name": "actor_id",
517
+ "description": "Actor ID",
518
+ "required": true,
519
+ "type": "string",
520
+ "in": "path"
521
+ }]
153
522
  },
154
523
  "replace-actor-tags": {
155
524
  serviceClass: "Actors",
156
525
  operationId: "replaceActorTags",
157
- description: "Replace actor tags",
526
+ description: "Replaces all tags on the actor with the provided tags (not merged)",
527
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
158
528
  pathParams: ["actor_id"],
159
- queryParams: []
529
+ queryParams: [],
530
+ flags: [{
531
+ "name": "actor_id",
532
+ "description": "Actor ID",
533
+ "required": true,
534
+ "type": "string",
535
+ "in": "path"
536
+ }]
160
537
  },
161
538
  "merge-actor-tags": {
162
539
  serviceClass: "Actors",
163
540
  operationId: "mergeActorTags",
164
- description: "Merge actor tags",
541
+ description: "Merges provided tags with existing tags (existing tags are preserved unless overridden)",
542
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/actors",
165
543
  pathParams: ["actor_id"],
166
- queryParams: []
544
+ queryParams: [],
545
+ flags: [{
546
+ "name": "actor_id",
547
+ "description": "Actor ID",
548
+ "required": true,
549
+ "type": "string",
550
+ "in": "path"
551
+ }]
167
552
  },
168
553
  "validate-agent-formation": {
169
554
  serviceClass: "AgentFormations",
170
555
  operationId: "validateAgentFormation",
171
- description: "Validate a formation template",
556
+ description: "Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.",
557
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
172
558
  pathParams: [],
173
- queryParams: []
559
+ queryParams: [],
560
+ flags: [{
561
+ "name": "template",
562
+ "description": "",
563
+ "required": true,
564
+ "type": "string",
565
+ "in": "body"
566
+ }]
174
567
  },
175
568
  "plan-agent-formation": {
176
569
  serviceClass: "AgentFormations",
177
570
  operationId: "planAgentFormation",
178
- description: "Plan a formation deployment",
571
+ description: "Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.",
572
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
179
573
  pathParams: [],
180
- queryParams: []
574
+ queryParams: [],
575
+ flags: [{
576
+ "name": "project_id",
577
+ "description": "Project ID",
578
+ "required": true,
579
+ "type": "string",
580
+ "in": "body"
581
+ }, {
582
+ "name": "formation_id",
583
+ "description": "Existing formation ID to compare against. Omit for new formation planning.",
584
+ "required": false,
585
+ "type": "string",
586
+ "in": "body"
587
+ }, {
588
+ "name": "template",
589
+ "description": "",
590
+ "required": true,
591
+ "type": "string",
592
+ "in": "body"
593
+ }, {
594
+ "name": "parameters",
595
+ "description": "Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`.\n",
596
+ "required": false,
597
+ "type": "object",
598
+ "in": "body"
599
+ }]
181
600
  },
182
601
  "list-agent-formations": {
183
602
  serviceClass: "AgentFormations",
184
603
  operationId: "listAgentFormations",
185
- description: "List agent formations",
604
+ description: "Returns all formation stacks for a project",
605
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
186
606
  pathParams: [],
187
- queryParams: ["project_id"]
607
+ queryParams: ["project_id"],
608
+ flags: [{
609
+ "name": "project_id",
610
+ "description": "Project ID (required if not using project key auth)",
611
+ "required": false,
612
+ "type": "string",
613
+ "in": "query"
614
+ }]
188
615
  },
189
616
  "create-agent-formation": {
190
617
  serviceClass: "AgentFormations",
191
618
  operationId: "createAgentFormation",
192
- description: "Create a new agent formation",
619
+ description: "Validates the template, creates the formation record, then provisions all declared resources in dependency order.",
620
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
193
621
  pathParams: [],
194
- queryParams: []
622
+ queryParams: [],
623
+ flags: [{
624
+ "name": "project_id",
625
+ "description": "Project ID",
626
+ "required": true,
627
+ "type": "string",
628
+ "in": "body"
629
+ }, {
630
+ "name": "name",
631
+ "description": "Human-readable name for the formation stack",
632
+ "required": true,
633
+ "type": "string",
634
+ "in": "body"
635
+ }, {
636
+ "name": "template",
637
+ "description": "",
638
+ "required": true,
639
+ "type": "string",
640
+ "in": "body"
641
+ }, {
642
+ "name": "parameters",
643
+ "description": "Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.\n",
644
+ "required": false,
645
+ "type": "object",
646
+ "in": "body"
647
+ }, {
648
+ "name": "metadata",
649
+ "description": "",
650
+ "required": false,
651
+ "type": "object",
652
+ "in": "body"
653
+ }]
195
654
  },
196
655
  "get-agent-formation": {
197
656
  serviceClass: "AgentFormations",
198
657
  operationId: "getAgentFormation",
199
- description: "Get a specific agent formation",
658
+ description: "Returns the formation stack including its current resources.",
659
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
200
660
  pathParams: ["formation_id"],
201
- queryParams: []
661
+ queryParams: [],
662
+ flags: [{
663
+ "name": "formation_id",
664
+ "description": "",
665
+ "required": true,
666
+ "type": "string",
667
+ "in": "path"
668
+ }]
202
669
  },
203
670
  "update-agent-formation": {
204
671
  serviceClass: "AgentFormations",
205
672
  operationId: "updateAgentFormation",
206
- description: "Update an agent formation",
673
+ description: "Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.",
674
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
207
675
  pathParams: ["formation_id"],
208
- queryParams: []
676
+ queryParams: [],
677
+ flags: [{
678
+ "name": "formation_id",
679
+ "description": "",
680
+ "required": true,
681
+ "type": "string",
682
+ "in": "path"
683
+ }, {
684
+ "name": "template",
685
+ "description": "",
686
+ "required": false,
687
+ "type": "string",
688
+ "in": "body"
689
+ }, {
690
+ "name": "parameters",
691
+ "description": "Runtime parameter values that override or supply template parameter defaults. Keys must match parameter names declared in `template.parameters`. Required parameters (those without a default) must be provided here.\n",
692
+ "required": false,
693
+ "type": "object",
694
+ "in": "body"
695
+ }, {
696
+ "name": "metadata",
697
+ "description": "",
698
+ "required": false,
699
+ "type": "object",
700
+ "in": "body"
701
+ }]
209
702
  },
210
703
  "delete-agent-formation": {
211
704
  serviceClass: "AgentFormations",
212
705
  operationId: "deleteAgentFormation",
213
- description: "Delete an agent formation",
706
+ description: "Deletes the formation stack and all its managed resources in reverse dependency order.",
707
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
214
708
  pathParams: ["formation_id"],
215
- queryParams: []
709
+ queryParams: [],
710
+ flags: [{
711
+ "name": "formation_id",
712
+ "description": "",
713
+ "required": true,
714
+ "type": "string",
715
+ "in": "path"
716
+ }]
216
717
  },
217
718
  "list-agent-formation-events": {
218
719
  serviceClass: "AgentFormations",
219
720
  operationId: "listAgentFormationEvents",
220
- description: "List formation operation events",
721
+ description: "Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.",
722
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agent-formations",
221
723
  pathParams: ["formation_id"],
222
- queryParams: []
724
+ queryParams: [],
725
+ flags: [{
726
+ "name": "formation_id",
727
+ "description": "",
728
+ "required": true,
729
+ "type": "string",
730
+ "in": "path"
731
+ }]
223
732
  },
224
733
  "list-agent-tools": {
225
734
  serviceClass: "AgentTools",
226
735
  operationId: "listAgentTools",
227
- description: "List agent tools",
736
+ description: "Returns all agent tools in the project.",
737
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
228
738
  pathParams: [],
229
- queryParams: ["project_id"]
739
+ queryParams: ["project_id"],
740
+ flags: [{
741
+ "name": "project_id",
742
+ "description": "Project public ID to filter by",
743
+ "required": false,
744
+ "type": "string",
745
+ "in": "query"
746
+ }]
230
747
  },
231
748
  "create-agent-tool": {
232
749
  serviceClass: "AgentTools",
233
750
  operationId: "createAgentTool",
234
- description: "Create an agent tool",
751
+ description: "Creates a new agent tool in the project.",
752
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
235
753
  pathParams: [],
236
- queryParams: []
754
+ queryParams: [],
755
+ flags: []
237
756
  },
238
757
  "get-agent-tool": {
239
758
  serviceClass: "AgentTools",
240
759
  operationId: "getAgentTool",
241
- description: "Get an agent tool",
760
+ description: "Returns a single agent tool by ID.",
761
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
242
762
  pathParams: ["tool_id"],
243
- queryParams: []
763
+ queryParams: [],
764
+ flags: [{
765
+ "name": "tool_id",
766
+ "description": "",
767
+ "required": true,
768
+ "type": "string",
769
+ "in": "path"
770
+ }]
244
771
  },
245
772
  "update-agent-tool": {
246
773
  serviceClass: "AgentTools",
247
774
  operationId: "updateAgentTool",
248
- description: "Update an agent tool",
775
+ description: "Updates an existing agent tool.",
776
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
249
777
  pathParams: ["tool_id"],
250
- queryParams: []
778
+ queryParams: [],
779
+ flags: [{
780
+ "name": "tool_id",
781
+ "description": "",
782
+ "required": true,
783
+ "type": "string",
784
+ "in": "path"
785
+ }]
251
786
  },
252
787
  "delete-agent-tool": {
253
788
  serviceClass: "AgentTools",
254
789
  operationId: "deleteAgentTool",
255
- description: "Delete an agent tool",
790
+ description: "Deletes an agent tool by ID.",
791
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
256
792
  pathParams: ["tool_id"],
257
- queryParams: []
793
+ queryParams: [],
794
+ flags: [{
795
+ "name": "tool_id",
796
+ "description": "",
797
+ "required": true,
798
+ "type": "string",
799
+ "in": "path"
800
+ }]
258
801
  },
259
802
  "list-agents": {
260
803
  serviceClass: "Agents",
261
804
  operationId: "listAgents",
262
- description: "List agents",
805
+ description: "Returns all agents in the project.",
806
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
263
807
  pathParams: [],
264
- queryParams: ["project_id"]
808
+ queryParams: ["project_id"],
809
+ flags: [{
810
+ "name": "project_id",
811
+ "description": "Project public ID to filter by",
812
+ "required": false,
813
+ "type": "string",
814
+ "in": "query"
815
+ }]
265
816
  },
266
817
  "create-agent": {
267
818
  serviceClass: "Agents",
268
819
  operationId: "createAgent",
269
- description: "Create an agent",
820
+ description: "Creates a new agent bound to an AI provider.",
821
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
270
822
  pathParams: [],
271
- queryParams: []
823
+ queryParams: [],
824
+ flags: []
272
825
  },
273
826
  "get-agent": {
274
827
  serviceClass: "Agents",
275
828
  operationId: "getAgent",
276
- description: "Get an agent",
829
+ description: "Returns a single agent by ID.",
830
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
277
831
  pathParams: ["agent_id"],
278
- queryParams: []
832
+ queryParams: [],
833
+ flags: [{
834
+ "name": "agent_id",
835
+ "description": "",
836
+ "required": true,
837
+ "type": "string",
838
+ "in": "path"
839
+ }]
279
840
  },
280
841
  "update-agent": {
281
842
  serviceClass: "Agents",
282
843
  operationId: "updateAgent",
283
- description: "Update an agent",
844
+ description: "Updates an existing agent.",
845
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
284
846
  pathParams: ["agent_id"],
285
- queryParams: []
847
+ queryParams: [],
848
+ flags: [{
849
+ "name": "agent_id",
850
+ "description": "",
851
+ "required": true,
852
+ "type": "string",
853
+ "in": "path"
854
+ }]
286
855
  },
287
856
  "delete-agent": {
288
857
  serviceClass: "Agents",
289
858
  operationId: "deleteAgent",
290
- description: "Delete an agent",
859
+ description: "Deletes an agent by ID.",
860
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
291
861
  pathParams: ["agent_id"],
292
- queryParams: []
862
+ queryParams: [],
863
+ flags: [{
864
+ "name": "agent_id",
865
+ "description": "",
866
+ "required": true,
867
+ "type": "string",
868
+ "in": "path"
869
+ }]
293
870
  },
294
871
  "create-agent-generation": {
295
872
  serviceClass: "Agents",
296
873
  operationId: "createAgentGeneration",
297
- description: "Run an agent generation",
874
+ description: "Sends messages to the agent, resolves its tools, and runs the AI model loop. Supports streaming via `stream: true`. Client tools pause the generation and return `requires_action`.",
875
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
298
876
  pathParams: ["agent_id"],
299
- queryParams: []
877
+ queryParams: [],
878
+ flags: [{
879
+ "name": "agent_id",
880
+ "description": "",
881
+ "required": true,
882
+ "type": "string",
883
+ "in": "path"
884
+ }]
300
885
  },
301
886
  "submit-agent-tool-outputs": {
302
887
  serviceClass: "Agents",
303
888
  operationId: "submitAgentToolOutputs",
304
- description: "Submit tool outputs for a paused generation",
889
+ description: "Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.",
890
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
305
891
  pathParams: ["agent_id", "generation_id"],
306
- queryParams: []
892
+ queryParams: [],
893
+ flags: [{
894
+ "name": "agent_id",
895
+ "description": "",
896
+ "required": true,
897
+ "type": "string",
898
+ "in": "path"
899
+ }, {
900
+ "name": "generation_id",
901
+ "description": "",
902
+ "required": true,
903
+ "type": "string",
904
+ "in": "path"
905
+ }]
307
906
  },
308
907
  "create-agent-actor": {
309
908
  serviceClass: "Agents",
310
909
  operationId: "createAgentActor",
311
- description: "Create an actor for an agent",
910
+ description: "Creates a new actor associated with the specified agent",
911
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/agents",
312
912
  pathParams: ["agent_id"],
313
- queryParams: []
913
+ queryParams: [],
914
+ flags: [{
915
+ "name": "agent_id",
916
+ "description": "Agent ID",
917
+ "required": true,
918
+ "type": "string",
919
+ "in": "path"
920
+ }, {
921
+ "name": "name",
922
+ "description": "",
923
+ "required": true,
924
+ "type": "string",
925
+ "in": "body"
926
+ }, {
927
+ "name": "type",
928
+ "description": "Optional actor type",
929
+ "required": false,
930
+ "type": "string",
931
+ "in": "body"
932
+ }, {
933
+ "name": "external_id",
934
+ "description": "Optional external identifier",
935
+ "required": false,
936
+ "type": "string",
937
+ "in": "body"
938
+ }, {
939
+ "name": "tags",
940
+ "description": "",
941
+ "required": false,
942
+ "type": "object",
943
+ "in": "body"
944
+ }]
314
945
  },
315
946
  "list-ai-providers": {
316
947
  serviceClass: "AIProviders",
317
948
  operationId: "listAiProviders",
318
- description: "List AI providers",
949
+ description: "Returns a list of AI provider configurations for a project",
950
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
319
951
  pathParams: [],
320
- queryParams: ["project_id", "limit", "offset"]
952
+ queryParams: ["project_id", "limit", "offset"],
953
+ flags: [{
954
+ "name": "project_id",
955
+ "description": "Project ID (required if not using project key auth)",
956
+ "required": false,
957
+ "type": "string",
958
+ "in": "query"
959
+ }, {
960
+ "name": "limit",
961
+ "description": "Number of results per page",
962
+ "required": false,
963
+ "type": "integer",
964
+ "in": "query"
965
+ }, {
966
+ "name": "offset",
967
+ "description": "Number of results to skip",
968
+ "required": false,
969
+ "type": "integer",
970
+ "in": "query"
971
+ }]
321
972
  },
322
973
  "create-ai-provider": {
323
974
  serviceClass: "AIProviders",
324
975
  operationId: "createAiProvider",
325
- description: "Create an AI provider",
976
+ description: "Creates a new LLM provider configuration",
977
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
326
978
  pathParams: [],
327
- queryParams: []
979
+ queryParams: [],
980
+ flags: [{
981
+ "name": "project_id",
982
+ "description": "Project ID (required if not using project key auth)",
983
+ "required": false,
984
+ "type": "string",
985
+ "in": "body"
986
+ }, {
987
+ "name": "name",
988
+ "description": "Provider configuration name",
989
+ "required": true,
990
+ "type": "string",
991
+ "in": "body"
992
+ }, {
993
+ "name": "provider",
994
+ "description": "LLM provider",
995
+ "required": true,
996
+ "type": "string",
997
+ "in": "body"
998
+ }, {
999
+ "name": "default_model",
1000
+ "description": "Default model to use",
1001
+ "required": true,
1002
+ "type": "string",
1003
+ "in": "body"
1004
+ }, {
1005
+ "name": "secret_id",
1006
+ "description": "Secret ID containing API credentials",
1007
+ "required": false,
1008
+ "type": "string",
1009
+ "in": "body"
1010
+ }, {
1011
+ "name": "base_url",
1012
+ "description": "Custom base URL for the provider",
1013
+ "required": false,
1014
+ "type": "string",
1015
+ "in": "body"
1016
+ }, {
1017
+ "name": "config",
1018
+ "description": "Additional provider-specific configuration",
1019
+ "required": false,
1020
+ "type": "object",
1021
+ "in": "body"
1022
+ }]
328
1023
  },
329
1024
  "get-ai-provider": {
330
1025
  serviceClass: "AIProviders",
331
1026
  operationId: "getAiProvider",
332
- description: "Get an AI provider",
1027
+ description: "Returns a specific AI provider configuration",
1028
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
333
1029
  pathParams: ["ai_provider_id"],
334
- queryParams: []
1030
+ queryParams: [],
1031
+ flags: [{
1032
+ "name": "ai_provider_id",
1033
+ "description": "AI Provider ID",
1034
+ "required": true,
1035
+ "type": "string",
1036
+ "in": "path"
1037
+ }]
335
1038
  },
336
1039
  "update-ai-provider": {
337
1040
  serviceClass: "AIProviders",
338
1041
  operationId: "updateAiProvider",
339
- description: "Update an AI provider",
1042
+ description: "Updates an AI provider configuration",
1043
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
340
1044
  pathParams: ["ai_provider_id"],
341
- queryParams: []
1045
+ queryParams: [],
1046
+ flags: [{
1047
+ "name": "ai_provider_id",
1048
+ "description": "AI Provider ID",
1049
+ "required": true,
1050
+ "type": "string",
1051
+ "in": "path"
1052
+ }, {
1053
+ "name": "name",
1054
+ "description": "",
1055
+ "required": false,
1056
+ "type": "string",
1057
+ "in": "body"
1058
+ }, {
1059
+ "name": "default_model",
1060
+ "description": "",
1061
+ "required": false,
1062
+ "type": "string",
1063
+ "in": "body"
1064
+ }, {
1065
+ "name": "secret_id",
1066
+ "description": "",
1067
+ "required": false,
1068
+ "type": "string",
1069
+ "in": "body"
1070
+ }, {
1071
+ "name": "base_url",
1072
+ "description": "",
1073
+ "required": false,
1074
+ "type": "string",
1075
+ "in": "body"
1076
+ }, {
1077
+ "name": "config",
1078
+ "description": "",
1079
+ "required": false,
1080
+ "type": "object",
1081
+ "in": "body"
1082
+ }]
342
1083
  },
343
1084
  "delete-ai-provider": {
344
1085
  serviceClass: "AIProviders",
345
1086
  operationId: "deleteAiProvider",
346
- description: "Delete an AI provider",
1087
+ description: "Deletes an AI provider configuration",
1088
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/ai-providers",
347
1089
  pathParams: ["ai_provider_id"],
348
- queryParams: []
1090
+ queryParams: [],
1091
+ flags: [{
1092
+ "name": "ai_provider_id",
1093
+ "description": "AI Provider ID",
1094
+ "required": true,
1095
+ "type": "string",
1096
+ "in": "path"
1097
+ }]
349
1098
  },
350
1099
  "list-api-keys": {
351
1100
  serviceClass: "APIKeys",
352
1101
  operationId: "listApiKeys",
353
- description: "List API keys",
1102
+ description: "Lists API keys accessible to the caller. - JWT admin: returns all API keys. - JWT regular user: returns only the user's own API keys. - API key scoped to a project: returns only API keys scoped to that project.",
1103
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/api-keys",
354
1104
  pathParams: [],
355
- queryParams: []
1105
+ queryParams: [],
1106
+ flags: []
356
1107
  },
357
1108
  "create-api-key": {
358
1109
  serviceClass: "APIKeys",
359
1110
  operationId: "createApiKey",
360
- description: "Create an API key",
1111
+ description: "Creates a new API key for the authenticated user. - If `project_id` is provided, the key is scoped to that project. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - If neither is provided, the key inherits the user's full permissions.",
1112
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/api-keys",
361
1113
  pathParams: [],
362
- queryParams: []
1114
+ queryParams: [],
1115
+ flags: [{
1116
+ "name": "name",
1117
+ "description": "Key name for identification",
1118
+ "required": true,
1119
+ "type": "string",
1120
+ "in": "body"
1121
+ }, {
1122
+ "name": "project_id",
1123
+ "description": "Optional project ID to scope this key to a specific project",
1124
+ "required": false,
1125
+ "type": "string",
1126
+ "in": "body"
1127
+ }, {
1128
+ "name": "policy_ids",
1129
+ "description": "Optional list of policy IDs to attach. Key permissions become the intersection of user policies and these policies.",
1130
+ "required": false,
1131
+ "type": "array",
1132
+ "in": "body"
1133
+ }]
363
1134
  },
364
1135
  "get-api-key": {
365
1136
  serviceClass: "APIKeys",
366
1137
  operationId: "getApiKey",
367
- description: "Get an API key",
1138
+ description: "Returns details of an API key. Only the owner or an admin can access it.",
1139
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/api-keys",
368
1140
  pathParams: ["api_key_id"],
369
- queryParams: []
1141
+ queryParams: [],
1142
+ flags: [{
1143
+ "name": "api_key_id",
1144
+ "description": "API key public ID (key_ prefix)",
1145
+ "required": true,
1146
+ "type": "string",
1147
+ "in": "path"
1148
+ }]
370
1149
  },
371
1150
  "update-api-key": {
372
1151
  serviceClass: "APIKeys",
373
1152
  operationId: "updateApiKey",
374
- description: "Update an API key",
1153
+ description: "Updates an API key's name, project scope, or policies. Only the owner or an admin can update it.",
1154
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/api-keys",
375
1155
  pathParams: ["api_key_id"],
376
- queryParams: []
1156
+ queryParams: [],
1157
+ flags: [{
1158
+ "name": "api_key_id",
1159
+ "description": "API key public ID (key_ prefix)",
1160
+ "required": true,
1161
+ "type": "string",
1162
+ "in": "path"
1163
+ }, {
1164
+ "name": "name",
1165
+ "description": "",
1166
+ "required": false,
1167
+ "type": "string",
1168
+ "in": "body"
1169
+ }, {
1170
+ "name": "project_id",
1171
+ "description": "Set to null to remove project scope",
1172
+ "required": false,
1173
+ "type": "string",
1174
+ "in": "body"
1175
+ }, {
1176
+ "name": "policy_ids",
1177
+ "description": "Replace the key's policy list (empty array removes all)",
1178
+ "required": false,
1179
+ "type": "array",
1180
+ "in": "body"
1181
+ }]
377
1182
  },
378
1183
  "delete-api-key": {
379
1184
  serviceClass: "APIKeys",
380
1185
  operationId: "deleteApiKey",
381
- description: "Delete an API key",
1186
+ description: "Deletes an API key. Only the owner or an admin can delete it.",
1187
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/api-keys",
382
1188
  pathParams: ["api_key_id"],
383
- queryParams: []
1189
+ queryParams: [],
1190
+ flags: [{
1191
+ "name": "api_key_id",
1192
+ "description": "API key public ID (key_ prefix)",
1193
+ "required": true,
1194
+ "type": "string",
1195
+ "in": "path"
1196
+ }]
384
1197
  },
385
1198
  "list-chats": {
386
1199
  serviceClass: "Chats",
387
1200
  operationId: "listChats",
388
- description: "List chats",
1201
+ description: "Returns all chats in the project.",
1202
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
389
1203
  pathParams: [],
390
- queryParams: ["project_id"]
1204
+ queryParams: ["project_id"],
1205
+ flags: [{
1206
+ "name": "project_id",
1207
+ "description": "Project public ID to filter by",
1208
+ "required": false,
1209
+ "type": "string",
1210
+ "in": "query"
1211
+ }]
391
1212
  },
392
1213
  "create-chat": {
393
1214
  serviceClass: "Chats",
394
1215
  operationId: "createChat",
395
- description: "Create a chat",
1216
+ description: "Creates a new chat resource bound to an AI provider.",
1217
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
396
1218
  pathParams: [],
397
- queryParams: []
1219
+ queryParams: [],
1220
+ flags: []
398
1221
  },
399
1222
  "get-chat": {
400
1223
  serviceClass: "Chats",
401
1224
  operationId: "getChat",
402
- description: "Get a chat",
1225
+ description: "Returns a single chat by ID.",
1226
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
403
1227
  pathParams: ["chat_id"],
404
- queryParams: []
1228
+ queryParams: [],
1229
+ flags: [{
1230
+ "name": "chat_id",
1231
+ "description": "",
1232
+ "required": true,
1233
+ "type": "string",
1234
+ "in": "path"
1235
+ }]
405
1236
  },
406
1237
  "delete-chat": {
407
1238
  serviceClass: "Chats",
408
1239
  operationId: "deleteChat",
409
- description: "Delete a chat",
1240
+ description: "Deletes a chat by ID.",
1241
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
410
1242
  pathParams: ["chat_id"],
411
- queryParams: []
1243
+ queryParams: [],
1244
+ flags: [{
1245
+ "name": "chat_id",
1246
+ "description": "",
1247
+ "required": true,
1248
+ "type": "string",
1249
+ "in": "path"
1250
+ }]
412
1251
  },
413
1252
  "create-chat-completion-for-chat": {
414
1253
  serviceClass: "Chats",
415
1254
  operationId: "createChatCompletionForChat",
416
- description: "Create a chat completion for a stored chat",
1255
+ description: "Runs a completion using the AI provider and settings stored in the chat. Pass `stream: true` for SSE streaming. A system message in `messages` overrides the chat's stored system message for this call only. Messages may use `documentId` instead of `content`.",
1256
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
417
1257
  pathParams: ["chat_id"],
418
- queryParams: []
1258
+ queryParams: [],
1259
+ flags: [{
1260
+ "name": "chat_id",
1261
+ "description": "",
1262
+ "required": true,
1263
+ "type": "string",
1264
+ "in": "path"
1265
+ }]
419
1266
  },
420
1267
  "create-chat-completion": {
421
1268
  serviceClass: "Chats",
422
1269
  operationId: "createChatCompletion",
423
- description: "Create a chat completion (stateless)",
1270
+ description: "OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required \u2014 there is no server-side model fallback.",
1271
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
424
1272
  pathParams: [],
425
- queryParams: []
1273
+ queryParams: [],
1274
+ flags: []
426
1275
  },
427
1276
  "create-chat-actor": {
428
1277
  serviceClass: "Chats",
429
1278
  operationId: "createChatActor",
430
- description: "Create an actor for a chat",
1279
+ description: "Creates a new actor associated with the specified chat",
1280
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/chats",
431
1281
  pathParams: ["chat_id"],
432
- queryParams: []
1282
+ queryParams: [],
1283
+ flags: [{
1284
+ "name": "chat_id",
1285
+ "description": "Chat ID",
1286
+ "required": true,
1287
+ "type": "string",
1288
+ "in": "path"
1289
+ }, {
1290
+ "name": "name",
1291
+ "description": "",
1292
+ "required": true,
1293
+ "type": "string",
1294
+ "in": "body"
1295
+ }, {
1296
+ "name": "type",
1297
+ "description": "Optional actor type",
1298
+ "required": false,
1299
+ "type": "string",
1300
+ "in": "body"
1301
+ }, {
1302
+ "name": "external_id",
1303
+ "description": "Optional external identifier",
1304
+ "required": false,
1305
+ "type": "string",
1306
+ "in": "body"
1307
+ }, {
1308
+ "name": "tags",
1309
+ "description": "",
1310
+ "required": false,
1311
+ "type": "object",
1312
+ "in": "body"
1313
+ }]
433
1314
  },
434
1315
  "list-conversations": {
435
1316
  serviceClass: "Conversations",
436
1317
  operationId: "listConversations",
437
- description: "List conversations",
1318
+ description: "Returns all conversations the caller has access to. If projectId is provided, returns only conversations in that project. project keys are scoped to a single project automatically.",
1319
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
438
1320
  pathParams: [],
439
- queryParams: ["project_id", "actor_id", "limit", "offset"]
1321
+ queryParams: ["project_id", "actor_id", "limit", "offset"],
1322
+ flags: [{
1323
+ "name": "project_id",
1324
+ "description": "Project ID (optional)",
1325
+ "required": false,
1326
+ "type": "string",
1327
+ "in": "query"
1328
+ }, {
1329
+ "name": "actor_id",
1330
+ "description": "Filter by actor ID",
1331
+ "required": false,
1332
+ "type": "string",
1333
+ "in": "query"
1334
+ }, {
1335
+ "name": "limit",
1336
+ "description": "Maximum number of results to return",
1337
+ "required": false,
1338
+ "type": "integer",
1339
+ "in": "query"
1340
+ }, {
1341
+ "name": "offset",
1342
+ "description": "Number of results to skip",
1343
+ "required": false,
1344
+ "type": "integer",
1345
+ "in": "query"
1346
+ }]
440
1347
  },
441
1348
  "create-conversation": {
442
1349
  serviceClass: "Conversations",
443
1350
  operationId: "createConversation",
444
- description: "Create a conversation",
1351
+ description: "Creates a new conversation. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.",
1352
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
445
1353
  pathParams: [],
446
- queryParams: []
1354
+ queryParams: [],
1355
+ flags: [{
1356
+ "name": "project_id",
1357
+ "description": "Project ID. Required for JWT auth; omit when using an project key.",
1358
+ "required": false,
1359
+ "type": "string",
1360
+ "in": "body"
1361
+ }, {
1362
+ "name": "status",
1363
+ "description": "Initial conversation status",
1364
+ "required": false,
1365
+ "type": "string",
1366
+ "in": "body"
1367
+ }, {
1368
+ "name": "name",
1369
+ "description": "Optional name for the conversation",
1370
+ "required": false,
1371
+ "type": "string",
1372
+ "in": "body"
1373
+ }, {
1374
+ "name": "actor_id",
1375
+ "description": "Actor ID to associate with this conversation",
1376
+ "required": false,
1377
+ "type": "string",
1378
+ "in": "body"
1379
+ }]
447
1380
  },
448
1381
  "get-conversation": {
449
1382
  serviceClass: "Conversations",
450
1383
  operationId: "getConversation",
451
- description: "Get a conversation by ID",
1384
+ description: "Returns a conversation by its ID",
1385
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
452
1386
  pathParams: ["conversation_id"],
453
- queryParams: []
1387
+ queryParams: [],
1388
+ flags: [{
1389
+ "name": "conversation_id",
1390
+ "description": "Conversation ID",
1391
+ "required": true,
1392
+ "type": "string",
1393
+ "in": "path"
1394
+ }]
454
1395
  },
455
1396
  "update-conversation": {
456
1397
  serviceClass: "Conversations",
457
1398
  operationId: "updateConversation",
458
- description: "Update a conversation",
1399
+ description: "Updates the status of a conversation",
1400
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
459
1401
  pathParams: ["conversation_id"],
460
- queryParams: []
1402
+ queryParams: [],
1403
+ flags: [{
1404
+ "name": "conversation_id",
1405
+ "description": "Conversation ID",
1406
+ "required": true,
1407
+ "type": "string",
1408
+ "in": "path"
1409
+ }, {
1410
+ "name": "status",
1411
+ "description": "New conversation status",
1412
+ "required": true,
1413
+ "type": "string",
1414
+ "in": "body"
1415
+ }]
461
1416
  },
462
1417
  "delete-conversation": {
463
1418
  serviceClass: "Conversations",
464
1419
  operationId: "deleteConversation",
465
- description: "Delete a conversation",
1420
+ description: "Deletes a conversation by its ID",
1421
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
466
1422
  pathParams: ["conversation_id"],
467
- queryParams: []
1423
+ queryParams: [],
1424
+ flags: [{
1425
+ "name": "conversation_id",
1426
+ "description": "Conversation ID",
1427
+ "required": true,
1428
+ "type": "string",
1429
+ "in": "path"
1430
+ }]
468
1431
  },
469
1432
  "list-conversation-messages": {
470
1433
  serviceClass: "Conversations",
471
1434
  operationId: "listConversationMessages",
472
- description: "List conversation messages",
1435
+ description: "Returns all messages (documents) attached to a conversation, ordered by position",
1436
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
473
1437
  pathParams: ["conversation_id"],
474
- queryParams: ["limit", "offset"]
1438
+ queryParams: ["limit", "offset"],
1439
+ flags: [{
1440
+ "name": "conversation_id",
1441
+ "description": "Conversation ID",
1442
+ "required": true,
1443
+ "type": "string",
1444
+ "in": "path"
1445
+ }, {
1446
+ "name": "limit",
1447
+ "description": "Maximum number of results to return",
1448
+ "required": false,
1449
+ "type": "integer",
1450
+ "in": "query"
1451
+ }, {
1452
+ "name": "offset",
1453
+ "description": "Number of results to skip",
1454
+ "required": false,
1455
+ "type": "integer",
1456
+ "in": "query"
1457
+ }]
475
1458
  },
476
1459
  "add-conversation-message": {
477
1460
  serviceClass: "Conversations",
478
1461
  operationId: "addConversationMessage",
479
- description: "Add a message to a conversation",
1462
+ description: "Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.",
1463
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
480
1464
  pathParams: ["conversation_id"],
481
- queryParams: []
1465
+ queryParams: [],
1466
+ flags: [{
1467
+ "name": "conversation_id",
1468
+ "description": "Conversation ID",
1469
+ "required": true,
1470
+ "type": "string",
1471
+ "in": "path"
1472
+ }, {
1473
+ "name": "message",
1474
+ "description": "Message text content to add to the conversation",
1475
+ "required": true,
1476
+ "type": "string",
1477
+ "in": "body"
1478
+ }, {
1479
+ "name": "role",
1480
+ "description": "Role of the message sender",
1481
+ "required": true,
1482
+ "type": "string",
1483
+ "in": "body"
1484
+ }, {
1485
+ "name": "actor_id",
1486
+ "description": "Optional actor ID to associate with this message (user identity)",
1487
+ "required": false,
1488
+ "type": "string",
1489
+ "in": "body"
1490
+ }, {
1491
+ "name": "position",
1492
+ "description": "Zero-based position. Defaults to MAX+1 (append).",
1493
+ "required": false,
1494
+ "type": "integer",
1495
+ "in": "body"
1496
+ }, {
1497
+ "name": "metadata",
1498
+ "description": "Optional structured metadata to attach to the message (e.g. phone number, channel). Stored as-is and injected into the AI prompt context.",
1499
+ "required": false,
1500
+ "type": "object",
1501
+ "in": "body"
1502
+ }]
482
1503
  },
483
1504
  "generate-conversation-message": {
484
1505
  serviceClass: "Conversations",
485
1506
  operationId: "generateConversationMessage",
486
- description: "Generate the next message in a conversation",
1507
+ description: "Generates the next message using the specified actor's linked agent or chat. On `completed`, the reply is persisted as a new ConversationMessage authored by that actor. On `requires_action`, nothing is persisted; the caller must submit tool outputs via the Agents module and re-invoke generate.",
1508
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
487
1509
  pathParams: ["conversation_id"],
488
- queryParams: []
1510
+ queryParams: [],
1511
+ flags: [{
1512
+ "name": "conversation_id",
1513
+ "description": "",
1514
+ "required": true,
1515
+ "type": "string",
1516
+ "in": "path"
1517
+ }, {
1518
+ "name": "agent_id",
1519
+ "description": "ID of the agent that will produce the next message.",
1520
+ "required": true,
1521
+ "type": "string",
1522
+ "in": "body"
1523
+ }, {
1524
+ "name": "model",
1525
+ "description": "Optional model override.",
1526
+ "required": false,
1527
+ "type": "string",
1528
+ "in": "body"
1529
+ }, {
1530
+ "name": "stream",
1531
+ "description": "If true, stream tokens via SSE. NOT IMPLEMENTED in v1 \u2014 returns 501.",
1532
+ "required": false,
1533
+ "type": "boolean",
1534
+ "in": "body"
1535
+ }, {
1536
+ "name": "tool_context",
1537
+ "description": "Key-value pairs injected as context headers into all tool call requests made during this generation.",
1538
+ "required": false,
1539
+ "type": "object",
1540
+ "in": "body"
1541
+ }]
489
1542
  },
490
1543
  "list-conversation-actors": {
491
1544
  serviceClass: "Conversations",
492
1545
  operationId: "listConversationActors",
493
- description: "List actors in a conversation",
1546
+ description: "Returns all distinct actors who have sent at least one message in the conversation",
1547
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
494
1548
  pathParams: ["conversation_id"],
495
- queryParams: []
1549
+ queryParams: [],
1550
+ flags: [{
1551
+ "name": "conversation_id",
1552
+ "description": "Conversation ID",
1553
+ "required": true,
1554
+ "type": "string",
1555
+ "in": "path"
1556
+ }]
496
1557
  },
497
1558
  "remove-conversation-message": {
498
1559
  serviceClass: "Conversations",
499
1560
  operationId: "removeConversationMessage",
500
- description: "Remove a message from a conversation",
1561
+ description: "Removes a document from a conversation",
1562
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
501
1563
  pathParams: ["conversation_id", "document_id"],
502
- queryParams: []
1564
+ queryParams: [],
1565
+ flags: [{
1566
+ "name": "conversation_id",
1567
+ "description": "Conversation ID",
1568
+ "required": true,
1569
+ "type": "string",
1570
+ "in": "path"
1571
+ }, {
1572
+ "name": "document_id",
1573
+ "description": "Document ID",
1574
+ "required": true,
1575
+ "type": "string",
1576
+ "in": "path"
1577
+ }]
503
1578
  },
504
1579
  "get-conversation-tags": {
505
1580
  serviceClass: "Conversations",
506
1581
  operationId: "getConversationTags",
507
- description: "Get conversation tags",
1582
+ description: "Returns all tags attached to the conversation",
1583
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
508
1584
  pathParams: ["conversation_id"],
509
- queryParams: []
1585
+ queryParams: [],
1586
+ flags: [{
1587
+ "name": "conversation_id",
1588
+ "description": "Conversation ID",
1589
+ "required": true,
1590
+ "type": "string",
1591
+ "in": "path"
1592
+ }]
510
1593
  },
511
1594
  "replace-conversation-tags": {
512
1595
  serviceClass: "Conversations",
513
1596
  operationId: "replaceConversationTags",
514
- description: "Replace conversation tags",
1597
+ description: "Replaces all tags on the conversation with the provided tags",
1598
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
515
1599
  pathParams: ["conversation_id"],
516
- queryParams: []
1600
+ queryParams: [],
1601
+ flags: [{
1602
+ "name": "conversation_id",
1603
+ "description": "Conversation ID",
1604
+ "required": true,
1605
+ "type": "string",
1606
+ "in": "path"
1607
+ }]
517
1608
  },
518
1609
  "merge-conversation-tags": {
519
1610
  serviceClass: "Conversations",
520
1611
  operationId: "mergeConversationTags",
521
- description: "Merge conversation tags",
1612
+ description: "Merges provided tags with existing tags",
1613
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/conversations",
522
1614
  pathParams: ["conversation_id"],
523
- queryParams: []
1615
+ queryParams: [],
1616
+ flags: [{
1617
+ "name": "conversation_id",
1618
+ "description": "Conversation ID",
1619
+ "required": true,
1620
+ "type": "string",
1621
+ "in": "path"
1622
+ }]
524
1623
  },
525
1624
  "list-documents": {
526
1625
  serviceClass: "Documents",
527
1626
  operationId: "listDocuments",
528
- description: "List documents",
1627
+ description: "Returns all documents the caller has access to. If projectId is provided, returns only documents in that project. project keys are scoped to a single project automatically. JWT users without projectId receive documents across all their accessible projects.",
1628
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
529
1629
  pathParams: [],
530
- queryParams: ["project_id"]
1630
+ queryParams: ["project_id"],
1631
+ flags: [{
1632
+ "name": "project_id",
1633
+ "description": "Project ID (optional)",
1634
+ "required": false,
1635
+ "type": "string",
1636
+ "in": "query"
1637
+ }]
531
1638
  },
532
1639
  "create-document": {
533
1640
  serviceClass: "Documents",
534
1641
  operationId: "createDocument",
535
- description: "Create a document",
1642
+ description: "Creates a new text document and generates an embedding vector for semantic search. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.",
1643
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
536
1644
  pathParams: [],
537
- queryParams: []
1645
+ queryParams: [],
1646
+ flags: [{
1647
+ "name": "project_id",
1648
+ "description": "Project ID. Required for JWT auth; omit when using an project key.",
1649
+ "required": false,
1650
+ "type": "string",
1651
+ "in": "body"
1652
+ }, {
1653
+ "name": "content",
1654
+ "description": "",
1655
+ "required": true,
1656
+ "type": "string",
1657
+ "in": "body"
1658
+ }, {
1659
+ "name": "path",
1660
+ "description": "Logical path within the project (e.g. /reports/q1.txt). Defaults to /filename if omitted.",
1661
+ "required": false,
1662
+ "type": "string",
1663
+ "in": "body"
1664
+ }, {
1665
+ "name": "filename",
1666
+ "description": "",
1667
+ "required": false,
1668
+ "type": "string",
1669
+ "in": "body"
1670
+ }]
538
1671
  },
539
1672
  "get-document": {
540
1673
  serviceClass: "Documents",
541
1674
  operationId: "getDocument",
542
- description: "Get a document by ID",
1675
+ description: "Returns a document with its text content",
1676
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
543
1677
  pathParams: ["document_id"],
544
- queryParams: []
1678
+ queryParams: [],
1679
+ flags: [{
1680
+ "name": "document_id",
1681
+ "description": "Document ID",
1682
+ "required": true,
1683
+ "type": "string",
1684
+ "in": "path"
1685
+ }]
545
1686
  },
546
1687
  "update-document": {
547
1688
  serviceClass: "Documents",
548
1689
  operationId: "updateDocument",
549
- description: "Update a document",
1690
+ description: "Updates document content, title, path, metadata, or tags. Supplying `path` moves the document to a new logical path within the project.",
1691
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
550
1692
  pathParams: ["document_id"],
551
- queryParams: []
1693
+ queryParams: [],
1694
+ flags: [{
1695
+ "name": "document_id",
1696
+ "description": "Document ID",
1697
+ "required": true,
1698
+ "type": "string",
1699
+ "in": "path"
1700
+ }, {
1701
+ "name": "content",
1702
+ "description": "New text content",
1703
+ "required": false,
1704
+ "type": "string",
1705
+ "in": "body"
1706
+ }, {
1707
+ "name": "title",
1708
+ "description": "New title",
1709
+ "required": false,
1710
+ "type": "string",
1711
+ "in": "body"
1712
+ }, {
1713
+ "name": "path",
1714
+ "description": "Logical path within the project (e.g. /reports/q1.txt). Pass null to clear.",
1715
+ "required": false,
1716
+ "type": "string",
1717
+ "in": "body"
1718
+ }, {
1719
+ "name": "metadata",
1720
+ "description": "Arbitrary metadata object",
1721
+ "required": false,
1722
+ "type": "object",
1723
+ "in": "body"
1724
+ }, {
1725
+ "name": "tags",
1726
+ "description": "Key-value tags",
1727
+ "required": false,
1728
+ "type": "object",
1729
+ "in": "body"
1730
+ }]
552
1731
  },
553
1732
  "delete-document": {
554
1733
  serviceClass: "Documents",
555
1734
  operationId: "deleteDocument",
556
- description: "Delete a document",
1735
+ description: "Deletes a document and its underlying file",
1736
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
557
1737
  pathParams: ["document_id"],
558
- queryParams: []
1738
+ queryParams: [],
1739
+ flags: [{
1740
+ "name": "document_id",
1741
+ "description": "Document ID",
1742
+ "required": true,
1743
+ "type": "string",
1744
+ "in": "path"
1745
+ }]
559
1746
  },
560
1747
  "get-document-tags": {
561
1748
  serviceClass: "Documents",
562
1749
  operationId: "getDocumentTags",
563
- description: "Get document tags",
1750
+ description: "Returns all tags attached to the document",
1751
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
564
1752
  pathParams: ["document_id"],
565
- queryParams: []
1753
+ queryParams: [],
1754
+ flags: [{
1755
+ "name": "document_id",
1756
+ "description": "Document ID",
1757
+ "required": true,
1758
+ "type": "string",
1759
+ "in": "path"
1760
+ }]
566
1761
  },
567
1762
  "replace-document-tags": {
568
1763
  serviceClass: "Documents",
569
1764
  operationId: "replaceDocumentTags",
570
- description: "Replace document tags",
1765
+ description: "Replaces all tags on the document with the provided tags (not merged)",
1766
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
571
1767
  pathParams: ["document_id"],
572
- queryParams: []
1768
+ queryParams: [],
1769
+ flags: [{
1770
+ "name": "document_id",
1771
+ "description": "Document ID",
1772
+ "required": true,
1773
+ "type": "string",
1774
+ "in": "path"
1775
+ }]
573
1776
  },
574
1777
  "merge-document-tags": {
575
1778
  serviceClass: "Documents",
576
1779
  operationId: "mergeDocumentTags",
577
- description: "Merge document tags",
1780
+ description: "Merges provided tags with existing tags (existing tags are preserved unless overridden)",
1781
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/documents",
578
1782
  pathParams: ["document_id"],
579
- queryParams: []
1783
+ queryParams: [],
1784
+ flags: [{
1785
+ "name": "document_id",
1786
+ "description": "Document ID",
1787
+ "required": true,
1788
+ "type": "string",
1789
+ "in": "path"
1790
+ }]
580
1791
  },
581
1792
  "list-files": {
582
1793
  serviceClass: "Files",
583
1794
  operationId: "listFiles",
584
- description: "List all files",
1795
+ description: "Returns a list of all stored files",
1796
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
585
1797
  pathParams: [],
586
- queryParams: ["project_id", "limit", "offset"]
1798
+ queryParams: ["project_id", "limit", "offset"],
1799
+ flags: [{
1800
+ "name": "project_id",
1801
+ "description": "Filter files by project ID",
1802
+ "required": false,
1803
+ "type": "string",
1804
+ "in": "query"
1805
+ }, {
1806
+ "name": "limit",
1807
+ "description": "Maximum number of results to return",
1808
+ "required": false,
1809
+ "type": "integer",
1810
+ "in": "query"
1811
+ }, {
1812
+ "name": "offset",
1813
+ "description": "Number of results to skip",
1814
+ "required": false,
1815
+ "type": "integer",
1816
+ "in": "query"
1817
+ }]
587
1818
  },
588
1819
  "create-file": {
589
1820
  serviceClass: "Files",
590
1821
  operationId: "createFile",
591
- description: "Create a file",
1822
+ description: "Creates a new file record in the system",
1823
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
592
1824
  pathParams: [],
593
- queryParams: []
1825
+ queryParams: [],
1826
+ flags: [{
1827
+ "name": "project_id",
1828
+ "description": "Public ID of the project",
1829
+ "required": true,
1830
+ "type": "string",
1831
+ "in": "body"
1832
+ }, {
1833
+ "name": "path",
1834
+ "description": "Logical path within the project (e.g. /images/logo.png). Defaults to /filename if omitted.",
1835
+ "required": false,
1836
+ "type": "string",
1837
+ "in": "body"
1838
+ }, {
1839
+ "name": "filename",
1840
+ "description": "Name of the file",
1841
+ "required": false,
1842
+ "type": "string",
1843
+ "in": "body"
1844
+ }, {
1845
+ "name": "content_type",
1846
+ "description": "MIME type of the file",
1847
+ "required": false,
1848
+ "type": "string",
1849
+ "in": "body"
1850
+ }, {
1851
+ "name": "size",
1852
+ "description": "File size in bytes",
1853
+ "required": false,
1854
+ "type": "integer",
1855
+ "in": "body"
1856
+ }, {
1857
+ "name": "storage_type",
1858
+ "description": "Storage backend type",
1859
+ "required": true,
1860
+ "type": "string",
1861
+ "in": "body"
1862
+ }, {
1863
+ "name": "storage_path",
1864
+ "description": "Path where the file is stored",
1865
+ "required": true,
1866
+ "type": "string",
1867
+ "in": "body"
1868
+ }, {
1869
+ "name": "metadata",
1870
+ "description": "JSON string with additional metadata",
1871
+ "required": false,
1872
+ "type": "string",
1873
+ "in": "body"
1874
+ }]
594
1875
  },
595
1876
  "upload-file": {
596
1877
  serviceClass: "Files",
597
1878
  operationId: "uploadFile",
598
- description: "Upload a file",
1879
+ description: "Uploads a file to the server and stores it in the configured storage directory",
1880
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
599
1881
  pathParams: [],
600
- queryParams: []
1882
+ queryParams: [],
1883
+ flags: []
601
1884
  },
602
1885
  "upload-file-base64": {
603
1886
  serviceClass: "Files",
604
1887
  operationId: "uploadFileBase64",
605
- description: "Upload a file using base64 encoding",
1888
+ description: "Uploads a file to the server using base64-encoded content",
1889
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
606
1890
  pathParams: [],
607
- queryParams: []
1891
+ queryParams: [],
1892
+ flags: []
608
1893
  },
609
1894
  "get-file": {
610
1895
  serviceClass: "Files",
611
1896
  operationId: "getFile",
612
- description: "Get a file by ID",
1897
+ description: "Returns the data and metadata of a specific file",
1898
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
613
1899
  pathParams: ["file_id"],
614
- queryParams: []
1900
+ queryParams: [],
1901
+ flags: [{
1902
+ "name": "file_id",
1903
+ "description": "File ID",
1904
+ "required": true,
1905
+ "type": "string",
1906
+ "in": "path"
1907
+ }]
615
1908
  },
616
1909
  "delete-file": {
617
1910
  serviceClass: "Files",
618
1911
  operationId: "deleteFile",
619
- description: "Delete a file",
1912
+ description: "Removes a file from the system by ID",
1913
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
620
1914
  pathParams: ["file_id"],
621
- queryParams: []
1915
+ queryParams: [],
1916
+ flags: [{
1917
+ "name": "file_id",
1918
+ "description": "ID of the file to delete",
1919
+ "required": true,
1920
+ "type": "string",
1921
+ "in": "path"
1922
+ }]
622
1923
  },
623
1924
  "download-file": {
624
1925
  serviceClass: "Files",
625
1926
  operationId: "downloadFile",
626
- description: "Download a file",
1927
+ description: "Streams the file content to the client",
1928
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
627
1929
  pathParams: ["file_id"],
628
- queryParams: []
1930
+ queryParams: [],
1931
+ flags: [{
1932
+ "name": "file_id",
1933
+ "description": "File ID",
1934
+ "required": true,
1935
+ "type": "string",
1936
+ "in": "path"
1937
+ }]
629
1938
  },
630
1939
  "update-file-metadata": {
631
1940
  serviceClass: "Files",
632
1941
  operationId: "updateFileMetadata",
633
- description: "Update file metadata",
1942
+ description: "Updates the metadata field of a file",
1943
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
634
1944
  pathParams: ["file_id"],
635
- queryParams: []
1945
+ queryParams: [],
1946
+ flags: [{
1947
+ "name": "file_id",
1948
+ "description": "File ID",
1949
+ "required": true,
1950
+ "type": "string",
1951
+ "in": "path"
1952
+ }, {
1953
+ "name": "metadata",
1954
+ "description": "New metadata as a JSON string",
1955
+ "required": false,
1956
+ "type": "string",
1957
+ "in": "body"
1958
+ }, {
1959
+ "name": "filename",
1960
+ "description": "New filename for the file",
1961
+ "required": false,
1962
+ "type": "string",
1963
+ "in": "body"
1964
+ }]
636
1965
  },
637
1966
  "download-file-base64": {
638
1967
  serviceClass: "Files",
639
1968
  operationId: "downloadFileBase64",
640
- description: "Download file as base64",
1969
+ description: "Returns the file content encoded as base64",
1970
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
641
1971
  pathParams: ["file_id"],
642
- queryParams: []
1972
+ queryParams: [],
1973
+ flags: [{
1974
+ "name": "file_id",
1975
+ "description": "File ID",
1976
+ "required": true,
1977
+ "type": "string",
1978
+ "in": "path"
1979
+ }]
643
1980
  },
644
1981
  "get-file-tags": {
645
1982
  serviceClass: "Files",
646
1983
  operationId: "getFileTags",
647
- description: "Get file tags",
1984
+ description: "Returns all tags attached to the file",
1985
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
648
1986
  pathParams: ["file_id"],
649
- queryParams: []
1987
+ queryParams: [],
1988
+ flags: [{
1989
+ "name": "file_id",
1990
+ "description": "File ID",
1991
+ "required": true,
1992
+ "type": "string",
1993
+ "in": "path"
1994
+ }]
650
1995
  },
651
1996
  "replace-file-tags": {
652
1997
  serviceClass: "Files",
653
1998
  operationId: "replaceFileTags",
654
- description: "Replace file tags",
1999
+ description: "Replaces all tags on the file with the provided tags",
2000
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
655
2001
  pathParams: ["file_id"],
656
- queryParams: []
2002
+ queryParams: [],
2003
+ flags: [{
2004
+ "name": "file_id",
2005
+ "description": "File ID",
2006
+ "required": true,
2007
+ "type": "string",
2008
+ "in": "path"
2009
+ }]
657
2010
  },
658
2011
  "merge-file-tags": {
659
2012
  serviceClass: "Files",
660
2013
  operationId: "mergeFileTags",
661
- description: "Merge file tags",
2014
+ description: "Merges provided tags with existing tags",
2015
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/files",
662
2016
  pathParams: ["file_id"],
663
- queryParams: []
2017
+ queryParams: [],
2018
+ flags: [{
2019
+ "name": "file_id",
2020
+ "description": "File ID",
2021
+ "required": true,
2022
+ "type": "string",
2023
+ "in": "path"
2024
+ }]
664
2025
  },
665
2026
  "search-knowledge": {
666
2027
  serviceClass: "Knowledge",
667
2028
  operationId: "searchKnowledge",
668
- description: "Search knowledge",
2029
+ description: "Searches across documents and memory entries using semantic search, file paths, document IDs, or memory IDs/tags. At least one of `query`, `document_paths`, `document_ids`, `memory_ids`, or `memory_tags` must be provided.",
2030
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/knowledge",
669
2031
  pathParams: [],
670
- queryParams: []
2032
+ queryParams: [],
2033
+ flags: [{
2034
+ "name": "project_id",
2035
+ "description": "Limit search to a specific project",
2036
+ "required": false,
2037
+ "type": "string",
2038
+ "in": "body"
2039
+ }, {
2040
+ "name": "query",
2041
+ "description": "Semantic search query text",
2042
+ "required": false,
2043
+ "type": "string",
2044
+ "in": "body"
2045
+ }, {
2046
+ "name": "min_score",
2047
+ "description": "Minimum similarity score (0\u20131). Results with lower scores are excluded. Only applies when `query` is provided.",
2048
+ "required": false,
2049
+ "type": "number",
2050
+ "in": "body"
2051
+ }, {
2052
+ "name": "limit",
2053
+ "description": "Maximum number of results to return (default 10)",
2054
+ "required": false,
2055
+ "type": "integer",
2056
+ "in": "body"
2057
+ }, {
2058
+ "name": "memory_ids",
2059
+ "description": "Search entries within these specific memories",
2060
+ "required": false,
2061
+ "type": "array",
2062
+ "in": "body"
2063
+ }, {
2064
+ "name": "memory_tags",
2065
+ "description": "Search entries in memories whose tags match any of these patterns (glob supported)",
2066
+ "required": false,
2067
+ "type": "array",
2068
+ "in": "body"
2069
+ }, {
2070
+ "name": "document_paths",
2071
+ "description": "Filter results to documents whose file path starts with one of these prefixes",
2072
+ "required": false,
2073
+ "type": "array",
2074
+ "in": "body"
2075
+ }, {
2076
+ "name": "document_ids",
2077
+ "description": "Filter results to specific document IDs",
2078
+ "required": false,
2079
+ "type": "array",
2080
+ "in": "body"
2081
+ }]
671
2082
  },
672
2083
  "list-memories": {
673
2084
  serviceClass: "Memories",
674
2085
  operationId: "listMemories",
675
- description: "List memories",
2086
+ description: "Returns a list of memory configurations for a project",
2087
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
676
2088
  pathParams: [],
677
- queryParams: ["project_id", "tags"]
2089
+ queryParams: ["project_id", "tags"],
2090
+ flags: [{
2091
+ "name": "project_id",
2092
+ "description": "Project ID (required if not using project key auth)",
2093
+ "required": false,
2094
+ "type": "string",
2095
+ "in": "query"
2096
+ }, {
2097
+ "name": "tags",
2098
+ "description": "Filter memories by tag patterns. Supports glob syntax (`*` matches any substring, `?` matches any single character). Multiple values are ORed \u2014 a memory is returned if any of its tags match any of the provided patterns. Omit to return all memories.\n",
2099
+ "required": false,
2100
+ "type": "array",
2101
+ "in": "query"
2102
+ }]
678
2103
  },
679
2104
  "create-memory": {
680
2105
  serviceClass: "Memories",
681
2106
  operationId: "createMemory",
682
- description: "Create a memory",
2107
+ description: "Creates a new memory configuration in a project",
2108
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
683
2109
  pathParams: [],
684
- queryParams: []
2110
+ queryParams: [],
2111
+ flags: [{
2112
+ "name": "project_id",
2113
+ "description": "Project ID (required if not using project key auth)",
2114
+ "required": false,
2115
+ "type": "string",
2116
+ "in": "body"
2117
+ }, {
2118
+ "name": "name",
2119
+ "description": "Memory name",
2120
+ "required": true,
2121
+ "type": "string",
2122
+ "in": "body"
2123
+ }, {
2124
+ "name": "description",
2125
+ "description": "Optional description",
2126
+ "required": false,
2127
+ "type": "string",
2128
+ "in": "body"
2129
+ }, {
2130
+ "name": "tags",
2131
+ "description": "Optional list of tags for filtering in knowledge search",
2132
+ "required": false,
2133
+ "type": "array",
2134
+ "in": "body"
2135
+ }]
685
2136
  },
686
2137
  "get-memory": {
687
2138
  serviceClass: "Memories",
688
2139
  operationId: "getMemory",
689
- description: "Get a memory",
2140
+ description: "Returns a single memory configuration by ID",
2141
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
690
2142
  pathParams: ["memory_id"],
691
- queryParams: []
2143
+ queryParams: [],
2144
+ flags: [{
2145
+ "name": "memory_id",
2146
+ "description": "",
2147
+ "required": true,
2148
+ "type": "string",
2149
+ "in": "path"
2150
+ }]
692
2151
  },
693
2152
  "update-memory": {
694
2153
  serviceClass: "Memories",
695
2154
  operationId: "updateMemory",
696
- description: "Update a memory",
2155
+ description: "Updates an existing memory configuration",
2156
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
697
2157
  pathParams: ["memory_id"],
698
- queryParams: []
2158
+ queryParams: [],
2159
+ flags: [{
2160
+ "name": "memory_id",
2161
+ "description": "",
2162
+ "required": true,
2163
+ "type": "string",
2164
+ "in": "path"
2165
+ }, {
2166
+ "name": "name",
2167
+ "description": "Memory name",
2168
+ "required": false,
2169
+ "type": "string",
2170
+ "in": "body"
2171
+ }, {
2172
+ "name": "description",
2173
+ "description": "Optional description",
2174
+ "required": false,
2175
+ "type": "string",
2176
+ "in": "body"
2177
+ }, {
2178
+ "name": "tags",
2179
+ "description": "Optional list of tags for filtering in knowledge search",
2180
+ "required": false,
2181
+ "type": "array",
2182
+ "in": "body"
2183
+ }]
699
2184
  },
700
2185
  "delete-memory": {
701
2186
  serviceClass: "Memories",
702
2187
  operationId: "deleteMemory",
703
- description: "Delete a memory",
2188
+ description: "Deletes a memory configuration",
2189
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memories",
704
2190
  pathParams: ["memory_id"],
705
- queryParams: []
2191
+ queryParams: [],
2192
+ flags: [{
2193
+ "name": "memory_id",
2194
+ "description": "",
2195
+ "required": true,
2196
+ "type": "string",
2197
+ "in": "path"
2198
+ }]
706
2199
  },
707
2200
  "list-memory-entries": {
708
2201
  serviceClass: "MemoryEntries",
709
2202
  operationId: "listMemoryEntries",
710
- description: "List memory entries",
2203
+ description: "Returns all entries in a memory container",
2204
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memoryEntries",
711
2205
  pathParams: ["memory_id"],
712
- queryParams: []
2206
+ queryParams: [],
2207
+ flags: [{
2208
+ "name": "memory_id",
2209
+ "description": "",
2210
+ "required": true,
2211
+ "type": "string",
2212
+ "in": "path"
2213
+ }]
713
2214
  },
714
2215
  "create-memory-entry": {
715
2216
  serviceClass: "MemoryEntries",
716
2217
  operationId: "createMemoryEntry",
717
- description: "Create a memory entry",
2218
+ description: "Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search.",
2219
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memoryEntries",
718
2220
  pathParams: ["memory_id"],
719
- queryParams: []
2221
+ queryParams: [],
2222
+ flags: [{
2223
+ "name": "memory_id",
2224
+ "description": "",
2225
+ "required": true,
2226
+ "type": "string",
2227
+ "in": "path"
2228
+ }, {
2229
+ "name": "content",
2230
+ "description": "The text content of the memory entry",
2231
+ "required": true,
2232
+ "type": "string",
2233
+ "in": "body"
2234
+ }, {
2235
+ "name": "source",
2236
+ "description": "How this entry was created",
2237
+ "required": false,
2238
+ "type": "string",
2239
+ "in": "body"
2240
+ }, {
2241
+ "name": "duplicate_threshold",
2242
+ "description": "Cosine similarity score at or above which the incoming content is considered a duplicate and skipped (default 0.95)",
2243
+ "required": false,
2244
+ "type": "number",
2245
+ "in": "body"
2246
+ }, {
2247
+ "name": "update_threshold",
2248
+ "description": "Cosine similarity score at or above which the incoming content is appended to the existing entry (default 0.75)",
2249
+ "required": false,
2250
+ "type": "number",
2251
+ "in": "body"
2252
+ }]
720
2253
  },
721
2254
  "get-memory-entry": {
722
2255
  serviceClass: "MemoryEntries",
723
2256
  operationId: "getMemoryEntry",
724
- description: "Get a memory entry",
2257
+ description: "Returns a single memory entry by ID",
2258
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memoryEntries",
725
2259
  pathParams: ["memory_id", "entry_id"],
726
- queryParams: []
2260
+ queryParams: [],
2261
+ flags: [{
2262
+ "name": "memory_id",
2263
+ "description": "",
2264
+ "required": true,
2265
+ "type": "string",
2266
+ "in": "path"
2267
+ }, {
2268
+ "name": "entry_id",
2269
+ "description": "",
2270
+ "required": true,
2271
+ "type": "string",
2272
+ "in": "path"
2273
+ }]
727
2274
  },
728
2275
  "update-memory-entry": {
729
2276
  serviceClass: "MemoryEntries",
730
2277
  operationId: "updateMemoryEntry",
731
- description: "Update a memory entry",
2278
+ description: "Updates an existing memory entry. Regenerates the embedding if content changes.",
2279
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memoryEntries",
732
2280
  pathParams: ["memory_id", "entry_id"],
733
- queryParams: []
2281
+ queryParams: [],
2282
+ flags: [{
2283
+ "name": "memory_id",
2284
+ "description": "",
2285
+ "required": true,
2286
+ "type": "string",
2287
+ "in": "path"
2288
+ }, {
2289
+ "name": "entry_id",
2290
+ "description": "",
2291
+ "required": true,
2292
+ "type": "string",
2293
+ "in": "path"
2294
+ }, {
2295
+ "name": "content",
2296
+ "description": "Updated text content",
2297
+ "required": false,
2298
+ "type": "string",
2299
+ "in": "body"
2300
+ }]
734
2301
  },
735
2302
  "delete-memory-entry": {
736
2303
  serviceClass: "MemoryEntries",
737
2304
  operationId: "deleteMemoryEntry",
738
- description: "Delete a memory entry",
2305
+ description: "Deletes a memory entry",
2306
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/memoryEntries",
739
2307
  pathParams: ["memory_id", "entry_id"],
740
- queryParams: []
2308
+ queryParams: [],
2309
+ flags: [{
2310
+ "name": "memory_id",
2311
+ "description": "",
2312
+ "required": true,
2313
+ "type": "string",
2314
+ "in": "path"
2315
+ }, {
2316
+ "name": "entry_id",
2317
+ "description": "",
2318
+ "required": true,
2319
+ "type": "string",
2320
+ "in": "path"
2321
+ }]
741
2322
  },
742
2323
  "list-policies": {
743
2324
  serviceClass: "Policies",
744
2325
  operationId: "listPolicies",
745
- description: "List all policies",
2326
+ description: "Returns a list of all global policies. Requires admin role.",
2327
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
746
2328
  pathParams: [],
747
- queryParams: []
2329
+ queryParams: [],
2330
+ flags: []
748
2331
  },
749
2332
  "create-policy": {
750
2333
  serviceClass: "Policies",
751
2334
  operationId: "createPolicy",
752
- description: "Create a policy",
2335
+ description: "Creates a new global policy. Requires admin role.",
2336
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
753
2337
  pathParams: [],
754
- queryParams: []
2338
+ queryParams: [],
2339
+ flags: [{
2340
+ "name": "name",
2341
+ "description": "",
2342
+ "required": false,
2343
+ "type": "string",
2344
+ "in": "body"
2345
+ }, {
2346
+ "name": "description",
2347
+ "description": "",
2348
+ "required": false,
2349
+ "type": "string",
2350
+ "in": "body"
2351
+ }, {
2352
+ "name": "document",
2353
+ "description": "",
2354
+ "required": true,
2355
+ "type": "string",
2356
+ "in": "body"
2357
+ }]
755
2358
  },
756
2359
  "get-policy": {
757
2360
  serviceClass: "Policies",
758
2361
  operationId: "getPolicy",
759
- description: "Get a policy",
2362
+ description: "Returns details of a specific policy. Requires admin role.",
2363
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
760
2364
  pathParams: ["policy_id"],
761
- queryParams: []
2365
+ queryParams: [],
2366
+ flags: [{
2367
+ "name": "policy_id",
2368
+ "description": "Policy public ID (pol_ prefix)",
2369
+ "required": true,
2370
+ "type": "string",
2371
+ "in": "path"
2372
+ }]
762
2373
  },
763
2374
  "update-policy": {
764
2375
  serviceClass: "Policies",
765
2376
  operationId: "updatePolicy",
766
- description: "Update a policy",
2377
+ description: "Updates an existing global policy. Requires admin role.",
2378
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
767
2379
  pathParams: ["policy_id"],
768
- queryParams: []
2380
+ queryParams: [],
2381
+ flags: [{
2382
+ "name": "policy_id",
2383
+ "description": "Policy public ID (pol_ prefix)",
2384
+ "required": true,
2385
+ "type": "string",
2386
+ "in": "path"
2387
+ }, {
2388
+ "name": "name",
2389
+ "description": "",
2390
+ "required": false,
2391
+ "type": "string",
2392
+ "in": "body"
2393
+ }, {
2394
+ "name": "description",
2395
+ "description": "",
2396
+ "required": false,
2397
+ "type": "string",
2398
+ "in": "body"
2399
+ }, {
2400
+ "name": "document",
2401
+ "description": "",
2402
+ "required": true,
2403
+ "type": "string",
2404
+ "in": "body"
2405
+ }]
769
2406
  },
770
2407
  "delete-policy": {
771
2408
  serviceClass: "Policies",
772
2409
  operationId: "deletePolicy",
773
- description: "Delete a policy",
2410
+ description: "Deletes a global policy. Requires admin role.",
2411
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/policies",
774
2412
  pathParams: ["policy_id"],
775
- queryParams: []
2413
+ queryParams: [],
2414
+ flags: [{
2415
+ "name": "policy_id",
2416
+ "description": "Policy public ID (pol_ prefix)",
2417
+ "required": true,
2418
+ "type": "string",
2419
+ "in": "path"
2420
+ }]
776
2421
  },
777
2422
  "create-project": {
778
2423
  serviceClass: "Projects",
779
2424
  operationId: "createProject",
780
- description: "Create a project",
2425
+ description: "Creates a new project. Requires admin role.",
2426
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
781
2427
  pathParams: [],
782
- queryParams: []
2428
+ queryParams: [],
2429
+ flags: [{
2430
+ "name": "name",
2431
+ "description": "",
2432
+ "required": true,
2433
+ "type": "string",
2434
+ "in": "body"
2435
+ }]
783
2436
  },
784
2437
  "get-project": {
785
2438
  serviceClass: "Projects",
786
2439
  operationId: "getProject",
787
- description: "Get a project",
2440
+ description: "Returns details of a specific project.",
2441
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
788
2442
  pathParams: ["project_id"],
789
- queryParams: []
2443
+ queryParams: [],
2444
+ flags: [{
2445
+ "name": "project_id",
2446
+ "description": "Project public ID (proj_ prefix)",
2447
+ "required": true,
2448
+ "type": "string",
2449
+ "in": "path"
2450
+ }]
790
2451
  },
791
2452
  "delete-project": {
792
2453
  serviceClass: "Projects",
793
2454
  operationId: "deleteProject",
794
- description: "Delete a project",
2455
+ description: "Deletes a project. Requires admin role.",
2456
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/projects",
795
2457
  pathParams: ["project_id"],
796
- queryParams: []
2458
+ queryParams: [],
2459
+ flags: [{
2460
+ "name": "project_id",
2461
+ "description": "Project public ID (proj_ prefix)",
2462
+ "required": true,
2463
+ "type": "string",
2464
+ "in": "path"
2465
+ }]
797
2466
  },
798
2467
  "list-secrets": {
799
2468
  serviceClass: "Secrets",
800
2469
  operationId: "listSecrets",
801
- description: "List secrets",
2470
+ description: "Returns a list of secrets for a project",
2471
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
802
2472
  pathParams: [],
803
- queryParams: ["project_id", "limit", "offset"]
2473
+ queryParams: ["project_id", "limit", "offset"],
2474
+ flags: [{
2475
+ "name": "project_id",
2476
+ "description": "Project ID (required if not using project key auth)",
2477
+ "required": false,
2478
+ "type": "string",
2479
+ "in": "query"
2480
+ }, {
2481
+ "name": "limit",
2482
+ "description": "Number of results per page",
2483
+ "required": false,
2484
+ "type": "integer",
2485
+ "in": "query"
2486
+ }, {
2487
+ "name": "offset",
2488
+ "description": "Number of results to skip",
2489
+ "required": false,
2490
+ "type": "integer",
2491
+ "in": "query"
2492
+ }]
804
2493
  },
805
2494
  "create-secret": {
806
2495
  serviceClass: "Secrets",
807
2496
  operationId: "createSecret",
808
- description: "Create a secret",
2497
+ description: "Creates a new encrypted secret in a project",
2498
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
809
2499
  pathParams: [],
810
- queryParams: []
2500
+ queryParams: [],
2501
+ flags: [{
2502
+ "name": "project_id",
2503
+ "description": "Project ID (required if not using project key auth)",
2504
+ "required": false,
2505
+ "type": "string",
2506
+ "in": "body"
2507
+ }, {
2508
+ "name": "name",
2509
+ "description": "Secret name",
2510
+ "required": true,
2511
+ "type": "string",
2512
+ "in": "body"
2513
+ }, {
2514
+ "name": "value",
2515
+ "description": "Secret value (will be encrypted)",
2516
+ "required": true,
2517
+ "type": "string",
2518
+ "in": "body"
2519
+ }]
811
2520
  },
812
2521
  "get-secret": {
813
2522
  serviceClass: "Secrets",
814
2523
  operationId: "getSecret",
815
- description: "Get a secret",
2524
+ description: "Returns a specific secret",
2525
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
816
2526
  pathParams: ["secret_id"],
817
- queryParams: []
2527
+ queryParams: [],
2528
+ flags: [{
2529
+ "name": "secret_id",
2530
+ "description": "Secret ID",
2531
+ "required": true,
2532
+ "type": "string",
2533
+ "in": "path"
2534
+ }]
818
2535
  },
819
2536
  "update-secret": {
820
2537
  serviceClass: "Secrets",
821
2538
  operationId: "updateSecret",
822
- description: "Update a secret",
2539
+ description: "Updates a secret's name and/or value",
2540
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
823
2541
  pathParams: ["secret_id"],
824
- queryParams: []
2542
+ queryParams: [],
2543
+ flags: [{
2544
+ "name": "secret_id",
2545
+ "description": "Secret ID",
2546
+ "required": true,
2547
+ "type": "string",
2548
+ "in": "path"
2549
+ }, {
2550
+ "name": "name",
2551
+ "description": "New secret name",
2552
+ "required": false,
2553
+ "type": "string",
2554
+ "in": "body"
2555
+ }, {
2556
+ "name": "value",
2557
+ "description": "New secret value",
2558
+ "required": false,
2559
+ "type": "string",
2560
+ "in": "body"
2561
+ }]
825
2562
  },
826
2563
  "delete-secret": {
827
2564
  serviceClass: "Secrets",
828
2565
  operationId: "deleteSecret",
829
- description: "Delete a secret",
2566
+ description: "Deletes a secret",
2567
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/secrets",
830
2568
  pathParams: ["secret_id"],
831
- queryParams: []
2569
+ queryParams: [],
2570
+ flags: [{
2571
+ "name": "secret_id",
2572
+ "description": "Secret ID",
2573
+ "required": true,
2574
+ "type": "string",
2575
+ "in": "path"
2576
+ }]
832
2577
  },
833
2578
  "list-agent-sessions": {
834
2579
  serviceClass: "Sessions",
835
2580
  operationId: "listAgentSessions",
836
- description: "List sessions",
2581
+ description: "Returns sessions for the specified agent, optionally filtered by actorId and status.",
2582
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
837
2583
  pathParams: ["agent_id"],
838
- queryParams: ["actor_id", "status", "limit", "offset"]
2584
+ queryParams: ["actor_id", "status", "limit", "offset"],
2585
+ flags: [{
2586
+ "name": "agent_id",
2587
+ "description": "Agent public ID",
2588
+ "required": true,
2589
+ "type": "string",
2590
+ "in": "path"
2591
+ }, {
2592
+ "name": "actor_id",
2593
+ "description": "Filter by actor public ID",
2594
+ "required": false,
2595
+ "type": "string",
2596
+ "in": "query"
2597
+ }, {
2598
+ "name": "status",
2599
+ "description": "Filter by session status (open or closed)",
2600
+ "required": false,
2601
+ "type": "string",
2602
+ "in": "query"
2603
+ }, {
2604
+ "name": "limit",
2605
+ "description": "",
2606
+ "required": false,
2607
+ "type": "integer",
2608
+ "in": "query"
2609
+ }, {
2610
+ "name": "offset",
2611
+ "description": "",
2612
+ "required": false,
2613
+ "type": "integer",
2614
+ "in": "query"
2615
+ }]
839
2616
  },
840
2617
  "create-agent-session": {
841
2618
  serviceClass: "Sessions",
842
2619
  operationId: "createAgentSession",
843
- description: "Create a session",
2620
+ description: "Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.",
2621
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
844
2622
  pathParams: ["agent_id"],
845
- queryParams: []
2623
+ queryParams: [],
2624
+ flags: [{
2625
+ "name": "agent_id",
2626
+ "description": "Agent public ID",
2627
+ "required": true,
2628
+ "type": "string",
2629
+ "in": "path"
2630
+ }]
846
2631
  },
847
2632
  "get-agent-session": {
848
2633
  serviceClass: "Sessions",
849
2634
  operationId: "getAgentSession",
850
- description: "Get a session",
2635
+ description: "Returns details of a single session.",
2636
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
851
2637
  pathParams: ["agent_id", "session_id"],
852
- queryParams: []
2638
+ queryParams: [],
2639
+ flags: [{
2640
+ "name": "agent_id",
2641
+ "description": "Agent public ID",
2642
+ "required": true,
2643
+ "type": "string",
2644
+ "in": "path"
2645
+ }, {
2646
+ "name": "session_id",
2647
+ "description": "Session public ID",
2648
+ "required": true,
2649
+ "type": "string",
2650
+ "in": "path"
2651
+ }]
853
2652
  },
854
2653
  "update-session": {
855
2654
  serviceClass: "Sessions",
856
2655
  operationId: "updateSession",
857
- description: "Update a session",
2656
+ description: "Updates the session name and/or status.",
2657
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
858
2658
  pathParams: ["agent_id", "session_id"],
859
- queryParams: []
2659
+ queryParams: [],
2660
+ flags: [{
2661
+ "name": "agent_id",
2662
+ "description": "Agent public ID",
2663
+ "required": true,
2664
+ "type": "string",
2665
+ "in": "path"
2666
+ }, {
2667
+ "name": "session_id",
2668
+ "description": "Session public ID",
2669
+ "required": true,
2670
+ "type": "string",
2671
+ "in": "path"
2672
+ }]
860
2673
  },
861
2674
  "delete-agent-session": {
862
2675
  serviceClass: "Sessions",
863
2676
  operationId: "deleteAgentSession",
864
- description: "Delete a session",
2677
+ description: "Deletes the session and its underlying conversation and actors.",
2678
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
865
2679
  pathParams: ["agent_id", "session_id"],
866
- queryParams: []
2680
+ queryParams: [],
2681
+ flags: [{
2682
+ "name": "agent_id",
2683
+ "description": "Agent public ID",
2684
+ "required": true,
2685
+ "type": "string",
2686
+ "in": "path"
2687
+ }, {
2688
+ "name": "session_id",
2689
+ "description": "Session public ID",
2690
+ "required": true,
2691
+ "type": "string",
2692
+ "in": "path"
2693
+ }]
867
2694
  },
868
2695
  "list-agent-session-messages": {
869
2696
  serviceClass: "Sessions",
870
2697
  operationId: "listAgentSessionMessages",
871
- description: "List session messages",
2698
+ description: "Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.",
2699
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
872
2700
  pathParams: ["agent_id", "session_id"],
873
- queryParams: ["limit", "offset"]
2701
+ queryParams: ["limit", "offset"],
2702
+ flags: [{
2703
+ "name": "agent_id",
2704
+ "description": "Agent public ID",
2705
+ "required": true,
2706
+ "type": "string",
2707
+ "in": "path"
2708
+ }, {
2709
+ "name": "session_id",
2710
+ "description": "Session public ID",
2711
+ "required": true,
2712
+ "type": "string",
2713
+ "in": "path"
2714
+ }, {
2715
+ "name": "limit",
2716
+ "description": "",
2717
+ "required": false,
2718
+ "type": "integer",
2719
+ "in": "query"
2720
+ }, {
2721
+ "name": "offset",
2722
+ "description": "",
2723
+ "required": false,
2724
+ "type": "integer",
2725
+ "in": "query"
2726
+ }]
874
2727
  },
875
2728
  "add-session-message": {
876
2729
  serviceClass: "Sessions",
877
2730
  operationId: "addSessionMessage",
878
- description: "Add a user message",
2731
+ description: "Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.",
2732
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
879
2733
  pathParams: ["agent_id", "session_id"],
880
- queryParams: []
2734
+ queryParams: [],
2735
+ flags: [{
2736
+ "name": "agent_id",
2737
+ "description": "Agent public ID",
2738
+ "required": true,
2739
+ "type": "string",
2740
+ "in": "path"
2741
+ }, {
2742
+ "name": "session_id",
2743
+ "description": "Session public ID",
2744
+ "required": true,
2745
+ "type": "string",
2746
+ "in": "path"
2747
+ }]
881
2748
  },
882
2749
  "generate-session-response": {
883
2750
  serviceClass: "Sessions",
884
2751
  operationId: "generateSessionResponse",
885
- description: "Trigger agent generation",
2752
+ description: "Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.",
2753
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
886
2754
  pathParams: ["agent_id", "session_id"],
887
- queryParams: ["async"]
2755
+ queryParams: ["async"],
2756
+ flags: [{
2757
+ "name": "agent_id",
2758
+ "description": "Agent public ID",
2759
+ "required": true,
2760
+ "type": "string",
2761
+ "in": "path"
2762
+ }, {
2763
+ "name": "session_id",
2764
+ "description": "Session public ID",
2765
+ "required": true,
2766
+ "type": "string",
2767
+ "in": "path"
2768
+ }, {
2769
+ "name": "async",
2770
+ "description": "When true, generation runs in the background and 202 is returned immediately",
2771
+ "required": false,
2772
+ "type": "boolean",
2773
+ "in": "query"
2774
+ }]
888
2775
  },
889
2776
  "submit-session-tool-outputs": {
890
2777
  serviceClass: "Sessions",
891
2778
  operationId: "submitSessionToolOutputs",
892
- description: "Submit tool outputs",
2779
+ description: "Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.",
2780
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
893
2781
  pathParams: ["agent_id", "session_id"],
894
- queryParams: []
2782
+ queryParams: [],
2783
+ flags: [{
2784
+ "name": "agent_id",
2785
+ "description": "Agent public ID",
2786
+ "required": true,
2787
+ "type": "string",
2788
+ "in": "path"
2789
+ }, {
2790
+ "name": "session_id",
2791
+ "description": "Session public ID",
2792
+ "required": true,
2793
+ "type": "string",
2794
+ "in": "path"
2795
+ }]
895
2796
  },
896
2797
  "get-session-tags": {
897
2798
  serviceClass: "Sessions",
898
2799
  operationId: "getSessionTags",
899
- description: "Get session tags",
2800
+ description: "Returns the session's tags object.",
2801
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
900
2802
  pathParams: ["agent_id", "session_id"],
901
- queryParams: []
2803
+ queryParams: [],
2804
+ flags: [{
2805
+ "name": "agent_id",
2806
+ "description": "Agent public ID",
2807
+ "required": true,
2808
+ "type": "string",
2809
+ "in": "path"
2810
+ }, {
2811
+ "name": "session_id",
2812
+ "description": "Session public ID",
2813
+ "required": true,
2814
+ "type": "string",
2815
+ "in": "path"
2816
+ }]
902
2817
  },
903
2818
  "replace-session-tags": {
904
2819
  serviceClass: "Sessions",
905
2820
  operationId: "replaceSessionTags",
906
- description: "Replace session tags",
2821
+ description: "Replaces all tags on the session.",
2822
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
907
2823
  pathParams: ["agent_id", "session_id"],
908
- queryParams: []
2824
+ queryParams: [],
2825
+ flags: [{
2826
+ "name": "agent_id",
2827
+ "description": "Agent public ID",
2828
+ "required": true,
2829
+ "type": "string",
2830
+ "in": "path"
2831
+ }, {
2832
+ "name": "session_id",
2833
+ "description": "Session public ID",
2834
+ "required": true,
2835
+ "type": "string",
2836
+ "in": "path"
2837
+ }]
909
2838
  },
910
2839
  "merge-session-tags": {
911
2840
  serviceClass: "Sessions",
912
2841
  operationId: "mergeSessionTags",
913
- description: "Merge session tags",
2842
+ description: "Merges the provided tags into the session's existing tags.",
2843
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
914
2844
  pathParams: ["agent_id", "session_id"],
915
- queryParams: []
2845
+ queryParams: [],
2846
+ flags: [{
2847
+ "name": "agent_id",
2848
+ "description": "Agent public ID",
2849
+ "required": true,
2850
+ "type": "string",
2851
+ "in": "path"
2852
+ }, {
2853
+ "name": "session_id",
2854
+ "description": "Session public ID",
2855
+ "required": true,
2856
+ "type": "string",
2857
+ "in": "path"
2858
+ }]
916
2859
  },
917
2860
  "list-traces": {
918
2861
  serviceClass: "Traces",
919
2862
  operationId: "listTraces",
920
- description: "List traces",
2863
+ description: "Returns a paginated list of execution traces for the project.",
2864
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/traces",
921
2865
  pathParams: [],
922
- queryParams: ["project_id", "limit", "offset"]
2866
+ queryParams: ["project_id", "limit", "offset"],
2867
+ flags: [{
2868
+ "name": "project_id",
2869
+ "description": "Project public ID to filter by",
2870
+ "required": false,
2871
+ "type": "string",
2872
+ "in": "query"
2873
+ }, {
2874
+ "name": "limit",
2875
+ "description": "Maximum number of results to return",
2876
+ "required": false,
2877
+ "type": "integer",
2878
+ "in": "query"
2879
+ }, {
2880
+ "name": "offset",
2881
+ "description": "Number of results to skip",
2882
+ "required": false,
2883
+ "type": "integer",
2884
+ "in": "query"
2885
+ }]
923
2886
  },
924
2887
  "get-trace": {
925
2888
  serviceClass: "Traces",
926
2889
  operationId: "getTrace",
927
- description: "Get a trace",
2890
+ description: "Returns a single trace by ID.",
2891
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/traces",
928
2892
  pathParams: ["trace_id"],
929
- queryParams: []
2893
+ queryParams: [],
2894
+ flags: [{
2895
+ "name": "trace_id",
2896
+ "description": "Public ID of the trace",
2897
+ "required": true,
2898
+ "type": "string",
2899
+ "in": "path"
2900
+ }]
930
2901
  },
931
2902
  "get-trace-tree": {
932
2903
  serviceClass: "Traces",
933
2904
  operationId: "getTraceTree",
934
- description: "Get trace tree",
2905
+ description: "Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.",
2906
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/traces",
935
2907
  pathParams: ["trace_id"],
936
- queryParams: []
2908
+ queryParams: [],
2909
+ flags: [{
2910
+ "name": "trace_id",
2911
+ "description": "Public ID of any trace in the tree (root or child)",
2912
+ "required": true,
2913
+ "type": "string",
2914
+ "in": "path"
2915
+ }]
937
2916
  },
938
2917
  "list-users": {
939
2918
  serviceClass: "Users",
940
2919
  operationId: "listUsers",
941
- description: "List all users",
2920
+ description: "Returns a list of all users",
2921
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
942
2922
  pathParams: [],
943
- queryParams: []
2923
+ queryParams: [],
2924
+ flags: []
944
2925
  },
945
2926
  "create-user": {
946
2927
  serviceClass: "Users",
947
2928
  operationId: "createUser",
948
- description: "Create a user",
2929
+ description: "Creates a new user in the system",
2930
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
949
2931
  pathParams: [],
950
- queryParams: []
2932
+ queryParams: [],
2933
+ flags: [{
2934
+ "name": "username",
2935
+ "description": "",
2936
+ "required": true,
2937
+ "type": "string",
2938
+ "in": "body"
2939
+ }, {
2940
+ "name": "password",
2941
+ "description": "",
2942
+ "required": true,
2943
+ "type": "string",
2944
+ "in": "body"
2945
+ }, {
2946
+ "name": "role",
2947
+ "description": "",
2948
+ "required": false,
2949
+ "type": "string",
2950
+ "in": "body"
2951
+ }]
951
2952
  },
952
2953
  "get-user": {
953
2954
  serviceClass: "Users",
954
2955
  operationId: "getUser",
955
- description: "Get a user by ID",
2956
+ description: "Returns the data of a specific user",
2957
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
956
2958
  pathParams: ["user_id"],
957
- queryParams: []
2959
+ queryParams: [],
2960
+ flags: [{
2961
+ "name": "user_id",
2962
+ "description": "User ID",
2963
+ "required": true,
2964
+ "type": "string",
2965
+ "in": "path"
2966
+ }]
958
2967
  },
959
2968
  "delete-user": {
960
2969
  serviceClass: "Users",
961
2970
  operationId: "deleteUser",
962
- description: "Delete a user by ID",
2971
+ description: "Deletes a specific user",
2972
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
963
2973
  pathParams: ["user_id"],
964
- queryParams: []
2974
+ queryParams: [],
2975
+ flags: [{
2976
+ "name": "user_id",
2977
+ "description": "User ID",
2978
+ "required": true,
2979
+ "type": "string",
2980
+ "in": "path"
2981
+ }]
965
2982
  },
966
2983
  "bootstrap-user": {
967
2984
  serviceClass: "Users",
968
2985
  operationId: "bootstrapUser",
969
- description: "Create the first admin user",
2986
+ description: "Creates the first admin user. Returns 409 if any user already exists.",
2987
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
970
2988
  pathParams: [],
971
- queryParams: []
2989
+ queryParams: [],
2990
+ flags: [{
2991
+ "name": "username",
2992
+ "description": "",
2993
+ "required": true,
2994
+ "type": "string",
2995
+ "in": "body"
2996
+ }, {
2997
+ "name": "password",
2998
+ "description": "",
2999
+ "required": true,
3000
+ "type": "string",
3001
+ "in": "body"
3002
+ }]
972
3003
  },
973
3004
  "login-user": {
974
3005
  serviceClass: "Users",
975
3006
  operationId: "loginUser",
976
- description: "Login user",
3007
+ description: "Authenticates a user and returns a JWT token",
3008
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
977
3009
  pathParams: [],
978
- queryParams: []
3010
+ queryParams: [],
3011
+ flags: [{
3012
+ "name": "username",
3013
+ "description": "",
3014
+ "required": true,
3015
+ "type": "string",
3016
+ "in": "body"
3017
+ }, {
3018
+ "name": "password",
3019
+ "description": "",
3020
+ "required": true,
3021
+ "type": "string",
3022
+ "in": "body"
3023
+ }]
979
3024
  },
980
3025
  "get-user-policies": {
981
3026
  serviceClass: "Users",
982
3027
  operationId: "getUserPolicies",
983
- description: "Get policies attached to a user",
3028
+ description: "Returns the list of policies attached to a user. Requires admin role.",
3029
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
984
3030
  pathParams: ["user_id"],
985
- queryParams: []
3031
+ queryParams: [],
3032
+ flags: [{
3033
+ "name": "user_id",
3034
+ "description": "User public ID (usr_ prefix)",
3035
+ "required": true,
3036
+ "type": "string",
3037
+ "in": "path"
3038
+ }]
986
3039
  },
987
3040
  "attach-user-policies": {
988
3041
  serviceClass: "Users",
989
3042
  operationId: "attachUserPolicies",
990
- description: "Attach policies to a user",
3043
+ description: "Replaces the user's policy list with the provided policy IDs. Requires admin role.",
3044
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/users",
991
3045
  pathParams: ["user_id"],
992
- queryParams: []
3046
+ queryParams: [],
3047
+ flags: [{
3048
+ "name": "user_id",
3049
+ "description": "User public ID (usr_ prefix)",
3050
+ "required": true,
3051
+ "type": "string",
3052
+ "in": "path"
3053
+ }, {
3054
+ "name": "policy_ids",
3055
+ "description": "List of policy public IDs to attach (replaces existing)",
3056
+ "required": true,
3057
+ "type": "array",
3058
+ "in": "body"
3059
+ }]
993
3060
  },
994
3061
  "list-webhooks": {
995
3062
  serviceClass: "Webhooks",
996
3063
  operationId: "listWebhooks",
997
- description: "List webhooks for a project",
3064
+ description: "Lists all webhooks configured for the specified project",
3065
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
998
3066
  pathParams: ["project_id"],
999
- queryParams: []
3067
+ queryParams: [],
3068
+ flags: [{
3069
+ "name": "project_id",
3070
+ "description": "",
3071
+ "required": true,
3072
+ "type": "string",
3073
+ "in": "path"
3074
+ }]
1000
3075
  },
1001
3076
  "create-webhook": {
1002
3077
  serviceClass: "Webhooks",
1003
3078
  operationId: "createWebhook",
1004
- description: "Create a webhook",
3079
+ description: "Creates a new webhook for the specified project",
3080
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1005
3081
  pathParams: ["project_id"],
1006
- queryParams: []
3082
+ queryParams: [],
3083
+ flags: [{
3084
+ "name": "project_id",
3085
+ "description": "",
3086
+ "required": true,
3087
+ "type": "string",
3088
+ "in": "path"
3089
+ }]
1007
3090
  },
1008
3091
  "get-webhook": {
1009
3092
  serviceClass: "Webhooks",
1010
3093
  operationId: "getWebhook",
1011
- description: "Get a webhook",
3094
+ description: "Retrieves the details of a specific webhook",
3095
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1012
3096
  pathParams: ["project_id", "webhook_id"],
1013
- queryParams: []
3097
+ queryParams: [],
3098
+ flags: [{
3099
+ "name": "project_id",
3100
+ "description": "",
3101
+ "required": true,
3102
+ "type": "string",
3103
+ "in": "path"
3104
+ }, {
3105
+ "name": "webhook_id",
3106
+ "description": "",
3107
+ "required": true,
3108
+ "type": "string",
3109
+ "in": "path"
3110
+ }]
1014
3111
  },
1015
3112
  "update-webhook": {
1016
3113
  serviceClass: "Webhooks",
1017
3114
  operationId: "updateWebhook",
1018
- description: "Update a webhook",
3115
+ description: "Updates an existing webhook's configuration",
3116
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1019
3117
  pathParams: ["project_id", "webhook_id"],
1020
- queryParams: []
3118
+ queryParams: [],
3119
+ flags: [{
3120
+ "name": "project_id",
3121
+ "description": "",
3122
+ "required": true,
3123
+ "type": "string",
3124
+ "in": "path"
3125
+ }, {
3126
+ "name": "webhook_id",
3127
+ "description": "",
3128
+ "required": true,
3129
+ "type": "string",
3130
+ "in": "path"
3131
+ }]
1021
3132
  },
1022
3133
  "delete-webhook": {
1023
3134
  serviceClass: "Webhooks",
1024
3135
  operationId: "deleteWebhook",
1025
- description: "Delete a webhook",
3136
+ description: "Deletes a webhook and stops all event deliveries",
3137
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1026
3138
  pathParams: ["project_id", "webhook_id"],
1027
- queryParams: []
3139
+ queryParams: [],
3140
+ flags: [{
3141
+ "name": "project_id",
3142
+ "description": "",
3143
+ "required": true,
3144
+ "type": "string",
3145
+ "in": "path"
3146
+ }, {
3147
+ "name": "webhook_id",
3148
+ "description": "",
3149
+ "required": true,
3150
+ "type": "string",
3151
+ "in": "path"
3152
+ }]
1028
3153
  },
1029
3154
  "list-webhook-deliveries": {
1030
3155
  serviceClass: "Webhooks",
1031
3156
  operationId: "listWebhookDeliveries",
1032
- description: "List deliveries for a webhook",
3157
+ description: "Lists all event deliveries for a specific webhook",
3158
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1033
3159
  pathParams: ["project_id", "webhook_id"],
1034
- queryParams: ["limit", "offset"]
3160
+ queryParams: ["limit", "offset"],
3161
+ flags: [{
3162
+ "name": "project_id",
3163
+ "description": "",
3164
+ "required": true,
3165
+ "type": "string",
3166
+ "in": "path"
3167
+ }, {
3168
+ "name": "webhook_id",
3169
+ "description": "",
3170
+ "required": true,
3171
+ "type": "string",
3172
+ "in": "path"
3173
+ }, {
3174
+ "name": "limit",
3175
+ "description": "",
3176
+ "required": false,
3177
+ "type": "integer",
3178
+ "in": "query"
3179
+ }, {
3180
+ "name": "offset",
3181
+ "description": "",
3182
+ "required": false,
3183
+ "type": "integer",
3184
+ "in": "query"
3185
+ }]
1035
3186
  },
1036
3187
  "get-webhook-delivery": {
1037
3188
  serviceClass: "Webhooks",
1038
3189
  operationId: "getWebhookDelivery",
1039
- description: "Get a delivery",
3190
+ description: "Retrieves the details of a specific webhook delivery",
3191
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1040
3192
  pathParams: ["project_id", "webhook_id", "delivery_id"],
1041
- queryParams: []
3193
+ queryParams: [],
3194
+ flags: [{
3195
+ "name": "project_id",
3196
+ "description": "",
3197
+ "required": true,
3198
+ "type": "string",
3199
+ "in": "path"
3200
+ }, {
3201
+ "name": "webhook_id",
3202
+ "description": "",
3203
+ "required": true,
3204
+ "type": "string",
3205
+ "in": "path"
3206
+ }, {
3207
+ "name": "delivery_id",
3208
+ "description": "",
3209
+ "required": true,
3210
+ "type": "string",
3211
+ "in": "path"
3212
+ }]
1042
3213
  },
1043
3214
  "rotate-webhook-secret": {
1044
3215
  serviceClass: "Webhooks",
1045
3216
  operationId: "rotateWebhookSecret",
1046
- description: "Rotate webhook secret",
3217
+ description: "Rotates the secret key for the specified webhook",
3218
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/webhooks",
1047
3219
  pathParams: ["project_id", "webhook_id"],
1048
- queryParams: []
3220
+ queryParams: [],
3221
+ flags: [{
3222
+ "name": "project_id",
3223
+ "description": "",
3224
+ "required": true,
3225
+ "type": "string",
3226
+ "in": "path"
3227
+ }, {
3228
+ "name": "webhook_id",
3229
+ "description": "",
3230
+ "required": true,
3231
+ "type": "string",
3232
+ "in": "path"
3233
+ }]
1049
3234
  }
1050
3235
  };
1051
3236
 
@@ -1058,23 +3243,6 @@ var toCanonical = /* @__PURE__ */__name(s => {
1058
3243
  var kebabToSnake = /* @__PURE__ */__name(s => {
1059
3244
  return s.replace(/-/g, "_");
1060
3245
  }, "kebabToSnake");
1061
- var parseUnknown = /* @__PURE__ */__name(args => {
1062
- const result = {};
1063
- for (let i = 0; i < args.length; i++) {
1064
- const arg = args[i];
1065
- if (arg?.startsWith("--")) {
1066
- const key = arg.slice(2);
1067
- const val = args[i + 1];
1068
- if (val !== void 0 && !val.startsWith("--")) {
1069
- result[key] = val;
1070
- i++;
1071
- } else {
1072
- result[key] = "true";
1073
- }
1074
- }
1075
- }
1076
- return result;
1077
- }, "parseUnknown");
1078
3246
  var parseFlagValue = /* @__PURE__ */__name(value => {
1079
3247
  const trimmed = value.trim();
1080
3248
  if (trimmed.startsWith("{") || trimmed.startsWith("[") || trimmed === "true" || trimmed === "false" || trimmed === "null" || /^-?\d+(\.\d+)?$/.test(trimmed)) {
@@ -1103,7 +3271,13 @@ var resolveServiceClass = /* @__PURE__ */__name(serviceClassName => {
1103
3271
  return void 0;
1104
3272
  }, "resolveServiceClass");
1105
3273
  program.name("soat").description("SOAT CLI").version(package_default.version).option("-p, --profile <name>", "config profile to use");
3274
+ program.addHelpText("after", "\nTip: Run `soat <command> --help` to see command-specific flags and docs.");
1106
3275
  program.command("configure").description("Save credentials to a named profile (~/.soat/config.json)").option("-p, --profile <name>", "profile name", "default").action(async opts => {
3276
+ const [{
3277
+ default: input
3278
+ }, {
3279
+ default: password
3280
+ }] = await Promise.all([import("@inquirer/input"), import("@inquirer/password")]);
1107
3281
  const baseUrl = await input({
1108
3282
  message: "Base URL:"
1109
3283
  });
@@ -1237,7 +3411,7 @@ program.command("listen").description("Start a local webhook listener for testin
1237
3411
  });
1238
3412
  });
1239
3413
  });
1240
- program.argument("[command]", "API command in kebab-case (e.g. list-actors)").argument("[args...]").allowUnknownOption().action(async commandName => {
3414
+ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").argument("[args...]").allowUnknownOption().passThroughOptions().action(async commandName => {
1241
3415
  if (!commandName) {
1242
3416
  program.help();
1243
3417
  return;
@@ -1250,7 +3424,40 @@ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").ar
1250
3424
  }
1251
3425
  const rawIdx = process.argv.indexOf(commandName);
1252
3426
  const rawArgs = rawIdx >= 0 ? process.argv.slice(rawIdx + 1) : [];
1253
- const flags = parseUnknown(rawArgs);
3427
+ if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
3428
+ const wrapperFlags = getWrapperHelpFlags(commandName);
3429
+ const allFlags = [...route.flags, ...wrapperFlags.map(f => {
3430
+ return {
3431
+ ...f,
3432
+ in: "wrapper"
3433
+ };
3434
+ })];
3435
+ console.log(`
3436
+ Usage: soat ${commandName} [flags]
3437
+ `);
3438
+ console.log(` ${route.description}
3439
+ `);
3440
+ console.log(` Module docs: ${route.moduleDocsUrl}
3441
+ `);
3442
+ if (allFlags.length > 0) {
3443
+ console.log("Flags:");
3444
+ for (const f of allFlags) {
3445
+ const req = f.required ? " [required]" : "";
3446
+ const desc = f.description ? ` ${f.description}` : "";
3447
+ console.log(` --${f.name} <${f.type}>${req}${desc}`);
3448
+ }
3449
+ }
3450
+ process.exit(0);
3451
+ }
3452
+ const parsedFlags = parseUnknownWithRepeats({
3453
+ cliArgs: rawArgs
3454
+ });
3455
+ const wrapped = applyWrapperForCommand({
3456
+ commandName,
3457
+ route,
3458
+ parsedFlags
3459
+ });
3460
+ const flags = wrapped.flags.single;
1254
3461
  const pathArgs = {};
1255
3462
  const queryArgs = {};
1256
3463
  const bodyArgs = {};
@@ -1287,6 +3494,9 @@ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").ar
1287
3494
  const callOpts = {
1288
3495
  client
1289
3496
  };
3497
+ if (Object.keys(wrapped.forcedBody).length) {
3498
+ Object.assign(bodyArgs, wrapped.forcedBody);
3499
+ }
1290
3500
  if (Object.keys(pathArgs).length) callOpts["path"] = pathArgs;
1291
3501
  if (Object.keys(queryArgs).length) callOpts["query"] = queryArgs;
1292
3502
  if (Object.keys(bodyArgs).length) callOpts["body"] = bodyArgs;
@@ -1305,4 +3515,20 @@ program.argument("[command]", "API command in kebab-case (e.g. list-actors)").ar
1305
3515
  }
1306
3516
  console.log(JSON.stringify(result.data, null, 2));
1307
3517
  });
1308
- program.parse();
3518
+ var runCli = /* @__PURE__ */__name(async args => {
3519
+ const previousArgv = process.argv;
3520
+ process.argv = args;
3521
+ try {
3522
+ await program.parseAsync(args);
3523
+ } finally {
3524
+ process.argv = previousArgv;
3525
+ }
3526
+ }, "runCli");
3527
+ var isMainModule = (() => {
3528
+ if (!process.argv[1]) return false;
3529
+ return nodePath.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
3530
+ })();
3531
+ if (isMainModule) {
3532
+ void runCli(process.argv);
3533
+ }
3534
+ export { runCli };