@soat/cli 0.14.0 → 0.14.1

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 (2) hide show
  1. package/dist/index.mjs +305 -11
  2. package/package.json +9 -10
package/dist/index.mjs CHANGED
@@ -7,11 +7,11 @@ import * as sdk from "@soat/sdk";
7
7
  import { createClient, createConfig } from "@soat/sdk";
8
8
  import { program } from "commander";
9
9
  import * as fs from "node:fs";
10
- import yaml from "js-yaml";
10
+ import { load } from "js-yaml";
11
11
  import * as os from "node:os";
12
12
 
13
13
  //#region package.json
14
- var version = "0.14.0";
14
+ var version = "0.14.1";
15
15
 
16
16
  //#endregion
17
17
  //#region src/cli-wrappers/wrappers/formations.ts
@@ -62,7 +62,7 @@ var readTemplateFromPath = args => {
62
62
  return JSON.parse(trimmed);
63
63
  } catch {}
64
64
  try {
65
- return yaml.load(trimmed);
65
+ return load(trimmed);
66
66
  } catch {
67
67
  throw new Error(`Template file must contain valid JSON or YAML: ${templatePath}`);
68
68
  }
@@ -4192,7 +4192,7 @@ var routes = {
4192
4192
  "delete-session": {
4193
4193
  serviceClass: "Sessions",
4194
4194
  operationId: "deleteSession",
4195
- description: "Deletes the session and its underlying conversation and actors.",
4195
+ description: "Deletes the session and its underlying conversation and messages. The session's actor is not deleted. Generations and traces produced by the session are not deleted either, since they are not linked to the session or conversation.",
4196
4196
  moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/sessions",
4197
4197
  pathParams: ["session_id"],
4198
4198
  queryParams: [],
@@ -4431,10 +4431,10 @@ var routes = {
4431
4431
  "type": "object",
4432
4432
  "in": "body"
4433
4433
  }, {
4434
- "name": "discussion",
4435
- "description": "Discussion config for `discussion` tools: `{ discussion_id }`. See the `discussion` field on the Tool schema for details.",
4434
+ "name": "discussion_id",
4435
+ "description": "For `discussion` tools: the ID of the discussion to invoke.",
4436
4436
  "required": false,
4437
- "type": "object",
4437
+ "type": "string",
4438
4438
  "in": "body"
4439
4439
  }, {
4440
4440
  "name": "output_mapping",
@@ -4527,10 +4527,10 @@ var routes = {
4527
4527
  "type": "object",
4528
4528
  "in": "body"
4529
4529
  }, {
4530
- "name": "discussion",
4531
- "description": "Discussion config for `discussion` tools: `{ discussion_id }`. See the `discussion` field on the Tool schema for details.",
4530
+ "name": "discussion_id",
4531
+ "description": "For `discussion` tools: the ID of the discussion to invoke.",
4532
4532
  "required": false,
4533
- "type": "object",
4533
+ "type": "string",
4534
4534
  "in": "body"
4535
4535
  }, {
4536
4536
  "name": "output_mapping",
@@ -4645,6 +4645,300 @@ var routes = {
4645
4645
  "in": "query"
4646
4646
  }]
4647
4647
  },
4648
+ "list-triggers": {
4649
+ serviceClass: "Triggers",
4650
+ operationId: "listTriggers",
4651
+ description: "Lists triggers. Filter by project, starter type, or target type.",
4652
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4653
+ pathParams: [],
4654
+ queryParams: ["project_id", "type", "target_type"],
4655
+ flags: [{
4656
+ "name": "project_id",
4657
+ "description": "",
4658
+ "required": false,
4659
+ "type": "string",
4660
+ "in": "query"
4661
+ }, {
4662
+ "name": "type",
4663
+ "description": "",
4664
+ "required": false,
4665
+ "type": "string",
4666
+ "in": "query"
4667
+ }, {
4668
+ "name": "target_type",
4669
+ "description": "",
4670
+ "required": false,
4671
+ "type": "string",
4672
+ "in": "query"
4673
+ }]
4674
+ },
4675
+ "create-trigger": {
4676
+ serviceClass: "Triggers",
4677
+ operationId: "createTrigger",
4678
+ description: "Creates a new trigger for a project",
4679
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4680
+ pathParams: [],
4681
+ queryParams: [],
4682
+ flags: [{
4683
+ "name": "project_id",
4684
+ "description": "Public ID of the project. Optional when authenticating with a project-scoped API key, which defaults to the key's project; required otherwise.",
4685
+ "required": false,
4686
+ "type": "string",
4687
+ "in": "body"
4688
+ }, {
4689
+ "name": "name",
4690
+ "description": "",
4691
+ "required": true,
4692
+ "type": "string",
4693
+ "in": "body"
4694
+ }, {
4695
+ "name": "description",
4696
+ "description": "",
4697
+ "required": false,
4698
+ "type": "string",
4699
+ "in": "body"
4700
+ }, {
4701
+ "name": "type",
4702
+ "description": "",
4703
+ "required": true,
4704
+ "type": "string",
4705
+ "in": "body"
4706
+ }, {
4707
+ "name": "target_type",
4708
+ "description": "",
4709
+ "required": true,
4710
+ "type": "string",
4711
+ "in": "body"
4712
+ }, {
4713
+ "name": "target_id",
4714
+ "description": "",
4715
+ "required": true,
4716
+ "type": "string",
4717
+ "in": "body"
4718
+ }, {
4719
+ "name": "action",
4720
+ "description": "Tool targets only — the action for soat/mcp tools",
4721
+ "required": false,
4722
+ "type": "string",
4723
+ "in": "body"
4724
+ }, {
4725
+ "name": "input",
4726
+ "description": "",
4727
+ "required": false,
4728
+ "type": "object",
4729
+ "in": "body"
4730
+ }, {
4731
+ "name": "cron",
4732
+ "description": "5-field cron expression (UTC). Required when type is schedule",
4733
+ "required": false,
4734
+ "type": "string",
4735
+ "in": "body"
4736
+ }, {
4737
+ "name": "active",
4738
+ "description": "",
4739
+ "required": false,
4740
+ "type": "boolean",
4741
+ "in": "body"
4742
+ }, {
4743
+ "name": "policy_id",
4744
+ "description": "",
4745
+ "required": false,
4746
+ "type": "string",
4747
+ "in": "body"
4748
+ }]
4749
+ },
4750
+ "get-trigger": {
4751
+ serviceClass: "Triggers",
4752
+ operationId: "getTrigger",
4753
+ description: "Retrieves the details of a specific trigger",
4754
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4755
+ pathParams: ["trigger_id"],
4756
+ queryParams: [],
4757
+ flags: [{
4758
+ "name": "trigger_id",
4759
+ "description": "",
4760
+ "required": true,
4761
+ "type": "string",
4762
+ "in": "path"
4763
+ }]
4764
+ },
4765
+ "update-trigger": {
4766
+ serviceClass: "Triggers",
4767
+ operationId: "updateTrigger",
4768
+ description: "Updates an existing trigger's configuration. The type is immutable.",
4769
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4770
+ pathParams: ["trigger_id"],
4771
+ queryParams: [],
4772
+ flags: [{
4773
+ "name": "trigger_id",
4774
+ "description": "",
4775
+ "required": true,
4776
+ "type": "string",
4777
+ "in": "path"
4778
+ }, {
4779
+ "name": "name",
4780
+ "description": "",
4781
+ "required": false,
4782
+ "type": "string",
4783
+ "in": "body"
4784
+ }, {
4785
+ "name": "description",
4786
+ "description": "",
4787
+ "required": false,
4788
+ "type": "string",
4789
+ "in": "body"
4790
+ }, {
4791
+ "name": "target_type",
4792
+ "description": "",
4793
+ "required": false,
4794
+ "type": "string",
4795
+ "in": "body"
4796
+ }, {
4797
+ "name": "target_id",
4798
+ "description": "",
4799
+ "required": false,
4800
+ "type": "string",
4801
+ "in": "body"
4802
+ }, {
4803
+ "name": "action",
4804
+ "description": "",
4805
+ "required": false,
4806
+ "type": "string",
4807
+ "in": "body"
4808
+ }, {
4809
+ "name": "input",
4810
+ "description": "",
4811
+ "required": false,
4812
+ "type": "object",
4813
+ "in": "body"
4814
+ }, {
4815
+ "name": "cron",
4816
+ "description": "",
4817
+ "required": false,
4818
+ "type": "string",
4819
+ "in": "body"
4820
+ }, {
4821
+ "name": "active",
4822
+ "description": "",
4823
+ "required": false,
4824
+ "type": "boolean",
4825
+ "in": "body"
4826
+ }, {
4827
+ "name": "policy_id",
4828
+ "description": "",
4829
+ "required": false,
4830
+ "type": "string",
4831
+ "in": "body"
4832
+ }]
4833
+ },
4834
+ "delete-trigger": {
4835
+ serviceClass: "Triggers",
4836
+ operationId: "deleteTrigger",
4837
+ description: "Deletes a trigger",
4838
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4839
+ pathParams: ["trigger_id"],
4840
+ queryParams: [],
4841
+ flags: [{
4842
+ "name": "trigger_id",
4843
+ "description": "",
4844
+ "required": true,
4845
+ "type": "string",
4846
+ "in": "path"
4847
+ }]
4848
+ },
4849
+ "fire-trigger": {
4850
+ serviceClass: "Triggers",
4851
+ operationId: "fireTrigger",
4852
+ description: "Fires a trigger synchronously and returns the terminal firing record.",
4853
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4854
+ pathParams: ["trigger_id"],
4855
+ queryParams: [],
4856
+ flags: [{
4857
+ "name": "trigger_id",
4858
+ "description": "",
4859
+ "required": true,
4860
+ "type": "string",
4861
+ "in": "path"
4862
+ }, {
4863
+ "name": "input",
4864
+ "description": "Fire-time input, shallow-merged over the trigger's static input",
4865
+ "required": false,
4866
+ "type": "object",
4867
+ "in": "body"
4868
+ }]
4869
+ },
4870
+ "get-trigger-secret": {
4871
+ serviceClass: "Triggers",
4872
+ operationId: "getTriggerSecret",
4873
+ description: "Retrieves the signing secret for a webhook trigger",
4874
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4875
+ pathParams: ["trigger_id"],
4876
+ queryParams: [],
4877
+ flags: [{
4878
+ "name": "trigger_id",
4879
+ "description": "",
4880
+ "required": true,
4881
+ "type": "string",
4882
+ "in": "path"
4883
+ }]
4884
+ },
4885
+ "rotate-trigger-secret": {
4886
+ serviceClass: "Triggers",
4887
+ operationId: "rotateTriggerSecret",
4888
+ description: "Rotates the signing secret for a webhook trigger",
4889
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4890
+ pathParams: ["trigger_id"],
4891
+ queryParams: [],
4892
+ flags: [{
4893
+ "name": "trigger_id",
4894
+ "description": "",
4895
+ "required": true,
4896
+ "type": "string",
4897
+ "in": "path"
4898
+ }]
4899
+ },
4900
+ "list-trigger-firings": {
4901
+ serviceClass: "Triggers",
4902
+ operationId: "listTriggerFirings",
4903
+ description: "Lists firings for a trigger (trigger_id is required).",
4904
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4905
+ pathParams: [],
4906
+ queryParams: ["trigger_id", "limit", "offset"],
4907
+ flags: [{
4908
+ "name": "trigger_id",
4909
+ "description": "Trigger to list firings for (trg_...)",
4910
+ "required": true,
4911
+ "type": "string",
4912
+ "in": "query"
4913
+ }, {
4914
+ "name": "limit",
4915
+ "description": "",
4916
+ "required": false,
4917
+ "type": "integer",
4918
+ "in": "query"
4919
+ }, {
4920
+ "name": "offset",
4921
+ "description": "",
4922
+ "required": false,
4923
+ "type": "integer",
4924
+ "in": "query"
4925
+ }]
4926
+ },
4927
+ "get-trigger-firing": {
4928
+ serviceClass: "Triggers",
4929
+ operationId: "getTriggerFiring",
4930
+ description: "Retrieves the details of a specific trigger firing",
4931
+ moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/triggers",
4932
+ pathParams: ["firing_id"],
4933
+ queryParams: [],
4934
+ flags: [{
4935
+ "name": "firing_id",
4936
+ "description": "",
4937
+ "required": true,
4938
+ "type": "string",
4939
+ "in": "path"
4940
+ }]
4941
+ },
4648
4942
  "get-current-user": {
4649
4943
  serviceClass: "Users",
4650
4944
  operationId: "getCurrentUser",
@@ -4771,7 +5065,7 @@ var routes = {
4771
5065
  queryParams: [],
4772
5066
  flags: [{
4773
5067
  "name": "user_id",
4774
- "description": "User public ID (usr_ prefix)",
5068
+ "description": "User public ID (user_ prefix)",
4775
5069
  "required": true,
4776
5070
  "type": "string",
4777
5071
  "in": "path"
package/package.json CHANGED
@@ -1,24 +1,23 @@
1
1
  {
2
2
  "name": "@soat/cli",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@inquirer/input": "^5.1.2",
7
7
  "@inquirer/password": "^5.1.1",
8
- "@ttoss/logger": "^0.8.16",
8
+ "@ttoss/logger": "^0.8.19",
9
9
  "commander": "^15.0.0",
10
- "js-yaml": "^4.2.0",
11
- "@soat/sdk": "0.14.0"
10
+ "js-yaml": "^5.2.1",
11
+ "@soat/sdk": "0.14.1"
12
12
  },
13
13
  "devDependencies": {
14
- "@ttoss/config": "^1.37.15",
15
- "@ttoss/test-utils": "^4.2.15",
14
+ "@ttoss/config": "^1.37.17",
15
+ "@ttoss/test-utils": "^4.2.18",
16
16
  "@types/jest": "^30.0.0",
17
- "@types/js-yaml": "^4.0.9",
18
- "@types/node": "^24",
17
+ "@types/node": "^24.13.2",
19
18
  "jest": "^30.4.2",
20
- "tsdown": "^0.22.1",
21
- "tsx": "^4.22.4"
19
+ "tsdown": "^0.22.3",
20
+ "tsx": "^4.23.0"
22
21
  },
23
22
  "files": [
24
23
  "dist",