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
@@ -1991,3 +1991,206 @@ export function registerCwwfV2Commands(program) {
1991
1991
  );
1992
1992
  });
1993
1993
  }
1994
+
1995
+ // === Iter22 V2 governance overlay ===
1996
+ export function registerShgovV2Commands(program) {
1997
+ const parent = program.commands.find((c) => c.name() === "cowork");
1998
+ if (!parent) return;
1999
+ const L = async () => await import("../lib/cowork-share.js");
2000
+ parent
2001
+ .command("shgov-enums-v2")
2002
+ .description("Show V2 enums")
2003
+ .action(async () => {
2004
+ const m = await L();
2005
+ console.log(
2006
+ JSON.stringify(
2007
+ {
2008
+ profileMaturity: m.SHGOV_PROFILE_MATURITY_V2,
2009
+ shareLifecycle: m.SHGOV_SHARE_LIFECYCLE_V2,
2010
+ },
2011
+ null,
2012
+ 2,
2013
+ ),
2014
+ );
2015
+ });
2016
+ parent
2017
+ .command("shgov-config-v2")
2018
+ .description("Show V2 config")
2019
+ .action(async () => {
2020
+ const m = await L();
2021
+ console.log(
2022
+ JSON.stringify(
2023
+ {
2024
+ maxActive: m.getMaxActiveShgovProfilesPerOwnerV2(),
2025
+ maxPending: m.getMaxPendingShgovSharesPerProfileV2(),
2026
+ idleMs: m.getShgovProfileIdleMsV2(),
2027
+ stuckMs: m.getShgovShareStuckMsV2(),
2028
+ },
2029
+ null,
2030
+ 2,
2031
+ ),
2032
+ );
2033
+ });
2034
+ parent
2035
+ .command("shgov-set-max-active-v2 <n>")
2036
+ .description("Set max active")
2037
+ .action(async (n) => {
2038
+ (await L()).setMaxActiveShgovProfilesPerOwnerV2(Number(n));
2039
+ console.log("ok");
2040
+ });
2041
+ parent
2042
+ .command("shgov-set-max-pending-v2 <n>")
2043
+ .description("Set max pending")
2044
+ .action(async (n) => {
2045
+ (await L()).setMaxPendingShgovSharesPerProfileV2(Number(n));
2046
+ console.log("ok");
2047
+ });
2048
+ parent
2049
+ .command("shgov-set-idle-ms-v2 <n>")
2050
+ .description("Set idle threshold ms")
2051
+ .action(async (n) => {
2052
+ (await L()).setShgovProfileIdleMsV2(Number(n));
2053
+ console.log("ok");
2054
+ });
2055
+ parent
2056
+ .command("shgov-set-stuck-ms-v2 <n>")
2057
+ .description("Set stuck threshold ms")
2058
+ .action(async (n) => {
2059
+ (await L()).setShgovShareStuckMsV2(Number(n));
2060
+ console.log("ok");
2061
+ });
2062
+ parent
2063
+ .command("shgov-register-v2 <id> <owner>")
2064
+ .description("Register V2 profile")
2065
+ .option("--visibility <v>", "visibility")
2066
+ .action(async (id, owner, o) => {
2067
+ const m = await L();
2068
+ console.log(
2069
+ JSON.stringify(
2070
+ m.registerShgovProfileV2({ id, owner, visibility: o.visibility }),
2071
+ null,
2072
+ 2,
2073
+ ),
2074
+ );
2075
+ });
2076
+ parent
2077
+ .command("shgov-activate-v2 <id>")
2078
+ .description("Activate profile")
2079
+ .action(async (id) => {
2080
+ console.log(
2081
+ JSON.stringify((await L()).activateShgovProfileV2(id), null, 2),
2082
+ );
2083
+ });
2084
+ parent
2085
+ .command("shgov-pause-v2 <id>")
2086
+ .description("Pause profile")
2087
+ .action(async (id) => {
2088
+ console.log(JSON.stringify((await L()).pauseShgovProfileV2(id), null, 2));
2089
+ });
2090
+ parent
2091
+ .command("shgov-archive-v2 <id>")
2092
+ .description("Archive profile")
2093
+ .action(async (id) => {
2094
+ console.log(
2095
+ JSON.stringify((await L()).archiveShgovProfileV2(id), null, 2),
2096
+ );
2097
+ });
2098
+ parent
2099
+ .command("shgov-touch-v2 <id>")
2100
+ .description("Touch profile")
2101
+ .action(async (id) => {
2102
+ console.log(JSON.stringify((await L()).touchShgovProfileV2(id), null, 2));
2103
+ });
2104
+ parent
2105
+ .command("shgov-get-v2 <id>")
2106
+ .description("Get profile")
2107
+ .action(async (id) => {
2108
+ console.log(JSON.stringify((await L()).getShgovProfileV2(id), null, 2));
2109
+ });
2110
+ parent
2111
+ .command("shgov-list-v2")
2112
+ .description("List profiles")
2113
+ .action(async () => {
2114
+ console.log(JSON.stringify((await L()).listShgovProfilesV2(), null, 2));
2115
+ });
2116
+ parent
2117
+ .command("shgov-create-share-v2 <id> <profileId>")
2118
+ .description("Create share")
2119
+ .option("--target <v>", "target")
2120
+ .action(async (id, profileId, o) => {
2121
+ const m = await L();
2122
+ console.log(
2123
+ JSON.stringify(
2124
+ m.createShgovShareV2({ id, profileId, target: o.target }),
2125
+ null,
2126
+ 2,
2127
+ ),
2128
+ );
2129
+ });
2130
+ parent
2131
+ .command("shgov-sharing-share-v2 <id>")
2132
+ .description("Mark share as sharing")
2133
+ .action(async (id) => {
2134
+ console.log(JSON.stringify((await L()).sharingShgovShareV2(id), null, 2));
2135
+ });
2136
+ parent
2137
+ .command("shgov-complete-share-v2 <id>")
2138
+ .description("Complete share")
2139
+ .action(async (id) => {
2140
+ console.log(
2141
+ JSON.stringify((await L()).completeShareShgovV2(id), null, 2),
2142
+ );
2143
+ });
2144
+ parent
2145
+ .command("shgov-fail-share-v2 <id> [reason]")
2146
+ .description("Fail share")
2147
+ .action(async (id, reason) => {
2148
+ console.log(
2149
+ JSON.stringify((await L()).failShgovShareV2(id, reason), null, 2),
2150
+ );
2151
+ });
2152
+ parent
2153
+ .command("shgov-cancel-share-v2 <id> [reason]")
2154
+ .description("Cancel share")
2155
+ .action(async (id, reason) => {
2156
+ console.log(
2157
+ JSON.stringify((await L()).cancelShgovShareV2(id, reason), null, 2),
2158
+ );
2159
+ });
2160
+ parent
2161
+ .command("shgov-get-share-v2 <id>")
2162
+ .description("Get share")
2163
+ .action(async (id) => {
2164
+ console.log(JSON.stringify((await L()).getShgovShareV2(id), null, 2));
2165
+ });
2166
+ parent
2167
+ .command("shgov-list-shares-v2")
2168
+ .description("List shares")
2169
+ .action(async () => {
2170
+ console.log(JSON.stringify((await L()).listShgovSharesV2(), null, 2));
2171
+ });
2172
+ parent
2173
+ .command("shgov-auto-pause-idle-v2")
2174
+ .description("Auto-pause idle")
2175
+ .action(async () => {
2176
+ console.log(
2177
+ JSON.stringify((await L()).autoPauseIdleShgovProfilesV2(), null, 2),
2178
+ );
2179
+ });
2180
+ parent
2181
+ .command("shgov-auto-fail-stuck-v2")
2182
+ .description("Auto-fail stuck shares")
2183
+ .action(async () => {
2184
+ console.log(
2185
+ JSON.stringify((await L()).autoFailStuckShgovSharesV2(), null, 2),
2186
+ );
2187
+ });
2188
+ parent
2189
+ .command("shgov-gov-stats-v2")
2190
+ .description("V2 gov stats")
2191
+ .action(async () => {
2192
+ console.log(
2193
+ JSON.stringify((await L()).getCoworkShareGovStatsV2(), null, 2),
2194
+ );
2195
+ });
2196
+ }
@@ -670,3 +670,230 @@ export function registerDbEvoCommand(program) {
670
670
 
671
671
  program.addCommand(dbevo);
672
672
  }
