chainlesschain 0.152.0 → 0.156.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 (80) hide show
  1. package/README.md +52 -3
  2. package/package.json +1 -1
  3. package/src/commands/a2a.js +201 -0
  4. package/src/commands/agent.js +1250 -0
  5. package/src/commands/chat.js +605 -0
  6. package/src/commands/cli-anything.js +426 -0
  7. package/src/commands/compliance.js +412 -0
  8. package/src/commands/config.js +213 -0
  9. package/src/commands/cowork.js +1463 -0
  10. package/src/commands/crosschain.js +203 -0
  11. package/src/commands/dao.js +203 -0
  12. package/src/commands/economy.js +199 -0
  13. package/src/commands/encrypt.js +201 -0
  14. package/src/commands/evolution.js +199 -0
  15. package/src/commands/evomap.js +625 -0
  16. package/src/commands/hmemory.js +203 -0
  17. package/src/commands/inference.js +207 -0
  18. package/src/commands/kg.js +195 -0
  19. package/src/commands/llm.js +209 -0
  20. package/src/commands/memory.js +203 -0
  21. package/src/commands/orchestrate.js +406 -0
  22. package/src/commands/pipeline.js +199 -0
  23. package/src/commands/planmode.js +426 -0
  24. package/src/commands/plugin.js +209 -0
  25. package/src/commands/services.js +207 -0
  26. package/src/commands/setup.js +205 -0
  27. package/src/commands/skill.js +207 -0
  28. package/src/commands/start.js +209 -0
  29. package/src/commands/stream.js +213 -0
  30. package/src/commands/ui.js +225 -0
  31. package/src/commands/workflow.js +209 -0
  32. package/src/index.js +112 -0
  33. package/src/lib/a2a-protocol.js +332 -0
  34. package/src/lib/agent-coordinator.js +334 -0
  35. package/src/lib/agent-economy.js +334 -0
  36. package/src/lib/agent-router.js +333 -0
  37. package/src/lib/autonomous-agent.js +332 -0
  38. package/src/lib/chat-core.js +335 -0
  39. package/src/lib/cli-anything-bridge.js +341 -0
  40. package/src/lib/cli-context-engineering.js +351 -0
  41. package/src/lib/compliance-manager.js +334 -0
  42. package/src/lib/cowork-adapter.js +336 -0
  43. package/src/lib/cowork-evomap-adapter.js +341 -0
  44. package/src/lib/cowork-mcp-tools.js +341 -0
  45. package/src/lib/cowork-observe-html.js +341 -0
  46. package/src/lib/cowork-observe.js +341 -0
  47. package/src/lib/cowork-task-templates.js +342 -1
  48. package/src/lib/cowork-template-marketplace.js +340 -0
  49. package/src/lib/cross-chain.js +339 -0
  50. package/src/lib/crypto-manager.js +334 -0
  51. package/src/lib/dao-governance.js +339 -0
  52. package/src/lib/downloader.js +334 -0
  53. package/src/lib/evolution-system.js +334 -0
  54. package/src/lib/evomap-client.js +342 -0
  55. package/src/lib/evomap-federation.js +338 -0
  56. package/src/lib/evomap-manager.js +330 -0
  57. package/src/lib/execution-backend.js +330 -0
  58. package/src/lib/hashline.js +338 -0
  59. package/src/lib/hierarchical-memory.js +334 -0
  60. package/src/lib/inference-network.js +341 -0
  61. package/src/lib/interaction-adapter.js +330 -0
  62. package/src/lib/interactive-planner.js +354 -0
  63. package/src/lib/knowledge-graph.js +331 -0
  64. package/src/lib/pipeline-orchestrator.js +332 -0
  65. package/src/lib/plan-mode.js +336 -0
  66. package/src/lib/plugin-autodiscovery.js +334 -0
  67. package/src/lib/process-manager.js +336 -0
  68. package/src/lib/provider-options.js +346 -0
  69. package/src/lib/provider-stream.js +348 -0
  70. package/src/lib/service-manager.js +337 -0
  71. package/src/lib/session-core-singletons.js +341 -0
  72. package/src/lib/skill-mcp.js +336 -0
  73. package/src/lib/stix-parser.js +346 -0
  74. package/src/lib/sub-agent-context.js +343 -0
  75. package/src/lib/sub-agent-profiles.js +335 -0
  76. package/src/lib/sub-agent-registry.js +336 -0
  77. package/src/lib/todo-manager.js +336 -0
  78. package/src/lib/web-ui-server.js +348 -0
  79. package/src/lib/workflow-expr.js +346 -0
  80. package/src/lib/ws-chat-handler.js +337 -0
