chainlesschain 0.143.0 → 0.145.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 (133) hide show
  1. package/package.json +1 -1
  2. package/src/commands/a2a.js +196 -28
  3. package/src/commands/activitypub.js +157 -27
  4. package/src/commands/agent.js +587 -103
  5. package/src/commands/audit.js +206 -0
  6. package/src/commands/bi.js +152 -27
  7. package/src/commands/bm25.js +111 -27
  8. package/src/commands/browse.js +190 -29
  9. package/src/commands/ccron.js +128 -28
  10. package/src/commands/chat.js +207 -0
  11. package/src/commands/compliance.js +414 -34
  12. package/src/commands/compt.js +127 -29
  13. package/src/commands/consol.js +8 -2
  14. package/src/commands/cowork.js +580 -34
  15. package/src/commands/crosschain.js +182 -28
  16. package/src/commands/dao.js +182 -28
  17. package/src/commands/dlp.js +172 -27
  18. package/src/commands/economy.js +205 -50
  19. package/src/commands/evolution.js +203 -50
  20. package/src/commands/evomap.js +182 -27
  21. package/src/commands/fflag.js +74 -22
  22. package/src/commands/git.js +177 -37
  23. package/src/commands/hardening.js +209 -0
  24. package/src/commands/hmemory.js +204 -50
  25. package/src/commands/incentive.js +209 -0
  26. package/src/commands/inference.js +170 -34
  27. package/src/commands/itbudget.js +149 -33
  28. package/src/commands/kg.js +206 -0
  29. package/src/commands/lowcode.js +195 -38
  30. package/src/commands/marketplace.js +206 -0
  31. package/src/commands/matrix.js +179 -27
  32. package/src/commands/mcpscaf.js +145 -33
  33. package/src/commands/meminj.js +145 -33
  34. package/src/commands/nostr.js +178 -27
  35. package/src/commands/orchestrate.js +217 -0
  36. package/src/commands/orchgov.js +144 -33
  37. package/src/commands/pdfp.js +109 -27
  38. package/src/commands/perf.js +169 -32
  39. package/src/commands/perm.js +144 -33
  40. package/src/commands/pipeline.js +207 -52
  41. package/src/commands/planmode.js +141 -32
  42. package/src/commands/privacy.js +203 -0
  43. package/src/commands/promcomp.js +111 -27
  44. package/src/commands/recommend.js +177 -34
  45. package/src/commands/reputation.js +208 -0
  46. package/src/commands/sandbox.js +206 -0
  47. package/src/commands/seshhook.js +145 -33
  48. package/src/commands/seshsearch.js +141 -33
  49. package/src/commands/seshtail.js +144 -33
  50. package/src/commands/seshu.js +152 -33
  51. package/src/commands/sganal.js +123 -29
  52. package/src/commands/siem.js +201 -34
  53. package/src/commands/sla.js +212 -0
  54. package/src/commands/slotfill.js +146 -33
  55. package/src/commands/social.js +157 -32
  56. package/src/commands/stress.js +206 -0
  57. package/src/commands/svccont.js +145 -33
  58. package/src/commands/terraform.js +206 -0
  59. package/src/commands/tms.js +171 -33
  60. package/src/commands/topiccls.js +146 -33
  61. package/src/commands/uprof.js +141 -32
  62. package/src/commands/vcheck.js +122 -28
  63. package/src/commands/webfetch.js +141 -32
  64. package/src/commands/zkp.js +184 -28
  65. package/src/index.js +40 -0
  66. package/src/lib/a2a-protocol.js +319 -51
  67. package/src/lib/activitypub-bridge.js +288 -50
  68. package/src/lib/agent-economy.js +304 -51
  69. package/src/lib/app-builder.js +279 -46
  70. package/src/lib/audit-logger.js +321 -0
  71. package/src/lib/autonomous-agent.js +284 -48
  72. package/src/lib/bi-engine.js +283 -49
  73. package/src/lib/bm25-search.js +301 -49
  74. package/src/lib/browser-automation.js +296 -49
  75. package/src/lib/chat-core.js +336 -0
  76. package/src/lib/claude-code-bridge.js +341 -0
  77. package/src/lib/compliance-framework-reporter.js +305 -51
  78. package/src/lib/compliance-manager.js +330 -0
  79. package/src/lib/compression-telemetry.js +301 -49
  80. package/src/lib/content-recommender.js +317 -52
  81. package/src/lib/cowork-cron.js +298 -49
  82. package/src/lib/cowork-learning.js +333 -0
  83. package/src/lib/cowork-task-runner.js +308 -51
  84. package/src/lib/cowork-workflow.js +327 -0
  85. package/src/lib/cross-chain.js +311 -51
  86. package/src/lib/dao-governance.js +280 -46
  87. package/src/lib/dlp-engine.js +287 -49
  88. package/src/lib/evolution-system.js +278 -47
  89. package/src/lib/evomap-manager.js +280 -46
  90. package/src/lib/execution-backend.js +294 -48
  91. package/src/lib/feature-flags.js +294 -49
  92. package/src/lib/git-integration.js +285 -47
  93. package/src/lib/hardening-manager.js +341 -0
  94. package/src/lib/hierarchical-memory.js +284 -48
  95. package/src/lib/inference-network.js +308 -51
  96. package/src/lib/iteration-budget.js +302 -50
  97. package/src/lib/knowledge-graph.js +333 -0
  98. package/src/lib/matrix-bridge.js +281 -47
  99. package/src/lib/mcp-scaffold.js +318 -54
  100. package/src/lib/memory-injection.js +288 -49
  101. package/src/lib/nostr-bridge.js +286 -49
  102. package/src/lib/orchestrator.js +293 -48
  103. package/src/lib/pdf-parser.js +298 -49
  104. package/src/lib/perf-tuning.js +309 -50
  105. package/src/lib/permission-engine.js +287 -49
  106. package/src/lib/pipeline-orchestrator.js +289 -49
  107. package/src/lib/plan-mode.js +298 -51
  108. package/src/lib/privacy-computing.js +335 -0
  109. package/src/lib/reputation-optimizer.js +340 -0
  110. package/src/lib/sandbox-v2.js +327 -0
  111. package/src/lib/service-container.js +313 -52
  112. package/src/lib/session-consolidator.js +296 -49
  113. package/src/lib/session-hooks.js +312 -53
  114. package/src/lib/session-search.js +304 -51
  115. package/src/lib/session-tail.js +288 -49
  116. package/src/lib/session-usage.js +298 -52
  117. package/src/lib/siem-exporter.js +298 -51
  118. package/src/lib/skill-marketplace.js +345 -0
  119. package/src/lib/sla-manager.js +341 -0
  120. package/src/lib/slot-filler.js +303 -51
  121. package/src/lib/social-graph-analytics.js +295 -49
  122. package/src/lib/social-graph.js +272 -49
  123. package/src/lib/stress-tester.js +342 -0
  124. package/src/lib/sub-agent-registry.js +302 -53
  125. package/src/lib/task-model-selector.js +302 -50
  126. package/src/lib/terraform-manager.js +333 -0
  127. package/src/lib/todo-manager.js +281 -47
  128. package/src/lib/token-incentive.js +341 -0
  129. package/src/lib/topic-classifier.js +297 -49
  130. package/src/lib/user-profile.js +294 -50
  131. package/src/lib/version-checker.js +304 -50
  132. package/src/lib/web-fetch.js +292 -51
  133. package/src/lib/zkp-engine.js +286 -49