673
+
674
+ // === Iter23 V2 governance overlay ===
675
+ export function registerDbevogovV2Commands(program) {
676
+ const parent = program.commands.find((c) => c.name() === "dbevo");
677
+ if (!parent) return;
678
+ const L = async () => await import("../lib/dbevo.js");
679
+ parent
680
+ .command("dbevogov-enums-v2")
681
+ .description("Show V2 enums")
682
+ .action(async () => {
683
+ const m = await L();
684
+ console.log(
685
+ JSON.stringify(
686
+ {
687
+ profileMaturity: m.DBEVOGOV_PROFILE_MATURITY_V2,
688
+ migrationLifecycle: m.DBEVOGOV_MIGRATION_LIFECYCLE_V2,
689
+ },
690
+ null,
691
+ 2,
692
+ ),
693
+ );
694
+ });
695
+ parent
696
+ .command("dbevogov-config-v2")
697
+ .description("Show V2 config")
698
+ .action(async () => {
699
+ const m = await L();
700
+ console.log(
701
+ JSON.stringify(
702
+ {
703
+ maxActive: m.getMaxActiveDbevogovProfilesPerOwnerV2(),
704
+ maxPending: m.getMaxPendingDbevogovMigrationsPerProfileV2(),
705
+ idleMs: m.getDbevogovProfileIdleMsV2(),
706
+ stuckMs: m.getDbevogovMigrationStuckMsV2(),
707
+ },
708
+ null,
709
+ 2,
710
+ ),
711
+ );
712
+ });
713
+ parent
714
+ .command("dbevogov-set-max-active-v2 <n>")
715
+ .description("Set max active")
716
+ .action(async (n) => {
717
+ (await L()).setMaxActiveDbevogovProfilesPerOwnerV2(Number(n));
718
+ console.log("ok");
719
+ });
720
+ parent
721
+ .command("dbevogov-set-max-pending-v2 <n>")
722
+ .description("Set max pending")
723
+ .action(async (n) => {
724
+ (await L()).setMaxPendingDbevogovMigrationsPerProfileV2(Number(n));
725
+ console.log("ok");
726
+ });
727
+ parent
728
+ .command("dbevogov-set-idle-ms-v2 <n>")
729
+ .description("Set idle threshold ms")
730
+ .action(async (n) => {
731
+ (await L()).setDbevogovProfileIdleMsV2(Number(n));
732
+ console.log("ok");
733
+ });
734
+ parent
735
+ .command("dbevogov-set-stuck-ms-v2 <n>")
736
+ .description("Set stuck threshold ms")
737
+ .action(async (n) => {
738
+ (await L()).setDbevogovMigrationStuckMsV2(Number(n));
739
+ console.log("ok");
740
+ });
741
+ parent
742
+ .command("dbevogov-register-v2 <id> <owner>")
743
+ .description("Register V2 profile")
744
+ .option("--schema <v>", "schema")
745
+ .action(async (id, owner, o) => {
746
+ const m = await L();
747
+ console.log(
748
+ JSON.stringify(
749
+ m.registerDbevogovProfileV2({ id, owner, schema: o.schema }),
750
+ null,
751
+ 2,
752
+ ),
753
+ );
754
+ });
755
+ parent
756
+ .command("dbevogov-activate-v2 <id>")
757
+ .description("Activate profile")
758
+ .action(async (id) => {
759
+ console.log(
760
+ JSON.stringify((await L()).activateDbevogovProfileV2(id), null, 2),
761
+ );
762
+ });
763
+ parent
764
+ .command("dbevogov-pause-v2 <id>")
765
+ .description("Pause profile")
766
+ .action(async (id) => {
767
+ console.log(
768
+ JSON.stringify((await L()).pauseDbevogovProfileV2(id), null, 2),
769
+ );
770
+ });
771
+ parent
772
+ .command("dbevogov-archive-v2 <id>")
773
+ .description("Archive profile")
774
+ .action(async (id) => {
775
+ console.log(
776
+ JSON.stringify((await L()).archiveDbevogovProfileV2(id), null, 2),
777
+ );
778
+ });
779
+ parent
780
+ .command("dbevogov-touch-v2 <id>")
781
+ .description("Touch profile")
782
+ .action(async (id) => {
783
+ console.log(
784
+ JSON.stringify((await L()).touchDbevogovProfileV2(id), null, 2),
785
+ );
786
+ });
787
+ parent
788
+ .command("dbevogov-get-v2 <id>")
789
+ .description("Get profile")
790
+ .action(async (id) => {
791
+ console.log(
792
+ JSON.stringify((await L()).getDbevogovProfileV2(id), null, 2),
793
+ );
794
+ });
795
+ parent
796
+ .command("dbevogov-list-v2")
797
+ .description("List profiles")
798
+ .action(async () => {
799
+ console.log(
800
+ JSON.stringify((await L()).listDbevogovProfilesV2(), null, 2),
801
+ );
802
+ });
803
+ parent
804
+ .command("dbevogov-create-migration-v2 <id> <profileId>")
805
+ .description("Create migration")
806
+ .option("--version <v>", "version")
807
+ .action(async (id, profileId, o) => {
808
+ const m = await L();
809
+ console.log(
810
+ JSON.stringify(
811
+ m.createDbevogovMigrationV2({ id, profileId, version: o.version }),
812
+ null,
813
+ 2,
814
+ ),
815
+ );
816
+ });
817
+ parent
818
+ .command("dbevogov-applying-migration-v2 <id>")
819
+ .description("Mark migration as applying")
820
+ .action(async (id) => {
821
+ console.log(
822
+ JSON.stringify((await L()).applyingDbevogovMigrationV2(id), null, 2),
823
+ );
824
+ });
825
+ parent
826
+ .command("dbevogov-complete-migration-v2 <id>")
827
+ .description("Complete migration")
828
+ .action(async (id) => {
829
+ console.log(
830
+ JSON.stringify((await L()).completeMigrationDbevogovV2(id), null, 2),
831
+ );
832
+ });
833
+ parent
834
+ .command("dbevogov-fail-migration-v2 <id> [reason]")
835
+ .description("Fail migration")
836
+ .action(async (id, reason) => {
837
+ console.log(
838
+ JSON.stringify(
839
+ (await L()).failDbevogovMigrationV2(id, reason),
840
+ null,
841
+ 2,
842
+ ),
843
+ );
844
+ });
845
+ parent
846
+ .command("dbevogov-cancel-migration-v2 <id> [reason]")
847
+ .description("Cancel migration")
848
+ .action(async (id, reason) => {
849
+ console.log(
850
+ JSON.stringify(
851
+ (await L()).cancelDbevogovMigrationV2(id, reason),
852
+ null,
853
+ 2,
854
+ ),
855
+ );
856
+ });
857
+ parent
858
+ .command("dbevogov-get-migration-v2 <id>")
859
+ .description("Get migration")
860
+ .action(async (id) => {
861
+ console.log(
862
+ JSON.stringify((await L()).getDbevogovMigrationV2(id), null, 2),
863
+ );
864
+ });
865
+ parent
866
+ .command("dbevogov-list-migrations-v2")
867
+ .description("List migrations")
868
+ .action(async () => {
869
+ console.log(
870
+ JSON.stringify((await L()).listDbevogovMigrationsV2(), null, 2),
871
+ );
872
+ });
873
+ parent
874
+ .command("dbevogov-auto-pause-idle-v2")
875
+ .description("Auto-pause idle")
876
+ .action(async () => {
877
+ console.log(
878
+ JSON.stringify((await L()).autoPauseIdleDbevogovProfilesV2(), null, 2),
879
+ );
880
+ });
881
+ parent
882
+ .command("dbevogov-auto-fail-stuck-v2")
883
+ .description("Auto-fail stuck migrations")
884
+ .action(async () => {
885
+ console.log(
886
+ JSON.stringify(
887
+ (await L()).autoFailStuckDbevogovMigrationsV2(),
888
+ null,
889
+ 2,
890
+ ),
891
+ );
892
+ });
893
+ parent
894
+ .command("dbevogov-gov-stats-v2")
895
+ .description("V2 gov stats")
896
+ .action(async () => {
897
+ console.log(JSON.stringify((await L()).getDbevoGovStatsV2(), null, 2));
898
+ });
899
+ }
@@ -661,3 +661,210 @@ export function registerDevCommand(program) {
661
661
  console.log(JSON.stringify(getAutonomousDeveloperStatsV2(), null, 2)),
662
662
  );
