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/tokens.js
CHANGED
|
@@ -481,3 +481,212 @@ export function registerTokensCommand(program) {
|
|
|
481
481
|
.description("Auto-reject stale V2 records")
|
|
482
482
|
.action(() => out(true, autoRejectStaleRecordsV2()));
|
|
483
483
|
}
|
|
484
|
+
|
|
485
|
+
// === Iter24 V2 governance overlay ===
|
|
486
|
+
export function registerToktgovV2Commands(program) {
|
|
487
|
+
const parent = program.commands.find((c) => c.name() === "tokens");
|
|
488
|
+
if (!parent) return;
|
|
489
|
+
const L = async () => await import("../lib/token-tracker.js");
|
|
490
|
+
parent
|
|
491
|
+
.command("toktgov-enums-v2")
|
|
492
|
+
.description("Show V2 enums")
|
|
493
|
+
.action(async () => {
|
|
494
|
+
const m = await L();
|
|
495
|
+
console.log(
|
|
496
|
+
JSON.stringify(
|
|
497
|
+
{
|
|
498
|
+
profileMaturity: m.TOKTGOV_PROFILE_MATURITY_V2,
|
|
499
|
+
usageLifecycle: m.TOKTGOV_USAGE_LIFECYCLE_V2,
|
|
500
|
+
},
|
|
501
|
+
null,
|
|
502
|
+
2,
|
|
503
|
+
),
|
|
504
|
+
);
|
|
505
|
+
});
|
|
506
|
+
parent
|
|
507
|
+
.command("toktgov-config-v2")
|
|
508
|
+
.description("Show V2 config")
|
|
509
|
+
.action(async () => {
|
|
510
|
+
const m = await L();
|
|
511
|
+
console.log(
|
|
512
|
+
JSON.stringify(
|
|
513
|
+
{
|
|
514
|
+
maxActive: m.getMaxActiveToktgovProfilesPerOwnerV2(),
|
|
515
|
+
maxPending: m.getMaxPendingToktgovUsagesPerProfileV2(),
|
|
516
|
+
idleMs: m.getToktgovProfileIdleMsV2(),
|
|
517
|
+
stuckMs: m.getToktgovUsageStuckMsV2(),
|
|
518
|
+
},
|
|
519
|
+
null,
|
|
520
|
+
2,
|
|
521
|
+
),
|
|
522
|
+
);
|
|
523
|
+
});
|
|
524
|
+
parent
|
|
525
|
+
.command("toktgov-set-max-active-v2 <n>")
|
|
526
|
+
.description("Set max active")
|
|
527
|
+
.action(async (n) => {
|
|
528
|
+
(await L()).setMaxActiveToktgovProfilesPerOwnerV2(Number(n));
|
|
529
|
+
console.log("ok");
|
|
530
|
+
});
|
|
531
|
+
parent
|
|
532
|
+
.command("toktgov-set-max-pending-v2 <n>")
|
|
533
|
+
.description("Set max pending")
|
|
534
|
+
.action(async (n) => {
|
|
535
|
+
(await L()).setMaxPendingToktgovUsagesPerProfileV2(Number(n));
|
|
536
|
+
console.log("ok");
|
|
537
|
+
});
|
|
538
|
+
parent
|
|
539
|
+
.command("toktgov-set-idle-ms-v2 <n>")
|
|
540
|
+
.description("Set idle threshold ms")
|
|
541
|
+
.action(async (n) => {
|
|
542
|
+
(await L()).setToktgovProfileIdleMsV2(Number(n));
|
|
543
|
+
console.log("ok");
|
|
544
|
+
});
|
|
545
|
+
parent
|
|
546
|
+
.command("toktgov-set-stuck-ms-v2 <n>")
|
|
547
|
+
.description("Set stuck threshold ms")
|
|
548
|
+
.action(async (n) => {
|
|
549
|
+
(await L()).setToktgovUsageStuckMsV2(Number(n));
|
|
550
|
+
console.log("ok");
|
|
551
|
+
});
|
|
552
|
+
parent
|
|
553
|
+
.command("toktgov-register-v2 <id> <owner>")
|
|
554
|
+
.description("Register V2 profile")
|
|
555
|
+
.option("--budget <v>", "budget")
|
|
556
|
+
.action(async (id, owner, o) => {
|
|
557
|
+
const m = await L();
|
|
558
|
+
console.log(
|
|
559
|
+
JSON.stringify(
|
|
560
|
+
m.registerToktgovProfileV2({ id, owner, budget: o.budget }),
|
|
561
|
+
null,
|
|
562
|
+
2,
|
|
563
|
+
),
|
|
564
|
+
);
|
|
565
|
+
});
|
|
566
|
+
parent
|
|
567
|
+
.command("toktgov-activate-v2 <id>")
|
|
568
|
+
.description("Activate profile")
|
|
569
|
+
.action(async (id) => {
|
|
570
|
+
console.log(
|
|
571
|
+
JSON.stringify((await L()).activateToktgovProfileV2(id), null, 2),
|
|
572
|
+
);
|
|
573
|
+
});
|
|
574
|
+
parent
|
|
575
|
+
.command("toktgov-stale-v2 <id>")
|
|
576
|
+
.description("Stale profile")
|
|
577
|
+
.action(async (id) => {
|
|
578
|
+
console.log(
|
|
579
|
+
JSON.stringify((await L()).staleToktgovProfileV2(id), null, 2),
|
|
580
|
+
);
|
|
581
|
+
});
|
|
582
|
+
parent
|
|
583
|
+
.command("toktgov-archive-v2 <id>")
|
|
584
|
+
.description("Archive profile")
|
|
585
|
+
.action(async (id) => {
|
|
586
|
+
console.log(
|
|
587
|
+
JSON.stringify((await L()).archiveToktgovProfileV2(id), null, 2),
|
|
588
|
+
);
|
|
589
|
+
});
|
|
590
|
+
parent
|
|
591
|
+
.command("toktgov-touch-v2 <id>")
|
|
592
|
+
.description("Touch profile")
|
|
593
|
+
.action(async (id) => {
|
|
594
|
+
console.log(
|
|
595
|
+
JSON.stringify((await L()).touchToktgovProfileV2(id), null, 2),
|
|
596
|
+
);
|
|
597
|
+
});
|
|
598
|
+
parent
|
|
599
|
+
.command("toktgov-get-v2 <id>")
|
|
600
|
+
.description("Get profile")
|
|
601
|
+
.action(async (id) => {
|
|
602
|
+
console.log(JSON.stringify((await L()).getToktgovProfileV2(id), null, 2));
|
|
603
|
+
});
|
|
604
|
+
parent
|
|
605
|
+
.command("toktgov-list-v2")
|
|
606
|
+
.description("List profiles")
|
|
607
|
+
.action(async () => {
|
|
608
|
+
console.log(JSON.stringify((await L()).listToktgovProfilesV2(), null, 2));
|
|
609
|
+
});
|
|
610
|
+
parent
|
|
611
|
+
.command("toktgov-create-usage-v2 <id> <profileId>")
|
|
612
|
+
.description("Create usage")
|
|
613
|
+
.option("--model <v>", "model")
|
|
614
|
+
.action(async (id, profileId, o) => {
|
|
615
|
+
const m = await L();
|
|
616
|
+
console.log(
|
|
617
|
+
JSON.stringify(
|
|
618
|
+
m.createToktgovUsageV2({ id, profileId, model: o.model }),
|
|
619
|
+
null,
|
|
620
|
+
2,
|
|
621
|
+
),
|
|
622
|
+
);
|
|
623
|
+
});
|
|
624
|
+
parent
|
|
625
|
+
.command("toktgov-recording-usage-v2 <id>")
|
|
626
|
+
.description("Mark usage as recording")
|
|
627
|
+
.action(async (id) => {
|
|
628
|
+
console.log(
|
|
629
|
+
JSON.stringify((await L()).recordingToktgovUsageV2(id), null, 2),
|
|
630
|
+
);
|
|
631
|
+
});
|
|
632
|
+
parent
|
|
633
|
+
.command("toktgov-complete-usage-v2 <id>")
|
|
634
|
+
.description("Complete usage")
|
|
635
|
+
.action(async (id) => {
|
|
636
|
+
console.log(
|
|
637
|
+
JSON.stringify((await L()).completeUsageToktgovV2(id), null, 2),
|
|
638
|
+
);
|
|
639
|
+
});
|
|
640
|
+
parent
|
|
641
|
+
.command("toktgov-fail-usage-v2 <id> [reason]")
|
|
642
|
+
.description("Fail usage")
|
|
643
|
+
.action(async (id, reason) => {
|
|
644
|
+
console.log(
|
|
645
|
+
JSON.stringify((await L()).failToktgovUsageV2(id, reason), null, 2),
|
|
646
|
+
);
|
|
647
|
+
});
|
|
648
|
+
parent
|
|
649
|
+
.command("toktgov-cancel-usage-v2 <id> [reason]")
|
|
650
|
+
.description("Cancel usage")
|
|
651
|
+
.action(async (id, reason) => {
|
|
652
|
+
console.log(
|
|
653
|
+
JSON.stringify((await L()).cancelToktgovUsageV2(id, reason), null, 2),
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
parent
|
|
657
|
+
.command("toktgov-get-usage-v2 <id>")
|
|
658
|
+
.description("Get usage")
|
|
659
|
+
.action(async (id) => {
|
|
660
|
+
console.log(JSON.stringify((await L()).getToktgovUsageV2(id), null, 2));
|
|
661
|
+
});
|
|
662
|
+
parent
|
|
663
|
+
.command("toktgov-list-usages-v2")
|
|
664
|
+
.description("List usages")
|
|
665
|
+
.action(async () => {
|
|
666
|
+
console.log(JSON.stringify((await L()).listToktgovUsagesV2(), null, 2));
|
|
667
|
+
});
|
|
668
|
+
parent
|
|
669
|
+
.command("toktgov-auto-stale-idle-v2")
|
|
670
|
+
.description("Auto-stale idle")
|
|
671
|
+
.action(async () => {
|
|
672
|
+
console.log(
|
|
673
|
+
JSON.stringify((await L()).autoStaleIdleToktgovProfilesV2(), null, 2),
|
|
674
|
+
);
|
|
675
|
+
});
|
|
676
|
+
parent
|
|
677
|
+
.command("toktgov-auto-fail-stuck-v2")
|
|
678
|
+
.description("Auto-fail stuck usages")
|
|
679
|
+
.action(async () => {
|
|
680
|
+
console.log(
|
|
681
|
+
JSON.stringify((await L()).autoFailStuckToktgovUsagesV2(), null, 2),
|
|
682
|
+
);
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("toktgov-gov-stats-v2")
|
|
686
|
+
.description("V2 gov stats")
|
|
687
|
+
.action(async () => {
|
|
688
|
+
console.log(
|
|
689
|
+
JSON.stringify((await L()).getTokenTrackerGovStatsV2(), null, 2),
|
|
690
|
+
);
|
|
691
|
+
});
|
|
692
|
+
}
|
package/src/commands/trust.js
CHANGED
|
@@ -613,3 +613,220 @@ export function registerTrustCommand(program) {
|
|
|
613
613
|
|
|
614
614
|
program.addCommand(tr);
|
|
615
615
|
}
|
|
616
|
+
|
|
617
|
+
// === Iter18 V2 governance overlay ===
|
|
618
|
+
export function registerTrustgovV2Commands(program) {
|
|
619
|
+
const parent = program.commands.find((c) => c.name() === "trust");
|
|
620
|
+
if (!parent) return;
|
|
621
|
+
const L = async () => await import("../lib/trust-security.js");
|
|
622
|
+
parent
|
|
623
|
+
.command("trustgov-enums-v2")
|
|
624
|
+
.description("Show V2 enums")
|
|
625
|
+
.action(async () => {
|
|
626
|
+
const m = await L();
|
|
627
|
+
console.log(
|
|
628
|
+
JSON.stringify(
|
|
629
|
+
{
|
|
630
|
+
profileMaturity: m.TRUSTGOV_PROFILE_MATURITY_V2,
|
|
631
|
+
checkLifecycle: m.TRUSTGOV_CHECK_LIFECYCLE_V2,
|
|
632
|
+
},
|
|
633
|
+
null,
|
|
634
|
+
2,
|
|
635
|
+
),
|
|
636
|
+
);
|
|
637
|
+
});
|
|
638
|
+
parent
|
|
639
|
+
.command("trustgov-config-v2")
|
|
640
|
+
.description("Show V2 config")
|
|
641
|
+
.action(async () => {
|
|
642
|
+
const m = await L();
|
|
643
|
+
console.log(
|
|
644
|
+
JSON.stringify(
|
|
645
|
+
{
|
|
646
|
+
maxActive: m.getMaxActiveTrustgovProfilesPerOwnerV2(),
|
|
647
|
+
maxPending: m.getMaxPendingTrustgovChecksPerProfileV2(),
|
|
648
|
+
idleMs: m.getTrustgovProfileIdleMsV2(),
|
|
649
|
+
stuckMs: m.getTrustgovCheckStuckMsV2(),
|
|
650
|
+
},
|
|
651
|
+
null,
|
|
652
|
+
2,
|
|
653
|
+
),
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
parent
|
|
657
|
+
.command("trustgov-set-max-active-v2 <n>")
|
|
658
|
+
.description("Set max active")
|
|
659
|
+
.action(async (n) => {
|
|
660
|
+
(await L()).setMaxActiveTrustgovProfilesPerOwnerV2(Number(n));
|
|
661
|
+
console.log("ok");
|
|
662
|
+
});
|
|
663
|
+
parent
|
|
664
|
+
.command("trustgov-set-max-pending-v2 <n>")
|
|
665
|
+
.description("Set max pending")
|
|
666
|
+
.action(async (n) => {
|
|
667
|
+
(await L()).setMaxPendingTrustgovChecksPerProfileV2(Number(n));
|
|
668
|
+
console.log("ok");
|
|
669
|
+
});
|
|
670
|
+
parent
|
|
671
|
+
.command("trustgov-set-idle-ms-v2 <n>")
|
|
672
|
+
.description("Set idle threshold ms")
|
|
673
|
+
.action(async (n) => {
|
|
674
|
+
(await L()).setTrustgovProfileIdleMsV2(Number(n));
|
|
675
|
+
console.log("ok");
|
|
676
|
+
});
|
|
677
|
+
parent
|
|
678
|
+
.command("trustgov-set-stuck-ms-v2 <n>")
|
|
679
|
+
.description("Set stuck threshold ms")
|
|
680
|
+
.action(async (n) => {
|
|
681
|
+
(await L()).setTrustgovCheckStuckMsV2(Number(n));
|
|
682
|
+
console.log("ok");
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("trustgov-register-v2 <id> <owner>")
|
|
686
|
+
.description("Register V2 profile")
|
|
687
|
+
.option("--level <v>", "level")
|
|
688
|
+
.action(async (id, owner, o) => {
|
|
689
|
+
const m = await L();
|
|
690
|
+
console.log(
|
|
691
|
+
JSON.stringify(
|
|
692
|
+
m.registerTrustgovProfileV2({ id, owner, level: o.level }),
|
|
693
|
+
null,
|
|
694
|
+
2,
|
|
695
|
+
),
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
parent
|
|
699
|
+
.command("trustgov-activate-v2 <id>")
|
|
700
|
+
.description("Activate profile")
|
|
701
|
+
.action(async (id) => {
|
|
702
|
+
console.log(
|
|
703
|
+
JSON.stringify((await L()).activateTrustgovProfileV2(id), null, 2),
|
|
704
|
+
);
|
|
705
|
+
});
|
|
706
|
+
parent
|
|
707
|
+
.command("trustgov-suspend-v2 <id>")
|
|
708
|
+
.description("Suspend profile")
|
|
709
|
+
.action(async (id) => {
|
|
710
|
+
console.log(
|
|
711
|
+
JSON.stringify((await L()).suspendTrustgovProfileV2(id), null, 2),
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
parent
|
|
715
|
+
.command("trustgov-archive-v2 <id>")
|
|
716
|
+
.description("Archive profile")
|
|
717
|
+
.action(async (id) => {
|
|
718
|
+
console.log(
|
|
719
|
+
JSON.stringify((await L()).archiveTrustgovProfileV2(id), null, 2),
|
|
720
|
+
);
|
|
721
|
+
});
|
|
722
|
+
parent
|
|
723
|
+
.command("trustgov-touch-v2 <id>")
|
|
724
|
+
.description("Touch profile")
|
|
725
|
+
.action(async (id) => {
|
|
726
|
+
console.log(
|
|
727
|
+
JSON.stringify((await L()).touchTrustgovProfileV2(id), null, 2),
|
|
728
|
+
);
|
|
729
|
+
});
|
|
730
|
+
parent
|
|
731
|
+
.command("trustgov-get-v2 <id>")
|
|
732
|
+
.description("Get profile")
|
|
733
|
+
.action(async (id) => {
|
|
734
|
+
console.log(
|
|
735
|
+
JSON.stringify((await L()).getTrustgovProfileV2(id), null, 2),
|
|
736
|
+
);
|
|
737
|
+
});
|
|
738
|
+
parent
|
|
739
|
+
.command("trustgov-list-v2")
|
|
740
|
+
.description("List profiles")
|
|
741
|
+
.action(async () => {
|
|
742
|
+
console.log(
|
|
743
|
+
JSON.stringify((await L()).listTrustgovProfilesV2(), null, 2),
|
|
744
|
+
);
|
|
745
|
+
});
|
|
746
|
+
parent
|
|
747
|
+
.command("trustgov-create-check-v2 <id> <profileId>")
|
|
748
|
+
.description("Create check")
|
|
749
|
+
.option("--subject <v>", "subject")
|
|
750
|
+
.action(async (id, profileId, o) => {
|
|
751
|
+
const m = await L();
|
|
752
|
+
console.log(
|
|
753
|
+
JSON.stringify(
|
|
754
|
+
m.createTrustgovCheckV2({ id, profileId, subject: o.subject }),
|
|
755
|
+
null,
|
|
756
|
+
2,
|
|
757
|
+
),
|
|
758
|
+
);
|
|
759
|
+
});
|
|
760
|
+
parent
|
|
761
|
+
.command("trustgov-verifying-check-v2 <id>")
|
|
762
|
+
.description("Mark check as verifying")
|
|
763
|
+
.action(async (id) => {
|
|
764
|
+
console.log(
|
|
765
|
+
JSON.stringify((await L()).verifyingTrustgovCheckV2(id), null, 2),
|
|
766
|
+
);
|
|
767
|
+
});
|
|
768
|
+
parent
|
|
769
|
+
.command("trustgov-complete-check-v2 <id>")
|
|
770
|
+
.description("Complete check")
|
|
771
|
+
.action(async (id) => {
|
|
772
|
+
console.log(
|
|
773
|
+
JSON.stringify((await L()).completeCheckTrustgovV2(id), null, 2),
|
|
774
|
+
);
|
|
775
|
+
});
|
|
776
|
+
parent
|
|
777
|
+
.command("trustgov-fail-check-v2 <id> [reason]")
|
|
778
|
+
.description("Fail check")
|
|
779
|
+
.action(async (id, reason) => {
|
|
780
|
+
console.log(
|
|
781
|
+
JSON.stringify((await L()).failTrustgovCheckV2(id, reason), null, 2),
|
|
782
|
+
);
|
|
783
|
+
});
|
|
784
|
+
parent
|
|
785
|
+
.command("trustgov-cancel-check-v2 <id> [reason]")
|
|
786
|
+
.description("Cancel check")
|
|
787
|
+
.action(async (id, reason) => {
|
|
788
|
+
console.log(
|
|
789
|
+
JSON.stringify((await L()).cancelTrustgovCheckV2(id, reason), null, 2),
|
|
790
|
+
);
|
|
791
|
+
});
|
|
792
|
+
parent
|
|
793
|
+
.command("trustgov-get-check-v2 <id>")
|
|
794
|
+
.description("Get check")
|
|
795
|
+
.action(async (id) => {
|
|
796
|
+
console.log(JSON.stringify((await L()).getTrustgovCheckV2(id), null, 2));
|
|
797
|
+
});
|
|
798
|
+
parent
|
|
799
|
+
.command("trustgov-list-checks-v2")
|
|
800
|
+
.description("List checks")
|
|
801
|
+
.action(async () => {
|
|
802
|
+
console.log(JSON.stringify((await L()).listTrustgovChecksV2(), null, 2));
|
|
803
|
+
});
|
|
804
|
+
parent
|
|
805
|
+
.command("trustgov-auto-suspend-idle-v2")
|
|
806
|
+
.description("Auto-suspend idle")
|
|
807
|
+
.action(async () => {
|
|
808
|
+
console.log(
|
|
809
|
+
JSON.stringify(
|
|
810
|
+
(await L()).autoSuspendIdleTrustgovProfilesV2(),
|
|
811
|
+
null,
|
|
812
|
+
2,
|
|
813
|
+
),
|
|
814
|
+
);
|
|
815
|
+
});
|
|
816
|
+
parent
|
|
817
|
+
.command("trustgov-auto-fail-stuck-v2")
|
|
818
|
+
.description("Auto-fail stuck checks")
|
|
819
|
+
.action(async () => {
|
|
820
|
+
console.log(
|
|
821
|
+
JSON.stringify((await L()).autoFailStuckTrustgovChecksV2(), null, 2),
|
|
822
|
+
);
|
|
823
|
+
});
|
|
824
|
+
parent
|
|
825
|
+
.command("trustgov-gov-stats-v2")
|
|
826
|
+
.description("V2 gov stats")
|
|
827
|
+
.action(async () => {
|
|
828
|
+
console.log(
|
|
829
|
+
JSON.stringify((await L()).getTrustSecurityGovStatsV2(), null, 2),
|
|
830
|
+
);
|
|
831
|
+
});
|
|
832
|
+
}
|
package/src/commands/ui.js
CHANGED
|
@@ -34,3 +34,228 @@ export function registerUiCommand(program) {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
// === Iter26 V2 governance overlay ===
|
|
39
|
+
export function registerWebuigovV2Commands(program) {
|
|
40
|
+
const parent = program.commands.find((c) => c.name() === "ui");
|
|
41
|
+
if (!parent) return;
|
|
42
|
+
const L = async () => await import("../lib/web-ui-server.js");
|
|
43
|
+
parent
|
|
44
|
+
.command("webuigov-enums-v2")
|
|
45
|
+
.description("Show V2 enums")
|
|
46
|
+
.action(async () => {
|
|
47
|
+
const m = await L();
|
|
48
|
+
console.log(
|
|
49
|
+
JSON.stringify(
|
|
50
|
+
{
|
|
51
|
+
profileMaturity: m.WEBUIGOV_PROFILE_MATURITY_V2,
|
|
52
|
+
requestLifecycle: m.WEBUIGOV_REQUEST_LIFECYCLE_V2,
|
|
53
|
+
},
|
|
54
|
+
null,
|
|
55
|
+
2,
|
|
56
|
+
),
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
parent
|
|
60
|
+
.command("webuigov-config-v2")
|
|
61
|
+
.description("Show V2 config")
|
|
62
|
+
.action(async () => {
|
|
63
|
+
const m = await L();
|
|
64
|
+
console.log(
|
|
65
|
+
JSON.stringify(
|
|
66
|
+
{
|
|
67
|
+
maxActive: m.getMaxActiveWebuigovProfilesPerOwnerV2(),
|
|
68
|
+
maxPending: m.getMaxPendingWebuigovRequestsPerProfileV2(),
|
|
69
|
+
idleMs: m.getWebuigovProfileIdleMsV2(),
|
|
70
|
+
stuckMs: m.getWebuigovRequestStuckMsV2(),
|
|
71
|
+
},
|
|
72
|
+
null,
|
|
73
|
+
2,
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
parent
|
|
78
|
+
.command("webuigov-set-max-active-v2 <n>")
|
|
79
|
+
.description("Set max active")
|
|
80
|
+
.action(async (n) => {
|
|
81
|
+
(await L()).setMaxActiveWebuigovProfilesPerOwnerV2(Number(n));
|
|
82
|
+
console.log("ok");
|
|
83
|
+
});
|
|
84
|
+
parent
|
|
85
|
+
.command("webuigov-set-max-pending-v2 <n>")
|
|
86
|
+
.description("Set max pending")
|
|
87
|
+
.action(async (n) => {
|
|
88
|
+
(await L()).setMaxPendingWebuigovRequestsPerProfileV2(Number(n));
|
|
89
|
+
console.log("ok");
|
|
90
|
+
});
|
|
91
|
+
parent
|
|
92
|
+
.command("webuigov-set-idle-ms-v2 <n>")
|
|
93
|
+
.description("Set idle threshold ms")
|
|
94
|
+
.action(async (n) => {
|
|
95
|
+
(await L()).setWebuigovProfileIdleMsV2(Number(n));
|
|
96
|
+
console.log("ok");
|
|
97
|
+
});
|
|
98
|
+
parent
|
|
99
|
+
.command("webuigov-set-stuck-ms-v2 <n>")
|
|
100
|
+
.description("Set stuck threshold ms")
|
|
101
|
+
.action(async (n) => {
|
|
102
|
+
(await L()).setWebuigovRequestStuckMsV2(Number(n));
|
|
103
|
+
console.log("ok");
|
|
104
|
+
});
|
|
105
|
+
parent
|
|
106
|
+
.command("webuigov-register-v2 <id> <owner>")
|
|
107
|
+
.description("Register V2 profile")
|
|
108
|
+
.option("--endpoint <v>", "endpoint")
|
|
109
|
+
.action(async (id, owner, o) => {
|
|
110
|
+
const m = await L();
|
|
111
|
+
console.log(
|
|
112
|
+
JSON.stringify(
|
|
113
|
+
m.registerWebuigovProfileV2({ id, owner, endpoint: o.endpoint }),
|
|
114
|
+
null,
|
|
115
|
+
2,
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
});
|
|
119
|
+
parent
|
|
120
|
+
.command("webuigov-activate-v2 <id>")
|
|
121
|
+
.description("Activate profile")
|
|
122
|
+
.action(async (id) => {
|
|
123
|
+
console.log(
|
|
124
|
+
JSON.stringify((await L()).activateWebuigovProfileV2(id), null, 2),
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
parent
|
|
128
|
+
.command("webuigov-degrade-v2 <id>")
|
|
129
|
+
.description("Degrade profile")
|
|
130
|
+
.action(async (id) => {
|
|
131
|
+
console.log(
|
|
132
|
+
JSON.stringify((await L()).degradeWebuigovProfileV2(id), null, 2),
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
parent
|
|
136
|
+
.command("webuigov-archive-v2 <id>")
|
|
137
|
+
.description("Archive profile")
|
|
138
|
+
.action(async (id) => {
|
|
139
|
+
console.log(
|
|
140
|
+
JSON.stringify((await L()).archiveWebuigovProfileV2(id), null, 2),
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
parent
|
|
144
|
+
.command("webuigov-touch-v2 <id>")
|
|
145
|
+
.description("Touch profile")
|
|
146
|
+
.action(async (id) => {
|
|
147
|
+
console.log(
|
|
148
|
+
JSON.stringify((await L()).touchWebuigovProfileV2(id), null, 2),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
parent
|
|
152
|
+
.command("webuigov-get-v2 <id>")
|
|
153
|
+
.description("Get profile")
|
|
154
|
+
.action(async (id) => {
|
|
155
|
+
console.log(
|
|
156
|
+
JSON.stringify((await L()).getWebuigovProfileV2(id), null, 2),
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
parent
|
|
160
|
+
.command("webuigov-list-v2")
|
|
161
|
+
.description("List profiles")
|
|
162
|
+
.action(async () => {
|
|
163
|
+
console.log(
|
|
164
|
+
JSON.stringify((await L()).listWebuigovProfilesV2(), null, 2),
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
parent
|
|
168
|
+
.command("webuigov-create-request-v2 <id> <profileId>")
|
|
169
|
+
.description("Create request")
|
|
170
|
+
.option("--method <v>", "method")
|
|
171
|
+
.action(async (id, profileId, o) => {
|
|
172
|
+
const m = await L();
|
|
173
|
+
console.log(
|
|
174
|
+
JSON.stringify(
|
|
175
|
+
m.createWebuigovRequestV2({ id, profileId, method: o.method }),
|
|
176
|
+
null,
|
|
177
|
+
2,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
});
|
|
181
|
+
parent
|
|
182
|
+
.command("webuigov-serving-request-v2 <id>")
|
|
183
|
+
.description("Mark request as serving")
|
|
184
|
+
.action(async (id) => {
|
|
185
|
+
console.log(
|
|
186
|
+
JSON.stringify((await L()).servingWebuigovRequestV2(id), null, 2),
|
|
187
|
+
);
|
|
188
|
+
});
|
|
189
|
+
parent
|
|
190
|
+
.command("webuigov-complete-request-v2 <id>")
|
|
191
|
+
.description("Complete request")
|
|
192
|
+
.action(async (id) => {
|
|
193
|
+
console.log(
|
|
194
|
+
JSON.stringify((await L()).completeRequestWebuigovV2(id), null, 2),
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
parent
|
|
198
|
+
.command("webuigov-fail-request-v2 <id> [reason]")
|
|
199
|
+
.description("Fail request")
|
|
200
|
+
.action(async (id, reason) => {
|
|
201
|
+
console.log(
|
|
202
|
+
JSON.stringify((await L()).failWebuigovRequestV2(id, reason), null, 2),
|
|
203
|
+
);
|
|
204
|
+
});
|
|
205
|
+
parent
|
|
206
|
+
.command("webuigov-cancel-request-v2 <id> [reason]")
|
|
207
|
+
.description("Cancel request")
|
|
208
|
+
.action(async (id, reason) => {
|
|
209
|
+
console.log(
|
|
210
|
+
JSON.stringify(
|
|
211
|
+
(await L()).cancelWebuigovRequestV2(id, reason),
|
|
212
|
+
null,
|
|
213
|
+
2,
|
|
214
|
+
),
|
|
215
|
+
);
|
|
216
|
+
});
|
|
217
|
+
parent
|
|
218
|
+
.command("webuigov-get-request-v2 <id>")
|
|
219
|
+
.description("Get request")
|
|
220
|
+
.action(async (id) => {
|
|
221
|
+
console.log(
|
|
222
|
+
JSON.stringify((await L()).getWebuigovRequestV2(id), null, 2),
|
|
223
|
+
);
|
|
224
|
+
});
|
|
225
|
+
parent
|
|
226
|
+
.command("webuigov-list-requests-v2")
|
|
227
|
+
.description("List requests")
|
|
228
|
+
.action(async () => {
|
|
229
|
+
console.log(
|
|
230
|
+
JSON.stringify((await L()).listWebuigovRequestsV2(), null, 2),
|
|
231
|
+
);
|
|
232
|
+
});
|
|
233
|
+
parent
|
|
234
|
+
.command("webuigov-auto-degrade-idle-v2")
|
|
235
|
+
.description("Auto-degrade idle")
|
|
236
|
+
.action(async () => {
|
|
237
|
+
console.log(
|
|
238
|
+
JSON.stringify(
|
|
239
|
+
(await L()).autoDegradeIdleWebuigovProfilesV2(),
|
|
240
|
+
null,
|
|
241
|
+
2,
|
|
242
|
+
),
|
|
243
|
+
);
|
|
244
|
+
});
|
|
245
|
+
parent
|
|
246
|
+
.command("webuigov-auto-fail-stuck-v2")
|
|
247
|
+
.description("Auto-fail stuck requests")
|
|
248
|
+
.action(async () => {
|
|
249
|
+
console.log(
|
|
250
|
+
JSON.stringify((await L()).autoFailStuckWebuigovRequestsV2(), null, 2),
|
|
251
|
+
);
|
|
252
|
+
});
|
|
253
|
+
parent
|
|
254
|
+
.command("webuigov-gov-stats-v2")
|
|
255
|
+
.description("V2 gov stats")
|
|
256
|
+
.action(async () => {
|
|
257
|
+
console.log(
|
|
258
|
+
JSON.stringify((await L()).getWebUiServerGovStatsV2(), null, 2),
|
|
259
|
+
);
|
|
260
|
+
});
|
|
261
|
+
}
|