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
|
@@ -673,3 +673,212 @@ export function registerPerceptionCommand(program) {
|
|
|
673
673
|
|
|
674
674
|
program.addCommand(perc);
|
|
675
675
|
}
|
|
676
|
+
|
|
677
|
+
// === Iter18 V2 governance overlay ===
|
|
678
|
+
export function registerPercgovV2Commands(program) {
|
|
679
|
+
const parent = program.commands.find((c) => c.name() === "perception");
|
|
680
|
+
if (!parent) return;
|
|
681
|
+
const L = async () => await import("../lib/perception.js");
|
|
682
|
+
parent
|
|
683
|
+
.command("percgov-enums-v2")
|
|
684
|
+
.description("Show V2 enums")
|
|
685
|
+
.action(async () => {
|
|
686
|
+
const m = await L();
|
|
687
|
+
console.log(
|
|
688
|
+
JSON.stringify(
|
|
689
|
+
{
|
|
690
|
+
profileMaturity: m.PERCGOV_PROFILE_MATURITY_V2,
|
|
691
|
+
signalLifecycle: m.PERCGOV_SIGNAL_LIFECYCLE_V2,
|
|
692
|
+
},
|
|
693
|
+
null,
|
|
694
|
+
2,
|
|
695
|
+
),
|
|
696
|
+
);
|
|
697
|
+
});
|
|
698
|
+
parent
|
|
699
|
+
.command("percgov-config-v2")
|
|
700
|
+
.description("Show V2 config")
|
|
701
|
+
.action(async () => {
|
|
702
|
+
const m = await L();
|
|
703
|
+
console.log(
|
|
704
|
+
JSON.stringify(
|
|
705
|
+
{
|
|
706
|
+
maxActive: m.getMaxActivePercgovProfilesPerOwnerV2(),
|
|
707
|
+
maxPending: m.getMaxPendingPercgovSignalsPerProfileV2(),
|
|
708
|
+
idleMs: m.getPercgovProfileIdleMsV2(),
|
|
709
|
+
stuckMs: m.getPercgovSignalStuckMsV2(),
|
|
710
|
+
},
|
|
711
|
+
null,
|
|
712
|
+
2,
|
|
713
|
+
),
|
|
714
|
+
);
|
|
715
|
+
});
|
|
716
|
+
parent
|
|
717
|
+
.command("percgov-set-max-active-v2 <n>")
|
|
718
|
+
.description("Set max active")
|
|
719
|
+
.action(async (n) => {
|
|
720
|
+
(await L()).setMaxActivePercgovProfilesPerOwnerV2(Number(n));
|
|
721
|
+
console.log("ok");
|
|
722
|
+
});
|
|
723
|
+
parent
|
|
724
|
+
.command("percgov-set-max-pending-v2 <n>")
|
|
725
|
+
.description("Set max pending")
|
|
726
|
+
.action(async (n) => {
|
|
727
|
+
(await L()).setMaxPendingPercgovSignalsPerProfileV2(Number(n));
|
|
728
|
+
console.log("ok");
|
|
729
|
+
});
|
|
730
|
+
parent
|
|
731
|
+
.command("percgov-set-idle-ms-v2 <n>")
|
|
732
|
+
.description("Set idle threshold ms")
|
|
733
|
+
.action(async (n) => {
|
|
734
|
+
(await L()).setPercgovProfileIdleMsV2(Number(n));
|
|
735
|
+
console.log("ok");
|
|
736
|
+
});
|
|
737
|
+
parent
|
|
738
|
+
.command("percgov-set-stuck-ms-v2 <n>")
|
|
739
|
+
.description("Set stuck threshold ms")
|
|
740
|
+
.action(async (n) => {
|
|
741
|
+
(await L()).setPercgovSignalStuckMsV2(Number(n));
|
|
742
|
+
console.log("ok");
|
|
743
|
+
});
|
|
744
|
+
parent
|
|
745
|
+
.command("percgov-register-v2 <id> <owner>")
|
|
746
|
+
.description("Register V2 profile")
|
|
747
|
+
.option("--modality <v>", "modality")
|
|
748
|
+
.action(async (id, owner, o) => {
|
|
749
|
+
const m = await L();
|
|
750
|
+
console.log(
|
|
751
|
+
JSON.stringify(
|
|
752
|
+
m.registerPercgovProfileV2({ id, owner, modality: o.modality }),
|
|
753
|
+
null,
|
|
754
|
+
2,
|
|
755
|
+
),
|
|
756
|
+
);
|
|
757
|
+
});
|
|
758
|
+
parent
|
|
759
|
+
.command("percgov-activate-v2 <id>")
|
|
760
|
+
.description("Activate profile")
|
|
761
|
+
.action(async (id) => {
|
|
762
|
+
console.log(
|
|
763
|
+
JSON.stringify((await L()).activatePercgovProfileV2(id), null, 2),
|
|
764
|
+
);
|
|
765
|
+
});
|
|
766
|
+
parent
|
|
767
|
+
.command("percgov-stale-v2 <id>")
|
|
768
|
+
.description("Stale profile")
|
|
769
|
+
.action(async (id) => {
|
|
770
|
+
console.log(
|
|
771
|
+
JSON.stringify((await L()).stalePercgovProfileV2(id), null, 2),
|
|
772
|
+
);
|
|
773
|
+
});
|
|
774
|
+
parent
|
|
775
|
+
.command("percgov-archive-v2 <id>")
|
|
776
|
+
.description("Archive profile")
|
|
777
|
+
.action(async (id) => {
|
|
778
|
+
console.log(
|
|
779
|
+
JSON.stringify((await L()).archivePercgovProfileV2(id), null, 2),
|
|
780
|
+
);
|
|
781
|
+
});
|
|
782
|
+
parent
|
|
783
|
+
.command("percgov-touch-v2 <id>")
|
|
784
|
+
.description("Touch profile")
|
|
785
|
+
.action(async (id) => {
|
|
786
|
+
console.log(
|
|
787
|
+
JSON.stringify((await L()).touchPercgovProfileV2(id), null, 2),
|
|
788
|
+
);
|
|
789
|
+
});
|
|
790
|
+
parent
|
|
791
|
+
.command("percgov-get-v2 <id>")
|
|
792
|
+
.description("Get profile")
|
|
793
|
+
.action(async (id) => {
|
|
794
|
+
console.log(JSON.stringify((await L()).getPercgovProfileV2(id), null, 2));
|
|
795
|
+
});
|
|
796
|
+
parent
|
|
797
|
+
.command("percgov-list-v2")
|
|
798
|
+
.description("List profiles")
|
|
799
|
+
.action(async () => {
|
|
800
|
+
console.log(JSON.stringify((await L()).listPercgovProfilesV2(), null, 2));
|
|
801
|
+
});
|
|
802
|
+
parent
|
|
803
|
+
.command("percgov-create-signal-v2 <id> <profileId>")
|
|
804
|
+
.description("Create signal")
|
|
805
|
+
.option("--source <v>", "source")
|
|
806
|
+
.action(async (id, profileId, o) => {
|
|
807
|
+
const m = await L();
|
|
808
|
+
console.log(
|
|
809
|
+
JSON.stringify(
|
|
810
|
+
m.createPercgovSignalV2({ id, profileId, source: o.source }),
|
|
811
|
+
null,
|
|
812
|
+
2,
|
|
813
|
+
),
|
|
814
|
+
);
|
|
815
|
+
});
|
|
816
|
+
parent
|
|
817
|
+
.command("percgov-analyzing-signal-v2 <id>")
|
|
818
|
+
.description("Mark signal as analyzing")
|
|
819
|
+
.action(async (id) => {
|
|
820
|
+
console.log(
|
|
821
|
+
JSON.stringify((await L()).analyzingPercgovSignalV2(id), null, 2),
|
|
822
|
+
);
|
|
823
|
+
});
|
|
824
|
+
parent
|
|
825
|
+
.command("percgov-complete-signal-v2 <id>")
|
|
826
|
+
.description("Complete signal")
|
|
827
|
+
.action(async (id) => {
|
|
828
|
+
console.log(
|
|
829
|
+
JSON.stringify((await L()).completeSignalPercgovV2(id), null, 2),
|
|
830
|
+
);
|
|
831
|
+
});
|
|
832
|
+
parent
|
|
833
|
+
.command("percgov-fail-signal-v2 <id> [reason]")
|
|
834
|
+
.description("Fail signal")
|
|
835
|
+
.action(async (id, reason) => {
|
|
836
|
+
console.log(
|
|
837
|
+
JSON.stringify((await L()).failPercgovSignalV2(id, reason), null, 2),
|
|
838
|
+
);
|
|
839
|
+
});
|
|
840
|
+
parent
|
|
841
|
+
.command("percgov-cancel-signal-v2 <id> [reason]")
|
|
842
|
+
.description("Cancel signal")
|
|
843
|
+
.action(async (id, reason) => {
|
|
844
|
+
console.log(
|
|
845
|
+
JSON.stringify((await L()).cancelPercgovSignalV2(id, reason), null, 2),
|
|
846
|
+
);
|
|
847
|
+
});
|
|
848
|
+
parent
|
|
849
|
+
.command("percgov-get-signal-v2 <id>")
|
|
850
|
+
.description("Get signal")
|
|
851
|
+
.action(async (id) => {
|
|
852
|
+
console.log(JSON.stringify((await L()).getPercgovSignalV2(id), null, 2));
|
|
853
|
+
});
|
|
854
|
+
parent
|
|
855
|
+
.command("percgov-list-signals-v2")
|
|
856
|
+
.description("List signals")
|
|
857
|
+
.action(async () => {
|
|
858
|
+
console.log(JSON.stringify((await L()).listPercgovSignalsV2(), null, 2));
|
|
859
|
+
});
|
|
860
|
+
parent
|
|
861
|
+
.command("percgov-auto-stale-idle-v2")
|
|
862
|
+
.description("Auto-stale idle")
|
|
863
|
+
.action(async () => {
|
|
864
|
+
console.log(
|
|
865
|
+
JSON.stringify((await L()).autoStaleIdlePercgovProfilesV2(), null, 2),
|
|
866
|
+
);
|
|
867
|
+
});
|
|
868
|
+
parent
|
|
869
|
+
.command("percgov-auto-fail-stuck-v2")
|
|
870
|
+
.description("Auto-fail stuck signals")
|
|
871
|
+
.action(async () => {
|
|
872
|
+
console.log(
|
|
873
|
+
JSON.stringify((await L()).autoFailStuckPercgovSignalsV2(), null, 2),
|
|
874
|
+
);
|
|
875
|
+
});
|
|
876
|
+
parent
|
|
877
|
+
.command("percgov-gov-stats-v2")
|
|
878
|
+
.description("V2 gov stats")
|
|
879
|
+
.action(async () => {
|
|
880
|
+
console.log(
|
|
881
|
+
JSON.stringify((await L()).getPerceptionGovStatsV2(), null, 2),
|
|
882
|
+
);
|
|
883
|
+
});
|
|
884
|
+
}
|
package/src/commands/perf.js
CHANGED
|
@@ -434,39 +434,176 @@ export function registerPerfCommand(program) {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
import {
|
|
437
|
-
PERF_TUNING_PROFILE_MATURITY_V2,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
437
|
+
PERF_TUNING_PROFILE_MATURITY_V2,
|
|
438
|
+
PERF_BENCH_LIFECYCLE_V2,
|
|
439
|
+
setMaxActivePerfTuningProfilesPerOwnerV2,
|
|
440
|
+
getMaxActivePerfTuningProfilesPerOwnerV2,
|
|
441
|
+
setMaxPendingPerfBenchesPerProfileV2,
|
|
442
|
+
getMaxPendingPerfBenchesPerProfileV2,
|
|
443
|
+
setPerfTuningProfileIdleMsV2,
|
|
444
|
+
getPerfTuningProfileIdleMsV2,
|
|
445
|
+
setPerfBenchStuckMsV2,
|
|
446
|
+
getPerfBenchStuckMsV2,
|
|
447
|
+
registerPerfTuningProfileV2,
|
|
448
|
+
activatePerfTuningProfileV2,
|
|
449
|
+
stalePerfTuningProfileV2,
|
|
450
|
+
decommissionPerfTuningProfileV2,
|
|
451
|
+
touchPerfTuningProfileV2,
|
|
452
|
+
getPerfTuningProfileV2,
|
|
453
|
+
listPerfTuningProfilesV2,
|
|
454
|
+
createPerfBenchV2,
|
|
455
|
+
startPerfBenchV2,
|
|
456
|
+
completePerfBenchV2,
|
|
457
|
+
failPerfBenchV2,
|
|
458
|
+
cancelPerfBenchV2,
|
|
459
|
+
getPerfBenchV2,
|
|
460
|
+
listPerfBenchesV2,
|
|
461
|
+
autoStaleIdlePerfTuningProfilesV2,
|
|
462
|
+
autoFailStuckPerfBenchesV2,
|
|
463
|
+
getPerfTuningGovStatsV2,
|
|
464
|
+
_resetStatePerfTuningV2,
|
|
445
465
|
} from "../lib/perf-tuning.js";
|
|
446
466
|
|
|
447
467
|
function _registerPerfV2(parent) {
|
|
448
|
-
parent.command("enums-v2").action(() =>
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
parent.command("
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
468
|
+
parent.command("enums-v2").action(() =>
|
|
469
|
+
console.log(
|
|
470
|
+
JSON.stringify(
|
|
471
|
+
{
|
|
472
|
+
profileMaturity: PERF_TUNING_PROFILE_MATURITY_V2,
|
|
473
|
+
benchLifecycle: PERF_BENCH_LIFECYCLE_V2,
|
|
474
|
+
},
|
|
475
|
+
null,
|
|
476
|
+
2,
|
|
477
|
+
),
|
|
478
|
+
),
|
|
479
|
+
);
|
|
480
|
+
parent.command("config-v2").action(() =>
|
|
481
|
+
console.log(
|
|
482
|
+
JSON.stringify(
|
|
483
|
+
{
|
|
484
|
+
maxActivePerfTuningProfilesPerOwner:
|
|
485
|
+
getMaxActivePerfTuningProfilesPerOwnerV2(),
|
|
486
|
+
maxPendingPerfBenchesPerProfile:
|
|
487
|
+
getMaxPendingPerfBenchesPerProfileV2(),
|
|
488
|
+
perfTuningProfileIdleMs: getPerfTuningProfileIdleMsV2(),
|
|
489
|
+
perfBenchStuckMs: getPerfBenchStuckMsV2(),
|
|
490
|
+
},
|
|
491
|
+
null,
|
|
492
|
+
2,
|
|
493
|
+
),
|
|
494
|
+
),
|
|
495
|
+
);
|
|
496
|
+
parent.command("set-max-active-v2 <n>").action((n) => {
|
|
497
|
+
setMaxActivePerfTuningProfilesPerOwnerV2(Number(n));
|
|
498
|
+
console.log("ok");
|
|
499
|
+
});
|
|
500
|
+
parent.command("set-max-pending-v2 <n>").action((n) => {
|
|
501
|
+
setMaxPendingPerfBenchesPerProfileV2(Number(n));
|
|
502
|
+
console.log("ok");
|
|
503
|
+
});
|
|
504
|
+
parent.command("set-idle-ms-v2 <n>").action((n) => {
|
|
505
|
+
setPerfTuningProfileIdleMsV2(Number(n));
|
|
506
|
+
console.log("ok");
|
|
507
|
+
});
|
|
508
|
+
parent.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
509
|
+
setPerfBenchStuckMsV2(Number(n));
|
|
510
|
+
console.log("ok");
|
|
511
|
+
});
|
|
512
|
+
parent
|
|
513
|
+
.command("register-profile-v2 <id> <owner>")
|
|
514
|
+
.option("--target <t>", "target")
|
|
515
|
+
.action((id, owner, o) =>
|
|
516
|
+
console.log(
|
|
517
|
+
JSON.stringify(
|
|
518
|
+
registerPerfTuningProfileV2({ id, owner, target: o.target }),
|
|
519
|
+
null,
|
|
520
|
+
2,
|
|
521
|
+
),
|
|
522
|
+
),
|
|
523
|
+
);
|
|
524
|
+
parent
|
|
525
|
+
.command("activate-profile-v2 <id>")
|
|
526
|
+
.action((id) =>
|
|
527
|
+
console.log(JSON.stringify(activatePerfTuningProfileV2(id), null, 2)),
|
|
528
|
+
);
|
|
529
|
+
parent
|
|
530
|
+
.command("stale-profile-v2 <id>")
|
|
531
|
+
.action((id) =>
|
|
532
|
+
console.log(JSON.stringify(stalePerfTuningProfileV2(id), null, 2)),
|
|
533
|
+
);
|
|
534
|
+
parent
|
|
535
|
+
.command("decommission-profile-v2 <id>")
|
|
536
|
+
.action((id) =>
|
|
537
|
+
console.log(JSON.stringify(decommissionPerfTuningProfileV2(id), null, 2)),
|
|
538
|
+
);
|
|
539
|
+
parent
|
|
540
|
+
.command("touch-profile-v2 <id>")
|
|
541
|
+
.action((id) =>
|
|
542
|
+
console.log(JSON.stringify(touchPerfTuningProfileV2(id), null, 2)),
|
|
543
|
+
);
|
|
544
|
+
parent
|
|
545
|
+
.command("get-profile-v2 <id>")
|
|
546
|
+
.action((id) =>
|
|
547
|
+
console.log(JSON.stringify(getPerfTuningProfileV2(id), null, 2)),
|
|
548
|
+
);
|
|
549
|
+
parent
|
|
550
|
+
.command("list-profiles-v2")
|
|
551
|
+
.action(() =>
|
|
552
|
+
console.log(JSON.stringify(listPerfTuningProfilesV2(), null, 2)),
|
|
553
|
+
);
|
|
554
|
+
parent
|
|
555
|
+
.command("create-bench-v2 <id> <profileId>")
|
|
556
|
+
.option("--scenario <s>", "scenario")
|
|
557
|
+
.action((id, profileId, o) =>
|
|
558
|
+
console.log(
|
|
559
|
+
JSON.stringify(
|
|
560
|
+
createPerfBenchV2({ id, profileId, scenario: o.scenario }),
|
|
561
|
+
null,
|
|
562
|
+
2,
|
|
563
|
+
),
|
|
564
|
+
),
|
|
565
|
+
);
|
|
566
|
+
parent
|
|
567
|
+
.command("start-bench-v2 <id>")
|
|
568
|
+
.action((id) => console.log(JSON.stringify(startPerfBenchV2(id), null, 2)));
|
|
569
|
+
parent
|
|
570
|
+
.command("complete-bench-v2 <id>")
|
|
571
|
+
.action((id) =>
|
|
572
|
+
console.log(JSON.stringify(completePerfBenchV2(id), null, 2)),
|
|
573
|
+
);
|
|
574
|
+
parent
|
|
575
|
+
.command("fail-bench-v2 <id> [reason]")
|
|
576
|
+
.action((id, reason) =>
|
|
577
|
+
console.log(JSON.stringify(failPerfBenchV2(id, reason), null, 2)),
|
|
578
|
+
);
|
|
579
|
+
parent
|
|
580
|
+
.command("cancel-bench-v2 <id> [reason]")
|
|
581
|
+
.action((id, reason) =>
|
|
582
|
+
console.log(JSON.stringify(cancelPerfBenchV2(id, reason), null, 2)),
|
|
583
|
+
);
|
|
584
|
+
parent
|
|
585
|
+
.command("get-bench-v2 <id>")
|
|
586
|
+
.action((id) => console.log(JSON.stringify(getPerfBenchV2(id), null, 2)));
|
|
587
|
+
parent
|
|
588
|
+
.command("list-benches-v2")
|
|
589
|
+
.action(() => console.log(JSON.stringify(listPerfBenchesV2(), null, 2)));
|
|
590
|
+
parent
|
|
591
|
+
.command("auto-stale-idle-v2")
|
|
592
|
+
.action(() =>
|
|
593
|
+
console.log(JSON.stringify(autoStaleIdlePerfTuningProfilesV2(), null, 2)),
|
|
594
|
+
);
|
|
595
|
+
parent
|
|
596
|
+
.command("auto-fail-stuck-v2")
|
|
597
|
+
.action(() =>
|
|
598
|
+
console.log(JSON.stringify(autoFailStuckPerfBenchesV2(), null, 2)),
|
|
599
|
+
);
|
|
600
|
+
parent
|
|
601
|
+
.command("gov-stats-v2")
|
|
602
|
+
.action(() =>
|
|
603
|
+
console.log(JSON.stringify(getPerfTuningGovStatsV2(), null, 2)),
|
|
604
|
+
);
|
|
605
|
+
parent.command("reset-state-v2").action(() => {
|
|
606
|
+
_resetStatePerfTuningV2();
|
|
607
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
608
|
+
});
|
|
472
609
|
}
|
package/src/commands/perm.js
CHANGED
|
@@ -6,40 +6,151 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
PERM_RULE_MATURITY_V2,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
PERM_RULE_MATURITY_V2,
|
|
10
|
+
PERM_CHECK_LIFECYCLE_V2,
|
|
11
|
+
setMaxActivePermRulesPerOwnerV2,
|
|
12
|
+
getMaxActivePermRulesPerOwnerV2,
|
|
13
|
+
setMaxPendingPermChecksPerRuleV2,
|
|
14
|
+
getMaxPendingPermChecksPerRuleV2,
|
|
15
|
+
setPermRuleIdleMsV2,
|
|
16
|
+
getPermRuleIdleMsV2,
|
|
17
|
+
setPermCheckStuckMsV2,
|
|
18
|
+
getPermCheckStuckMsV2,
|
|
19
|
+
registerPermRuleV2,
|
|
20
|
+
activatePermRuleV2,
|
|
21
|
+
disablePermRuleV2,
|
|
22
|
+
retirePermRuleV2,
|
|
23
|
+
touchPermRuleV2,
|
|
24
|
+
getPermRuleV2,
|
|
25
|
+
listPermRulesV2,
|
|
26
|
+
createPermCheckV2,
|
|
27
|
+
evaluatePermCheckV2,
|
|
28
|
+
allowPermCheckV2,
|
|
29
|
+
denyPermCheckV2,
|
|
30
|
+
cancelPermCheckV2,
|
|
31
|
+
getPermCheckV2,
|
|
32
|
+
listPermChecksV2,
|
|
33
|
+
autoDisableIdlePermRulesV2,
|
|
34
|
+
autoDenyStuckPermChecksV2,
|
|
35
|
+
getPermissionEngineGovStatsV2,
|
|
36
|
+
_resetStatePermissionEngineV2,
|
|
17
37
|
} from "../lib/permission-engine.js";
|
|
18
38
|
|
|
19
39
|
export function registerPermCommand(program) {
|
|
20
|
-
const pe = program
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
pe.command("
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
pe.command("
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const pe = program
|
|
41
|
+
.command("perm")
|
|
42
|
+
.description("Permission Engine V2 governance");
|
|
43
|
+
pe.command("enums-v2").action(() =>
|
|
44
|
+
console.log(
|
|
45
|
+
JSON.stringify(
|
|
46
|
+
{
|
|
47
|
+
ruleMaturity: PERM_RULE_MATURITY_V2,
|
|
48
|
+
checkLifecycle: PERM_CHECK_LIFECYCLE_V2,
|
|
49
|
+
},
|
|
50
|
+
null,
|
|
51
|
+
2,
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
);
|
|
55
|
+
pe.command("config-v2").action(() =>
|
|
56
|
+
console.log(
|
|
57
|
+
JSON.stringify(
|
|
58
|
+
{
|
|
59
|
+
maxActivePermRulesPerOwner: getMaxActivePermRulesPerOwnerV2(),
|
|
60
|
+
maxPendingPermChecksPerRule: getMaxPendingPermChecksPerRuleV2(),
|
|
61
|
+
permRuleIdleMs: getPermRuleIdleMsV2(),
|
|
62
|
+
permCheckStuckMs: getPermCheckStuckMsV2(),
|
|
63
|
+
},
|
|
64
|
+
null,
|
|
65
|
+
2,
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
pe.command("set-max-active-v2 <n>").action((n) => {
|
|
70
|
+
setMaxActivePermRulesPerOwnerV2(Number(n));
|
|
71
|
+
console.log("ok");
|
|
72
|
+
});
|
|
73
|
+
pe.command("set-max-pending-v2 <n>").action((n) => {
|
|
74
|
+
setMaxPendingPermChecksPerRuleV2(Number(n));
|
|
75
|
+
console.log("ok");
|
|
76
|
+
});
|
|
77
|
+
pe.command("set-idle-ms-v2 <n>").action((n) => {
|
|
78
|
+
setPermRuleIdleMsV2(Number(n));
|
|
79
|
+
console.log("ok");
|
|
80
|
+
});
|
|
81
|
+
pe.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
82
|
+
setPermCheckStuckMsV2(Number(n));
|
|
83
|
+
console.log("ok");
|
|
84
|
+
});
|
|
85
|
+
pe.command("register-rule-v2 <id> <owner>")
|
|
86
|
+
.option("--scope <s>", "scope")
|
|
87
|
+
.action((id, owner, o) =>
|
|
88
|
+
console.log(
|
|
89
|
+
JSON.stringify(
|
|
90
|
+
registerPermRuleV2({ id, owner, scope: o.scope }),
|
|
91
|
+
null,
|
|
92
|
+
2,
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
);
|
|
96
|
+
pe.command("activate-rule-v2 <id>").action((id) =>
|
|
97
|
+
console.log(JSON.stringify(activatePermRuleV2(id), null, 2)),
|
|
98
|
+
);
|
|
99
|
+
pe.command("disable-rule-v2 <id>").action((id) =>
|
|
100
|
+
console.log(JSON.stringify(disablePermRuleV2(id), null, 2)),
|
|
101
|
+
);
|
|
102
|
+
pe.command("retire-rule-v2 <id>").action((id) =>
|
|
103
|
+
console.log(JSON.stringify(retirePermRuleV2(id), null, 2)),
|
|
104
|
+
);
|
|
105
|
+
pe.command("touch-rule-v2 <id>").action((id) =>
|
|
106
|
+
console.log(JSON.stringify(touchPermRuleV2(id), null, 2)),
|
|
107
|
+
);
|
|
108
|
+
pe.command("get-rule-v2 <id>").action((id) =>
|
|
109
|
+
console.log(JSON.stringify(getPermRuleV2(id), null, 2)),
|
|
110
|
+
);
|
|
111
|
+
pe.command("list-rules-v2").action(() =>
|
|
112
|
+
console.log(JSON.stringify(listPermRulesV2(), null, 2)),
|
|
113
|
+
);
|
|
114
|
+
pe.command("create-check-v2 <id> <ruleId>")
|
|
115
|
+
.option("--subject <s>", "subject")
|
|
116
|
+
.action((id, ruleId, o) =>
|
|
117
|
+
console.log(
|
|
118
|
+
JSON.stringify(
|
|
119
|
+
createPermCheckV2({ id, ruleId, subject: o.subject }),
|
|
120
|
+
null,
|
|
121
|
+
2,
|
|
122
|
+
),
|
|
123
|
+
),
|
|
124
|
+
);
|
|
125
|
+
pe.command("evaluate-check-v2 <id>").action((id) =>
|
|
126
|
+
console.log(JSON.stringify(evaluatePermCheckV2(id), null, 2)),
|
|
127
|
+
);
|
|
128
|
+
pe.command("allow-check-v2 <id>").action((id) =>
|
|
129
|
+
console.log(JSON.stringify(allowPermCheckV2(id), null, 2)),
|
|
130
|
+
);
|
|
131
|
+
pe.command("deny-check-v2 <id> [reason]").action((id, reason) =>
|
|
132
|
+
console.log(JSON.stringify(denyPermCheckV2(id, reason), null, 2)),
|
|
133
|
+
);
|
|
134
|
+
pe.command("cancel-check-v2 <id> [reason]").action((id, reason) =>
|
|
135
|
+
console.log(JSON.stringify(cancelPermCheckV2(id, reason), null, 2)),
|
|
136
|
+
);
|
|
137
|
+
pe.command("get-check-v2 <id>").action((id) =>
|
|
138
|
+
console.log(JSON.stringify(getPermCheckV2(id), null, 2)),
|
|
139
|
+
);
|
|
140
|
+
pe.command("list-checks-v2").action(() =>
|
|
141
|
+
console.log(JSON.stringify(listPermChecksV2(), null, 2)),
|
|
142
|
+
);
|
|
143
|
+
pe.command("auto-disable-idle-v2").action(() =>
|
|
144
|
+
console.log(JSON.stringify(autoDisableIdlePermRulesV2(), null, 2)),
|
|
145
|
+
);
|
|
146
|
+
pe.command("auto-deny-stuck-v2").action(() =>
|
|
147
|
+
console.log(JSON.stringify(autoDenyStuckPermChecksV2(), null, 2)),
|
|
148
|
+
);
|
|
149
|
+
pe.command("gov-stats-v2").action(() =>
|
|
150
|
+
console.log(JSON.stringify(getPermissionEngineGovStatsV2(), null, 2)),
|
|
151
|
+
);
|
|
152
|
+
pe.command("reset-state-v2").action(() => {
|
|
153
|
+
_resetStatePermissionEngineV2();
|
|
154
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
155
|
+
});
|
|
45
156
|
}
|