chainlesschain 0.132.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 (135) hide show
  1. package/package.json +1 -1
  2. package/src/commands/a2a.js +230 -0
  3. package/src/commands/activitypub.js +191 -0
  4. package/src/commands/agent.js +601 -0
  5. package/src/commands/audit.js +206 -0
  6. package/src/commands/bi.js +186 -0
  7. package/src/commands/bm25.js +162 -0
  8. package/src/commands/browse.js +225 -0
  9. package/src/commands/ccron.js +178 -0
  10. package/src/commands/chat.js +207 -0
  11. package/src/commands/compliance.js +420 -0
  12. package/src/commands/compt.js +176 -0
  13. package/src/commands/consol.js +237 -0
  14. package/src/commands/cowork.js +588 -0
  15. package/src/commands/crosschain.js +216 -0
  16. package/src/commands/dao.js +216 -0
  17. package/src/commands/dlp.js +206 -0
  18. package/src/commands/economy.js +211 -0
  19. package/src/commands/evolution.js +209 -0
  20. package/src/commands/evomap.js +216 -0
  21. package/src/commands/fflag.js +230 -0
  22. package/src/commands/git.js +185 -0
  23. package/src/commands/hardening.js +209 -0
  24. package/src/commands/hmemory.js +210 -0
  25. package/src/commands/incentive.js +209 -0
  26. package/src/commands/inference.js +178 -0
  27. package/src/commands/itbudget.js +161 -0
  28. package/src/commands/kg.js +206 -0
  29. package/src/commands/lowcode.js +201 -0
  30. package/src/commands/marketplace.js +206 -0
  31. package/src/commands/matrix.js +214 -0
  32. package/src/commands/mcpscaf.js +153 -0
  33. package/src/commands/meminj.js +153 -0
  34. package/src/commands/nostr.js +213 -0
  35. package/src/commands/orchestrate.js +217 -0
  36. package/src/commands/orchgov.js +156 -0
  37. package/src/commands/pdfp.js +160 -0
  38. package/src/commands/perf.js +176 -0
  39. package/src/commands/perm.js +156 -0
  40. package/src/commands/pipeline.js +211 -0
  41. package/src/commands/planmode.js +154 -0
  42. package/src/commands/privacy.js +203 -0
  43. package/src/commands/promcomp.js +166 -0
  44. package/src/commands/recommend.js +185 -0
  45. package/src/commands/reputation.js +208 -0
  46. package/src/commands/sandbox.js +206 -0
  47. package/src/commands/seshhook.js +153 -0
  48. package/src/commands/seshsearch.js +149 -0
  49. package/src/commands/seshtail.js +152 -0
  50. package/src/commands/seshu.js +160 -0
  51. package/src/commands/sganal.js +172 -0
  52. package/src/commands/siem.js +207 -0
  53. package/src/commands/sla.js +212 -0
  54. package/src/commands/slotfill.js +154 -0
  55. package/src/commands/social.js +159 -0
  56. package/src/commands/stress.js +206 -0
  57. package/src/commands/svccont.js +157 -0
  58. package/src/commands/terraform.js +206 -0
  59. package/src/commands/tms.js +183 -0
  60. package/src/commands/topiccls.js +158 -0
  61. package/src/commands/uprof.js +154 -0
  62. package/src/commands/vcheck.js +172 -0
  63. package/src/commands/webfetch.js +150 -0
  64. package/src/commands/zkp.js +218 -0
  65. package/src/harness/prompt-compressor.js +331 -0
  66. package/src/index.js +101 -1
  67. package/src/lib/a2a-protocol.js +373 -0
  68. package/src/lib/activitypub-bridge.js +343 -0
  69. package/src/lib/agent-economy.js +358 -0
  70. package/src/lib/app-builder.js +338 -0
  71. package/src/lib/audit-logger.js +321 -0
  72. package/src/lib/autonomous-agent.js +341 -0
  73. package/src/lib/bi-engine.js +339 -0
  74. package/src/lib/bm25-search.js +333 -0
  75. package/src/lib/browser-automation.js +352 -0
  76. package/src/lib/chat-core.js +336 -0
  77. package/src/lib/claude-code-bridge.js +341 -0
  78. package/src/lib/compliance-framework-reporter.js +359 -0
  79. package/src/lib/compliance-manager.js +330 -0
  80. package/src/lib/compression-telemetry.js +333 -0
  81. package/src/lib/content-recommender.js +370 -0
  82. package/src/lib/cowork-cron.js +330 -0
  83. package/src/lib/cowork-learning.js +333 -0
  84. package/src/lib/cowork-task-runner.js +362 -0
  85. package/src/lib/cowork-workflow.js +327 -0
  86. package/src/lib/cross-chain.js +365 -0
  87. package/src/lib/dao-governance.js +339 -0
  88. package/src/lib/dlp-engine.js +343 -0
  89. package/src/lib/evolution-system.js +336 -0
  90. package/src/lib/evomap-manager.js +339 -0
  91. package/src/lib/execution-backend.js +351 -0
  92. package/src/lib/feature-flags.js +330 -0
  93. package/src/lib/git-integration.js +343 -0
  94. package/src/lib/hardening-manager.js +341 -0
  95. package/src/lib/hierarchical-memory.js +341 -0
  96. package/src/lib/inference-network.js +362 -0
  97. package/src/lib/iteration-budget.js +357 -0
  98. package/src/lib/knowledge-graph.js +333 -0
  99. package/src/lib/matrix-bridge.js +339 -0
  100. package/src/lib/mcp-scaffold.js +345 -0
  101. package/src/lib/memory-injection.js +320 -0
  102. package/src/lib/nostr-bridge.js +342 -0
  103. package/src/lib/orchestrator.js +350 -0
  104. package/src/lib/pdf-parser.js +330 -0
  105. package/src/lib/perf-tuning.js +364 -0
  106. package/src/lib/permission-engine.js +319 -0
  107. package/src/lib/pipeline-orchestrator.js +345 -0
  108. package/src/lib/plan-mode.js +328 -0
  109. package/src/lib/privacy-computing.js +335 -0
  110. package/src/lib/prompt-compressor.js +1 -10
  111. package/src/lib/reputation-optimizer.js +340 -0
  112. package/src/lib/sandbox-v2.js +327 -0
  113. package/src/lib/service-container.js +342 -0
  114. package/src/lib/session-consolidator.js +352 -0
  115. package/src/lib/session-hooks.js +340 -0
  116. package/src/lib/session-search.js +334 -0
  117. package/src/lib/session-tail.js +320 -0
  118. package/src/lib/session-usage.js +329 -0
  119. package/src/lib/siem-exporter.js +352 -0
  120. package/src/lib/skill-marketplace.js +345 -0
  121. package/src/lib/sla-manager.js +341 -0
  122. package/src/lib/slot-filler.js +333 -0
  123. package/src/lib/social-graph-analytics.js +327 -0
  124. package/src/lib/social-graph.js +304 -0
  125. package/src/lib/stress-tester.js +342 -0
  126. package/src/lib/sub-agent-registry.js +359 -0
  127. package/src/lib/task-model-selector.js +333 -0
  128. package/src/lib/terraform-manager.js +333 -0
  129. package/src/lib/todo-manager.js +339 -0
  130. package/src/lib/token-incentive.js +341 -0
  131. package/src/lib/topic-classifier.js +353 -0
  132. package/src/lib/user-profile.js +325 -0
  133. package/src/lib/version-checker.js +335 -0
  134. package/src/lib/web-fetch.js +322 -0
  135. package/src/lib/zkp-engine.js +342 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.132.0",
