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
@@ -2670,3 +2670,415 @@ export function registerUebgovV2Commands(program) {
2670
2670
  console.log(JSON.stringify((await L()).getUebaGovStatsV2(), null, 2));
2671
2671
  });
2672
2672
  }
2673
+
2674
+ // === Iter27 V2 governance overlay ===
2675
+ export function registerStixgovV2Commands(program) {
2676
+ const parent = program.commands.find((c) => c.name() === "compliance");
2677
+ if (!parent) return;
2678
+ const L = async () => await import("../lib/stix-parser.js");
2679
+ parent
2680
+ .command("stixgov-enums-v2")
2681
+ .description("Show V2 enums")
2682
+ .action(async () => {
2683
+ const m = await L();
2684
+ console.log(
2685
+ JSON.stringify(
2686
+ {
2687
+ profileMaturity: m.STIXGOV_PROFILE_MATURITY_V2,
2688
+ parseLifecycle: m.STIXGOV_PARSE_LIFECYCLE_V2,
2689
+ },
2690
+ null,
2691
+ 2,
2692
+ ),
2693
+ );
2694
+ });
2695
+ parent
2696
+ .command("stixgov-config-v2")
2697
+ .description("Show V2 config")
2698
+ .action(async () => {
2699
+ const m = await L();
2700
+ console.log(
2701
+ JSON.stringify(
2702
+ {
2703
+ maxActive: m.getMaxActiveStixgovProfilesPerOwnerV2(),
2704
+ maxPending: m.getMaxPendingStixgovParsesPerProfileV2(),
2705
+ idleMs: m.getStixgovProfileIdleMsV2(),
2706
+ stuckMs: m.getStixgovParseStuckMsV2(),
2707
+ },
2708
+ null,
2709
+ 2,
2710
+ ),
2711
+ );
2712
+ });
2713
+ parent
2714
+ .command("stixgov-set-max-active-v2 <n>")
2715
+ .description("Set max active")
2716
+ .action(async (n) => {
2717
+ (await L()).setMaxActiveStixgovProfilesPerOwnerV2(Number(n));
2718
+ console.log("ok");
2719
+ });
2720
+ parent
2721
+ .command("stixgov-set-max-pending-v2 <n>")
2722
+ .description("Set max pending")
2723
+ .action(async (n) => {
2724
+ (await L()).setMaxPendingStixgovParsesPerProfileV2(Number(n));
2725
+ console.log("ok");
2726
+ });
2727
+ parent
2728
+ .command("stixgov-set-idle-ms-v2 <n>")
2729
+ .description("Set idle threshold ms")
2730
+ .action(async (n) => {
2731
+ (await L()).setStixgovProfileIdleMsV2(Number(n));
2732
+ console.log("ok");
2733
+ });
2734
+ parent
2735
+ .command("stixgov-set-stuck-ms-v2 <n>")
2736
+ .description("Set stuck threshold ms")
2737
+ .action(async (n) => {
2738
+ (await L()).setStixgovParseStuckMsV2(Number(n));
2739
+ console.log("ok");
2740
+ });
2741
+ parent
2742
+ .command("stixgov-register-v2 <id> <owner>")
2743
+ .description("Register V2 profile")
2744
+ .option("--stixVersion <v>", "stixVersion")
2745
+ .action(async (id, owner, o) => {
2746
+ const m = await L();
2747
+ console.log(
2748
+ JSON.stringify(
2749
+ m.registerStixgovProfileV2({ id, owner, stixVersion: o.stixVersion }),
2750
+ null,
2751
+ 2,
2752
+ ),
2753
+ );
2754
+ });
2755
+ parent
2756
+ .command("stixgov-activate-v2 <id>")
2757
+ .description("Activate profile")
2758
+ .action(async (id) => {
2759
+ console.log(
2760
+ JSON.stringify((await L()).activateStixgovProfileV2(id), null, 2),
2761
+ );
2762
+ });
2763
+ parent
2764
+ .command("stixgov-stale-v2 <id>")
2765
+ .description("Stale profile")
2766
+ .action(async (id) => {
2767
+ console.log(
2768
+ JSON.stringify((await L()).staleStixgovProfileV2(id), null, 2),
2769
+ );
2770
+ });
2771
+ parent
2772
+ .command("stixgov-archive-v2 <id>")
2773
+ .description("Archive profile")
2774
+ .action(async (id) => {
2775
+ console.log(
2776
+ JSON.stringify((await L()).archiveStixgovProfileV2(id), null, 2),
2777
+ );
2778
+ });
2779
+ parent
2780
+ .command("stixgov-touch-v2 <id>")
2781
+ .description("Touch profile")
2782
+ .action(async (id) => {
2783
+ console.log(
2784
+ JSON.stringify((await L()).touchStixgovProfileV2(id), null, 2),
2785
+ );
2786
+ });
2787
+ parent
2788
+ .command("stixgov-get-v2 <id>")
2789
+ .description("Get profile")
2790
+ .action(async (id) => {
2791
+ console.log(JSON.stringify((await L()).getStixgovProfileV2(id), null, 2));
2792
+ });
2793
+ parent
2794
+ .command("stixgov-list-v2")
2795
+ .description("List profiles")
2796
+ .action(async () => {
2797
+ console.log(JSON.stringify((await L()).listStixgovProfilesV2(), null, 2));
2798
+ });
2799
+ parent
2800
+ .command("stixgov-create-parse-v2 <id> <profileId>")
2801
+ .description("Create parse")
2802
+ .option("--bundleId <v>", "bundleId")
2803
+ .action(async (id, profileId, o) => {
2804
+ const m = await L();
2805
+ console.log(
2806
+ JSON.stringify(
2807
+ m.createStixgovParseV2({ id, profileId, bundleId: o.bundleId }),
2808
+ null,
2809
+ 2,
2810
+ ),
2811
+ );
2812
+ });
2813
+ parent
2814
+ .command("stixgov-parsing-parse-v2 <id>")
2815
+ .description("Mark parse as parsing")
2816
+ .action(async (id) => {
2817
+ console.log(
2818
+ JSON.stringify((await L()).parsingStixgovParseV2(id), null, 2),
2819
+ );
2820
+ });
2821
+ parent
2822
+ .command("stixgov-complete-parse-v2 <id>")
2823
+ .description("Complete parse")
2824
+ .action(async (id) => {
2825
+ console.log(
2826
+ JSON.stringify((await L()).completeParseStixgovV2(id), null, 2),
2827
+ );
2828
+ });
2829
+ parent
2830
+ .command("stixgov-fail-parse-v2 <id> [reason]")
2831
+ .description("Fail parse")
2832
+ .action(async (id, reason) => {
2833
+ console.log(
2834
+ JSON.stringify((await L()).failStixgovParseV2(id, reason), null, 2),
2835
+ );
2836
+ });
2837
+ parent
2838
+ .command("stixgov-cancel-parse-v2 <id> [reason]")
2839
+ .description("Cancel parse")
2840
+ .action(async (id, reason) => {
2841
+ console.log(
2842
+ JSON.stringify((await L()).cancelStixgovParseV2(id, reason), null, 2),
2843
+ );
2844
+ });
2845
+ parent
2846
+ .command("stixgov-get-parse-v2 <id>")
2847
+ .description("Get parse")
2848
+ .action(async (id) => {
2849
+ console.log(JSON.stringify((await L()).getStixgovParseV2(id), null, 2));
2850
+ });
2851
+ parent
2852
+ .command("stixgov-list-parses-v2")
2853
+ .description("List parses")
2854
+ .action(async () => {
2855
+ console.log(JSON.stringify((await L()).listStixgovParsesV2(), null, 2));
2856
+ });
2857
+ parent
2858
+ .command("stixgov-auto-stale-idle-v2")
2859
+ .description("Auto-stale idle")
2860
+ .action(async () => {
2861
+ console.log(
2862
+ JSON.stringify((await L()).autoStaleIdleStixgovProfilesV2(), null, 2),
2863
+ );
2864
+ });
2865
+ parent
2866
+ .command("stixgov-auto-fail-stuck-v2")
2867
+ .description("Auto-fail stuck parses")
2868
+ .action(async () => {
2869
+ console.log(
2870
+ JSON.stringify((await L()).autoFailStuckStixgovParsesV2(), null, 2),
2871
+ );
2872
+ });
2873
+ parent
2874
+ .command("stixgov-gov-stats-v2")
2875
+ .description("V2 gov stats")
2876
+ .action(async () => {
2877
+ console.log(
2878
+ JSON.stringify((await L()).getStixParserGovStatsV2(), null, 2),
2879
+ );
2880
+ });
2881
+ }
2882
+
2883
+ // === Iter28 V2 governance overlay: Cmpmgov ===
2884
+ export function registerCmpmV2Commands(program) {
2885
+ const parent = program.commands.find((c) => c.name() === "compliance");
2886
+ if (!parent) return;
2887
+ const L = async () => await import("../lib/compliance-manager.js");
2888
+ parent
2889
+ .command("cmpmgov-enums-v2")
2890
+ .description("Show V2 enums")
2891
+ .action(async () => {
2892
+ const m = await L();
2893
+ console.log(
2894
+ JSON.stringify(
2895
+ {
2896
+ profileMaturity: m.CMPMGOV_PROFILE_MATURITY_V2,
2897
+ reportLifecycle: m.CMPMGOV_REPORT_LIFECYCLE_V2,
2898
+ },
2899
+ null,
2900
+ 2,
2901
+ ),
2902
+ );
2903
+ });
2904
+ parent
2905
+ .command("cmpmgov-config-v2")
2906
+ .description("Show V2 config")
2907
+ .action(async () => {
2908
+ const m = await L();
2909
+ console.log(
2910
+ JSON.stringify(
2911
+ {
2912
+ maxActive: m.getMaxActiveCmpmProfilesPerOwnerV2(),
2913
+ maxPending: m.getMaxPendingCmpmReportsPerProfileV2(),
2914
+ idleMs: m.getCmpmProfileIdleMsV2(),
2915
+ stuckMs: m.getCmpmReportStuckMsV2(),
2916
+ },
2917
+ null,
2918
+ 2,
2919
+ ),
2920
+ );
2921
+ });
2922
+ parent
2923
+ .command("cmpmgov-set-max-active-v2 <n>")
2924
+ .description("Set max active")
2925
+ .action(async (n) => {
2926
+ (await L()).setMaxActiveCmpmProfilesPerOwnerV2(Number(n));
2927
+ console.log("ok");
2928
+ });
2929
+ parent
2930
+ .command("cmpmgov-set-max-pending-v2 <n>")
2931
+ .description("Set max pending")
2932
+ .action(async (n) => {
2933
+ (await L()).setMaxPendingCmpmReportsPerProfileV2(Number(n));
2934
+ console.log("ok");
2935
+ });
2936
+ parent
2937
+ .command("cmpmgov-set-idle-ms-v2 <n>")
2938
+ .description("Set idle threshold ms")
2939
+ .action(async (n) => {
2940
+ (await L()).setCmpmProfileIdleMsV2(Number(n));
2941
+ console.log("ok");
2942
+ });
2943
+ parent
2944
+ .command("cmpmgov-set-stuck-ms-v2 <n>")
2945
+ .description("Set stuck threshold ms")
2946
+ .action(async (n) => {
2947
+ (await L()).setCmpmReportStuckMsV2(Number(n));
2948
+ console.log("ok");
2949
+ });
2950
+ parent
2951
+ .command("cmpmgov-register-v2 <id> <owner>")
2952
+ .description("Register V2 profile")
2953
+ .option("--framework <v>", "framework")
2954
+ .action(async (id, owner, o) => {
2955
+ const m = await L();
2956
+ console.log(
2957
+ JSON.stringify(
2958
+ m.registerCmpmProfileV2({ id, owner, framework: o.framework }),
2959
+ null,
2960
+ 2,
2961
+ ),
2962
+ );
2963
+ });
2964
+ parent
2965
+ .command("cmpmgov-activate-v2 <id>")
2966
+ .description("Activate profile")
2967
+ .action(async (id) => {
2968
+ console.log(
2969
+ JSON.stringify((await L()).activateCmpmProfileV2(id), null, 2),
2970
+ );
2971
+ });
2972
+ parent
2973
+ .command("cmpmgov-stale-v2 <id>")
2974
+ .description("Stale profile")
2975
+ .action(async (id) => {
2976
+ console.log(JSON.stringify((await L()).staleCmpmProfileV2(id), null, 2));
2977
+ });
2978
+ parent
2979
+ .command("cmpmgov-archive-v2 <id>")
2980
+ .description("Archive profile")
2981
+ .action(async (id) => {
2982
+ console.log(
2983
+ JSON.stringify((await L()).archiveCmpmProfileV2(id), null, 2),
2984
+ );
2985
+ });
2986
+ parent
2987
+ .command("cmpmgov-touch-v2 <id>")
2988
+ .description("Touch profile")
2989
+ .action(async (id) => {
2990
+ console.log(JSON.stringify((await L()).touchCmpmProfileV2(id), null, 2));
2991
+ });
2992
+ parent
2993
+ .command("cmpmgov-get-v2 <id>")
2994
+ .description("Get profile")
2995
+ .action(async (id) => {
2996
+ console.log(JSON.stringify((await L()).getCmpmProfileV2(id), null, 2));
2997
+ });
2998
+ parent
2999
+ .command("cmpmgov-list-v2")
3000
+ .description("List profiles")
3001
+ .action(async () => {
3002
+ console.log(JSON.stringify((await L()).listCmpmProfilesV2(), null, 2));
3003
+ });
3004
+ parent
3005
+ .command("cmpmgov-create-report-v2 <id> <profileId>")
3006
+ .description("Create report")
3007
+ .option("--reportId <v>", "reportId")
3008
+ .action(async (id, profileId, o) => {
3009
+ const m = await L();
3010
+ console.log(
3011
+ JSON.stringify(
3012
+ m.createCmpmReportV2({ id, profileId, reportId: o.reportId }),
3013
+ null,
3014
+ 2,
3015
+ ),
3016
+ );
3017
+ });
3018
+ parent
3019
+ .command("cmpmgov-reporting-report-v2 <id>")
3020
+ .description("Mark report as reporting")
3021
+ .action(async (id) => {
3022
+ console.log(
3023
+ JSON.stringify((await L()).reportingCmpmReportV2(id), null, 2),
3024
+ );
3025
+ });
3026
+ parent
3027
+ .command("cmpmgov-complete-report-v2 <id>")
3028
+ .description("Complete report")
3029
+ .action(async (id) => {
3030
+ console.log(
3031
+ JSON.stringify((await L()).completeReportCmpmV2(id), null, 2),
3032
+ );
3033
+ });
3034
+ parent
3035
+ .command("cmpmgov-fail-report-v2 <id> [reason]")
3036
+ .description("Fail report")
3037
+ .action(async (id, reason) => {
3038
+ console.log(
3039
+ JSON.stringify((await L()).failCmpmReportV2(id, reason), null, 2),
3040
+ );
3041
+ });
3042
+ parent
3043
+ .command("cmpmgov-cancel-report-v2 <id> [reason]")
3044
+ .description("Cancel report")
3045
+ .action(async (id, reason) => {
3046
+ console.log(
3047
+ JSON.stringify((await L()).cancelCmpmReportV2(id, reason), null, 2),
3048
+ );
3049
+ });
3050
+ parent
3051
+ .command("cmpmgov-get-report-v2 <id>")
3052
+ .description("Get report")
3053
+ .action(async (id) => {
3054
+ console.log(JSON.stringify((await L()).getCmpmReportV2(id), null, 2));
3055
+ });
3056
+ parent
3057
+ .command("cmpmgov-list-reports-v2")
3058
+ .description("List reports")
3059
+ .action(async () => {
3060
+ console.log(JSON.stringify((await L()).listCmpmReportsV2(), null, 2));
3061
+ });
3062
+ parent
3063
+ .command("cmpmgov-auto-stale-idle-v2")
3064
+ .description("Auto-stale idle")
3065
+ .action(async () => {
3066
+ console.log(
3067
+ JSON.stringify((await L()).autoStaleIdleCmpmProfilesV2(), null, 2),
3068
+ );
3069
+ });
3070
+ parent
3071
+ .command("cmpmgov-auto-fail-stuck-v2")
3072
+ .description("Auto-fail stuck reports")
3073
+ .action(async () => {
3074
+ console.log(
3075
+ JSON.stringify((await L()).autoFailStuckCmpmReportsV2(), null, 2),
3076
+ );
3077
+ });
3078
+ parent
3079
+ .command("cmpmgov-gov-stats-v2")
3080
+ .description("V2 gov stats")
3081
+ .action(async () => {
3082
+ console.log(JSON.stringify((await L()).getCmpmgovStatsV2(), null, 2));
3083
+ });
3084
+ }
@@ -214,3 +214,216 @@ function printConfig(obj, indent = "") {
214
214
  }
