chainlesschain 0.66.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.
Files changed (143) hide show
  1. package/bin/chainlesschain.js +0 -0
  2. package/package.json +1 -1
  3. package/src/commands/a2a.js +380 -0
  4. package/src/commands/agent-network.js +254 -1
  5. package/src/commands/audit.js +302 -0
  6. package/src/commands/automation.js +271 -1
  7. package/src/commands/bi.js +348 -0
  8. package/src/commands/codegen.js +224 -0
  9. package/src/commands/collab.js +341 -0
  10. package/src/commands/compliance.js +1035 -0
  11. package/src/commands/cowork.js +221 -0
  12. package/src/commands/crosschain.js +218 -0
  13. package/src/commands/dbevo.js +284 -0
  14. package/src/commands/dev.js +252 -0
  15. package/src/commands/did.js +358 -0
  16. package/src/commands/dlp.js +341 -0
  17. package/src/commands/encrypt.js +341 -0
  18. package/src/commands/evomap.js +394 -0
  19. package/src/commands/export.js +256 -1
  20. package/src/commands/federation.js +283 -0
  21. package/src/commands/fusion.js +258 -0
  22. package/src/commands/governance.js +325 -0
  23. package/src/commands/hardening.js +411 -0
  24. package/src/commands/hook.js +148 -0
  25. package/src/commands/import.js +252 -0
  26. package/src/commands/incentive.js +322 -0
  27. package/src/commands/inference.js +318 -0
  28. package/src/commands/infra.js +244 -0
  29. package/src/commands/instinct.js +260 -0
  30. package/src/commands/ipfs.js +318 -0
  31. package/src/commands/kg.js +387 -0
  32. package/src/commands/llm.js +263 -0
  33. package/src/commands/lowcode.js +356 -0
  34. package/src/commands/marketplace.js +256 -0
  35. package/src/commands/mcp.js +221 -0
  36. package/src/commands/memory.js +248 -0
  37. package/src/commands/multimodal.js +296 -0
  38. package/src/commands/nlprog.js +356 -0
  39. package/src/commands/note.js +244 -0
  40. package/src/commands/ops.js +354 -0
  41. package/src/commands/orchestrate.js +166 -0
  42. package/src/commands/org.js +277 -0
  43. package/src/commands/p2p.js +390 -0
  44. package/src/commands/perception.js +290 -0
  45. package/src/commands/permmem.js +251 -0
  46. package/src/commands/plugin-ecosystem.js +273 -0
  47. package/src/commands/pqc.js +393 -0
  48. package/src/commands/privacy.js +321 -0
  49. package/src/commands/quantization.js +351 -0
  50. package/src/commands/rcache.js +271 -0
  51. package/src/commands/recommend.js +340 -0
  52. package/src/commands/reputation.js +261 -0
  53. package/src/commands/runtime.js +307 -0
  54. package/src/commands/scim.js +262 -0
  55. package/src/commands/session.js +258 -0
  56. package/src/commands/siem.js +246 -0
  57. package/src/commands/skill.js +267 -1
  58. package/src/commands/sla.js +259 -0
  59. package/src/commands/social.js +256 -0
  60. package/src/commands/sso.js +186 -1
  61. package/src/commands/stress.js +230 -0
  62. package/src/commands/sync.js +256 -0
  63. package/src/commands/tech.js +338 -0
  64. package/src/commands/tenant.js +351 -0
  65. package/src/commands/terraform.js +245 -0
  66. package/src/commands/tokens.js +269 -0
  67. package/src/commands/trust.js +249 -0
  68. package/src/commands/wallet.js +277 -0
  69. package/src/commands/workflow.js +171 -0
  70. package/src/commands/zkp.js +335 -0
  71. package/src/index.js +4 -0
  72. package/src/lib/a2a-protocol.js +451 -0
  73. package/src/lib/agent-coordinator.js +325 -0
  74. package/src/lib/agent-network.js +387 -0
  75. package/src/lib/agent-router.js +395 -0
  76. package/src/lib/aiops.js +478 -0
  77. package/src/lib/app-builder.js +239 -0
  78. package/src/lib/audit-logger.js +379 -0
  79. package/src/lib/automation-engine.js +330 -0
  80. package/src/lib/autonomous-developer.js +350 -0
  81. package/src/lib/bi-engine.js +338 -0
  82. package/src/lib/code-agent.js +323 -0
  83. package/src/lib/collaboration-governance.js +364 -0
  84. package/src/lib/community-governance.js +436 -0
  85. package/src/lib/compliance-manager.js +434 -0
  86. package/src/lib/content-recommendation.js +469 -0
  87. package/src/lib/cross-chain.js +345 -0
  88. package/src/lib/crypto-manager.js +350 -0
  89. package/src/lib/dbevo.js +338 -0
  90. package/src/lib/decentral-infra.js +340 -0
  91. package/src/lib/did-manager.js +367 -0
  92. package/src/lib/dlp-engine.js +389 -0
  93. package/src/lib/evomap-federation.js +177 -0
  94. package/src/lib/evomap-governance.js +276 -0
  95. package/src/lib/federation-hardening.js +259 -0
  96. package/src/lib/hardening-manager.js +348 -0
  97. package/src/lib/hook-manager.js +380 -0
  98. package/src/lib/inference-network.js +330 -0
  99. package/src/lib/instinct-manager.js +332 -0
  100. package/src/lib/ipfs-storage.js +334 -0
  101. package/src/lib/knowledge-exporter.js +381 -0
  102. package/src/lib/knowledge-graph.js +432 -0
  103. package/src/lib/knowledge-importer.js +379 -0
  104. package/src/lib/llm-providers.js +391 -0
  105. package/src/lib/mcp-registry.js +333 -0
  106. package/src/lib/memory-manager.js +330 -0
  107. package/src/lib/multimodal.js +346 -0
  108. package/src/lib/nl-programming.js +343 -0
  109. package/src/lib/note-versioning.js +327 -0
  110. package/src/lib/org-manager.js +323 -0
  111. package/src/lib/p2p-manager.js +387 -0
  112. package/src/lib/perception.js +346 -0
  113. package/src/lib/perf-tuning.js +4 -1
  114. package/src/lib/permanent-memory.js +320 -0
  115. package/src/lib/plugin-ecosystem.js +377 -0
  116. package/src/lib/pqc-manager.js +368 -0
  117. package/src/lib/privacy-computing.js +427 -0
  118. package/src/lib/protocol-fusion.js +417 -0
  119. package/src/lib/quantization.js +325 -0
  120. package/src/lib/reputation-optimizer.js +299 -0
  121. package/src/lib/response-cache.js +327 -0
  122. package/src/lib/scim-manager.js +329 -0
  123. package/src/lib/session-manager.js +329 -0
  124. package/src/lib/siem-exporter.js +333 -0
  125. package/src/lib/skill-loader.js +377 -0
  126. package/src/lib/skill-marketplace.js +325 -0
  127. package/src/lib/sla-manager.js +275 -0
  128. package/src/lib/social-manager.js +326 -0
  129. package/src/lib/sso-manager.js +332 -0
  130. package/src/lib/stress-tester.js +330 -0
  131. package/src/lib/sync-manager.js +326 -0
  132. package/src/lib/tech-learning-engine.js +369 -0
  133. package/src/lib/tenant-saas.js +460 -0
  134. package/src/lib/terraform-manager.js +363 -0
  135. package/src/lib/threat-intel.js +335 -0
  136. package/src/lib/token-incentive.js +293 -0
  137. package/src/lib/token-tracker.js +329 -0
  138. package/src/lib/trust-security.js +390 -0
  139. package/src/lib/ueba.js +389 -0
  140. package/src/lib/universal-runtime.js +325 -0
  141. package/src/lib/wallet-manager.js +326 -0
  142. package/src/lib/workflow-engine.js +322 -0
  143. package/src/lib/zkp-engine.js +274 -0
