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/hmemory.js
CHANGED
|
@@ -718,54 +718,208 @@ export function registerHmemoryCommand(program) {
|
|
|
718
718
|
function _registerHmemoryV2Commands(parent) {
|
|
719
719
|
const L = async () => await import("../lib/hierarchical-memory.js");
|
|
720
720
|
|
|
721
|
-
parent
|
|
722
|
-
.
|
|
723
|
-
|
|
724
|
-
.action(async () => {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
.
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
.
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
parent
|
|
765
|
-
.
|
|
766
|
-
|
|
767
|
-
.action(async () => {
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
721
|
+
parent
|
|
722
|
+
.command("enums-v2")
|
|
723
|
+
.description("Show V2 enums (tier maturity + promotion lifecycle)")
|
|
724
|
+
.action(async () => {
|
|
725
|
+
const m = await L();
|
|
726
|
+
console.log(
|
|
727
|
+
JSON.stringify(
|
|
728
|
+
{
|
|
729
|
+
tierMaturity: m.HMEM_TIER_MATURITY_V2,
|
|
730
|
+
promotionLifecycle: m.HMEM_PROMOTION_LIFECYCLE_V2,
|
|
731
|
+
},
|
|
732
|
+
null,
|
|
733
|
+
2,
|
|
734
|
+
),
|
|
735
|
+
);
|
|
736
|
+
});
|
|
737
|
+
parent
|
|
738
|
+
.command("config-v2")
|
|
739
|
+
.description("Show V2 config thresholds")
|
|
740
|
+
.action(async () => {
|
|
741
|
+
const m = await L();
|
|
742
|
+
console.log(
|
|
743
|
+
JSON.stringify(
|
|
744
|
+
{
|
|
745
|
+
maxActiveHmemTiersPerOwner: m.getMaxActiveHmemTiersPerOwnerV2(),
|
|
746
|
+
maxPendingHmemPromotionsPerTier:
|
|
747
|
+
m.getMaxPendingHmemPromotionsPerTierV2(),
|
|
748
|
+
hmemTierIdleMs: m.getHmemTierIdleMsV2(),
|
|
749
|
+
hmemPromotionStuckMs: m.getHmemPromotionStuckMsV2(),
|
|
750
|
+
},
|
|
751
|
+
null,
|
|
752
|
+
2,
|
|
753
|
+
),
|
|
754
|
+
);
|
|
755
|
+
});
|
|
756
|
+
parent
|
|
757
|
+
.command("set-max-active-tiers-v2 <n>")
|
|
758
|
+
.description("Set max active tiers per owner")
|
|
759
|
+
.action(async (n) => {
|
|
760
|
+
const m = await L();
|
|
761
|
+
m.setMaxActiveHmemTiersPerOwnerV2(Number(n));
|
|
762
|
+
console.log("ok");
|
|
763
|
+
});
|
|
764
|
+
parent
|
|
765
|
+
.command("set-max-pending-promotions-v2 <n>")
|
|
766
|
+
.description("Set max pending promotions per tier")
|
|
767
|
+
.action(async (n) => {
|
|
768
|
+
const m = await L();
|
|
769
|
+
m.setMaxPendingHmemPromotionsPerTierV2(Number(n));
|
|
770
|
+
console.log("ok");
|
|
771
|
+
});
|
|
772
|
+
parent
|
|
773
|
+
.command("set-tier-idle-ms-v2 <n>")
|
|
774
|
+
.description("Set tier idle threshold (ms)")
|
|
775
|
+
.action(async (n) => {
|
|
776
|
+
const m = await L();
|
|
777
|
+
m.setHmemTierIdleMsV2(Number(n));
|
|
778
|
+
console.log("ok");
|
|
779
|
+
});
|
|
780
|
+
parent
|
|
781
|
+
.command("set-promotion-stuck-ms-v2 <n>")
|
|
782
|
+
.description("Set promotion stuck threshold (ms)")
|
|
783
|
+
.action(async (n) => {
|
|
784
|
+
const m = await L();
|
|
785
|
+
m.setHmemPromotionStuckMsV2(Number(n));
|
|
786
|
+
console.log("ok");
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
parent
|
|
790
|
+
.command("register-tier-v2 <id> <owner>")
|
|
791
|
+
.description("Register V2 memory tier")
|
|
792
|
+
.option("--level <l>", "Tier level", "short-term")
|
|
793
|
+
.action(async (id, owner, o) => {
|
|
794
|
+
const m = await L();
|
|
795
|
+
console.log(
|
|
796
|
+
JSON.stringify(
|
|
797
|
+
m.registerHmemTierV2({ id, owner, level: o.level }),
|
|
798
|
+
null,
|
|
799
|
+
2,
|
|
800
|
+
),
|
|
801
|
+
);
|
|
802
|
+
});
|
|
803
|
+
parent
|
|
804
|
+
.command("activate-tier-v2 <id>")
|
|
805
|
+
.description("Activate tier")
|
|
806
|
+
.action(async (id) => {
|
|
807
|
+
const m = await L();
|
|
808
|
+
console.log(JSON.stringify(m.activateHmemTierV2(id), null, 2));
|
|
809
|
+
});
|
|
810
|
+
parent
|
|
811
|
+
.command("dormant-tier-v2 <id>")
|
|
812
|
+
.description("Mark tier dormant")
|
|
813
|
+
.action(async (id) => {
|
|
814
|
+
const m = await L();
|
|
815
|
+
console.log(JSON.stringify(m.dormantHmemTierV2(id), null, 2));
|
|
816
|
+
});
|
|
817
|
+
parent
|
|
818
|
+
.command("retire-tier-v2 <id>")
|
|
819
|
+
.description("Retire tier (terminal)")
|
|
820
|
+
.action(async (id) => {
|
|
821
|
+
const m = await L();
|
|
822
|
+
console.log(JSON.stringify(m.retireHmemTierV2(id), null, 2));
|
|
823
|
+
});
|
|
824
|
+
parent
|
|
825
|
+
.command("touch-tier-v2 <id>")
|
|
826
|
+
.description("Touch tier lastTouchedAt")
|
|
827
|
+
.action(async (id) => {
|
|
828
|
+
const m = await L();
|
|
829
|
+
console.log(JSON.stringify(m.touchHmemTierV2(id), null, 2));
|
|
830
|
+
});
|
|
831
|
+
parent
|
|
832
|
+
.command("get-tier-v2 <id>")
|
|
833
|
+
.description("Get V2 tier")
|
|
834
|
+
.action(async (id) => {
|
|
835
|
+
const m = await L();
|
|
836
|
+
console.log(JSON.stringify(m.getHmemTierV2(id), null, 2));
|
|
837
|
+
});
|
|
838
|
+
parent
|
|
839
|
+
.command("list-tiers-v2")
|
|
840
|
+
.description("List all V2 tiers")
|
|
841
|
+
.action(async () => {
|
|
842
|
+
const m = await L();
|
|
843
|
+
console.log(JSON.stringify(m.listHmemTiersV2(), null, 2));
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
parent
|
|
847
|
+
.command("create-promotion-v2 <id> <tierId>")
|
|
848
|
+
.description("Create V2 promotion (queued)")
|
|
849
|
+
.option("--item-key <k>", "Item key", "")
|
|
850
|
+
.action(async (id, tierId, o) => {
|
|
851
|
+
const m = await L();
|
|
852
|
+
console.log(
|
|
853
|
+
JSON.stringify(
|
|
854
|
+
m.createHmemPromotionV2({ id, tierId, itemKey: o.itemKey }),
|
|
855
|
+
null,
|
|
856
|
+
2,
|
|
857
|
+
),
|
|
858
|
+
);
|
|
859
|
+
});
|
|
860
|
+
parent
|
|
861
|
+
.command("start-promotion-v2 <id>")
|
|
862
|
+
.description("Start promotion (queued→promoting)")
|
|
863
|
+
.action(async (id) => {
|
|
864
|
+
const m = await L();
|
|
865
|
+
console.log(JSON.stringify(m.startHmemPromotionV2(id), null, 2));
|
|
866
|
+
});
|
|
867
|
+
parent
|
|
868
|
+
.command("complete-promotion-v2 <id>")
|
|
869
|
+
.description("Complete promotion (promoting→promoted)")
|
|
870
|
+
.action(async (id) => {
|
|
871
|
+
const m = await L();
|
|
872
|
+
console.log(JSON.stringify(m.completeHmemPromotionV2(id), null, 2));
|
|
873
|
+
});
|
|
874
|
+
parent
|
|
875
|
+
.command("fail-promotion-v2 <id> [reason]")
|
|
876
|
+
.description("Fail promotion")
|
|
877
|
+
.action(async (id, reason) => {
|
|
878
|
+
const m = await L();
|
|
879
|
+
console.log(JSON.stringify(m.failHmemPromotionV2(id, reason), null, 2));
|
|
880
|
+
});
|
|
881
|
+
parent
|
|
882
|
+
.command("cancel-promotion-v2 <id> [reason]")
|
|
883
|
+
.description("Cancel promotion")
|
|
884
|
+
.action(async (id, reason) => {
|
|
885
|
+
const m = await L();
|
|
886
|
+
console.log(JSON.stringify(m.cancelHmemPromotionV2(id, reason), null, 2));
|
|
887
|
+
});
|
|
888
|
+
parent
|
|
889
|
+
.command("get-promotion-v2 <id>")
|
|
890
|
+
.description("Get V2 promotion")
|
|
891
|
+
.action(async (id) => {
|
|
892
|
+
const m = await L();
|
|
893
|
+
console.log(JSON.stringify(m.getHmemPromotionV2(id), null, 2));
|
|
894
|
+
});
|
|
895
|
+
parent
|
|
896
|
+
.command("list-promotions-v2")
|
|
897
|
+
.description("List all V2 promotions")
|
|
898
|
+
.action(async () => {
|
|
899
|
+
const m = await L();
|
|
900
|
+
console.log(JSON.stringify(m.listHmemPromotionsV2(), null, 2));
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
parent
|
|
904
|
+
.command("auto-dormant-idle-v2")
|
|
905
|
+
.description("Auto-dormant idle active tiers")
|
|
906
|
+
.action(async () => {
|
|
907
|
+
const m = await L();
|
|
908
|
+
console.log(JSON.stringify(m.autoDormantIdleHmemTiersV2(), null, 2));
|
|
909
|
+
});
|
|
910
|
+
parent
|
|
911
|
+
.command("auto-fail-stuck-v2")
|
|
912
|
+
.description("Auto-fail stuck promoting promotions")
|
|
913
|
+
.action(async () => {
|
|
914
|
+
const m = await L();
|
|
915
|
+
console.log(JSON.stringify(m.autoFailStuckHmemPromotionsV2(), null, 2));
|
|
916
|
+
});
|
|
917
|
+
|
|
918
|
+
parent
|
|
919
|
+
.command("gov-stats-v2")
|
|
920
|
+
.description("V2 governance aggregate stats")
|
|
921
|
+
.action(async () => {
|
|
922
|
+
const m = await L();
|
|
923
|
+
console.log(JSON.stringify(m.getHierarchicalMemoryGovStatsV2(), null, 2));
|
|
924
|
+
});
|
|
771
925
|
}
|
package/src/commands/hook.js
CHANGED
|
@@ -483,3 +483,212 @@ export function registerHookCommand(program) {
|
|
|
483
483
|
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
+
|
|
487
|
+
// === Iter21 V2 governance overlay ===
|
|
488
|
+
export function registerHookgovV2Commands(program) {
|
|
489
|
+
const parent = program.commands.find((c) => c.name() === "hook");
|
|
490
|
+
if (!parent) return;
|
|
491
|
+
const L = async () => await import("../lib/hook-manager.js");
|
|
492
|
+
parent
|
|
493
|
+
.command("hookgov-enums-v2")
|
|
494
|
+
.description("Show V2 enums")
|
|
495
|
+
.action(async () => {
|
|
496
|
+
const m = await L();
|
|
497
|
+
console.log(
|
|
498
|
+
JSON.stringify(
|
|
499
|
+
{
|
|
500
|
+
profileMaturity: m.HOOKGOV_PROFILE_MATURITY_V2,
|
|
501
|
+
triggerLifecycle: m.HOOKGOV_TRIGGER_LIFECYCLE_V2,
|
|
502
|
+
},
|
|
503
|
+
null,
|
|
504
|
+
2,
|
|
505
|
+
),
|
|
506
|
+
);
|
|
507
|
+
});
|
|
508
|
+
parent
|
|
509
|
+
.command("hookgov-config-v2")
|
|
510
|
+
.description("Show V2 config")
|
|
511
|
+
.action(async () => {
|
|
512
|
+
const m = await L();
|
|
513
|
+
console.log(
|
|
514
|
+
JSON.stringify(
|
|
515
|
+
{
|
|
516
|
+
maxActive: m.getMaxActiveHookgovProfilesPerOwnerV2(),
|
|
517
|
+
maxPending: m.getMaxPendingHookgovTriggersPerProfileV2(),
|
|
518
|
+
idleMs: m.getHookgovProfileIdleMsV2(),
|
|
519
|
+
stuckMs: m.getHookgovTriggerStuckMsV2(),
|
|
520
|
+
},
|
|
521
|
+
null,
|
|
522
|
+
2,
|
|
523
|
+
),
|
|
524
|
+
);
|
|
525
|
+
});
|
|
526
|
+
parent
|
|
527
|
+
.command("hookgov-set-max-active-v2 <n>")
|
|
528
|
+
.description("Set max active")
|
|
529
|
+
.action(async (n) => {
|
|
530
|
+
(await L()).setMaxActiveHookgovProfilesPerOwnerV2(Number(n));
|
|
531
|
+
console.log("ok");
|
|
532
|
+
});
|
|
533
|
+
parent
|
|
534
|
+
.command("hookgov-set-max-pending-v2 <n>")
|
|
535
|
+
.description("Set max pending")
|
|
536
|
+
.action(async (n) => {
|
|
537
|
+
(await L()).setMaxPendingHookgovTriggersPerProfileV2(Number(n));
|
|
538
|
+
console.log("ok");
|
|
539
|
+
});
|
|
540
|
+
parent
|
|
541
|
+
.command("hookgov-set-idle-ms-v2 <n>")
|
|
542
|
+
.description("Set idle threshold ms")
|
|
543
|
+
.action(async (n) => {
|
|
544
|
+
(await L()).setHookgovProfileIdleMsV2(Number(n));
|
|
545
|
+
console.log("ok");
|
|
546
|
+
});
|
|
547
|
+
parent
|
|
548
|
+
.command("hookgov-set-stuck-ms-v2 <n>")
|
|
549
|
+
.description("Set stuck threshold ms")
|
|
550
|
+
.action(async (n) => {
|
|
551
|
+
(await L()).setHookgovTriggerStuckMsV2(Number(n));
|
|
552
|
+
console.log("ok");
|
|
553
|
+
});
|
|
554
|
+
parent
|
|
555
|
+
.command("hookgov-register-v2 <id> <owner>")
|
|
556
|
+
.description("Register V2 profile")
|
|
557
|
+
.option("--event <v>", "event")
|
|
558
|
+
.action(async (id, owner, o) => {
|
|
559
|
+
const m = await L();
|
|
560
|
+
console.log(
|
|
561
|
+
JSON.stringify(
|
|
562
|
+
m.registerHookgovProfileV2({ id, owner, event: o.event }),
|
|
563
|
+
null,
|
|
564
|
+
2,
|
|
565
|
+
),
|
|
566
|
+
);
|
|
567
|
+
});
|
|
568
|
+
parent
|
|
569
|
+
.command("hookgov-activate-v2 <id>")
|
|
570
|
+
.description("Activate profile")
|
|
571
|
+
.action(async (id) => {
|
|
572
|
+
console.log(
|
|
573
|
+
JSON.stringify((await L()).activateHookgovProfileV2(id), null, 2),
|
|
574
|
+
);
|
|
575
|
+
});
|
|
576
|
+
parent
|
|
577
|
+
.command("hookgov-disable-v2 <id>")
|
|
578
|
+
.description("Disable profile")
|
|
579
|
+
.action(async (id) => {
|
|
580
|
+
console.log(
|
|
581
|
+
JSON.stringify((await L()).disableHookgovProfileV2(id), null, 2),
|
|
582
|
+
);
|
|
583
|
+
});
|
|
584
|
+
parent
|
|
585
|
+
.command("hookgov-archive-v2 <id>")
|
|
586
|
+
.description("Archive profile")
|
|
587
|
+
.action(async (id) => {
|
|
588
|
+
console.log(
|
|
589
|
+
JSON.stringify((await L()).archiveHookgovProfileV2(id), null, 2),
|
|
590
|
+
);
|
|
591
|
+
});
|
|
592
|
+
parent
|
|
593
|
+
.command("hookgov-touch-v2 <id>")
|
|
594
|
+
.description("Touch profile")
|
|
595
|
+
.action(async (id) => {
|
|
596
|
+
console.log(
|
|
597
|
+
JSON.stringify((await L()).touchHookgovProfileV2(id), null, 2),
|
|
598
|
+
);
|
|
599
|
+
});
|
|
600
|
+
parent
|
|
601
|
+
.command("hookgov-get-v2 <id>")
|
|
602
|
+
.description("Get profile")
|
|
603
|
+
.action(async (id) => {
|
|
604
|
+
console.log(JSON.stringify((await L()).getHookgovProfileV2(id), null, 2));
|
|
605
|
+
});
|
|
606
|
+
parent
|
|
607
|
+
.command("hookgov-list-v2")
|
|
608
|
+
.description("List profiles")
|
|
609
|
+
.action(async () => {
|
|
610
|
+
console.log(JSON.stringify((await L()).listHookgovProfilesV2(), null, 2));
|
|
611
|
+
});
|
|
612
|
+
parent
|
|
613
|
+
.command("hookgov-create-trigger-v2 <id> <profileId>")
|
|
614
|
+
.description("Create trigger")
|
|
615
|
+
.option("--payload <v>", "payload")
|
|
616
|
+
.action(async (id, profileId, o) => {
|
|
617
|
+
const m = await L();
|
|
618
|
+
console.log(
|
|
619
|
+
JSON.stringify(
|
|
620
|
+
m.createHookgovTriggerV2({ id, profileId, payload: o.payload }),
|
|
621
|
+
null,
|
|
622
|
+
2,
|
|
623
|
+
),
|
|
624
|
+
);
|
|
625
|
+
});
|
|
626
|
+
parent
|
|
627
|
+
.command("hookgov-firing-trigger-v2 <id>")
|
|
628
|
+
.description("Mark trigger as firing")
|
|
629
|
+
.action(async (id) => {
|
|
630
|
+
console.log(
|
|
631
|
+
JSON.stringify((await L()).firingHookgovTriggerV2(id), null, 2),
|
|
632
|
+
);
|
|
633
|
+
});
|
|
634
|
+
parent
|
|
635
|
+
.command("hookgov-complete-trigger-v2 <id>")
|
|
636
|
+
.description("Complete trigger")
|
|
637
|
+
.action(async (id) => {
|
|
638
|
+
console.log(
|
|
639
|
+
JSON.stringify((await L()).completeTriggerHookgovV2(id), null, 2),
|
|
640
|
+
);
|
|
641
|
+
});
|
|
642
|
+
parent
|
|
643
|
+
.command("hookgov-fail-trigger-v2 <id> [reason]")
|
|
644
|
+
.description("Fail trigger")
|
|
645
|
+
.action(async (id, reason) => {
|
|
646
|
+
console.log(
|
|
647
|
+
JSON.stringify((await L()).failHookgovTriggerV2(id, reason), null, 2),
|
|
648
|
+
);
|
|
649
|
+
});
|
|
650
|
+
parent
|
|
651
|
+
.command("hookgov-cancel-trigger-v2 <id> [reason]")
|
|
652
|
+
.description("Cancel trigger")
|
|
653
|
+
.action(async (id, reason) => {
|
|
654
|
+
console.log(
|
|
655
|
+
JSON.stringify((await L()).cancelHookgovTriggerV2(id, reason), null, 2),
|
|
656
|
+
);
|
|
657
|
+
});
|
|
658
|
+
parent
|
|
659
|
+
.command("hookgov-get-trigger-v2 <id>")
|
|
660
|
+
.description("Get trigger")
|
|
661
|
+
.action(async (id) => {
|
|
662
|
+
console.log(JSON.stringify((await L()).getHookgovTriggerV2(id), null, 2));
|
|
663
|
+
});
|
|
664
|
+
parent
|
|
665
|
+
.command("hookgov-list-triggers-v2")
|
|
666
|
+
.description("List triggers")
|
|
667
|
+
.action(async () => {
|
|
668
|
+
console.log(JSON.stringify((await L()).listHookgovTriggersV2(), null, 2));
|
|
669
|
+
});
|
|
670
|
+
parent
|
|
671
|
+
.command("hookgov-auto-disable-idle-v2")
|
|
672
|
+
.description("Auto-disable idle")
|
|
673
|
+
.action(async () => {
|
|
674
|
+
console.log(
|
|
675
|
+
JSON.stringify((await L()).autoDisableIdleHookgovProfilesV2(), null, 2),
|
|
676
|
+
);
|
|
677
|
+
});
|
|
678
|
+
parent
|
|
679
|
+
.command("hookgov-auto-fail-stuck-v2")
|
|
680
|
+
.description("Auto-fail stuck triggers")
|
|
681
|
+
.action(async () => {
|
|
682
|
+
console.log(
|
|
683
|
+
JSON.stringify((await L()).autoFailStuckHookgovTriggersV2(), null, 2),
|
|
684
|
+
);
|
|
685
|
+
});
|
|
686
|
+
parent
|
|
687
|
+
.command("hookgov-gov-stats-v2")
|
|
688
|
+
.description("V2 gov stats")
|
|
689
|
+
.action(async () => {
|
|
690
|
+
console.log(
|
|
691
|
+
JSON.stringify((await L()).getHookManagerGovStatsV2(), null, 2),
|
|
692
|
+
);
|
|
693
|
+
});
|
|
694
|
+
}
|
package/src/commands/import.js
CHANGED
|
@@ -509,3 +509,212 @@ export function registerImportCommand(program) {
|
|
|
509
509
|
.description("Auto-fail stuck V2 import jobs")
|
|
510
510
|
.action(() => out(autoFailStuckImportJobsV2()));
|
|
511
511
|
}
|
|
512
|
+
|
|
513
|
+
// === Iter22 V2 governance overlay ===
|
|
514
|
+
export function registerKimpgovV2Commands(program) {
|
|
515
|
+
const parent = program.commands.find((c) => c.name() === "import");
|
|
516
|
+
if (!parent) return;
|
|
517
|
+
const L = async () => await import("../lib/knowledge-importer.js");
|
|
518
|
+
parent
|
|
519
|
+
.command("kimpgov-enums-v2")
|
|
520
|
+
.description("Show V2 enums")
|
|
521
|
+
.action(async () => {
|
|
522
|
+
const m = await L();
|
|
523
|
+
console.log(
|
|
524
|
+
JSON.stringify(
|
|
525
|
+
{
|
|
526
|
+
profileMaturity: m.KIMPGOV_PROFILE_MATURITY_V2,
|
|
527
|
+
importLifecycle: m.KIMPGOV_IMPORT_LIFECYCLE_V2,
|
|
528
|
+
},
|
|
529
|
+
null,
|
|
530
|
+
2,
|
|
531
|
+
),
|
|
532
|
+
);
|
|
533
|
+
});
|
|
534
|
+
parent
|
|
535
|
+
.command("kimpgov-config-v2")
|
|
536
|
+
.description("Show V2 config")
|
|
537
|
+
.action(async () => {
|
|
538
|
+
const m = await L();
|
|
539
|
+
console.log(
|
|
540
|
+
JSON.stringify(
|
|
541
|
+
{
|
|
542
|
+
maxActive: m.getMaxActiveKimpgovProfilesPerOwnerV2(),
|
|
543
|
+
maxPending: m.getMaxPendingKimpgovImportsPerProfileV2(),
|
|
544
|
+
idleMs: m.getKimpgovProfileIdleMsV2(),
|
|
545
|
+
stuckMs: m.getKimpgovImportStuckMsV2(),
|
|
546
|
+
},
|
|
547
|
+
null,
|
|
548
|
+
2,
|
|
549
|
+
),
|
|
550
|
+
);
|
|
551
|
+
});
|
|
552
|
+
parent
|
|
553
|
+
.command("kimpgov-set-max-active-v2 <n>")
|
|
554
|
+
.description("Set max active")
|
|
555
|
+
.action(async (n) => {
|
|
556
|
+
(await L()).setMaxActiveKimpgovProfilesPerOwnerV2(Number(n));
|
|
557
|
+
console.log("ok");
|
|
558
|
+
});
|
|
559
|
+
parent
|
|
560
|
+
.command("kimpgov-set-max-pending-v2 <n>")
|
|
561
|
+
.description("Set max pending")
|
|
562
|
+
.action(async (n) => {
|
|
563
|
+
(await L()).setMaxPendingKimpgovImportsPerProfileV2(Number(n));
|
|
564
|
+
console.log("ok");
|
|
565
|
+
});
|
|
566
|
+
parent
|
|
567
|
+
.command("kimpgov-set-idle-ms-v2 <n>")
|
|
568
|
+
.description("Set idle threshold ms")
|
|
569
|
+
.action(async (n) => {
|
|
570
|
+
(await L()).setKimpgovProfileIdleMsV2(Number(n));
|
|
571
|
+
console.log("ok");
|
|
572
|
+
});
|
|
573
|
+
parent
|
|
574
|
+
.command("kimpgov-set-stuck-ms-v2 <n>")
|
|
575
|
+
.description("Set stuck threshold ms")
|
|
576
|
+
.action(async (n) => {
|
|
577
|
+
(await L()).setKimpgovImportStuckMsV2(Number(n));
|
|
578
|
+
console.log("ok");
|
|
579
|
+
});
|
|
580
|
+
parent
|
|
581
|
+
.command("kimpgov-register-v2 <id> <owner>")
|
|
582
|
+
.description("Register V2 profile")
|
|
583
|
+
.option("--format <v>", "format")
|
|
584
|
+
.action(async (id, owner, o) => {
|
|
585
|
+
const m = await L();
|
|
586
|
+
console.log(
|
|
587
|
+
JSON.stringify(
|
|
588
|
+
m.registerKimpgovProfileV2({ id, owner, format: o.format }),
|
|
589
|
+
null,
|
|
590
|
+
2,
|
|
591
|
+
),
|
|
592
|
+
);
|
|
593
|
+
});
|
|
594
|
+
parent
|
|
595
|
+
.command("kimpgov-activate-v2 <id>")
|
|
596
|
+
.description("Activate profile")
|
|
597
|
+
.action(async (id) => {
|
|
598
|
+
console.log(
|
|
599
|
+
JSON.stringify((await L()).activateKimpgovProfileV2(id), null, 2),
|
|
600
|
+
);
|
|
601
|
+
});
|
|
602
|
+
parent
|
|
603
|
+
.command("kimpgov-stale-v2 <id>")
|
|
604
|
+
.description("Stale profile")
|
|
605
|
+
.action(async (id) => {
|
|
606
|
+
console.log(
|
|
607
|
+
JSON.stringify((await L()).staleKimpgovProfileV2(id), null, 2),
|
|
608
|
+
);
|
|
609
|
+
});
|
|
610
|
+
parent
|
|
611
|
+
.command("kimpgov-archive-v2 <id>")
|
|
612
|
+
.description("Archive profile")
|
|
613
|
+
.action(async (id) => {
|
|
614
|
+
console.log(
|
|
615
|
+
JSON.stringify((await L()).archiveKimpgovProfileV2(id), null, 2),
|
|
616
|
+
);
|
|
617
|
+
});
|
|
618
|
+
parent
|
|
619
|
+
.command("kimpgov-touch-v2 <id>")
|
|
620
|
+
.description("Touch profile")
|
|
621
|
+
.action(async (id) => {
|
|
622
|
+
console.log(
|
|
623
|
+
JSON.stringify((await L()).touchKimpgovProfileV2(id), null, 2),
|
|
624
|
+
);
|
|
625
|
+
});
|
|
626
|
+
parent
|
|
627
|
+
.command("kimpgov-get-v2 <id>")
|
|
628
|
+
.description("Get profile")
|
|
629
|
+
.action(async (id) => {
|
|
630
|
+
console.log(JSON.stringify((await L()).getKimpgovProfileV2(id), null, 2));
|
|
631
|
+
});
|
|
632
|
+
parent
|
|
633
|
+
.command("kimpgov-list-v2")
|
|
634
|
+
.description("List profiles")
|
|
635
|
+
.action(async () => {
|
|
636
|
+
console.log(JSON.stringify((await L()).listKimpgovProfilesV2(), null, 2));
|
|
637
|
+
});
|
|
638
|
+
parent
|
|
639
|
+
.command("kimpgov-create-import-v2 <id> <profileId>")
|
|
640
|
+
.description("Create import")
|
|
641
|
+
.option("--source <v>", "source")
|
|
642
|
+
.action(async (id, profileId, o) => {
|
|
643
|
+
const m = await L();
|
|
644
|
+
console.log(
|
|
645
|
+
JSON.stringify(
|
|
646
|
+
m.createKimpgovImportV2({ id, profileId, source: o.source }),
|
|
647
|
+
null,
|
|
648
|
+
2,
|
|
649
|
+
),
|
|
650
|
+
);
|
|
651
|
+
});
|
|
652
|
+
parent
|
|
653
|
+
.command("kimpgov-importing-import-v2 <id>")
|
|
654
|
+
.description("Mark import as importing")
|
|
655
|
+
.action(async (id) => {
|
|
656
|
+
console.log(
|
|
657
|
+
JSON.stringify((await L()).importingKimpgovImportV2(id), null, 2),
|
|
658
|
+
);
|
|
659
|
+
});
|
|
660
|
+
parent
|
|
661
|
+
.command("kimpgov-complete-import-v2 <id>")
|
|
662
|
+
.description("Complete import")
|
|
663
|
+
.action(async (id) => {
|
|
664
|
+
console.log(
|
|
665
|
+
JSON.stringify((await L()).completeImportKimpgovV2(id), null, 2),
|
|
666
|
+
);
|
|
667
|
+
});
|
|
668
|
+
parent
|
|
669
|
+
.command("kimpgov-fail-import-v2 <id> [reason]")
|
|
670
|
+
.description("Fail import")
|
|
671
|
+
.action(async (id, reason) => {
|
|
672
|
+
console.log(
|
|
673
|
+
JSON.stringify((await L()).failKimpgovImportV2(id, reason), null, 2),
|
|
674
|
+
);
|
|
675
|
+
});
|
|
676
|
+
parent
|
|
677
|
+
.command("kimpgov-cancel-import-v2 <id> [reason]")
|
|
678
|
+
.description("Cancel import")
|
|
679
|
+
.action(async (id, reason) => {
|
|
680
|
+
console.log(
|
|
681
|
+
JSON.stringify((await L()).cancelKimpgovImportV2(id, reason), null, 2),
|
|
682
|
+
);
|
|
683
|
+
});
|
|
684
|
+
parent
|
|
685
|
+
.command("kimpgov-get-import-v2 <id>")
|
|
686
|
+
.description("Get import")
|
|
687
|
+
.action(async (id) => {
|
|
688
|
+
console.log(JSON.stringify((await L()).getKimpgovImportV2(id), null, 2));
|
|
689
|
+
});
|
|
690
|
+
parent
|
|
691
|
+
.command("kimpgov-list-imports-v2")
|
|
692
|
+
.description("List imports")
|
|
693
|
+
.action(async () => {
|
|
694
|
+
console.log(JSON.stringify((await L()).listKimpgovImportsV2(), null, 2));
|
|
695
|
+
});
|
|
696
|
+
parent
|
|
697
|
+
.command("kimpgov-auto-stale-idle-v2")
|
|
698
|
+
.description("Auto-stale idle")
|
|
699
|
+
.action(async () => {
|
|
700
|
+
console.log(
|
|
701
|
+
JSON.stringify((await L()).autoStaleIdleKimpgovProfilesV2(), null, 2),
|
|
702
|
+
);
|
|
703
|
+
});
|
|
704
|
+
parent
|
|
705
|
+
.command("kimpgov-auto-fail-stuck-v2")
|
|
706
|
+
.description("Auto-fail stuck imports")
|
|
707
|
+
.action(async () => {
|
|
708
|
+
console.log(
|
|
709
|
+
JSON.stringify((await L()).autoFailStuckKimpgovImportsV2(), null, 2),
|
|
710
|
+
);
|
|
711
|
+
});
|
|
712
|
+
parent
|
|
713
|
+
.command("kimpgov-gov-stats-v2")
|
|
714
|
+
.description("V2 gov stats")
|
|
715
|
+
.action(async () => {
|
|
716
|
+
console.log(
|
|
717
|
+
JSON.stringify((await L()).getKnowledgeImporterGovStatsV2(), null, 2),
|
|
718
|
+
);
|
|
719
|
+
});
|
|
720
|
+
}
|