@@ -572,3 +572,204 @@ export function registerEncryptCommand(program) {
572
572
  console.log(JSON.stringify(getCryptoManagerStatsV2(), null, 2)),
573
573
  );
574
574
  }
575
+
576
+ // === Iter28 V2 governance overlay: Crygov ===
577
+ export function registerCryV2Commands(program) {
578
+ const parent = program.commands.find((c) => c.name() === "encrypt");
579
+ if (!parent) return;
580
+ const L = async () => await import("../lib/crypto-manager.js");
581
+ parent
582
+ .command("crygov-enums-v2")
583
+ .description("Show V2 enums")
584
+ .action(async () => {
585
+ const m = await L();
586
+ console.log(
587
+ JSON.stringify(
588
+ {
589
+ profileMaturity: m.CRYGOV_PROFILE_MATURITY_V2,
590
+ encryptLifecycle: m.CRYGOV_ENCRYPT_LIFECYCLE_V2,
591
+ },
592
+ null,
593
+ 2,
594
+ ),
595
+ );
596
+ });
597
+ parent
598
+ .command("crygov-config-v2")
599
+ .description("Show V2 config")
600
+ .action(async () => {
601
+ const m = await L();
602
+ console.log(
603
+ JSON.stringify(
604
+ {
605
+ maxActive: m.getMaxActiveCryProfilesPerOwnerV2(),
606
+ maxPending: m.getMaxPendingCryEncryptsPerProfileV2(),
607
+ idleMs: m.getCryProfileIdleMsV2(),
608
+ stuckMs: m.getCryEncryptStuckMsV2(),
609
+ },
610
+ null,
611
+ 2,
612
+ ),
613
+ );
614
+ });
615
+ parent
616
+ .command("crygov-set-max-active-v2 <n>")
617
+ .description("Set max active")
618
+ .action(async (n) => {
619
+ (await L()).setMaxActiveCryProfilesPerOwnerV2(Number(n));
620
+ console.log("ok");
621
+ });
622
+ parent
623
+ .command("crygov-set-max-pending-v2 <n>")
624
+ .description("Set max pending")
625
+ .action(async (n) => {
626
+ (await L()).setMaxPendingCryEncryptsPerProfileV2(Number(n));
627
+ console.log("ok");
628
+ });
629
+ parent
630
+ .command("crygov-set-idle-ms-v2 <n>")
631
+ .description("Set idle threshold ms")
632
+ .action(async (n) => {
633
+ (await L()).setCryProfileIdleMsV2(Number(n));
634
+ console.log("ok");
635
+ });
636
+ parent
637
+ .command("crygov-set-stuck-ms-v2 <n>")
638
+ .description("Set stuck threshold ms")
639
+ .action(async (n) => {
640
+ (await L()).setCryEncryptStuckMsV2(Number(n));
641
+ console.log("ok");
642
+ });
643
+ parent
644
+ .command("crygov-register-v2 <id> <owner>")
645
+ .description("Register V2 profile")
646
+ .option("--provider <v>", "provider")
647
+ .action(async (id, owner, o) => {
648
+ const m = await L();
649
+ console.log(
650
+ JSON.stringify(
651
+ m.registerCryProfileV2({ id, owner, provider: o.provider }),
652
+ null,
653
+ 2,
654
+ ),
655
+ );
656
+ });
657
+ parent
658
+ .command("crygov-activate-v2 <id>")
659
+ .description("Activate profile")
660
+ .action(async (id) => {
661
+ console.log(
662
+ JSON.stringify((await L()).activateCryProfileV2(id), null, 2),
663
+ );
664
+ });
665
+ parent
666
+ .command("crygov-stale-v2 <id>")
667
+ .description("Stale profile")
668
+ .action(async (id) => {
669
+ console.log(JSON.stringify((await L()).staleCryProfileV2(id), null, 2));
670
+ });
671
+ parent
672
+ .command("crygov-archive-v2 <id>")
673
+ .description("Archive profile")
674
+ .action(async (id) => {
675
+ console.log(JSON.stringify((await L()).archiveCryProfileV2(id), null, 2));
676
+ });
677
+ parent
678
+ .command("crygov-touch-v2 <id>")
679
+ .description("Touch profile")
680
+ .action(async (id) => {
681
+ console.log(JSON.stringify((await L()).touchCryProfileV2(id), null, 2));
682
+ });
683
+ parent
684
+ .command("crygov-get-v2 <id>")
685
+ .description("Get profile")
686
+ .action(async (id) => {
687
+ console.log(JSON.stringify((await L()).getCryProfileV2(id), null, 2));
688
+ });
689
+ parent
690
+ .command("crygov-list-v2")
691
+ .description("List profiles")
692
+ .action(async () => {
693
+ console.log(JSON.stringify((await L()).listCryProfilesV2(), null, 2));
694
+ });
695
+ parent
696
+ .command("crygov-create-encrypt-v2 <id> <profileId>")
697
+ .description("Create encrypt")
698
+ .option("--keyId <v>", "keyId")
699
+ .action(async (id, profileId, o) => {
700
+ const m = await L();
701
+ console.log(
702
+ JSON.stringify(
703
+ m.createCryEncryptV2({ id, profileId, keyId: o.keyId }),
704
+ null,
705
+ 2,
706
+ ),
707
+ );
708
+ });
709
+ parent
710
+ .command("crygov-encrypting-encrypt-v2 <id>")
711
+ .description("Mark encrypt as encrypting")
712
+ .action(async (id) => {
713
+ console.log(
714
+ JSON.stringify((await L()).encryptingCryEncryptV2(id), null, 2),
715
+ );
716
+ });
717
+ parent
718
+ .command("crygov-complete-encrypt-v2 <id>")
719
+ .description("Complete encrypt")
720
+ .action(async (id) => {
721
+ console.log(
722
+ JSON.stringify((await L()).completeEncryptCryV2(id), null, 2),
723
+ );
724
+ });
725
+ parent
726
+ .command("crygov-fail-encrypt-v2 <id> [reason]")
727
+ .description("Fail encrypt")
728
+ .action(async (id, reason) => {
729
+ console.log(
730
+ JSON.stringify((await L()).failCryEncryptV2(id, reason), null, 2),
731
+ );
732
+ });
733
+ parent
734
+ .command("crygov-cancel-encrypt-v2 <id> [reason]")
735
+ .description("Cancel encrypt")
736
+ .action(async (id, reason) => {
737
+ console.log(
738
+ JSON.stringify((await L()).cancelCryEncryptV2(id, reason), null, 2),
739
+ );
740
+ });
741
+ parent
742
+ .command("crygov-get-encrypt-v2 <id>")
743
+ .description("Get encrypt")
744
+ .action(async (id) => {
745
+ console.log(JSON.stringify((await L()).getCryEncryptV2(id), null, 2));
746
+ });
747
+ parent
748
+ .command("crygov-list-encrypts-v2")
749
+ .description("List encrypts")
750
+ .action(async () => {
751
+ console.log(JSON.stringify((await L()).listCryEncryptsV2(), null, 2));
752
+ });
753
+ parent
754
+ .command("crygov-auto-stale-idle-v2")
755
+ .description("Auto-stale idle")
756
+ .action(async () => {
757
+ console.log(
758
+ JSON.stringify((await L()).autoStaleIdleCryProfilesV2(), null, 2),
759
+ );
760
+ });
761
+ parent
762
+ .command("crygov-auto-fail-stuck-v2")
763
+ .description("Auto-fail stuck encrypts")
764
+ .action(async () => {
765
+ console.log(
766
+ JSON.stringify((await L()).autoFailStuckCryEncryptsV2(), null, 2),
767
+ );
768
+ });
769
+ parent
770
+ .command("crygov-gov-stats-v2")
771
+ .description("V2 gov stats")
772
+ .action(async () => {
773
+ console.log(JSON.stringify((await L()).getCrygovStatsV2(), null, 2));
774
+ });
775
+ }
@@ -996,3 +996,202 @@ function _registerEvolutionV2Commands(parent) {
996
996
  console.log(JSON.stringify(m.getEvolutionSystemGovStatsV2(), null, 2));
997
997
  });
