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
@@ -264,3 +264,429 @@ export function registerCliAnythingCommand(program) {
264
264
  }
265
265
  });
266
266
  }
267
+
268
+ // === Iter25 V2 governance overlay ===
269
+ export function registerClibgovV2Commands(program) {
270
+ const parent = program.commands.find((c) => c.name() === "cli-anything");
271
+ if (!parent) return;
272
+ const L = async () => await import("../lib/cli-anything-bridge.js");
273
+ parent
274
+ .command("clibgov-enums-v2")
275
+ .description("Show V2 enums")
276
+ .action(async () => {
277
+ const m = await L();
278
+ console.log(
279
+ JSON.stringify(
280
+ {
281
+ profileMaturity: m.CLIBGOV_PROFILE_MATURITY_V2,
282
+ bridgeLifecycle: m.CLIBGOV_BRIDGE_LIFECYCLE_V2,
283
+ },
284
+ null,
285
+ 2,
286
+ ),
287
+ );
288
+ });
289
+ parent
290
+ .command("clibgov-config-v2")
291
+ .description("Show V2 config")
292
+ .action(async () => {
293
+ const m = await L();
294
+ console.log(
295
+ JSON.stringify(
296
+ {
297
+ maxActive: m.getMaxActiveClibgovProfilesPerOwnerV2(),
298
+ maxPending: m.getMaxPendingClibgovBridgesPerProfileV2(),
299
+ idleMs: m.getClibgovProfileIdleMsV2(),
300
+ stuckMs: m.getClibgovBridgeStuckMsV2(),
301
+ },
302
+ null,
303
+ 2,
304
+ ),
305
+ );
306
+ });
307
+ parent
308
+ .command("clibgov-set-max-active-v2 <n>")
309
+ .description("Set max active")
310
+ .action(async (n) => {
311
+ (await L()).setMaxActiveClibgovProfilesPerOwnerV2(Number(n));
312
+ console.log("ok");
313
+ });
314
+ parent
315
+ .command("clibgov-set-max-pending-v2 <n>")
316
+ .description("Set max pending")
317
+ .action(async (n) => {
318
+ (await L()).setMaxPendingClibgovBridgesPerProfileV2(Number(n));
319
+ console.log("ok");
320
+ });
321
+ parent
322
+ .command("clibgov-set-idle-ms-v2 <n>")
323
+ .description("Set idle threshold ms")
324
+ .action(async (n) => {
325
+ (await L()).setClibgovProfileIdleMsV2(Number(n));
326
+ console.log("ok");
327
+ });
328
+ parent
329
+ .command("clibgov-set-stuck-ms-v2 <n>")
330
+ .description("Set stuck threshold ms")
331
+ .action(async (n) => {
332
+ (await L()).setClibgovBridgeStuckMsV2(Number(n));
333
+ console.log("ok");
334
+ });
335
+ parent
336
+ .command("clibgov-register-v2 <id> <owner>")
337
+ .description("Register V2 profile")
338
+ .option("--tool <v>", "tool")
339
+ .action(async (id, owner, o) => {
340
+ const m = await L();
341
+ console.log(
342
+ JSON.stringify(
343
+ m.registerClibgovProfileV2({ id, owner, tool: o.tool }),
344
+ null,
345
+ 2,
346
+ ),
347
+ );
348
+ });
349
+ parent
350
+ .command("clibgov-activate-v2 <id>")
351
+ .description("Activate profile")
352
+ .action(async (id) => {
353
+ console.log(
354
+ JSON.stringify((await L()).activateClibgovProfileV2(id), null, 2),
355
+ );
356
+ });
357
+ parent
358
+ .command("clibgov-degrade-v2 <id>")
359
+ .description("Degrade profile")
360
+ .action(async (id) => {
361
+ console.log(
362
+ JSON.stringify((await L()).degradeClibgovProfileV2(id), null, 2),
363
+ );
364
+ });
365
+ parent
366
+ .command("clibgov-archive-v2 <id>")
367
+ .description("Archive profile")
368
+ .action(async (id) => {
369
+ console.log(
370
+ JSON.stringify((await L()).archiveClibgovProfileV2(id), null, 2),
371
+ );
372
+ });
373
+ parent
374
+ .command("clibgov-touch-v2 <id>")
375
+ .description("Touch profile")
376
+ .action(async (id) => {
377
+ console.log(
378
+ JSON.stringify((await L()).touchClibgovProfileV2(id), null, 2),
379
+ );
380
+ });
381
+ parent
382
+ .command("clibgov-get-v2 <id>")
383
+ .description("Get profile")
384
+ .action(async (id) => {
385
+ console.log(JSON.stringify((await L()).getClibgovProfileV2(id), null, 2));
386
+ });
387
+ parent
388
+ .command("clibgov-list-v2")
389
+ .description("List profiles")
390
+ .action(async () => {
391
+ console.log(JSON.stringify((await L()).listClibgovProfilesV2(), null, 2));
392
+ });
393
+ parent
394
+ .command("clibgov-create-bridge-v2 <id> <profileId>")
395
+ .description("Create bridge")
396
+ .option("--command <v>", "command")
397
+ .action(async (id, profileId, o) => {
398
+ const m = await L();
399
+ console.log(
400
+ JSON.stringify(
401
+ m.createClibgovBridgeV2({ id, profileId, command: o.command }),
402
+ null,
403
+ 2,
404
+ ),
405
+ );
406
+ });
407
+ parent
408
+ .command("clibgov-bridging-bridge-v2 <id>")
409
+ .description("Mark bridge as bridging")
410
+ .action(async (id) => {
411
+ console.log(
412
+ JSON.stringify((await L()).bridgingClibgovBridgeV2(id), null, 2),
413
+ );
414
+ });
415
+ parent
416
+ .command("clibgov-complete-bridge-v2 <id>")
417
+ .description("Complete bridge")
418
+ .action(async (id) => {
419
+ console.log(
420
+ JSON.stringify((await L()).completeBridgeClibgovV2(id), null, 2),
421
+ );
422
+ });
423
+ parent
424
+ .command("clibgov-fail-bridge-v2 <id> [reason]")
425
+ .description("Fail bridge")
426
+ .action(async (id, reason) => {
427
+ console.log(
428
+ JSON.stringify((await L()).failClibgovBridgeV2(id, reason), null, 2),
429
+ );
430
+ });
431
+ parent
432
+ .command("clibgov-cancel-bridge-v2 <id> [reason]")
433
+ .description("Cancel bridge")
434
+ .action(async (id, reason) => {
435
+ console.log(
436
+ JSON.stringify((await L()).cancelClibgovBridgeV2(id, reason), null, 2),
437
+ );
438
+ });
439
+ parent
440
+ .command("clibgov-get-bridge-v2 <id>")
441
+ .description("Get bridge")
442
+ .action(async (id) => {
443
+ console.log(JSON.stringify((await L()).getClibgovBridgeV2(id), null, 2));
444
+ });
445
+ parent
446
+ .command("clibgov-list-bridges-v2")
447
+ .description("List bridges")
448
+ .action(async () => {
449
+ console.log(JSON.stringify((await L()).listClibgovBridgesV2(), null, 2));
450
+ });
451
+ parent
452
+ .command("clibgov-auto-degrade-idle-v2")
453
+ .description("Auto-degrade idle")
454
+ .action(async () => {
455
+ console.log(
456
+ JSON.stringify((await L()).autoDegradeIdleClibgovProfilesV2(), null, 2),
457
+ );
458
+ });
459
+ parent
460
+ .command("clibgov-auto-fail-stuck-v2")
461
+ .description("Auto-fail stuck bridges")
462
+ .action(async () => {
463
+ console.log(
464
+ JSON.stringify((await L()).autoFailStuckClibgovBridgesV2(), null, 2),
465
+ );
466
+ });
467
+ parent
468
+ .command("clibgov-gov-stats-v2")
469
+ .description("V2 gov stats")
470
+ .action(async () => {
471
+ console.log(
472
+ JSON.stringify((await L()).getCliAnythingBridgeGovStatsV2(), null, 2),
473
+ );
474
+ });
475
+ }
476
+
477
+ // === Iter26 V2 governance overlay ===
478
+ export function registerCtxenggovV2Commands(program) {
479
+ const parent = program.commands.find((c) => c.name() === "cli-anything");
480
+ if (!parent) return;
481
+ const L = async () => await import("../lib/cli-context-engineering.js");
482
+ parent
483
+ .command("ctxenggov-enums-v2")
484
+ .description("Show V2 enums")
485
+ .action(async () => {
486
+ const m = await L();
487
+ console.log(
488
+ JSON.stringify(
489
+ {
490
+ profileMaturity: m.CTXENGGOV_PROFILE_MATURITY_V2,
491
+ buildLifecycle: m.CTXENGGOV_BUILD_LIFECYCLE_V2,
492
+ },
493
+ null,
494
+ 2,
495
+ ),
496
+ );
497
+ });
498
+ parent
499
+ .command("ctxenggov-config-v2")
500
+ .description("Show V2 config")
501
+ .action(async () => {
502
+ const m = await L();
503
+ console.log(
504
+ JSON.stringify(
505
+ {
506
+ maxActive: m.getMaxActiveCtxenggovProfilesPerOwnerV2(),
507
+ maxPending: m.getMaxPendingCtxenggovBuildsPerProfileV2(),
508
+ idleMs: m.getCtxenggovProfileIdleMsV2(),
509
+ stuckMs: m.getCtxenggovBuildStuckMsV2(),
510
+ },
511
+ null,
512
+ 2,
513
+ ),
514
+ );
515
+ });
516
+ parent
517
+ .command("ctxenggov-set-max-active-v2 <n>")
518
+ .description("Set max active")
519
+ .action(async (n) => {
520
+ (await L()).setMaxActiveCtxenggovProfilesPerOwnerV2(Number(n));
521
+ console.log("ok");
522
+ });
523
+ parent
524
+ .command("ctxenggov-set-max-pending-v2 <n>")
525
+ .description("Set max pending")
526
+ .action(async (n) => {
527
+ (await L()).setMaxPendingCtxenggovBuildsPerProfileV2(Number(n));
528
+ console.log("ok");
529
+ });
530
+ parent
531
+ .command("ctxenggov-set-idle-ms-v2 <n>")
532
+ .description("Set idle threshold ms")
533
+ .action(async (n) => {
534
+ (await L()).setCtxenggovProfileIdleMsV2(Number(n));
535
+ console.log("ok");
536
+ });
537
+ parent
538
+ .command("ctxenggov-set-stuck-ms-v2 <n>")
539
+ .description("Set stuck threshold ms")
540
+ .action(async (n) => {
541
+ (await L()).setCtxenggovBuildStuckMsV2(Number(n));
542
+ console.log("ok");
543
+ });
544
+ parent
545
+ .command("ctxenggov-register-v2 <id> <owner>")
546
+ .description("Register V2 profile")
547
+ .option("--scope <v>", "scope")
548
+ .action(async (id, owner, o) => {
549
+ const m = await L();
550
+ console.log(
551
+ JSON.stringify(
552
+ m.registerCtxenggovProfileV2({ id, owner, scope: o.scope }),
553
+ null,
554
+ 2,
555
+ ),
556
+ );
557
+ });
558
+ parent
559
+ .command("ctxenggov-activate-v2 <id>")
560
+ .description("Activate profile")
561
+ .action(async (id) => {
562
+ console.log(
563
+ JSON.stringify((await L()).activateCtxenggovProfileV2(id), null, 2),
564
+ );
565
+ });
566
+ parent
567
+ .command("ctxenggov-stale-v2 <id>")
568
+ .description("Stale profile")
569
+ .action(async (id) => {
570
+ console.log(
571
+ JSON.stringify((await L()).staleCtxenggovProfileV2(id), null, 2),
572
+ );
573
+ });
574
+ parent
575
+ .command("ctxenggov-archive-v2 <id>")
576
+ .description("Archive profile")
577
+ .action(async (id) => {
578
+ console.log(
579
+ JSON.stringify((await L()).archiveCtxenggovProfileV2(id), null, 2),
580
+ );
581
+ });
582
+ parent
583
+ .command("ctxenggov-touch-v2 <id>")
584
+ .description("Touch profile")
585
+ .action(async (id) => {
586
+ console.log(
587
+ JSON.stringify((await L()).touchCtxenggovProfileV2(id), null, 2),
588
+ );
589
+ });
590
+ parent
591
+ .command("ctxenggov-get-v2 <id>")
592
+ .description("Get profile")
593
+ .action(async (id) => {
594
+ console.log(
595
+ JSON.stringify((await L()).getCtxenggovProfileV2(id), null, 2),
596
+ );
597
+ });
598
+ parent
599
+ .command("ctxenggov-list-v2")
600
+ .description("List profiles")
601
+ .action(async () => {
602
+ console.log(
603
+ JSON.stringify((await L()).listCtxenggovProfilesV2(), null, 2),
604
+ );
605
+ });
606
+ parent
607
+ .command("ctxenggov-create-build-v2 <id> <profileId>")
608
+ .description("Create build")
609
+ .option("--prompt <v>", "prompt")
610
+ .action(async (id, profileId, o) => {
611
+ const m = await L();
612
+ console.log(
613
+ JSON.stringify(
614
+ m.createCtxenggovBuildV2({ id, profileId, prompt: o.prompt }),
615
+ null,
616
+ 2,
617
+ ),
618
+ );
619
+ });
620
+ parent
621
+ .command("ctxenggov-building-build-v2 <id>")
622
+ .description("Mark build as building")
623
+ .action(async (id) => {
624
+ console.log(
625
+ JSON.stringify((await L()).buildingCtxenggovBuildV2(id), null, 2),
626
+ );
627
+ });
628
+ parent
629
+ .command("ctxenggov-complete-build-v2 <id>")
630
+ .description("Complete build")
631
+ .action(async (id) => {
632
+ console.log(
633
+ JSON.stringify((await L()).completeBuildCtxenggovV2(id), null, 2),
634
+ );
635
+ });
636
+ parent
637
+ .command("ctxenggov-fail-build-v2 <id> [reason]")
638
+ .description("Fail build")
639
+ .action(async (id, reason) => {
640
+ console.log(
641
+ JSON.stringify((await L()).failCtxenggovBuildV2(id, reason), null, 2),
642
+ );
643
+ });
644
+ parent
645
+ .command("ctxenggov-cancel-build-v2 <id> [reason]")
646
+ .description("Cancel build")
647
+ .action(async (id, reason) => {
648
+ console.log(
649
+ JSON.stringify((await L()).cancelCtxenggovBuildV2(id, reason), null, 2),
650
+ );
651
+ });
652
+ parent
653
+ .command("ctxenggov-get-build-v2 <id>")
654
+ .description("Get build")
655
+ .action(async (id) => {
656
+ console.log(JSON.stringify((await L()).getCtxenggovBuildV2(id), null, 2));
657
+ });
658
+ parent
659
+ .command("ctxenggov-list-builds-v2")
660
+ .description("List builds")
661
+ .action(async () => {
662
+ console.log(JSON.stringify((await L()).listCtxenggovBuildsV2(), null, 2));
663
+ });
664
+ parent
665
+ .command("ctxenggov-auto-stale-idle-v2")
666
+ .description("Auto-stale idle")
667
+ .action(async () => {
668
+ console.log(
669
+ JSON.stringify((await L()).autoStaleIdleCtxenggovProfilesV2(), null, 2),
670
+ );
671
+ });
672
+ parent
673
+ .command("ctxenggov-auto-fail-stuck-v2")
674
+ .description("Auto-fail stuck builds")
675
+ .action(async () => {
676
+ console.log(
677
+ JSON.stringify((await L()).autoFailStuckCtxenggovBuildsV2(), null, 2),
678
+ );
679
+ });
680
+ parent
681
+ .command("ctxenggov-gov-stats-v2")
682
+ .description("V2 gov stats")
683
+ .action(async () => {
684
+ console.log(
685
+ JSON.stringify(
686
+ (await L()).getCliContextEngineeringGovStatsV2(),
687
+ null,
688
+ 2,
689
+ ),
690
+ );
691
+ });
692
+ }