chainlesschain 0.152.0 → 0.156.2
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/README.md +52 -3
- package/package.json +1 -1
- package/src/commands/a2a.js +201 -0
- package/src/commands/agent.js +1250 -0
- package/src/commands/chat.js +605 -0
- package/src/commands/cli-anything.js +426 -0
- package/src/commands/compliance.js +412 -0
- package/src/commands/config.js +213 -0
- package/src/commands/cowork.js +1463 -0
- package/src/commands/crosschain.js +203 -0
- package/src/commands/dao.js +203 -0
- package/src/commands/economy.js +199 -0
- package/src/commands/encrypt.js +201 -0
- package/src/commands/evolution.js +199 -0
- package/src/commands/evomap.js +625 -0
- package/src/commands/hmemory.js +203 -0
- package/src/commands/inference.js +207 -0
- package/src/commands/kg.js +195 -0
- package/src/commands/llm.js +209 -0
- package/src/commands/memory.js +203 -0
- package/src/commands/orchestrate.js +406 -0
- package/src/commands/pipeline.js +199 -0
- package/src/commands/planmode.js +426 -0
- package/src/commands/plugin.js +209 -0
- package/src/commands/services.js +207 -0
- package/src/commands/setup.js +205 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/start.js +209 -0
- package/src/commands/stream.js +213 -0
- package/src/commands/ui.js +225 -0
- package/src/commands/workflow.js +209 -0
- package/src/index.js +112 -0
- package/src/lib/a2a-protocol.js +332 -0
- package/src/lib/agent-coordinator.js +334 -0
- package/src/lib/agent-economy.js +334 -0
- package/src/lib/agent-router.js +333 -0
- package/src/lib/autonomous-agent.js +332 -0
- package/src/lib/chat-core.js +335 -0
- package/src/lib/cli-anything-bridge.js +341 -0
- package/src/lib/cli-context-engineering.js +351 -0
- package/src/lib/compliance-manager.js +334 -0
- package/src/lib/cowork-adapter.js +336 -0
- package/src/lib/cowork-evomap-adapter.js +341 -0
- package/src/lib/cowork-mcp-tools.js +341 -0
- package/src/lib/cowork-observe-html.js +341 -0
- package/src/lib/cowork-observe.js +341 -0
- package/src/lib/cowork-task-templates.js +342 -1
- package/src/lib/cowork-template-marketplace.js +340 -0
- package/src/lib/cross-chain.js +339 -0
- package/src/lib/crypto-manager.js +334 -0
- package/src/lib/dao-governance.js +339 -0
- package/src/lib/downloader.js +334 -0
- package/src/lib/evolution-system.js +334 -0
- package/src/lib/evomap-client.js +342 -0
- package/src/lib/evomap-federation.js +338 -0
- package/src/lib/evomap-manager.js +330 -0
- package/src/lib/execution-backend.js +330 -0
- package/src/lib/hashline.js +338 -0
- package/src/lib/hierarchical-memory.js +334 -0
- package/src/lib/inference-network.js +341 -0
- package/src/lib/interaction-adapter.js +330 -0
- package/src/lib/interactive-planner.js +354 -0
- package/src/lib/knowledge-graph.js +331 -0
- package/src/lib/pipeline-orchestrator.js +332 -0
- package/src/lib/plan-mode.js +336 -0
- package/src/lib/plugin-autodiscovery.js +334 -0
- package/src/lib/process-manager.js +336 -0
- package/src/lib/provider-options.js +346 -0
- package/src/lib/provider-stream.js +348 -0
- package/src/lib/service-manager.js +337 -0
- package/src/lib/session-core-singletons.js +341 -0
- package/src/lib/skill-mcp.js +336 -0
- package/src/lib/stix-parser.js +346 -0
- package/src/lib/sub-agent-context.js +343 -0
- package/src/lib/sub-agent-profiles.js +335 -0
- package/src/lib/sub-agent-registry.js +336 -0
- package/src/lib/todo-manager.js +336 -0
- package/src/lib/web-ui-server.js +348 -0
- package/src/lib/workflow-expr.js +346 -0
- package/src/lib/ws-chat-handler.js +337 -0
package/src/commands/hmemory.js
CHANGED
|
@@ -923,3 +923,206 @@ function _registerHmemoryV2Commands(parent) {
|
|
|
923
923
|
console.log(JSON.stringify(m.getHierarchicalMemoryGovStatsV2(), null, 2));
|
|
924
924
|
});
|
|
925
925
|
}
|
|
926
|
+
|
|
927
|
+
// === Iter28 V2 governance overlay: Hmemgov ===
|
|
928
|
+
export function registerHmemV2Commands(program) {
|
|
929
|
+
const parent = program.commands.find((c) => c.name() === "hmemory");
|
|
930
|
+
if (!parent) return;
|
|
931
|
+
const L = async () => await import("../lib/hierarchical-memory.js");
|
|
932
|
+
parent
|
|
933
|
+
.command("hmemgov-enums-v2")
|
|
934
|
+
.description("Show V2 enums")
|
|
935
|
+
.action(async () => {
|
|
936
|
+
const m = await L();
|
|
937
|
+
console.log(
|
|
938
|
+
JSON.stringify(
|
|
939
|
+
{
|
|
940
|
+
profileMaturity: m.HMEMGOV_PROFILE_MATURITY_V2,
|
|
941
|
+
recallLifecycle: m.HMEMGOV_RECALL_LIFECYCLE_V2,
|
|
942
|
+
},
|
|
943
|
+
null,
|
|
944
|
+
2,
|
|
945
|
+
),
|
|
946
|
+
);
|
|
947
|
+
});
|
|
948
|
+
parent
|
|
949
|
+
.command("hmemgov-config-v2")
|
|
950
|
+
.description("Show V2 config")
|
|
951
|
+
.action(async () => {
|
|
952
|
+
const m = await L();
|
|
953
|
+
console.log(
|
|
954
|
+
JSON.stringify(
|
|
955
|
+
{
|
|
956
|
+
maxActive: m.getMaxActiveHmemProfilesPerOwnerV2(),
|
|
957
|
+
maxPending: m.getMaxPendingHmemRecallsPerProfileV2(),
|
|
958
|
+
idleMs: m.getHmemProfileIdleMsV2(),
|
|
959
|
+
stuckMs: m.getHmemRecallStuckMsV2(),
|
|
960
|
+
},
|
|
961
|
+
null,
|
|
962
|
+
2,
|
|
963
|
+
),
|
|
964
|
+
);
|
|
965
|
+
});
|
|
966
|
+
parent
|
|
967
|
+
.command("hmemgov-set-max-active-v2 <n>")
|
|
968
|
+
.description("Set max active")
|
|
969
|
+
.action(async (n) => {
|
|
970
|
+
(await L()).setMaxActiveHmemProfilesPerOwnerV2(Number(n));
|
|
971
|
+
console.log("ok");
|
|
972
|
+
});
|
|
973
|
+
parent
|
|
974
|
+
.command("hmemgov-set-max-pending-v2 <n>")
|
|
975
|
+
.description("Set max pending")
|
|
976
|
+
.action(async (n) => {
|
|
977
|
+
(await L()).setMaxPendingHmemRecallsPerProfileV2(Number(n));
|
|
978
|
+
console.log("ok");
|
|
979
|
+
});
|
|
980
|
+
parent
|
|
981
|
+
.command("hmemgov-set-idle-ms-v2 <n>")
|
|
982
|
+
.description("Set idle threshold ms")
|
|
983
|
+
.action(async (n) => {
|
|
984
|
+
(await L()).setHmemProfileIdleMsV2(Number(n));
|
|
985
|
+
console.log("ok");
|
|
986
|
+
});
|
|
987
|
+
parent
|
|
988
|
+
.command("hmemgov-set-stuck-ms-v2 <n>")
|
|
989
|
+
.description("Set stuck threshold ms")
|
|
990
|
+
.action(async (n) => {
|
|
991
|
+
(await L()).setHmemRecallStuckMsV2(Number(n));
|
|
992
|
+
console.log("ok");
|
|
993
|
+
});
|
|
994
|
+
parent
|
|
995
|
+
.command("hmemgov-register-v2 <id> <owner>")
|
|
996
|
+
.description("Register V2 profile")
|
|
997
|
+
.option("--tier <v>", "tier")
|
|
998
|
+
.action(async (id, owner, o) => {
|
|
999
|
+
const m = await L();
|
|
1000
|
+
console.log(
|
|
1001
|
+
JSON.stringify(
|
|
1002
|
+
m.registerHmemProfileV2({ id, owner, tier: o.tier }),
|
|
1003
|
+
null,
|
|
1004
|
+
2,
|
|
1005
|
+
),
|
|
1006
|
+
);
|
|
1007
|
+
});
|
|
1008
|
+
parent
|
|
1009
|
+
.command("hmemgov-activate-v2 <id>")
|
|
1010
|
+
.description("Activate profile")
|
|
1011
|
+
.action(async (id) => {
|
|
1012
|
+
console.log(
|
|
1013
|
+
JSON.stringify((await L()).activateHmemProfileV2(id), null, 2),
|
|
1014
|
+
);
|
|
1015
|
+
});
|
|
1016
|
+
parent
|
|
1017
|
+
.command("hmemgov-stale-v2 <id>")
|
|
1018
|
+
.description("Stale profile")
|
|
1019
|
+
.action(async (id) => {
|
|
1020
|
+
console.log(JSON.stringify((await L()).staleHmemProfileV2(id), null, 2));
|
|
1021
|
+
});
|
|
1022
|
+
parent
|
|
1023
|
+
.command("hmemgov-archive-v2 <id>")
|
|
1024
|
+
.description("Archive profile")
|
|
1025
|
+
.action(async (id) => {
|
|
1026
|
+
console.log(
|
|
1027
|
+
JSON.stringify((await L()).archiveHmemProfileV2(id), null, 2),
|
|
1028
|
+
);
|
|
1029
|
+
});
|
|
1030
|
+
parent
|
|
1031
|
+
.command("hmemgov-touch-v2 <id>")
|
|
1032
|
+
.description("Touch profile")
|
|
1033
|
+
.action(async (id) => {
|
|
1034
|
+
console.log(JSON.stringify((await L()).touchHmemProfileV2(id), null, 2));
|
|
1035
|
+
});
|
|
1036
|
+
parent
|
|
1037
|
+
.command("hmemgov-get-v2 <id>")
|
|
1038
|
+
.description("Get profile")
|
|
1039
|
+
.action(async (id) => {
|
|
1040
|
+
console.log(JSON.stringify((await L()).getHmemProfileV2(id), null, 2));
|
|
1041
|
+
});
|
|
1042
|
+
parent
|
|
1043
|
+
.command("hmemgov-list-v2")
|
|
1044
|
+
.description("List profiles")
|
|
1045
|
+
.action(async () => {
|
|
1046
|
+
console.log(JSON.stringify((await L()).listHmemProfilesV2(), null, 2));
|
|
1047
|
+
});
|
|
1048
|
+
parent
|
|
1049
|
+
.command("hmemgov-create-recall-v2 <id> <profileId>")
|
|
1050
|
+
.description("Create recall")
|
|
1051
|
+
.option("--queryId <v>", "queryId")
|
|
1052
|
+
.action(async (id, profileId, o) => {
|
|
1053
|
+
const m = await L();
|
|
1054
|
+
console.log(
|
|
1055
|
+
JSON.stringify(
|
|
1056
|
+
m.createHmemRecallV2({ id, profileId, queryId: o.queryId }),
|
|
1057
|
+
null,
|
|
1058
|
+
2,
|
|
1059
|
+
),
|
|
1060
|
+
);
|
|
1061
|
+
});
|
|
1062
|
+
parent
|
|
1063
|
+
.command("hmemgov-recalling-recall-v2 <id>")
|
|
1064
|
+
.description("Mark recall as recalling")
|
|
1065
|
+
.action(async (id) => {
|
|
1066
|
+
console.log(
|
|
1067
|
+
JSON.stringify((await L()).recallingHmemRecallV2(id), null, 2),
|
|
1068
|
+
);
|
|
1069
|
+
});
|
|
1070
|
+
parent
|
|
1071
|
+
.command("hmemgov-complete-recall-v2 <id>")
|
|
1072
|
+
.description("Complete recall")
|
|
1073
|
+
.action(async (id) => {
|
|
1074
|
+
console.log(
|
|
1075
|
+
JSON.stringify((await L()).completeRecallHmemV2(id), null, 2),
|
|
1076
|
+
);
|
|
1077
|
+
});
|
|
1078
|
+
parent
|
|
1079
|
+
.command("hmemgov-fail-recall-v2 <id> [reason]")
|
|
1080
|
+
.description("Fail recall")
|
|
1081
|
+
.action(async (id, reason) => {
|
|
1082
|
+
console.log(
|
|
1083
|
+
JSON.stringify((await L()).failHmemRecallV2(id, reason), null, 2),
|
|
1084
|
+
);
|
|
1085
|
+
});
|
|
1086
|
+
parent
|
|
1087
|
+
.command("hmemgov-cancel-recall-v2 <id> [reason]")
|
|
1088
|
+
.description("Cancel recall")
|
|
1089
|
+
.action(async (id, reason) => {
|
|
1090
|
+
console.log(
|
|
1091
|
+
JSON.stringify((await L()).cancelHmemRecallV2(id, reason), null, 2),
|
|
1092
|
+
);
|
|
1093
|
+
});
|
|
1094
|
+
parent
|
|
1095
|
+
.command("hmemgov-get-recall-v2 <id>")
|
|
1096
|
+
.description("Get recall")
|
|
1097
|
+
.action(async (id) => {
|
|
1098
|
+
console.log(JSON.stringify((await L()).getHmemRecallV2(id), null, 2));
|
|
1099
|
+
});
|
|
1100
|
+
parent
|
|
1101
|
+
.command("hmemgov-list-recalls-v2")
|
|
1102
|
+
.description("List recalls")
|
|
1103
|
+
.action(async () => {
|
|
1104
|
+
console.log(JSON.stringify((await L()).listHmemRecallsV2(), null, 2));
|
|
1105
|
+
});
|
|
1106
|
+
parent
|
|
1107
|
+
.command("hmemgov-auto-stale-idle-v2")
|
|
1108
|
+
.description("Auto-stale idle")
|
|
1109
|
+
.action(async () => {
|
|
1110
|
+
console.log(
|
|
1111
|
+
JSON.stringify((await L()).autoStaleIdleHmemProfilesV2(), null, 2),
|
|
1112
|
+
);
|
|
1113
|
+
});
|
|
1114
|
+
parent
|
|
1115
|
+
.command("hmemgov-auto-fail-stuck-v2")
|
|
1116
|
+
.description("Auto-fail stuck recalls")
|
|
1117
|
+
.action(async () => {
|
|
1118
|
+
console.log(
|
|
1119
|
+
JSON.stringify((await L()).autoFailStuckHmemRecallsV2(), null, 2),
|
|
1120
|
+
);
|
|
1121
|
+
});
|
|
1122
|
+
parent
|
|
1123
|
+
.command("hmemgov-gov-stats-v2")
|
|
1124
|
+
.description("V2 gov stats")
|
|
1125
|
+
.action(async () => {
|
|
1126
|
+
console.log(JSON.stringify((await L()).getHmemgovStatsV2(), null, 2));
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
@@ -798,3 +798,210 @@ function _registerInferenceGovV2(parent) {
|
|
|
798
798
|
else console.log(s);
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
+
|
|
802
|
+
// === Iter28 V2 governance overlay: Infnetgov ===
|
|
803
|
+
export function registerInfnetV2Commands(program) {
|
|
804
|
+
const parent = program.commands.find((c) => c.name() === "inference");
|
|
805
|
+
if (!parent) return;
|
|
806
|
+
const L = async () => await import("../lib/inference-network.js");
|
|
807
|
+
parent
|
|
808
|
+
.command("infnetgov-enums-v2")
|
|
809
|
+
.description("Show V2 enums")
|
|
810
|
+
.action(async () => {
|
|
811
|
+
const m = await L();
|
|
812
|
+
console.log(
|
|
813
|
+
JSON.stringify(
|
|
814
|
+
{
|
|
815
|
+
profileMaturity: m.INFNETGOV_PROFILE_MATURITY_V2,
|
|
816
|
+
requestLifecycle: m.INFNETGOV_REQUEST_LIFECYCLE_V2,
|
|
817
|
+
},
|
|
818
|
+
null,
|
|
819
|
+
2,
|
|
820
|
+
),
|
|
821
|
+
);
|
|
822
|
+
});
|
|
823
|
+
parent
|
|
824
|
+
.command("infnetgov-config-v2")
|
|
825
|
+
.description("Show V2 config")
|
|
826
|
+
.action(async () => {
|
|
827
|
+
const m = await L();
|
|
828
|
+
console.log(
|
|
829
|
+
JSON.stringify(
|
|
830
|
+
{
|
|
831
|
+
maxActive: m.getMaxActiveInfnetProfilesPerOwnerV2(),
|
|
832
|
+
maxPending: m.getMaxPendingInfnetRequestsPerProfileV2(),
|
|
833
|
+
idleMs: m.getInfnetProfileIdleMsV2(),
|
|
834
|
+
stuckMs: m.getInfnetRequestStuckMsV2(),
|
|
835
|
+
},
|
|
836
|
+
null,
|
|
837
|
+
2,
|
|
838
|
+
),
|
|
839
|
+
);
|
|
840
|
+
});
|
|
841
|
+
parent
|
|
842
|
+
.command("infnetgov-set-max-active-v2 <n>")
|
|
843
|
+
.description("Set max active")
|
|
844
|
+
.action(async (n) => {
|
|
845
|
+
(await L()).setMaxActiveInfnetProfilesPerOwnerV2(Number(n));
|
|
846
|
+
console.log("ok");
|
|
847
|
+
});
|
|
848
|
+
parent
|
|
849
|
+
.command("infnetgov-set-max-pending-v2 <n>")
|
|
850
|
+
.description("Set max pending")
|
|
851
|
+
.action(async (n) => {
|
|
852
|
+
(await L()).setMaxPendingInfnetRequestsPerProfileV2(Number(n));
|
|
853
|
+
console.log("ok");
|
|
854
|
+
});
|
|
855
|
+
parent
|
|
856
|
+
.command("infnetgov-set-idle-ms-v2 <n>")
|
|
857
|
+
.description("Set idle threshold ms")
|
|
858
|
+
.action(async (n) => {
|
|
859
|
+
(await L()).setInfnetProfileIdleMsV2(Number(n));
|
|
860
|
+
console.log("ok");
|
|
861
|
+
});
|
|
862
|
+
parent
|
|
863
|
+
.command("infnetgov-set-stuck-ms-v2 <n>")
|
|
864
|
+
.description("Set stuck threshold ms")
|
|
865
|
+
.action(async (n) => {
|
|
866
|
+
(await L()).setInfnetRequestStuckMsV2(Number(n));
|
|
867
|
+
console.log("ok");
|
|
868
|
+
});
|
|
869
|
+
parent
|
|
870
|
+
.command("infnetgov-register-v2 <id> <owner>")
|
|
871
|
+
.description("Register V2 profile")
|
|
872
|
+
.option("--node <v>", "node")
|
|
873
|
+
.action(async (id, owner, o) => {
|
|
874
|
+
const m = await L();
|
|
875
|
+
console.log(
|
|
876
|
+
JSON.stringify(
|
|
877
|
+
m.registerInfnetProfileV2({ id, owner, node: o.node }),
|
|
878
|
+
null,
|
|
879
|
+
2,
|
|
880
|
+
),
|
|
881
|
+
);
|
|
882
|
+
});
|
|
883
|
+
parent
|
|
884
|
+
.command("infnetgov-activate-v2 <id>")
|
|
885
|
+
.description("Activate profile")
|
|
886
|
+
.action(async (id) => {
|
|
887
|
+
console.log(
|
|
888
|
+
JSON.stringify((await L()).activateInfnetProfileV2(id), null, 2),
|
|
889
|
+
);
|
|
890
|
+
});
|
|
891
|
+
parent
|
|
892
|
+
.command("infnetgov-stale-v2 <id>")
|
|
893
|
+
.description("Stale profile")
|
|
894
|
+
.action(async (id) => {
|
|
895
|
+
console.log(
|
|
896
|
+
JSON.stringify((await L()).staleInfnetProfileV2(id), null, 2),
|
|
897
|
+
);
|
|
898
|
+
});
|
|
899
|
+
parent
|
|
900
|
+
.command("infnetgov-archive-v2 <id>")
|
|
901
|
+
.description("Archive profile")
|
|
902
|
+
.action(async (id) => {
|
|
903
|
+
console.log(
|
|
904
|
+
JSON.stringify((await L()).archiveInfnetProfileV2(id), null, 2),
|
|
905
|
+
);
|
|
906
|
+
});
|
|
907
|
+
parent
|
|
908
|
+
.command("infnetgov-touch-v2 <id>")
|
|
909
|
+
.description("Touch profile")
|
|
910
|
+
.action(async (id) => {
|
|
911
|
+
console.log(
|
|
912
|
+
JSON.stringify((await L()).touchInfnetProfileV2(id), null, 2),
|
|
913
|
+
);
|
|
914
|
+
});
|
|
915
|
+
parent
|
|
916
|
+
.command("infnetgov-get-v2 <id>")
|
|
917
|
+
.description("Get profile")
|
|
918
|
+
.action(async (id) => {
|
|
919
|
+
console.log(JSON.stringify((await L()).getInfnetProfileV2(id), null, 2));
|
|
920
|
+
});
|
|
921
|
+
parent
|
|
922
|
+
.command("infnetgov-list-v2")
|
|
923
|
+
.description("List profiles")
|
|
924
|
+
.action(async () => {
|
|
925
|
+
console.log(JSON.stringify((await L()).listInfnetProfilesV2(), null, 2));
|
|
926
|
+
});
|
|
927
|
+
parent
|
|
928
|
+
.command("infnetgov-create-request-v2 <id> <profileId>")
|
|
929
|
+
.description("Create request")
|
|
930
|
+
.option("--requestId <v>", "requestId")
|
|
931
|
+
.action(async (id, profileId, o) => {
|
|
932
|
+
const m = await L();
|
|
933
|
+
console.log(
|
|
934
|
+
JSON.stringify(
|
|
935
|
+
m.createInfnetRequestV2({ id, profileId, requestId: o.requestId }),
|
|
936
|
+
null,
|
|
937
|
+
2,
|
|
938
|
+
),
|
|
939
|
+
);
|
|
940
|
+
});
|
|
941
|
+
parent
|
|
942
|
+
.command("infnetgov-inferring-request-v2 <id>")
|
|
943
|
+
.description("Mark request as inferring")
|
|
944
|
+
.action(async (id) => {
|
|
945
|
+
console.log(
|
|
946
|
+
JSON.stringify((await L()).inferringInfnetRequestV2(id), null, 2),
|
|
947
|
+
);
|
|
948
|
+
});
|
|
949
|
+
parent
|
|
950
|
+
.command("infnetgov-complete-request-v2 <id>")
|
|
951
|
+
.description("Complete request")
|
|
952
|
+
.action(async (id) => {
|
|
953
|
+
console.log(
|
|
954
|
+
JSON.stringify((await L()).completeRequestInfnetV2(id), null, 2),
|
|
955
|
+
);
|
|
956
|
+
});
|
|
957
|
+
parent
|
|
958
|
+
.command("infnetgov-fail-request-v2 <id> [reason]")
|
|
959
|
+
.description("Fail request")
|
|
960
|
+
.action(async (id, reason) => {
|
|
961
|
+
console.log(
|
|
962
|
+
JSON.stringify((await L()).failInfnetRequestV2(id, reason), null, 2),
|
|
963
|
+
);
|
|
964
|
+
});
|
|
965
|
+
parent
|
|
966
|
+
.command("infnetgov-cancel-request-v2 <id> [reason]")
|
|
967
|
+
.description("Cancel request")
|
|
968
|
+
.action(async (id, reason) => {
|
|
969
|
+
console.log(
|
|
970
|
+
JSON.stringify((await L()).cancelInfnetRequestV2(id, reason), null, 2),
|
|
971
|
+
);
|
|
972
|
+
});
|
|
973
|
+
parent
|
|
974
|
+
.command("infnetgov-get-request-v2 <id>")
|
|
975
|
+
.description("Get request")
|
|
976
|
+
.action(async (id) => {
|
|
977
|
+
console.log(JSON.stringify((await L()).getInfnetRequestV2(id), null, 2));
|
|
978
|
+
});
|
|
979
|
+
parent
|
|
980
|
+
.command("infnetgov-list-requests-v2")
|
|
981
|
+
.description("List requests")
|
|
982
|
+
.action(async () => {
|
|
983
|
+
console.log(JSON.stringify((await L()).listInfnetRequestsV2(), null, 2));
|
|
984
|
+
});
|
|
985
|
+
parent
|
|
986
|
+
.command("infnetgov-auto-stale-idle-v2")
|
|
987
|
+
.description("Auto-stale idle")
|
|
988
|
+
.action(async () => {
|
|
989
|
+
console.log(
|
|
990
|
+
JSON.stringify((await L()).autoStaleIdleInfnetProfilesV2(), null, 2),
|
|
991
|
+
);
|
|
992
|
+
});
|
|
993
|
+
parent
|
|
994
|
+
.command("infnetgov-auto-fail-stuck-v2")
|
|
995
|
+
.description("Auto-fail stuck requests")
|
|
996
|
+
.action(async () => {
|
|
997
|
+
console.log(
|
|
998
|
+
JSON.stringify((await L()).autoFailStuckInfnetRequestsV2(), null, 2),
|
|
999
|
+
);
|
|
1000
|
+
});
|
|
1001
|
+
parent
|
|
1002
|
+
.command("infnetgov-gov-stats-v2")
|
|
1003
|
+
.description("V2 gov stats")
|
|
1004
|
+
.action(async () => {
|
|
1005
|
+
console.log(JSON.stringify((await L()).getInfnetgovStatsV2(), null, 2));
|
|
1006
|
+
});
|
|
1007
|
+
}
|
package/src/commands/kg.js
CHANGED
|
@@ -962,3 +962,198 @@ export function registerKgovV2Commands(program) {
|
|
|
962
962
|
console.log(JSON.stringify(m.getKnowledgeGraphGovStatsV2(), null, 2));
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
|
+
|
|
966
|
+
// === Iter28 V2 governance overlay: Kggov ===
|
|
967
|
+
export function registerKgV2Commands(program) {
|
|
968
|
+
const parent = program.commands.find((c) => c.name() === "kg");
|
|
969
|
+
if (!parent) return;
|
|
970
|
+
const L = async () => await import("../lib/knowledge-graph.js");
|
|
971
|
+
parent
|
|
972
|
+
.command("kggov-enums-v2")
|
|
973
|
+
.description("Show V2 enums")
|
|
974
|
+
.action(async () => {
|
|
975
|
+
const m = await L();
|
|
976
|
+
console.log(
|
|
977
|
+
JSON.stringify(
|
|
978
|
+
{
|
|
979
|
+
profileMaturity: m.KGGOV_PROFILE_MATURITY_V2,
|
|
980
|
+
queryLifecycle: m.KGGOV_QUERY_LIFECYCLE_V2,
|
|
981
|
+
},
|
|
982
|
+
null,
|
|
983
|
+
2,
|
|
984
|
+
),
|
|
985
|
+
);
|
|
986
|
+
});
|
|
987
|
+
parent
|
|
988
|
+
.command("kggov-config-v2")
|
|
989
|
+
.description("Show V2 config")
|
|
990
|
+
.action(async () => {
|
|
991
|
+
const m = await L();
|
|
992
|
+
console.log(
|
|
993
|
+
JSON.stringify(
|
|
994
|
+
{
|
|
995
|
+
maxActive: m.getMaxActiveKgProfilesPerOwnerV2(),
|
|
996
|
+
maxPending: m.getMaxPendingKgQuerysPerProfileV2(),
|
|
997
|
+
idleMs: m.getKgProfileIdleMsV2(),
|
|
998
|
+
stuckMs: m.getKgQueryStuckMsV2(),
|
|
999
|
+
},
|
|
1000
|
+
null,
|
|
1001
|
+
2,
|
|
1002
|
+
),
|
|
1003
|
+
);
|
|
1004
|
+
});
|
|
1005
|
+
parent
|
|
1006
|
+
.command("kggov-set-max-active-v2 <n>")
|
|
1007
|
+
.description("Set max active")
|
|
1008
|
+
.action(async (n) => {
|
|
1009
|
+
(await L()).setMaxActiveKgProfilesPerOwnerV2(Number(n));
|
|
1010
|
+
console.log("ok");
|
|
1011
|
+
});
|
|
1012
|
+
parent
|
|
1013
|
+
.command("kggov-set-max-pending-v2 <n>")
|
|
1014
|
+
.description("Set max pending")
|
|
1015
|
+
.action(async (n) => {
|
|
1016
|
+
(await L()).setMaxPendingKgQuerysPerProfileV2(Number(n));
|
|
1017
|
+
console.log("ok");
|
|
1018
|
+
});
|
|
1019
|
+
parent
|
|
1020
|
+
.command("kggov-set-idle-ms-v2 <n>")
|
|
1021
|
+
.description("Set idle threshold ms")
|
|
1022
|
+
.action(async (n) => {
|
|
1023
|
+
(await L()).setKgProfileIdleMsV2(Number(n));
|
|
1024
|
+
console.log("ok");
|
|
1025
|
+
});
|
|
1026
|
+
parent
|
|
1027
|
+
.command("kggov-set-stuck-ms-v2 <n>")
|
|
1028
|
+
.description("Set stuck threshold ms")
|
|
1029
|
+
.action(async (n) => {
|
|
1030
|
+
(await L()).setKgQueryStuckMsV2(Number(n));
|
|
1031
|
+
console.log("ok");
|
|
1032
|
+
});
|
|
1033
|
+
parent
|
|
1034
|
+
.command("kggov-register-v2 <id> <owner>")
|
|
1035
|
+
.description("Register V2 profile")
|
|
1036
|
+
.option("--kind <v>", "kind")
|
|
1037
|
+
.action(async (id, owner, o) => {
|
|
1038
|
+
const m = await L();
|
|
1039
|
+
console.log(
|
|
1040
|
+
JSON.stringify(
|
|
1041
|
+
m.registerKgProfileV2({ id, owner, kind: o.kind }),
|
|
1042
|
+
null,
|
|
1043
|
+
2,
|
|
1044
|
+
),
|
|
1045
|
+
);
|
|
1046
|
+
});
|
|
1047
|
+
parent
|
|
1048
|
+
.command("kggov-activate-v2 <id>")
|
|
1049
|
+
.description("Activate profile")
|
|
1050
|
+
.action(async (id) => {
|
|
1051
|
+
console.log(JSON.stringify((await L()).activateKgProfileV2(id), null, 2));
|
|
1052
|
+
});
|
|
1053
|
+
parent
|
|
1054
|
+
.command("kggov-stale-v2 <id>")
|
|
1055
|
+
.description("Stale profile")
|
|
1056
|
+
.action(async (id) => {
|
|
1057
|
+
console.log(JSON.stringify((await L()).staleKgProfileV2(id), null, 2));
|
|
1058
|
+
});
|
|
1059
|
+
parent
|
|
1060
|
+
.command("kggov-archive-v2 <id>")
|
|
1061
|
+
.description("Archive profile")
|
|
1062
|
+
.action(async (id) => {
|
|
1063
|
+
console.log(JSON.stringify((await L()).archiveKgProfileV2(id), null, 2));
|
|
1064
|
+
});
|
|
1065
|
+
parent
|
|
1066
|
+
.command("kggov-touch-v2 <id>")
|
|
1067
|
+
.description("Touch profile")
|
|
1068
|
+
.action(async (id) => {
|
|
1069
|
+
console.log(JSON.stringify((await L()).touchKgProfileV2(id), null, 2));
|
|
1070
|
+
});
|
|
1071
|
+
parent
|
|
1072
|
+
.command("kggov-get-v2 <id>")
|
|
1073
|
+
.description("Get profile")
|
|
1074
|
+
.action(async (id) => {
|
|
1075
|
+
console.log(JSON.stringify((await L()).getKgProfileV2(id), null, 2));
|
|
1076
|
+
});
|
|
1077
|
+
parent
|
|
1078
|
+
.command("kggov-list-v2")
|
|
1079
|
+
.description("List profiles")
|
|
1080
|
+
.action(async () => {
|
|
1081
|
+
console.log(JSON.stringify((await L()).listKgProfilesV2(), null, 2));
|
|
1082
|
+
});
|
|
1083
|
+
parent
|
|
1084
|
+
.command("kggov-create-query-v2 <id> <profileId>")
|
|
1085
|
+
.description("Create query")
|
|
1086
|
+
.option("--queryId <v>", "queryId")
|
|
1087
|
+
.action(async (id, profileId, o) => {
|
|
1088
|
+
const m = await L();
|
|
1089
|
+
console.log(
|
|
1090
|
+
JSON.stringify(
|
|
1091
|
+
m.createKgQueryV2({ id, profileId, queryId: o.queryId }),
|
|
1092
|
+
null,
|
|
1093
|
+
2,
|
|
1094
|
+
),
|
|
1095
|
+
);
|
|
1096
|
+
});
|
|
1097
|
+
parent
|
|
1098
|
+
.command("kggov-querying-query-v2 <id>")
|
|
1099
|
+
.description("Mark query as querying")
|
|
1100
|
+
.action(async (id) => {
|
|
1101
|
+
console.log(JSON.stringify((await L()).queryingKgQueryV2(id), null, 2));
|
|
1102
|
+
});
|
|
1103
|
+
parent
|
|
1104
|
+
.command("kggov-complete-query-v2 <id>")
|
|
1105
|
+
.description("Complete query")
|
|
1106
|
+
.action(async (id) => {
|
|
1107
|
+
console.log(JSON.stringify((await L()).completeQueryKgV2(id), null, 2));
|
|
1108
|
+
});
|
|
1109
|
+
parent
|
|
1110
|
+
.command("kggov-fail-query-v2 <id> [reason]")
|
|
1111
|
+
.description("Fail query")
|
|
1112
|
+
.action(async (id, reason) => {
|
|
1113
|
+
console.log(
|
|
1114
|
+
JSON.stringify((await L()).failKgQueryV2(id, reason), null, 2),
|
|
1115
|
+
);
|
|
1116
|
+
});
|
|
1117
|
+
parent
|
|
1118
|
+
.command("kggov-cancel-query-v2 <id> [reason]")
|
|
1119
|
+
.description("Cancel query")
|
|
1120
|
+
.action(async (id, reason) => {
|
|
1121
|
+
console.log(
|
|
1122
|
+
JSON.stringify((await L()).cancelKgQueryV2(id, reason), null, 2),
|
|
1123
|
+
);
|
|
1124
|
+
});
|
|
1125
|
+
parent
|
|
1126
|
+
.command("kggov-get-query-v2 <id>")
|
|
1127
|
+
.description("Get query")
|
|
1128
|
+
.action(async (id) => {
|
|
1129
|
+
console.log(JSON.stringify((await L()).getKgQueryV2(id), null, 2));
|
|
1130
|
+
});
|
|
1131
|
+
parent
|
|
1132
|
+
.command("kggov-list-querys-v2")
|
|
1133
|
+
.description("List querys")
|
|
1134
|
+
.action(async () => {
|
|
1135
|
+
console.log(JSON.stringify((await L()).listKgQuerysV2(), null, 2));
|
|
1136
|
+
});
|
|
1137
|
+
parent
|
|
1138
|
+
.command("kggov-auto-stale-idle-v2")
|
|
1139
|
+
.description("Auto-stale idle")
|
|
1140
|
+
.action(async () => {
|
|
1141
|
+
console.log(
|
|
1142
|
+
JSON.stringify((await L()).autoStaleIdleKgProfilesV2(), null, 2),
|
|
1143
|
+
);
|
|
1144
|
+
});
|
|
1145
|
+
parent
|
|
1146
|
+
.command("kggov-auto-fail-stuck-v2")
|
|
1147
|
+
.description("Auto-fail stuck querys")
|
|
1148
|
+
.action(async () => {
|
|
1149
|
+
console.log(
|
|
1150
|
+
JSON.stringify((await L()).autoFailStuckKgQuerysV2(), null, 2),
|
|
1151
|
+
);
|
|
1152
|
+
});
|
|
1153
|
+
parent
|
|
1154
|
+
.command("kggov-gov-stats-v2")
|
|
1155
|
+
.description("V2 gov stats")
|
|
1156
|
+
.action(async () => {
|
|
1157
|
+
console.log(JSON.stringify((await L()).getKggovStatsV2(), null, 2));
|
|
1158
|
+
});
|
|
1159
|
+
}
|