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.
Files changed (113) hide show
  1. package/package.json +1 -1
  2. package/src/commands/activitypub.js +207 -0
  3. package/src/commands/agent-network.js +217 -0
  4. package/src/commands/automation.js +201 -0
  5. package/src/commands/bi.js +203 -0
  6. package/src/commands/browse.js +213 -0
  7. package/src/commands/codegen.js +207 -0
  8. package/src/commands/collab.js +211 -0
  9. package/src/commands/compliance.js +410 -0
  10. package/src/commands/cowork.js +203 -0
  11. package/src/commands/dbevo.js +227 -0
  12. package/src/commands/dev.js +207 -0
  13. package/src/commands/did-v2.js +217 -0
  14. package/src/commands/did.js +221 -0
  15. package/src/commands/dlp.js +213 -0
  16. package/src/commands/evomap.js +205 -0
  17. package/src/commands/export.js +213 -0
  18. package/src/commands/federation.js +209 -0
  19. package/src/commands/fusion.js +205 -0
  20. package/src/commands/governance.js +209 -0
  21. package/src/commands/hook.js +209 -0
  22. package/src/commands/import.js +209 -0
  23. package/src/commands/infra.js +203 -0
  24. package/src/commands/instinct.js +209 -0
  25. package/src/commands/ipfs.js +207 -0
  26. package/src/commands/llm.js +217 -0
  27. package/src/commands/matrix.js +207 -0
  28. package/src/commands/mcp.js +217 -0
  29. package/src/commands/memory.js +209 -0
  30. package/src/commands/multimodal.js +203 -0
  31. package/src/commands/nlprog.js +225 -0
  32. package/src/commands/nostr.js +209 -0
  33. package/src/commands/note.js +205 -0
  34. package/src/commands/ops.js +219 -0
  35. package/src/commands/org.js +209 -0
  36. package/src/commands/p2p.js +209 -0
  37. package/src/commands/perception.js +209 -0
  38. package/src/commands/permmem.js +203 -0
  39. package/src/commands/plugin-ecosystem.js +209 -0
  40. package/src/commands/pqc.js +213 -0
  41. package/src/commands/quantization.js +207 -0
  42. package/src/commands/rcache.js +205 -0
  43. package/src/commands/recommend.js +233 -0
  44. package/src/commands/runtime.js +205 -0
  45. package/src/commands/scim.js +209 -0
  46. package/src/commands/session.js +209 -0
  47. package/src/commands/skill.js +207 -0
  48. package/src/commands/social.js +201 -0
  49. package/src/commands/sso.js +209 -0
  50. package/src/commands/sync.js +209 -0
  51. package/src/commands/tech.js +209 -0
  52. package/src/commands/tenant.js +217 -0
  53. package/src/commands/tokens.js +209 -0
  54. package/src/commands/trust.js +217 -0
  55. package/src/commands/wallet.js +209 -0
  56. package/src/commands/workflow.js +203 -0
  57. package/src/index.js +140 -0
  58. package/src/lib/activitypub-bridge.js +334 -0
  59. package/src/lib/agent-network.js +341 -0
  60. package/src/lib/aiops.js +346 -0
  61. package/src/lib/automation-engine.js +335 -0
  62. package/src/lib/autonomous-developer.js +332 -0
  63. package/src/lib/bi-engine.js +333 -0
  64. package/src/lib/browser-automation.js +334 -0
  65. package/src/lib/code-agent.js +339 -0
  66. package/src/lib/collaboration-governance.js +334 -0
  67. package/src/lib/community-governance.js +346 -0
  68. package/src/lib/content-recommendation.js +351 -0
  69. package/src/lib/cowork-share.js +338 -0
  70. package/src/lib/dbevo.js +351 -0
  71. package/src/lib/decentral-infra.js +330 -0
  72. package/src/lib/did-manager.js +341 -0
  73. package/src/lib/did-v2-manager.js +341 -0
  74. package/src/lib/dlp-engine.js +339 -0
  75. package/src/lib/evomap-governance.js +334 -0
  76. package/src/lib/federation-hardening.js +340 -0
  77. package/src/lib/hook-manager.js +341 -0
  78. package/src/lib/instinct-manager.js +346 -0
  79. package/src/lib/ipfs-storage.js +334 -0
  80. package/src/lib/knowledge-exporter.js +341 -0
  81. package/src/lib/knowledge-importer.js +341 -0
  82. package/src/lib/llm-providers.js +346 -0
  83. package/src/lib/matrix-bridge.js +339 -0
  84. package/src/lib/mcp-registry.js +346 -0
  85. package/src/lib/memory-manager.js +336 -0
  86. package/src/lib/multimodal.js +330 -0
  87. package/src/lib/nl-programming.js +341 -0
  88. package/src/lib/nostr-bridge.js +336 -0
  89. package/src/lib/note-versioning.js +339 -0
  90. package/src/lib/org-manager.js +336 -0
  91. package/src/lib/p2p-manager.js +341 -0
  92. package/src/lib/perception.js +346 -0
  93. package/src/lib/permanent-memory.js +327 -0
  94. package/src/lib/plugin-ecosystem.js +346 -0
  95. package/src/lib/pqc-manager.js +346 -0
  96. package/src/lib/protocol-fusion.js +338 -0
  97. package/src/lib/quantization.js +337 -0
  98. package/src/lib/response-cache.js +333 -0
  99. package/src/lib/scim-manager.js +346 -0
  100. package/src/lib/session-manager.js +334 -0
  101. package/src/lib/skill-loader.js +334 -0
  102. package/src/lib/social-manager.js +330 -0
  103. package/src/lib/sso-manager.js +340 -0
  104. package/src/lib/sync-manager.js +336 -0
  105. package/src/lib/tech-learning-engine.js +341 -0
  106. package/src/lib/tenant-saas.js +341 -0
  107. package/src/lib/threat-intel.js +330 -0
  108. package/src/lib/token-tracker.js +336 -0
  109. package/src/lib/trust-security.js +343 -0
  110. package/src/lib/ueba.js +340 -0
  111. package/src/lib/universal-runtime.js +330 -0
  112. package/src/lib/wallet-manager.js +336 -0
  113. package/src/lib/workflow-engine.js +330 -0
