@shulex/cxclawctl 0.1.4 → 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/capabilities.lock.json +2 -2
- package/dist/cli.js +23 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/capabilities.lock.json
CHANGED
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.
|
|
12
|
+
version: "0.1.5",
|
|
13
13
|
description: "Solvea CXClaw CLI and Codex plugin runtime",
|
|
14
14
|
type: "module",
|
|
15
15
|
bin: {
|
|
@@ -761,6 +761,26 @@ async function transcriptFilters(args) {
|
|
|
761
761
|
}
|
|
762
762
|
return filters;
|
|
763
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
|
+
}
|
|
764
784
|
async function runSolveaCommand(session, command, args) {
|
|
765
785
|
const client = new SolveaClient(session);
|
|
766
786
|
if (EXTENDED_COMMANDS.has(command)) return runExtendedCommand(client, command, args);
|
|
@@ -836,7 +856,7 @@ async function runSolveaCommand(session, command, args) {
|
|
|
836
856
|
case "delete-custom-quality-rule":
|
|
837
857
|
return client.deleteCustomQualityRule(option(args, "--inspection-key", true));
|
|
838
858
|
case "list-knowledge":
|
|
839
|
-
return client.listKnowledge(await
|
|
859
|
+
return client.listKnowledge(await knowledgeFilters(args));
|
|
840
860
|
case "get-knowledge":
|
|
841
861
|
return client.getKnowledge(id());
|
|
842
862
|
case "update-knowledge":
|
|
@@ -979,7 +999,7 @@ var resources = {
|
|
|
979
999
|
delete: action("delete-templates", "Delete reply templates", "--ids <id> [id...] --confirm-delete")
|
|
980
1000
|
},
|
|
981
1001
|
knowledge: {
|
|
982
|
-
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>]"),
|
|
983
1003
|
get: action("get-knowledge", "Get one knowledge item", "--id <knowledge-id>"),
|
|
984
1004
|
update: action("update-knowledge", "Update a knowledge item", "--id <knowledge-id> (--data <json> | --data-file <path>)"),
|
|
985
1005
|
"upload-qa": action("upload-qa", "Upload QA items", "--data <json> | --data-file <path>"),
|