3
+ "version": "0.145.0",
4
4
  "description": "CLI for ChainlessChain - install, configure, and manage your personal AI management system",
5
5
  "type": "module",
6
6
  "bin": {
@@ -751,4 +751,234 @@ export function registerA2aCommand(program) {
751
751
  logger.log(` Subs (typed): ${s.subscriptions.typed}`);
752
752
  }
753
753
  });
754
+ registerA2aV2Command(a2a);
755
+ }
756
+
757
+ import {
758
+ A2A_AGENT_MATURITY_V2,
759
+ A2A_MESSAGE_LIFECYCLE_V2,
760
+ registerA2aAgentV2,
761
+ activateA2aAgentV2,
762
+ suspendA2aAgentV2,
763
+ retireA2aAgentV2,
764
+ touchA2aAgentV2,
765
+ getA2aAgentV2,
766
+ listA2aAgentsV2,
767
+ createA2aMessageV2,
768
+ startA2aMessageV2,
769
+ deliverA2aMessageV2,
770
+ failA2aMessageV2,
771
+ cancelA2aMessageV2,
772
+ getA2aMessageV2,
773
+ listA2aMessagesV2,
774
+ setMaxActiveA2aAgentsPerOwnerV2,
775
+ getMaxActiveA2aAgentsPerOwnerV2,
776
+ setMaxPendingA2aMessagesPerAgentV2,
777
+ getMaxPendingA2aMessagesPerAgentV2,
778
+ setA2aAgentIdleMsV2,
779
+ getA2aAgentIdleMsV2,
780
+ setA2aMessageStuckMsV2,
781
+ getA2aMessageStuckMsV2,
782
+ autoSuspendIdleA2aAgentsV2,
783
+ autoFailStuckA2aMessagesV2,
784
+ getA2aProtocolGovStatsV2,
785
+ } from "../lib/a2a-protocol.js";
786
+
787
+ export function registerA2aV2Command(a2a) {
788
+ a2a
789
+ .command("enums-v2")
790
+ .description("Show V2 governance enums")
791
+ .action(() => {
792
+ console.log(
793
+ JSON.stringify(
794
+ { A2A_AGENT_MATURITY_V2, A2A_MESSAGE_LIFECYCLE_V2 },
795
+ null,
796
+ 2,
797
+ ),
798
+ );
799
+ });
800
+ a2a
801
+ .command("register-agent-v2")
802
+ .description("Register an a2a agent profile (pending)")
803
+ .requiredOption("--id <id>")
804
+ .requiredOption("--owner <owner>")
805
+ .option("--capabilities <csv>")
806
+ .action((o) => {
807
+ const caps = o.capabilities
808
+ ? o.capabilities
809
+ .split(",")
810
+ .map((s) => s.trim())
811
+ .filter(Boolean)
812
+ : [];
813
+ console.log(
814
+ JSON.stringify(
815
+ registerA2aAgentV2({ id: o.id, owner: o.owner, capabilities: caps }),
816
+ null,
817
+ 2,
818
+ ),
819
+ );
820
+ });
821
+ a2a
822
+ .command("activate-agent-v2 <id>")
823
+ .description("Activate agent")
824
+ .action((id) => {
825
+ console.log(JSON.stringify(activateA2aAgentV2(id), null, 2));
826
+ });
827
+ a2a
828
+ .command("suspend-agent-v2 <id>")
829
+ .description("Suspend agent")
830
+ .action((id) => {
831
+ console.log(JSON.stringify(suspendA2aAgentV2(id), null, 2));
832
+ });
833
+ a2a
834
+ .command("retire-agent-v2 <id>")
835
+ .description("Retire agent (terminal)")
836
+ .action((id) => {
837
+ console.log(JSON.stringify(retireA2aAgentV2(id), null, 2));
838
+ });
839
+ a2a
840
+ .command("touch-agent-v2 <id>")
841
+ .description("Refresh lastTouchedAt")
842
+ .action((id) => {
843
+ console.log(JSON.stringify(touchA2aAgentV2(id), null, 2));
844
+ });
845
+ a2a
846
+ .command("get-agent-v2 <id>")
847
+ .description("Get agent")
848
+ .action((id) => {
849
+ console.log(JSON.stringify(getA2aAgentV2(id), null, 2));
850
+ });
851
+ a2a
852
+ .command("list-agents-v2")
853
+ .description("List agents")
854
+ .action(() => {
855
+ console.log(JSON.stringify(listA2aAgentsV2(), null, 2));
856
+ });
857
+ a2a
858
+ .command("create-message-v2")
859
+ .description("Create an a2a message (queued)")
860
+ .requiredOption("--id <id>")
861
+ .requiredOption("--agent-id <agentId>")
862
+ .option("--peer-id <peerId>")
863
+ .option("--payload <payload>")
864
+ .action((o) => {
865
+ console.log(
866
+ JSON.stringify(
867
+ createA2aMessageV2({
868
+ id: o.id,
869
+ agentId: o.agentId,
870
+ peerId: o.peerId,
871
+ payload: o.payload,
872
+ }),
873
+ null,
874
+ 2,
875
+ ),
876
+ );
877
+ });
878
+ a2a
879
+ .command("start-message-v2 <id>")
880
+ .description("Transition message to sending")
881
+ .action((id) => {
882
+ console.log(JSON.stringify(startA2aMessageV2(id), null, 2));
883
+ });
884
+ a2a
885
+ .command("deliver-message-v2 <id>")
886
+ .description("Transition message to delivered")
887
+ .action((id) => {
888
+ console.log(JSON.stringify(deliverA2aMessageV2(id), null, 2));
889
+ });
890
+ a2a
891
+ .command("fail-message-v2 <id>")
892
+ .description("Fail message")
893
+ .option("--reason <r>")
894
+ .action((id, o) => {
895
+ console.log(JSON.stringify(failA2aMessageV2(id, o.reason), null, 2));
896
+ });
897
+ a2a
898
+ .command("cancel-message-v2 <id>")
899
+ .description("Cancel message")
900
+ .option("--reason <r>")
901
+ .action((id, o) => {
902
+ console.log(JSON.stringify(cancelA2aMessageV2(id, o.reason), null, 2));
903
+ });
904
+ a2a
905
+ .command("get-message-v2 <id>")
906
+ .description("Get message")
907
+ .action((id) => {
908
+ console.log(JSON.stringify(getA2aMessageV2(id), null, 2));
909
+ });
910
+ a2a
911
+ .command("list-messages-v2")
912
+ .description("List messages")
913
+ .action(() => {
914
+ console.log(JSON.stringify(listA2aMessagesV2(), null, 2));
915
+ });
916
+ a2a
917
+ .command("set-max-active-agents-v2 <n>")
918
+ .description("Set per-owner active cap")
919
+ .action((n) => {
920
+ setMaxActiveA2aAgentsPerOwnerV2(Number(n));
921
+ console.log(
922
+ JSON.stringify(
923
+ { maxActiveA2aAgentsPerOwner: getMaxActiveA2aAgentsPerOwnerV2() },
924
+ null,
925
+ 2,
926
+ ),
927
+ );
928
+ });
929
+ a2a
930
+ .command("set-max-pending-messages-v2 <n>")
931
+ .description("Set per-agent pending cap")
932
+ .action((n) => {
933
+ setMaxPendingA2aMessagesPerAgentV2(Number(n));
934
+ console.log(
935
+ JSON.stringify(
936
+ {
937
+ maxPendingA2aMessagesPerAgent: getMaxPendingA2aMessagesPerAgentV2(),
938
+ },
939
+ null,
940
+ 2,
941
+ ),
942
+ );
943
+ });
944
+ a2a
945
+ .command("set-agent-idle-ms-v2 <n>")
946
+ .description("Set idle threshold")
947
+ .action((n) => {
948
+ setA2aAgentIdleMsV2(Number(n));
949
+ console.log(
950
+ JSON.stringify({ a2aAgentIdleMs: getA2aAgentIdleMsV2() }, null, 2),
951
+ );
952
+ });
953
+ a2a
954
+ .command("set-message-stuck-ms-v2 <n>")
955
+ .description("Set stuck threshold")
956
+ .action((n) => {
957
+ setA2aMessageStuckMsV2(Number(n));
958
+ console.log(
959
+ JSON.stringify(
960
+ { a2aMessageStuckMs: getA2aMessageStuckMsV2() },
961
+ null,
962
+ 2,
963
+ ),
964
+ );
965
+ });
966
+ a2a
967
+ .command("auto-suspend-idle-agents-v2")
968
+ .description("Auto-suspend idle agents")
969
+ .action(() => {
970
+ console.log(JSON.stringify(autoSuspendIdleA2aAgentsV2(), null, 2));
971
+ });
972
+ a2a
973
+ .command("auto-fail-stuck-messages-v2")
974
+ .description("Auto-fail stuck sending messages")
975
+ .action(() => {
976
+ console.log(JSON.stringify(autoFailStuckA2aMessagesV2(), null, 2));
977
+ });
978
+ a2a
979
+ .command("gov-stats-v2")
980
+ .description("V2 governance aggregate stats")
981
+ .action(() => {
982
+ console.log(JSON.stringify(getA2aProtocolGovStatsV2(), null, 2));
983
+ });
754
984
  }