@@ -1166,3 +1166,208 @@ export function registerEvoMapV2Command(evomap) {
1166
1166
  console.log(JSON.stringify(getEvoMapManagerStatsV2(), null, 2));
1167
1167
  });
1168
1168
  }
1169
+
1170
+ // === Iter20 V2 governance overlay ===
1171
+ export function registerEvgovV2Commands(program) {
1172
+ const parent = program.commands.find((c) => c.name() === "evomap");
1173
+ if (!parent) return;
1174
+ const L = async () => await import("../lib/evomap-governance.js");
1175
+ parent
1176
+ .command("evgov-enums-v2")
1177
+ .description("Show V2 enums")
1178
+ .action(async () => {
1179
+ const m = await L();
1180
+ console.log(
1181
+ JSON.stringify(
1182
+ {
1183
+ profileMaturity: m.EVGOV_PROFILE_MATURITY_V2,
1184
+ proposalLifecycle: m.EVGOV_PROPOSAL_LIFECYCLE_V2,
1185
+ },
1186
+ null,
1187
+ 2,
1188
+ ),
1189
+ );
1190
+ });
1191
+ parent
1192
+ .command("evgov-config-v2")
1193
+ .description("Show V2 config")
1194
+ .action(async () => {
1195
+ const m = await L();
1196
+ console.log(
1197
+ JSON.stringify(
1198
+ {
1199
+ maxActive: m.getMaxActiveEvgovProfilesPerOwnerV2(),
1200
+ maxPending: m.getMaxPendingEvgovProposalsPerProfileV2(),
1201
+ idleMs: m.getEvgovProfileIdleMsV2(),
1202
+ stuckMs: m.getEvgovProposalStuckMsV2(),
1203
+ },
1204
+ null,
1205
+ 2,
1206
+ ),
1207
+ );
1208
+ });
1209
+ parent
1210
+ .command("evgov-set-max-active-v2 <n>")
1211
+ .description("Set max active")
1212
+ .action(async (n) => {
1213
+ (await L()).setMaxActiveEvgovProfilesPerOwnerV2(Number(n));
1214
+ console.log("ok");
1215
+ });
1216
+ parent
1217
+ .command("evgov-set-max-pending-v2 <n>")
1218
+ .description("Set max pending")
1219
+ .action(async (n) => {
1220
+ (await L()).setMaxPendingEvgovProposalsPerProfileV2(Number(n));
1221
+ console.log("ok");
1222
+ });
1223
+ parent
1224
+ .command("evgov-set-idle-ms-v2 <n>")
1225
+ .description("Set idle threshold ms")
1226
+ .action(async (n) => {
1227
+ (await L()).setEvgovProfileIdleMsV2(Number(n));
1228
+ console.log("ok");
1229
+ });
1230
+ parent
1231
+ .command("evgov-set-stuck-ms-v2 <n>")
1232
+ .description("Set stuck threshold ms")
1233
+ .action(async (n) => {
1234
+ (await L()).setEvgovProposalStuckMsV2(Number(n));
1235
+ console.log("ok");
1236
+ });
1237
+ parent
1238
+ .command("evgov-register-v2 <id> <owner>")
1239
+ .description("Register V2 profile")
1240
+ .option("--lane <v>", "lane")
1241
+ .action(async (id, owner, o) => {
1242
+ const m = await L();
1243
+ console.log(
1244
+ JSON.stringify(
1245
+ m.registerEvgovProfileV2({ id, owner, lane: o.lane }),
1246
+ null,
1247
+ 2,
1248
+ ),
1249
+ );
1250
+ });
1251
+ parent
1252
+ .command("evgov-activate-v2 <id>")
1253
+ .description("Activate profile")
1254
+ .action(async (id) => {
1255
+ console.log(
1256
+ JSON.stringify((await L()).activateEvgovProfileV2(id), null, 2),
1257
+ );
1258
+ });
1259
+ parent
1260
+ .command("evgov-pause-v2 <id>")
1261
+ .description("Pause profile")
1262
+ .action(async (id) => {
1263
+ console.log(JSON.stringify((await L()).pauseEvgovProfileV2(id), null, 2));
1264
+ });
1265
+ parent
1266
+ .command("evgov-archive-v2 <id>")
1267
+ .description("Archive profile")
1268
+ .action(async (id) => {
1269
+ console.log(
1270
+ JSON.stringify((await L()).archiveEvgovProfileV2(id), null, 2),
1271
+ );
1272
+ });
1273
+ parent
1274
+ .command("evgov-touch-v2 <id>")
1275
+ .description("Touch profile")
1276
+ .action(async (id) => {
1277
+ console.log(JSON.stringify((await L()).touchEvgovProfileV2(id), null, 2));
1278
+ });
1279
+ parent
1280
+ .command("evgov-get-v2 <id>")
1281
+ .description("Get profile")
1282
+ .action(async (id) => {
1283
+ console.log(JSON.stringify((await L()).getEvgovProfileV2(id), null, 2));
1284
+ });
1285
+ parent
1286
+ .command("evgov-list-v2")
1287
+ .description("List profiles")
1288
+ .action(async () => {
1289
+ console.log(JSON.stringify((await L()).listEvgovProfilesV2(), null, 2));
1290
+ });
1291
+ parent
1292
+ .command("evgov-create-proposal-v2 <id> <profileId>")
1293
+ .description("Create proposal")
1294
+ .option("--topic <v>", "topic")
1295
+ .action(async (id, profileId, o) => {
1296
+ const m = await L();
1297
+ console.log(
1298
+ JSON.stringify(
1299
+ m.createEvgovProposalV2({ id, profileId, topic: o.topic }),
1300
+ null,
1301
+ 2,
1302
+ ),
1303
+ );
1304
+ });
1305
+ parent
1306
+ .command("evgov-reviewing-proposal-v2 <id>")
1307
+ .description("Mark proposal as reviewing")
1308
+ .action(async (id) => {
1309
+ console.log(
1310
+ JSON.stringify((await L()).reviewingEvgovProposalV2(id), null, 2),
1311
+ );
1312
+ });
1313
+ parent
1314
+ .command("evgov-complete-proposal-v2 <id>")
1315
+ .description("Complete proposal")
1316
+ .action(async (id) => {
1317
+ console.log(
1318
+ JSON.stringify((await L()).completeProposalEvgovV2(id), null, 2),
1319
+ );
1320
+ });
1321
+ parent
1322
+ .command("evgov-fail-proposal-v2 <id> [reason]")
1323
+ .description("Fail proposal")
1324
+ .action(async (id, reason) => {
1325
+ console.log(
1326
+ JSON.stringify((await L()).failEvgovProposalV2(id, reason), null, 2),
1327
+ );
1328
+ });
1329
+ parent
1330
+ .command("evgov-cancel-proposal-v2 <id> [reason]")
1331
+ .description("Cancel proposal")
1332
+ .action(async (id, reason) => {
1333
+ console.log(
1334
+ JSON.stringify((await L()).cancelEvgovProposalV2(id, reason), null, 2),
1335
+ );
1336
+ });
1337
+ parent
1338
+ .command("evgov-get-proposal-v2 <id>")
1339
+ .description("Get proposal")
1340
+ .action(async (id) => {
1341
+ console.log(JSON.stringify((await L()).getEvgovProposalV2(id), null, 2));
1342
+ });
1343
+ parent
1344
+ .command("evgov-list-proposals-v2")
1345
+ .description("List proposals")
1346
+ .action(async () => {
1347
+ console.log(JSON.stringify((await L()).listEvgovProposalsV2(), null, 2));
1348
+ });
1349
+ parent
1350
+ .command("evgov-auto-pause-idle-v2")
1351
+ .description("Auto-pause idle")
1352
+ .action(async () => {
1353
+ console.log(
1354
+ JSON.stringify((await L()).autoPauseIdleEvgovProfilesV2(), null, 2),
1355
+ );
1356
+ });
1357
+ parent
1358
+ .command("evgov-auto-fail-stuck-v2")
1359
+ .description("Auto-fail stuck proposals")
1360
+ .action(async () => {
1361
+ console.log(
1362
+ JSON.stringify((await L()).autoFailStuckEvgovProposalsV2(), null, 2),
1363
+ );
1364
+ });
1365
+ parent
1366
+ .command("evgov-gov-stats-v2")
1367
+ .description("V2 gov stats")
1368
+ .action(async () => {
1369
+ console.log(
1370
+ JSON.stringify((await L()).getEvomapGovernanceGovStatsV2(), null, 2),
1371
+ );
1372
+ });
1373
+ }
@@ -378,3 +378,216 @@ export function registerExportCommand(program) {
378
378
  .description("Auto-fail stuck V2 export jobs")
379
379
  .action(() => out(autoFailStuckExportJobsV2()));
380
380
  }
