@shulex/cxclawctl 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import open from "open";
9
9
  // package.json
10
10
  var package_default = {
11
11
  name: "@shulex/cxclawctl",
12
- version: "0.1.3",
12
+ version: "0.1.5",
13
13
  description: "Solvea CXClaw CLI and Codex plugin runtime",
14
14
  type: "module",
15
15
  bin: {
@@ -18,7 +18,8 @@ var package_default = {
18
18
  files: [
19
19
  "bin",
20
20
  "dist/cli.js",
21
- "dist/cli.js.map"
21
+ "dist/cli.js.map",
22
+ "capabilities.lock.json"
22
23
  ],
23
24
  scripts: {
24
25
  build: "tsup",
@@ -760,6 +761,26 @@ async function transcriptFilters(args) {
760
761
  }
761
762
  return filters;
762
763
  }
764
+ async function knowledgeFilters(args) {
765
+ const filters = {
766
+ type: "ALL",
767
+ pageIndex: 1,
768
+ pageSize: 50,
769
+ keyword: "",
770
+ ...await optionalData(args)
771
+ };
772
+ const optional = [
773
+ ["type", "--type", String],
774
+ ["pageIndex", "--page", Number],
775
+ ["pageSize", "--page-size", Number],
776
+ ["keyword", "--keyword", String]
777
+ ];
778
+ for (const [field, name, convert] of optional) {
779
+ const value = option(args, name);
780
+ if (value !== void 0) filters[field] = convert(value);
781
+ }
782
+ return filters;
783
+ }
763
784
  async function runSolveaCommand(session, command, args) {
764
785
  const client = new SolveaClient(session);
765
786
  if (EXTENDED_COMMANDS.has(command)) return runExtendedCommand(client, command, args);
@@ -835,7 +856,7 @@ async function runSolveaCommand(session, command, args) {
835
856
  case "delete-custom-quality-rule":
836
857
  return client.deleteCustomQualityRule(option(args, "--inspection-key", true));
837
858
  case "list-knowledge":
838
- return client.listKnowledge(await optionalData(args));
859
+ return client.listKnowledge(await knowledgeFilters(args));
839
860
  case "get-knowledge":
840
861
  return client.getKnowledge(id());
841
862
  case "update-knowledge":
@@ -978,7 +999,7 @@ var resources = {
978
999
  delete: action("delete-templates", "Delete reply templates", "--ids <id> [id...] --confirm-delete")
979
1000
  },
980
1001
  knowledge: {
981
- list: action("list-knowledge", "List knowledge", "[--data <json> | --data-file <path>]"),
1002
+ list: action("list-knowledge", "List knowledge", "[--type <type>] [--page <number>] [--page-size <number>] [--keyword <text>] [--data <json> | --data-file <path>]"),
982
1003
  get: action("get-knowledge", "Get one knowledge item", "--id <knowledge-id>"),
983
1004
  update: action("update-knowledge", "Update a knowledge item", "--id <knowledge-id> (--data <json> | --data-file <path>)"),
984
1005
  "upload-qa": action("upload-qa", "Upload QA items", "--data <json> | --data-file <path>"),