@@ -530,4 +530,195 @@ export function registerActivityPubCommand(program) {
530
530
  process.exit(1);
531
531
  }
532
532
  });
533
+ registerActivityPubV2Command(ap);
534
+ }
535
+
536
+ import {
537
+ AP_ACTOR_MATURITY_V2,
538
+ AP_ACTIVITY_LIFECYCLE_V2,
539
+ registerApActorV2,
540
+ activateApActorV2,
541
+ suspendApActorV2,
542
+ deactivateApActorV2,
543
+ touchApActorV2,
544
+ getApActorV2,
545
+ listApActorsV2,
546
+ createApActivityV2,
547
+ startApActivityV2,
548
+ deliverApActivityV2,
549
+ failApActivityV2,
550
+ cancelApActivityV2,
551
+ getApActivityV2,
552
+ listApActivitiesV2,
553
+ setMaxActiveApActorsPerOwnerV2,
554
+ getMaxActiveApActorsPerOwnerV2,
555
+ setMaxPendingApActivitiesPerActorV2,
556
+ getMaxPendingApActivitiesPerActorV2,
557
+ setApActorIdleMsV2,
558
+ getApActorIdleMsV2,
559
+ setApActivityStuckMsV2,
560
+ getApActivityStuckMsV2,
561
+ autoSuspendIdleApActorsV2,
562
+ autoFailStuckApActivitiesV2,
563
+ getActivityPubBridgeStatsV2,
564
+ } from "../lib/activitypub-bridge.js";
565
+
566
+ export function registerActivityPubV2Command(ap) {
567
+ ap.command("enums-v2")
568
+ .description("Show V2 enums")
569
+ .action(() => {
570
+ console.log(
571
+ JSON.stringify(
572
+ { AP_ACTOR_MATURITY_V2, AP_ACTIVITY_LIFECYCLE_V2 },
573
+ null,
574
+ 2,
575
+ ),
576
+ );
577
+ });
578
+ ap.command("register-actor-v2")
579
+ .description("Register an AP actor profile (pending)")
580
+ .requiredOption("--id <id>")
581
+ .requiredOption("--owner <owner>")
582
+ .option("--handle <handle>")
583
+ .action((o) => {
584
+ console.log(JSON.stringify(registerApActorV2(o), null, 2));
585
+ });
586
+ ap.command("activate-actor-v2 <id>")
587
+ .description("Activate actor")
588
+ .action((id) => {
589
+ console.log(JSON.stringify(activateApActorV2(id), null, 2));
590
+ });
591
+ ap.command("suspend-actor-v2 <id>")
592
+ .description("Suspend actor")
593
+ .action((id) => {
594
+ console.log(JSON.stringify(suspendApActorV2(id), null, 2));
595
+ });
596
+ ap.command("deactivate-actor-v2 <id>")
597
+ .description("Deactivate actor (terminal)")
598
+ .action((id) => {
599
+ console.log(JSON.stringify(deactivateApActorV2(id), null, 2));
600
+ });
601
+ ap.command("touch-actor-v2 <id>")
602
+ .description("Refresh lastTouchedAt")
603
+ .action((id) => {
604
+ console.log(JSON.stringify(touchApActorV2(id), null, 2));
605
+ });
606
+ ap.command("get-actor-v2 <id>")
607
+ .description("Get actor")
608
+ .action((id) => {
609
+ console.log(JSON.stringify(getApActorV2(id), null, 2));
610
+ });
611
+ ap.command("list-actors-v2")
612
+ .description("List actors")
613
+ .action(() => {
614
+ console.log(JSON.stringify(listApActorsV2(), null, 2));
615
+ });
616
+ ap.command("create-activity-v2")
617
+ .description("Create an AP activity (queued)")
618
+ .requiredOption("--id <id>")
619
+ .requiredOption("--actor-id <actorId>")
620
+ .option("--kind <kind>")
621
+ .action((o) => {
622
+ console.log(
623
+ JSON.stringify(
624
+ createApActivityV2({ id: o.id, actorId: o.actorId, kind: o.kind }),
625
+ null,
626
+ 2,
627
+ ),
628
+ );
629
+ });
630
+ ap.command("start-activity-v2 <id>")
631
+ .description("Transition activity to delivering")
632
+ .action((id) => {
633
+ console.log(JSON.stringify(startApActivityV2(id), null, 2));
634
+ });
635
+ ap.command("deliver-activity-v2 <id>")
636
+ .description("Transition activity to delivered")
637
+ .action((id) => {
638
+ console.log(JSON.stringify(deliverApActivityV2(id), null, 2));
639
+ });
640
+ ap.command("fail-activity-v2 <id>")
641
+ .description("Fail activity")
642
+ .option("--reason <r>")
643
+ .action((id, o) => {
644
+ console.log(JSON.stringify(failApActivityV2(id, o.reason), null, 2));
645
+ });
646
+ ap.command("cancel-activity-v2 <id>")
647
+ .description("Cancel activity")
648
+ .option("--reason <r>")
649
+ .action((id, o) => {
650
+ console.log(JSON.stringify(cancelApActivityV2(id, o.reason), null, 2));
651
+ });
652
+ ap.command("get-activity-v2 <id>")
653
+ .description("Get activity")
654
+ .action((id) => {
655
+ console.log(JSON.stringify(getApActivityV2(id), null, 2));
656
+ });
657
+ ap.command("list-activities-v2")
658
+ .description("List activities")
659
+ .action(() => {
660
+ console.log(JSON.stringify(listApActivitiesV2(), null, 2));
661
+ });
662
+ ap.command("set-max-active-actors-v2 <n>")
663
+ .description("Set per-owner active cap")
664
+ .action((n) => {
665
+ setMaxActiveApActorsPerOwnerV2(Number(n));
666
+ console.log(
667
+ JSON.stringify(
668
+ { maxActiveApActorsPerOwner: getMaxActiveApActorsPerOwnerV2() },
669
+ null,
670
+ 2,
671
+ ),
672
+ );
673
+ });
674
+ ap.command("set-max-pending-activities-v2 <n>")
675
+ .description("Set per-actor pending cap")
676
+ .action((n) => {
677
+ setMaxPendingApActivitiesPerActorV2(Number(n));
678
+ console.log(
679
+ JSON.stringify(
680
+ {
681
+ maxPendingApActivitiesPerActor:
682
+ getMaxPendingApActivitiesPerActorV2(),
683
+ },
684
+ null,
685
+ 2,
686
+ ),
687
+ );
688
+ });
689
+ ap.command("set-actor-idle-ms-v2 <n>")
690
+ .description("Set idle threshold")
691
+ .action((n) => {
692
+ setApActorIdleMsV2(Number(n));
693
+ console.log(
694
+ JSON.stringify({ apActorIdleMs: getApActorIdleMsV2() }, null, 2),
695
+ );
696
+ });
697
+ ap.command("set-activity-stuck-ms-v2 <n>")
698
+ .description("Set stuck threshold")
699
+ .action((n) => {
700
+ setApActivityStuckMsV2(Number(n));
701
+ console.log(
702
+ JSON.stringify(
703
+ { apActivityStuckMs: getApActivityStuckMsV2() },
704
+ null,
705
+ 2,
706
+ ),
707
+ );
708
+ });
709
+ ap.command("auto-suspend-idle-actors-v2")
710
+ .description("Auto-suspend idle actors")
711
+ .action(() => {
712
+ console.log(JSON.stringify(autoSuspendIdleApActorsV2(), null, 2));
713
+ });
714
+ ap.command("auto-fail-stuck-activities-v2")
715
+ .description("Auto-fail stuck delivering activities")
716
+ .action(() => {
717
+ console.log(JSON.stringify(autoFailStuckApActivitiesV2(), null, 2));
718
+ });
719
+ ap.command("gov-stats-v2")
720
+ .description("V2 governance aggregate stats")
721
+ .action(() => {
722
+ console.log(JSON.stringify(getActivityPubBridgeStatsV2(), null, 2));
723
+ });
533
724
  }