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
@@ -245,3 +245,608 @@ export function registerChatgovV2Commands(program) {
245
245
  console.log(JSON.stringify((await L()).getChatCoreGovStatsV2(), null, 2));
246
246
  });
247
247
  }
248
+
249
+ // === Iter26 V2 governance overlay ===
250
+ export function registerIagovV2Commands(program) {
251
+ const parent = program.commands.find((c) => c.name() === "chat");
252
+ if (!parent) return;
253
+ const L = async () => await import("../lib/interaction-adapter.js");
254
+ parent
255
+ .command("iagov-enums-v2")
256
+ .description("Show V2 enums")
257
+ .action(async () => {
258
+ const m = await L();
259
+ console.log(
260
+ JSON.stringify(
261
+ {
262
+ profileMaturity: m.IAGOV_PROFILE_MATURITY_V2,
263
+ turnLifecycle: m.IAGOV_TURN_LIFECYCLE_V2,
264
+ },
265
+ null,
266
+ 2,
267
+ ),
268
+ );
269
+ });
270
+ parent
271
+ .command("iagov-config-v2")
272
+ .description("Show V2 config")
273
+ .action(async () => {
274
+ const m = await L();
275
+ console.log(
276
+ JSON.stringify(
277
+ {
278
+ maxActive: m.getMaxActiveIagovProfilesPerOwnerV2(),
279
+ maxPending: m.getMaxPendingIagovTurnsPerProfileV2(),
280
+ idleMs: m.getIagovProfileIdleMsV2(),
281
+ stuckMs: m.getIagovTurnStuckMsV2(),
282
+ },
283
+ null,
284
+ 2,
285
+ ),
286
+ );
287
+ });
288
+ parent
289
+ .command("iagov-set-max-active-v2 <n>")
290
+ .description("Set max active")
291
+ .action(async (n) => {
292
+ (await L()).setMaxActiveIagovProfilesPerOwnerV2(Number(n));
293
+ console.log("ok");
294
+ });
295
+ parent
296
+ .command("iagov-set-max-pending-v2 <n>")
297
+ .description("Set max pending")
298
+ .action(async (n) => {
299
+ (await L()).setMaxPendingIagovTurnsPerProfileV2(Number(n));
300
+ console.log("ok");
301
+ });
302
+ parent
303
+ .command("iagov-set-idle-ms-v2 <n>")
304
+ .description("Set idle threshold ms")
305
+ .action(async (n) => {
306
+ (await L()).setIagovProfileIdleMsV2(Number(n));
307
+ console.log("ok");
308
+ });
309
+ parent
310
+ .command("iagov-set-stuck-ms-v2 <n>")
311
+ .description("Set stuck threshold ms")
312
+ .action(async (n) => {
313
+ (await L()).setIagovTurnStuckMsV2(Number(n));
314
+ console.log("ok");
315
+ });
316
+ parent
317
+ .command("iagov-register-v2 <id> <owner>")
318
+ .description("Register V2 profile")
319
+ .option("--adapter <v>", "adapter")
320
+ .action(async (id, owner, o) => {
321
+ const m = await L();
322
+ console.log(
323
+ JSON.stringify(
324
+ m.registerIagovProfileV2({ id, owner, adapter: o.adapter }),
325
+ null,
326
+ 2,
327
+ ),
328
+ );
329
+ });
330
+ parent
331
+ .command("iagov-activate-v2 <id>")
332
+ .description("Activate profile")
333
+ .action(async (id) => {
334
+ console.log(
335
+ JSON.stringify((await L()).activateIagovProfileV2(id), null, 2),
336
+ );
337
+ });
338
+ parent
339
+ .command("iagov-idle-v2 <id>")
340
+ .description("Idle profile")
341
+ .action(async (id) => {
342
+ console.log(JSON.stringify((await L()).idleIagovProfileV2(id), null, 2));
343
+ });
344
+ parent
345
+ .command("iagov-archive-v2 <id>")
346
+ .description("Archive profile")
347
+ .action(async (id) => {
348
+ console.log(
349
+ JSON.stringify((await L()).archiveIagovProfileV2(id), null, 2),
350
+ );
351
+ });
352
+ parent
353
+ .command("iagov-touch-v2 <id>")
354
+ .description("Touch profile")
355
+ .action(async (id) => {
356
+ console.log(JSON.stringify((await L()).touchIagovProfileV2(id), null, 2));
357
+ });
358
+ parent
359
+ .command("iagov-get-v2 <id>")
360
+ .description("Get profile")
361
+ .action(async (id) => {
362
+ console.log(JSON.stringify((await L()).getIagovProfileV2(id), null, 2));
363
+ });
364
+ parent
365
+ .command("iagov-list-v2")
366
+ .description("List profiles")
367
+ .action(async () => {
368
+ console.log(JSON.stringify((await L()).listIagovProfilesV2(), null, 2));
369
+ });
370
+ parent
371
+ .command("iagov-create-turn-v2 <id> <profileId>")
372
+ .description("Create turn")
373
+ .option("--input <v>", "input")
374
+ .action(async (id, profileId, o) => {
375
+ const m = await L();
376
+ console.log(
377
+ JSON.stringify(
378
+ m.createIagovTurnV2({ id, profileId, input: o.input }),
379
+ null,
380
+ 2,
381
+ ),
382
+ );
383
+ });
384
+ parent
385
+ .command("iagov-responding-turn-v2 <id>")
386
+ .description("Mark turn as responding")
387
+ .action(async (id) => {
388
+ console.log(
389
+ JSON.stringify((await L()).respondingIagovTurnV2(id), null, 2),
390
+ );
391
+ });
392
+ parent
393
+ .command("iagov-complete-turn-v2 <id>")
394
+ .description("Complete turn")
395
+ .action(async (id) => {
396
+ console.log(JSON.stringify((await L()).completeTurnIagovV2(id), null, 2));
397
+ });
398
+ parent
399
+ .command("iagov-fail-turn-v2 <id> [reason]")
400
+ .description("Fail turn")
401
+ .action(async (id, reason) => {
402
+ console.log(
403
+ JSON.stringify((await L()).failIagovTurnV2(id, reason), null, 2),
404
+ );
405
+ });
406
+ parent
407
+ .command("iagov-cancel-turn-v2 <id> [reason]")
408
+ .description("Cancel turn")
409
+ .action(async (id, reason) => {
410
+ console.log(
411
+ JSON.stringify((await L()).cancelIagovTurnV2(id, reason), null, 2),
412
+ );
413
+ });
414
+ parent
415
+ .command("iagov-get-turn-v2 <id>")
416
+ .description("Get turn")
417
+ .action(async (id) => {
418
+ console.log(JSON.stringify((await L()).getIagovTurnV2(id), null, 2));
419
+ });
420
+ parent
421
+ .command("iagov-list-turns-v2")
422
+ .description("List turns")
423
+ .action(async () => {
424
+ console.log(JSON.stringify((await L()).listIagovTurnsV2(), null, 2));
425
+ });
426
+ parent
427
+ .command("iagov-auto-idle-idle-v2")
428
+ .description("Auto-idle idle")
429
+ .action(async () => {
430
+ console.log(
431
+ JSON.stringify((await L()).autoIdleIdleIagovProfilesV2(), null, 2),
432
+ );
433
+ });
434
+ parent
435
+ .command("iagov-auto-fail-stuck-v2")
436
+ .description("Auto-fail stuck turns")
437
+ .action(async () => {
438
+ console.log(
439
+ JSON.stringify((await L()).autoFailStuckIagovTurnsV2(), null, 2),
440
+ );
441
+ });
442
+ parent
443
+ .command("iagov-gov-stats-v2")
444
+ .description("V2 gov stats")
445
+ .action(async () => {
446
+ console.log(
447
+ JSON.stringify((await L()).getInteractionAdapterGovStatsV2(), null, 2),
448
+ );
449
+ });
450
+ }
451
+
452
+ // === Iter27 V2 governance overlay ===
453
+ export function registerWscgovV2Commands(program) {
454
+ const parent = program.commands.find((c) => c.name() === "chat");
455
+ if (!parent) return;
456
+ const L = async () => await import("../lib/ws-chat-handler.js");
457
+ parent
458
+ .command("wscgov-enums-v2")
459
+ .description("Show V2 enums")
460
+ .action(async () => {
461
+ const m = await L();
462
+ console.log(
463
+ JSON.stringify(
464
+ {
465
+ profileMaturity: m.WSCGOV_PROFILE_MATURITY_V2,
466
+ msgLifecycle: m.WSCGOV_MSG_LIFECYCLE_V2,
467
+ },
468
+ null,
469
+ 2,
470
+ ),
471
+ );
472
+ });
473
+ parent
474
+ .command("wscgov-config-v2")
475
+ .description("Show V2 config")
476
+ .action(async () => {
477
+ const m = await L();
478
+ console.log(
479
+ JSON.stringify(
480
+ {
481
+ maxActive: m.getMaxActiveWscgovProfilesPerOwnerV2(),
482
+ maxPending: m.getMaxPendingWscgovMsgsPerProfileV2(),
483
+ idleMs: m.getWscgovProfileIdleMsV2(),
484
+ stuckMs: m.getWscgovMsgStuckMsV2(),
485
+ },
486
+ null,
487
+ 2,
488
+ ),
489
+ );
490
+ });
491
+ parent
492
+ .command("wscgov-set-max-active-v2 <n>")
493
+ .description("Set max active")
494
+ .action(async (n) => {
495
+ (await L()).setMaxActiveWscgovProfilesPerOwnerV2(Number(n));
496
+ console.log("ok");
497
+ });
498
+ parent
499
+ .command("wscgov-set-max-pending-v2 <n>")
500
+ .description("Set max pending")
501
+ .action(async (n) => {
502
+ (await L()).setMaxPendingWscgovMsgsPerProfileV2(Number(n));
503
+ console.log("ok");
504
+ });
505
+ parent
506
+ .command("wscgov-set-idle-ms-v2 <n>")
507
+ .description("Set idle threshold ms")
508
+ .action(async (n) => {
509
+ (await L()).setWscgovProfileIdleMsV2(Number(n));
510
+ console.log("ok");
511
+ });
512
+ parent
513
+ .command("wscgov-set-stuck-ms-v2 <n>")
514
+ .description("Set stuck threshold ms")
515
+ .action(async (n) => {
516
+ (await L()).setWscgovMsgStuckMsV2(Number(n));
517
+ console.log("ok");
518
+ });
519
+ parent
520
+ .command("wscgov-register-v2 <id> <owner>")
521
+ .description("Register V2 profile")
522
+ .option("--connection <v>", "connection")
523
+ .action(async (id, owner, o) => {
524
+ const m = await L();
525
+ console.log(
526
+ JSON.stringify(
527
+ m.registerWscgovProfileV2({ id, owner, connection: o.connection }),
528
+ null,
529
+ 2,
530
+ ),
531
+ );
532
+ });
533
+ parent
534
+ .command("wscgov-activate-v2 <id>")
535
+ .description("Activate profile")
536
+ .action(async (id) => {
537
+ console.log(
538
+ JSON.stringify((await L()).activateWscgovProfileV2(id), null, 2),
539
+ );
540
+ });
541
+ parent
542
+ .command("wscgov-idle-v2 <id>")
543
+ .description("Idle profile")
544
+ .action(async (id) => {
545
+ console.log(JSON.stringify((await L()).idleWscgovProfileV2(id), null, 2));
546
+ });
547
+ parent
548
+ .command("wscgov-archive-v2 <id>")
549
+ .description("Archive profile")
550
+ .action(async (id) => {
551
+ console.log(
552
+ JSON.stringify((await L()).archiveWscgovProfileV2(id), null, 2),
553
+ );
554
+ });
555
+ parent
556
+ .command("wscgov-touch-v2 <id>")
557
+ .description("Touch profile")
558
+ .action(async (id) => {
559
+ console.log(
560
+ JSON.stringify((await L()).touchWscgovProfileV2(id), null, 2),
561
+ );
562
+ });
563
+ parent
564
+ .command("wscgov-get-v2 <id>")
565
+ .description("Get profile")
566
+ .action(async (id) => {
567
+ console.log(JSON.stringify((await L()).getWscgovProfileV2(id), null, 2));
568
+ });
569
+ parent
570
+ .command("wscgov-list-v2")
571
+ .description("List profiles")
572
+ .action(async () => {
573
+ console.log(JSON.stringify((await L()).listWscgovProfilesV2(), null, 2));
574
+ });
575
+ parent
576
+ .command("wscgov-create-msg-v2 <id> <profileId>")
577
+ .description("Create msg")
578
+ .option("--payload <v>", "payload")
579
+ .action(async (id, profileId, o) => {
580
+ const m = await L();
581
+ console.log(
582
+ JSON.stringify(
583
+ m.createWscgovMsgV2({ id, profileId, payload: o.payload }),
584
+ null,
585
+ 2,
586
+ ),
587
+ );
588
+ });
589
+ parent
590
+ .command("wscgov-handling-msg-v2 <id>")
591
+ .description("Mark msg as handling")
592
+ .action(async (id) => {
593
+ console.log(JSON.stringify((await L()).handlingWscgovMsgV2(id), null, 2));
594
+ });
595
+ parent
596
+ .command("wscgov-complete-msg-v2 <id>")
597
+ .description("Complete msg")
598
+ .action(async (id) => {
599
+ console.log(JSON.stringify((await L()).completeMsgWscgovV2(id), null, 2));
600
+ });
601
+ parent
602
+ .command("wscgov-fail-msg-v2 <id> [reason]")
603
+ .description("Fail msg")
604
+ .action(async (id, reason) => {
605
+ console.log(
606
+ JSON.stringify((await L()).failWscgovMsgV2(id, reason), null, 2),
607
+ );
608
+ });
609
+ parent
610
+ .command("wscgov-cancel-msg-v2 <id> [reason]")
611
+ .description("Cancel msg")
612
+ .action(async (id, reason) => {
613
+ console.log(
614
+ JSON.stringify((await L()).cancelWscgovMsgV2(id, reason), null, 2),
615
+ );
616
+ });
617
+ parent
618
+ .command("wscgov-get-msg-v2 <id>")
619
+ .description("Get msg")
620
+ .action(async (id) => {
621
+ console.log(JSON.stringify((await L()).getWscgovMsgV2(id), null, 2));
622
+ });
623
+ parent
624
+ .command("wscgov-list-msgs-v2")
625
+ .description("List msgs")
626
+ .action(async () => {
627
+ console.log(JSON.stringify((await L()).listWscgovMsgsV2(), null, 2));
628
+ });
629
+ parent
630
+ .command("wscgov-auto-idle-idle-v2")
631
+ .description("Auto-idle idle")
632
+ .action(async () => {
633
+ console.log(
634
+ JSON.stringify((await L()).autoIdleIdleWscgovProfilesV2(), null, 2),
635
+ );
636
+ });
637
+ parent
638
+ .command("wscgov-auto-fail-stuck-v2")
639
+ .description("Auto-fail stuck msgs")
640
+ .action(async () => {
641
+ console.log(
642
+ JSON.stringify((await L()).autoFailStuckWscgovMsgsV2(), null, 2),
643
+ );
644
+ });
645
+ parent
646
+ .command("wscgov-gov-stats-v2")
647
+ .description("V2 gov stats")
648
+ .action(async () => {
649
+ console.log(
650
+ JSON.stringify((await L()).getWsChatHandlerGovStatsV2(), null, 2),
651
+ );
652
+ });
653
+ }
654
+
655
+ // === Iter28 V2 governance overlay: Ccoregov ===
656
+ export function registerCcoreV2Commands(program) {
657
+ const parent = program.commands.find((c) => c.name() === "chat");
658
+ if (!parent) return;
659
+ const L = async () => await import("../lib/chat-core.js");
660
+ parent
661
+ .command("ccoregov-enums-v2")
662
+ .description("Show V2 enums")
663
+ .action(async () => {
664
+ const m = await L();
665
+ console.log(
666
+ JSON.stringify(
667
+ {
668
+ profileMaturity: m.CCOREGOV_PROFILE_MATURITY_V2,
669
+ msgLifecycle: m.CCOREGOV_MSG_LIFECYCLE_V2,
670
+ },
671
+ null,
672
+ 2,
673
+ ),
674
+ );
675
+ });
676
+ parent
677
+ .command("ccoregov-config-v2")
678
+ .description("Show V2 config")
679
+ .action(async () => {
680
+ const m = await L();
681
+ console.log(
682
+ JSON.stringify(
683
+ {
684
+ maxActive: m.getMaxActiveCcoreProfilesPerOwnerV2(),
685
+ maxPending: m.getMaxPendingCcoreMsgsPerProfileV2(),
686
+ idleMs: m.getCcoreProfileIdleMsV2(),
687
+ stuckMs: m.getCcoreMsgStuckMsV2(),
688
+ },
689
+ null,
690
+ 2,
691
+ ),
692
+ );
693
+ });
694
+ parent
695
+ .command("ccoregov-set-max-active-v2 <n>")
696
+ .description("Set max active")
697
+ .action(async (n) => {
698
+ (await L()).setMaxActiveCcoreProfilesPerOwnerV2(Number(n));
699
+ console.log("ok");
700
+ });
701
+ parent
702
+ .command("ccoregov-set-max-pending-v2 <n>")
703
+ .description("Set max pending")
704
+ .action(async (n) => {
705
+ (await L()).setMaxPendingCcoreMsgsPerProfileV2(Number(n));
706
+ console.log("ok");
707
+ });
708
+ parent
709
+ .command("ccoregov-set-idle-ms-v2 <n>")
710
+ .description("Set idle threshold ms")
711
+ .action(async (n) => {
712
+ (await L()).setCcoreProfileIdleMsV2(Number(n));
713
+ console.log("ok");
714
+ });
715
+ parent
716
+ .command("ccoregov-set-stuck-ms-v2 <n>")
717
+ .description("Set stuck threshold ms")
718
+ .action(async (n) => {
719
+ (await L()).setCcoreMsgStuckMsV2(Number(n));
720
+ console.log("ok");
721
+ });
722
+ parent
723
+ .command("ccoregov-register-v2 <id> <owner>")
724
+ .description("Register V2 profile")
725
+ .option("--channel <v>", "channel")
726
+ .action(async (id, owner, o) => {
727
+ const m = await L();
728
+ console.log(
729
+ JSON.stringify(
730
+ m.registerCcoreProfileV2({ id, owner, channel: o.channel }),
731
+ null,
732
+ 2,
733
+ ),
734
+ );
735
+ });
736
+ parent
737
+ .command("ccoregov-activate-v2 <id>")
738
+ .description("Activate profile")
739
+ .action(async (id) => {
740
+ console.log(
741
+ JSON.stringify((await L()).activateCcoreProfileV2(id), null, 2),
742
+ );
743
+ });
744
+ parent
745
+ .command("ccoregov-idle-v2 <id>")
746
+ .description("Idle profile")
747
+ .action(async (id) => {
748
+ console.log(JSON.stringify((await L()).idleCcoreProfileV2(id), null, 2));
749
+ });
750
+ parent
751
+ .command("ccoregov-archive-v2 <id>")
752
+ .description("Archive profile")
753
+ .action(async (id) => {
754
+ console.log(
755
+ JSON.stringify((await L()).archiveCcoreProfileV2(id), null, 2),
756
+ );
757
+ });
758
+ parent
759
+ .command("ccoregov-touch-v2 <id>")
760
+ .description("Touch profile")
761
+ .action(async (id) => {
762
+ console.log(JSON.stringify((await L()).touchCcoreProfileV2(id), null, 2));
763
+ });
764
+ parent
765
+ .command("ccoregov-get-v2 <id>")
766
+ .description("Get profile")
767
+ .action(async (id) => {
768
+ console.log(JSON.stringify((await L()).getCcoreProfileV2(id), null, 2));
769
+ });
770
+ parent
771
+ .command("ccoregov-list-v2")
772
+ .description("List profiles")
773
+ .action(async () => {
774
+ console.log(JSON.stringify((await L()).listCcoreProfilesV2(), null, 2));
775
+ });
776
+ parent
777
+ .command("ccoregov-create-msg-v2 <id> <profileId>")
778
+ .description("Create msg")
779
+ .option("--messageId <v>", "messageId")
780
+ .action(async (id, profileId, o) => {
781
+ const m = await L();
782
+ console.log(
783
+ JSON.stringify(
784
+ m.createCcoreMsgV2({ id, profileId, messageId: o.messageId }),
785
+ null,
786
+ 2,
787
+ ),
788
+ );
789
+ });
790
+ parent
791
+ .command("ccoregov-sending-msg-v2 <id>")
792
+ .description("Mark msg as sending")
793
+ .action(async (id) => {
794
+ console.log(JSON.stringify((await L()).sendingCcoreMsgV2(id), null, 2));
795
+ });
796
+ parent
797
+ .command("ccoregov-complete-msg-v2 <id>")
798
+ .description("Complete msg")
799
+ .action(async (id) => {
800
+ console.log(JSON.stringify((await L()).completeMsgCcoreV2(id), null, 2));
801
+ });
802
+ parent
803
+ .command("ccoregov-fail-msg-v2 <id> [reason]")
804
+ .description("Fail msg")
805
+ .action(async (id, reason) => {
806
+ console.log(
807
+ JSON.stringify((await L()).failCcoreMsgV2(id, reason), null, 2),
808
+ );
809
+ });
810
+ parent
811
+ .command("ccoregov-cancel-msg-v2 <id> [reason]")
812
+ .description("Cancel msg")
813
+ .action(async (id, reason) => {
814
+ console.log(
815
+ JSON.stringify((await L()).cancelCcoreMsgV2(id, reason), null, 2),
816
+ );
817
+ });
818
+ parent
819
+ .command("ccoregov-get-msg-v2 <id>")
820
+ .description("Get msg")
821
+ .action(async (id) => {
822
+ console.log(JSON.stringify((await L()).getCcoreMsgV2(id), null, 2));
823
+ });
824
+ parent
825
+ .command("ccoregov-list-msgs-v2")
826
+ .description("List msgs")
827
+ .action(async () => {
828
+ console.log(JSON.stringify((await L()).listCcoreMsgsV2(), null, 2));
829
+ });
830
+ parent
831
+ .command("ccoregov-auto-idle-idle-v2")
832
+ .description("Auto-idle idle")
833
+ .action(async () => {
834
+ console.log(
835
+ JSON.stringify((await L()).autoIdleIdleCcoreProfilesV2(), null, 2),
836
+ );
837
+ });
838
+ parent
839
+ .command("ccoregov-auto-fail-stuck-v2")
840
+ .description("Auto-fail stuck msgs")
841
+ .action(async () => {
842
+ console.log(
843
+ JSON.stringify((await L()).autoFailStuckCcoreMsgsV2(), null, 2),
844
+ );
845
+ });
846
+ parent
847
+ .command("ccoregov-gov-stats-v2")
848
+ .description("V2 gov stats")
849
+ .action(async () => {
850
+ console.log(JSON.stringify((await L()).getCcoregovStatsV2(), null, 2));
851
+ });
852
+ }