@@ -694,42 +694,199 @@ export function registerLowcodeCommand(program) {
694
694
 
695
695
  function _registerAppBuilderV2Commands(parent) {
696
696
  const L = async () => await import("../lib/app-builder.js");
697
- parent.command("enums-v2").description("Show V2 enums (app maturity + build lifecycle)")
698
- .action(async () => { const m = await L(); console.log(JSON.stringify({ appMaturity: m.APP_MATURITY_V2, buildLifecycle: m.APP_BUILD_LIFECYCLE_V2 }, null, 2)); });
699
- parent.command("config-v2").description("Show V2 config thresholds")
700
- .action(async () => { const m = await L(); console.log(JSON.stringify({ maxActiveAppsPerOwner: m.getMaxActiveAppsPerOwnerV2(), maxPendingAppBuildsPerApp: m.getMaxPendingAppBuildsPerAppV2(), appIdleMs: m.getAppIdleMsV2(), appBuildStuckMs: m.getAppBuildStuckMsV2() }, null, 2)); });
701
- parent.command("set-max-active-apps-v2 <n>").description("Set max active apps per owner")
702
- .action(async (n) => { const m = await L(); m.setMaxActiveAppsPerOwnerV2(Number(n)); console.log("ok"); });
703
- parent.command("set-max-pending-builds-v2 <n>").description("Set max pending builds per app")
704
- .action(async (n) => { const m = await L(); m.setMaxPendingAppBuildsPerAppV2(Number(n)); console.log("ok"); });
705
- parent.command("set-app-idle-ms-v2 <n>").description("Set app idle threshold (ms)")
706
- .action(async (n) => { const m = await L(); m.setAppIdleMsV2(Number(n)); console.log("ok"); });
707
- parent.command("set-build-stuck-ms-v2 <n>").description("Set build stuck threshold (ms)")
708
- .action(async (n) => { const m = await L(); m.setAppBuildStuckMsV2(Number(n)); console.log("ok"); });
709
- parent.command("register-app-v2 <id> <owner>").description("Register V2 app")
710
- .option("--name <n>", "App name").action(async (id, owner, o) => { const m = await L(); console.log(JSON.stringify(m.registerAppV2({ id, owner, name: o.name }), null, 2)); });
711
- parent.command("activate-app-v2 <id>").description("Activate app")
712
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.activateAppV2(id), null, 2)); });
713
- parent.command("pause-app-v2 <id>").description("Pause app")
714
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.pauseAppV2(id), null, 2)); });
715
- parent.command("archive-app-v2 <id>").description("Archive app (terminal)")
716
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.archiveAppV2(id), null, 2)); });
717
- parent.command("touch-app-v2 <id>").description("Touch app lastTouchedAt")
718
- .action(async (id) => { const m = await L(); console.log(JSON.stringify(m.touchAppV2(id), null, 2)); });
719
- parent.command("get-app-v2 <id>").description("Get V2 app").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAppV2(id), null, 2)); });
720
- parent.command("list-apps-v2").description("List V2 apps").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAppsV2(), null, 2)); });
721
- parent.command("create-build-v2 <id> <appId>").description("Create V2 app build (queued)")
722
- .option("--target <t>", "Target", "web").action(async (id, appId, o) => { const m = await L(); console.log(JSON.stringify(m.createAppBuildV2({ id, appId, target: o.target }), null, 2)); });
723
- parent.command("start-build-v2 <id>").description("Start build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.startAppBuildV2(id), null, 2)); });
724
- parent.command("succeed-build-v2 <id>").description("Succeed build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.succeedAppBuildV2(id), null, 2)); });
725
- parent.command("fail-build-v2 <id> [reason]").description("Fail build").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.failAppBuildV2(id, reason), null, 2)); });
726
- parent.command("cancel-build-v2 <id> [reason]").description("Cancel build").action(async (id, reason) => { const m = await L(); console.log(JSON.stringify(m.cancelAppBuildV2(id, reason), null, 2)); });
727
- parent.command("get-build-v2 <id>").description("Get V2 build").action(async (id) => { const m = await L(); console.log(JSON.stringify(m.getAppBuildV2(id), null, 2)); });
728
- parent.command("list-builds-v2").description("List V2 builds").action(async () => { const m = await L(); console.log(JSON.stringify(m.listAppBuildsV2(), null, 2)); });
729
- parent.command("auto-pause-idle-v2").description("Auto-pause idle active apps")
730
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoPauseIdleAppsV2(), null, 2)); });
731
- parent.command("auto-fail-stuck-v2").description("Auto-fail stuck building builds")
732
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.autoFailStuckAppBuildsV2(), null, 2)); });
733
- parent.command("gov-stats-v2").description("V2 governance aggregate stats")
734
- .action(async () => { const m = await L(); console.log(JSON.stringify(m.getAppBuilderGovStatsV2(), null, 2)); });
697
+ parent
698
+ .command("enums-v2")
699
+ .description("Show V2 enums (app maturity + build lifecycle)")
700
+ .action(async () => {
701
+ const m = await L();
702
+ console.log(
703
+ JSON.stringify(
704
+ {
705
+ appMaturity: m.APP_MATURITY_V2,
706
+ buildLifecycle: m.APP_BUILD_LIFECYCLE_V2,
707
+ },
708
+ null,
709
+ 2,
710
+ ),
711
+ );
712
+ });
713
+ parent
714
+ .command("config-v2")
715
+ .description("Show V2 config thresholds")
716
+ .action(async () => {
717
+ const m = await L();
718
+ console.log(
719
+ JSON.stringify(
720
+ {
721
+ maxActiveAppsPerOwner: m.getMaxActiveAppsPerOwnerV2(),
722
+ maxPendingAppBuildsPerApp: m.getMaxPendingAppBuildsPerAppV2(),
723
+ appIdleMs: m.getAppIdleMsV2(),
724
+ appBuildStuckMs: m.getAppBuildStuckMsV2(),
725
+ },
726
+ null,
727
+ 2,
728
+ ),
729
+ );
730
+ });
731
+ parent
732
+ .command("set-max-active-apps-v2 <n>")
733
+ .description("Set max active apps per owner")
734
+ .action(async (n) => {
735
+ const m = await L();
736
+ m.setMaxActiveAppsPerOwnerV2(Number(n));
737
+ console.log("ok");
738
+ });
739
+ parent
740
+ .command("set-max-pending-builds-v2 <n>")
741
+ .description("Set max pending builds per app")
742
+ .action(async (n) => {
743
+ const m = await L();
744
+ m.setMaxPendingAppBuildsPerAppV2(Number(n));
745
+ console.log("ok");
746
+ });
747
+ parent
748
+ .command("set-app-idle-ms-v2 <n>")
749
+ .description("Set app idle threshold (ms)")
750
+ .action(async (n) => {
751
+ const m = await L();
752
+ m.setAppIdleMsV2(Number(n));
753
+ console.log("ok");
754
+ });
755
+ parent
756
+ .command("set-build-stuck-ms-v2 <n>")
757
+ .description("Set build stuck threshold (ms)")
758
+ .action(async (n) => {
759
+ const m = await L();
760
+ m.setAppBuildStuckMsV2(Number(n));
761
+ console.log("ok");
762
+ });
763
+ parent
764
+ .command("register-app-v2 <id> <owner>")
765
+ .description("Register V2 app")
766
+ .option("--name <n>", "App name")
767
+ .action(async (id, owner, o) => {
768
+ const m = await L();
769
+ console.log(
770
+ JSON.stringify(m.registerAppV2({ id, owner, name: o.name }), null, 2),
771
+ );
772
+ });
773
+ parent
774
+ .command("activate-app-v2 <id>")
775
+ .description("Activate app")
776
+ .action(async (id) => {
777
+ const m = await L();
778
+ console.log(JSON.stringify(m.activateAppV2(id), null, 2));
779
+ });
780
+ parent
781
+ .command("pause-app-v2 <id>")
782
+ .description("Pause app")
783
+ .action(async (id) => {
784
+ const m = await L();
785
+ console.log(JSON.stringify(m.pauseAppV2(id), null, 2));
786
+ });
787
+ parent
788
+ .command("archive-app-v2 <id>")
789
+ .description("Archive app (terminal)")
790
+ .action(async (id) => {
791
+ const m = await L();
792
+ console.log(JSON.stringify(m.archiveAppV2(id), null, 2));
793
+ });
794
+ parent
795
+ .command("touch-app-v2 <id>")
796
+ .description("Touch app lastTouchedAt")
797
+ .action(async (id) => {
798
+ const m = await L();
799
+ console.log(JSON.stringify(m.touchAppV2(id), null, 2));
800
+ });
801
+ parent
802
+ .command("get-app-v2 <id>")
803
+ .description("Get V2 app")
804
+ .action(async (id) => {
805
+ const m = await L();
806
+ console.log(JSON.stringify(m.getAppV2(id), null, 2));
807
+ });
808
+ parent
809
+ .command("list-apps-v2")
810
+ .description("List V2 apps")
811
+ .action(async () => {
812
+ const m = await L();
813
+ console.log(JSON.stringify(m.listAppsV2(), null, 2));
814
+ });
815
+ parent
816
+ .command("create-build-v2 <id> <appId>")
817
+ .description("Create V2 app build (queued)")
818
+ .option("--target <t>", "Target", "web")
819
+ .action(async (id, appId, o) => {
820
+ const m = await L();
821
+ console.log(
822
+ JSON.stringify(
823
+ m.createAppBuildV2({ id, appId, target: o.target }),
824
+ null,
825
+ 2,
826
+ ),
827
+ );
828
+ });
829
+ parent
830
+ .command("start-build-v2 <id>")
831
+ .description("Start build")
832
+ .action(async (id) => {
833
+ const m = await L();
834
+ console.log(JSON.stringify(m.startAppBuildV2(id), null, 2));
835
+ });
836
+ parent
837
+ .command("succeed-build-v2 <id>")
838
+ .description("Succeed build")
839
+ .action(async (id) => {
840
+ const m = await L();
841
+ console.log(JSON.stringify(m.succeedAppBuildV2(id), null, 2));
842
+ });
843
+ parent
844
+ .command("fail-build-v2 <id> [reason]")
845
+ .description("Fail build")
846
+ .action(async (id, reason) => {
847
+ const m = await L();
848
+ console.log(JSON.stringify(m.failAppBuildV2(id, reason), null, 2));
849
+ });
850
+ parent
851
+ .command("cancel-build-v2 <id> [reason]")
852
+ .description("Cancel build")
853
+ .action(async (id, reason) => {
854
+ const m = await L();
855
+ console.log(JSON.stringify(m.cancelAppBuildV2(id, reason), null, 2));
856
+ });
857
+ parent
858
+ .command("get-build-v2 <id>")
859
+ .description("Get V2 build")
860
+ .action(async (id) => {
861
+ const m = await L();
862
+ console.log(JSON.stringify(m.getAppBuildV2(id), null, 2));
863
+ });
864
+ parent
865
+ .command("list-builds-v2")
866
+ .description("List V2 builds")
867
+ .action(async () => {
868
+ const m = await L();
869
+ console.log(JSON.stringify(m.listAppBuildsV2(), null, 2));
870
+ });
871
+ parent
872
+ .command("auto-pause-idle-v2")
873
+ .description("Auto-pause idle active apps")
874
+ .action(async () => {
875
+ const m = await L();
876
+ console.log(JSON.stringify(m.autoPauseIdleAppsV2(), null, 2));
877
+ });
878
+ parent
879
+ .command("auto-fail-stuck-v2")
880
+ .description("Auto-fail stuck building builds")
881
+ .action(async () => {
882
+ const m = await L();
883
+ console.log(JSON.stringify(m.autoFailStuckAppBuildsV2(), null, 2));
884
+ });
885
+ parent
886
+ .command("gov-stats-v2")
887
+ .description("V2 governance aggregate stats")
888
+ .action(async () => {
889
+ const m = await L();
890
+ console.log(JSON.stringify(m.getAppBuilderGovStatsV2(), null, 2));
891
+ });
735
892
  }
