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/sync.js
CHANGED
|
@@ -503,3 +503,212 @@ export function registerSyncCommand(program) {
|
|
|
503
503
|
console.log(JSON.stringify(flipped, null, 2));
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
+
|
|
507
|
+
// === Iter19 V2 governance overlay ===
|
|
508
|
+
export function registerSyncgovV2Commands(program) {
|
|
509
|
+
const parent = program.commands.find((c) => c.name() === "sync");
|
|
510
|
+
if (!parent) return;
|
|
511
|
+
const L = async () => await import("../lib/sync-manager.js");
|
|
512
|
+
parent
|
|
513
|
+
.command("syncgov-enums-v2")
|
|
514
|
+
.description("Show V2 enums")
|
|
515
|
+
.action(async () => {
|
|
516
|
+
const m = await L();
|
|
517
|
+
console.log(
|
|
518
|
+
JSON.stringify(
|
|
519
|
+
{
|
|
520
|
+
profileMaturity: m.SYNCGOV_PROFILE_MATURITY_V2,
|
|
521
|
+
batchLifecycle: m.SYNCGOV_BATCH_LIFECYCLE_V2,
|
|
522
|
+
},
|
|
523
|
+
null,
|
|
524
|
+
2,
|
|
525
|
+
),
|
|
526
|
+
);
|
|
527
|
+
});
|
|
528
|
+
parent
|
|
529
|
+
.command("syncgov-config-v2")
|
|
530
|
+
.description("Show V2 config")
|
|
531
|
+
.action(async () => {
|
|
532
|
+
const m = await L();
|
|
533
|
+
console.log(
|
|
534
|
+
JSON.stringify(
|
|
535
|
+
{
|
|
536
|
+
maxActive: m.getMaxActiveSyncgovProfilesPerOwnerV2(),
|
|
537
|
+
maxPending: m.getMaxPendingSyncgovBatchsPerProfileV2(),
|
|
538
|
+
idleMs: m.getSyncgovProfileIdleMsV2(),
|
|
539
|
+
stuckMs: m.getSyncgovBatchStuckMsV2(),
|
|
540
|
+
},
|
|
541
|
+
null,
|
|
542
|
+
2,
|
|
543
|
+
),
|
|
544
|
+
);
|
|
545
|
+
});
|
|
546
|
+
parent
|
|
547
|
+
.command("syncgov-set-max-active-v2 <n>")
|
|
548
|
+
.description("Set max active")
|
|
549
|
+
.action(async (n) => {
|
|
550
|
+
(await L()).setMaxActiveSyncgovProfilesPerOwnerV2(Number(n));
|
|
551
|
+
console.log("ok");
|
|
552
|
+
});
|
|
553
|
+
parent
|
|
554
|
+
.command("syncgov-set-max-pending-v2 <n>")
|
|
555
|
+
.description("Set max pending")
|
|
556
|
+
.action(async (n) => {
|
|
557
|
+
(await L()).setMaxPendingSyncgovBatchsPerProfileV2(Number(n));
|
|
558
|
+
console.log("ok");
|
|
559
|
+
});
|
|
560
|
+
parent
|
|
561
|
+
.command("syncgov-set-idle-ms-v2 <n>")
|
|
562
|
+
.description("Set idle threshold ms")
|
|
563
|
+
.action(async (n) => {
|
|
564
|
+
(await L()).setSyncgovProfileIdleMsV2(Number(n));
|
|
565
|
+
console.log("ok");
|
|
566
|
+
});
|
|
567
|
+
parent
|
|
568
|
+
.command("syncgov-set-stuck-ms-v2 <n>")
|
|
569
|
+
.description("Set stuck threshold ms")
|
|
570
|
+
.action(async (n) => {
|
|
571
|
+
(await L()).setSyncgovBatchStuckMsV2(Number(n));
|
|
572
|
+
console.log("ok");
|
|
573
|
+
});
|
|
574
|
+
parent
|
|
575
|
+
.command("syncgov-register-v2 <id> <owner>")
|
|
576
|
+
.description("Register V2 profile")
|
|
577
|
+
.option("--target <v>", "target")
|
|
578
|
+
.action(async (id, owner, o) => {
|
|
579
|
+
const m = await L();
|
|
580
|
+
console.log(
|
|
581
|
+
JSON.stringify(
|
|
582
|
+
m.registerSyncgovProfileV2({ id, owner, target: o.target }),
|
|
583
|
+
null,
|
|
584
|
+
2,
|
|
585
|
+
),
|
|
586
|
+
);
|
|
587
|
+
});
|
|
588
|
+
parent
|
|
589
|
+
.command("syncgov-activate-v2 <id>")
|
|
590
|
+
.description("Activate profile")
|
|
591
|
+
.action(async (id) => {
|
|
592
|
+
console.log(
|
|
593
|
+
JSON.stringify((await L()).activateSyncgovProfileV2(id), null, 2),
|
|
594
|
+
);
|
|
595
|
+
});
|
|
596
|
+
parent
|
|
597
|
+
.command("syncgov-stale-v2 <id>")
|
|
598
|
+
.description("Stale profile")
|
|
599
|
+
.action(async (id) => {
|
|
600
|
+
console.log(
|
|
601
|
+
JSON.stringify((await L()).staleSyncgovProfileV2(id), null, 2),
|
|
602
|
+
);
|
|
603
|
+
});
|
|
604
|
+
parent
|
|
605
|
+
.command("syncgov-archive-v2 <id>")
|
|
606
|
+
.description("Archive profile")
|
|
607
|
+
.action(async (id) => {
|
|
608
|
+
console.log(
|
|
609
|
+
JSON.stringify((await L()).archiveSyncgovProfileV2(id), null, 2),
|
|
610
|
+
);
|
|
611
|
+
});
|
|
612
|
+
parent
|
|
613
|
+
.command("syncgov-touch-v2 <id>")
|
|
614
|
+
.description("Touch profile")
|
|
615
|
+
.action(async (id) => {
|
|
616
|
+
console.log(
|
|
617
|
+
JSON.stringify((await L()).touchSyncgovProfileV2(id), null, 2),
|
|
618
|
+
);
|
|
619
|
+
});
|
|
620
|
+
parent
|
|
621
|
+
.command("syncgov-get-v2 <id>")
|
|
622
|
+
.description("Get profile")
|
|
623
|
+
.action(async (id) => {
|
|
624
|
+
console.log(JSON.stringify((await L()).getSyncgovProfileV2(id), null, 2));
|
|
625
|
+
});
|
|
626
|
+
parent
|
|
627
|
+
.command("syncgov-list-v2")
|
|
628
|
+
.description("List profiles")
|
|
629
|
+
.action(async () => {
|
|
630
|
+
console.log(JSON.stringify((await L()).listSyncgovProfilesV2(), null, 2));
|
|
631
|
+
});
|
|
632
|
+
parent
|
|
633
|
+
.command("syncgov-create-batch-v2 <id> <profileId>")
|
|
634
|
+
.description("Create batch")
|
|
635
|
+
.option("--scope <v>", "scope")
|
|
636
|
+
.action(async (id, profileId, o) => {
|
|
637
|
+
const m = await L();
|
|
638
|
+
console.log(
|
|
639
|
+
JSON.stringify(
|
|
640
|
+
m.createSyncgovBatchV2({ id, profileId, scope: o.scope }),
|
|
641
|
+
null,
|
|
642
|
+
2,
|
|
643
|
+
),
|
|
644
|
+
);
|
|
645
|
+
});
|
|
646
|
+
parent
|
|
647
|
+
.command("syncgov-replicating-batch-v2 <id>")
|
|
648
|
+
.description("Mark batch as replicating")
|
|
649
|
+
.action(async (id) => {
|
|
650
|
+
console.log(
|
|
651
|
+
JSON.stringify((await L()).replicatingSyncgovBatchV2(id), null, 2),
|
|
652
|
+
);
|
|
653
|
+
});
|
|
654
|
+
parent
|
|
655
|
+
.command("syncgov-complete-batch-v2 <id>")
|
|
656
|
+
.description("Complete batch")
|
|
657
|
+
.action(async (id) => {
|
|
658
|
+
console.log(
|
|
659
|
+
JSON.stringify((await L()).completeBatchSyncgovV2(id), null, 2),
|
|
660
|
+
);
|
|
661
|
+
});
|
|
662
|
+
parent
|
|
663
|
+
.command("syncgov-fail-batch-v2 <id> [reason]")
|
|
664
|
+
.description("Fail batch")
|
|
665
|
+
.action(async (id, reason) => {
|
|
666
|
+
console.log(
|
|
667
|
+
JSON.stringify((await L()).failSyncgovBatchV2(id, reason), null, 2),
|
|
668
|
+
);
|
|
669
|
+
});
|
|
670
|
+
parent
|
|
671
|
+
.command("syncgov-cancel-batch-v2 <id> [reason]")
|
|
672
|
+
.description("Cancel batch")
|
|
673
|
+
.action(async (id, reason) => {
|
|
674
|
+
console.log(
|
|
675
|
+
JSON.stringify((await L()).cancelSyncgovBatchV2(id, reason), null, 2),
|
|
676
|
+
);
|
|
677
|
+
});
|
|
678
|
+
parent
|
|
679
|
+
.command("syncgov-get-batch-v2 <id>")
|
|
680
|
+
.description("Get batch")
|
|
681
|
+
.action(async (id) => {
|
|
682
|
+
console.log(JSON.stringify((await L()).getSyncgovBatchV2(id), null, 2));
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("syncgov-list-batchs-v2")
|
|
686
|
+
.description("List batchs")
|
|
687
|
+
.action(async () => {
|
|
688
|
+
console.log(JSON.stringify((await L()).listSyncgovBatchsV2(), null, 2));
|
|
689
|
+
});
|
|
690
|
+
parent
|
|
691
|
+
.command("syncgov-auto-stale-idle-v2")
|
|
692
|
+
.description("Auto-stale idle")
|
|
693
|
+
.action(async () => {
|
|
694
|
+
console.log(
|
|
695
|
+
JSON.stringify((await L()).autoStaleIdleSyncgovProfilesV2(), null, 2),
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
parent
|
|
699
|
+
.command("syncgov-auto-fail-stuck-v2")
|
|
700
|
+
.description("Auto-fail stuck batchs")
|
|
701
|
+
.action(async () => {
|
|
702
|
+
console.log(
|
|
703
|
+
JSON.stringify((await L()).autoFailStuckSyncgovBatchsV2(), null, 2),
|
|
704
|
+
);
|
|
705
|
+
});
|
|
706
|
+
parent
|
|
707
|
+
.command("syncgov-gov-stats-v2")
|
|
708
|
+
.description("V2 gov stats")
|
|
709
|
+
.action(async () => {
|
|
710
|
+
console.log(
|
|
711
|
+
JSON.stringify((await L()).getSyncManagerGovStatsV2(), null, 2),
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
}
|
package/src/commands/tech.js
CHANGED
|
@@ -604,3 +604,212 @@ export function registerTechCommand(program) {
|
|
|
604
604
|
console.log(JSON.stringify(autoFailStuckRunsV2(), null, 2));
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
|
+
|
|
608
|
+
// === Iter23 V2 governance overlay ===
|
|
609
|
+
export function registerTechgovV2Commands(program) {
|
|
610
|
+
const parent = program.commands.find((c) => c.name() === "tech");
|
|
611
|
+
if (!parent) return;
|
|
612
|
+
const L = async () => await import("../lib/tech-learning-engine.js");
|
|
613
|
+
parent
|
|
614
|
+
.command("techgov-enums-v2")
|
|
615
|
+
.description("Show V2 enums")
|
|
616
|
+
.action(async () => {
|
|
617
|
+
const m = await L();
|
|
618
|
+
console.log(
|
|
619
|
+
JSON.stringify(
|
|
620
|
+
{
|
|
621
|
+
profileMaturity: m.TECHGOV_PROFILE_MATURITY_V2,
|
|
622
|
+
lessonLifecycle: m.TECHGOV_LESSON_LIFECYCLE_V2,
|
|
623
|
+
},
|
|
624
|
+
null,
|
|
625
|
+
2,
|
|
626
|
+
),
|
|
627
|
+
);
|
|
628
|
+
});
|
|
629
|
+
parent
|
|
630
|
+
.command("techgov-config-v2")
|
|
631
|
+
.description("Show V2 config")
|
|
632
|
+
.action(async () => {
|
|
633
|
+
const m = await L();
|
|
634
|
+
console.log(
|
|
635
|
+
JSON.stringify(
|
|
636
|
+
{
|
|
637
|
+
maxActive: m.getMaxActiveTechgovProfilesPerOwnerV2(),
|
|
638
|
+
maxPending: m.getMaxPendingTechgovLessonsPerProfileV2(),
|
|
639
|
+
idleMs: m.getTechgovProfileIdleMsV2(),
|
|
640
|
+
stuckMs: m.getTechgovLessonStuckMsV2(),
|
|
641
|
+
},
|
|
642
|
+
null,
|
|
643
|
+
2,
|
|
644
|
+
),
|
|
645
|
+
);
|
|
646
|
+
});
|
|
647
|
+
parent
|
|
648
|
+
.command("techgov-set-max-active-v2 <n>")
|
|
649
|
+
.description("Set max active")
|
|
650
|
+
.action(async (n) => {
|
|
651
|
+
(await L()).setMaxActiveTechgovProfilesPerOwnerV2(Number(n));
|
|
652
|
+
console.log("ok");
|
|
653
|
+
});
|
|
654
|
+
parent
|
|
655
|
+
.command("techgov-set-max-pending-v2 <n>")
|
|
656
|
+
.description("Set max pending")
|
|
657
|
+
.action(async (n) => {
|
|
658
|
+
(await L()).setMaxPendingTechgovLessonsPerProfileV2(Number(n));
|
|
659
|
+
console.log("ok");
|
|
660
|
+
});
|
|
661
|
+
parent
|
|
662
|
+
.command("techgov-set-idle-ms-v2 <n>")
|
|
663
|
+
.description("Set idle threshold ms")
|
|
664
|
+
.action(async (n) => {
|
|
665
|
+
(await L()).setTechgovProfileIdleMsV2(Number(n));
|
|
666
|
+
console.log("ok");
|
|
667
|
+
});
|
|
668
|
+
parent
|
|
669
|
+
.command("techgov-set-stuck-ms-v2 <n>")
|
|
670
|
+
.description("Set stuck threshold ms")
|
|
671
|
+
.action(async (n) => {
|
|
672
|
+
(await L()).setTechgovLessonStuckMsV2(Number(n));
|
|
673
|
+
console.log("ok");
|
|
674
|
+
});
|
|
675
|
+
parent
|
|
676
|
+
.command("techgov-register-v2 <id> <owner>")
|
|
677
|
+
.description("Register V2 profile")
|
|
678
|
+
.option("--topic <v>", "topic")
|
|
679
|
+
.action(async (id, owner, o) => {
|
|
680
|
+
const m = await L();
|
|
681
|
+
console.log(
|
|
682
|
+
JSON.stringify(
|
|
683
|
+
m.registerTechgovProfileV2({ id, owner, topic: o.topic }),
|
|
684
|
+
null,
|
|
685
|
+
2,
|
|
686
|
+
),
|
|
687
|
+
);
|
|
688
|
+
});
|
|
689
|
+
parent
|
|
690
|
+
.command("techgov-activate-v2 <id>")
|
|
691
|
+
.description("Activate profile")
|
|
692
|
+
.action(async (id) => {
|
|
693
|
+
console.log(
|
|
694
|
+
JSON.stringify((await L()).activateTechgovProfileV2(id), null, 2),
|
|
695
|
+
);
|
|
696
|
+
});
|
|
697
|
+
parent
|
|
698
|
+
.command("techgov-stale-v2 <id>")
|
|
699
|
+
.description("Stale profile")
|
|
700
|
+
.action(async (id) => {
|
|
701
|
+
console.log(
|
|
702
|
+
JSON.stringify((await L()).staleTechgovProfileV2(id), null, 2),
|
|
703
|
+
);
|
|
704
|
+
});
|
|
705
|
+
parent
|
|
706
|
+
.command("techgov-archive-v2 <id>")
|
|
707
|
+
.description("Archive profile")
|
|
708
|
+
.action(async (id) => {
|
|
709
|
+
console.log(
|
|
710
|
+
JSON.stringify((await L()).archiveTechgovProfileV2(id), null, 2),
|
|
711
|
+
);
|
|
712
|
+
});
|
|
713
|
+
parent
|
|
714
|
+
.command("techgov-touch-v2 <id>")
|
|
715
|
+
.description("Touch profile")
|
|
716
|
+
.action(async (id) => {
|
|
717
|
+
console.log(
|
|
718
|
+
JSON.stringify((await L()).touchTechgovProfileV2(id), null, 2),
|
|
719
|
+
);
|
|
720
|
+
});
|
|
721
|
+
parent
|
|
722
|
+
.command("techgov-get-v2 <id>")
|
|
723
|
+
.description("Get profile")
|
|
724
|
+
.action(async (id) => {
|
|
725
|
+
console.log(JSON.stringify((await L()).getTechgovProfileV2(id), null, 2));
|
|
726
|
+
});
|
|
727
|
+
parent
|
|
728
|
+
.command("techgov-list-v2")
|
|
729
|
+
.description("List profiles")
|
|
730
|
+
.action(async () => {
|
|
731
|
+
console.log(JSON.stringify((await L()).listTechgovProfilesV2(), null, 2));
|
|
732
|
+
});
|
|
733
|
+
parent
|
|
734
|
+
.command("techgov-create-lesson-v2 <id> <profileId>")
|
|
735
|
+
.description("Create lesson")
|
|
736
|
+
.option("--source <v>", "source")
|
|
737
|
+
.action(async (id, profileId, o) => {
|
|
738
|
+
const m = await L();
|
|
739
|
+
console.log(
|
|
740
|
+
JSON.stringify(
|
|
741
|
+
m.createTechgovLessonV2({ id, profileId, source: o.source }),
|
|
742
|
+
null,
|
|
743
|
+
2,
|
|
744
|
+
),
|
|
745
|
+
);
|
|
746
|
+
});
|
|
747
|
+
parent
|
|
748
|
+
.command("techgov-studying-lesson-v2 <id>")
|
|
749
|
+
.description("Mark lesson as studying")
|
|
750
|
+
.action(async (id) => {
|
|
751
|
+
console.log(
|
|
752
|
+
JSON.stringify((await L()).studyingTechgovLessonV2(id), null, 2),
|
|
753
|
+
);
|
|
754
|
+
});
|
|
755
|
+
parent
|
|
756
|
+
.command("techgov-complete-lesson-v2 <id>")
|
|
757
|
+
.description("Complete lesson")
|
|
758
|
+
.action(async (id) => {
|
|
759
|
+
console.log(
|
|
760
|
+
JSON.stringify((await L()).completeLessonTechgovV2(id), null, 2),
|
|
761
|
+
);
|
|
762
|
+
});
|
|
763
|
+
parent
|
|
764
|
+
.command("techgov-fail-lesson-v2 <id> [reason]")
|
|
765
|
+
.description("Fail lesson")
|
|
766
|
+
.action(async (id, reason) => {
|
|
767
|
+
console.log(
|
|
768
|
+
JSON.stringify((await L()).failTechgovLessonV2(id, reason), null, 2),
|
|
769
|
+
);
|
|
770
|
+
});
|
|
771
|
+
parent
|
|
772
|
+
.command("techgov-cancel-lesson-v2 <id> [reason]")
|
|
773
|
+
.description("Cancel lesson")
|
|
774
|
+
.action(async (id, reason) => {
|
|
775
|
+
console.log(
|
|
776
|
+
JSON.stringify((await L()).cancelTechgovLessonV2(id, reason), null, 2),
|
|
777
|
+
);
|
|
778
|
+
});
|
|
779
|
+
parent
|
|
780
|
+
.command("techgov-get-lesson-v2 <id>")
|
|
781
|
+
.description("Get lesson")
|
|
782
|
+
.action(async (id) => {
|
|
783
|
+
console.log(JSON.stringify((await L()).getTechgovLessonV2(id), null, 2));
|
|
784
|
+
});
|
|
785
|
+
parent
|
|
786
|
+
.command("techgov-list-lessons-v2")
|
|
787
|
+
.description("List lessons")
|
|
788
|
+
.action(async () => {
|
|
789
|
+
console.log(JSON.stringify((await L()).listTechgovLessonsV2(), null, 2));
|
|
790
|
+
});
|
|
791
|
+
parent
|
|
792
|
+
.command("techgov-auto-stale-idle-v2")
|
|
793
|
+
.description("Auto-stale idle")
|
|
794
|
+
.action(async () => {
|
|
795
|
+
console.log(
|
|
796
|
+
JSON.stringify((await L()).autoStaleIdleTechgovProfilesV2(), null, 2),
|
|
797
|
+
);
|
|
798
|
+
});
|
|
799
|
+
parent
|
|
800
|
+
.command("techgov-auto-fail-stuck-v2")
|
|
801
|
+
.description("Auto-fail stuck lessons")
|
|
802
|
+
.action(async () => {
|
|
803
|
+
console.log(
|
|
804
|
+
JSON.stringify((await L()).autoFailStuckTechgovLessonsV2(), null, 2),
|
|
805
|
+
);
|
|
806
|
+
});
|
|
807
|
+
parent
|
|
808
|
+
.command("techgov-gov-stats-v2")
|
|
809
|
+
.description("V2 gov stats")
|
|
810
|
+
.action(async () => {
|
|
811
|
+
console.log(
|
|
812
|
+
JSON.stringify((await L()).getTechLearningEngineGovStatsV2(), null, 2),
|
|
813
|
+
);
|
|
814
|
+
});
|
|
815
|
+
}
|
package/src/commands/tenant.js
CHANGED
|
@@ -925,3 +925,220 @@ export function registerTenantCommand(program) {
|
|
|
925
925
|
else console.log(JSON.stringify(s, null, 2));
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
|
+
|
|
929
|
+
// === Iter18 V2 governance overlay ===
|
|
930
|
+
export function registerTnsgovV2Commands(program) {
|
|
931
|
+
const parent = program.commands.find((c) => c.name() === "tenant");
|
|
932
|
+
if (!parent) return;
|
|
933
|
+
const L = async () => await import("../lib/tenant-saas.js");
|
|
934
|
+
parent
|
|
935
|
+
.command("tnsgov-enums-v2")
|
|
936
|
+
.description("Show V2 enums")
|
|
937
|
+
.action(async () => {
|
|
938
|
+
const m = await L();
|
|
939
|
+
console.log(
|
|
940
|
+
JSON.stringify(
|
|
941
|
+
{
|
|
942
|
+
profileMaturity: m.TNSGOV_PROFILE_MATURITY_V2,
|
|
943
|
+
allocationLifecycle: m.TNSGOV_ALLOCATION_LIFECYCLE_V2,
|
|
944
|
+
},
|
|
945
|
+
null,
|
|
946
|
+
2,
|
|
947
|
+
),
|
|
948
|
+
);
|
|
949
|
+
});
|
|
950
|
+
parent
|
|
951
|
+
.command("tnsgov-config-v2")
|
|
952
|
+
.description("Show V2 config")
|
|
953
|
+
.action(async () => {
|
|
954
|
+
const m = await L();
|
|
955
|
+
console.log(
|
|
956
|
+
JSON.stringify(
|
|
957
|
+
{
|
|
958
|
+
maxActive: m.getMaxActiveTnsgovProfilesPerOwnerV2(),
|
|
959
|
+
maxPending: m.getMaxPendingTnsgovAllocationsPerProfileV2(),
|
|
960
|
+
idleMs: m.getTnsgovProfileIdleMsV2(),
|
|
961
|
+
stuckMs: m.getTnsgovAllocationStuckMsV2(),
|
|
962
|
+
},
|
|
963
|
+
null,
|
|
964
|
+
2,
|
|
965
|
+
),
|
|
966
|
+
);
|
|
967
|
+
});
|
|
968
|
+
parent
|
|
969
|
+
.command("tnsgov-set-max-active-v2 <n>")
|
|
970
|
+
.description("Set max active")
|
|
971
|
+
.action(async (n) => {
|
|
972
|
+
(await L()).setMaxActiveTnsgovProfilesPerOwnerV2(Number(n));
|
|
973
|
+
console.log("ok");
|
|
974
|
+
});
|
|
975
|
+
parent
|
|
976
|
+
.command("tnsgov-set-max-pending-v2 <n>")
|
|
977
|
+
.description("Set max pending")
|
|
978
|
+
.action(async (n) => {
|
|
979
|
+
(await L()).setMaxPendingTnsgovAllocationsPerProfileV2(Number(n));
|
|
980
|
+
console.log("ok");
|
|
981
|
+
});
|
|
982
|
+
parent
|
|
983
|
+
.command("tnsgov-set-idle-ms-v2 <n>")
|
|
984
|
+
.description("Set idle threshold ms")
|
|
985
|
+
.action(async (n) => {
|
|
986
|
+
(await L()).setTnsgovProfileIdleMsV2(Number(n));
|
|
987
|
+
console.log("ok");
|
|
988
|
+
});
|
|
989
|
+
parent
|
|
990
|
+
.command("tnsgov-set-stuck-ms-v2 <n>")
|
|
991
|
+
.description("Set stuck threshold ms")
|
|
992
|
+
.action(async (n) => {
|
|
993
|
+
(await L()).setTnsgovAllocationStuckMsV2(Number(n));
|
|
994
|
+
console.log("ok");
|
|
995
|
+
});
|
|
996
|
+
parent
|
|
997
|
+
.command("tnsgov-register-v2 <id> <owner>")
|
|
998
|
+
.description("Register V2 profile")
|
|
999
|
+
.option("--plan <v>", "plan")
|
|
1000
|
+
.action(async (id, owner, o) => {
|
|
1001
|
+
const m = await L();
|
|
1002
|
+
console.log(
|
|
1003
|
+
JSON.stringify(
|
|
1004
|
+
m.registerTnsgovProfileV2({ id, owner, plan: o.plan }),
|
|
1005
|
+
null,
|
|
1006
|
+
2,
|
|
1007
|
+
),
|
|
1008
|
+
);
|
|
1009
|
+
});
|
|
1010
|
+
parent
|
|
1011
|
+
.command("tnsgov-activate-v2 <id>")
|
|
1012
|
+
.description("Activate profile")
|
|
1013
|
+
.action(async (id) => {
|
|
1014
|
+
console.log(
|
|
1015
|
+
JSON.stringify((await L()).activateTnsgovProfileV2(id), null, 2),
|
|
1016
|
+
);
|
|
1017
|
+
});
|
|
1018
|
+
parent
|
|
1019
|
+
.command("tnsgov-suspend-v2 <id>")
|
|
1020
|
+
.description("Suspend profile")
|
|
1021
|
+
.action(async (id) => {
|
|
1022
|
+
console.log(
|
|
1023
|
+
JSON.stringify((await L()).suspendTnsgovProfileV2(id), null, 2),
|
|
1024
|
+
);
|
|
1025
|
+
});
|
|
1026
|
+
parent
|
|
1027
|
+
.command("tnsgov-archive-v2 <id>")
|
|
1028
|
+
.description("Archive profile")
|
|
1029
|
+
.action(async (id) => {
|
|
1030
|
+
console.log(
|
|
1031
|
+
JSON.stringify((await L()).archiveTnsgovProfileV2(id), null, 2),
|
|
1032
|
+
);
|
|
1033
|
+
});
|
|
1034
|
+
parent
|
|
1035
|
+
.command("tnsgov-touch-v2 <id>")
|
|
1036
|
+
.description("Touch profile")
|
|
1037
|
+
.action(async (id) => {
|
|
1038
|
+
console.log(
|
|
1039
|
+
JSON.stringify((await L()).touchTnsgovProfileV2(id), null, 2),
|
|
1040
|
+
);
|
|
1041
|
+
});
|
|
1042
|
+
parent
|
|
1043
|
+
.command("tnsgov-get-v2 <id>")
|
|
1044
|
+
.description("Get profile")
|
|
1045
|
+
.action(async (id) => {
|
|
1046
|
+
console.log(JSON.stringify((await L()).getTnsgovProfileV2(id), null, 2));
|
|
1047
|
+
});
|
|
1048
|
+
parent
|
|
1049
|
+
.command("tnsgov-list-v2")
|
|
1050
|
+
.description("List profiles")
|
|
1051
|
+
.action(async () => {
|
|
1052
|
+
console.log(JSON.stringify((await L()).listTnsgovProfilesV2(), null, 2));
|
|
1053
|
+
});
|
|
1054
|
+
parent
|
|
1055
|
+
.command("tnsgov-create-allocation-v2 <id> <profileId>")
|
|
1056
|
+
.description("Create allocation")
|
|
1057
|
+
.option("--resource <v>", "resource")
|
|
1058
|
+
.action(async (id, profileId, o) => {
|
|
1059
|
+
const m = await L();
|
|
1060
|
+
console.log(
|
|
1061
|
+
JSON.stringify(
|
|
1062
|
+
m.createTnsgovAllocationV2({ id, profileId, resource: o.resource }),
|
|
1063
|
+
null,
|
|
1064
|
+
2,
|
|
1065
|
+
),
|
|
1066
|
+
);
|
|
1067
|
+
});
|
|
1068
|
+
parent
|
|
1069
|
+
.command("tnsgov-provisioning-allocation-v2 <id>")
|
|
1070
|
+
.description("Mark allocation as provisioning")
|
|
1071
|
+
.action(async (id) => {
|
|
1072
|
+
console.log(
|
|
1073
|
+
JSON.stringify((await L()).provisioningTnsgovAllocationV2(id), null, 2),
|
|
1074
|
+
);
|
|
1075
|
+
});
|
|
1076
|
+
parent
|
|
1077
|
+
.command("tnsgov-complete-allocation-v2 <id>")
|
|
1078
|
+
.description("Complete allocation")
|
|
1079
|
+
.action(async (id) => {
|
|
1080
|
+
console.log(
|
|
1081
|
+
JSON.stringify((await L()).completeAllocationTnsgovV2(id), null, 2),
|
|
1082
|
+
);
|
|
1083
|
+
});
|
|
1084
|
+
parent
|
|
1085
|
+
.command("tnsgov-fail-allocation-v2 <id> [reason]")
|
|
1086
|
+
.description("Fail allocation")
|
|
1087
|
+
.action(async (id, reason) => {
|
|
1088
|
+
console.log(
|
|
1089
|
+
JSON.stringify((await L()).failTnsgovAllocationV2(id, reason), null, 2),
|
|
1090
|
+
);
|
|
1091
|
+
});
|
|
1092
|
+
parent
|
|
1093
|
+
.command("tnsgov-cancel-allocation-v2 <id> [reason]")
|
|
1094
|
+
.description("Cancel allocation")
|
|
1095
|
+
.action(async (id, reason) => {
|
|
1096
|
+
console.log(
|
|
1097
|
+
JSON.stringify(
|
|
1098
|
+
(await L()).cancelTnsgovAllocationV2(id, reason),
|
|
1099
|
+
null,
|
|
1100
|
+
2,
|
|
1101
|
+
),
|
|
1102
|
+
);
|
|
1103
|
+
});
|
|
1104
|
+
parent
|
|
1105
|
+
.command("tnsgov-get-allocation-v2 <id>")
|
|
1106
|
+
.description("Get allocation")
|
|
1107
|
+
.action(async (id) => {
|
|
1108
|
+
console.log(
|
|
1109
|
+
JSON.stringify((await L()).getTnsgovAllocationV2(id), null, 2),
|
|
1110
|
+
);
|
|
1111
|
+
});
|
|
1112
|
+
parent
|
|
1113
|
+
.command("tnsgov-list-allocations-v2")
|
|
1114
|
+
.description("List allocations")
|
|
1115
|
+
.action(async () => {
|
|
1116
|
+
console.log(
|
|
1117
|
+
JSON.stringify((await L()).listTnsgovAllocationsV2(), null, 2),
|
|
1118
|
+
);
|
|
1119
|
+
});
|
|
1120
|
+
parent
|
|
1121
|
+
.command("tnsgov-auto-suspend-idle-v2")
|
|
1122
|
+
.description("Auto-suspend idle")
|
|
1123
|
+
.action(async () => {
|
|
1124
|
+
console.log(
|
|
1125
|
+
JSON.stringify((await L()).autoSuspendIdleTnsgovProfilesV2(), null, 2),
|
|
1126
|
+
);
|
|
1127
|
+
});
|
|
1128
|
+
parent
|
|
1129
|
+
.command("tnsgov-auto-fail-stuck-v2")
|
|
1130
|
+
.description("Auto-fail stuck allocations")
|
|
1131
|
+
.action(async () => {
|
|
1132
|
+
console.log(
|
|
1133
|
+
JSON.stringify((await L()).autoFailStuckTnsgovAllocationsV2(), null, 2),
|
|
1134
|
+
);
|
|
1135
|
+
});
|
|
1136
|
+
parent
|
|
1137
|
+
.command("tnsgov-gov-stats-v2")
|
|
1138
|
+
.description("V2 gov stats")
|
|
1139
|
+
.action(async () => {
|
|
1140
|
+
console.log(
|
|
1141
|
+
JSON.stringify((await L()).getTenantSaasGovStatsV2(), null, 2),
|
|
1142
|
+
);
|
|
1143
|
+
});
|
|
1144
|
+
}
|