381
+
382
+ // === Iter22 V2 governance overlay ===
383
+ export function registerKexpgovV2Commands(program) {
384
+ const parent = program.commands.find((c) => c.name() === "export");
385
+ if (!parent) return;
386
+ const L = async () => await import("../lib/knowledge-exporter.js");
387
+ parent
388
+ .command("kexpgov-enums-v2")
389
+ .description("Show V2 enums")
390
+ .action(async () => {
391
+ const m = await L();
392
+ console.log(
393
+ JSON.stringify(
394
+ {
395
+ profileMaturity: m.KEXPGOV_PROFILE_MATURITY_V2,
396
+ exportLifecycle: m.KEXPGOV_EXPORT_LIFECYCLE_V2,
397
+ },
398
+ null,
399
+ 2,
400
+ ),
401
+ );
402
+ });
403
+ parent
404
+ .command("kexpgov-config-v2")
405
+ .description("Show V2 config")
406
+ .action(async () => {
407
+ const m = await L();
408
+ console.log(
409
+ JSON.stringify(
410
+ {
411
+ maxActive: m.getMaxActiveKexpgovProfilesPerOwnerV2(),
412
+ maxPending: m.getMaxPendingKexpgovExportsPerProfileV2(),
413
+ idleMs: m.getKexpgovProfileIdleMsV2(),
414
+ stuckMs: m.getKexpgovExportStuckMsV2(),
415
+ },
416
+ null,
417
+ 2,
418
+ ),
419
+ );
420
+ });
421
+ parent
422
+ .command("kexpgov-set-max-active-v2 <n>")
423
+ .description("Set max active")
424
+ .action(async (n) => {
425
+ (await L()).setMaxActiveKexpgovProfilesPerOwnerV2(Number(n));
426
+ console.log("ok");
427
+ });
428
+ parent
429
+ .command("kexpgov-set-max-pending-v2 <n>")
430
+ .description("Set max pending")
431
+ .action(async (n) => {
432
+ (await L()).setMaxPendingKexpgovExportsPerProfileV2(Number(n));
433
+ console.log("ok");
434
+ });
435
+ parent
436
+ .command("kexpgov-set-idle-ms-v2 <n>")
437
+ .description("Set idle threshold ms")
438
+ .action(async (n) => {
439
+ (await L()).setKexpgovProfileIdleMsV2(Number(n));
440
+ console.log("ok");
441
+ });
442
+ parent
443
+ .command("kexpgov-set-stuck-ms-v2 <n>")
444
+ .description("Set stuck threshold ms")
445
+ .action(async (n) => {
446
+ (await L()).setKexpgovExportStuckMsV2(Number(n));
447
+ console.log("ok");
448
+ });
449
+ parent
450
+ .command("kexpgov-register-v2 <id> <owner>")
451
+ .description("Register V2 profile")
452
+ .option("--format <v>", "format")
453
+ .action(async (id, owner, o) => {
454
+ const m = await L();
455
+ console.log(
456
+ JSON.stringify(
457
+ m.registerKexpgovProfileV2({ id, owner, format: o.format }),
458
+ null,
459
+ 2,
460
+ ),
461
+ );
462
+ });
463
+ parent
464
+ .command("kexpgov-activate-v2 <id>")
465
+ .description("Activate profile")
466
+ .action(async (id) => {
467
+ console.log(
468
+ JSON.stringify((await L()).activateKexpgovProfileV2(id), null, 2),
469
+ );
470
+ });
471
+ parent
472
+ .command("kexpgov-stale-v2 <id>")
473
+ .description("Stale profile")
474
+ .action(async (id) => {
475
+ console.log(
476
+ JSON.stringify((await L()).staleKexpgovProfileV2(id), null, 2),
477
+ );
478
+ });
479
+ parent
480
+ .command("kexpgov-archive-v2 <id>")
481
+ .description("Archive profile")
482
+ .action(async (id) => {
483
+ console.log(
484
+ JSON.stringify((await L()).archiveKexpgovProfileV2(id), null, 2),
485
+ );
486
+ });
487
+ parent
488
+ .command("kexpgov-touch-v2 <id>")
489
+ .description("Touch profile")
490
+ .action(async (id) => {
491
+ console.log(
492
+ JSON.stringify((await L()).touchKexpgovProfileV2(id), null, 2),
493
+ );
494
+ });
495
+ parent
496
+ .command("kexpgov-get-v2 <id>")
497
+ .description("Get profile")
498
+ .action(async (id) => {
499
+ console.log(JSON.stringify((await L()).getKexpgovProfileV2(id), null, 2));
500
+ });
501
+ parent
502
+ .command("kexpgov-list-v2")
503
+ .description("List profiles")
504
+ .action(async () => {
505
+ console.log(JSON.stringify((await L()).listKexpgovProfilesV2(), null, 2));
506
+ });
507
+ parent
508
+ .command("kexpgov-create-export-v2 <id> <profileId>")
509
+ .description("Create export")
510
+ .option("--destination <v>", "destination")
511
+ .action(async (id, profileId, o) => {
512
+ const m = await L();
513
+ console.log(
514
+ JSON.stringify(
515
+ m.createKexpgovExportV2({
516
+ id,
517
+ profileId,
518
+ destination: o.destination,
519
+ }),
520
+ null,
521
+ 2,
522
+ ),
523
+ );
524
+ });
525
+ parent
526
+ .command("kexpgov-exporting-export-v2 <id>")
527
+ .description("Mark export as exporting")
528
+ .action(async (id) => {
529
+ console.log(
530
+ JSON.stringify((await L()).exportingKexpgovExportV2(id), null, 2),
531
+ );
532
+ });
533
+ parent
534
+ .command("kexpgov-complete-export-v2 <id>")
535
+ .description("Complete export")
536
+ .action(async (id) => {
537
+ console.log(
538
+ JSON.stringify((await L()).completeExportKexpgovV2(id), null, 2),
539
+ );
540
+ });
541
+ parent
542
+ .command("kexpgov-fail-export-v2 <id> [reason]")
543
+ .description("Fail export")
544
+ .action(async (id, reason) => {
545
+ console.log(
546
+ JSON.stringify((await L()).failKexpgovExportV2(id, reason), null, 2),
547
+ );
548
+ });
549
+ parent
550
+ .command("kexpgov-cancel-export-v2 <id> [reason]")
551
+ .description("Cancel export")
552
+ .action(async (id, reason) => {
553
+ console.log(
554
+ JSON.stringify((await L()).cancelKexpgovExportV2(id, reason), null, 2),
555
+ );
556
+ });
557
+ parent
558
+ .command("kexpgov-get-export-v2 <id>")
559
+ .description("Get export")
560
+ .action(async (id) => {
561
+ console.log(JSON.stringify((await L()).getKexpgovExportV2(id), null, 2));
562
+ });
563
+ parent
564
+ .command("kexpgov-list-exports-v2")
565
+ .description("List exports")
566
+ .action(async () => {
567
+ console.log(JSON.stringify((await L()).listKexpgovExportsV2(), null, 2));
568
+ });
569
+ parent
570
+ .command("kexpgov-auto-stale-idle-v2")
571
+ .description("Auto-stale idle")
572
+ .action(async () => {
573
+ console.log(
574
+ JSON.stringify((await L()).autoStaleIdleKexpgovProfilesV2(), null, 2),
575
+ );
576
+ });
577
+ parent
578
+ .command("kexpgov-auto-fail-stuck-v2")
579
+ .description("Auto-fail stuck exports")
580
+ .action(async () => {
581
+ console.log(
582
+ JSON.stringify((await L()).autoFailStuckKexpgovExportsV2(), null, 2),
583
+ );
584
+ });
585
+ parent
586
+ .command("kexpgov-gov-stats-v2")
587
+ .description("V2 gov stats")
588
+ .action(async () => {
589
+ console.log(
590
+ JSON.stringify((await L()).getKnowledgeExporterGovStatsV2(), null, 2),
591
+ );
592
+ });
593
+ }
@@ -708,3 +708,212 @@ export function registerFederationCommand(program) {
708
708
 
709
709
  program.addCommand(fed);
710
710
  }