998
998
  }
999
+
1000
+ // === Iter28 V2 governance overlay: Esysgov ===
1001
+ export function registerEsysV2Commands(program) {
1002
+ const parent = program.commands.find((c) => c.name() === "evolution");
1003
+ if (!parent) return;
1004
+ const L = async () => await import("../lib/evolution-system.js");
1005
+ parent
1006
+ .command("esysgov-enums-v2")
1007
+ .description("Show V2 enums")
1008
+ .action(async () => {
1009
+ const m = await L();
1010
+ console.log(
1011
+ JSON.stringify(
1012
+ {
1013
+ profileMaturity: m.ESYSGOV_PROFILE_MATURITY_V2,
1014
+ cycleLifecycle: m.ESYSGOV_CYCLE_LIFECYCLE_V2,
1015
+ },
1016
+ null,
1017
+ 2,
1018
+ ),
1019
+ );
1020
+ });
1021
+ parent
1022
+ .command("esysgov-config-v2")
1023
+ .description("Show V2 config")
1024
+ .action(async () => {
1025
+ const m = await L();
1026
+ console.log(
1027
+ JSON.stringify(
1028
+ {
1029
+ maxActive: m.getMaxActiveEsysProfilesPerOwnerV2(),
1030
+ maxPending: m.getMaxPendingEsysCyclesPerProfileV2(),
1031
+ idleMs: m.getEsysProfileIdleMsV2(),
1032
+ stuckMs: m.getEsysCycleStuckMsV2(),
1033
+ },
1034
+ null,
1035
+ 2,
1036
+ ),
1037
+ );
1038
+ });
1039
+ parent
1040
+ .command("esysgov-set-max-active-v2 <n>")
1041
+ .description("Set max active")
1042
+ .action(async (n) => {
1043
+ (await L()).setMaxActiveEsysProfilesPerOwnerV2(Number(n));
1044
+ console.log("ok");
1045
+ });
1046
+ parent
1047
+ .command("esysgov-set-max-pending-v2 <n>")
1048
+ .description("Set max pending")
1049
+ .action(async (n) => {
1050
+ (await L()).setMaxPendingEsysCyclesPerProfileV2(Number(n));
1051
+ console.log("ok");
1052
+ });
1053
+ parent
1054
+ .command("esysgov-set-idle-ms-v2 <n>")
1055
+ .description("Set idle threshold ms")
1056
+ .action(async (n) => {
1057
+ (await L()).setEsysProfileIdleMsV2(Number(n));
1058
+ console.log("ok");
1059
+ });
1060
+ parent
1061
+ .command("esysgov-set-stuck-ms-v2 <n>")
1062
+ .description("Set stuck threshold ms")
1063
+ .action(async (n) => {
1064
+ (await L()).setEsysCycleStuckMsV2(Number(n));
1065
+ console.log("ok");
1066
+ });
1067
+ parent
1068
+ .command("esysgov-register-v2 <id> <owner>")
1069
+ .description("Register V2 profile")
1070
+ .option("--lane <v>", "lane")
1071
+ .action(async (id, owner, o) => {
1072
+ const m = await L();
1073
+ console.log(
1074
+ JSON.stringify(
1075
+ m.registerEsysProfileV2({ id, owner, lane: o.lane }),
1076
+ null,
1077
+ 2,
1078
+ ),
1079
+ );
1080
+ });
1081
+ parent
1082
+ .command("esysgov-activate-v2 <id>")
1083
+ .description("Activate profile")
1084
+ .action(async (id) => {
1085
+ console.log(
1086
+ JSON.stringify((await L()).activateEsysProfileV2(id), null, 2),
1087
+ );
1088
+ });
1089
+ parent
1090
+ .command("esysgov-paused-v2 <id>")
1091
+ .description("Paused profile")
1092
+ .action(async (id) => {
1093
+ console.log(JSON.stringify((await L()).pausedEsysProfileV2(id), null, 2));
1094
+ });
1095
+ parent
1096
+ .command("esysgov-archive-v2 <id>")
1097
+ .description("Archive profile")
1098
+ .action(async (id) => {
1099
+ console.log(
1100
+ JSON.stringify((await L()).archiveEsysProfileV2(id), null, 2),
1101
+ );
1102
+ });
1103
+ parent
1104
+ .command("esysgov-touch-v2 <id>")
1105
+ .description("Touch profile")
1106
+ .action(async (id) => {
1107
+ console.log(JSON.stringify((await L()).touchEsysProfileV2(id), null, 2));
1108
+ });
1109
+ parent
1110
+ .command("esysgov-get-v2 <id>")
1111
+ .description("Get profile")
1112
+ .action(async (id) => {
1113
+ console.log(JSON.stringify((await L()).getEsysProfileV2(id), null, 2));
1114
+ });
1115
+ parent
1116
+ .command("esysgov-list-v2")
1117
+ .description("List profiles")
1118
+ .action(async () => {
1119
+ console.log(JSON.stringify((await L()).listEsysProfilesV2(), null, 2));
1120
+ });
1121
+ parent
1122
+ .command("esysgov-create-cycle-v2 <id> <profileId>")
1123
+ .description("Create cycle")
1124
+ .option("--cycleId <v>", "cycleId")
1125
+ .action(async (id, profileId, o) => {
1126
+ const m = await L();
1127
+ console.log(
1128
+ JSON.stringify(
1129
+ m.createEsysCycleV2({ id, profileId, cycleId: o.cycleId }),
1130
+ null,
1131
+ 2,
1132
+ ),
1133
+ );
1134
+ });
1135
+ parent
1136
+ .command("esysgov-evolving-cycle-v2 <id>")
1137
+ .description("Mark cycle as evolving")
1138
+ .action(async (id) => {
1139
+ console.log(JSON.stringify((await L()).evolvingEsysCycleV2(id), null, 2));
1140
+ });
1141
+ parent
1142
+ .command("esysgov-complete-cycle-v2 <id>")
1143
+ .description("Complete cycle")
1144
+ .action(async (id) => {
1145
+ console.log(JSON.stringify((await L()).completeCycleEsysV2(id), null, 2));
1146
+ });
1147
+ parent
1148
+ .command("esysgov-fail-cycle-v2 <id> [reason]")
1149
+ .description("Fail cycle")
1150
+ .action(async (id, reason) => {
1151
+ console.log(
1152
+ JSON.stringify((await L()).failEsysCycleV2(id, reason), null, 2),
1153
+ );
1154
+ });
1155
+ parent
1156
+ .command("esysgov-cancel-cycle-v2 <id> [reason]")
1157
+ .description("Cancel cycle")
1158
+ .action(async (id, reason) => {
1159
+ console.log(
1160
+ JSON.stringify((await L()).cancelEsysCycleV2(id, reason), null, 2),
1161
+ );
1162
+ });
1163
+ parent
1164
+ .command("esysgov-get-cycle-v2 <id>")
1165
+ .description("Get cycle")
1166
+ .action(async (id) => {
1167
+ console.log(JSON.stringify((await L()).getEsysCycleV2(id), null, 2));
1168
+ });
1169
+ parent
1170
+ .command("esysgov-list-cycles-v2")
1171
+ .description("List cycles")
1172
+ .action(async () => {
1173
+ console.log(JSON.stringify((await L()).listEsysCyclesV2(), null, 2));
1174
+ });
1175
+ parent
1176
+ .command("esysgov-auto-paused-idle-v2")
1177
+ .description("Auto-paused idle")
1178
+ .action(async () => {
1179
+ console.log(
1180
+ JSON.stringify((await L()).autoPausedIdleEsysProfilesV2(), null, 2),
1181
+ );
1182
+ });
1183
+ parent
1184
+ .command("esysgov-auto-fail-stuck-v2")
1185
+ .description("Auto-fail stuck cycles")
1186
+ .action(async () => {
1187
+ console.log(
1188
+ JSON.stringify((await L()).autoFailStuckEsysCyclesV2(), null, 2),
1189
+ );
1190
+ });
1191
+ parent
1192
+ .command("esysgov-gov-stats-v2")
1193
+ .description("V2 gov stats")
1194
+ .action(async () => {
1195
+ console.log(JSON.stringify((await L()).getEsysgovStatsV2(), null, 2));
1196
+ });
1197
+ }