chainlesschain 0.145.0 → 0.152.0
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/package.json +1 -1
- package/src/commands/activitypub.js +207 -0
- package/src/commands/agent-network.js +217 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +203 -0
- package/src/commands/browse.js +213 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +410 -0
- package/src/commands/cowork.js +203 -0
- package/src/commands/dbevo.js +227 -0
- package/src/commands/dev.js +207 -0
- package/src/commands/did-v2.js +217 -0
- package/src/commands/did.js +221 -0
- package/src/commands/dlp.js +213 -0
- package/src/commands/evomap.js +205 -0
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fusion.js +205 -0
- package/src/commands/governance.js +209 -0
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/llm.js +217 -0
- package/src/commands/matrix.js +207 -0
- package/src/commands/mcp.js +217 -0
- package/src/commands/memory.js +209 -0
- package/src/commands/multimodal.js +203 -0
- package/src/commands/nlprog.js +225 -0
- package/src/commands/nostr.js +209 -0
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/perception.js +209 -0
- package/src/commands/permmem.js +203 -0
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +233 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/session.js +209 -0
- package/src/commands/skill.js +207 -0
- package/src/commands/social.js +201 -0
- package/src/commands/sso.js +209 -0
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/tokens.js +209 -0
- package/src/commands/trust.js +217 -0
- package/src/commands/wallet.js +209 -0
- package/src/commands/workflow.js +203 -0
- package/src/index.js +140 -0
- package/src/lib/activitypub-bridge.js +334 -0
- package/src/lib/agent-network.js +341 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +333 -0
- package/src/lib/browser-automation.js +334 -0
- package/src/lib/code-agent.js +339 -0
- package/src/lib/collaboration-governance.js +334 -0
- package/src/lib/community-governance.js +346 -0
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/dbevo.js +351 -0
- package/src/lib/decentral-infra.js +330 -0
- package/src/lib/did-manager.js +341 -0
- package/src/lib/did-v2-manager.js +341 -0
- package/src/lib/dlp-engine.js +339 -0
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +339 -0
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/memory-manager.js +336 -0
- package/src/lib/multimodal.js +330 -0
- package/src/lib/nl-programming.js +341 -0
- package/src/lib/nostr-bridge.js +336 -0
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/perception.js +346 -0
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/session-manager.js +334 -0
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/trust-security.js +343 -0
- package/src/lib/ueba.js +340 -0
- package/src/lib/universal-runtime.js +330 -0
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/workflow-engine.js +330 -0
package/src/commands/tenant.js
CHANGED
|
@@ -925,3 +925,220 @@ export function registerTenantCommand(program) {
|
|
|
925
925
|
else console.log(JSON.stringify(s, null, 2));
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
|
+
|
|
929
|
+
// === Iter18 V2 governance overlay ===
|
|
930
|
+
export function registerTnsgovV2Commands(program) {
|
|
931
|
+
const parent = program.commands.find((c) => c.name() === "tenant");
|
|
932
|
+
if (!parent) return;
|
|
933
|
+
const L = async () => await import("../lib/tenant-saas.js");
|
|
934
|
+
parent
|
|
935
|
+
.command("tnsgov-enums-v2")
|
|
936
|
+
.description("Show V2 enums")
|
|
937
|
+
.action(async () => {
|
|
938
|
+
const m = await L();
|
|
939
|
+
console.log(
|
|
940
|
+
JSON.stringify(
|
|
941
|
+
{
|
|
942
|
+
profileMaturity: m.TNSGOV_PROFILE_MATURITY_V2,
|
|
943
|
+
allocationLifecycle: m.TNSGOV_ALLOCATION_LIFECYCLE_V2,
|
|
944
|
+
},
|
|
945
|
+
null,
|
|
946
|
+
2,
|
|
947
|
+
),
|
|
948
|
+
);
|
|
949
|
+
});
|
|
950
|
+
parent
|
|
951
|
+
.command("tnsgov-config-v2")
|
|
952
|
+
.description("Show V2 config")
|
|
953
|
+
.action(async () => {
|
|
954
|
+
const m = await L();
|
|
955
|
+
console.log(
|
|
956
|
+
JSON.stringify(
|
|
957
|
+
{
|
|
958
|
+
maxActive: m.getMaxActiveTnsgovProfilesPerOwnerV2(),
|
|
959
|
+
maxPending: m.getMaxPendingTnsgovAllocationsPerProfileV2(),
|
|
960
|
+
idleMs: m.getTnsgovProfileIdleMsV2(),
|
|
961
|
+
stuckMs: m.getTnsgovAllocationStuckMsV2(),
|
|
962
|
+
},
|
|
963
|
+
null,
|
|
964
|
+
2,
|
|
965
|
+
),
|
|
966
|
+
);
|
|
967
|
+
});
|
|
968
|
+
parent
|
|
969
|
+
.command("tnsgov-set-max-active-v2 <n>")
|
|
970
|
+
.description("Set max active")
|
|
971
|
+
.action(async (n) => {
|
|
972
|
+
(await L()).setMaxActiveTnsgovProfilesPerOwnerV2(Number(n));
|
|
973
|
+
console.log("ok");
|
|
974
|
+
});
|
|
975
|
+
parent
|
|
976
|
+
.command("tnsgov-set-max-pending-v2 <n>")
|
|
977
|
+
.description("Set max pending")
|
|
978
|
+
.action(async (n) => {
|
|
979
|
+
(await L()).setMaxPendingTnsgovAllocationsPerProfileV2(Number(n));
|
|
980
|
+
console.log("ok");
|
|
981
|
+
});
|
|
982
|
+
parent
|
|
983
|
+
.command("tnsgov-set-idle-ms-v2 <n>")
|
|
984
|
+
.description("Set idle threshold ms")
|
|
985
|
+
.action(async (n) => {
|
|
986
|
+
(await L()).setTnsgovProfileIdleMsV2(Number(n));
|
|
987
|
+
console.log("ok");
|
|
988
|
+
});
|
|
989
|
+
parent
|
|
990
|
+
.command("tnsgov-set-stuck-ms-v2 <n>")
|
|
991
|
+
.description("Set stuck threshold ms")
|
|
992
|
+
.action(async (n) => {
|
|
993
|
+
(await L()).setTnsgovAllocationStuckMsV2(Number(n));
|
|
994
|
+
console.log("ok");
|
|
995
|
+
});
|
|
996
|
+
parent
|
|
997
|
+
.command("tnsgov-register-v2 <id> <owner>")
|
|
998
|
+
.description("Register V2 profile")
|
|
999
|
+
.option("--plan <v>", "plan")
|
|
1000
|
+
.action(async (id, owner, o) => {
|
|
1001
|
+
const m = await L();
|
|
1002
|
+
console.log(
|
|
1003
|
+
JSON.stringify(
|
|
1004
|
+
m.registerTnsgovProfileV2({ id, owner, plan: o.plan }),
|
|
1005
|
+
null,
|
|
1006
|
+
2,
|
|
1007
|
+
),
|
|
1008
|
+
);
|
|
1009
|
+
});
|
|
1010
|
+
parent
|
|
1011
|
+
.command("tnsgov-activate-v2 <id>")
|
|
1012
|
+
.description("Activate profile")
|
|
1013
|
+
.action(async (id) => {
|
|
1014
|
+
console.log(
|
|
1015
|
+
JSON.stringify((await L()).activateTnsgovProfileV2(id), null, 2),
|
|
1016
|
+
);
|
|
1017
|
+
});
|
|
1018
|
+
parent
|
|
1019
|
+
.command("tnsgov-suspend-v2 <id>")
|
|
1020
|
+
.description("Suspend profile")
|
|
1021
|
+
.action(async (id) => {
|
|
1022
|
+
console.log(
|
|
1023
|
+
JSON.stringify((await L()).suspendTnsgovProfileV2(id), null, 2),
|
|
1024
|
+
);
|
|
1025
|
+
});
|
|
1026
|
+
parent
|
|
1027
|
+
.command("tnsgov-archive-v2 <id>")
|
|
1028
|
+
.description("Archive profile")
|
|
1029
|
+
.action(async (id) => {
|
|
1030
|
+
console.log(
|
|
1031
|
+
JSON.stringify((await L()).archiveTnsgovProfileV2(id), null, 2),
|
|
1032
|
+
);
|
|
1033
|
+
});
|
|
1034
|
+
parent
|
|
1035
|
+
.command("tnsgov-touch-v2 <id>")
|
|
1036
|
+
.description("Touch profile")
|
|
1037
|
+
.action(async (id) => {
|
|
1038
|
+
console.log(
|
|
1039
|
+
JSON.stringify((await L()).touchTnsgovProfileV2(id), null, 2),
|
|
1040
|
+
);
|
|
1041
|
+
});
|
|
1042
|
+
parent
|
|
1043
|
+
.command("tnsgov-get-v2 <id>")
|
|
1044
|
+
.description("Get profile")
|
|
1045
|
+
.action(async (id) => {
|
|
1046
|
+
console.log(JSON.stringify((await L()).getTnsgovProfileV2(id), null, 2));
|
|
1047
|
+
});
|
|
1048
|
+
parent
|
|
1049
|
+
.command("tnsgov-list-v2")
|
|
1050
|
+
.description("List profiles")
|
|
1051
|
+
.action(async () => {
|
|
1052
|
+
console.log(JSON.stringify((await L()).listTnsgovProfilesV2(), null, 2));
|
|
1053
|
+
});
|
|
1054
|
+
parent
|
|
1055
|
+
.command("tnsgov-create-allocation-v2 <id> <profileId>")
|
|
1056
|
+
.description("Create allocation")
|
|
1057
|
+
.option("--resource <v>", "resource")
|
|
1058
|
+
.action(async (id, profileId, o) => {
|
|
1059
|
+
const m = await L();
|
|
1060
|
+
console.log(
|
|
1061
|
+
JSON.stringify(
|
|
1062
|
+
m.createTnsgovAllocationV2({ id, profileId, resource: o.resource }),
|
|
1063
|
+
null,
|
|
1064
|
+
2,
|
|
1065
|
+
),
|
|
1066
|
+
);
|
|
1067
|
+
});
|
|
1068
|
+
parent
|
|
1069
|
+
.command("tnsgov-provisioning-allocation-v2 <id>")
|
|
1070
|
+
.description("Mark allocation as provisioning")
|
|
1071
|
+
.action(async (id) => {
|
|
1072
|
+
console.log(
|
|
1073
|
+
JSON.stringify((await L()).provisioningTnsgovAllocationV2(id), null, 2),
|
|
1074
|
+
);
|
|
1075
|
+
});
|
|
1076
|
+
parent
|
|
1077
|
+
.command("tnsgov-complete-allocation-v2 <id>")
|
|
1078
|
+
.description("Complete allocation")
|
|
1079
|
+
.action(async (id) => {
|
|
1080
|
+
console.log(
|
|
1081
|
+
JSON.stringify((await L()).completeAllocationTnsgovV2(id), null, 2),
|
|
1082
|
+
);
|
|
1083
|
+
});
|
|
1084
|
+
parent
|
|
1085
|
+
.command("tnsgov-fail-allocation-v2 <id> [reason]")
|
|
1086
|
+
.description("Fail allocation")
|
|
1087
|
+
.action(async (id, reason) => {
|
|
1088
|
+
console.log(
|
|
1089
|
+
JSON.stringify((await L()).failTnsgovAllocationV2(id, reason), null, 2),
|
|
1090
|
+
);
|
|
1091
|
+
});
|
|
1092
|
+
parent
|
|
1093
|
+
.command("tnsgov-cancel-allocation-v2 <id> [reason]")
|
|
1094
|
+
.description("Cancel allocation")
|
|
1095
|
+
.action(async (id, reason) => {
|
|
1096
|
+
console.log(
|
|
1097
|
+
JSON.stringify(
|
|
1098
|
+
(await L()).cancelTnsgovAllocationV2(id, reason),
|
|
1099
|
+
null,
|
|
1100
|
+
2,
|
|
1101
|
+
),
|
|
1102
|
+
);
|
|
1103
|
+
});
|
|
1104
|
+
parent
|
|
1105
|
+
.command("tnsgov-get-allocation-v2 <id>")
|
|
1106
|
+
.description("Get allocation")
|
|
1107
|
+
.action(async (id) => {
|
|
1108
|
+
console.log(
|
|
1109
|
+
JSON.stringify((await L()).getTnsgovAllocationV2(id), null, 2),
|
|
1110
|
+
);
|
|
1111
|
+
});
|
|
1112
|
+
parent
|
|
1113
|
+
.command("tnsgov-list-allocations-v2")
|
|
1114
|
+
.description("List allocations")
|
|
1115
|
+
.action(async () => {
|
|
1116
|
+
console.log(
|
|
1117
|
+
JSON.stringify((await L()).listTnsgovAllocationsV2(), null, 2),
|
|
1118
|
+
);
|
|
1119
|
+
});
|
|
1120
|
+
parent
|
|
1121
|
+
.command("tnsgov-auto-suspend-idle-v2")
|
|
1122
|
+
.description("Auto-suspend idle")
|
|
1123
|
+
.action(async () => {
|
|
1124
|
+
console.log(
|
|
1125
|
+
JSON.stringify((await L()).autoSuspendIdleTnsgovProfilesV2(), null, 2),
|
|
1126
|
+
);
|
|
1127
|
+
});
|
|
1128
|
+
parent
|
|
1129
|
+
.command("tnsgov-auto-fail-stuck-v2")
|
|
1130
|
+
.description("Auto-fail stuck allocations")
|
|
1131
|
+
.action(async () => {
|
|
1132
|
+
console.log(
|
|
1133
|
+
JSON.stringify((await L()).autoFailStuckTnsgovAllocationsV2(), null, 2),
|
|
1134
|
+
);
|
|
1135
|
+
});
|
|
1136
|
+
parent
|
|
1137
|
+
.command("tnsgov-gov-stats-v2")
|
|
1138
|
+
.description("V2 gov stats")
|
|
1139
|
+
.action(async () => {
|
|
1140
|
+
console.log(
|
|
1141
|
+
JSON.stringify((await L()).getTenantSaasGovStatsV2(), null, 2),
|
|
1142
|
+
);
|
|
1143
|
+
});
|
|
1144
|
+
}
|
package/src/commands/tokens.js
CHANGED
|
@@ -481,3 +481,212 @@ export function registerTokensCommand(program) {
|
|
|
481
481
|
.description("Auto-reject stale V2 records")
|
|
482
482
|
.action(() => out(true, autoRejectStaleRecordsV2()));
|
|
483
483
|
}
|
|
484
|
+
|
|
485
|
+
// === Iter24 V2 governance overlay ===
|
|
486
|
+
export function registerToktgovV2Commands(program) {
|
|
487
|
+
const parent = program.commands.find((c) => c.name() === "tokens");
|
|
488
|
+
if (!parent) return;
|
|
489
|
+
const L = async () => await import("../lib/token-tracker.js");
|
|
490
|
+
parent
|
|
491
|
+
.command("toktgov-enums-v2")
|
|
492
|
+
.description("Show V2 enums")
|
|
493
|
+
.action(async () => {
|
|
494
|
+
const m = await L();
|
|
495
|
+
console.log(
|
|
496
|
+
JSON.stringify(
|
|
497
|
+
{
|
|
498
|
+
profileMaturity: m.TOKTGOV_PROFILE_MATURITY_V2,
|
|
499
|
+
usageLifecycle: m.TOKTGOV_USAGE_LIFECYCLE_V2,
|
|
500
|
+
},
|
|
501
|
+
null,
|
|
502
|
+
2,
|
|
503
|
+
),
|
|
504
|
+
);
|
|
505
|
+
});
|
|
506
|
+
parent
|
|
507
|
+
.command("toktgov-config-v2")
|
|
508
|
+
.description("Show V2 config")
|
|
509
|
+
.action(async () => {
|
|
510
|
+
const m = await L();
|
|
511
|
+
console.log(
|
|
512
|
+
JSON.stringify(
|
|
513
|
+
{
|
|
514
|
+
maxActive: m.getMaxActiveToktgovProfilesPerOwnerV2(),
|
|
515
|
+
maxPending: m.getMaxPendingToktgovUsagesPerProfileV2(),
|
|
516
|
+
idleMs: m.getToktgovProfileIdleMsV2(),
|
|
517
|
+
stuckMs: m.getToktgovUsageStuckMsV2(),
|
|
518
|
+
},
|
|
519
|
+
null,
|
|
520
|
+
2,
|
|
521
|
+
),
|
|
522
|
+
);
|
|
523
|
+
});
|
|
524
|
+
parent
|
|
525
|
+
.command("toktgov-set-max-active-v2 <n>")
|
|
526
|
+
.description("Set max active")
|
|
527
|
+
.action(async (n) => {
|
|
528
|
+
(await L()).setMaxActiveToktgovProfilesPerOwnerV2(Number(n));
|
|
529
|
+
console.log("ok");
|
|
530
|
+
});
|
|
531
|
+
parent
|
|
532
|
+
.command("toktgov-set-max-pending-v2 <n>")
|
|
533
|
+
.description("Set max pending")
|
|
534
|
+
.action(async (n) => {
|
|
535
|
+
(await L()).setMaxPendingToktgovUsagesPerProfileV2(Number(n));
|
|
536
|
+
console.log("ok");
|
|
537
|
+
});
|
|
538
|
+
parent
|
|
539
|
+
.command("toktgov-set-idle-ms-v2 <n>")
|
|
540
|
+
.description("Set idle threshold ms")
|
|
541
|
+
.action(async (n) => {
|
|
542
|
+
(await L()).setToktgovProfileIdleMsV2(Number(n));
|
|
543
|
+
console.log("ok");
|
|
544
|
+
});
|
|
545
|
+
parent
|
|
546
|
+
.command("toktgov-set-stuck-ms-v2 <n>")
|
|
547
|
+
.description("Set stuck threshold ms")
|
|
548
|
+
.action(async (n) => {
|
|
549
|
+
(await L()).setToktgovUsageStuckMsV2(Number(n));
|
|
550
|
+
console.log("ok");
|
|
551
|
+
});
|
|
552
|
+
parent
|
|
553
|
+
.command("toktgov-register-v2 <id> <owner>")
|
|
554
|
+
.description("Register V2 profile")
|
|
555
|
+
.option("--budget <v>", "budget")
|
|
556
|
+
.action(async (id, owner, o) => {
|
|
557
|
+
const m = await L();
|
|
558
|
+
console.log(
|
|
559
|
+
JSON.stringify(
|
|
560
|
+
m.registerToktgovProfileV2({ id, owner, budget: o.budget }),
|
|
561
|
+
null,
|
|
562
|
+
2,
|
|
563
|
+
),
|
|
564
|
+
);
|
|
565
|
+
});
|
|
566
|
+
parent
|
|
567
|
+
.command("toktgov-activate-v2 <id>")
|
|
568
|
+
.description("Activate profile")
|
|
569
|
+
.action(async (id) => {
|
|
570
|
+
console.log(
|
|
571
|
+
JSON.stringify((await L()).activateToktgovProfileV2(id), null, 2),
|
|
572
|
+
);
|
|
573
|
+
});
|
|
574
|
+
parent
|
|
575
|
+
.command("toktgov-stale-v2 <id>")
|
|
576
|
+
.description("Stale profile")
|
|
577
|
+
.action(async (id) => {
|
|
578
|
+
console.log(
|
|
579
|
+
JSON.stringify((await L()).staleToktgovProfileV2(id), null, 2),
|
|
580
|
+
);
|
|
581
|
+
});
|
|
582
|
+
parent
|
|
583
|
+
.command("toktgov-archive-v2 <id>")
|
|
584
|
+
.description("Archive profile")
|
|
585
|
+
.action(async (id) => {
|
|
586
|
+
console.log(
|
|
587
|
+
JSON.stringify((await L()).archiveToktgovProfileV2(id), null, 2),
|
|
588
|
+
);
|
|
589
|
+
});
|
|
590
|
+
parent
|
|
591
|
+
.command("toktgov-touch-v2 <id>")
|
|
592
|
+
.description("Touch profile")
|
|
593
|
+
.action(async (id) => {
|
|
594
|
+
console.log(
|
|
595
|
+
JSON.stringify((await L()).touchToktgovProfileV2(id), null, 2),
|
|
596
|
+
);
|
|
597
|
+
});
|
|
598
|
+
parent
|
|
599
|
+
.command("toktgov-get-v2 <id>")
|
|
600
|
+
.description("Get profile")
|
|
601
|
+
.action(async (id) => {
|
|
602
|
+
console.log(JSON.stringify((await L()).getToktgovProfileV2(id), null, 2));
|
|
603
|
+
});
|
|
604
|
+
parent
|
|
605
|
+
.command("toktgov-list-v2")
|
|
606
|
+
.description("List profiles")
|
|
607
|
+
.action(async () => {
|
|
608
|
+
console.log(JSON.stringify((await L()).listToktgovProfilesV2(), null, 2));
|
|
609
|
+
});
|
|
610
|
+
parent
|
|
611
|
+
.command("toktgov-create-usage-v2 <id> <profileId>")
|
|
612
|
+
.description("Create usage")
|
|
613
|
+
.option("--model <v>", "model")
|
|
614
|
+
.action(async (id, profileId, o) => {
|
|
615
|
+
const m = await L();
|
|
616
|
+
console.log(
|
|
617
|
+
JSON.stringify(
|
|
618
|
+
m.createToktgovUsageV2({ id, profileId, model: o.model }),
|
|
619
|
+
null,
|
|
620
|
+
2,
|
|
621
|
+
),
|
|
622
|
+
);
|
|
623
|
+
});
|
|
624
|
+
parent
|
|
625
|
+
.command("toktgov-recording-usage-v2 <id>")
|
|
626
|
+
.description("Mark usage as recording")
|
|
627
|
+
.action(async (id) => {
|
|
628
|
+
console.log(
|
|
629
|
+
JSON.stringify((await L()).recordingToktgovUsageV2(id), null, 2),
|
|
630
|
+
);
|
|
631
|
+
});
|
|
632
|
+
parent
|
|
633
|
+
.command("toktgov-complete-usage-v2 <id>")
|
|
634
|
+
.description("Complete usage")
|
|
635
|
+
.action(async (id) => {
|
|
636
|
+
console.log(
|
|
637
|
+
JSON.stringify((await L()).completeUsageToktgovV2(id), null, 2),
|
|
638
|
+
);
|
|
639
|
+
});
|
|
640
|
+
parent
|
|
641
|
+
.command("toktgov-fail-usage-v2 <id> [reason]")
|
|
642
|
+
.description("Fail usage")
|
|
643
|
+
.action(async (id, reason) => {
|
|
644
|
+
console.log(
|
|
645
|
+
JSON.stringify((await L()).failToktgovUsageV2(id, reason), null, 2),
|
|
646
|
+
);
|
|
647
|
+
});
|
|
648
|
+
parent
|
|
649
|
+
.command("toktgov-cancel-usage-v2 <id> [reason]")
|
|
650
|
+
.description("Cancel usage")
|
|
651
|
+
.action(async (id, reason) => {
|
|
652
|
+
console.log(
|
|
653
|
+
JSON.stringify((await L()).cancelToktgovUsageV2(id, reason), null, 2),
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
parent
|
|
657
|
+
.command("toktgov-get-usage-v2 <id>")
|
|
658
|
+
.description("Get usage")
|
|
659
|
+
.action(async (id) => {
|
|
660
|
+
console.log(JSON.stringify((await L()).getToktgovUsageV2(id), null, 2));
|
|
661
|
+
});
|
|
662
|
+
parent
|
|
663
|
+
.command("toktgov-list-usages-v2")
|
|
664
|
+
.description("List usages")
|
|
665
|
+
.action(async () => {
|
|
666
|
+
console.log(JSON.stringify((await L()).listToktgovUsagesV2(), null, 2));
|
|
667
|
+
});
|
|
668
|
+
parent
|
|
669
|
+
.command("toktgov-auto-stale-idle-v2")
|
|
670
|
+
.description("Auto-stale idle")
|
|
671
|
+
.action(async () => {
|
|
672
|
+
console.log(
|
|
673
|
+
JSON.stringify((await L()).autoStaleIdleToktgovProfilesV2(), null, 2),
|
|
674
|
+
);
|
|
675
|
+
});
|
|
676
|
+
parent
|
|
677
|
+
.command("toktgov-auto-fail-stuck-v2")
|
|
678
|
+
.description("Auto-fail stuck usages")
|
|
679
|
+
.action(async () => {
|
|
680
|
+
console.log(
|
|
681
|
+
JSON.stringify((await L()).autoFailStuckToktgovUsagesV2(), null, 2),
|
|
682
|
+
);
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("toktgov-gov-stats-v2")
|
|
686
|
+
.description("V2 gov stats")
|
|
687
|
+
.action(async () => {
|
|
688
|
+
console.log(
|
|
689
|
+
JSON.stringify((await L()).getTokenTrackerGovStatsV2(), null, 2),
|
|
690
|
+
);
|
|
691
|
+
});
|
|
692
|
+
}
|
package/src/commands/trust.js
CHANGED
|
@@ -613,3 +613,220 @@ export function registerTrustCommand(program) {
|
|
|
613
613
|
|
|
614
614
|
program.addCommand(tr);
|
|
615
615
|
}
|
|
616
|
+
|
|
617
|
+
// === Iter18 V2 governance overlay ===
|
|
618
|
+
export function registerTrustgovV2Commands(program) {
|
|
619
|
+
const parent = program.commands.find((c) => c.name() === "trust");
|
|
620
|
+
if (!parent) return;
|
|
621
|
+
const L = async () => await import("../lib/trust-security.js");
|
|
622
|
+
parent
|
|
623
|
+
.command("trustgov-enums-v2")
|
|
624
|
+
.description("Show V2 enums")
|
|
625
|
+
.action(async () => {
|
|
626
|
+
const m = await L();
|
|
627
|
+
console.log(
|
|
628
|
+
JSON.stringify(
|
|
629
|
+
{
|
|
630
|
+
profileMaturity: m.TRUSTGOV_PROFILE_MATURITY_V2,
|
|
631
|
+
checkLifecycle: m.TRUSTGOV_CHECK_LIFECYCLE_V2,
|
|
632
|
+
},
|
|
633
|
+
null,
|
|
634
|
+
2,
|
|
635
|
+
),
|
|
636
|
+
);
|
|
637
|
+
});
|
|
638
|
+
parent
|
|
639
|
+
.command("trustgov-config-v2")
|
|
640
|
+
.description("Show V2 config")
|
|
641
|
+
.action(async () => {
|
|
642
|
+
const m = await L();
|
|
643
|
+
console.log(
|
|
644
|
+
JSON.stringify(
|
|
645
|
+
{
|
|
646
|
+
maxActive: m.getMaxActiveTrustgovProfilesPerOwnerV2(),
|
|
647
|
+
maxPending: m.getMaxPendingTrustgovChecksPerProfileV2(),
|
|
648
|
+
idleMs: m.getTrustgovProfileIdleMsV2(),
|
|
649
|
+
stuckMs: m.getTrustgovCheckStuckMsV2(),
|
|
650
|
+
},
|
|
651
|
+
null,
|
|
652
|
+
2,
|
|
653
|
+
),
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
parent
|
|
657
|
+
.command("trustgov-set-max-active-v2 <n>")
|
|
658
|
+
.description("Set max active")
|
|
659
|
+
.action(async (n) => {
|
|
660
|
+
(await L()).setMaxActiveTrustgovProfilesPerOwnerV2(Number(n));
|
|
661
|
+
console.log("ok");
|
|
662
|
+
});
|
|
663
|
+
parent
|
|
664
|
+
.command("trustgov-set-max-pending-v2 <n>")
|
|
665
|
+
.description("Set max pending")
|
|
666
|
+
.action(async (n) => {
|
|
667
|
+
(await L()).setMaxPendingTrustgovChecksPerProfileV2(Number(n));
|
|
668
|
+
console.log("ok");
|
|
669
|
+
});
|
|
670
|
+
parent
|
|
671
|
+
.command("trustgov-set-idle-ms-v2 <n>")
|
|
672
|
+
.description("Set idle threshold ms")
|
|
673
|
+
.action(async (n) => {
|
|
674
|
+
(await L()).setTrustgovProfileIdleMsV2(Number(n));
|
|
675
|
+
console.log("ok");
|
|
676
|
+
});
|
|
677
|
+
parent
|
|
678
|
+
.command("trustgov-set-stuck-ms-v2 <n>")
|
|
679
|
+
.description("Set stuck threshold ms")
|
|
680
|
+
.action(async (n) => {
|
|
681
|
+
(await L()).setTrustgovCheckStuckMsV2(Number(n));
|
|
682
|
+
console.log("ok");
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("trustgov-register-v2 <id> <owner>")
|
|
686
|
+
.description("Register V2 profile")
|
|
687
|
+
.option("--level <v>", "level")
|
|
688
|
+
.action(async (id, owner, o) => {
|
|
689
|
+
const m = await L();
|
|
690
|
+
console.log(
|
|
691
|
+
JSON.stringify(
|
|
692
|
+
m.registerTrustgovProfileV2({ id, owner, level: o.level }),
|
|
693
|
+
null,
|
|
694
|
+
2,
|
|
695
|
+
),
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
parent
|
|
699
|
+
.command("trustgov-activate-v2 <id>")
|
|
700
|
+
.description("Activate profile")
|
|
701
|
+
.action(async (id) => {
|
|
702
|
+
console.log(
|
|
703
|
+
JSON.stringify((await L()).activateTrustgovProfileV2(id), null, 2),
|
|
704
|
+
);
|
|
705
|
+
});
|
|
706
|
+
parent
|
|
707
|
+
.command("trustgov-suspend-v2 <id>")
|
|
708
|
+
.description("Suspend profile")
|
|
709
|
+
.action(async (id) => {
|
|
710
|
+
console.log(
|
|
711
|
+
JSON.stringify((await L()).suspendTrustgovProfileV2(id), null, 2),
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
parent
|
|
715
|
+
.command("trustgov-archive-v2 <id>")
|
|
716
|
+
.description("Archive profile")
|
|
717
|
+
.action(async (id) => {
|
|
718
|
+
console.log(
|
|
719
|
+
JSON.stringify((await L()).archiveTrustgovProfileV2(id), null, 2),
|
|
720
|
+
);
|
|
721
|
+
});
|
|
722
|
+
parent
|
|
723
|
+
.command("trustgov-touch-v2 <id>")
|
|
724
|
+
.description("Touch profile")
|
|
725
|
+
.action(async (id) => {
|
|
726
|
+
console.log(
|
|
727
|
+
JSON.stringify((await L()).touchTrustgovProfileV2(id), null, 2),
|
|
728
|
+
);
|
|
729
|
+
});
|
|
730
|
+
parent
|
|
731
|
+
.command("trustgov-get-v2 <id>")
|
|
732
|
+
.description("Get profile")
|
|
733
|
+
.action(async (id) => {
|
|
734
|
+
console.log(
|
|
735
|
+
JSON.stringify((await L()).getTrustgovProfileV2(id), null, 2),
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
parent
|
|
739
|
+
.command("trustgov-list-v2")
|
|
740
|
+
.description("List profiles")
|
|
741
|
+
.action(async () => {
|
|
742
|
+
console.log(
|
|
743
|
+
JSON.stringify((await L()).listTrustgovProfilesV2(), null, 2),
|
|
744
|
+
);
|
|
745
|
+
});
|
|
746
|
+
parent
|
|
747
|
+
.command("trustgov-create-check-v2 <id> <profileId>")
|
|
748
|
+
.description("Create check")
|
|
749
|
+
.option("--subject <v>", "subject")
|
|
750
|
+
.action(async (id, profileId, o) => {
|
|
751
|
+
const m = await L();
|
|
752
|
+
console.log(
|
|
753
|
+
JSON.stringify(
|
|
754
|
+
m.createTrustgovCheckV2({ id, profileId, subject: o.subject }),
|
|
755
|
+
null,
|
|
756
|
+
2,
|
|
757
|
+
),
|
|
758
|
+
);
|
|
759
|
+
});
|
|
760
|
+
parent
|
|
761
|
+
.command("trustgov-verifying-check-v2 <id>")
|
|
762
|
+
.description("Mark check as verifying")
|
|
763
|
+
.action(async (id) => {
|
|
764
|
+
console.log(
|
|
765
|
+
JSON.stringify((await L()).verifyingTrustgovCheckV2(id), null, 2),
|
|
766
|
+
);
|
|
767
|
+
});
|
|
768
|
+
parent
|
|
769
|
+
.command("trustgov-complete-check-v2 <id>")
|
|
770
|
+
.description("Complete check")
|
|
771
|
+
.action(async (id) => {
|
|
772
|
+
console.log(
|
|
773
|
+
JSON.stringify((await L()).completeCheckTrustgovV2(id), null, 2),
|
|
774
|
+
);
|
|
775
|
+
});
|
|
776
|
+
parent
|
|
777
|
+
.command("trustgov-fail-check-v2 <id> [reason]")
|
|
778
|
+
.description("Fail check")
|
|
779
|
+
.action(async (id, reason) => {
|
|
780
|
+
console.log(
|
|
781
|
+
JSON.stringify((await L()).failTrustgovCheckV2(id, reason), null, 2),
|
|
782
|
+
);
|
|
783
|
+
});
|
|
784
|
+
parent
|
|
785
|
+
.command("trustgov-cancel-check-v2 <id> [reason]")
|
|
786
|
+
.description("Cancel check")
|
|
787
|
+
.action(async (id, reason) => {
|
|
788
|
+
console.log(
|
|
789
|
+
JSON.stringify((await L()).cancelTrustgovCheckV2(id, reason), null, 2),
|
|
790
|
+
);
|
|
791
|
+
});
|
|
792
|
+
parent
|
|
793
|
+
.command("trustgov-get-check-v2 <id>")
|
|
794
|
+
.description("Get check")
|
|
795
|
+
.action(async (id) => {
|
|
796
|
+
console.log(JSON.stringify((await L()).getTrustgovCheckV2(id), null, 2));
|
|
797
|
+
});
|
|
798
|
+
parent
|
|
799
|
+
.command("trustgov-list-checks-v2")
|
|
800
|
+
.description("List checks")
|
|
801
|
+
.action(async () => {
|
|
802
|
+
console.log(JSON.stringify((await L()).listTrustgovChecksV2(), null, 2));
|
|
803
|
+
});
|
|
804
|
+
parent
|
|
805
|
+
.command("trustgov-auto-suspend-idle-v2")
|
|
806
|
+
.description("Auto-suspend idle")
|
|
807
|
+
.action(async () => {
|
|
808
|
+
console.log(
|
|
809
|
+
JSON.stringify(
|
|
810
|
+
(await L()).autoSuspendIdleTrustgovProfilesV2(),
|
|
811
|
+
null,
|
|
812
|
+
2,
|
|
813
|
+
),
|
|
814
|
+
);
|
|
815
|
+
});
|
|
816
|
+
parent
|
|
817
|
+
.command("trustgov-auto-fail-stuck-v2")
|
|
818
|
+
.description("Auto-fail stuck checks")
|
|
819
|
+
.action(async () => {
|
|
820
|
+
console.log(
|
|
821
|
+
JSON.stringify((await L()).autoFailStuckTrustgovChecksV2(), null, 2),
|
|
822
|
+
);
|
|
823
|
+
});
|
|
824
|
+
parent
|
|
825
|
+
.command("trustgov-gov-stats-v2")
|
|
826
|
+
.description("V2 gov stats")
|
|
827
|
+
.action(async () => {
|
|
828
|
+
console.log(
|
|
829
|
+
JSON.stringify((await L()).getTrustSecurityGovStatsV2(), null, 2),
|
|
830
|
+
);
|
|
831
|
+
});
|
|
832
|
+
}
|