711
+
712
+ // === Iter20 V2 governance overlay ===
713
+ export function registerFedgovV2Commands(program) {
714
+ const parent = program.commands.find((c) => c.name() === "federation");
715
+ if (!parent) return;
716
+ const L = async () => await import("../lib/federation-hardening.js");
717
+ parent
718
+ .command("fedgov-enums-v2")
719
+ .description("Show V2 enums")
720
+ .action(async () => {
721
+ const m = await L();
722
+ console.log(
723
+ JSON.stringify(
724
+ {
725
+ profileMaturity: m.FEDGOV_PROFILE_MATURITY_V2,
726
+ probeLifecycle: m.FEDGOV_PROBE_LIFECYCLE_V2,
727
+ },
728
+ null,
729
+ 2,
730
+ ),
731
+ );
732
+ });
733
+ parent
734
+ .command("fedgov-config-v2")
735
+ .description("Show V2 config")
736
+ .action(async () => {
737
+ const m = await L();
738
+ console.log(
739
+ JSON.stringify(
740
+ {
741
+ maxActive: m.getMaxActiveFedgovProfilesPerOwnerV2(),
742
+ maxPending: m.getMaxPendingFedgovProbesPerProfileV2(),
743
+ idleMs: m.getFedgovProfileIdleMsV2(),
744
+ stuckMs: m.getFedgovProbeStuckMsV2(),
745
+ },
746
+ null,
747
+ 2,
748
+ ),
749
+ );
750
+ });
751
+ parent
752
+ .command("fedgov-set-max-active-v2 <n>")
753
+ .description("Set max active")
754
+ .action(async (n) => {
755
+ (await L()).setMaxActiveFedgovProfilesPerOwnerV2(Number(n));
756
+ console.log("ok");
757
+ });
758
+ parent
759
+ .command("fedgov-set-max-pending-v2 <n>")
760
+ .description("Set max pending")
761
+ .action(async (n) => {
762
+ (await L()).setMaxPendingFedgovProbesPerProfileV2(Number(n));
763
+ console.log("ok");
764
+ });
765
+ parent
766
+ .command("fedgov-set-idle-ms-v2 <n>")
767
+ .description("Set idle threshold ms")
768
+ .action(async (n) => {
769
+ (await L()).setFedgovProfileIdleMsV2(Number(n));
770
+ console.log("ok");
771
+ });
772
+ parent
773
+ .command("fedgov-set-stuck-ms-v2 <n>")
774
+ .description("Set stuck threshold ms")
775
+ .action(async (n) => {
776
+ (await L()).setFedgovProbeStuckMsV2(Number(n));
777
+ console.log("ok");
778
+ });
779
+ parent
780
+ .command("fedgov-register-v2 <id> <owner>")
781
+ .description("Register V2 profile")
782
+ .option("--region <v>", "region")
783
+ .action(async (id, owner, o) => {
784
+ const m = await L();
785
+ console.log(
786
+ JSON.stringify(
787
+ m.registerFedgovProfileV2({ id, owner, region: o.region }),
788
+ null,
789
+ 2,
790
+ ),
791
+ );
792
+ });
793
+ parent
794
+ .command("fedgov-activate-v2 <id>")
795
+ .description("Activate profile")
796
+ .action(async (id) => {
797
+ console.log(
798
+ JSON.stringify((await L()).activateFedgovProfileV2(id), null, 2),
799
+ );
800
+ });
801
+ parent
802
+ .command("fedgov-degrade-v2 <id>")
803
+ .description("Degrade profile")
804
+ .action(async (id) => {
805
+ console.log(
806
+ JSON.stringify((await L()).degradeFedgovProfileV2(id), null, 2),
807
+ );
808
+ });
809
+ parent
810
+ .command("fedgov-archive-v2 <id>")
811
+ .description("Archive profile")
812
+ .action(async (id) => {
813
+ console.log(
814
+ JSON.stringify((await L()).archiveFedgovProfileV2(id), null, 2),
815
+ );
816
+ });
817
+ parent
818
+ .command("fedgov-touch-v2 <id>")
819
+ .description("Touch profile")
820
+ .action(async (id) => {
821
+ console.log(
822
+ JSON.stringify((await L()).touchFedgovProfileV2(id), null, 2),
823
+ );
824
+ });
825
+ parent
826
+ .command("fedgov-get-v2 <id>")
827
+ .description("Get profile")
828
+ .action(async (id) => {
829
+ console.log(JSON.stringify((await L()).getFedgovProfileV2(id), null, 2));
830
+ });
831
+ parent
832
+ .command("fedgov-list-v2")
833
+ .description("List profiles")
834
+ .action(async () => {
835
+ console.log(JSON.stringify((await L()).listFedgovProfilesV2(), null, 2));
836
+ });
837
+ parent
838
+ .command("fedgov-create-probe-v2 <id> <profileId>")
839
+ .description("Create probe")
840
+ .option("--endpoint <v>", "endpoint")
841
+ .action(async (id, profileId, o) => {
842
+ const m = await L();
843
+ console.log(
844
+ JSON.stringify(
845
+ m.createFedgovProbeV2({ id, profileId, endpoint: o.endpoint }),
846
+ null,
847
+ 2,
848
+ ),
849
+ );
850
+ });
851
+ parent
852
+ .command("fedgov-probing-probe-v2 <id>")
853
+ .description("Mark probe as probing")
854
+ .action(async (id) => {
855
+ console.log(
856
+ JSON.stringify((await L()).probingFedgovProbeV2(id), null, 2),
857
+ );
858
+ });
859
+ parent
860
+ .command("fedgov-complete-probe-v2 <id>")
861
+ .description("Complete probe")
862
+ .action(async (id) => {
863
+ console.log(
864
+ JSON.stringify((await L()).completeProbeFedgovV2(id), null, 2),
865
+ );
866
+ });
867
+ parent
868
+ .command("fedgov-fail-probe-v2 <id> [reason]")
869
+ .description("Fail probe")
870
+ .action(async (id, reason) => {
871
+ console.log(
872
+ JSON.stringify((await L()).failFedgovProbeV2(id, reason), null, 2),
873
+ );
874
+ });
875
+ parent
876
+ .command("fedgov-cancel-probe-v2 <id> [reason]")
877
+ .description("Cancel probe")
878
+ .action(async (id, reason) => {
879
+ console.log(
880
+ JSON.stringify((await L()).cancelFedgovProbeV2(id, reason), null, 2),
881
+ );
882
+ });
883
+ parent
884
+ .command("fedgov-get-probe-v2 <id>")
885
+ .description("Get probe")
886
+ .action(async (id) => {
887
+ console.log(JSON.stringify((await L()).getFedgovProbeV2(id), null, 2));
888
+ });
889
+ parent
890
+ .command("fedgov-list-probes-v2")
891
+ .description("List probes")
892
+ .action(async () => {
893
+ console.log(JSON.stringify((await L()).listFedgovProbesV2(), null, 2));
894
+ });
895
+ parent
896
+ .command("fedgov-auto-degrade-idle-v2")
897
+ .description("Auto-degrade idle")
898
+ .action(async () => {
899
+ console.log(
900
+ JSON.stringify((await L()).autoDegradeIdleFedgovProfilesV2(), null, 2),
901
+ );
902
+ });
903
+ parent
904
+ .command("fedgov-auto-fail-stuck-v2")
905
+ .description("Auto-fail stuck probes")
906
+ .action(async () => {
907
+ console.log(
908
+ JSON.stringify((await L()).autoFailStuckFedgovProbesV2(), null, 2),
909
+ );
910
+ });
911
+ parent
912
+ .command("fedgov-gov-stats-v2")
913
+ .description("V2 gov stats")
914
+ .action(async () => {
915
+ console.log(
916
+ JSON.stringify((await L()).getFederationHardeningGovStatsV2(), null, 2),
917
+ );
918
+ });
919
+ }