chainlesschain 0.143.0 → 0.152.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/package.json +1 -1
- package/src/commands/a2a.js +196 -28
- package/src/commands/activitypub.js +364 -27
- package/src/commands/agent-network.js +217 -0
- package/src/commands/agent.js +587 -103
- package/src/commands/audit.js +206 -0
- package/src/commands/automation.js +201 -0
- package/src/commands/bi.js +355 -27
- package/src/commands/bm25.js +111 -27
- package/src/commands/browse.js +403 -29
- package/src/commands/ccron.js +128 -28
- package/src/commands/chat.js +207 -0
- package/src/commands/codegen.js +207 -0
- package/src/commands/collab.js +211 -0
- package/src/commands/compliance.js +824 -34
- package/src/commands/compt.js +127 -29
- package/src/commands/consol.js +8 -2
- package/src/commands/cowork.js +783 -34
- package/src/commands/crosschain.js +182 -28
- package/src/commands/dao.js +182 -28
- 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 +385 -27
- package/src/commands/economy.js +205 -50
- package/src/commands/evolution.js +203 -50
- package/src/commands/evomap.js +387 -27
- package/src/commands/export.js +213 -0
- package/src/commands/federation.js +209 -0
- package/src/commands/fflag.js +74 -22
- package/src/commands/fusion.js +205 -0
- package/src/commands/git.js +177 -37
- package/src/commands/governance.js +209 -0
- package/src/commands/hardening.js +209 -0
- package/src/commands/hmemory.js +204 -50
- package/src/commands/hook.js +209 -0
- package/src/commands/import.js +209 -0
- package/src/commands/incentive.js +209 -0
- package/src/commands/inference.js +170 -34
- package/src/commands/infra.js +203 -0
- package/src/commands/instinct.js +209 -0
- package/src/commands/ipfs.js +207 -0
- package/src/commands/itbudget.js +149 -33
- package/src/commands/kg.js +206 -0
- package/src/commands/llm.js +217 -0
- package/src/commands/lowcode.js +195 -38
- package/src/commands/marketplace.js +206 -0
- package/src/commands/matrix.js +386 -27
- package/src/commands/mcp.js +217 -0
- package/src/commands/mcpscaf.js +145 -33
- package/src/commands/meminj.js +145 -33
- package/src/commands/memory.js +209 -0
- package/src/commands/multimodal.js +203 -0
- package/src/commands/nlprog.js +225 -0
- package/src/commands/nostr.js +387 -27
- package/src/commands/note.js +205 -0
- package/src/commands/ops.js +219 -0
- package/src/commands/orchestrate.js +217 -0
- package/src/commands/orchgov.js +144 -33
- package/src/commands/org.js +209 -0
- package/src/commands/p2p.js +209 -0
- package/src/commands/pdfp.js +109 -27
- package/src/commands/perception.js +209 -0
- package/src/commands/perf.js +169 -32
- package/src/commands/perm.js +144 -33
- package/src/commands/permmem.js +203 -0
- package/src/commands/pipeline.js +207 -52
- package/src/commands/planmode.js +141 -32
- package/src/commands/plugin-ecosystem.js +209 -0
- package/src/commands/pqc.js +213 -0
- package/src/commands/privacy.js +203 -0
- package/src/commands/promcomp.js +111 -27
- package/src/commands/quantization.js +207 -0
- package/src/commands/rcache.js +205 -0
- package/src/commands/recommend.js +410 -34
- package/src/commands/reputation.js +208 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/sandbox.js +206 -0
- package/src/commands/scim.js +209 -0
- package/src/commands/seshhook.js +145 -33
- package/src/commands/seshsearch.js +141 -33
- package/src/commands/seshtail.js +144 -33
- package/src/commands/seshu.js +152 -33
- package/src/commands/session.js +209 -0
- package/src/commands/sganal.js +123 -29
- package/src/commands/siem.js +201 -34
- package/src/commands/skill.js +207 -0
- package/src/commands/sla.js +212 -0
- package/src/commands/slotfill.js +146 -33
- package/src/commands/social.js +358 -32
- package/src/commands/sso.js +209 -0
- package/src/commands/stress.js +206 -0
- package/src/commands/svccont.js +145 -33
- package/src/commands/sync.js +209 -0
- package/src/commands/tech.js +209 -0
- package/src/commands/tenant.js +217 -0
- package/src/commands/terraform.js +206 -0
- package/src/commands/tms.js +171 -33
- package/src/commands/tokens.js +209 -0
- package/src/commands/topiccls.js +146 -33
- package/src/commands/trust.js +217 -0
- package/src/commands/uprof.js +141 -32
- package/src/commands/vcheck.js +122 -28
- package/src/commands/wallet.js +209 -0
- package/src/commands/webfetch.js +141 -32
- package/src/commands/workflow.js +203 -0
- package/src/commands/zkp.js +184 -28
- package/src/index.js +180 -0
- package/src/lib/a2a-protocol.js +319 -51
- package/src/lib/activitypub-bridge.js +622 -50
- package/src/lib/agent-economy.js +304 -51
- package/src/lib/agent-network.js +341 -0
- package/src/lib/aiops.js +346 -0
- package/src/lib/app-builder.js +279 -46
- package/src/lib/audit-logger.js +321 -0
- package/src/lib/automation-engine.js +335 -0
- package/src/lib/autonomous-agent.js +284 -48
- package/src/lib/autonomous-developer.js +332 -0
- package/src/lib/bi-engine.js +616 -49
- package/src/lib/bm25-search.js +301 -49
- package/src/lib/browser-automation.js +630 -49
- package/src/lib/chat-core.js +336 -0
- package/src/lib/claude-code-bridge.js +341 -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-framework-reporter.js +305 -51
- package/src/lib/compliance-manager.js +330 -0
- package/src/lib/compression-telemetry.js +301 -49
- package/src/lib/content-recommendation.js +351 -0
- package/src/lib/content-recommender.js +317 -52
- package/src/lib/cowork-cron.js +298 -49
- package/src/lib/cowork-learning.js +333 -0
- package/src/lib/cowork-share.js +338 -0
- package/src/lib/cowork-task-runner.js +308 -51
- package/src/lib/cowork-workflow.js +327 -0
- package/src/lib/cross-chain.js +311 -51
- package/src/lib/dao-governance.js +280 -46
- 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 +626 -49
- package/src/lib/evolution-system.js +278 -47
- package/src/lib/evomap-governance.js +334 -0
- package/src/lib/evomap-manager.js +280 -46
- package/src/lib/execution-backend.js +294 -48
- package/src/lib/feature-flags.js +294 -49
- package/src/lib/federation-hardening.js +340 -0
- package/src/lib/git-integration.js +285 -47
- package/src/lib/hardening-manager.js +341 -0
- package/src/lib/hierarchical-memory.js +284 -48
- package/src/lib/hook-manager.js +341 -0
- package/src/lib/inference-network.js +308 -51
- package/src/lib/instinct-manager.js +346 -0
- package/src/lib/ipfs-storage.js +334 -0
- package/src/lib/iteration-budget.js +302 -50
- package/src/lib/knowledge-exporter.js +341 -0
- package/src/lib/knowledge-graph.js +333 -0
- package/src/lib/knowledge-importer.js +341 -0
- package/src/lib/llm-providers.js +346 -0
- package/src/lib/matrix-bridge.js +620 -47
- package/src/lib/mcp-registry.js +346 -0
- package/src/lib/mcp-scaffold.js +318 -54
- package/src/lib/memory-injection.js +288 -49
- 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 +622 -49
- package/src/lib/note-versioning.js +339 -0
- package/src/lib/orchestrator.js +293 -48
- package/src/lib/org-manager.js +336 -0
- package/src/lib/p2p-manager.js +341 -0
- package/src/lib/pdf-parser.js +298 -49
- package/src/lib/perception.js +346 -0
- package/src/lib/perf-tuning.js +309 -50
- package/src/lib/permanent-memory.js +327 -0
- package/src/lib/permission-engine.js +287 -49
- package/src/lib/pipeline-orchestrator.js +289 -49
- package/src/lib/plan-mode.js +298 -51
- package/src/lib/plugin-ecosystem.js +346 -0
- package/src/lib/pqc-manager.js +346 -0
- package/src/lib/privacy-computing.js +335 -0
- package/src/lib/protocol-fusion.js +338 -0
- package/src/lib/quantization.js +337 -0
- package/src/lib/reputation-optimizer.js +340 -0
- package/src/lib/response-cache.js +333 -0
- package/src/lib/sandbox-v2.js +327 -0
- package/src/lib/scim-manager.js +346 -0
- package/src/lib/service-container.js +313 -52
- package/src/lib/session-consolidator.js +296 -49
- package/src/lib/session-hooks.js +312 -53
- package/src/lib/session-manager.js +334 -0
- package/src/lib/session-search.js +304 -51
- package/src/lib/session-tail.js +288 -49
- package/src/lib/session-usage.js +298 -52
- package/src/lib/siem-exporter.js +298 -51
- package/src/lib/skill-loader.js +334 -0
- package/src/lib/skill-marketplace.js +345 -0
- package/src/lib/sla-manager.js +341 -0
- package/src/lib/slot-filler.js +303 -51
- package/src/lib/social-graph-analytics.js +295 -49
- package/src/lib/social-graph.js +272 -49
- package/src/lib/social-manager.js +330 -0
- package/src/lib/sso-manager.js +340 -0
- package/src/lib/stress-tester.js +342 -0
- package/src/lib/sub-agent-registry.js +302 -53
- package/src/lib/sync-manager.js +336 -0
- package/src/lib/task-model-selector.js +302 -50
- package/src/lib/tech-learning-engine.js +341 -0
- package/src/lib/tenant-saas.js +341 -0
- package/src/lib/terraform-manager.js +333 -0
- package/src/lib/threat-intel.js +330 -0
- package/src/lib/todo-manager.js +281 -47
- package/src/lib/token-incentive.js +341 -0
- package/src/lib/token-tracker.js +336 -0
- package/src/lib/topic-classifier.js +297 -49
- 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/user-profile.js +294 -50
- package/src/lib/version-checker.js +304 -50
- package/src/lib/wallet-manager.js +336 -0
- package/src/lib/web-fetch.js +292 -51
- package/src/lib/workflow-engine.js +330 -0
- package/src/lib/zkp-engine.js +286 -49
package/src/commands/instinct.js
CHANGED
|
@@ -460,3 +460,212 @@ export function registerInstinctCommand(program) {
|
|
|
460
460
|
console.log(JSON.stringify(autoDiscardStaleObservationsV2(), null, 2)),
|
|
461
461
|
);
|
|
462
462
|
}
|
|
463
|
+
|
|
464
|
+
// === Iter18 V2 governance overlay ===
|
|
465
|
+
export function registerInstgovV2Commands(program) {
|
|
466
|
+
const parent = program.commands.find((c) => c.name() === "instinct");
|
|
467
|
+
if (!parent) return;
|
|
468
|
+
const L = async () => await import("../lib/instinct-manager.js");
|
|
469
|
+
parent
|
|
470
|
+
.command("instgov-enums-v2")
|
|
471
|
+
.description("Show V2 enums")
|
|
472
|
+
.action(async () => {
|
|
473
|
+
const m = await L();
|
|
474
|
+
console.log(
|
|
475
|
+
JSON.stringify(
|
|
476
|
+
{
|
|
477
|
+
profileMaturity: m.INSTGOV_PROFILE_MATURITY_V2,
|
|
478
|
+
triggerLifecycle: m.INSTGOV_TRIGGER_LIFECYCLE_V2,
|
|
479
|
+
},
|
|
480
|
+
null,
|
|
481
|
+
2,
|
|
482
|
+
),
|
|
483
|
+
);
|
|
484
|
+
});
|
|
485
|
+
parent
|
|
486
|
+
.command("instgov-config-v2")
|
|
487
|
+
.description("Show V2 config")
|
|
488
|
+
.action(async () => {
|
|
489
|
+
const m = await L();
|
|
490
|
+
console.log(
|
|
491
|
+
JSON.stringify(
|
|
492
|
+
{
|
|
493
|
+
maxActive: m.getMaxActiveInstgovProfilesPerOwnerV2(),
|
|
494
|
+
maxPending: m.getMaxPendingInstgovTriggersPerProfileV2(),
|
|
495
|
+
idleMs: m.getInstgovProfileIdleMsV2(),
|
|
496
|
+
stuckMs: m.getInstgovTriggerStuckMsV2(),
|
|
497
|
+
},
|
|
498
|
+
null,
|
|
499
|
+
2,
|
|
500
|
+
),
|
|
501
|
+
);
|
|
502
|
+
});
|
|
503
|
+
parent
|
|
504
|
+
.command("instgov-set-max-active-v2 <n>")
|
|
505
|
+
.description("Set max active")
|
|
506
|
+
.action(async (n) => {
|
|
507
|
+
(await L()).setMaxActiveInstgovProfilesPerOwnerV2(Number(n));
|
|
508
|
+
console.log("ok");
|
|
509
|
+
});
|
|
510
|
+
parent
|
|
511
|
+
.command("instgov-set-max-pending-v2 <n>")
|
|
512
|
+
.description("Set max pending")
|
|
513
|
+
.action(async (n) => {
|
|
514
|
+
(await L()).setMaxPendingInstgovTriggersPerProfileV2(Number(n));
|
|
515
|
+
console.log("ok");
|
|
516
|
+
});
|
|
517
|
+
parent
|
|
518
|
+
.command("instgov-set-idle-ms-v2 <n>")
|
|
519
|
+
.description("Set idle threshold ms")
|
|
520
|
+
.action(async (n) => {
|
|
521
|
+
(await L()).setInstgovProfileIdleMsV2(Number(n));
|
|
522
|
+
console.log("ok");
|
|
523
|
+
});
|
|
524
|
+
parent
|
|
525
|
+
.command("instgov-set-stuck-ms-v2 <n>")
|
|
526
|
+
.description("Set stuck threshold ms")
|
|
527
|
+
.action(async (n) => {
|
|
528
|
+
(await L()).setInstgovTriggerStuckMsV2(Number(n));
|
|
529
|
+
console.log("ok");
|
|
530
|
+
});
|
|
531
|
+
parent
|
|
532
|
+
.command("instgov-register-v2 <id> <owner>")
|
|
533
|
+
.description("Register V2 profile")
|
|
534
|
+
.option("--priority <v>", "priority")
|
|
535
|
+
.action(async (id, owner, o) => {
|
|
536
|
+
const m = await L();
|
|
537
|
+
console.log(
|
|
538
|
+
JSON.stringify(
|
|
539
|
+
m.registerInstgovProfileV2({ id, owner, priority: o.priority }),
|
|
540
|
+
null,
|
|
541
|
+
2,
|
|
542
|
+
),
|
|
543
|
+
);
|
|
544
|
+
});
|
|
545
|
+
parent
|
|
546
|
+
.command("instgov-activate-v2 <id>")
|
|
547
|
+
.description("Activate profile")
|
|
548
|
+
.action(async (id) => {
|
|
549
|
+
console.log(
|
|
550
|
+
JSON.stringify((await L()).activateInstgovProfileV2(id), null, 2),
|
|
551
|
+
);
|
|
552
|
+
});
|
|
553
|
+
parent
|
|
554
|
+
.command("instgov-dormant-v2 <id>")
|
|
555
|
+
.description("Dormant profile")
|
|
556
|
+
.action(async (id) => {
|
|
557
|
+
console.log(
|
|
558
|
+
JSON.stringify((await L()).dormantInstgovProfileV2(id), null, 2),
|
|
559
|
+
);
|
|
560
|
+
});
|
|
561
|
+
parent
|
|
562
|
+
.command("instgov-archive-v2 <id>")
|
|
563
|
+
.description("Archive profile")
|
|
564
|
+
.action(async (id) => {
|
|
565
|
+
console.log(
|
|
566
|
+
JSON.stringify((await L()).archiveInstgovProfileV2(id), null, 2),
|
|
567
|
+
);
|
|
568
|
+
});
|
|
569
|
+
parent
|
|
570
|
+
.command("instgov-touch-v2 <id>")
|
|
571
|
+
.description("Touch profile")
|
|
572
|
+
.action(async (id) => {
|
|
573
|
+
console.log(
|
|
574
|
+
JSON.stringify((await L()).touchInstgovProfileV2(id), null, 2),
|
|
575
|
+
);
|
|
576
|
+
});
|
|
577
|
+
parent
|
|
578
|
+
.command("instgov-get-v2 <id>")
|
|
579
|
+
.description("Get profile")
|
|
580
|
+
.action(async (id) => {
|
|
581
|
+
console.log(JSON.stringify((await L()).getInstgovProfileV2(id), null, 2));
|
|
582
|
+
});
|
|
583
|
+
parent
|
|
584
|
+
.command("instgov-list-v2")
|
|
585
|
+
.description("List profiles")
|
|
586
|
+
.action(async () => {
|
|
587
|
+
console.log(JSON.stringify((await L()).listInstgovProfilesV2(), null, 2));
|
|
588
|
+
});
|
|
589
|
+
parent
|
|
590
|
+
.command("instgov-create-trigger-v2 <id> <profileId>")
|
|
591
|
+
.description("Create trigger")
|
|
592
|
+
.option("--pattern <v>", "pattern")
|
|
593
|
+
.action(async (id, profileId, o) => {
|
|
594
|
+
const m = await L();
|
|
595
|
+
console.log(
|
|
596
|
+
JSON.stringify(
|
|
597
|
+
m.createInstgovTriggerV2({ id, profileId, pattern: o.pattern }),
|
|
598
|
+
null,
|
|
599
|
+
2,
|
|
600
|
+
),
|
|
601
|
+
);
|
|
602
|
+
});
|
|
603
|
+
parent
|
|
604
|
+
.command("instgov-firing-trigger-v2 <id>")
|
|
605
|
+
.description("Mark trigger as firing")
|
|
606
|
+
.action(async (id) => {
|
|
607
|
+
console.log(
|
|
608
|
+
JSON.stringify((await L()).firingInstgovTriggerV2(id), null, 2),
|
|
609
|
+
);
|
|
610
|
+
});
|
|
611
|
+
parent
|
|
612
|
+
.command("instgov-complete-trigger-v2 <id>")
|
|
613
|
+
.description("Complete trigger")
|
|
614
|
+
.action(async (id) => {
|
|
615
|
+
console.log(
|
|
616
|
+
JSON.stringify((await L()).completeTriggerInstgovV2(id), null, 2),
|
|
617
|
+
);
|
|
618
|
+
});
|
|
619
|
+
parent
|
|
620
|
+
.command("instgov-fail-trigger-v2 <id> [reason]")
|
|
621
|
+
.description("Fail trigger")
|
|
622
|
+
.action(async (id, reason) => {
|
|
623
|
+
console.log(
|
|
624
|
+
JSON.stringify((await L()).failInstgovTriggerV2(id, reason), null, 2),
|
|
625
|
+
);
|
|
626
|
+
});
|
|
627
|
+
parent
|
|
628
|
+
.command("instgov-cancel-trigger-v2 <id> [reason]")
|
|
629
|
+
.description("Cancel trigger")
|
|
630
|
+
.action(async (id, reason) => {
|
|
631
|
+
console.log(
|
|
632
|
+
JSON.stringify((await L()).cancelInstgovTriggerV2(id, reason), null, 2),
|
|
633
|
+
);
|
|
634
|
+
});
|
|
635
|
+
parent
|
|
636
|
+
.command("instgov-get-trigger-v2 <id>")
|
|
637
|
+
.description("Get trigger")
|
|
638
|
+
.action(async (id) => {
|
|
639
|
+
console.log(JSON.stringify((await L()).getInstgovTriggerV2(id), null, 2));
|
|
640
|
+
});
|
|
641
|
+
parent
|
|
642
|
+
.command("instgov-list-triggers-v2")
|
|
643
|
+
.description("List triggers")
|
|
644
|
+
.action(async () => {
|
|
645
|
+
console.log(JSON.stringify((await L()).listInstgovTriggersV2(), null, 2));
|
|
646
|
+
});
|
|
647
|
+
parent
|
|
648
|
+
.command("instgov-auto-dormant-idle-v2")
|
|
649
|
+
.description("Auto-dormant idle")
|
|
650
|
+
.action(async () => {
|
|
651
|
+
console.log(
|
|
652
|
+
JSON.stringify((await L()).autoDormantIdleInstgovProfilesV2(), null, 2),
|
|
653
|
+
);
|
|
654
|
+
});
|
|
655
|
+
parent
|
|
656
|
+
.command("instgov-auto-fail-stuck-v2")
|
|
657
|
+
.description("Auto-fail stuck triggers")
|
|
658
|
+
.action(async () => {
|
|
659
|
+
console.log(
|
|
660
|
+
JSON.stringify((await L()).autoFailStuckInstgovTriggersV2(), null, 2),
|
|
661
|
+
);
|
|
662
|
+
});
|
|
663
|
+
parent
|
|
664
|
+
.command("instgov-gov-stats-v2")
|
|
665
|
+
.description("V2 gov stats")
|
|
666
|
+
.action(async () => {
|
|
667
|
+
console.log(
|
|
668
|
+
JSON.stringify((await L()).getInstinctManagerGovStatsV2(), null, 2),
|
|
669
|
+
);
|
|
670
|
+
});
|
|
671
|
+
}
|
package/src/commands/ipfs.js
CHANGED
|
@@ -708,3 +708,210 @@ export function registerIpfsCommand(program) {
|
|
|
708
708
|
|
|
709
709
|
program.addCommand(ipfs);
|
|
710
710
|
}
|
|
711
|
+
|
|
712
|
+
// === Iter20 V2 governance overlay ===
|
|
713
|
+
export function registerIpfsgovV2Commands(program) {
|
|
714
|
+
const parent = program.commands.find((c) => c.name() === "ipfs");
|
|
715
|
+
if (!parent) return;
|
|
716
|
+
const L = async () => await import("../lib/ipfs-storage.js");
|
|
717
|
+
parent
|
|
718
|
+
.command("ipfsgov-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.IPFSGOV_PROFILE_MATURITY_V2,
|
|
726
|
+
pinLifecycle: m.IPFSGOV_PIN_LIFECYCLE_V2,
|
|
727
|
+
},
|
|
728
|
+
null,
|
|
729
|
+
2,
|
|
730
|
+
),
|
|
731
|
+
);
|
|
732
|
+
});
|
|
733
|
+
parent
|
|
734
|
+
.command("ipfsgov-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.getMaxActiveIpfsgovProfilesPerOwnerV2(),
|
|
742
|
+
maxPending: m.getMaxPendingIpfsgovPinsPerProfileV2(),
|
|
743
|
+
idleMs: m.getIpfsgovProfileIdleMsV2(),
|
|
744
|
+
stuckMs: m.getIpfsgovPinStuckMsV2(),
|
|
745
|
+
},
|
|
746
|
+
null,
|
|
747
|
+
2,
|
|
748
|
+
),
|
|
749
|
+
);
|
|
750
|
+
});
|
|
751
|
+
parent
|
|
752
|
+
.command("ipfsgov-set-max-active-v2 <n>")
|
|
753
|
+
.description("Set max active")
|
|
754
|
+
.action(async (n) => {
|
|
755
|
+
(await L()).setMaxActiveIpfsgovProfilesPerOwnerV2(Number(n));
|
|
756
|
+
console.log("ok");
|
|
757
|
+
});
|
|
758
|
+
parent
|
|
759
|
+
.command("ipfsgov-set-max-pending-v2 <n>")
|
|
760
|
+
.description("Set max pending")
|
|
761
|
+
.action(async (n) => {
|
|
762
|
+
(await L()).setMaxPendingIpfsgovPinsPerProfileV2(Number(n));
|
|
763
|
+
console.log("ok");
|
|
764
|
+
});
|
|
765
|
+
parent
|
|
766
|
+
.command("ipfsgov-set-idle-ms-v2 <n>")
|
|
767
|
+
.description("Set idle threshold ms")
|
|
768
|
+
.action(async (n) => {
|
|
769
|
+
(await L()).setIpfsgovProfileIdleMsV2(Number(n));
|
|
770
|
+
console.log("ok");
|
|
771
|
+
});
|
|
772
|
+
parent
|
|
773
|
+
.command("ipfsgov-set-stuck-ms-v2 <n>")
|
|
774
|
+
.description("Set stuck threshold ms")
|
|
775
|
+
.action(async (n) => {
|
|
776
|
+
(await L()).setIpfsgovPinStuckMsV2(Number(n));
|
|
777
|
+
console.log("ok");
|
|
778
|
+
});
|
|
779
|
+
parent
|
|
780
|
+
.command("ipfsgov-register-v2 <id> <owner>")
|
|
781
|
+
.description("Register V2 profile")
|
|
782
|
+
.option("--mode <v>", "mode")
|
|
783
|
+
.action(async (id, owner, o) => {
|
|
784
|
+
const m = await L();
|
|
785
|
+
console.log(
|
|
786
|
+
JSON.stringify(
|
|
787
|
+
m.registerIpfsgovProfileV2({ id, owner, mode: o.mode }),
|
|
788
|
+
null,
|
|
789
|
+
2,
|
|
790
|
+
),
|
|
791
|
+
);
|
|
792
|
+
});
|
|
793
|
+
parent
|
|
794
|
+
.command("ipfsgov-activate-v2 <id>")
|
|
795
|
+
.description("Activate profile")
|
|
796
|
+
.action(async (id) => {
|
|
797
|
+
console.log(
|
|
798
|
+
JSON.stringify((await L()).activateIpfsgovProfileV2(id), null, 2),
|
|
799
|
+
);
|
|
800
|
+
});
|
|
801
|
+
parent
|
|
802
|
+
.command("ipfsgov-stale-v2 <id>")
|
|
803
|
+
.description("Stale profile")
|
|
804
|
+
.action(async (id) => {
|
|
805
|
+
console.log(
|
|
806
|
+
JSON.stringify((await L()).staleIpfsgovProfileV2(id), null, 2),
|
|
807
|
+
);
|
|
808
|
+
});
|
|
809
|
+
parent
|
|
810
|
+
.command("ipfsgov-archive-v2 <id>")
|
|
811
|
+
.description("Archive profile")
|
|
812
|
+
.action(async (id) => {
|
|
813
|
+
console.log(
|
|
814
|
+
JSON.stringify((await L()).archiveIpfsgovProfileV2(id), null, 2),
|
|
815
|
+
);
|
|
816
|
+
});
|
|
817
|
+
parent
|
|
818
|
+
.command("ipfsgov-touch-v2 <id>")
|
|
819
|
+
.description("Touch profile")
|
|
820
|
+
.action(async (id) => {
|
|
821
|
+
console.log(
|
|
822
|
+
JSON.stringify((await L()).touchIpfsgovProfileV2(id), null, 2),
|
|
823
|
+
);
|
|
824
|
+
});
|
|
825
|
+
parent
|
|
826
|
+
.command("ipfsgov-get-v2 <id>")
|
|
827
|
+
.description("Get profile")
|
|
828
|
+
.action(async (id) => {
|
|
829
|
+
console.log(JSON.stringify((await L()).getIpfsgovProfileV2(id), null, 2));
|
|
830
|
+
});
|
|
831
|
+
parent
|
|
832
|
+
.command("ipfsgov-list-v2")
|
|
833
|
+
.description("List profiles")
|
|
834
|
+
.action(async () => {
|
|
835
|
+
console.log(JSON.stringify((await L()).listIpfsgovProfilesV2(), null, 2));
|
|
836
|
+
});
|
|
837
|
+
parent
|
|
838
|
+
.command("ipfsgov-create-pin-v2 <id> <profileId>")
|
|
839
|
+
.description("Create pin")
|
|
840
|
+
.option("--cid <v>", "cid")
|
|
841
|
+
.action(async (id, profileId, o) => {
|
|
842
|
+
const m = await L();
|
|
843
|
+
console.log(
|
|
844
|
+
JSON.stringify(
|
|
845
|
+
m.createIpfsgovPinV2({ id, profileId, cid: o.cid }),
|
|
846
|
+
null,
|
|
847
|
+
2,
|
|
848
|
+
),
|
|
849
|
+
);
|
|
850
|
+
});
|
|
851
|
+
parent
|
|
852
|
+
.command("ipfsgov-pinning-pin-v2 <id>")
|
|
853
|
+
.description("Mark pin as pinning")
|
|
854
|
+
.action(async (id) => {
|
|
855
|
+
console.log(JSON.stringify((await L()).pinningIpfsgovPinV2(id), null, 2));
|
|
856
|
+
});
|
|
857
|
+
parent
|
|
858
|
+
.command("ipfsgov-complete-pin-v2 <id>")
|
|
859
|
+
.description("Complete pin")
|
|
860
|
+
.action(async (id) => {
|
|
861
|
+
console.log(
|
|
862
|
+
JSON.stringify((await L()).completePinIpfsgovV2(id), null, 2),
|
|
863
|
+
);
|
|
864
|
+
});
|
|
865
|
+
parent
|
|
866
|
+
.command("ipfsgov-fail-pin-v2 <id> [reason]")
|
|
867
|
+
.description("Fail pin")
|
|
868
|
+
.action(async (id, reason) => {
|
|
869
|
+
console.log(
|
|
870
|
+
JSON.stringify((await L()).failIpfsgovPinV2(id, reason), null, 2),
|
|
871
|
+
);
|
|
872
|
+
});
|
|
873
|
+
parent
|
|
874
|
+
.command("ipfsgov-cancel-pin-v2 <id> [reason]")
|
|
875
|
+
.description("Cancel pin")
|
|
876
|
+
.action(async (id, reason) => {
|
|
877
|
+
console.log(
|
|
878
|
+
JSON.stringify((await L()).cancelIpfsgovPinV2(id, reason), null, 2),
|
|
879
|
+
);
|
|
880
|
+
});
|
|
881
|
+
parent
|
|
882
|
+
.command("ipfsgov-get-pin-v2 <id>")
|
|
883
|
+
.description("Get pin")
|
|
884
|
+
.action(async (id) => {
|
|
885
|
+
console.log(JSON.stringify((await L()).getIpfsgovPinV2(id), null, 2));
|
|
886
|
+
});
|
|
887
|
+
parent
|
|
888
|
+
.command("ipfsgov-list-pins-v2")
|
|
889
|
+
.description("List pins")
|
|
890
|
+
.action(async () => {
|
|
891
|
+
console.log(JSON.stringify((await L()).listIpfsgovPinsV2(), null, 2));
|
|
892
|
+
});
|
|
893
|
+
parent
|
|
894
|
+
.command("ipfsgov-auto-stale-idle-v2")
|
|
895
|
+
.description("Auto-stale idle")
|
|
896
|
+
.action(async () => {
|
|
897
|
+
console.log(
|
|
898
|
+
JSON.stringify((await L()).autoStaleIdleIpfsgovProfilesV2(), null, 2),
|
|
899
|
+
);
|
|
900
|
+
});
|
|
901
|
+
parent
|
|
902
|
+
.command("ipfsgov-auto-fail-stuck-v2")
|
|
903
|
+
.description("Auto-fail stuck pins")
|
|
904
|
+
.action(async () => {
|
|
905
|
+
console.log(
|
|
906
|
+
JSON.stringify((await L()).autoFailStuckIpfsgovPinsV2(), null, 2),
|
|
907
|
+
);
|
|
908
|
+
});
|
|
909
|
+
parent
|
|
910
|
+
.command("ipfsgov-gov-stats-v2")
|
|
911
|
+
.description("V2 gov stats")
|
|
912
|
+
.action(async () => {
|
|
913
|
+
console.log(
|
|
914
|
+
JSON.stringify((await L()).getIpfsStorageGovStatsV2(), null, 2),
|
|
915
|
+
);
|
|
916
|
+
});
|
|
917
|
+
}
|
package/src/commands/itbudget.js
CHANGED
|
@@ -6,40 +6,156 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
ITER_BUDGET_PROFILE_MATURITY_V2,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
ITER_BUDGET_PROFILE_MATURITY_V2,
|
|
10
|
+
ITER_RUN_LIFECYCLE_V2,
|
|
11
|
+
setMaxActiveIterBudgetProfilesPerOwnerV2,
|
|
12
|
+
getMaxActiveIterBudgetProfilesPerOwnerV2,
|
|
13
|
+
setMaxPendingIterRunsPerProfileV2,
|
|
14
|
+
getMaxPendingIterRunsPerProfileV2,
|
|
15
|
+
setIterBudgetProfileIdleMsV2,
|
|
16
|
+
getIterBudgetProfileIdleMsV2,
|
|
17
|
+
setIterRunStuckMsV2,
|
|
18
|
+
getIterRunStuckMsV2,
|
|
19
|
+
registerIterBudgetProfileV2,
|
|
20
|
+
activateIterBudgetProfileV2,
|
|
21
|
+
pauseIterBudgetProfileV2,
|
|
22
|
+
exhaustIterBudgetProfileV2,
|
|
23
|
+
touchIterBudgetProfileV2,
|
|
24
|
+
getIterBudgetProfileV2,
|
|
25
|
+
listIterBudgetProfilesV2,
|
|
26
|
+
createIterRunV2,
|
|
27
|
+
startIterRunV2,
|
|
28
|
+
completeIterRunV2,
|
|
29
|
+
failIterRunV2,
|
|
30
|
+
cancelIterRunV2,
|
|
31
|
+
getIterRunV2,
|
|
32
|
+
listIterRunsV2,
|
|
33
|
+
autoPauseIdleIterBudgetProfilesV2,
|
|
34
|
+
autoFailStuckIterRunsV2,
|
|
35
|
+
getIterationBudgetGovStatsV2,
|
|
36
|
+
_resetStateIterationBudgetV2,
|
|
17
37
|
} from "../lib/iteration-budget.js";
|
|
18
38
|
|
|
19
39
|
export function registerItBudgetCommand(program) {
|
|
20
|
-
const ib = program
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
ib.command("
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
ib.command("
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const ib = program
|
|
41
|
+
.command("itbudget")
|
|
42
|
+
.description("Iteration Budget V2 governance");
|
|
43
|
+
ib.command("enums-v2").action(() =>
|
|
44
|
+
console.log(
|
|
45
|
+
JSON.stringify(
|
|
46
|
+
{
|
|
47
|
+
profileMaturity: ITER_BUDGET_PROFILE_MATURITY_V2,
|
|
48
|
+
runLifecycle: ITER_RUN_LIFECYCLE_V2,
|
|
49
|
+
},
|
|
50
|
+
null,
|
|
51
|
+
2,
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
);
|
|
55
|
+
ib.command("config-v2").action(() =>
|
|
56
|
+
console.log(
|
|
57
|
+
JSON.stringify(
|
|
58
|
+
{
|
|
59
|
+
maxActiveIterBudgetProfilesPerOwner:
|
|
60
|
+
getMaxActiveIterBudgetProfilesPerOwnerV2(),
|
|
61
|
+
maxPendingIterRunsPerProfile: getMaxPendingIterRunsPerProfileV2(),
|
|
62
|
+
iterBudgetProfileIdleMs: getIterBudgetProfileIdleMsV2(),
|
|
63
|
+
iterRunStuckMs: getIterRunStuckMsV2(),
|
|
64
|
+
},
|
|
65
|
+
null,
|
|
66
|
+
2,
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
ib.command("set-max-active-v2 <n>").action((n) => {
|
|
71
|
+
setMaxActiveIterBudgetProfilesPerOwnerV2(Number(n));
|
|
72
|
+
console.log("ok");
|
|
73
|
+
});
|
|
74
|
+
ib.command("set-max-pending-v2 <n>").action((n) => {
|
|
75
|
+
setMaxPendingIterRunsPerProfileV2(Number(n));
|
|
76
|
+
console.log("ok");
|
|
77
|
+
});
|
|
78
|
+
ib.command("set-idle-ms-v2 <n>").action((n) => {
|
|
79
|
+
setIterBudgetProfileIdleMsV2(Number(n));
|
|
80
|
+
console.log("ok");
|
|
81
|
+
});
|
|
82
|
+
ib.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
83
|
+
setIterRunStuckMsV2(Number(n));
|
|
84
|
+
console.log("ok");
|
|
85
|
+
});
|
|
86
|
+
ib.command("register-profile-v2 <id> <owner>")
|
|
87
|
+
.option("--budget <n>", "budget")
|
|
88
|
+
.action((id, owner, o) =>
|
|
89
|
+
console.log(
|
|
90
|
+
JSON.stringify(
|
|
91
|
+
registerIterBudgetProfileV2({
|
|
92
|
+
id,
|
|
93
|
+
owner,
|
|
94
|
+
budget: o.budget ? Number(o.budget) : undefined,
|
|
95
|
+
}),
|
|
96
|
+
null,
|
|
97
|
+
2,
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
);
|
|
101
|
+
ib.command("activate-profile-v2 <id>").action((id) =>
|
|
102
|
+
console.log(JSON.stringify(activateIterBudgetProfileV2(id), null, 2)),
|
|
103
|
+
);
|
|
104
|
+
ib.command("pause-profile-v2 <id>").action((id) =>
|
|
105
|
+
console.log(JSON.stringify(pauseIterBudgetProfileV2(id), null, 2)),
|
|
106
|
+
);
|
|
107
|
+
ib.command("exhaust-profile-v2 <id>").action((id) =>
|
|
108
|
+
console.log(JSON.stringify(exhaustIterBudgetProfileV2(id), null, 2)),
|
|
109
|
+
);
|
|
110
|
+
ib.command("touch-profile-v2 <id>").action((id) =>
|
|
111
|
+
console.log(JSON.stringify(touchIterBudgetProfileV2(id), null, 2)),
|
|
112
|
+
);
|
|
113
|
+
ib.command("get-profile-v2 <id>").action((id) =>
|
|
114
|
+
console.log(JSON.stringify(getIterBudgetProfileV2(id), null, 2)),
|
|
115
|
+
);
|
|
116
|
+
ib.command("list-profiles-v2").action(() =>
|
|
117
|
+
console.log(JSON.stringify(listIterBudgetProfilesV2(), null, 2)),
|
|
118
|
+
);
|
|
119
|
+
ib.command("create-run-v2 <id> <profileId>")
|
|
120
|
+
.option("--goal <g>", "goal")
|
|
121
|
+
.action((id, profileId, o) =>
|
|
122
|
+
console.log(
|
|
123
|
+
JSON.stringify(
|
|
124
|
+
createIterRunV2({ id, profileId, goal: o.goal }),
|
|
125
|
+
null,
|
|
126
|
+
2,
|
|
127
|
+
),
|
|
128
|
+
),
|
|
129
|
+
);
|
|
130
|
+
ib.command("start-run-v2 <id>").action((id) =>
|
|
131
|
+
console.log(JSON.stringify(startIterRunV2(id), null, 2)),
|
|
132
|
+
);
|
|
133
|
+
ib.command("complete-run-v2 <id>").action((id) =>
|
|
134
|
+
console.log(JSON.stringify(completeIterRunV2(id), null, 2)),
|
|
135
|
+
);
|
|
136
|
+
ib.command("fail-run-v2 <id> [reason]").action((id, reason) =>
|
|
137
|
+
console.log(JSON.stringify(failIterRunV2(id, reason), null, 2)),
|
|
138
|
+
);
|
|
139
|
+
ib.command("cancel-run-v2 <id> [reason]").action((id, reason) =>
|
|
140
|
+
console.log(JSON.stringify(cancelIterRunV2(id, reason), null, 2)),
|
|
141
|
+
);
|
|
142
|
+
ib.command("get-run-v2 <id>").action((id) =>
|
|
143
|
+
console.log(JSON.stringify(getIterRunV2(id), null, 2)),
|
|
144
|
+
);
|
|
145
|
+
ib.command("list-runs-v2").action(() =>
|
|
146
|
+
console.log(JSON.stringify(listIterRunsV2(), null, 2)),
|
|
147
|
+
);
|
|
148
|
+
ib.command("auto-pause-idle-v2").action(() =>
|
|
149
|
+
console.log(JSON.stringify(autoPauseIdleIterBudgetProfilesV2(), null, 2)),
|
|
150
|
+
);
|
|
151
|
+
ib.command("auto-fail-stuck-v2").action(() =>
|
|
152
|
+
console.log(JSON.stringify(autoFailStuckIterRunsV2(), null, 2)),
|
|
153
|
+
);
|
|
154
|
+
ib.command("gov-stats-v2").action(() =>
|
|
155
|
+
console.log(JSON.stringify(getIterationBudgetGovStatsV2(), null, 2)),
|
|
156
|
+
);
|
|
157
|
+
ib.command("reset-state-v2").action(() => {
|
|
158
|
+
_resetStateIterationBudgetV2();
|
|
159
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
160
|
+
});
|
|
45
161
|
}
|