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
@@ -152,3 +152,429 @@ export function registerPlanModeCommand(program) {
152
152
  console.log(JSON.stringify({ ok: true }, null, 2));
153
153
  });
154
154
  }
155
+
156
+ // === Iter26 V2 governance overlay ===
157
+ export function registerPlannergovV2Commands(program) {
158
+ const parent = program.commands.find((c) => c.name() === "planmode");
159
+ if (!parent) return;
160
+ const L = async () => await import("../lib/interactive-planner.js");
161
+ parent
162
+ .command("plannergov-enums-v2")
163
+ .description("Show V2 enums")
164
+ .action(async () => {
165
+ const m = await L();
166
+ console.log(
167
+ JSON.stringify(
168
+ {
169
+ profileMaturity: m.PLANNERGOV_PROFILE_MATURITY_V2,
170
+ promptLifecycle: m.PLANNERGOV_PROMPT_LIFECYCLE_V2,
171
+ },
172
+ null,
173
+ 2,
174
+ ),
175
+ );
176
+ });
177
+ parent
178
+ .command("plannergov-config-v2")
179
+ .description("Show V2 config")
180
+ .action(async () => {
181
+ const m = await L();
182
+ console.log(
183
+ JSON.stringify(
184
+ {
185
+ maxActive: m.getMaxActivePlannergovProfilesPerOwnerV2(),
186
+ maxPending: m.getMaxPendingPlannergovPromptsPerProfileV2(),
187
+ idleMs: m.getPlannergovProfileIdleMsV2(),
188
+ stuckMs: m.getPlannergovPromptStuckMsV2(),
189
+ },
190
+ null,
191
+ 2,
192
+ ),
193
+ );
194
+ });
195
+ parent
196
+ .command("plannergov-set-max-active-v2 <n>")
197
+ .description("Set max active")
198
+ .action(async (n) => {
199
+ (await L()).setMaxActivePlannergovProfilesPerOwnerV2(Number(n));
200
+ console.log("ok");
201
+ });
202
+ parent
203
+ .command("plannergov-set-max-pending-v2 <n>")
204
+ .description("Set max pending")
205
+ .action(async (n) => {
206
+ (await L()).setMaxPendingPlannergovPromptsPerProfileV2(Number(n));
207
+ console.log("ok");
208
+ });
209
+ parent
210
+ .command("plannergov-set-idle-ms-v2 <n>")
211
+ .description("Set idle threshold ms")
212
+ .action(async (n) => {
213
+ (await L()).setPlannergovProfileIdleMsV2(Number(n));
214
+ console.log("ok");
215
+ });
216
+ parent
217
+ .command("plannergov-set-stuck-ms-v2 <n>")
218
+ .description("Set stuck threshold ms")
219
+ .action(async (n) => {
220
+ (await L()).setPlannergovPromptStuckMsV2(Number(n));
221
+ console.log("ok");
222
+ });
223
+ parent
224
+ .command("plannergov-register-v2 <id> <owner>")
225
+ .description("Register V2 profile")
226
+ .option("--persona <v>", "persona")
227
+ .action(async (id, owner, o) => {
228
+ const m = await L();
229
+ console.log(
230
+ JSON.stringify(
231
+ m.registerPlannergovProfileV2({ id, owner, persona: o.persona }),
232
+ null,
233
+ 2,
234
+ ),
235
+ );
236
+ });
237
+ parent
238
+ .command("plannergov-activate-v2 <id>")
239
+ .description("Activate profile")
240
+ .action(async (id) => {
241
+ console.log(
242
+ JSON.stringify((await L()).activatePlannergovProfileV2(id), null, 2),
243
+ );
244
+ });
245
+ parent
246
+ .command("plannergov-pause-v2 <id>")
247
+ .description("Pause profile")
248
+ .action(async (id) => {
249
+ console.log(
250
+ JSON.stringify((await L()).pausePlannergovProfileV2(id), null, 2),
251
+ );
252
+ });
253
+ parent
254
+ .command("plannergov-archive-v2 <id>")
255
+ .description("Archive profile")
256
+ .action(async (id) => {
257
+ console.log(
258
+ JSON.stringify((await L()).archivePlannergovProfileV2(id), null, 2),
259
+ );
260
+ });
261
+ parent
262
+ .command("plannergov-touch-v2 <id>")
263
+ .description("Touch profile")
264
+ .action(async (id) => {
265
+ console.log(
266
+ JSON.stringify((await L()).touchPlannergovProfileV2(id), null, 2),
267
+ );
268
+ });
269
+ parent
270
+ .command("plannergov-get-v2 <id>")
271
+ .description("Get profile")
272
+ .action(async (id) => {
273
+ console.log(
274
+ JSON.stringify((await L()).getPlannergovProfileV2(id), null, 2),
275
+ );
276
+ });
277
+ parent
278
+ .command("plannergov-list-v2")
279
+ .description("List profiles")
280
+ .action(async () => {
281
+ console.log(
282
+ JSON.stringify((await L()).listPlannergovProfilesV2(), null, 2),
283
+ );
284
+ });
285
+ parent
286
+ .command("plannergov-create-prompt-v2 <id> <profileId>")
287
+ .description("Create prompt")
288
+ .option("--question <v>", "question")
289
+ .action(async (id, profileId, o) => {
290
+ const m = await L();
291
+ console.log(
292
+ JSON.stringify(
293
+ m.createPlannergovPromptV2({ id, profileId, question: o.question }),
294
+ null,
295
+ 2,
296
+ ),
297
+ );
298
+ });
299
+ parent
300
+ .command("plannergov-asking-prompt-v2 <id>")
301
+ .description("Mark prompt as asking")
302
+ .action(async (id) => {
303
+ console.log(
304
+ JSON.stringify((await L()).askingPlannergovPromptV2(id), null, 2),
305
+ );
306
+ });
307
+ parent
308
+ .command("plannergov-complete-prompt-v2 <id>")
309
+ .description("Complete prompt")
310
+ .action(async (id) => {
311
+ console.log(
312
+ JSON.stringify((await L()).completePromptPlannergovV2(id), null, 2),
313
+ );
314
+ });
315
+ parent
316
+ .command("plannergov-fail-prompt-v2 <id> [reason]")
317
+ .description("Fail prompt")
318
+ .action(async (id, reason) => {
319
+ console.log(
320
+ JSON.stringify((await L()).failPlannergovPromptV2(id, reason), null, 2),
321
+ );
322
+ });
323
+ parent
324
+ .command("plannergov-cancel-prompt-v2 <id> [reason]")
325
+ .description("Cancel prompt")
326
+ .action(async (id, reason) => {
327
+ console.log(
328
+ JSON.stringify(
329
+ (await L()).cancelPlannergovPromptV2(id, reason),
330
+ null,
331
+ 2,
332
+ ),
333
+ );
334
+ });
335
+ parent
336
+ .command("plannergov-get-prompt-v2 <id>")
337
+ .description("Get prompt")
338
+ .action(async (id) => {
339
+ console.log(
340
+ JSON.stringify((await L()).getPlannergovPromptV2(id), null, 2),
341
+ );
342
+ });
343
+ parent
344
+ .command("plannergov-list-prompts-v2")
345
+ .description("List prompts")
346
+ .action(async () => {
347
+ console.log(
348
+ JSON.stringify((await L()).listPlannergovPromptsV2(), null, 2),
349
+ );
350
+ });
351
+ parent
352
+ .command("plannergov-auto-pause-idle-v2")
353
+ .description("Auto-pause idle")
354
+ .action(async () => {
355
+ console.log(
356
+ JSON.stringify(
357
+ (await L()).autoPauseIdlePlannergovProfilesV2(),
358
+ null,
359
+ 2,
360
+ ),
361
+ );
362
+ });
363
+ parent
364
+ .command("plannergov-auto-fail-stuck-v2")
365
+ .description("Auto-fail stuck prompts")
366
+ .action(async () => {
367
+ console.log(
368
+ JSON.stringify((await L()).autoFailStuckPlannergovPromptsV2(), null, 2),
369
+ );
370
+ });
371
+ parent
372
+ .command("plannergov-gov-stats-v2")
373
+ .description("V2 gov stats")
374
+ .action(async () => {
375
+ console.log(
376
+ JSON.stringify((await L()).getInteractivePlannerGovStatsV2(), null, 2),
377
+ );
378
+ });
379
+ }
380
+
381
+ // === Iter28 V2 governance overlay: Pmodegov ===
382
+ export function registerPmodeV2Commands(program) {
383
+ const parent = program.commands.find((c) => c.name() === "planmode");
384
+ if (!parent) return;
385
+ const L = async () => await import("../lib/plan-mode.js");
386
+ parent
387
+ .command("pmodegov-enums-v2")
388
+ .description("Show V2 enums")
389
+ .action(async () => {
390
+ const m = await L();
391
+ console.log(
392
+ JSON.stringify(
393
+ {
394
+ profileMaturity: m.PMODEGOV_PROFILE_MATURITY_V2,
395
+ planLifecycle: m.PMODEGOV_PLAN_LIFECYCLE_V2,
396
+ },
397
+ null,
398
+ 2,
399
+ ),
400
+ );
401
+ });
402
+ parent
403
+ .command("pmodegov-config-v2")
404
+ .description("Show V2 config")
405
+ .action(async () => {
406
+ const m = await L();
407
+ console.log(
408
+ JSON.stringify(
409
+ {
410
+ maxActive: m.getMaxActivePmodeProfilesPerOwnerV2(),
411
+ maxPending: m.getMaxPendingPmodePlansPerProfileV2(),
412
+ idleMs: m.getPmodeProfileIdleMsV2(),
413
+ stuckMs: m.getPmodePlanStuckMsV2(),
414
+ },
415
+ null,
416
+ 2,
417
+ ),
418
+ );
419
+ });
420
+ parent
421
+ .command("pmodegov-set-max-active-v2 <n>")
422
+ .description("Set max active")
423
+ .action(async (n) => {
424
+ (await L()).setMaxActivePmodeProfilesPerOwnerV2(Number(n));
425
+ console.log("ok");
426
+ });
427
+ parent
428
+ .command("pmodegov-set-max-pending-v2 <n>")
429
+ .description("Set max pending")
430
+ .action(async (n) => {
431
+ (await L()).setMaxPendingPmodePlansPerProfileV2(Number(n));
432
+ console.log("ok");
433
+ });
434
+ parent
435
+ .command("pmodegov-set-idle-ms-v2 <n>")
436
+ .description("Set idle threshold ms")
437
+ .action(async (n) => {
438
+ (await L()).setPmodeProfileIdleMsV2(Number(n));
439
+ console.log("ok");
440
+ });
441
+ parent
442
+ .command("pmodegov-set-stuck-ms-v2 <n>")
443
+ .description("Set stuck threshold ms")
444
+ .action(async (n) => {
445
+ (await L()).setPmodePlanStuckMsV2(Number(n));
446
+ console.log("ok");
447
+ });
448
+ parent
449
+ .command("pmodegov-register-v2 <id> <owner>")
450
+ .description("Register V2 profile")
451
+ .option("--template <v>", "template")
452
+ .action(async (id, owner, o) => {
453
+ const m = await L();
454
+ console.log(
455
+ JSON.stringify(
456
+ m.registerPmodeProfileV2({ id, owner, template: o.template }),
457
+ null,
458
+ 2,
459
+ ),
460
+ );
461
+ });
462
+ parent
463
+ .command("pmodegov-activate-v2 <id>")
464
+ .description("Activate profile")
465
+ .action(async (id) => {
466
+ console.log(
467
+ JSON.stringify((await L()).activatePmodeProfileV2(id), null, 2),
468
+ );
469
+ });
470
+ parent
471
+ .command("pmodegov-paused-v2 <id>")
472
+ .description("Paused profile")
473
+ .action(async (id) => {
474
+ console.log(
475
+ JSON.stringify((await L()).pausedPmodeProfileV2(id), null, 2),
476
+ );
477
+ });
478
+ parent
479
+ .command("pmodegov-archive-v2 <id>")
480
+ .description("Archive profile")
481
+ .action(async (id) => {
482
+ console.log(
483
+ JSON.stringify((await L()).archivePmodeProfileV2(id), null, 2),
484
+ );
485
+ });
486
+ parent
487
+ .command("pmodegov-touch-v2 <id>")
488
+ .description("Touch profile")
489
+ .action(async (id) => {
490
+ console.log(JSON.stringify((await L()).touchPmodeProfileV2(id), null, 2));
491
+ });
492
+ parent
493
+ .command("pmodegov-get-v2 <id>")
494
+ .description("Get profile")
495
+ .action(async (id) => {
496
+ console.log(JSON.stringify((await L()).getPmodeProfileV2(id), null, 2));
497
+ });
498
+ parent
499
+ .command("pmodegov-list-v2")
500
+ .description("List profiles")
501
+ .action(async () => {
502
+ console.log(JSON.stringify((await L()).listPmodeProfilesV2(), null, 2));
503
+ });
504
+ parent
505
+ .command("pmodegov-create-plan-v2 <id> <profileId>")
506
+ .description("Create plan")
507
+ .option("--planId <v>", "planId")
508
+ .action(async (id, profileId, o) => {
509
+ const m = await L();
510
+ console.log(
511
+ JSON.stringify(
512
+ m.createPmodePlanV2({ id, profileId, planId: o.planId }),
513
+ null,
514
+ 2,
515
+ ),
516
+ );
517
+ });
518
+ parent
519
+ .command("pmodegov-planning-plan-v2 <id>")
520
+ .description("Mark plan as planning")
521
+ .action(async (id) => {
522
+ console.log(JSON.stringify((await L()).planningPmodePlanV2(id), null, 2));
523
+ });
524
+ parent
525
+ .command("pmodegov-complete-plan-v2 <id>")
526
+ .description("Complete plan")
527
+ .action(async (id) => {
528
+ console.log(JSON.stringify((await L()).completePlanPmodeV2(id), null, 2));
529
+ });
530
+ parent
531
+ .command("pmodegov-fail-plan-v2 <id> [reason]")
532
+ .description("Fail plan")
533
+ .action(async (id, reason) => {
534
+ console.log(
535
+ JSON.stringify((await L()).failPmodePlanV2(id, reason), null, 2),
536
+ );
537
+ });
538
+ parent
539
+ .command("pmodegov-cancel-plan-v2 <id> [reason]")
540
+ .description("Cancel plan")
541
+ .action(async (id, reason) => {
542
+ console.log(
543
+ JSON.stringify((await L()).cancelPmodePlanV2(id, reason), null, 2),
544
+ );
545
+ });
546
+ parent
547
+ .command("pmodegov-get-plan-v2 <id>")
548
+ .description("Get plan")
549
+ .action(async (id) => {
550
+ console.log(JSON.stringify((await L()).getPmodePlanV2(id), null, 2));
551
+ });
552
+ parent
553
+ .command("pmodegov-list-plans-v2")
554
+ .description("List plans")
555
+ .action(async () => {
556
+ console.log(JSON.stringify((await L()).listPmodePlansV2(), null, 2));
557
+ });
558
+ parent
559
+ .command("pmodegov-auto-paused-idle-v2")
560
+ .description("Auto-paused idle")
561
+ .action(async () => {
562
+ console.log(
563
+ JSON.stringify((await L()).autoPausedIdlePmodeProfilesV2(), null, 2),
564
+ );
565
+ });
566
+ parent
567
+ .command("pmodegov-auto-fail-stuck-v2")
568
+ .description("Auto-fail stuck plans")
569
+ .action(async () => {
570
+ console.log(
571
+ JSON.stringify((await L()).autoFailStuckPmodePlansV2(), null, 2),
572
+ );
573
+ });
574
+ parent
575
+ .command("pmodegov-gov-stats-v2")
576
+ .description("V2 gov stats")
577
+ .action(async () => {
578
+ console.log(JSON.stringify((await L()).getPmodegovStatsV2(), null, 2));
579
+ });
580
+ }
@@ -449,3 +449,212 @@ export function registerPluginCommand(program) {
449
449
  }
