chainlesschain 0.81.0 → 0.132.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.
- package/bin/chainlesschain.js +0 -0
- package/package.json +1 -1
- package/src/commands/agent-network.js +254 -1
- package/src/commands/audit.js +302 -0
- package/src/commands/automation.js +271 -1
- package/src/commands/codegen.js +224 -0
- package/src/commands/collab.js +341 -0
- package/src/commands/compliance.js +1035 -0
- package/src/commands/cowork.js +221 -0
- package/src/commands/dbevo.js +284 -0
- package/src/commands/dev.js +252 -0
- package/src/commands/did.js +358 -0
- package/src/commands/encrypt.js +341 -0
- package/src/commands/export.js +256 -1
- package/src/commands/fusion.js +258 -0
- package/src/commands/governance.js +325 -0
- package/src/commands/hardening.js +411 -0
- package/src/commands/hook.js +148 -0
- package/src/commands/import.js +252 -0
- package/src/commands/incentive.js +322 -0
- package/src/commands/infra.js +244 -0
- package/src/commands/instinct.js +260 -0
- package/src/commands/ipfs.js +318 -0
- package/src/commands/kg.js +387 -0
- package/src/commands/llm.js +263 -0
- package/src/commands/mcp.js +221 -0
- package/src/commands/memory.js +248 -0
- package/src/commands/multimodal.js +296 -0
- package/src/commands/nlprog.js +356 -0
- package/src/commands/note.js +244 -0
- package/src/commands/ops.js +354 -0
- package/src/commands/orchestrate.js +166 -0
- package/src/commands/org.js +277 -0
- package/src/commands/p2p.js +390 -0
- package/src/commands/perception.js +290 -0
- package/src/commands/permmem.js +251 -0
- package/src/commands/plugin-ecosystem.js +273 -0
- package/src/commands/pqc.js +393 -0
- package/src/commands/quantization.js +351 -0
- package/src/commands/rcache.js +271 -0
- package/src/commands/recommend.js +340 -0
- package/src/commands/runtime.js +307 -0
- package/src/commands/scim.js +262 -0
- package/src/commands/session.js +258 -0
- package/src/commands/skill.js +267 -1
- package/src/commands/social.js +256 -0
- package/src/commands/sso.js +186 -1
- package/src/commands/sync.js +256 -0
- package/src/commands/tech.js +338 -0
- package/src/commands/tenant.js +351 -0
- package/src/commands/tokens.js +269 -0
- package/src/commands/trust.js +249 -0
- package/src/commands/wallet.js +277 -0
- package/src/commands/workflow.js +171 -0
- package/src/index.js +4 -0
- package/src/lib/agent-coordinator.js +325 -0
- package/src/lib/agent-network.js +387 -0
- package/src/lib/agent-router.js +395 -0
- package/src/lib/aiops.js +478 -0
- package/src/lib/audit-logger.js +379 -0
- package/src/lib/automation-engine.js +330 -0
- package/src/lib/autonomous-developer.js +350 -0
- package/src/lib/code-agent.js +323 -0
- package/src/lib/collaboration-governance.js +364 -0
- package/src/lib/community-governance.js +436 -0
- package/src/lib/compliance-manager.js +434 -0
- package/src/lib/content-recommendation.js +469 -0
- package/src/lib/crypto-manager.js +350 -0
- package/src/lib/dbevo.js +338 -0
- package/src/lib/decentral-infra.js +340 -0
- package/src/lib/did-manager.js +367 -0
- package/src/lib/hardening-manager.js +348 -0
- package/src/lib/hook-manager.js +380 -0
- package/src/lib/instinct-manager.js +332 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +381 -0
- package/src/lib/knowledge-graph.js +432 -0
- package/src/lib/knowledge-importer.js +379 -0
- package/src/lib/llm-providers.js +391 -0
- package/src/lib/mcp-registry.js +333 -0
- package/src/lib/memory-manager.js +330 -0
- package/src/lib/multimodal.js +346 -0
- package/src/lib/nl-programming.js +343 -0
- package/src/lib/note-versioning.js +327 -0
- package/src/lib/org-manager.js +323 -0
- package/src/lib/p2p-manager.js +387 -0
- package/src/lib/perception.js +346 -0
- package/src/lib/perf-tuning.js +4 -1
- package/src/lib/permanent-memory.js +320 -0
- package/src/lib/plugin-ecosystem.js +377 -0
- package/src/lib/pqc-manager.js +368 -0
- package/src/lib/protocol-fusion.js +417 -0
- package/src/lib/quantization.js +325 -0
- package/src/lib/response-cache.js +327 -0
- package/src/lib/scim-manager.js +329 -0
- package/src/lib/session-manager.js +329 -0
- package/src/lib/skill-loader.js +377 -0
- package/src/lib/social-manager.js +326 -0
- package/src/lib/sso-manager.js +332 -0
- package/src/lib/sync-manager.js +326 -0
- package/src/lib/tech-learning-engine.js +369 -0
- package/src/lib/tenant-saas.js +460 -0
- package/src/lib/threat-intel.js +335 -0
- package/src/lib/token-incentive.js +293 -0
- package/src/lib/token-tracker.js +329 -0
- package/src/lib/trust-security.js +390 -0
- package/src/lib/ueba.js +389 -0
- package/src/lib/universal-runtime.js +325 -0
- package/src/lib/wallet-manager.js +326 -0
- package/src/lib/workflow-engine.js +322 -0
package/src/commands/collab.js
CHANGED
|
@@ -28,6 +28,37 @@ import {
|
|
|
28
28
|
calculateSkillMatch,
|
|
29
29
|
optimizeTaskAssignment,
|
|
30
30
|
calculatePriority,
|
|
31
|
+
AGENT_MATURITY_CG_V2,
|
|
32
|
+
PROPOSAL_LIFECYCLE_V2,
|
|
33
|
+
getMaxActiveAgentsPerRealmCgV2,
|
|
34
|
+
setMaxActiveAgentsPerRealmCgV2,
|
|
35
|
+
getMaxVotingProposalsPerProposerV2,
|
|
36
|
+
setMaxVotingProposalsPerProposerV2,
|
|
37
|
+
getAgentIdleMsCgV2,
|
|
38
|
+
setAgentIdleMsCgV2,
|
|
39
|
+
getProposalStuckMsV2,
|
|
40
|
+
setProposalStuckMsV2,
|
|
41
|
+
getActiveAgentCountCgV2,
|
|
42
|
+
getVotingProposalCountV2,
|
|
43
|
+
registerAgentCgV2,
|
|
44
|
+
getAgentCgV2,
|
|
45
|
+
listAgentsCgV2,
|
|
46
|
+
setAgentMaturityCgV2,
|
|
47
|
+
activateAgentCgV2,
|
|
48
|
+
suspendAgentCgV2,
|
|
49
|
+
retireAgentCgV2,
|
|
50
|
+
touchAgentCgV2,
|
|
51
|
+
createProposalV2,
|
|
52
|
+
getProposalV2,
|
|
53
|
+
listProposalsV2,
|
|
54
|
+
setProposalStatusV2,
|
|
55
|
+
startVotingV2,
|
|
56
|
+
approveProposalV2,
|
|
57
|
+
rejectProposalV2,
|
|
58
|
+
withdrawProposalV2,
|
|
59
|
+
autoRetireIdleAgentsCgV2,
|
|
60
|
+
autoWithdrawStuckProposalsV2,
|
|
61
|
+
getCollaborationGovernanceStatsV2,
|
|
31
62
|
} from "../lib/collaboration-governance.js";
|
|
32
63
|
|
|
33
64
|
function _dbFromCtx(ctx) {
|
|
@@ -479,4 +510,314 @@ export function registerCollabCommand(program) {
|
|
|
479
510
|
|
|
480
511
|
// silence unused-import lint
|
|
481
512
|
void calculatePriority;
|
|
513
|
+
|
|
514
|
+
/* ═══ V2 Surface ═══ */
|
|
515
|
+
|
|
516
|
+
function _parseMeta(s) {
|
|
517
|
+
if (!s) return undefined;
|
|
518
|
+
try {
|
|
519
|
+
return JSON.parse(s);
|
|
520
|
+
} catch {
|
|
521
|
+
throw new Error("--metadata must be valid JSON");
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
collab
|
|
526
|
+
.command("agent-maturities-cg-v2")
|
|
527
|
+
.description("List agent maturity states (V2)")
|
|
528
|
+
.action(() => {
|
|
529
|
+
for (const v of Object.values(AGENT_MATURITY_CG_V2)) logger.log(` ${v}`);
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
collab
|
|
533
|
+
.command("proposal-lifecycles-v2")
|
|
534
|
+
.description("List proposal lifecycle states (V2)")
|
|
535
|
+
.action(() => {
|
|
536
|
+
for (const v of Object.values(PROPOSAL_LIFECYCLE_V2))
|
|
537
|
+
logger.log(` ${v}`);
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
collab
|
|
541
|
+
.command("stats-v2")
|
|
542
|
+
.description("Collaboration Governance V2 stats")
|
|
543
|
+
.action(() => {
|
|
544
|
+
console.log(JSON.stringify(getCollaborationGovernanceStatsV2(), null, 2));
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
collab
|
|
548
|
+
.command("max-active-agents-per-realm")
|
|
549
|
+
.description("Get/set max active agents per realm (V2)")
|
|
550
|
+
.option("-s, --set <n>", "Set value", (v) => parseInt(v, 10))
|
|
551
|
+
.action((o) => {
|
|
552
|
+
if (typeof o.set === "number")
|
|
553
|
+
console.log(setMaxActiveAgentsPerRealmCgV2(o.set));
|
|
554
|
+
else console.log(getMaxActiveAgentsPerRealmCgV2());
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
collab
|
|
558
|
+
.command("max-voting-proposals-per-proposer")
|
|
559
|
+
.description("Get/set max voting proposals per proposer (V2)")
|
|
560
|
+
.option("-s, --set <n>", "Set value", (v) => parseInt(v, 10))
|
|
561
|
+
.action((o) => {
|
|
562
|
+
if (typeof o.set === "number")
|
|
563
|
+
console.log(setMaxVotingProposalsPerProposerV2(o.set));
|
|
564
|
+
else console.log(getMaxVotingProposalsPerProposerV2());
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
collab
|
|
568
|
+
.command("agent-idle-ms-cg")
|
|
569
|
+
.description("Get/set agent idle threshold ms (V2)")
|
|
570
|
+
.option("-s, --set <n>", "Set value", (v) => parseInt(v, 10))
|
|
571
|
+
.action((o) => {
|
|
572
|
+
if (typeof o.set === "number") console.log(setAgentIdleMsCgV2(o.set));
|
|
573
|
+
else console.log(getAgentIdleMsCgV2());
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
collab
|
|
577
|
+
.command("proposal-stuck-ms")
|
|
578
|
+
.description("Get/set proposal stuck threshold ms (V2)")
|
|
579
|
+
.option("-s, --set <n>", "Set value", (v) => parseInt(v, 10))
|
|
580
|
+
.action((o) => {
|
|
581
|
+
if (typeof o.set === "number") console.log(setProposalStuckMsV2(o.set));
|
|
582
|
+
else console.log(getProposalStuckMsV2());
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
collab
|
|
586
|
+
.command("active-agent-count-cg")
|
|
587
|
+
.description("Count active agents for realm (V2)")
|
|
588
|
+
.requiredOption("-r, --realm <realm>", "Realm")
|
|
589
|
+
.action((o) => {
|
|
590
|
+
console.log(getActiveAgentCountCgV2(o.realm));
|
|
591
|
+
});
|
|
592
|
+
|
|
593
|
+
collab
|
|
594
|
+
.command("voting-proposal-count")
|
|
595
|
+
.description("Count voting proposals for proposer (V2)")
|
|
596
|
+
.requiredOption("-p, --proposer <proposer>", "Proposer")
|
|
597
|
+
.action((o) => {
|
|
598
|
+
console.log(getVotingProposalCountV2(o.proposer));
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
collab
|
|
602
|
+
.command("register-agent-cg-v2 <id>")
|
|
603
|
+
.description("Register a CG agent V2 (provisional)")
|
|
604
|
+
.requiredOption("-r, --realm <realm>", "Realm")
|
|
605
|
+
.requiredOption("--role <role>", "Role")
|
|
606
|
+
.option("-m, --metadata <json>", "JSON metadata")
|
|
607
|
+
.action((id, o) => {
|
|
608
|
+
console.log(
|
|
609
|
+
JSON.stringify(
|
|
610
|
+
registerAgentCgV2({
|
|
611
|
+
id,
|
|
612
|
+
realm: o.realm,
|
|
613
|
+
role: o.role,
|
|
614
|
+
metadata: _parseMeta(o.metadata),
|
|
615
|
+
}),
|
|
616
|
+
null,
|
|
617
|
+
2,
|
|
618
|
+
),
|
|
619
|
+
);
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
collab
|
|
623
|
+
.command("agent-cg-v2 <id>")
|
|
624
|
+
.description("Show CG agent V2")
|
|
625
|
+
.action((id) => {
|
|
626
|
+
const a = getAgentCgV2(id);
|
|
627
|
+
if (!a) {
|
|
628
|
+
logger.error(`agent ${id} not found`);
|
|
629
|
+
process.exit(1);
|
|
630
|
+
}
|
|
631
|
+
console.log(JSON.stringify(a, null, 2));
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
collab
|
|
635
|
+
.command("list-agents-cg-v2")
|
|
636
|
+
.description("List CG agents V2")
|
|
637
|
+
.option("-r, --realm <realm>", "Filter by realm")
|
|
638
|
+
.option("-s, --status <status>", "Filter by status")
|
|
639
|
+
.action((o) => {
|
|
640
|
+
console.log(
|
|
641
|
+
JSON.stringify(
|
|
642
|
+
listAgentsCgV2({ realm: o.realm, status: o.status }),
|
|
643
|
+
null,
|
|
644
|
+
2,
|
|
645
|
+
),
|
|
646
|
+
);
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
collab
|
|
650
|
+
.command("set-agent-maturity-cg-v2 <id> <status>")
|
|
651
|
+
.description("Transition CG agent V2 to status")
|
|
652
|
+
.option("-r, --reason <reason>", "Reason")
|
|
653
|
+
.option("-m, --metadata <json>", "JSON metadata patch")
|
|
654
|
+
.action((id, status, o) => {
|
|
655
|
+
console.log(
|
|
656
|
+
JSON.stringify(
|
|
657
|
+
setAgentMaturityCgV2(id, status, {
|
|
658
|
+
reason: o.reason,
|
|
659
|
+
metadata: _parseMeta(o.metadata),
|
|
660
|
+
}),
|
|
661
|
+
null,
|
|
662
|
+
2,
|
|
663
|
+
),
|
|
664
|
+
);
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
collab
|
|
668
|
+
.command("activate-agent-cg <id>")
|
|
669
|
+
.description("CG agent → active (V2)")
|
|
670
|
+
.option("-r, --reason <reason>", "Reason")
|
|
671
|
+
.action((id, o) => {
|
|
672
|
+
console.log(
|
|
673
|
+
JSON.stringify(activateAgentCgV2(id, { reason: o.reason }), null, 2),
|
|
674
|
+
);
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
collab
|
|
678
|
+
.command("suspend-agent-cg <id>")
|
|
679
|
+
.description("CG agent → suspended (V2)")
|
|
680
|
+
.option("-r, --reason <reason>", "Reason")
|
|
681
|
+
.action((id, o) => {
|
|
682
|
+
console.log(
|
|
683
|
+
JSON.stringify(suspendAgentCgV2(id, { reason: o.reason }), null, 2),
|
|
684
|
+
);
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
collab
|
|
688
|
+
.command("retire-agent-cg <id>")
|
|
689
|
+
.description("CG agent → retired (V2)")
|
|
690
|
+
.option("-r, --reason <reason>", "Reason")
|
|
691
|
+
.action((id, o) => {
|
|
692
|
+
console.log(
|
|
693
|
+
JSON.stringify(retireAgentCgV2(id, { reason: o.reason }), null, 2),
|
|
694
|
+
);
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
collab
|
|
698
|
+
.command("touch-agent-cg <id>")
|
|
699
|
+
.description("Update lastSeenAt (V2)")
|
|
700
|
+
.action((id) => {
|
|
701
|
+
console.log(JSON.stringify(touchAgentCgV2(id), null, 2));
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
collab
|
|
705
|
+
.command("create-proposal-v2 <id>")
|
|
706
|
+
.description("Create a proposal V2 (draft)")
|
|
707
|
+
.requiredOption("-p, --proposer <proposer>", "Proposer")
|
|
708
|
+
.requiredOption("-t, --topic <topic>", "Topic")
|
|
709
|
+
.option("-m, --metadata <json>", "JSON metadata")
|
|
710
|
+
.action((id, o) => {
|
|
711
|
+
console.log(
|
|
712
|
+
JSON.stringify(
|
|
713
|
+
createProposalV2({
|
|
714
|
+
id,
|
|
715
|
+
proposer: o.proposer,
|
|
716
|
+
topic: o.topic,
|
|
717
|
+
metadata: _parseMeta(o.metadata),
|
|
718
|
+
}),
|
|
719
|
+
null,
|
|
720
|
+
2,
|
|
721
|
+
),
|
|
722
|
+
);
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
collab
|
|
726
|
+
.command("proposal-v2 <id>")
|
|
727
|
+
.description("Show proposal V2")
|
|
728
|
+
.action((id) => {
|
|
729
|
+
const p = getProposalV2(id);
|
|
730
|
+
if (!p) {
|
|
731
|
+
logger.error(`proposal ${id} not found`);
|
|
732
|
+
process.exit(1);
|
|
733
|
+
}
|
|
734
|
+
console.log(JSON.stringify(p, null, 2));
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
collab
|
|
738
|
+
.command("list-proposals-v2")
|
|
739
|
+
.description("List proposals V2")
|
|
740
|
+
.option("-p, --proposer <proposer>", "Filter by proposer")
|
|
741
|
+
.option("-s, --status <status>", "Filter by status")
|
|
742
|
+
.action((o) => {
|
|
743
|
+
console.log(
|
|
744
|
+
JSON.stringify(
|
|
745
|
+
listProposalsV2({ proposer: o.proposer, status: o.status }),
|
|
746
|
+
null,
|
|
747
|
+
2,
|
|
748
|
+
),
|
|
749
|
+
);
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
collab
|
|
753
|
+
.command("set-proposal-status-v2 <id> <status>")
|
|
754
|
+
.description("Transition proposal V2 to status")
|
|
755
|
+
.option("-r, --reason <reason>", "Reason")
|
|
756
|
+
.option("-m, --metadata <json>", "JSON metadata patch")
|
|
757
|
+
.action((id, status, o) => {
|
|
758
|
+
console.log(
|
|
759
|
+
JSON.stringify(
|
|
760
|
+
setProposalStatusV2(id, status, {
|
|
761
|
+
reason: o.reason,
|
|
762
|
+
metadata: _parseMeta(o.metadata),
|
|
763
|
+
}),
|
|
764
|
+
null,
|
|
765
|
+
2,
|
|
766
|
+
),
|
|
767
|
+
);
|
|
768
|
+
});
|
|
769
|
+
|
|
770
|
+
collab
|
|
771
|
+
.command("start-voting-v2 <id>")
|
|
772
|
+
.description("Proposal → voting (V2)")
|
|
773
|
+
.option("-r, --reason <reason>", "Reason")
|
|
774
|
+
.action((id, o) => {
|
|
775
|
+
console.log(
|
|
776
|
+
JSON.stringify(startVotingV2(id, { reason: o.reason }), null, 2),
|
|
777
|
+
);
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
collab
|
|
781
|
+
.command("approve-proposal-v2 <id>")
|
|
782
|
+
.description("Proposal → approved (V2)")
|
|
783
|
+
.option("-r, --reason <reason>", "Reason")
|
|
784
|
+
.action((id, o) => {
|
|
785
|
+
console.log(
|
|
786
|
+
JSON.stringify(approveProposalV2(id, { reason: o.reason }), null, 2),
|
|
787
|
+
);
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
collab
|
|
791
|
+
.command("reject-proposal-v2 <id>")
|
|
792
|
+
.description("Proposal → rejected (V2)")
|
|
793
|
+
.option("-r, --reason <reason>", "Reason")
|
|
794
|
+
.action((id, o) => {
|
|
795
|
+
console.log(
|
|
796
|
+
JSON.stringify(rejectProposalV2(id, { reason: o.reason }), null, 2),
|
|
797
|
+
);
|
|
798
|
+
});
|
|
799
|
+
|
|
800
|
+
collab
|
|
801
|
+
.command("withdraw-proposal-v2 <id>")
|
|
802
|
+
.description("Proposal → withdrawn (V2)")
|
|
803
|
+
.option("-r, --reason <reason>", "Reason")
|
|
804
|
+
.action((id, o) => {
|
|
805
|
+
console.log(
|
|
806
|
+
JSON.stringify(withdrawProposalV2(id, { reason: o.reason }), null, 2),
|
|
807
|
+
);
|
|
808
|
+
});
|
|
809
|
+
|
|
810
|
+
collab
|
|
811
|
+
.command("auto-retire-idle-agents-cg")
|
|
812
|
+
.description("Bulk auto-retire idle agents past threshold (V2)")
|
|
813
|
+
.action(() => {
|
|
814
|
+
console.log(JSON.stringify(autoRetireIdleAgentsCgV2(), null, 2));
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
collab
|
|
818
|
+
.command("auto-withdraw-stuck-proposals")
|
|
819
|
+
.description("Bulk auto-withdraw voting proposals past threshold (V2)")
|
|
820
|
+
.action(() => {
|
|
821
|
+
console.log(JSON.stringify(autoWithdrawStuckProposalsV2(), null, 2));
|
|
822
|
+
});
|
|
482
823
|
}
|