215
215
  }
216
216
  }
217
+
218
+ // === Iter27 V2 governance overlay ===
219
+ export function registerScsgovV2Commands(program) {
220
+ const parent = program.commands.find((c) => c.name() === "config");
221
+ if (!parent) return;
222
+ const L = async () => await import("../lib/session-core-singletons.js");
223
+ parent
224
+ .command("scsgov-enums-v2")
225
+ .description("Show V2 enums")
226
+ .action(async () => {
227
+ const m = await L();
228
+ console.log(
229
+ JSON.stringify(
230
+ {
231
+ profileMaturity: m.SCSGOV_PROFILE_MATURITY_V2,
232
+ accessLifecycle: m.SCSGOV_ACCESS_LIFECYCLE_V2,
233
+ },
234
+ null,
235
+ 2,
236
+ ),
237
+ );
238
+ });
239
+ parent
240
+ .command("scsgov-config-v2")
241
+ .description("Show V2 config")
242
+ .action(async () => {
243
+ const m = await L();
244
+ console.log(
245
+ JSON.stringify(
246
+ {
247
+ maxActive: m.getMaxActiveScsgovProfilesPerOwnerV2(),
248
+ maxPending: m.getMaxPendingScsgovAccesssPerProfileV2(),
249
+ idleMs: m.getScsgovProfileIdleMsV2(),
250
+ stuckMs: m.getScsgovAccessStuckMsV2(),
251
+ },
252
+ null,
253
+ 2,
254
+ ),
255
+ );
256
+ });
257
+ parent
258
+ .command("scsgov-set-max-active-v2 <n>")
259
+ .description("Set max active")
260
+ .action(async (n) => {
261
+ (await L()).setMaxActiveScsgovProfilesPerOwnerV2(Number(n));
262
+ console.log("ok");
263
+ });
264
+ parent
265
+ .command("scsgov-set-max-pending-v2 <n>")
266
+ .description("Set max pending")
267
+ .action(async (n) => {
268
+ (await L()).setMaxPendingScsgovAccesssPerProfileV2(Number(n));
269
+ console.log("ok");
270
+ });
271
+ parent
272
+ .command("scsgov-set-idle-ms-v2 <n>")
273
+ .description("Set idle threshold ms")
274
+ .action(async (n) => {
275
+ (await L()).setScsgovProfileIdleMsV2(Number(n));
276
+ console.log("ok");
277
+ });
278
+ parent
279
+ .command("scsgov-set-stuck-ms-v2 <n>")
280
+ .description("Set stuck threshold ms")
281
+ .action(async (n) => {
282
+ (await L()).setScsgovAccessStuckMsV2(Number(n));
283
+ console.log("ok");
284
+ });
285
+ parent
286
+ .command("scsgov-register-v2 <id> <owner>")
287
+ .description("Register V2 profile")
288
+ .option("--component <v>", "component")
289
+ .action(async (id, owner, o) => {
290
+ const m = await L();
291
+ console.log(
292
+ JSON.stringify(
293
+ m.registerScsgovProfileV2({ id, owner, component: o.component }),
294
+ null,
295
+ 2,
296
+ ),
297
+ );
298
+ });
299
+ parent
300
+ .command("scsgov-activate-v2 <id>")
301
+ .description("Activate profile")
302
+ .action(async (id) => {
303
+ console.log(
304
+ JSON.stringify((await L()).activateScsgovProfileV2(id), null, 2),
305
+ );
306
+ });
307
+ parent
308
+ .command("scsgov-stale-v2 <id>")
309
+ .description("Stale profile")
310
+ .action(async (id) => {
311
+ console.log(
312
+ JSON.stringify((await L()).staleScsgovProfileV2(id), null, 2),
313
+ );
314
+ });
315
+ parent
316
+ .command("scsgov-archive-v2 <id>")
317
+ .description("Archive profile")
318
+ .action(async (id) => {
319
+ console.log(
320
+ JSON.stringify((await L()).archiveScsgovProfileV2(id), null, 2),
321
+ );
322
+ });
323
+ parent
324
+ .command("scsgov-touch-v2 <id>")
325
+ .description("Touch profile")
326
+ .action(async (id) => {
327
+ console.log(
328
+ JSON.stringify((await L()).touchScsgovProfileV2(id), null, 2),
329
+ );
330
+ });
331
+ parent
332
+ .command("scsgov-get-v2 <id>")
333
+ .description("Get profile")
334
+ .action(async (id) => {
335
+ console.log(JSON.stringify((await L()).getScsgovProfileV2(id), null, 2));
336
+ });
337
+ parent
338
+ .command("scsgov-list-v2")
339
+ .description("List profiles")
340
+ .action(async () => {
341
+ console.log(JSON.stringify((await L()).listScsgovProfilesV2(), null, 2));
342
+ });
343
+ parent
344
+ .command("scsgov-create-access-v2 <id> <profileId>")
345
+ .description("Create access")
346
+ .option("--caller <v>", "caller")
347
+ .action(async (id, profileId, o) => {
348
+ const m = await L();
349
+ console.log(
350
+ JSON.stringify(
351
+ m.createScsgovAccessV2({ id, profileId, caller: o.caller }),
352
+ null,
353
+ 2,
354
+ ),
355
+ );
356
+ });
357
+ parent
358
+ .command("scsgov-resolving-access-v2 <id>")
359
+ .description("Mark access as resolving")
360
+ .action(async (id) => {
361
+ console.log(
362
+ JSON.stringify((await L()).resolvingScsgovAccessV2(id), null, 2),
363
+ );
364
+ });
365
+ parent
366
+ .command("scsgov-complete-access-v2 <id>")
367
+ .description("Complete access")
368
+ .action(async (id) => {
369
+ console.log(
370
+ JSON.stringify((await L()).completeAccessScsgovV2(id), null, 2),
371
+ );
372
+ });
373
+ parent
374
+ .command("scsgov-fail-access-v2 <id> [reason]")
375
+ .description("Fail access")
376
+ .action(async (id, reason) => {
377
+ console.log(
378
+ JSON.stringify((await L()).failScsgovAccessV2(id, reason), null, 2),
379
+ );
380
+ });
381
+ parent
382
+ .command("scsgov-cancel-access-v2 <id> [reason]")
383
+ .description("Cancel access")
384
+ .action(async (id, reason) => {
385
+ console.log(
386
+ JSON.stringify((await L()).cancelScsgovAccessV2(id, reason), null, 2),
387
+ );
388
+ });
389
+ parent
390
+ .command("scsgov-get-access-v2 <id>")
391
+ .description("Get access")
392
+ .action(async (id) => {
393
+ console.log(JSON.stringify((await L()).getScsgovAccessV2(id), null, 2));
394
+ });
395
+ parent
396
+ .command("scsgov-list-accesss-v2")
397
+ .description("List accesss")
398
+ .action(async () => {
399
+ console.log(JSON.stringify((await L()).listScsgovAccesssV2(), null, 2));
400
+ });
401
+ parent
402
+ .command("scsgov-auto-stale-idle-v2")
403
+ .description("Auto-stale idle")
404
+ .action(async () => {
405
+ console.log(
406
+ JSON.stringify((await L()).autoStaleIdleScsgovProfilesV2(), null, 2),
407
+ );
408
+ });
409
+ parent
410
+ .command("scsgov-auto-fail-stuck-v2")
411
+ .description("Auto-fail stuck accesss")
412
+ .action(async () => {
413
+ console.log(
414
+ JSON.stringify((await L()).autoFailStuckScsgovAccesssV2(), null, 2),
415
+ );
416
+ });
417
+ parent
418
+ .command("scsgov-gov-stats-v2")
419
+ .description("V2 gov stats")
420
+ .action(async () => {
421
+ console.log(
422
+ JSON.stringify(
423
+ (await L()).getSessionCoreSingletonsGovStatsV2(),
424
+ null,
425
+ 2,
426
+ ),
427
+ );
428
+ });
429
+ }