@@ -16,6 +16,35 @@ import {
16
16
  verifyWithDID,
17
17
  exportIdentity,
18
18
  resolveDID,
19
+ IDENTITY_MATURITY_V2,
20
+ ISSUANCE_LIFECYCLE_V2,
21
+ getMaxActiveIdentitiesPerOwnerV2,
22
+ setMaxActiveIdentitiesPerOwnerV2,
23
+ getMaxPendingIssuancesPerIdentityV2,
24
+ setMaxPendingIssuancesPerIdentityV2,
25
+ getIdentityIdleMsV2,
26
+ setIdentityIdleMsV2,
27
+ getIssuanceStuckMsV2,
28
+ setIssuanceStuckMsV2,
29
+ registerIdentityV2,
30
+ getIdentityV2,
31
+ listIdentitiesV2,
32
+ activateIdentityV2,
33
+ suspendIdentityV2,
34
+ revokeIdentityV2,
35
+ touchIdentityV2,
36
+ createIssuanceV2,
37
+ getIssuanceV2,
38
+ listIssuancesV2,
39
+ startIssuanceV2,
40
+ completeIssuanceV2,
41
+ failIssuanceV2,
42
+ cancelIssuanceV2,
43
+ getActiveIdentityCountV2,
44
+ getPendingIssuanceCountV2,
45
+ autoSuspendIdleIdentitiesV2,
46
+ autoFailStuckIssuancesV2,
47
+ getDidManagerStatsV2,
19
48
  } from "../lib/did-manager.js";
