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
@@ -981,3 +981,212 @@ export function registerSsoCommand(program) {
981
981
  .description("V2 auto-fail stuck")
982
982
  .action(() => _v2json(autoFailStuckLoginsV2()));
983
983
  }
984
+
985
+ // === Iter19 V2 governance overlay ===
986
+ export function registerSsogovV2Commands(program) {
987
+ const parent = program.commands.find((c) => c.name() === "sso");
988
+ if (!parent) return;
989
+ const L = async () => await import("../lib/sso-manager.js");
990
+ parent
991
+ .command("ssogov-enums-v2")
992
+ .description("Show V2 enums")
993
+ .action(async () => {
994
+ const m = await L();
995
+ console.log(
996
+ JSON.stringify(
997
+ {
998
+ profileMaturity: m.SSOGOV_PROFILE_MATURITY_V2,
999
+ loginLifecycle: m.SSOGOV_LOGIN_LIFECYCLE_V2,
1000
+ },
1001
+ null,
1002
+ 2,
1003
+ ),
1004
+ );
1005
+ });
1006
+ parent
1007
+ .command("ssogov-config-v2")
1008
+ .description("Show V2 config")
1009
+ .action(async () => {
1010
+ const m = await L();
1011
+ console.log(
1012
+ JSON.stringify(
1013
+ {
1014
+ maxActive: m.getMaxActiveSsogovProfilesPerOwnerV2(),
1015
+ maxPending: m.getMaxPendingSsogovLoginsPerProfileV2(),
1016
+ idleMs: m.getSsogovProfileIdleMsV2(),
1017
+ stuckMs: m.getSsogovLoginStuckMsV2(),
1018
+ },
1019
+ null,
1020
+ 2,
1021
+ ),
1022
+ );
1023
+ });
1024
+ parent
1025
+ .command("ssogov-set-max-active-v2 <n>")
1026
+ .description("Set max active")
1027
+ .action(async (n) => {
1028
+ (await L()).setMaxActiveSsogovProfilesPerOwnerV2(Number(n));
1029
+ console.log("ok");
1030
+ });
1031
+ parent
1032
+ .command("ssogov-set-max-pending-v2 <n>")
1033
+ .description("Set max pending")
1034
+ .action(async (n) => {
1035
+ (await L()).setMaxPendingSsogovLoginsPerProfileV2(Number(n));
1036
+ console.log("ok");
1037
+ });
1038
+ parent
1039
+ .command("ssogov-set-idle-ms-v2 <n>")
1040
+ .description("Set idle threshold ms")
1041
+ .action(async (n) => {
1042
+ (await L()).setSsogovProfileIdleMsV2(Number(n));
1043
+ console.log("ok");
1044
+ });
1045
+ parent
1046
+ .command("ssogov-set-stuck-ms-v2 <n>")
1047
+ .description("Set stuck threshold ms")
1048
+ .action(async (n) => {
1049
+ (await L()).setSsogovLoginStuckMsV2(Number(n));
1050
+ console.log("ok");
1051
+ });
1052
+ parent
1053
+ .command("ssogov-register-v2 <id> <owner>")
1054
+ .description("Register V2 profile")
1055
+ .option("--protocol <v>", "protocol")
1056
+ .action(async (id, owner, o) => {
1057
+ const m = await L();
1058
+ console.log(
1059
+ JSON.stringify(
1060
+ m.registerSsogovProfileV2({ id, owner, protocol: o.protocol }),
1061
+ null,
1062
+ 2,
1063
+ ),
1064
+ );
1065
+ });
1066
+ parent
1067
+ .command("ssogov-activate-v2 <id>")
1068
+ .description("Activate profile")
1069
+ .action(async (id) => {
1070
+ console.log(
1071
+ JSON.stringify((await L()).activateSsogovProfileV2(id), null, 2),
1072
+ );
1073
+ });
1074
+ parent
1075
+ .command("ssogov-suspend-v2 <id>")
1076
+ .description("Suspend profile")
1077
+ .action(async (id) => {
1078
+ console.log(
1079
+ JSON.stringify((await L()).suspendSsogovProfileV2(id), null, 2),
1080
+ );
1081
+ });
1082
+ parent
1083
+ .command("ssogov-archive-v2 <id>")
1084
+ .description("Archive profile")
1085
+ .action(async (id) => {
1086
+ console.log(
1087
+ JSON.stringify((await L()).archiveSsogovProfileV2(id), null, 2),
1088
+ );
1089
+ });
1090
+ parent
1091
+ .command("ssogov-touch-v2 <id>")
1092
+ .description("Touch profile")
1093
+ .action(async (id) => {
1094
+ console.log(
1095
+ JSON.stringify((await L()).touchSsogovProfileV2(id), null, 2),
1096
+ );
1097
+ });
1098
+ parent
1099
+ .command("ssogov-get-v2 <id>")
1100
+ .description("Get profile")
1101
+ .action(async (id) => {
1102
+ console.log(JSON.stringify((await L()).getSsogovProfileV2(id), null, 2));
1103
+ });
1104
+ parent
1105
+ .command("ssogov-list-v2")
1106
+ .description("List profiles")
1107
+ .action(async () => {
1108
+ console.log(JSON.stringify((await L()).listSsogovProfilesV2(), null, 2));
1109
+ });
1110
+ parent
1111
+ .command("ssogov-create-login-v2 <id> <profileId>")
1112
+ .description("Create login")
1113
+ .option("--subject <v>", "subject")
1114
+ .action(async (id, profileId, o) => {
1115
+ const m = await L();
1116
+ console.log(
1117
+ JSON.stringify(
1118
+ m.createSsogovLoginV2({ id, profileId, subject: o.subject }),
1119
+ null,
1120
+ 2,
1121
+ ),
1122
+ );
1123
+ });
1124
+ parent
1125
+ .command("ssogov-authenticating-login-v2 <id>")
1126
+ .description("Mark login as authenticating")
1127
+ .action(async (id) => {
1128
+ console.log(
1129
+ JSON.stringify((await L()).authenticatingSsogovLoginV2(id), null, 2),
1130
+ );
1131
+ });
1132
+ parent
1133
+ .command("ssogov-complete-login-v2 <id>")
1134
+ .description("Complete login")
1135
+ .action(async (id) => {
1136
+ console.log(
1137
+ JSON.stringify((await L()).completeLoginSsogovV2(id), null, 2),
1138
+ );
1139
+ });
1140
+ parent
1141
+ .command("ssogov-fail-login-v2 <id> [reason]")
1142
+ .description("Fail login")
1143
+ .action(async (id, reason) => {
1144
+ console.log(
1145
+ JSON.stringify((await L()).failSsogovLoginV2(id, reason), null, 2),
1146
+ );
1147
+ });
1148
+ parent
1149
+ .command("ssogov-cancel-login-v2 <id> [reason]")
1150
+ .description("Cancel login")
1151
+ .action(async (id, reason) => {
1152
+ console.log(
1153
+ JSON.stringify((await L()).cancelSsogovLoginV2(id, reason), null, 2),
1154
+ );
1155
+ });
1156
+ parent
1157
+ .command("ssogov-get-login-v2 <id>")
1158
+ .description("Get login")
1159
+ .action(async (id) => {
1160
+ console.log(JSON.stringify((await L()).getSsogovLoginV2(id), null, 2));
1161
+ });
1162
+ parent
1163
+ .command("ssogov-list-logins-v2")
1164
+ .description("List logins")
1165
+ .action(async () => {
1166
+ console.log(JSON.stringify((await L()).listSsogovLoginsV2(), null, 2));
1167
+ });
1168
+ parent
1169
+ .command("ssogov-auto-suspend-idle-v2")
1170
+ .description("Auto-suspend idle")
1171
+ .action(async () => {
1172
+ console.log(
1173
+ JSON.stringify((await L()).autoSuspendIdleSsogovProfilesV2(), null, 2),
1174
+ );
1175
+ });
1176
+ parent
1177
+ .command("ssogov-auto-fail-stuck-v2")
1178
+ .description("Auto-fail stuck logins")
1179
+ .action(async () => {
1180
+ console.log(
1181
+ JSON.stringify((await L()).autoFailStuckSsogovLoginsV2(), null, 2),
1182
+ );
1183
+ });
1184
+ parent
1185
+ .command("ssogov-gov-stats-v2")
1186
+ .description("V2 gov stats")
1187
+ .action(async () => {
1188
+ console.log(
1189
+ JSON.stringify((await L()).getSsoManagerGovStatsV2(), null, 2),
1190
+ );
1191
+ });
1192
+ }
@@ -503,3 +503,212 @@ export function registerSyncCommand(program) {
503
503
  console.log(JSON.stringify(flipped, null, 2));
504
504
  });
