chainlesschain 0.152.0 → 0.156.2

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
@@ -766,3 +766,212 @@ export function registerLlmgovV2Commands(program) {
766
766
  );
767
767
  });
768
768
  }
769
+
770
+ // === Iter27 V2 governance overlay ===
771
+ export function registerPoptgovV2Commands(program) {
772
+ const parent = program.commands.find((c) => c.name() === "llm");
773
+ if (!parent) return;
774
+ const L = async () => await import("../lib/provider-options.js");
775
+ parent
776
+ .command("poptgov-enums-v2")
777
+ .description("Show V2 enums")
778
+ .action(async () => {
779
+ const m = await L();
780
+ console.log(
781
+ JSON.stringify(
782
+ {
783
+ profileMaturity: m.POPTGOV_PROFILE_MATURITY_V2,
784
+ resolveLifecycle: m.POPTGOV_RESOLVE_LIFECYCLE_V2,
785
+ },
786
+ null,
787
+ 2,
788
+ ),
789
+ );
790
+ });
791
+ parent
792
+ .command("poptgov-config-v2")
793
+ .description("Show V2 config")
794
+ .action(async () => {
795
+ const m = await L();
796
+ console.log(
797
+ JSON.stringify(
798
+ {
799
+ maxActive: m.getMaxActivePoptgovProfilesPerOwnerV2(),
800
+ maxPending: m.getMaxPendingPoptgovResolvesPerProfileV2(),
801
+ idleMs: m.getPoptgovProfileIdleMsV2(),
802
+ stuckMs: m.getPoptgovResolveStuckMsV2(),
803
+ },
804
+ null,
805
+ 2,
806
+ ),
807
+ );
808
+ });
809
+ parent
810
+ .command("poptgov-set-max-active-v2 <n>")
811
+ .description("Set max active")
812
+ .action(async (n) => {
813
+ (await L()).setMaxActivePoptgovProfilesPerOwnerV2(Number(n));
814
+ console.log("ok");
815
+ });
816
+ parent
817
+ .command("poptgov-set-max-pending-v2 <n>")
818
+ .description("Set max pending")
819
+ .action(async (n) => {
820
+ (await L()).setMaxPendingPoptgovResolvesPerProfileV2(Number(n));
821
+ console.log("ok");
822
+ });
823
+ parent
824
+ .command("poptgov-set-idle-ms-v2 <n>")
825
+ .description("Set idle threshold ms")
826
+ .action(async (n) => {
827
+ (await L()).setPoptgovProfileIdleMsV2(Number(n));
828
+ console.log("ok");
829
+ });
830
+ parent
831
+ .command("poptgov-set-stuck-ms-v2 <n>")
832
+ .description("Set stuck threshold ms")
833
+ .action(async (n) => {
834
+ (await L()).setPoptgovResolveStuckMsV2(Number(n));
835
+ console.log("ok");
836
+ });
837
+ parent
838
+ .command("poptgov-register-v2 <id> <owner>")
839
+ .description("Register V2 profile")
840
+ .option("--provider <v>", "provider")
841
+ .action(async (id, owner, o) => {
842
+ const m = await L();
843
+ console.log(
844
+ JSON.stringify(
845
+ m.registerPoptgovProfileV2({ id, owner, provider: o.provider }),
846
+ null,
847
+ 2,
848
+ ),
849
+ );
850
+ });
851
+ parent
852
+ .command("poptgov-activate-v2 <id>")
853
+ .description("Activate profile")
854
+ .action(async (id) => {
855
+ console.log(
856
+ JSON.stringify((await L()).activatePoptgovProfileV2(id), null, 2),
857
+ );
858
+ });
859
+ parent
860
+ .command("poptgov-stale-v2 <id>")
861
+ .description("Stale profile")
862
+ .action(async (id) => {
863
+ console.log(
864
+ JSON.stringify((await L()).stalePoptgovProfileV2(id), null, 2),
865
+ );
866
+ });
867
+ parent
868
+ .command("poptgov-archive-v2 <id>")
869
+ .description("Archive profile")
870
+ .action(async (id) => {
871
+ console.log(
872
+ JSON.stringify((await L()).archivePoptgovProfileV2(id), null, 2),
873
+ );
874
+ });
875
+ parent
876
+ .command("poptgov-touch-v2 <id>")
877
+ .description("Touch profile")
878
+ .action(async (id) => {
879
+ console.log(
880
+ JSON.stringify((await L()).touchPoptgovProfileV2(id), null, 2),
881
+ );
882
+ });
883
+ parent
884
+ .command("poptgov-get-v2 <id>")
885
+ .description("Get profile")
886
+ .action(async (id) => {
887
+ console.log(JSON.stringify((await L()).getPoptgovProfileV2(id), null, 2));
888
+ });
889
+ parent
890
+ .command("poptgov-list-v2")
891
+ .description("List profiles")
892
+ .action(async () => {
893
+ console.log(JSON.stringify((await L()).listPoptgovProfilesV2(), null, 2));
894
+ });
895
+ parent
896
+ .command("poptgov-create-resolve-v2 <id> <profileId>")
897
+ .description("Create resolve")
898
+ .option("--option <v>", "option")
899
+ .action(async (id, profileId, o) => {
900
+ const m = await L();
901
+ console.log(
902
+ JSON.stringify(
903
+ m.createPoptgovResolveV2({ id, profileId, option: o.option }),
904
+ null,
905
+ 2,
906
+ ),
907
+ );
908
+ });
909
+ parent
910
+ .command("poptgov-resolving-resolve-v2 <id>")
911
+ .description("Mark resolve as resolving")
912
+ .action(async (id) => {
913
+ console.log(
914
+ JSON.stringify((await L()).resolvingPoptgovResolveV2(id), null, 2),
915
+ );
916
+ });
917
+ parent
918
+ .command("poptgov-complete-resolve-v2 <id>")
919
+ .description("Complete resolve")
920
+ .action(async (id) => {
921
+ console.log(
922
+ JSON.stringify((await L()).completeResolvePoptgovV2(id), null, 2),
923
+ );
924
+ });
925
+ parent
926
+ .command("poptgov-fail-resolve-v2 <id> [reason]")
927
+ .description("Fail resolve")
928
+ .action(async (id, reason) => {
929
+ console.log(
930
+ JSON.stringify((await L()).failPoptgovResolveV2(id, reason), null, 2),
931
+ );
932
+ });
933
+ parent
934
+ .command("poptgov-cancel-resolve-v2 <id> [reason]")
935
+ .description("Cancel resolve")
936
+ .action(async (id, reason) => {
937
+ console.log(
938
+ JSON.stringify((await L()).cancelPoptgovResolveV2(id, reason), null, 2),
939
+ );
940
+ });
941
+ parent
942
+ .command("poptgov-get-resolve-v2 <id>")
943
+ .description("Get resolve")
944
+ .action(async (id) => {
945
+ console.log(JSON.stringify((await L()).getPoptgovResolveV2(id), null, 2));
946
+ });
947
+ parent
948
+ .command("poptgov-list-resolves-v2")
949
+ .description("List resolves")
950
+ .action(async () => {
951
+ console.log(JSON.stringify((await L()).listPoptgovResolvesV2(), null, 2));
952
+ });
953
+ parent
954
+ .command("poptgov-auto-stale-idle-v2")
955
+ .description("Auto-stale idle")
956
+ .action(async () => {
957
+ console.log(
958
+ JSON.stringify((await L()).autoStaleIdlePoptgovProfilesV2(), null, 2),
959
+ );
960
+ });
961
+ parent
962
+ .command("poptgov-auto-fail-stuck-v2")
963
+ .description("Auto-fail stuck resolves")
964
+ .action(async () => {
965
+ console.log(
966
+ JSON.stringify((await L()).autoFailStuckPoptgovResolvesV2(), null, 2),
967
+ );
968
+ });
969
+ parent
970
+ .command("poptgov-gov-stats-v2")
971
+ .description("V2 gov stats")
972
+ .action(async () => {
973
+ console.log(
974
+ JSON.stringify((await L()).getProviderOptionsGovStatsV2(), null, 2),
975
+ );
976
+ });
977
+ }
@@ -912,3 +912,206 @@ export function registerMemgovV2Commands(program) {
912
912
  );