@@ -580,3 +580,209 @@ export function registerMarketplaceCommand(program) {
580
580
  }
581
581
  });
582
582
  }
583
+
584
+ // === Iter16 V2 governance overlay ===
585
+ export function registerMktgovV2Commands(program) {
586
+ const parent = program.commands.find((c) => c.name() === "marketplace");
587
+ if (!parent) return;
588
+ const L = async () => await import("../lib/skill-marketplace.js");
589
+ parent
590
+ .command("mktgov-enums-v2")
591
+ .description("Show V2 enums (mktgov maturity + order lifecycle)")
592
+ .action(async () => {
593
+ const m = await L();
594
+ console.log(
595
+ JSON.stringify(
596
+ {
597
+ profileMaturity: m.MKTGOV_PROFILE_MATURITY_V2,
598
+ orderLifecycle: m.MKTGOV_ORDER_LIFECYCLE_V2,
599
+ },
600
+ null,
601
+ 2,
602
+ ),
603
+ );
604
+ });
605
+ parent
606
+ .command("mktgov-config-v2")
607
+ .description("Show V2 config thresholds")
608
+ .action(async () => {
609
+ const m = await L();
610
+ console.log(
611
+ JSON.stringify(
612
+ {
613
+ maxActive: m.getMaxActiveMktgovProfilesPerOwnerV2(),
614
+ maxPending: m.getMaxPendingMktgovOrdersPerProfileV2(),
615
+ idleMs: m.getMktgovProfileIdleMsV2(),
616
+ stuckMs: m.getMktgovOrderStuckMsV2(),
617
+ },
618
+ null,
619
+ 2,
620
+ ),
621
+ );
622
+ });
623
+ parent
624
+ .command("mktgov-set-max-active-v2 <n>")
625
+ .description("Set max active profiles per owner")
626
+ .action(async (n) => {
627
+ const m = await L();
628
+ m.setMaxActiveMktgovProfilesPerOwnerV2(Number(n));
629
+ console.log("ok");
630
+ });
631
+ parent
632
+ .command("mktgov-set-max-pending-v2 <n>")
633
+ .description("Set max pending orders per profile")
634
+ .action(async (n) => {
635
+ const m = await L();
636
+ m.setMaxPendingMktgovOrdersPerProfileV2(Number(n));
637
+ console.log("ok");
638
+ });
639
+ parent
640
+ .command("mktgov-set-idle-ms-v2 <n>")
641
+ .description("Set profile idle threshold (ms)")
642
+ .action(async (n) => {
643
+ const m = await L();
644
+ m.setMktgovProfileIdleMsV2(Number(n));
645
+ console.log("ok");
646
+ });
647
+ parent
648
+ .command("mktgov-set-stuck-ms-v2 <n>")
649
+ .description("Set order stuck threshold (ms)")
650
+ .action(async (n) => {
651
+ const m = await L();
652
+ m.setMktgovOrderStuckMsV2(Number(n));
653
+ console.log("ok");
654
+ });
655
+ parent
656
+ .command("mktgov-register-v2 <id> <owner>")
657
+ .description("Register V2 mktgov profile")
658
+ .option("--category <v>", "category")
659
+ .action(async (id, owner, o) => {
660
+ const m = await L();
661
+ console.log(
662
+ JSON.stringify(
663
+ m.registerMktgovProfileV2({ id, owner, category: o.category }),
664
+ null,
665
+ 2,
666
+ ),
667
+ );
668
+ });
669
+ parent
670
+ .command("mktgov-activate-v2 <id>")
671
+ .description("Activate profile")
672
+ .action(async (id) => {
673
+ const m = await L();
674
+ console.log(JSON.stringify(m.activateMktgovProfileV2(id), null, 2));
675
+ });
676
+ parent
677
+ .command("mktgov-suspend-v2 <id>")
678
+ .description("Suspend profile")
679
+ .action(async (id) => {
680
+ const m = await L();
681
+ console.log(JSON.stringify(m.suspendMktgovProfileV2(id), null, 2));
682
+ });
683
+ parent
684
+ .command("mktgov-archive-v2 <id>")
685
+ .description("Archive profile (terminal)")
686
+ .action(async (id) => {
687
+ const m = await L();
688
+ console.log(JSON.stringify(m.archiveMktgovProfileV2(id), null, 2));
689
+ });
690
+ parent
691
+ .command("mktgov-touch-v2 <id>")
692
+ .description("Touch profile")
693
+ .action(async (id) => {
694
+ const m = await L();
695
+ console.log(JSON.stringify(m.touchMktgovProfileV2(id), null, 2));
696
+ });
697
+ parent
698
+ .command("mktgov-get-v2 <id>")
699
+ .description("Get profile")
700
+ .action(async (id) => {
701
+ const m = await L();
702
+ console.log(JSON.stringify(m.getMktgovProfileV2(id), null, 2));
703
+ });
704
+ parent
705
+ .command("mktgov-list-v2")
706
+ .description("List profiles")
707
+ .action(async () => {
708
+ const m = await L();
709
+ console.log(JSON.stringify(m.listMktgovProfilesV2(), null, 2));
710
+ });
711
+ parent
712
+ .command("mktgov-create-order-v2 <id> <profileId>")
713
+ .description("Create order (queued)")
714
+ .option("--listingId <v>", "listingId")
715
+ .action(async (id, profileId, o) => {
716
+ const m = await L();
717
+ console.log(
718
+ JSON.stringify(
719
+ m.createMktgovOrderV2({ id, profileId, listingId: o.listingId }),
720
+ null,
721
+ 2,
722
+ ),
723
+ );
724
+ });
725
+ parent
726
+ .command("mktgov-processing-order-v2 <id>")
727
+ .description("Mark order as processing")
728
+ .action(async (id) => {
729
+ const m = await L();
730
+ console.log(JSON.stringify(m.processingMktgovOrderV2(id), null, 2));
731
+ });
732
+ parent
733
+ .command("mktgov-complete-order-v2 <id>")
734
+ .description("Complete order")
735
+ .action(async (id) => {
736
+ const m = await L();
737
+ console.log(JSON.stringify(m.completeOrderMktgovV2(id), null, 2));
738
+ });
739
+ parent
740
+ .command("mktgov-fail-order-v2 <id> [reason]")
741
+ .description("Fail order")
742
+ .action(async (id, reason) => {
743
+ const m = await L();
744
+ console.log(JSON.stringify(m.failMktgovOrderV2(id, reason), null, 2));
745
+ });
746
+ parent
747
+ .command("mktgov-cancel-order-v2 <id> [reason]")
748
+ .description("Cancel order")
749
+ .action(async (id, reason) => {
750
+ const m = await L();
751
+ console.log(JSON.stringify(m.cancelMktgovOrderV2(id, reason), null, 2));
752
+ });
753
+ parent
754
+ .command("mktgov-get-order-v2 <id>")
755
+ .description("Get order")
756
+ .action(async (id) => {
757
+ const m = await L();
758
+ console.log(JSON.stringify(m.getMktgovOrderV2(id), null, 2));
759
+ });
760
+ parent
761
+ .command("mktgov-list-orders-v2")
762
+ .description("List orders")
763
+ .action(async () => {
764
+ const m = await L();
765
+ console.log(JSON.stringify(m.listMktgovOrdersV2(), null, 2));
766
+ });
767
+ parent
768
+ .command("mktgov-auto-suspend-idle-v2")
769
+ .description("Auto-suspend idle profiles")
770
+ .action(async () => {
771
+ const m = await L();
772
+ console.log(JSON.stringify(m.autoSuspendIdleMktgovProfilesV2(), null, 2));
773
+ });
774
+ parent
775
+ .command("mktgov-auto-fail-stuck-v2")
776
+ .description("Auto-fail stuck orders")
777
+ .action(async () => {
778
+ const m = await L();
779
+ console.log(JSON.stringify(m.autoFailStuckMktgovOrdersV2(), null, 2));
780
+ });
781
+ parent
782
+ .command("mktgov-gov-stats-v2")
783
+ .description("V2 gov aggregate stats")
784
+ .action(async () => {
785
+ const m = await L();
786
+ console.log(JSON.stringify(m.getSkillMarketplaceGovStatsV2(), null, 2));
787
+ });
788
+ }
@@ -452,7 +452,6 @@ export function registerMatrixCommand(program) {
452
452
  registerMatrixV2Command(matrix);
453
453
  }