450
450
  });
451
451
  }
452
+
453
+ // === Iter26 V2 governance overlay ===
454
+ export function registerPadgovV2Commands(program) {
455
+ const parent = program.commands.find((c) => c.name() === "plugin");
456
+ if (!parent) return;
457
+ const L = async () => await import("../lib/plugin-autodiscovery.js");
458
+ parent
459
+ .command("padgov-enums-v2")
460
+ .description("Show V2 enums")
461
+ .action(async () => {
462
+ const m = await L();
463
+ console.log(
464
+ JSON.stringify(
465
+ {
466
+ profileMaturity: m.PADGOV_PROFILE_MATURITY_V2,
467
+ scanLifecycle: m.PADGOV_SCAN_LIFECYCLE_V2,
468
+ },
469
+ null,
470
+ 2,
471
+ ),
472
+ );
473
+ });
474
+ parent
475
+ .command("padgov-config-v2")
476
+ .description("Show V2 config")
477
+ .action(async () => {
478
+ const m = await L();
479
+ console.log(
480
+ JSON.stringify(
481
+ {
482
+ maxActive: m.getMaxActivePadgovProfilesPerOwnerV2(),
483
+ maxPending: m.getMaxPendingPadgovScansPerProfileV2(),
484
+ idleMs: m.getPadgovProfileIdleMsV2(),
485
+ stuckMs: m.getPadgovScanStuckMsV2(),
486
+ },
487
+ null,
488
+ 2,
489
+ ),
490
+ );
491
+ });
492
+ parent
493
+ .command("padgov-set-max-active-v2 <n>")
494
+ .description("Set max active")
495
+ .action(async (n) => {
496
+ (await L()).setMaxActivePadgovProfilesPerOwnerV2(Number(n));
497
+ console.log("ok");
498
+ });
499
+ parent
500
+ .command("padgov-set-max-pending-v2 <n>")
501
+ .description("Set max pending")
502
+ .action(async (n) => {
503
+ (await L()).setMaxPendingPadgovScansPerProfileV2(Number(n));
504
+ console.log("ok");
505
+ });
506
+ parent
507
+ .command("padgov-set-idle-ms-v2 <n>")
508
+ .description("Set idle threshold ms")
509
+ .action(async (n) => {
510
+ (await L()).setPadgovProfileIdleMsV2(Number(n));
511
+ console.log("ok");
512
+ });
513
+ parent
514
+ .command("padgov-set-stuck-ms-v2 <n>")
515
+ .description("Set stuck threshold ms")
516
+ .action(async (n) => {
517
+ (await L()).setPadgovScanStuckMsV2(Number(n));
518
+ console.log("ok");
519
+ });
520
+ parent
521
+ .command("padgov-register-v2 <id> <owner>")
522
+ .description("Register V2 profile")
523
+ .option("--root <v>", "root")
524
+ .action(async (id, owner, o) => {
525
+ const m = await L();
526
+ console.log(
527
+ JSON.stringify(
528
+ m.registerPadgovProfileV2({ id, owner, root: o.root }),
529
+ null,
530
+ 2,
531
+ ),
532
+ );
533
+ });
534
+ parent
535
+ .command("padgov-activate-v2 <id>")
536
+ .description("Activate profile")
537
+ .action(async (id) => {
538
+ console.log(
539
+ JSON.stringify((await L()).activatePadgovProfileV2(id), null, 2),
540
+ );
541
+ });
542
+ parent
543
+ .command("padgov-stale-v2 <id>")
544
+ .description("Stale profile")
545
+ .action(async (id) => {
546
+ console.log(
547
+ JSON.stringify((await L()).stalePadgovProfileV2(id), null, 2),
548
+ );
549
+ });
550
+ parent
551
+ .command("padgov-archive-v2 <id>")
552
+ .description("Archive profile")
553
+ .action(async (id) => {
554
+ console.log(
555
+ JSON.stringify((await L()).archivePadgovProfileV2(id), null, 2),
556
+ );
557
+ });
558
+ parent
559
+ .command("padgov-touch-v2 <id>")
560
+ .description("Touch profile")
561
+ .action(async (id) => {
562
+ console.log(
563
+ JSON.stringify((await L()).touchPadgovProfileV2(id), null, 2),
564
+ );
565
+ });
566
+ parent
567
+ .command("padgov-get-v2 <id>")
568
+ .description("Get profile")
569
+ .action(async (id) => {
570
+ console.log(JSON.stringify((await L()).getPadgovProfileV2(id), null, 2));
571
+ });
572
+ parent
573
+ .command("padgov-list-v2")
574
+ .description("List profiles")
575
+ .action(async () => {
576
+ console.log(JSON.stringify((await L()).listPadgovProfilesV2(), null, 2));
577
+ });
578
+ parent
579
+ .command("padgov-create-scan-v2 <id> <profileId>")
580
+ .description("Create scan")
581
+ .option("--path <v>", "path")
582
+ .action(async (id, profileId, o) => {
583
+ const m = await L();
584
+ console.log(
585
+ JSON.stringify(
586
+ m.createPadgovScanV2({ id, profileId, path: o.path }),
587
+ null,
588
+ 2,
589
+ ),
590
+ );
591
+ });
592
+ parent
593
+ .command("padgov-scanning-scan-v2 <id>")
594
+ .description("Mark scan as scanning")
595
+ .action(async (id) => {
596
+ console.log(
597
+ JSON.stringify((await L()).scanningPadgovScanV2(id), null, 2),
598
+ );
599
+ });
600
+ parent
601
+ .command("padgov-complete-scan-v2 <id>")
602
+ .description("Complete scan")
603
+ .action(async (id) => {
604
+ console.log(
605
+ JSON.stringify((await L()).completeScanPadgovV2(id), null, 2),
606
+ );
607
+ });
608
+ parent
609
+ .command("padgov-fail-scan-v2 <id> [reason]")
610
+ .description("Fail scan")
611
+ .action(async (id, reason) => {
612
+ console.log(
613
+ JSON.stringify((await L()).failPadgovScanV2(id, reason), null, 2),
614
+ );
615
+ });
616
+ parent
617
+ .command("padgov-cancel-scan-v2 <id> [reason]")
618
+ .description("Cancel scan")
619
+ .action(async (id, reason) => {
620
+ console.log(
621
+ JSON.stringify((await L()).cancelPadgovScanV2(id, reason), null, 2),
622
+ );
623
+ });
624
+ parent
625
+ .command("padgov-get-scan-v2 <id>")
626
+ .description("Get scan")
627
+ .action(async (id) => {
628
+ console.log(JSON.stringify((await L()).getPadgovScanV2(id), null, 2));
629
+ });
630
+ parent
631
+ .command("padgov-list-scans-v2")
632
+ .description("List scans")
633
+ .action(async () => {
634
+ console.log(JSON.stringify((await L()).listPadgovScansV2(), null, 2));
635
+ });
636
+ parent
637
+ .command("padgov-auto-stale-idle-v2")
638
+ .description("Auto-stale idle")
639
+ .action(async () => {
640
+ console.log(
641
+ JSON.stringify((await L()).autoStaleIdlePadgovProfilesV2(), null, 2),
642
+ );
643
+ });
644
+ parent
645
+ .command("padgov-auto-fail-stuck-v2")
646
+ .description("Auto-fail stuck scans")
647
+ .action(async () => {
648
+ console.log(
649
+ JSON.stringify((await L()).autoFailStuckPadgovScansV2(), null, 2),
650
+ );
651
+ });
652
+ parent
653
+ .command("padgov-gov-stats-v2")
654
+ .description("V2 gov stats")
655
+ .action(async () => {
656
+ console.log(
657
+ JSON.stringify((await L()).getPluginAutodiscoveryGovStatsV2(), null, 2),
658
+ );
659
+ });
660
+ }