505
505
  }
506
+
507
+ // === Iter19 V2 governance overlay ===
508
+ export function registerSyncgovV2Commands(program) {
509
+ const parent = program.commands.find((c) => c.name() === "sync");
510
+ if (!parent) return;
511
+ const L = async () => await import("../lib/sync-manager.js");
512
+ parent
513
+ .command("syncgov-enums-v2")
514
+ .description("Show V2 enums")
515
+ .action(async () => {
516
+ const m = await L();
517
+ console.log(
518
+ JSON.stringify(
519
+ {
520
+ profileMaturity: m.SYNCGOV_PROFILE_MATURITY_V2,
521
+ batchLifecycle: m.SYNCGOV_BATCH_LIFECYCLE_V2,
522
+ },
523
+ null,
524
+ 2,
525
+ ),
526
+ );
527
+ });
528
+ parent
529
+ .command("syncgov-config-v2")
530
+ .description("Show V2 config")
531
+ .action(async () => {
532
+ const m = await L();
533
+ console.log(
534
+ JSON.stringify(
535
+ {
536
+ maxActive: m.getMaxActiveSyncgovProfilesPerOwnerV2(),
537
+ maxPending: m.getMaxPendingSyncgovBatchsPerProfileV2(),
538
+ idleMs: m.getSyncgovProfileIdleMsV2(),
539
+ stuckMs: m.getSyncgovBatchStuckMsV2(),
540
+ },
541
+ null,
542
+ 2,
543
+ ),
544
+ );
545
+ });
546
+ parent
547
+ .command("syncgov-set-max-active-v2 <n>")
548
+ .description("Set max active")
549
+ .action(async (n) => {
550
+ (await L()).setMaxActiveSyncgovProfilesPerOwnerV2(Number(n));
551
+ console.log("ok");
552
+ });
553
+ parent
554
+ .command("syncgov-set-max-pending-v2 <n>")
555
+ .description("Set max pending")
556
+ .action(async (n) => {
557
+ (await L()).setMaxPendingSyncgovBatchsPerProfileV2(Number(n));
558
+ console.log("ok");
559
+ });
560
+ parent
561
+ .command("syncgov-set-idle-ms-v2 <n>")
562
+ .description("Set idle threshold ms")
563
+ .action(async (n) => {
564
+ (await L()).setSyncgovProfileIdleMsV2(Number(n));
565
+ console.log("ok");
566
+ });
567
+ parent
568
+ .command("syncgov-set-stuck-ms-v2 <n>")
569
+ .description("Set stuck threshold ms")
570
+ .action(async (n) => {
571
+ (await L()).setSyncgovBatchStuckMsV2(Number(n));
572
+ console.log("ok");
573
+ });
574
+ parent
575
+ .command("syncgov-register-v2 <id> <owner>")
576
+ .description("Register V2 profile")
577
+ .option("--target <v>", "target")
578
+ .action(async (id, owner, o) => {
579
+ const m = await L();
580
+ console.log(
581
+ JSON.stringify(
582
+ m.registerSyncgovProfileV2({ id, owner, target: o.target }),
583
+ null,
584
+ 2,
585
+ ),
586
+ );
587
+ });
588
+ parent
589
+ .command("syncgov-activate-v2 <id>")
590
+ .description("Activate profile")
591
+ .action(async (id) => {
592
+ console.log(
593
+ JSON.stringify((await L()).activateSyncgovProfileV2(id), null, 2),
594
+ );
595
+ });
596
+ parent
597
+ .command("syncgov-stale-v2 <id>")
598
+ .description("Stale profile")
599
+ .action(async (id) => {
600
+ console.log(
601
+ JSON.stringify((await L()).staleSyncgovProfileV2(id), null, 2),
602
+ );
603
+ });
604
+ parent
605
+ .command("syncgov-archive-v2 <id>")
606
+ .description("Archive profile")
607
+ .action(async (id) => {
608
+ console.log(
609
+ JSON.stringify((await L()).archiveSyncgovProfileV2(id), null, 2),
610
+ );
611
+ });
612
+ parent
613
+ .command("syncgov-touch-v2 <id>")
614
+ .description("Touch profile")
615
+ .action(async (id) => {
616
+ console.log(
617
+ JSON.stringify((await L()).touchSyncgovProfileV2(id), null, 2),
618
+ );
619
+ });
620
+ parent
621
+ .command("syncgov-get-v2 <id>")
622
+ .description("Get profile")
623
+ .action(async (id) => {
624
+ console.log(JSON.stringify((await L()).getSyncgovProfileV2(id), null, 2));
625
+ });
626
+ parent
627
+ .command("syncgov-list-v2")
628
+ .description("List profiles")
629
+ .action(async () => {
630
+ console.log(JSON.stringify((await L()).listSyncgovProfilesV2(), null, 2));
631
+ });
632
+ parent
633
+ .command("syncgov-create-batch-v2 <id> <profileId>")
634
+ .description("Create batch")
635
+ .option("--scope <v>", "scope")
636
+ .action(async (id, profileId, o) => {
637
+ const m = await L();
638
+ console.log(
639
+ JSON.stringify(
640
+ m.createSyncgovBatchV2({ id, profileId, scope: o.scope }),
641
+ null,
642
+ 2,
643
+ ),
644
+ );
645
+ });
646
+ parent
647
+ .command("syncgov-replicating-batch-v2 <id>")
648
+ .description("Mark batch as replicating")
649
+ .action(async (id) => {
650
+ console.log(
651
+ JSON.stringify((await L()).replicatingSyncgovBatchV2(id), null, 2),
652
+ );
653
+ });
654
+ parent
655
+ .command("syncgov-complete-batch-v2 <id>")
656
+ .description("Complete batch")
657
+ .action(async (id) => {
658
+ console.log(
659
+ JSON.stringify((await L()).completeBatchSyncgovV2(id), null, 2),
660
+ );
661
+ });
662
+ parent
663
+ .command("syncgov-fail-batch-v2 <id> [reason]")
664
+ .description("Fail batch")
665
+ .action(async (id, reason) => {
666
+ console.log(
667
+ JSON.stringify((await L()).failSyncgovBatchV2(id, reason), null, 2),
668
+ );
669
+ });
670
+ parent
671
+ .command("syncgov-cancel-batch-v2 <id> [reason]")
672
+ .description("Cancel batch")
673
+ .action(async (id, reason) => {
674
+ console.log(
675
+ JSON.stringify((await L()).cancelSyncgovBatchV2(id, reason), null, 2),
676
+ );
677
+ });
678
+ parent
679
+ .command("syncgov-get-batch-v2 <id>")
680
+ .description("Get batch")
681
+ .action(async (id) => {
682
+ console.log(JSON.stringify((await L()).getSyncgovBatchV2(id), null, 2));
683
+ });
684
+ parent
685
+ .command("syncgov-list-batchs-v2")
686
+ .description("List batchs")
687
+ .action(async () => {
688
+ console.log(JSON.stringify((await L()).listSyncgovBatchsV2(), null, 2));
689
+ });
690
+ parent
691
+ .command("syncgov-auto-stale-idle-v2")
692
+ .description("Auto-stale idle")
693
+ .action(async () => {
694
+ console.log(
695
+ JSON.stringify((await L()).autoStaleIdleSyncgovProfilesV2(), null, 2),
696
+ );
697
+ });
698
+ parent
699
+ .command("syncgov-auto-fail-stuck-v2")
700
+ .description("Auto-fail stuck batchs")
701
+ .action(async () => {
702
+ console.log(
703
+ JSON.stringify((await L()).autoFailStuckSyncgovBatchsV2(), null, 2),
704
+ );
705
+ });
706
+ parent
707
+ .command("syncgov-gov-stats-v2")
708
+ .description("V2 gov stats")
709
+ .action(async () => {
710
+ console.log(
711
+ JSON.stringify((await L()).getSyncManagerGovStatsV2(), null, 2),
712
+ );
713
+ });
714
+ }
@@ -604,3 +604,212 @@ export function registerTechCommand(program) {
604
604
  console.log(JSON.stringify(autoFailStuckRunsV2(), null, 2));
605
605
  });