454
454
 
455
-
456
455
  import {
457
456
  MX_ROOM_MATURITY_V2,
458
457
  MX_MESSAGE_LIFECYCLE_V2,
@@ -484,30 +483,183 @@ import {
484
483
  } from "../lib/matrix-bridge.js";
485
484
 
486
485
  export function registerMatrixV2Command(matrix) {
487
- matrix.command("enums-v2").description("Show V2 enums").action(() => { console.log(JSON.stringify({ MX_ROOM_MATURITY_V2, MX_MESSAGE_LIFECYCLE_V2 }, null, 2)); });
488
- matrix.command("register-room-v2").description("Register a matrix room profile (pending)")
489
- .requiredOption("--id <id>").requiredOption("--owner <owner>").option("--alias <alias>")
490
- .action((o) => { console.log(JSON.stringify(registerMatrixRoomV2(o), null, 2)); });
491
- matrix.command("activate-room-v2 <id>").description("Activate room").action((id) => { console.log(JSON.stringify(activateMatrixRoomV2(id), null, 2)); });
492
- matrix.command("mute-room-v2 <id>").description("Mute room").action((id) => { console.log(JSON.stringify(muteMatrixRoomV2(id), null, 2)); });
493
- matrix.command("archive-room-v2 <id>").description("Archive room (terminal)").action((id) => { console.log(JSON.stringify(archiveMatrixRoomV2(id), null, 2)); });
494
- matrix.command("touch-room-v2 <id>").description("Refresh lastTouchedAt").action((id) => { console.log(JSON.stringify(touchMatrixRoomV2(id), null, 2)); });
495
- matrix.command("get-room-v2 <id>").description("Get a room").action((id) => { console.log(JSON.stringify(getMatrixRoomV2(id), null, 2)); });
496
- matrix.command("list-rooms-v2").description("List rooms").action(() => { console.log(JSON.stringify(listMatrixRoomsV2(), null, 2)); });
497
- matrix.command("create-msg-v2").description("Create a matrix message (queued)")
498
- .requiredOption("--id <id>").requiredOption("--room-id <roomId>").option("--body <body>")
499
- .action((o) => { console.log(JSON.stringify(createMatrixMessageV2({ id: o.id, roomId: o.roomId, body: o.body }), null, 2)); });
500
- matrix.command("start-msg-v2 <id>").description("Transition msg to sending").action((id) => { console.log(JSON.stringify(startMatrixMessageV2(id), null, 2)); });
501
- matrix.command("deliver-msg-v2 <id>").description("Transition msg to delivered").action((id) => { console.log(JSON.stringify(deliverMatrixMessageV2(id), null, 2)); });
502
- matrix.command("fail-msg-v2 <id>").description("Fail msg").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(failMatrixMessageV2(id, o.reason), null, 2)); });
503
- matrix.command("cancel-msg-v2 <id>").description("Cancel msg").option("--reason <r>").action((id, o) => { console.log(JSON.stringify(cancelMatrixMessageV2(id, o.reason), null, 2)); });
504
- matrix.command("get-msg-v2 <id>").description("Get msg").action((id) => { console.log(JSON.stringify(getMatrixMessageV2(id), null, 2)); });
505
- matrix.command("list-msgs-v2").description("List msgs").action(() => { console.log(JSON.stringify(listMatrixMessagesV2(), null, 2)); });
506
- matrix.command("set-max-active-rooms-v2 <n>").description("Set per-owner active cap").action((n) => { setMaxActiveMatrixRoomsPerOwnerV2(Number(n)); console.log(JSON.stringify({ maxActiveMatrixRoomsPerOwner: getMaxActiveMatrixRoomsPerOwnerV2() }, null, 2)); });
507
- matrix.command("set-max-pending-msgs-v2 <n>").description("Set per-room pending cap").action((n) => { setMaxPendingMatrixMessagesPerRoomV2(Number(n)); console.log(JSON.stringify({ maxPendingMatrixMessagesPerRoom: getMaxPendingMatrixMessagesPerRoomV2() }, null, 2)); });
508
- matrix.command("set-room-idle-ms-v2 <n>").description("Set idle threshold").action((n) => { setMatrixRoomIdleMsV2(Number(n)); console.log(JSON.stringify({ matrixRoomIdleMs: getMatrixRoomIdleMsV2() }, null, 2)); });
509
- matrix.command("set-msg-stuck-ms-v2 <n>").description("Set stuck threshold").action((n) => { setMatrixMessageStuckMsV2(Number(n)); console.log(JSON.stringify({ matrixMessageStuckMs: getMatrixMessageStuckMsV2() }, null, 2)); });
510
- matrix.command("auto-mute-idle-rooms-v2").description("Auto-mute idle rooms").action(() => { console.log(JSON.stringify(autoMuteIdleMatrixRoomsV2(), null, 2)); });
511
- matrix.command("auto-fail-stuck-msgs-v2").description("Auto-fail stuck sending msgs").action(() => { console.log(JSON.stringify(autoFailStuckMatrixMessagesV2(), null, 2)); });
512
- matrix.command("stats-v2").description("V2 aggregate stats").action(() => { console.log(JSON.stringify(getMatrixBridgeStatsV2(), null, 2)); });
486
+ matrix
487
+ .command("enums-v2")
488
+ .description("Show V2 enums")
489
+ .action(() => {
490
+ console.log(
491
+ JSON.stringify(
492
+ { MX_ROOM_MATURITY_V2, MX_MESSAGE_LIFECYCLE_V2 },
493
+ null,
494
+ 2,
495
+ ),
496
+ );
497
+ });
498
+ matrix
499
+ .command("register-room-v2")
500
+ .description("Register a matrix room profile (pending)")
501
+ .requiredOption("--id <id>")
502
+ .requiredOption("--owner <owner>")
503
+ .option("--alias <alias>")
504
+ .action((o) => {
505
+ console.log(JSON.stringify(registerMatrixRoomV2(o), null, 2));
506
+ });
507
+ matrix
508
+ .command("activate-room-v2 <id>")
509
+ .description("Activate room")
510
+ .action((id) => {
511
+ console.log(JSON.stringify(activateMatrixRoomV2(id), null, 2));
512
+ });
513
+ matrix
514
+ .command("mute-room-v2 <id>")
515
+ .description("Mute room")
516
+ .action((id) => {
517
+ console.log(JSON.stringify(muteMatrixRoomV2(id), null, 2));
518
+ });
519
+ matrix
520
+ .command("archive-room-v2 <id>")
521
+ .description("Archive room (terminal)")
522
+ .action((id) => {
523
+ console.log(JSON.stringify(archiveMatrixRoomV2(id), null, 2));
524
+ });
525
+ matrix
526
+ .command("touch-room-v2 <id>")
527
+ .description("Refresh lastTouchedAt")
528
+ .action((id) => {
529
+ console.log(JSON.stringify(touchMatrixRoomV2(id), null, 2));
530
+ });
531
+ matrix
532
+ .command("get-room-v2 <id>")
533
+ .description("Get a room")
534
+ .action((id) => {
535
+ console.log(JSON.stringify(getMatrixRoomV2(id), null, 2));
536
+ });
537
+ matrix
538
+ .command("list-rooms-v2")
539
+ .description("List rooms")
540
+ .action(() => {
541
+ console.log(JSON.stringify(listMatrixRoomsV2(), null, 2));
542
+ });
543
+ matrix
544
+ .command("create-msg-v2")
545
+ .description("Create a matrix message (queued)")
546
+ .requiredOption("--id <id>")
547
+ .requiredOption("--room-id <roomId>")
548
+ .option("--body <body>")
549
+ .action((o) => {
550
+ console.log(
551
+ JSON.stringify(
552
+ createMatrixMessageV2({ id: o.id, roomId: o.roomId, body: o.body }),
553
+ null,
554
+ 2,
555
+ ),
556
+ );
557
+ });
558
+ matrix
559
+ .command("start-msg-v2 <id>")
560
+ .description("Transition msg to sending")
561
+ .action((id) => {
562
+ console.log(JSON.stringify(startMatrixMessageV2(id), null, 2));
563
+ });
564
+ matrix
565
+ .command("deliver-msg-v2 <id>")
566
+ .description("Transition msg to delivered")
567
+ .action((id) => {
568
+ console.log(JSON.stringify(deliverMatrixMessageV2(id), null, 2));
569
+ });
570
+ matrix
571
+ .command("fail-msg-v2 <id>")
572
+ .description("Fail msg")
573
+ .option("--reason <r>")
574
+ .action((id, o) => {
575
+ console.log(JSON.stringify(failMatrixMessageV2(id, o.reason), null, 2));
576
+ });
577
+ matrix
578
+ .command("cancel-msg-v2 <id>")
579
+ .description("Cancel msg")
580
+ .option("--reason <r>")
581
+ .action((id, o) => {
582
+ console.log(JSON.stringify(cancelMatrixMessageV2(id, o.reason), null, 2));
583
+ });
584
+ matrix
585
+ .command("get-msg-v2 <id>")
586
+ .description("Get msg")
587
+ .action((id) => {
588
+ console.log(JSON.stringify(getMatrixMessageV2(id), null, 2));
589
+ });
590
+ matrix
591
+ .command("list-msgs-v2")
592
+ .description("List msgs")
593
+ .action(() => {
594
+ console.log(JSON.stringify(listMatrixMessagesV2(), null, 2));
595
+ });
596
+ matrix
597
+ .command("set-max-active-rooms-v2 <n>")
598
+ .description("Set per-owner active cap")
599
+ .action((n) => {
600
+ setMaxActiveMatrixRoomsPerOwnerV2(Number(n));
601
+ console.log(
602
+ JSON.stringify(
603
+ { maxActiveMatrixRoomsPerOwner: getMaxActiveMatrixRoomsPerOwnerV2() },
604
+ null,
605
+ 2,
606
+ ),
607
+ );
608
+ });
609
+ matrix
610
+ .command("set-max-pending-msgs-v2 <n>")
611
+ .description("Set per-room pending cap")
612
+ .action((n) => {
613
+ setMaxPendingMatrixMessagesPerRoomV2(Number(n));
614
+ console.log(
615
+ JSON.stringify(
616
+ {
617
+ maxPendingMatrixMessagesPerRoom:
618
+ getMaxPendingMatrixMessagesPerRoomV2(),
619
+ },
620
+ null,
621
+ 2,
622
+ ),
623
+ );
624
+ });
625
+ matrix
626
+ .command("set-room-idle-ms-v2 <n>")
627
+ .description("Set idle threshold")
628
+ .action((n) => {
629
+ setMatrixRoomIdleMsV2(Number(n));
630
+ console.log(
631
+ JSON.stringify({ matrixRoomIdleMs: getMatrixRoomIdleMsV2() }, null, 2),
632
+ );
633
+ });
634
+ matrix
635
+ .command("set-msg-stuck-ms-v2 <n>")
636
+ .description("Set stuck threshold")
637
+ .action((n) => {
638
+ setMatrixMessageStuckMsV2(Number(n));
639
+ console.log(
640
+ JSON.stringify(
641
+ { matrixMessageStuckMs: getMatrixMessageStuckMsV2() },
642
+ null,
643
+ 2,
644
+ ),
645
+ );
646
+ });
647
+ matrix
648
+ .command("auto-mute-idle-rooms-v2")
649
+ .description("Auto-mute idle rooms")
650
+ .action(() => {
651
+ console.log(JSON.stringify(autoMuteIdleMatrixRoomsV2(), null, 2));
652
+ });
653
+ matrix
654
+ .command("auto-fail-stuck-msgs-v2")
655
+ .description("Auto-fail stuck sending msgs")
656
+ .action(() => {
657
+ console.log(JSON.stringify(autoFailStuckMatrixMessagesV2(), null, 2));
658
+ });
659
+ matrix
660
+ .command("stats-v2")
661
+ .description("V2 aggregate stats")
662
+ .action(() => {
663
+ console.log(JSON.stringify(getMatrixBridgeStatsV2(), null, 2));
664
+ });
513
665
  }