chainlesschain 0.145.0 → 0.156.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.
- package/README.md +52 -3
- package/package.json +1 -1
- package/src/commands/a2a.js +201 -0
- package/src/commands/activitypub.js +207 -0
- package/src/commands/agent-network.js +217 -0
- package/src/commands/agent.js +1250 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +203 -0
- package/src/commands/browse.js +213 -0
- package/src/commands/chat.js +605 -0
- package/src/commands/cli-anything.js +426 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +822 -0
- package/src/commands/config.js +213 -0
- package/src/commands/cowork.js +1666 -0
- package/src/commands/crosschain.js +203 -0
- package/src/commands/dao.js +203 -0
- package/src/commands/dbevo.js +227 -0
- package/src/commands/dev.js +207 -0
- package/src/commands/did-v2.js +217 -0
- package/src/commands/did.js +221 -0
- package/src/commands/dlp.js +213 -0
- package/src/commands/economy.js +199 -0
- package/src/commands/encrypt.js +201 -0
- package/src/commands/evolution.js +199 -0
- package/src/commands/evomap.js +830 -0
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fusion.js +205 -0
- package/src/commands/governance.js +209 -0
- package/src/commands/hmemory.js +203 -0
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/inference.js +207 -0
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/kg.js +195 -0
- package/src/commands/llm.js +426 -0
- package/src/commands/matrix.js +207 -0
- package/src/commands/mcp.js +217 -0
- package/src/commands/memory.js +412 -0
- package/src/commands/multimodal.js +203 -0
- package/src/commands/nlprog.js +225 -0
- package/src/commands/nostr.js +209 -0
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/orchestrate.js +406 -0
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/perception.js +209 -0
- package/src/commands/permmem.js +203 -0
- package/src/commands/pipeline.js +199 -0
- package/src/commands/planmode.js +426 -0
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/plugin.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +233 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/services.js +207 -0
- package/src/commands/session.js +209 -0
- package/src/commands/setup.js +205 -0
- package/src/commands/skill.js +414 -0
- package/src/commands/social.js +201 -0
- package/src/commands/sso.js +209 -0
- package/src/commands/start.js +209 -0
- package/src/commands/stream.js +213 -0
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/tokens.js +209 -0
- package/src/commands/trust.js +217 -0
- package/src/commands/ui.js +225 -0
- package/src/commands/wallet.js +209 -0
- package/src/commands/workflow.js +412 -0
- package/src/index.js +252 -0
- package/src/lib/a2a-protocol.js +332 -0
- package/src/lib/activitypub-bridge.js +334 -0
- package/src/lib/agent-coordinator.js +334 -0
- package/src/lib/agent-economy.js +334 -0
- package/src/lib/agent-network.js +341 -0
- package/src/lib/agent-router.js +333 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-agent.js +332 -0
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +333 -0
- package/src/lib/browser-automation.js +334 -0
- package/src/lib/chat-core.js +335 -0
- package/src/lib/cli-anything-bridge.js +341 -0
- package/src/lib/cli-context-engineering.js +351 -0
- package/src/lib/code-agent.js +339 -0
- package/src/lib/collaboration-governance.js +334 -0
- package/src/lib/community-governance.js +346 -0
- package/src/lib/compliance-manager.js +334 -0
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/cowork-adapter.js +336 -0
- package/src/lib/cowork-evomap-adapter.js +341 -0
- package/src/lib/cowork-mcp-tools.js +341 -0
- package/src/lib/cowork-observe-html.js +341 -0
- package/src/lib/cowork-observe.js +341 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/cowork-task-templates.js +342 -1
- package/src/lib/cowork-template-marketplace.js +340 -0
- package/src/lib/cross-chain.js +339 -0
- package/src/lib/crypto-manager.js +334 -0
- package/src/lib/dao-governance.js +339 -0
- package/src/lib/dbevo.js +351 -0
- package/src/lib/decentral-infra.js +330 -0
- package/src/lib/did-manager.js +341 -0
- package/src/lib/did-v2-manager.js +341 -0
- package/src/lib/dlp-engine.js +339 -0
- package/src/lib/downloader.js +334 -0
- package/src/lib/evolution-system.js +334 -0
- package/src/lib/evomap-client.js +342 -0
- package/src/lib/evomap-federation.js +338 -0
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/evomap-manager.js +330 -0
- package/src/lib/execution-backend.js +330 -0
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/hashline.js +338 -0
- package/src/lib/hierarchical-memory.js +334 -0
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/inference-network.js +341 -0
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/interaction-adapter.js +330 -0
- package/src/lib/interactive-planner.js +354 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-graph.js +331 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +339 -0
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/memory-manager.js +336 -0
- package/src/lib/multimodal.js +330 -0
- package/src/lib/nl-programming.js +341 -0
- package/src/lib/nostr-bridge.js +336 -0
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/perception.js +346 -0
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/pipeline-orchestrator.js +332 -0
- package/src/lib/plan-mode.js +336 -0
- package/src/lib/plugin-autodiscovery.js +334 -0
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/process-manager.js +336 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/provider-options.js +346 -0
- package/src/lib/provider-stream.js +348 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/service-manager.js +337 -0
- package/src/lib/session-core-singletons.js +341 -0
- package/src/lib/session-manager.js +334 -0
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/skill-mcp.js +336 -0
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/stix-parser.js +346 -0
- package/src/lib/sub-agent-context.js +343 -0
- package/src/lib/sub-agent-profiles.js +335 -0
- package/src/lib/sub-agent-registry.js +336 -0
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/todo-manager.js +336 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/trust-security.js +343 -0
- package/src/lib/ueba.js +340 -0
- package/src/lib/universal-runtime.js +330 -0
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/web-ui-server.js +348 -0
- package/src/lib/workflow-engine.js +330 -0
- package/src/lib/workflow-expr.js +346 -0
- package/src/lib/ws-chat-handler.js +337 -0
package/src/commands/export.js
CHANGED
|
@@ -378,3 +378,216 @@ export function registerExportCommand(program) {
|
|
|
378
378
|
.description("Auto-fail stuck V2 export jobs")
|
|
379
379
|
.action(() => out(autoFailStuckExportJobsV2()));
|
|
380
380
|
}
|
|
381
|
+
|
|
382
|
+
// === Iter22 V2 governance overlay ===
|
|
383
|
+
export function registerKexpgovV2Commands(program) {
|
|
384
|
+
const parent = program.commands.find((c) => c.name() === "export");
|
|
385
|
+
if (!parent) return;
|
|
386
|
+
const L = async () => await import("../lib/knowledge-exporter.js");
|
|
387
|
+
parent
|
|
388
|
+
.command("kexpgov-enums-v2")
|
|
389
|
+
.description("Show V2 enums")
|
|
390
|
+
.action(async () => {
|
|
391
|
+
const m = await L();
|
|
392
|
+
console.log(
|
|
393
|
+
JSON.stringify(
|
|
394
|
+
{
|
|
395
|
+
profileMaturity: m.KEXPGOV_PROFILE_MATURITY_V2,
|
|
396
|
+
exportLifecycle: m.KEXPGOV_EXPORT_LIFECYCLE_V2,
|
|
397
|
+
},
|
|
398
|
+
null,
|
|
399
|
+
2,
|
|
400
|
+
),
|
|
401
|
+
);
|
|
402
|
+
});
|
|
403
|
+
parent
|
|
404
|
+
.command("kexpgov-config-v2")
|
|
405
|
+
.description("Show V2 config")
|
|
406
|
+
.action(async () => {
|
|
407
|
+
const m = await L();
|
|
408
|
+
console.log(
|
|
409
|
+
JSON.stringify(
|
|
410
|
+
{
|
|
411
|
+
maxActive: m.getMaxActiveKexpgovProfilesPerOwnerV2(),
|
|
412
|
+
maxPending: m.getMaxPendingKexpgovExportsPerProfileV2(),
|
|
413
|
+
idleMs: m.getKexpgovProfileIdleMsV2(),
|
|
414
|
+
stuckMs: m.getKexpgovExportStuckMsV2(),
|
|
415
|
+
},
|
|
416
|
+
null,
|
|
417
|
+
2,
|
|
418
|
+
),
|
|
419
|
+
);
|
|
420
|
+
});
|
|
421
|
+
parent
|
|
422
|
+
.command("kexpgov-set-max-active-v2 <n>")
|
|
423
|
+
.description("Set max active")
|
|
424
|
+
.action(async (n) => {
|
|
425
|
+
(await L()).setMaxActiveKexpgovProfilesPerOwnerV2(Number(n));
|
|
426
|
+
console.log("ok");
|
|
427
|
+
});
|
|
428
|
+
parent
|
|
429
|
+
.command("kexpgov-set-max-pending-v2 <n>")
|
|
430
|
+
.description("Set max pending")
|
|
431
|
+
.action(async (n) => {
|
|
432
|
+
(await L()).setMaxPendingKexpgovExportsPerProfileV2(Number(n));
|
|
433
|
+
console.log("ok");
|
|
434
|
+
});
|
|
435
|
+
parent
|
|
436
|
+
.command("kexpgov-set-idle-ms-v2 <n>")
|
|
437
|
+
.description("Set idle threshold ms")
|
|
438
|
+
.action(async (n) => {
|
|
439
|
+
(await L()).setKexpgovProfileIdleMsV2(Number(n));
|
|
440
|
+
console.log("ok");
|
|
441
|
+
});
|
|
442
|
+
parent
|
|
443
|
+
.command("kexpgov-set-stuck-ms-v2 <n>")
|
|
444
|
+
.description("Set stuck threshold ms")
|
|
445
|
+
.action(async (n) => {
|
|
446
|
+
(await L()).setKexpgovExportStuckMsV2(Number(n));
|
|
447
|
+
console.log("ok");
|
|
448
|
+
});
|
|
449
|
+
parent
|
|
450
|
+
.command("kexpgov-register-v2 <id> <owner>")
|
|
451
|
+
.description("Register V2 profile")
|
|
452
|
+
.option("--format <v>", "format")
|
|
453
|
+
.action(async (id, owner, o) => {
|
|
454
|
+
const m = await L();
|
|
455
|
+
console.log(
|
|
456
|
+
JSON.stringify(
|
|
457
|
+
m.registerKexpgovProfileV2({ id, owner, format: o.format }),
|
|
458
|
+
null,
|
|
459
|
+
2,
|
|
460
|
+
),
|
|
461
|
+
);
|
|
462
|
+
});
|
|
463
|
+
parent
|
|
464
|
+
.command("kexpgov-activate-v2 <id>")
|
|
465
|
+
.description("Activate profile")
|
|
466
|
+
.action(async (id) => {
|
|
467
|
+
console.log(
|
|
468
|
+
JSON.stringify((await L()).activateKexpgovProfileV2(id), null, 2),
|
|
469
|
+
);
|
|
470
|
+
});
|
|
471
|
+
parent
|
|
472
|
+
.command("kexpgov-stale-v2 <id>")
|
|
473
|
+
.description("Stale profile")
|
|
474
|
+
.action(async (id) => {
|
|
475
|
+
console.log(
|
|
476
|
+
JSON.stringify((await L()).staleKexpgovProfileV2(id), null, 2),
|
|
477
|
+
);
|
|
478
|
+
});
|
|
479
|
+
parent
|
|
480
|
+
.command("kexpgov-archive-v2 <id>")
|
|
481
|
+
.description("Archive profile")
|
|
482
|
+
.action(async (id) => {
|
|
483
|
+
console.log(
|
|
484
|
+
JSON.stringify((await L()).archiveKexpgovProfileV2(id), null, 2),
|
|
485
|
+
);
|
|
486
|
+
});
|
|
487
|
+
parent
|
|
488
|
+
.command("kexpgov-touch-v2 <id>")
|
|
489
|
+
.description("Touch profile")
|
|
490
|
+
.action(async (id) => {
|
|
491
|
+
console.log(
|
|
492
|
+
JSON.stringify((await L()).touchKexpgovProfileV2(id), null, 2),
|
|
493
|
+
);
|
|
494
|
+
});
|
|
495
|
+
parent
|
|
496
|
+
.command("kexpgov-get-v2 <id>")
|
|
497
|
+
.description("Get profile")
|
|
498
|
+
.action(async (id) => {
|
|
499
|
+
console.log(JSON.stringify((await L()).getKexpgovProfileV2(id), null, 2));
|
|
500
|
+
});
|
|
501
|
+
parent
|
|
502
|
+
.command("kexpgov-list-v2")
|
|
503
|
+
.description("List profiles")
|
|
504
|
+
.action(async () => {
|
|
505
|
+
console.log(JSON.stringify((await L()).listKexpgovProfilesV2(), null, 2));
|
|
506
|
+
});
|
|
507
|
+
parent
|
|
508
|
+
.command("kexpgov-create-export-v2 <id> <profileId>")
|
|
509
|
+
.description("Create export")
|
|
510
|
+
.option("--destination <v>", "destination")
|
|
511
|
+
.action(async (id, profileId, o) => {
|
|
512
|
+
const m = await L();
|
|
513
|
+
console.log(
|
|
514
|
+
JSON.stringify(
|
|
515
|
+
m.createKexpgovExportV2({
|
|
516
|
+
id,
|
|
517
|
+
profileId,
|
|
518
|
+
destination: o.destination,
|
|
519
|
+
}),
|
|
520
|
+
null,
|
|
521
|
+
2,
|
|
522
|
+
),
|
|
523
|
+
);
|
|
524
|
+
});
|
|
525
|
+
parent
|
|
526
|
+
.command("kexpgov-exporting-export-v2 <id>")
|
|
527
|
+
.description("Mark export as exporting")
|
|
528
|
+
.action(async (id) => {
|
|
529
|
+
console.log(
|
|
530
|
+
JSON.stringify((await L()).exportingKexpgovExportV2(id), null, 2),
|
|
531
|
+
);
|
|
532
|
+
});
|
|
533
|
+
parent
|
|
534
|
+
.command("kexpgov-complete-export-v2 <id>")
|
|
535
|
+
.description("Complete export")
|
|
536
|
+
.action(async (id) => {
|
|
537
|
+
console.log(
|
|
538
|
+
JSON.stringify((await L()).completeExportKexpgovV2(id), null, 2),
|
|
539
|
+
);
|
|
540
|
+
});
|
|
541
|
+
parent
|
|
542
|
+
.command("kexpgov-fail-export-v2 <id> [reason]")
|
|
543
|
+
.description("Fail export")
|
|
544
|
+
.action(async (id, reason) => {
|
|
545
|
+
console.log(
|
|
546
|
+
JSON.stringify((await L()).failKexpgovExportV2(id, reason), null, 2),
|
|
547
|
+
);
|
|
548
|
+
});
|
|
549
|
+
parent
|
|
550
|
+
.command("kexpgov-cancel-export-v2 <id> [reason]")
|
|
551
|
+
.description("Cancel export")
|
|
552
|
+
.action(async (id, reason) => {
|
|
553
|
+
console.log(
|
|
554
|
+
JSON.stringify((await L()).cancelKexpgovExportV2(id, reason), null, 2),
|
|
555
|
+
);
|
|
556
|
+
});
|
|
557
|
+
parent
|
|
558
|
+
.command("kexpgov-get-export-v2 <id>")
|
|
559
|
+
.description("Get export")
|
|
560
|
+
.action(async (id) => {
|
|
561
|
+
console.log(JSON.stringify((await L()).getKexpgovExportV2(id), null, 2));
|
|
562
|
+
});
|
|
563
|
+
parent
|
|
564
|
+
.command("kexpgov-list-exports-v2")
|
|
565
|
+
.description("List exports")
|
|
566
|
+
.action(async () => {
|
|
567
|
+
console.log(JSON.stringify((await L()).listKexpgovExportsV2(), null, 2));
|
|
568
|
+
});
|
|
569
|
+
parent
|
|
570
|
+
.command("kexpgov-auto-stale-idle-v2")
|
|
571
|
+
.description("Auto-stale idle")
|
|
572
|
+
.action(async () => {
|
|
573
|
+
console.log(
|
|
574
|
+
JSON.stringify((await L()).autoStaleIdleKexpgovProfilesV2(), null, 2),
|
|
575
|
+
);
|
|
576
|
+
});
|
|
577
|
+
parent
|
|
578
|
+
.command("kexpgov-auto-fail-stuck-v2")
|
|
579
|
+
.description("Auto-fail stuck exports")
|
|
580
|
+
.action(async () => {
|
|
581
|
+
console.log(
|
|
582
|
+
JSON.stringify((await L()).autoFailStuckKexpgovExportsV2(), null, 2),
|
|
583
|
+
);
|
|
584
|
+
});
|
|
585
|
+
parent
|
|
586
|
+
.command("kexpgov-gov-stats-v2")
|
|
587
|
+
.description("V2 gov stats")
|
|
588
|
+
.action(async () => {
|
|
589
|
+
console.log(
|
|
590
|
+
JSON.stringify((await L()).getKnowledgeExporterGovStatsV2(), null, 2),
|
|
591
|
+
);
|
|
592
|
+
});
|
|
593
|
+
}
|
|
@@ -708,3 +708,212 @@ export function registerFederationCommand(program) {
|
|
|
708
708
|
|
|
709
709
|
program.addCommand(fed);
|
|
710
710
|
}
|
|
711
|
+
|
|
712
|
+
// === Iter20 V2 governance overlay ===
|
|
713
|
+
export function registerFedgovV2Commands(program) {
|
|
714
|
+
const parent = program.commands.find((c) => c.name() === "federation");
|
|
715
|
+
if (!parent) return;
|
|
716
|
+
const L = async () => await import("../lib/federation-hardening.js");
|
|
717
|
+
parent
|
|
718
|
+
.command("fedgov-enums-v2")
|
|
719
|
+
.description("Show V2 enums")
|
|
720
|
+
.action(async () => {
|
|
721
|
+
const m = await L();
|
|
722
|
+
console.log(
|
|
723
|
+
JSON.stringify(
|
|
724
|
+
{
|
|
725
|
+
profileMaturity: m.FEDGOV_PROFILE_MATURITY_V2,
|
|
726
|
+
probeLifecycle: m.FEDGOV_PROBE_LIFECYCLE_V2,
|
|
727
|
+
},
|
|
728
|
+
null,
|
|
729
|
+
2,
|
|
730
|
+
),
|
|
731
|
+
);
|
|
732
|
+
});
|
|
733
|
+
parent
|
|
734
|
+
.command("fedgov-config-v2")
|
|
735
|
+
.description("Show V2 config")
|
|
736
|
+
.action(async () => {
|
|
737
|
+
const m = await L();
|
|
738
|
+
console.log(
|
|
739
|
+
JSON.stringify(
|
|
740
|
+
{
|
|
741
|
+
maxActive: m.getMaxActiveFedgovProfilesPerOwnerV2(),
|
|
742
|
+
maxPending: m.getMaxPendingFedgovProbesPerProfileV2(),
|
|
743
|
+
idleMs: m.getFedgovProfileIdleMsV2(),
|
|
744
|
+
stuckMs: m.getFedgovProbeStuckMsV2(),
|
|
745
|
+
},
|
|
746
|
+
null,
|
|
747
|
+
2,
|
|
748
|
+
),
|
|
749
|
+
);
|
|
750
|
+
});
|
|
751
|
+
parent
|
|
752
|
+
.command("fedgov-set-max-active-v2 <n>")
|
|
753
|
+
.description("Set max active")
|
|
754
|
+
.action(async (n) => {
|
|
755
|
+
(await L()).setMaxActiveFedgovProfilesPerOwnerV2(Number(n));
|
|
756
|
+
console.log("ok");
|
|
757
|
+
});
|
|
758
|
+
parent
|
|
759
|
+
.command("fedgov-set-max-pending-v2 <n>")
|
|
760
|
+
.description("Set max pending")
|
|
761
|
+
.action(async (n) => {
|
|
762
|
+
(await L()).setMaxPendingFedgovProbesPerProfileV2(Number(n));
|
|
763
|
+
console.log("ok");
|
|
764
|
+
});
|
|
765
|
+
parent
|
|
766
|
+
.command("fedgov-set-idle-ms-v2 <n>")
|
|
767
|
+
.description("Set idle threshold ms")
|
|
768
|
+
.action(async (n) => {
|
|
769
|
+
(await L()).setFedgovProfileIdleMsV2(Number(n));
|
|
770
|
+
console.log("ok");
|
|
771
|
+
});
|
|
772
|
+
parent
|
|
773
|
+
.command("fedgov-set-stuck-ms-v2 <n>")
|
|
774
|
+
.description("Set stuck threshold ms")
|
|
775
|
+
.action(async (n) => {
|
|
776
|
+
(await L()).setFedgovProbeStuckMsV2(Number(n));
|
|
777
|
+
console.log("ok");
|
|
778
|
+
});
|
|
779
|
+
parent
|
|
780
|
+
.command("fedgov-register-v2 <id> <owner>")
|
|
781
|
+
.description("Register V2 profile")
|
|
782
|
+
.option("--region <v>", "region")
|
|
783
|
+
.action(async (id, owner, o) => {
|
|
784
|
+
const m = await L();
|
|
785
|
+
console.log(
|
|
786
|
+
JSON.stringify(
|
|
787
|
+
m.registerFedgovProfileV2({ id, owner, region: o.region }),
|
|
788
|
+
null,
|
|
789
|
+
2,
|
|
790
|
+
),
|
|
791
|
+
);
|
|
792
|
+
});
|
|
793
|
+
parent
|
|
794
|
+
.command("fedgov-activate-v2 <id>")
|
|
795
|
+
.description("Activate profile")
|
|
796
|
+
.action(async (id) => {
|
|
797
|
+
console.log(
|
|
798
|
+
JSON.stringify((await L()).activateFedgovProfileV2(id), null, 2),
|
|
799
|
+
);
|
|
800
|
+
});
|
|
801
|
+
parent
|
|
802
|
+
.command("fedgov-degrade-v2 <id>")
|
|
803
|
+
.description("Degrade profile")
|
|
804
|
+
.action(async (id) => {
|
|
805
|
+
console.log(
|
|
806
|
+
JSON.stringify((await L()).degradeFedgovProfileV2(id), null, 2),
|
|
807
|
+
);
|
|
808
|
+
});
|
|
809
|
+
parent
|
|
810
|
+
.command("fedgov-archive-v2 <id>")
|
|
811
|
+
.description("Archive profile")
|
|
812
|
+
.action(async (id) => {
|
|
813
|
+
console.log(
|
|
814
|
+
JSON.stringify((await L()).archiveFedgovProfileV2(id), null, 2),
|
|
815
|
+
);
|
|
816
|
+
});
|
|
817
|
+
parent
|
|
818
|
+
.command("fedgov-touch-v2 <id>")
|
|
819
|
+
.description("Touch profile")
|
|
820
|
+
.action(async (id) => {
|
|
821
|
+
console.log(
|
|
822
|
+
JSON.stringify((await L()).touchFedgovProfileV2(id), null, 2),
|
|
823
|
+
);
|
|
824
|
+
});
|
|
825
|
+
parent
|
|
826
|
+
.command("fedgov-get-v2 <id>")
|
|
827
|
+
.description("Get profile")
|
|
828
|
+
.action(async (id) => {
|
|
829
|
+
console.log(JSON.stringify((await L()).getFedgovProfileV2(id), null, 2));
|
|
830
|
+
});
|
|
831
|
+
parent
|
|
832
|
+
.command("fedgov-list-v2")
|
|
833
|
+
.description("List profiles")
|
|
834
|
+
.action(async () => {
|
|
835
|
+
console.log(JSON.stringify((await L()).listFedgovProfilesV2(), null, 2));
|
|
836
|
+
});
|
|
837
|
+
parent
|
|
838
|
+
.command("fedgov-create-probe-v2 <id> <profileId>")
|
|
839
|
+
.description("Create probe")
|
|
840
|
+
.option("--endpoint <v>", "endpoint")
|
|
841
|
+
.action(async (id, profileId, o) => {
|
|
842
|
+
const m = await L();
|
|
843
|
+
console.log(
|
|
844
|
+
JSON.stringify(
|
|
845
|
+
m.createFedgovProbeV2({ id, profileId, endpoint: o.endpoint }),
|
|
846
|
+
null,
|
|
847
|
+
2,
|
|
848
|
+
),
|
|
849
|
+
);
|
|
850
|
+
});
|
|
851
|
+
parent
|
|
852
|
+
.command("fedgov-probing-probe-v2 <id>")
|
|
853
|
+
.description("Mark probe as probing")
|
|
854
|
+
.action(async (id) => {
|
|
855
|
+
console.log(
|
|
856
|
+
JSON.stringify((await L()).probingFedgovProbeV2(id), null, 2),
|
|
857
|
+
);
|
|
858
|
+
});
|
|
859
|
+
parent
|
|
860
|
+
.command("fedgov-complete-probe-v2 <id>")
|
|
861
|
+
.description("Complete probe")
|
|
862
|
+
.action(async (id) => {
|
|
863
|
+
console.log(
|
|
864
|
+
JSON.stringify((await L()).completeProbeFedgovV2(id), null, 2),
|
|
865
|
+
);
|
|
866
|
+
});
|
|
867
|
+
parent
|
|
868
|
+
.command("fedgov-fail-probe-v2 <id> [reason]")
|
|
869
|
+
.description("Fail probe")
|
|
870
|
+
.action(async (id, reason) => {
|
|
871
|
+
console.log(
|
|
872
|
+
JSON.stringify((await L()).failFedgovProbeV2(id, reason), null, 2),
|
|
873
|
+
);
|
|
874
|
+
});
|
|
875
|
+
parent
|
|
876
|
+
.command("fedgov-cancel-probe-v2 <id> [reason]")
|
|
877
|
+
.description("Cancel probe")
|
|
878
|
+
.action(async (id, reason) => {
|
|
879
|
+
console.log(
|
|
880
|
+
JSON.stringify((await L()).cancelFedgovProbeV2(id, reason), null, 2),
|
|
881
|
+
);
|
|
882
|
+
});
|
|
883
|
+
parent
|
|
884
|
+
.command("fedgov-get-probe-v2 <id>")
|
|
885
|
+
.description("Get probe")
|
|
886
|
+
.action(async (id) => {
|
|
887
|
+
console.log(JSON.stringify((await L()).getFedgovProbeV2(id), null, 2));
|
|
888
|
+
});
|
|
889
|
+
parent
|
|
890
|
+
.command("fedgov-list-probes-v2")
|
|
891
|
+
.description("List probes")
|
|
892
|
+
.action(async () => {
|
|
893
|
+
console.log(JSON.stringify((await L()).listFedgovProbesV2(), null, 2));
|
|
894
|
+
});
|
|
895
|
+
parent
|
|
896
|
+
.command("fedgov-auto-degrade-idle-v2")
|
|
897
|
+
.description("Auto-degrade idle")
|
|
898
|
+
.action(async () => {
|
|
899
|
+
console.log(
|
|
900
|
+
JSON.stringify((await L()).autoDegradeIdleFedgovProfilesV2(), null, 2),
|
|
901
|
+
);
|
|
902
|
+
});
|
|
903
|
+
parent
|
|
904
|
+
.command("fedgov-auto-fail-stuck-v2")
|
|
905
|
+
.description("Auto-fail stuck probes")
|
|
906
|
+
.action(async () => {
|
|
907
|
+
console.log(
|
|
908
|
+
JSON.stringify((await L()).autoFailStuckFedgovProbesV2(), null, 2),
|
|
909
|
+
);
|
|
910
|
+
});
|
|
911
|
+
parent
|
|
912
|
+
.command("fedgov-gov-stats-v2")
|
|
913
|
+
.description("V2 gov stats")
|
|
914
|
+
.action(async () => {
|
|
915
|
+
console.log(
|
|
916
|
+
JSON.stringify((await L()).getFederationHardeningGovStatsV2(), null, 2),
|
|
917
|
+
);
|
|
918
|
+
});
|
|
919
|
+
}
|
package/src/commands/fusion.js
CHANGED
|
@@ -588,3 +588,208 @@ export function registerFusionCommand(program) {
|
|
|
588
588
|
|
|
589
589
|
program.addCommand(fu);
|
|
590
590
|
}
|
|
591
|
+
|
|
592
|
+
// === Iter23 V2 governance overlay ===
|
|
593
|
+
export function registerPfgovV2Commands(program) {
|
|
594
|
+
const parent = program.commands.find((c) => c.name() === "fusion");
|
|
595
|
+
if (!parent) return;
|
|
596
|
+
const L = async () => await import("../lib/protocol-fusion.js");
|
|
597
|
+
parent
|
|
598
|
+
.command("pfgov-enums-v2")
|
|
599
|
+
.description("Show V2 enums")
|
|
600
|
+
.action(async () => {
|
|
601
|
+
const m = await L();
|
|
602
|
+
console.log(
|
|
603
|
+
JSON.stringify(
|
|
604
|
+
{
|
|
605
|
+
profileMaturity: m.PFGOV_PROFILE_MATURITY_V2,
|
|
606
|
+
routeLifecycle: m.PFGOV_ROUTE_LIFECYCLE_V2,
|
|
607
|
+
},
|
|
608
|
+
null,
|
|
609
|
+
2,
|
|
610
|
+
),
|
|
611
|
+
);
|
|
612
|
+
});
|
|
613
|
+
parent
|
|
614
|
+
.command("pfgov-config-v2")
|
|
615
|
+
.description("Show V2 config")
|
|
616
|
+
.action(async () => {
|
|
617
|
+
const m = await L();
|
|
618
|
+
console.log(
|
|
619
|
+
JSON.stringify(
|
|
620
|
+
{
|
|
621
|
+
maxActive: m.getMaxActivePfgovProfilesPerOwnerV2(),
|
|
622
|
+
maxPending: m.getMaxPendingPfgovRoutesPerProfileV2(),
|
|
623
|
+
idleMs: m.getPfgovProfileIdleMsV2(),
|
|
624
|
+
stuckMs: m.getPfgovRouteStuckMsV2(),
|
|
625
|
+
},
|
|
626
|
+
null,
|
|
627
|
+
2,
|
|
628
|
+
),
|
|
629
|
+
);
|
|
630
|
+
});
|
|
631
|
+
parent
|
|
632
|
+
.command("pfgov-set-max-active-v2 <n>")
|
|
633
|
+
.description("Set max active")
|
|
634
|
+
.action(async (n) => {
|
|
635
|
+
(await L()).setMaxActivePfgovProfilesPerOwnerV2(Number(n));
|
|
636
|
+
console.log("ok");
|
|
637
|
+
});
|
|
638
|
+
parent
|
|
639
|
+
.command("pfgov-set-max-pending-v2 <n>")
|
|
640
|
+
.description("Set max pending")
|
|
641
|
+
.action(async (n) => {
|
|
642
|
+
(await L()).setMaxPendingPfgovRoutesPerProfileV2(Number(n));
|
|
643
|
+
console.log("ok");
|
|
644
|
+
});
|
|
645
|
+
parent
|
|
646
|
+
.command("pfgov-set-idle-ms-v2 <n>")
|
|
647
|
+
.description("Set idle threshold ms")
|
|
648
|
+
.action(async (n) => {
|
|
649
|
+
(await L()).setPfgovProfileIdleMsV2(Number(n));
|
|
650
|
+
console.log("ok");
|
|
651
|
+
});
|
|
652
|
+
parent
|
|
653
|
+
.command("pfgov-set-stuck-ms-v2 <n>")
|
|
654
|
+
.description("Set stuck threshold ms")
|
|
655
|
+
.action(async (n) => {
|
|
656
|
+
(await L()).setPfgovRouteStuckMsV2(Number(n));
|
|
657
|
+
console.log("ok");
|
|
658
|
+
});
|
|
659
|
+
parent
|
|
660
|
+
.command("pfgov-register-v2 <id> <owner>")
|
|
661
|
+
.description("Register V2 profile")
|
|
662
|
+
.option("--protocol <v>", "protocol")
|
|
663
|
+
.action(async (id, owner, o) => {
|
|
664
|
+
const m = await L();
|
|
665
|
+
console.log(
|
|
666
|
+
JSON.stringify(
|
|
667
|
+
m.registerPfgovProfileV2({ id, owner, protocol: o.protocol }),
|
|
668
|
+
null,
|
|
669
|
+
2,
|
|
670
|
+
),
|
|
671
|
+
);
|
|
672
|
+
});
|
|
673
|
+
parent
|
|
674
|
+
.command("pfgov-activate-v2 <id>")
|
|
675
|
+
.description("Activate profile")
|
|
676
|
+
.action(async (id) => {
|
|
677
|
+
console.log(
|
|
678
|
+
JSON.stringify((await L()).activatePfgovProfileV2(id), null, 2),
|
|
679
|
+
);
|
|
680
|
+
});
|
|
681
|
+
parent
|
|
682
|
+
.command("pfgov-degrade-v2 <id>")
|
|
683
|
+
.description("Degrade profile")
|
|
684
|
+
.action(async (id) => {
|
|
685
|
+
console.log(
|
|
686
|
+
JSON.stringify((await L()).degradePfgovProfileV2(id), null, 2),
|
|
687
|
+
);
|
|
688
|
+
});
|
|
689
|
+
parent
|
|
690
|
+
.command("pfgov-archive-v2 <id>")
|
|
691
|
+
.description("Archive profile")
|
|
692
|
+
.action(async (id) => {
|
|
693
|
+
console.log(
|
|
694
|
+
JSON.stringify((await L()).archivePfgovProfileV2(id), null, 2),
|
|
695
|
+
);
|
|
696
|
+
});
|
|
697
|
+
parent
|
|
698
|
+
.command("pfgov-touch-v2 <id>")
|
|
699
|
+
.description("Touch profile")
|
|
700
|
+
.action(async (id) => {
|
|
701
|
+
console.log(JSON.stringify((await L()).touchPfgovProfileV2(id), null, 2));
|
|
702
|
+
});
|
|
703
|
+
parent
|
|
704
|
+
.command("pfgov-get-v2 <id>")
|
|
705
|
+
.description("Get profile")
|
|
706
|
+
.action(async (id) => {
|
|
707
|
+
console.log(JSON.stringify((await L()).getPfgovProfileV2(id), null, 2));
|
|
708
|
+
});
|
|
709
|
+
parent
|
|
710
|
+
.command("pfgov-list-v2")
|
|
711
|
+
.description("List profiles")
|
|
712
|
+
.action(async () => {
|
|
713
|
+
console.log(JSON.stringify((await L()).listPfgovProfilesV2(), null, 2));
|
|
714
|
+
});
|
|
715
|
+
parent
|
|
716
|
+
.command("pfgov-create-route-v2 <id> <profileId>")
|
|
717
|
+
.description("Create route")
|
|
718
|
+
.option("--destination <v>", "destination")
|
|
719
|
+
.action(async (id, profileId, o) => {
|
|
720
|
+
const m = await L();
|
|
721
|
+
console.log(
|
|
722
|
+
JSON.stringify(
|
|
723
|
+
m.createPfgovRouteV2({ id, profileId, destination: o.destination }),
|
|
724
|
+
null,
|
|
725
|
+
2,
|
|
726
|
+
),
|
|
727
|
+
);
|
|
728
|
+
});
|
|
729
|
+
parent
|
|
730
|
+
.command("pfgov-routing-route-v2 <id>")
|
|
731
|
+
.description("Mark route as routing")
|
|
732
|
+
.action(async (id) => {
|
|
733
|
+
console.log(JSON.stringify((await L()).routingPfgovRouteV2(id), null, 2));
|
|
734
|
+
});
|
|
735
|
+
parent
|
|
736
|
+
.command("pfgov-complete-route-v2 <id>")
|
|
737
|
+
.description("Complete route")
|
|
738
|
+
.action(async (id) => {
|
|
739
|
+
console.log(
|
|
740
|
+
JSON.stringify((await L()).completeRoutePfgovV2(id), null, 2),
|
|
741
|
+
);
|
|
742
|
+
});
|
|
743
|
+
parent
|
|
744
|
+
.command("pfgov-fail-route-v2 <id> [reason]")
|
|
745
|
+
.description("Fail route")
|
|
746
|
+
.action(async (id, reason) => {
|
|
747
|
+
console.log(
|
|
748
|
+
JSON.stringify((await L()).failPfgovRouteV2(id, reason), null, 2),
|
|
749
|
+
);
|
|
750
|
+
});
|
|
751
|
+
parent
|
|
752
|
+
.command("pfgov-cancel-route-v2 <id> [reason]")
|
|
753
|
+
.description("Cancel route")
|
|
754
|
+
.action(async (id, reason) => {
|
|
755
|
+
console.log(
|
|
756
|
+
JSON.stringify((await L()).cancelPfgovRouteV2(id, reason), null, 2),
|
|
757
|
+
);
|
|
758
|
+
});
|
|
759
|
+
parent
|
|
760
|
+
.command("pfgov-get-route-v2 <id>")
|
|
761
|
+
.description("Get route")
|
|
762
|
+
.action(async (id) => {
|
|
763
|
+
console.log(JSON.stringify((await L()).getPfgovRouteV2(id), null, 2));
|
|
764
|
+
});
|
|
765
|
+
parent
|
|
766
|
+
.command("pfgov-list-routes-v2")
|
|
767
|
+
.description("List routes")
|
|
768
|
+
.action(async () => {
|
|
769
|
+
console.log(JSON.stringify((await L()).listPfgovRoutesV2(), null, 2));
|
|
770
|
+
});
|
|
771
|
+
parent
|
|
772
|
+
.command("pfgov-auto-degrade-idle-v2")
|
|
773
|
+
.description("Auto-degrade idle")
|
|
774
|
+
.action(async () => {
|
|
775
|
+
console.log(
|
|
776
|
+
JSON.stringify((await L()).autoDegradeIdlePfgovProfilesV2(), null, 2),
|
|
777
|
+
);
|
|
778
|
+
});
|
|
779
|
+
parent
|
|
780
|
+
.command("pfgov-auto-fail-stuck-v2")
|
|
781
|
+
.description("Auto-fail stuck routes")
|
|
782
|
+
.action(async () => {
|
|
783
|
+
console.log(
|
|
784
|
+
JSON.stringify((await L()).autoFailStuckPfgovRoutesV2(), null, 2),
|
|
785
|
+
);
|
|
786
|
+
});
|
|
787
|
+
parent
|
|
788
|
+
.command("pfgov-gov-stats-v2")
|
|
789
|
+
.description("V2 gov stats")
|
|
790
|
+
.action(async () => {
|
|
791
|
+
console.log(
|
|
792
|
+
JSON.stringify((await L()).getProtocolFusionGovStatsV2(), null, 2),
|
|
793
|
+
);
|
|
794
|
+
});
|
|
795
|
+
}
|