20
49
 
21
50
  export function registerDidCommand(program) {
@@ -373,4 +402,333 @@ export function registerDidCommand(program) {
373
402
  process.exit(1);
374
403
  }
375
404
  });
405
+
406
+ // ===== V2 in-memory governance surface (no DB, no bootstrap) =====
407
+
408
+ did
409
+ .command("identity-maturities-v2")
410
+ .description("[V2] List identity maturity states")
411
+ .option("--json")
412
+ .action((o) => {
413
+ const s = Object.values(IDENTITY_MATURITY_V2);
414
+ if (o.json) console.log(JSON.stringify(s, null, 2));
415
+ else for (const v of s) logger.log(v);
416
+ });
417
+ did
418
+ .command("issuance-lifecycles-v2")
419
+ .description("[V2] List issuance lifecycle states")
420
+ .option("--json")
421
+ .action((o) => {
422
+ const s = Object.values(ISSUANCE_LIFECYCLE_V2);
423
+ if (o.json) console.log(JSON.stringify(s, null, 2));
424
+ else for (const v of s) logger.log(v);
425
+ });
426
+ did
427
+ .command("config-v2")
428
+ .description("[V2] Show governance config")
429
+ .option("--json")
430
+ .action((o) => {
431
+ const cfg = {
432
+ maxActiveIdentitiesPerOwner: getMaxActiveIdentitiesPerOwnerV2(),
433
+ maxPendingIssuancesPerIdentity: getMaxPendingIssuancesPerIdentityV2(),
434
+ identityIdleMs: getIdentityIdleMsV2(),
435
+ issuanceStuckMs: getIssuanceStuckMsV2(),
436
+ };
437
+ if (o.json) console.log(JSON.stringify(cfg, null, 2));
438
+ else for (const [k, v] of Object.entries(cfg)) logger.log(`${k}: ${v}`);
439
+ });
440
+ did
441
+ .command("set-max-active-identities-per-owner-v2 <n>")
442
+ .description("[V2] Set per-owner active identity cap")
443
+ .action((n) => {
444
+ try {
445
+ setMaxActiveIdentitiesPerOwnerV2(Number(n));
446
+ logger.success(`= ${getMaxActiveIdentitiesPerOwnerV2()}`);
447
+ } catch (e) {
448
+ logger.error(e.message);
449
+ process.exit(1);
450
+ }
451
+ });
452
+ did
453
+ .command("set-max-pending-issuances-per-identity-v2 <n>")
454
+ .description("[V2] Set per-identity pending issuance cap")
455
+ .action((n) => {
456
+ try {
457
+ setMaxPendingIssuancesPerIdentityV2(Number(n));
458
+ logger.success(`= ${getMaxPendingIssuancesPerIdentityV2()}`);
459
+ } catch (e) {
460
+ logger.error(e.message);
461
+ process.exit(1);
462
+ }
463
+ });
464
+ did
465
+ .command("set-identity-idle-ms-v2 <ms>")
466
+ .description("[V2] Set identity idle threshold (ms)")
467
+ .action((m) => {
468
+ try {
469
+ setIdentityIdleMsV2(Number(m));
470
+ logger.success(`= ${getIdentityIdleMsV2()}`);
471
+ } catch (e) {
472
+ logger.error(e.message);
473
+ process.exit(1);
474
+ }
475
+ });
476
+ did
477
+ .command("set-issuance-stuck-ms-v2 <ms>")
478
+ .description("[V2] Set issuance stuck threshold (ms)")
479
+ .action((m) => {
480
+ try {
481
+ setIssuanceStuckMsV2(Number(m));
482
+ logger.success(`= ${getIssuanceStuckMsV2()}`);
483
+ } catch (e) {
484
+ logger.error(e.message);
485
+ process.exit(1);
486
+ }
487
+ });
488
+
489
+ did
490
+ .command("register-identity-v2 <id>")
491
+ .description("[V2] Register a DID identity profile (PENDING)")
492
+ .requiredOption("-o, --owner <id>")
493
+ .requiredOption("-m, --method <method>")
494
+ .option("-d, --display-name <name>")
495
+ .action((id, o) => {
496
+ try {
497
+ const i = registerIdentityV2(id, {
498
+ ownerId: o.owner,
499
+ didMethod: o.method,
500
+ displayName: o.displayName,
501
+ });
502
+ logger.success(`identity ${i.id} registered (status=${i.status})`);
503
+ } catch (e) {
504
+ logger.error(e.message);
505
+ process.exit(1);
506
+ }
507
+ });
508
+ did
509
+ .command("activate-identity-v2 <id>")
510
+ .description("[V2] Activate identity (pending|suspended -> active)")
511
+ .action((id) => {
512
+ try {
513
+ activateIdentityV2(id);
514
+ logger.success(`identity ${id} active`);
515
+ } catch (e) {
516
+ logger.error(e.message);
517
+ process.exit(1);
518
+ }
519
+ });
520
+ did
521
+ .command("suspend-identity-v2 <id>")
522
+ .description("[V2] Suspend identity (active -> suspended)")
523
+ .action((id) => {
524
+ try {
525
+ suspendIdentityV2(id);
526
+ logger.success(`identity ${id} suspended`);
527
+ } catch (e) {
528
+ logger.error(e.message);
529
+ process.exit(1);
530
+ }
531
+ });
532
+ did
533
+ .command("revoke-identity-v2 <id>")
534
+ .description("[V2] Revoke identity (terminal)")
535
+ .action((id) => {
536
+ try {
537
+ revokeIdentityV2(id);
538
+ logger.success(`identity ${id} revoked`);
539
+ } catch (e) {
540
+ logger.error(e.message);
541
+ process.exit(1);
542
+ }
543
+ });
544
+ did
545
+ .command("touch-identity-v2 <id>")
546
+ .description("[V2] Bump identity lastSeenAt")
547
+ .action((id) => {
548
+ try {
549
+ touchIdentityV2(id);
550
+ logger.success(`identity ${id} touched`);
551
+ } catch (e) {
552
+ logger.error(e.message);
553
+ process.exit(1);
554
+ }
555
+ });
556
+ did
557
+ .command("get-identity-v2 <id>")
558
+ .description("[V2] Show identity profile")
559
+ .option("--json")
560
+ .action((id, o) => {
561
+ try {
562
+ const i = getIdentityV2(id);
563
+ if (!i) {
564
+ logger.info("identity not found");
565
+ return;
566
+ }
567
+ console.log(JSON.stringify(i, null, 2));
568
+ } catch (e) {
569
+ logger.error(e.message);
570
+ process.exit(1);
571
+ }
572
+ });
573
+ did
574
+ .command("list-identities-v2")
575
+ .description("[V2] List identity profiles")
576
+ .option("-o, --owner <id>")
577
+ .option("-s, --status <s>")
578
+ .option("-m, --method <method>")
579
+ .option("--json")
580
+ .action((o) => {
581
+ const list = listIdentitiesV2({
582
+ ownerId: o.owner,
583
+ status: o.status,
584
+ didMethod: o.method,
585
+ });
586
+ if (o.json) console.log(JSON.stringify(list, null, 2));
587
+ else
588
+ for (const i of list)
589
+ logger.log(`${i.id}\t${i.ownerId}\t${i.status}\t${i.didMethod}`);
590
+ });
591
+
592
+ did
593
+ .command("create-issuance-v2 <id>")
594
+ .description("[V2] Create a queued V2 issuance")
595
+ .requiredOption("-i, --identity <id>")
596
+ .requiredOption("-t, --type <ctype>")
597
+ .action((id, o) => {
598
+ try {
599
+ const j = createIssuanceV2(id, {
600
+ identityId: o.identity,
601
+ credentialType: o.type,
602
+ });
603
+ logger.success(
604
+ `issuance ${j.id} queued (identity=${j.identityId} type=${j.credentialType})`,
605
+ );
606
+ } catch (e) {
607
+ logger.error(e.message);
608
+ process.exit(1);
609
+ }
610
+ });
611
+ did
612
+ .command("start-issuance-v2 <id>")
613
+ .description("[V2] Start issuance (queued -> issuing)")
614
+ .action((id) => {
615
+ try {
616
+ startIssuanceV2(id);
617
+ logger.success(`issuance ${id} issuing`);
618
+ } catch (e) {
619
+ logger.error(e.message);
620
+ process.exit(1);
621
+ }
622
+ });
623
+ did
624
+ .command("complete-issuance-v2 <id>")
625
+ .description("[V2] Complete issuance (issuing -> issued)")
626
+ .action((id) => {
627
+ try {
628
+ completeIssuanceV2(id);
629
+ logger.success(`issuance ${id} issued`);
630
+ } catch (e) {
631
+ logger.error(e.message);
632
+ process.exit(1);
633
+ }
634
+ });
635
+ did
636
+ .command("fail-issuance-v2 <id>")
637
+ .description("[V2] Fail issuance (issuing -> failed)")
638
+ .action((id) => {
639
+ try {
640
+ failIssuanceV2(id);
641
+ logger.success(`issuance ${id} failed`);
642
+ } catch (e) {
643
+ logger.error(e.message);
644
+ process.exit(1);
645
+ }
646
+ });
647
+ did
648
+ .command("cancel-issuance-v2 <id>")
649
+ .description("[V2] Cancel issuance (queued|issuing -> cancelled)")
650
+ .action((id) => {
651
+ try {
652
+ cancelIssuanceV2(id);
653
+ logger.success(`issuance ${id} cancelled`);
654
+ } catch (e) {
655
+ logger.error(e.message);
656
+ process.exit(1);
657
+ }
658
+ });
659
+ did
660
+ .command("get-issuance-v2 <id>")
661
+ .description("[V2] Show issuance")
662
+ .option("--json")
663
+ .action((id, o) => {
664
+ try {
665
+ const j = getIssuanceV2(id);
666
+ if (!j) {
667
+ logger.info("issuance not found");
668
+ return;
669
+ }
670
+ console.log(JSON.stringify(j, null, 2));
671
+ } catch (e) {
672
+ logger.error(e.message);
673
+ process.exit(1);
674
+ }
675
+ });
676
+ did
677
+ .command("list-issuances-v2")
678
+ .description("[V2] List V2 issuances")
679
+ .option("-i, --identity <id>")
680
+ .option("-s, --status <s>")
681
+ .option("--json")
682
+ .action((o) => {
683
+ const list = listIssuancesV2({
684
+ identityId: o.identity,
685
+ status: o.status,
686
+ });
687
+ if (o.json) console.log(JSON.stringify(list, null, 2));
688
+ else
689
+ for (const j of list)
690
+ logger.log(
691
+ `${j.id}\t${j.identityId}\t${j.status}\t${j.credentialType}`,
692
+ );
693
+ });
694
+
695
+ did
696
+ .command("active-identity-count-v2")
697
+ .description("[V2] Count active identities (optional --owner)")
698
+ .option("-o, --owner <id>")
699
+ .action((o) => logger.log(String(getActiveIdentityCountV2(o.owner))));
700
+ did
701
+ .command("pending-issuance-count-v2")
702
+ .description("[V2] Count pending issuances (queued+issuing)")
703
+ .option("-i, --identity <id>")
704
+ .action((o) => logger.log(String(getPendingIssuanceCountV2(o.identity))));
705
+ did
706
+ .command("auto-suspend-idle-identities-v2")
707
+ .description("[V2] Suspend idle active identities")
708
+ .option("--now <ms>")
709
+ .option("--json")
710
+ .action((o) => {
711
+ const list = autoSuspendIdleIdentitiesV2(
712
+ o.now ? { now: Number(o.now) } : undefined,
713
+ );
714
+ if (o.json) console.log(JSON.stringify(list, null, 2));
715
+ else logger.success(`suspended ${list.length}`);
716
+ });
717
+ did
718
+ .command("auto-fail-stuck-issuances-v2")
719
+ .description("[V2] Fail stuck issuing")
720
+ .option("--now <ms>")
721
+ .option("--json")
722
+ .action((o) => {
723
+ const list = autoFailStuckIssuancesV2(
724
+ o.now ? { now: Number(o.now) } : undefined,
725
+ );
726
+ if (o.json) console.log(JSON.stringify(list, null, 2));
727
+ else logger.success(`failed ${list.length}`);
728
+ });
729
+ did
730
+ .command("stats-v2")
731
+ .description("[V2] Show governance stats")
732
+ .option("--json")
733
+ .action(() => console.log(JSON.stringify(getDidManagerStatsV2(), null, 2)));
376
734
  }