663
663
  }
664
+
665
+ // === Iter24 V2 governance overlay ===
666
+ export function registerDevgovV2Commands(program) {
667
+ const parent = program.commands.find((c) => c.name() === "dev");
668
+ if (!parent) return;
669
+ const L = async () => await import("../lib/autonomous-developer.js");
670
+ parent
671
+ .command("devgov-enums-v2")
672
+ .description("Show V2 enums")
673
+ .action(async () => {
674
+ const m = await L();
675
+ console.log(
676
+ JSON.stringify(
677
+ {
678
+ profileMaturity: m.DEVGOV_PROFILE_MATURITY_V2,
679
+ runLifecycle: m.DEVGOV_RUN_LIFECYCLE_V2,
680
+ },
681
+ null,
682
+ 2,
683
+ ),
684
+ );
685
+ });
686
+ parent
687
+ .command("devgov-config-v2")
688
+ .description("Show V2 config")
689
+ .action(async () => {
690
+ const m = await L();
691
+ console.log(
692
+ JSON.stringify(
693
+ {
694
+ maxActive: m.getMaxActiveDevgovProfilesPerOwnerV2(),
695
+ maxPending: m.getMaxPendingDevgovRunsPerProfileV2(),
696
+ idleMs: m.getDevgovProfileIdleMsV2(),
697
+ stuckMs: m.getDevgovRunStuckMsV2(),
698
+ },
699
+ null,
700
+ 2,
701
+ ),
702
+ );
703
+ });
704
+ parent
705
+ .command("devgov-set-max-active-v2 <n>")
706
+ .description("Set max active")
707
+ .action(async (n) => {
708
+ (await L()).setMaxActiveDevgovProfilesPerOwnerV2(Number(n));
709
+ console.log("ok");
710
+ });
711
+ parent
712
+ .command("devgov-set-max-pending-v2 <n>")
713
+ .description("Set max pending")
714
+ .action(async (n) => {
715
+ (await L()).setMaxPendingDevgovRunsPerProfileV2(Number(n));
716
+ console.log("ok");
717
+ });
718
+ parent
719
+ .command("devgov-set-idle-ms-v2 <n>")
720
+ .description("Set idle threshold ms")
721
+ .action(async (n) => {
722
+ (await L()).setDevgovProfileIdleMsV2(Number(n));
723
+ console.log("ok");
724
+ });
725
+ parent
726
+ .command("devgov-set-stuck-ms-v2 <n>")
727
+ .description("Set stuck threshold ms")
728
+ .action(async (n) => {
729
+ (await L()).setDevgovRunStuckMsV2(Number(n));
730
+ console.log("ok");
731
+ });
732
+ parent
733
+ .command("devgov-register-v2 <id> <owner>")
734
+ .description("Register V2 profile")
735
+ .option("--level <v>", "level")
736
+ .action(async (id, owner, o) => {
737
+ const m = await L();
738
+ console.log(
739
+ JSON.stringify(
740
+ m.registerDevgovProfileV2({ id, owner, level: o.level }),
741
+ null,
742
+ 2,
743
+ ),
744
+ );
745
+ });
746
+ parent
747
+ .command("devgov-activate-v2 <id>")
748
+ .description("Activate profile")
749
+ .action(async (id) => {
750
+ console.log(
751
+ JSON.stringify((await L()).activateDevgovProfileV2(id), null, 2),
752
+ );
753
+ });
754
+ parent
755
+ .command("devgov-pause-v2 <id>")
756
+ .description("Pause profile")
757
+ .action(async (id) => {
758
+ console.log(
759
+ JSON.stringify((await L()).pauseDevgovProfileV2(id), null, 2),
760
+ );
761
+ });
762
+ parent
763
+ .command("devgov-archive-v2 <id>")
764
+ .description("Archive profile")
765
+ .action(async (id) => {
766
+ console.log(
767
+ JSON.stringify((await L()).archiveDevgovProfileV2(id), null, 2),
768
+ );
769
+ });
770
+ parent
771
+ .command("devgov-touch-v2 <id>")
772
+ .description("Touch profile")
773
+ .action(async (id) => {
774
+ console.log(
775
+ JSON.stringify((await L()).touchDevgovProfileV2(id), null, 2),
776
+ );
777
+ });
778
+ parent
779
+ .command("devgov-get-v2 <id>")
780
+ .description("Get profile")
781
+ .action(async (id) => {
782
+ console.log(JSON.stringify((await L()).getDevgovProfileV2(id), null, 2));
783
+ });
784
+ parent
785
+ .command("devgov-list-v2")
786
+ .description("List profiles")
787
+ .action(async () => {
788
+ console.log(JSON.stringify((await L()).listDevgovProfilesV2(), null, 2));
789
+ });
790
+ parent
791
+ .command("devgov-create-run-v2 <id> <profileId>")
792
+ .description("Create run")
793
+ .option("--goal <v>", "goal")
794
+ .action(async (id, profileId, o) => {
795
+ const m = await L();
796
+ console.log(
797
+ JSON.stringify(
798
+ m.createDevgovRunV2({ id, profileId, goal: o.goal }),
799
+ null,
800
+ 2,
801
+ ),
802
+ );
803
+ });
804
+ parent
805
+ .command("devgov-developing-run-v2 <id>")
806
+ .description("Mark run as developing")
807
+ .action(async (id) => {
808
+ console.log(
809
+ JSON.stringify((await L()).developingDevgovRunV2(id), null, 2),
810
+ );
811
+ });
812
+ parent
813
+ .command("devgov-complete-run-v2 <id>")
814
+ .description("Complete run")
815
+ .action(async (id) => {
816
+ console.log(JSON.stringify((await L()).completeRunDevgovV2(id), null, 2));
817
+ });
818
+ parent
819
+ .command("devgov-fail-run-v2 <id> [reason]")
820
+ .description("Fail run")
821
+ .action(async (id, reason) => {
822
+ console.log(
823
+ JSON.stringify((await L()).failDevgovRunV2(id, reason), null, 2),
824
+ );
825
+ });
826
+ parent
827
+ .command("devgov-cancel-run-v2 <id> [reason]")
828
+ .description("Cancel run")
829
+ .action(async (id, reason) => {
830
+ console.log(
831
+ JSON.stringify((await L()).cancelDevgovRunV2(id, reason), null, 2),
832
+ );
833
+ });
834
+ parent
835
+ .command("devgov-get-run-v2 <id>")
836
+ .description("Get run")
837
+ .action(async (id) => {
838
+ console.log(JSON.stringify((await L()).getDevgovRunV2(id), null, 2));
839
+ });
840
+ parent
841
+ .command("devgov-list-runs-v2")
842
+ .description("List runs")
843
+ .action(async () => {
844
+ console.log(JSON.stringify((await L()).listDevgovRunsV2(), null, 2));
845
+ });
846
+ parent
847
+ .command("devgov-auto-pause-idle-v2")
848
+ .description("Auto-pause idle")
849
+ .action(async () => {
850
+ console.log(
851
+ JSON.stringify((await L()).autoPauseIdleDevgovProfilesV2(), null, 2),
852
+ );
853
+ });
854
+ parent
855
+ .command("devgov-auto-fail-stuck-v2")
856
+ .description("Auto-fail stuck runs")
857
+ .action(async () => {
858
+ console.log(
859
+ JSON.stringify((await L()).autoFailStuckDevgovRunsV2(), null, 2),
860
+ );
861
+ });
862
+ parent
863
+ .command("devgov-gov-stats-v2")
864
+ .description("V2 gov stats")
865
+ .action(async () => {
866
+ console.log(
867
+ JSON.stringify((await L()).getAutonomousDeveloperGovStatsV2(), null, 2),
868
+ );
869
+ });
870
+ }