913
913
  });
914
914
  }
915
+
916
+ // === Iter26 V2 governance overlay ===
917
+ export function registerHlgovV2Commands(program) {
918
+ const parent = program.commands.find((c) => c.name() === "memory");
919
+ if (!parent) return;
920
+ const L = async () => await import("../lib/hashline.js");
921
+ parent
922
+ .command("hlgov-enums-v2")
923
+ .description("Show V2 enums")
924
+ .action(async () => {
925
+ const m = await L();
926
+ console.log(
927
+ JSON.stringify(
928
+ {
929
+ profileMaturity: m.HLGOV_PROFILE_MATURITY_V2,
930
+ digestLifecycle: m.HLGOV_DIGEST_LIFECYCLE_V2,
931
+ },
932
+ null,
933
+ 2,
934
+ ),
935
+ );
936
+ });
937
+ parent
938
+ .command("hlgov-config-v2")
939
+ .description("Show V2 config")
940
+ .action(async () => {
941
+ const m = await L();
942
+ console.log(
943
+ JSON.stringify(
944
+ {
945
+ maxActive: m.getMaxActiveHlgovProfilesPerOwnerV2(),
946
+ maxPending: m.getMaxPendingHlgovDigestsPerProfileV2(),
947
+ idleMs: m.getHlgovProfileIdleMsV2(),
948
+ stuckMs: m.getHlgovDigestStuckMsV2(),
949
+ },
950
+ null,
951
+ 2,
952
+ ),
953
+ );
954
+ });
955
+ parent
956
+ .command("hlgov-set-max-active-v2 <n>")
957
+ .description("Set max active")
958
+ .action(async (n) => {
959
+ (await L()).setMaxActiveHlgovProfilesPerOwnerV2(Number(n));
960
+ console.log("ok");
961
+ });
962
+ parent
963
+ .command("hlgov-set-max-pending-v2 <n>")
964
+ .description("Set max pending")
965
+ .action(async (n) => {
966
+ (await L()).setMaxPendingHlgovDigestsPerProfileV2(Number(n));
967
+ console.log("ok");
968
+ });
969
+ parent
970
+ .command("hlgov-set-idle-ms-v2 <n>")
971
+ .description("Set idle threshold ms")
972
+ .action(async (n) => {
973
+ (await L()).setHlgovProfileIdleMsV2(Number(n));
974
+ console.log("ok");
975
+ });
976
+ parent
977
+ .command("hlgov-set-stuck-ms-v2 <n>")
978
+ .description("Set stuck threshold ms")
979
+ .action(async (n) => {
980
+ (await L()).setHlgovDigestStuckMsV2(Number(n));
981
+ console.log("ok");
982
+ });
983
+ parent
984
+ .command("hlgov-register-v2 <id> <owner>")
985
+ .description("Register V2 profile")
986
+ .option("--algorithm <v>", "algorithm")
987
+ .action(async (id, owner, o) => {
988
+ const m = await L();
989
+ console.log(
990
+ JSON.stringify(
991
+ m.registerHlgovProfileV2({ id, owner, algorithm: o.algorithm }),
992
+ null,
993
+ 2,
994
+ ),
995
+ );
996
+ });
997
+ parent
998
+ .command("hlgov-activate-v2 <id>")
999
+ .description("Activate profile")
1000
+ .action(async (id) => {
1001
+ console.log(
1002
+ JSON.stringify((await L()).activateHlgovProfileV2(id), null, 2),
1003
+ );
1004
+ });
1005
+ parent
1006
+ .command("hlgov-stale-v2 <id>")
1007
+ .description("Stale profile")
1008
+ .action(async (id) => {
1009
+ console.log(JSON.stringify((await L()).staleHlgovProfileV2(id), null, 2));
1010
+ });
1011
+ parent
1012
+ .command("hlgov-archive-v2 <id>")
1013
+ .description("Archive profile")
1014
+ .action(async (id) => {
1015
+ console.log(
1016
+ JSON.stringify((await L()).archiveHlgovProfileV2(id), null, 2),
1017
+ );
1018
+ });
1019
+ parent
1020
+ .command("hlgov-touch-v2 <id>")
1021
+ .description("Touch profile")
1022
+ .action(async (id) => {
1023
+ console.log(JSON.stringify((await L()).touchHlgovProfileV2(id), null, 2));
1024
+ });
1025
+ parent
1026
+ .command("hlgov-get-v2 <id>")
1027
+ .description("Get profile")
1028
+ .action(async (id) => {
1029
+ console.log(JSON.stringify((await L()).getHlgovProfileV2(id), null, 2));
1030
+ });
1031
+ parent
1032
+ .command("hlgov-list-v2")
1033
+ .description("List profiles")
1034
+ .action(async () => {
1035
+ console.log(JSON.stringify((await L()).listHlgovProfilesV2(), null, 2));
1036
+ });
1037
+ parent
1038
+ .command("hlgov-create-digest-v2 <id> <profileId>")
1039
+ .description("Create digest")
1040
+ .option("--content <v>", "content")
1041
+ .action(async (id, profileId, o) => {
1042
+ const m = await L();
1043
+ console.log(
1044
+ JSON.stringify(
1045
+ m.createHlgovDigestV2({ id, profileId, content: o.content }),
1046
+ null,
1047
+ 2,
1048
+ ),
1049
+ );
1050
+ });
1051
+ parent
1052
+ .command("hlgov-hashing-digest-v2 <id>")
1053
+ .description("Mark digest as hashing")
1054
+ .action(async (id) => {
1055
+ console.log(
1056
+ JSON.stringify((await L()).hashingHlgovDigestV2(id), null, 2),
1057
+ );
1058
+ });
1059
+ parent
1060
+ .command("hlgov-complete-digest-v2 <id>")
1061
+ .description("Complete digest")
1062
+ .action(async (id) => {
1063
+ console.log(
1064
+ JSON.stringify((await L()).completeDigestHlgovV2(id), null, 2),
1065
+ );
1066
+ });
1067
+ parent
1068
+ .command("hlgov-fail-digest-v2 <id> [reason]")
1069
+ .description("Fail digest")
1070
+ .action(async (id, reason) => {
1071
+ console.log(
1072
+ JSON.stringify((await L()).failHlgovDigestV2(id, reason), null, 2),
1073
+ );
1074
+ });
1075
+ parent
1076
+ .command("hlgov-cancel-digest-v2 <id> [reason]")
1077
+ .description("Cancel digest")
1078
+ .action(async (id, reason) => {
1079
+ console.log(
1080
+ JSON.stringify((await L()).cancelHlgovDigestV2(id, reason), null, 2),
1081
+ );
1082
+ });
1083
+ parent
1084
+ .command("hlgov-get-digest-v2 <id>")
1085
+ .description("Get digest")
1086
+ .action(async (id) => {
1087
+ console.log(JSON.stringify((await L()).getHlgovDigestV2(id), null, 2));
1088
+ });
1089
+ parent
1090
+ .command("hlgov-list-digests-v2")
1091
+ .description("List digests")
1092
+ .action(async () => {
1093
+ console.log(JSON.stringify((await L()).listHlgovDigestsV2(), null, 2));
1094
+ });
1095
+ parent
1096
+ .command("hlgov-auto-stale-idle-v2")
1097
+ .description("Auto-stale idle")
1098
+ .action(async () => {
1099
+ console.log(
1100
+ JSON.stringify((await L()).autoStaleIdleHlgovProfilesV2(), null, 2),
1101
+ );
1102
+ });
1103
+ parent
1104
+ .command("hlgov-auto-fail-stuck-v2")
1105
+ .description("Auto-fail stuck digests")
1106
+ .action(async () => {
1107
+ console.log(
1108
+ JSON.stringify((await L()).autoFailStuckHlgovDigestsV2(), null, 2),
1109
+ );
1110
+ });
1111
+ parent
1112
+ .command("hlgov-gov-stats-v2")
1113
+ .description("V2 gov stats")
1114
+ .action(async () => {
1115
+ console.log(JSON.stringify((await L()).getHashlineGovStatsV2(), null, 2));
1116
+ });
1117
+ }