606
606
  }
607
+
608
+ // === Iter23 V2 governance overlay ===
609
+ export function registerTechgovV2Commands(program) {
610
+ const parent = program.commands.find((c) => c.name() === "tech");
611
+ if (!parent) return;
612
+ const L = async () => await import("../lib/tech-learning-engine.js");
613
+ parent
614
+ .command("techgov-enums-v2")
615
+ .description("Show V2 enums")
616
+ .action(async () => {
617
+ const m = await L();
618
+ console.log(
619
+ JSON.stringify(
620
+ {
621
+ profileMaturity: m.TECHGOV_PROFILE_MATURITY_V2,
622
+ lessonLifecycle: m.TECHGOV_LESSON_LIFECYCLE_V2,
623
+ },
624
+ null,
625
+ 2,
626
+ ),
627
+ );
628
+ });
629
+ parent
630
+ .command("techgov-config-v2")
631
+ .description("Show V2 config")
632
+ .action(async () => {
633
+ const m = await L();
634
+ console.log(
635
+ JSON.stringify(
636
+ {
637
+ maxActive: m.getMaxActiveTechgovProfilesPerOwnerV2(),
638
+ maxPending: m.getMaxPendingTechgovLessonsPerProfileV2(),
639
+ idleMs: m.getTechgovProfileIdleMsV2(),
640
+ stuckMs: m.getTechgovLessonStuckMsV2(),
641
+ },
642
+ null,
643
+ 2,
644
+ ),
645
+ );
646
+ });
647
+ parent
648
+ .command("techgov-set-max-active-v2 <n>")
649
+ .description("Set max active")
650
+ .action(async (n) => {
651
+ (await L()).setMaxActiveTechgovProfilesPerOwnerV2(Number(n));
652
+ console.log("ok");
653
+ });
654
+ parent
655
+ .command("techgov-set-max-pending-v2 <n>")
656
+ .description("Set max pending")
657
+ .action(async (n) => {
658
+ (await L()).setMaxPendingTechgovLessonsPerProfileV2(Number(n));
659
+ console.log("ok");
660
+ });
661
+ parent
662
+ .command("techgov-set-idle-ms-v2 <n>")
663
+ .description("Set idle threshold ms")
664
+ .action(async (n) => {
665
+ (await L()).setTechgovProfileIdleMsV2(Number(n));
666
+ console.log("ok");
667
+ });
668
+ parent
669
+ .command("techgov-set-stuck-ms-v2 <n>")
670
+ .description("Set stuck threshold ms")
671
+ .action(async (n) => {
672
+ (await L()).setTechgovLessonStuckMsV2(Number(n));
673
+ console.log("ok");
674
+ });
675
+ parent
676
+ .command("techgov-register-v2 <id> <owner>")
677
+ .description("Register V2 profile")
678
+ .option("--topic <v>", "topic")
679
+ .action(async (id, owner, o) => {
680
+ const m = await L();
681
+ console.log(
682
+ JSON.stringify(
683
+ m.registerTechgovProfileV2({ id, owner, topic: o.topic }),
684
+ null,
685
+ 2,
686
+ ),
687
+ );
688
+ });
689
+ parent
690
+ .command("techgov-activate-v2 <id>")
691
+ .description("Activate profile")
692
+ .action(async (id) => {
693
+ console.log(
694
+ JSON.stringify((await L()).activateTechgovProfileV2(id), null, 2),
695
+ );
696
+ });
697
+ parent
698
+ .command("techgov-stale-v2 <id>")
699
+ .description("Stale profile")
700
+ .action(async (id) => {
701
+ console.log(
702
+ JSON.stringify((await L()).staleTechgovProfileV2(id), null, 2),
703
+ );
704
+ });
705
+ parent
706
+ .command("techgov-archive-v2 <id>")
707
+ .description("Archive profile")
708
+ .action(async (id) => {
709
+ console.log(
710
+ JSON.stringify((await L()).archiveTechgovProfileV2(id), null, 2),
711
+ );
712
+ });
713
+ parent
714
+ .command("techgov-touch-v2 <id>")
715
+ .description("Touch profile")
716
+ .action(async (id) => {
717
+ console.log(
718
+ JSON.stringify((await L()).touchTechgovProfileV2(id), null, 2),
719
+ );
720
+ });
721
+ parent
722
+ .command("techgov-get-v2 <id>")
723
+ .description("Get profile")
724
+ .action(async (id) => {
725
+ console.log(JSON.stringify((await L()).getTechgovProfileV2(id), null, 2));
726
+ });
727
+ parent
728
+ .command("techgov-list-v2")
729
+ .description("List profiles")
730
+ .action(async () => {
731
+ console.log(JSON.stringify((await L()).listTechgovProfilesV2(), null, 2));
732
+ });
733
+ parent
734
+ .command("techgov-create-lesson-v2 <id> <profileId>")
735
+ .description("Create lesson")
736
+ .option("--source <v>", "source")
737
+ .action(async (id, profileId, o) => {
738
+ const m = await L();
739
+ console.log(
740
+ JSON.stringify(
741
+ m.createTechgovLessonV2({ id, profileId, source: o.source }),
742
+ null,
743
+ 2,
744
+ ),
745
+ );
746
+ });
747
+ parent
748
+ .command("techgov-studying-lesson-v2 <id>")
749
+ .description("Mark lesson as studying")
750
+ .action(async (id) => {
751
+ console.log(
752
+ JSON.stringify((await L()).studyingTechgovLessonV2(id), null, 2),
753
+ );
754
+ });
755
+ parent
756
+ .command("techgov-complete-lesson-v2 <id>")
757
+ .description("Complete lesson")
758
+ .action(async (id) => {
759
+ console.log(
760
+ JSON.stringify((await L()).completeLessonTechgovV2(id), null, 2),
761
+ );
762
+ });
763
+ parent
764
+ .command("techgov-fail-lesson-v2 <id> [reason]")
765
+ .description("Fail lesson")
766
+ .action(async (id, reason) => {
767
+ console.log(
768
+ JSON.stringify((await L()).failTechgovLessonV2(id, reason), null, 2),
769
+ );
770
+ });
771
+ parent
772
+ .command("techgov-cancel-lesson-v2 <id> [reason]")
773
+ .description("Cancel lesson")
774
+ .action(async (id, reason) => {
775
+ console.log(
776
+ JSON.stringify((await L()).cancelTechgovLessonV2(id, reason), null, 2),
777
+ );
778
+ });
779
+ parent
780
+ .command("techgov-get-lesson-v2 <id>")
781
+ .description("Get lesson")
782
+ .action(async (id) => {
783
+ console.log(JSON.stringify((await L()).getTechgovLessonV2(id), null, 2));
784
+ });
785
+ parent
786
+ .command("techgov-list-lessons-v2")
787
+ .description("List lessons")
788
+ .action(async () => {
789
+ console.log(JSON.stringify((await L()).listTechgovLessonsV2(), null, 2));
790
+ });
791
+ parent
792
+ .command("techgov-auto-stale-idle-v2")
793
+ .description("Auto-stale idle")
794
+ .action(async () => {
795
+ console.log(
796
+ JSON.stringify((await L()).autoStaleIdleTechgovProfilesV2(), null, 2),
797
+ );
798
+ });
799
+ parent
800
+ .command("techgov-auto-fail-stuck-v2")
801
+ .description("Auto-fail stuck lessons")
802
+ .action(async () => {
803
+ console.log(
804
+ JSON.stringify((await L()).autoFailStuckTechgovLessonsV2(), null, 2),
805
+ );
806
+ });
807
+ parent
808
+ .command("techgov-gov-stats-v2")
809
+ .description("V2 gov stats")
810
+ .action(async () => {
811
+ console.log(
812
+ JSON.stringify((await L()).getTechLearningEngineGovStatsV2(), null, 2),
813
+ );
814
+ });
815
+ }