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/bi.js
CHANGED
|
@@ -588,7 +588,6 @@ export function registerBiCommand(program) {
|
|
|
588
588
|
registerBiV2Command(bi);
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
-
|
|
592
591
|
import {
|
|
593
592
|
BI_DATASET_MATURITY_V2,
|
|
594
593
|
BI_QUERY_LIFECYCLE_V2,
|
|
@@ -620,30 +619,359 @@ import {
|
|
|
620
619
|
} from "../lib/bi-engine.js";
|
|
621
620
|
|
|
622
621
|
export function registerBiV2Command(bi) {
|
|
623
|
-
bi.command("enums-v2")
|
|
624
|
-
|
|
625
|
-
.
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
.
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
bi.command("
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
bi.command("
|
|
648
|
-
|
|
622
|
+
bi.command("enums-v2")
|
|
623
|
+
.description("Show V2 enums")
|
|
624
|
+
.action(() => {
|
|
625
|
+
console.log(
|
|
626
|
+
JSON.stringify(
|
|
627
|
+
{ BI_DATASET_MATURITY_V2, BI_QUERY_LIFECYCLE_V2 },
|
|
628
|
+
null,
|
|
629
|
+
2,
|
|
630
|
+
),
|
|
631
|
+
);
|
|
632
|
+
});
|
|
633
|
+
bi.command("register-dataset-v2")
|
|
634
|
+
.description("Register a BI dataset profile (pending)")
|
|
635
|
+
.requiredOption("--id <id>")
|
|
636
|
+
.requiredOption("--owner <owner>")
|
|
637
|
+
.option("--source <source>")
|
|
638
|
+
.action((o) => {
|
|
639
|
+
console.log(JSON.stringify(registerBiDatasetV2(o), null, 2));
|
|
640
|
+
});
|
|
641
|
+
bi.command("activate-dataset-v2 <id>")
|
|
642
|
+
.description("Activate dataset")
|
|
643
|
+
.action((id) => {
|
|
644
|
+
console.log(JSON.stringify(activateBiDatasetV2(id), null, 2));
|
|
645
|
+
});
|
|
646
|
+
bi.command("stale-dataset-v2 <id>")
|
|
647
|
+
.description("Mark dataset stale")
|
|
648
|
+
.action((id) => {
|
|
649
|
+
console.log(JSON.stringify(staleBiDatasetV2(id), null, 2));
|
|
650
|
+
});
|
|
651
|
+
bi.command("archive-dataset-v2 <id>")
|
|
652
|
+
.description("Archive dataset (terminal)")
|
|
653
|
+
.action((id) => {
|
|
654
|
+
console.log(JSON.stringify(archiveBiDatasetV2(id), null, 2));
|
|
655
|
+
});
|
|
656
|
+
bi.command("touch-dataset-v2 <id>")
|
|
657
|
+
.description("Refresh lastTouchedAt")
|
|
658
|
+
.action((id) => {
|
|
659
|
+
console.log(JSON.stringify(touchBiDatasetV2(id), null, 2));
|
|
660
|
+
});
|
|
661
|
+
bi.command("get-dataset-v2 <id>")
|
|
662
|
+
.description("Get dataset")
|
|
663
|
+
.action((id) => {
|
|
664
|
+
console.log(JSON.stringify(getBiDatasetV2(id), null, 2));
|
|
665
|
+
});
|
|
666
|
+
bi.command("list-datasets-v2")
|
|
667
|
+
.description("List datasets")
|
|
668
|
+
.action(() => {
|
|
669
|
+
console.log(JSON.stringify(listBiDatasetsV2(), null, 2));
|
|
670
|
+
});
|
|
671
|
+
bi.command("create-query-v2")
|
|
672
|
+
.description("Create a BI query (queued)")
|
|
673
|
+
.requiredOption("--id <id>")
|
|
674
|
+
.requiredOption("--dataset-id <datasetId>")
|
|
675
|
+
.option("--sql <sql>")
|
|
676
|
+
.action((o) => {
|
|
677
|
+
console.log(
|
|
678
|
+
JSON.stringify(
|
|
679
|
+
createBiQueryV2({ id: o.id, datasetId: o.datasetId, sql: o.sql }),
|
|
680
|
+
null,
|
|
681
|
+
2,
|
|
682
|
+
),
|
|
683
|
+
);
|
|
684
|
+
});
|
|
685
|
+
bi.command("start-query-v2 <id>")
|
|
686
|
+
.description("Transition query to running")
|
|
687
|
+
.action((id) => {
|
|
688
|
+
console.log(JSON.stringify(startBiQueryV2(id), null, 2));
|
|
689
|
+
});
|
|
690
|
+
bi.command("complete-query-v2 <id>")
|
|
691
|
+
.description("Transition query to completed")
|
|
692
|
+
.action((id) => {
|
|
693
|
+
console.log(JSON.stringify(completeBiQueryV2(id), null, 2));
|
|
694
|
+
});
|
|
695
|
+
bi.command("fail-query-v2 <id>")
|
|
696
|
+
.description("Fail query")
|
|
697
|
+
.option("--reason <r>")
|
|
698
|
+
.action((id, o) => {
|
|
699
|
+
console.log(JSON.stringify(failBiQueryV2(id, o.reason), null, 2));
|
|
700
|
+
});
|
|
701
|
+
bi.command("cancel-query-v2 <id>")
|
|
702
|
+
.description("Cancel query")
|
|
703
|
+
.option("--reason <r>")
|
|
704
|
+
.action((id, o) => {
|
|
705
|
+
console.log(JSON.stringify(cancelBiQueryV2(id, o.reason), null, 2));
|
|
706
|
+
});
|
|
707
|
+
bi.command("get-query-v2 <id>")
|
|
708
|
+
.description("Get query")
|
|
709
|
+
.action((id) => {
|
|
710
|
+
console.log(JSON.stringify(getBiQueryV2(id), null, 2));
|
|
711
|
+
});
|
|
712
|
+
bi.command("list-queries-v2")
|
|
713
|
+
.description("List queries")
|
|
714
|
+
.action(() => {
|
|
715
|
+
console.log(JSON.stringify(listBiQueriesV2(), null, 2));
|
|
716
|
+
});
|
|
717
|
+
bi.command("set-max-active-datasets-v2 <n>")
|
|
718
|
+
.description("Set per-owner active cap")
|
|
719
|
+
.action((n) => {
|
|
720
|
+
setMaxActiveBiDatasetsPerOwnerV2(Number(n));
|
|
721
|
+
console.log(
|
|
722
|
+
JSON.stringify(
|
|
723
|
+
{ maxActiveBiDatasetsPerOwner: getMaxActiveBiDatasetsPerOwnerV2() },
|
|
724
|
+
null,
|
|
725
|
+
2,
|
|
726
|
+
),
|
|
727
|
+
);
|
|
728
|
+
});
|
|
729
|
+
bi.command("set-max-pending-queries-v2 <n>")
|
|
730
|
+
.description("Set per-dataset pending cap")
|
|
731
|
+
.action((n) => {
|
|
732
|
+
setMaxPendingBiQueriesPerDatasetV2(Number(n));
|
|
733
|
+
console.log(
|
|
734
|
+
JSON.stringify(
|
|
735
|
+
{
|
|
736
|
+
maxPendingBiQueriesPerDataset: getMaxPendingBiQueriesPerDatasetV2(),
|
|
737
|
+
},
|
|
738
|
+
null,
|
|
739
|
+
2,
|
|
740
|
+
),
|
|
741
|
+
);
|
|
742
|
+
});
|
|
743
|
+
bi.command("set-dataset-idle-ms-v2 <n>")
|
|
744
|
+
.description("Set idle threshold")
|
|
745
|
+
.action((n) => {
|
|
746
|
+
setBiDatasetIdleMsV2(Number(n));
|
|
747
|
+
console.log(
|
|
748
|
+
JSON.stringify({ biDatasetIdleMs: getBiDatasetIdleMsV2() }, null, 2),
|
|
749
|
+
);
|
|
750
|
+
});
|
|
751
|
+
bi.command("set-query-stuck-ms-v2 <n>")
|
|
752
|
+
.description("Set stuck threshold")
|
|
753
|
+
.action((n) => {
|
|
754
|
+
setBiQueryStuckMsV2(Number(n));
|
|
755
|
+
console.log(
|
|
756
|
+
JSON.stringify({ biQueryStuckMs: getBiQueryStuckMsV2() }, null, 2),
|
|
757
|
+
);
|
|
758
|
+
});
|
|
759
|
+
bi.command("auto-stale-idle-datasets-v2")
|
|
760
|
+
.description("Auto-stale idle datasets")
|
|
761
|
+
.action(() => {
|
|
762
|
+
console.log(JSON.stringify(autoStaleIdleBiDatasetsV2(), null, 2));
|
|
763
|
+
});
|
|
764
|
+
bi.command("auto-fail-stuck-queries-v2")
|
|
765
|
+
.description("Auto-fail stuck running queries")
|
|
766
|
+
.action(() => {
|
|
767
|
+
console.log(JSON.stringify(autoFailStuckBiQueriesV2(), null, 2));
|
|
768
|
+
});
|
|
769
|
+
bi.command("gov-stats-v2")
|
|
770
|
+
.description("V2 governance aggregate stats")
|
|
771
|
+
.action(() => {
|
|
772
|
+
console.log(JSON.stringify(getBiEngineStatsV2(), null, 2));
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// === Iter21 V2 governance overlay ===
|
|
777
|
+
export function registerBigovV2Commands(program) {
|
|
778
|
+
const parent = program.commands.find((c) => c.name() === "bi");
|
|
779
|
+
if (!parent) return;
|
|
780
|
+
const L = async () => await import("../lib/bi-engine.js");
|
|
781
|
+
parent
|
|
782
|
+
.command("bigov-enums-v2")
|
|
783
|
+
.description("Show V2 enums")
|
|
784
|
+
.action(async () => {
|
|
785
|
+
const m = await L();
|
|
786
|
+
console.log(
|
|
787
|
+
JSON.stringify(
|
|
788
|
+
{
|
|
789
|
+
profileMaturity: m.BIGOV_PROFILE_MATURITY_V2,
|
|
790
|
+
queryLifecycle: m.BIGOV_QUERY_LIFECYCLE_V2,
|
|
791
|
+
},
|
|
792
|
+
null,
|
|
793
|
+
2,
|
|
794
|
+
),
|
|
795
|
+
);
|
|
796
|
+
});
|
|
797
|
+
parent
|
|
798
|
+
.command("bigov-config-v2")
|
|
799
|
+
.description("Show V2 config")
|
|
800
|
+
.action(async () => {
|
|
801
|
+
const m = await L();
|
|
802
|
+
console.log(
|
|
803
|
+
JSON.stringify(
|
|
804
|
+
{
|
|
805
|
+
maxActive: m.getMaxActiveBigovProfilesPerOwnerV2(),
|
|
806
|
+
maxPending: m.getMaxPendingBigovQuerysPerProfileV2(),
|
|
807
|
+
idleMs: m.getBigovProfileIdleMsV2(),
|
|
808
|
+
stuckMs: m.getBigovQueryStuckMsV2(),
|
|
809
|
+
},
|
|
810
|
+
null,
|
|
811
|
+
2,
|
|
812
|
+
),
|
|
813
|
+
);
|
|
814
|
+
});
|
|
815
|
+
parent
|
|
816
|
+
.command("bigov-set-max-active-v2 <n>")
|
|
817
|
+
.description("Set max active")
|
|
818
|
+
.action(async (n) => {
|
|
819
|
+
(await L()).setMaxActiveBigovProfilesPerOwnerV2(Number(n));
|
|
820
|
+
console.log("ok");
|
|
821
|
+
});
|
|
822
|
+
parent
|
|
823
|
+
.command("bigov-set-max-pending-v2 <n>")
|
|
824
|
+
.description("Set max pending")
|
|
825
|
+
.action(async (n) => {
|
|
826
|
+
(await L()).setMaxPendingBigovQuerysPerProfileV2(Number(n));
|
|
827
|
+
console.log("ok");
|
|
828
|
+
});
|
|
829
|
+
parent
|
|
830
|
+
.command("bigov-set-idle-ms-v2 <n>")
|
|
831
|
+
.description("Set idle threshold ms")
|
|
832
|
+
.action(async (n) => {
|
|
833
|
+
(await L()).setBigovProfileIdleMsV2(Number(n));
|
|
834
|
+
console.log("ok");
|
|
835
|
+
});
|
|
836
|
+
parent
|
|
837
|
+
.command("bigov-set-stuck-ms-v2 <n>")
|
|
838
|
+
.description("Set stuck threshold ms")
|
|
839
|
+
.action(async (n) => {
|
|
840
|
+
(await L()).setBigovQueryStuckMsV2(Number(n));
|
|
841
|
+
console.log("ok");
|
|
842
|
+
});
|
|
843
|
+
parent
|
|
844
|
+
.command("bigov-register-v2 <id> <owner>")
|
|
845
|
+
.description("Register V2 profile")
|
|
846
|
+
.option("--dataset <v>", "dataset")
|
|
847
|
+
.action(async (id, owner, o) => {
|
|
848
|
+
const m = await L();
|
|
849
|
+
console.log(
|
|
850
|
+
JSON.stringify(
|
|
851
|
+
m.registerBigovProfileV2({ id, owner, dataset: o.dataset }),
|
|
852
|
+
null,
|
|
853
|
+
2,
|
|
854
|
+
),
|
|
855
|
+
);
|
|
856
|
+
});
|
|
857
|
+
parent
|
|
858
|
+
.command("bigov-activate-v2 <id>")
|
|
859
|
+
.description("Activate profile")
|
|
860
|
+
.action(async (id) => {
|
|
861
|
+
console.log(
|
|
862
|
+
JSON.stringify((await L()).activateBigovProfileV2(id), null, 2),
|
|
863
|
+
);
|
|
864
|
+
});
|
|
865
|
+
parent
|
|
866
|
+
.command("bigov-stale-v2 <id>")
|
|
867
|
+
.description("Stale profile")
|
|
868
|
+
.action(async (id) => {
|
|
869
|
+
console.log(JSON.stringify((await L()).staleBigovProfileV2(id), null, 2));
|
|
870
|
+
});
|
|
871
|
+
parent
|
|
872
|
+
.command("bigov-archive-v2 <id>")
|
|
873
|
+
.description("Archive profile")
|
|
874
|
+
.action(async (id) => {
|
|
875
|
+
console.log(
|
|
876
|
+
JSON.stringify((await L()).archiveBigovProfileV2(id), null, 2),
|
|
877
|
+
);
|
|
878
|
+
});
|
|
879
|
+
parent
|
|
880
|
+
.command("bigov-touch-v2 <id>")
|
|
881
|
+
.description("Touch profile")
|
|
882
|
+
.action(async (id) => {
|
|
883
|
+
console.log(JSON.stringify((await L()).touchBigovProfileV2(id), null, 2));
|
|
884
|
+
});
|
|
885
|
+
parent
|
|
886
|
+
.command("bigov-get-v2 <id>")
|
|
887
|
+
.description("Get profile")
|
|
888
|
+
.action(async (id) => {
|
|
889
|
+
console.log(JSON.stringify((await L()).getBigovProfileV2(id), null, 2));
|
|
890
|
+
});
|
|
891
|
+
parent
|
|
892
|
+
.command("bigov-list-v2")
|
|
893
|
+
.description("List profiles")
|
|
894
|
+
.action(async () => {
|
|
895
|
+
console.log(JSON.stringify((await L()).listBigovProfilesV2(), null, 2));
|
|
896
|
+
});
|
|
897
|
+
parent
|
|
898
|
+
.command("bigov-create-query-v2 <id> <profileId>")
|
|
899
|
+
.description("Create query")
|
|
900
|
+
.option("--kpi <v>", "kpi")
|
|
901
|
+
.action(async (id, profileId, o) => {
|
|
902
|
+
const m = await L();
|
|
903
|
+
console.log(
|
|
904
|
+
JSON.stringify(
|
|
905
|
+
m.createBigovQueryV2({ id, profileId, kpi: o.kpi }),
|
|
906
|
+
null,
|
|
907
|
+
2,
|
|
908
|
+
),
|
|
909
|
+
);
|
|
910
|
+
});
|
|
911
|
+
parent
|
|
912
|
+
.command("bigov-querying-query-v2 <id>")
|
|
913
|
+
.description("Mark query as querying")
|
|
914
|
+
.action(async (id) => {
|
|
915
|
+
console.log(
|
|
916
|
+
JSON.stringify((await L()).queryingBigovQueryV2(id), null, 2),
|
|
917
|
+
);
|
|
918
|
+
});
|
|
919
|
+
parent
|
|
920
|
+
.command("bigov-complete-query-v2 <id>")
|
|
921
|
+
.description("Complete query")
|
|
922
|
+
.action(async (id) => {
|
|
923
|
+
console.log(
|
|
924
|
+
JSON.stringify((await L()).completeQueryBigovV2(id), null, 2),
|
|
925
|
+
);
|
|
926
|
+
});
|
|
927
|
+
parent
|
|
928
|
+
.command("bigov-fail-query-v2 <id> [reason]")
|
|
929
|
+
.description("Fail query")
|
|
930
|
+
.action(async (id, reason) => {
|
|
931
|
+
console.log(
|
|
932
|
+
JSON.stringify((await L()).failBigovQueryV2(id, reason), null, 2),
|
|
933
|
+
);
|
|
934
|
+
});
|
|
935
|
+
parent
|
|
936
|
+
.command("bigov-cancel-query-v2 <id> [reason]")
|
|
937
|
+
.description("Cancel query")
|
|
938
|
+
.action(async (id, reason) => {
|
|
939
|
+
console.log(
|
|
940
|
+
JSON.stringify((await L()).cancelBigovQueryV2(id, reason), null, 2),
|
|
941
|
+
);
|
|
942
|
+
});
|
|
943
|
+
parent
|
|
944
|
+
.command("bigov-get-query-v2 <id>")
|
|
945
|
+
.description("Get query")
|
|
946
|
+
.action(async (id) => {
|
|
947
|
+
console.log(JSON.stringify((await L()).getBigovQueryV2(id), null, 2));
|
|
948
|
+
});
|
|
949
|
+
parent
|
|
950
|
+
.command("bigov-list-querys-v2")
|
|
951
|
+
.description("List querys")
|
|
952
|
+
.action(async () => {
|
|
953
|
+
console.log(JSON.stringify((await L()).listBigovQuerysV2(), null, 2));
|
|
954
|
+
});
|
|
955
|
+
parent
|
|
956
|
+
.command("bigov-auto-stale-idle-v2")
|
|
957
|
+
.description("Auto-stale idle")
|
|
958
|
+
.action(async () => {
|
|
959
|
+
console.log(
|
|
960
|
+
JSON.stringify((await L()).autoStaleIdleBigovProfilesV2(), null, 2),
|
|
961
|
+
);
|
|
962
|
+
});
|
|
963
|
+
parent
|
|
964
|
+
.command("bigov-auto-fail-stuck-v2")
|
|
965
|
+
.description("Auto-fail stuck querys")
|
|
966
|
+
.action(async () => {
|
|
967
|
+
console.log(
|
|
968
|
+
JSON.stringify((await L()).autoFailStuckBigovQuerysV2(), null, 2),
|
|
969
|
+
);
|
|
970
|
+
});
|
|
971
|
+
parent
|
|
972
|
+
.command("bigov-gov-stats-v2")
|
|
973
|
+
.description("V2 gov stats")
|
|
974
|
+
.action(async () => {
|
|
975
|
+
console.log(JSON.stringify((await L()).getBiEngineGovStatsV2(), null, 2));
|
|
976
|
+
});
|
|
649
977
|
}
|
package/src/commands/bm25.js
CHANGED
|
@@ -37,42 +37,126 @@ export function registerBm25Command(program) {
|
|
|
37
37
|
.command("bm25")
|
|
38
38
|
.description("BM25 Search V2 governance (in-memory, CLI v0.143.0)");
|
|
39
39
|
|
|
40
|
-
b.command("enums-v2").action(() =>
|
|
40
|
+
b.command("enums-v2").action(() =>
|
|
41
|
+
console.log(
|
|
42
|
+
JSON.stringify(
|
|
43
|
+
{ BM25_PROFILE_MATURITY_V2, BM25_QUERY_LIFECYCLE_V2 },
|
|
44
|
+
null,
|
|
45
|
+
2,
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
41
49
|
b.command("register-profile-v2")
|
|
42
50
|
.requiredOption("--id <id>")
|
|
43
51
|
.requiredOption("--owner <owner>")
|
|
44
52
|
.option("--field <field>", "indexed field", "content")
|
|
45
|
-
.action((o) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
b.command("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
b.command("
|
|
53
|
+
.action((o) =>
|
|
54
|
+
console.log(JSON.stringify(registerBm25ProfileV2(o), null, 2)),
|
|
55
|
+
);
|
|
56
|
+
b.command("activate-profile-v2 <id>").action((id) =>
|
|
57
|
+
console.log(JSON.stringify(activateBm25ProfileV2(id), null, 2)),
|
|
58
|
+
);
|
|
59
|
+
b.command("stale-profile-v2 <id>").action((id) =>
|
|
60
|
+
console.log(JSON.stringify(staleBm25ProfileV2(id), null, 2)),
|
|
61
|
+
);
|
|
62
|
+
b.command("archive-profile-v2 <id>").action((id) =>
|
|
63
|
+
console.log(JSON.stringify(archiveBm25ProfileV2(id), null, 2)),
|
|
64
|
+
);
|
|
65
|
+
b.command("touch-profile-v2 <id>").action((id) =>
|
|
66
|
+
console.log(JSON.stringify(touchBm25ProfileV2(id), null, 2)),
|
|
67
|
+
);
|
|
68
|
+
b.command("get-profile-v2 <id>").action((id) =>
|
|
69
|
+
console.log(JSON.stringify(getBm25ProfileV2(id), null, 2)),
|
|
70
|
+
);
|
|
71
|
+
b.command("list-profiles-v2").action(() =>
|
|
72
|
+
console.log(JSON.stringify(listBm25ProfilesV2(), null, 2)),
|
|
73
|
+
);
|
|
52
74
|
|
|
53
75
|
b.command("create-query-v2")
|
|
54
76
|
.requiredOption("--id <id>")
|
|
55
77
|
.requiredOption("--profile-id <profileId>")
|
|
56
78
|
.option("--q <q>", "query text", "")
|
|
57
79
|
.action((o) => console.log(JSON.stringify(createBm25QueryV2(o), null, 2)));
|
|
58
|
-
b.command("searching-query-v2 <id>").action((id) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
b.command("
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
b.command("searching-query-v2 <id>").action((id) =>
|
|
81
|
+
console.log(JSON.stringify(searchingBm25QueryV2(id), null, 2)),
|
|
82
|
+
);
|
|
83
|
+
b.command("complete-query-v2 <id>").action((id) =>
|
|
84
|
+
console.log(JSON.stringify(completeBm25QueryV2(id), null, 2)),
|
|
85
|
+
);
|
|
86
|
+
b.command("fail-query-v2 <id>")
|
|
87
|
+
.option("--reason <r>")
|
|
88
|
+
.action((id, o) =>
|
|
89
|
+
console.log(JSON.stringify(failBm25QueryV2(id, o.reason), null, 2)),
|
|
90
|
+
);
|
|
91
|
+
b.command("cancel-query-v2 <id>")
|
|
92
|
+
.option("--reason <r>")
|
|
93
|
+
.action((id, o) =>
|
|
94
|
+
console.log(JSON.stringify(cancelBm25QueryV2(id, o.reason), null, 2)),
|
|
95
|
+
);
|
|
96
|
+
b.command("get-query-v2 <id>").action((id) =>
|
|
97
|
+
console.log(JSON.stringify(getBm25QueryV2(id), null, 2)),
|
|
98
|
+
);
|
|
99
|
+
b.command("list-queries-v2").action(() =>
|
|
100
|
+
console.log(JSON.stringify(listBm25QueriesV2(), null, 2)),
|
|
101
|
+
);
|
|
64
102
|
|
|
65
|
-
b.command("config-v2").action(() =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
103
|
+
b.command("config-v2").action(() =>
|
|
104
|
+
console.log(
|
|
105
|
+
JSON.stringify(
|
|
106
|
+
{
|
|
107
|
+
maxActiveBm25ProfilesPerOwner: getMaxActiveBm25ProfilesPerOwnerV2(),
|
|
108
|
+
maxPendingBm25QueriesPerProfile:
|
|
109
|
+
getMaxPendingBm25QueriesPerProfileV2(),
|
|
110
|
+
bm25ProfileIdleMs: getBm25ProfileIdleMsV2(),
|
|
111
|
+
bm25QueryStuckMs: getBm25QueryStuckMsV2(),
|
|
112
|
+
},
|
|
113
|
+
null,
|
|
114
|
+
2,
|
|
115
|
+
),
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
b.command("set-max-active-profiles-v2 <n>").action((n) => {
|
|
119
|
+
setMaxActiveBm25ProfilesPerOwnerV2(Number(n));
|
|
120
|
+
console.log(
|
|
121
|
+
JSON.stringify(
|
|
122
|
+
{ maxActiveBm25ProfilesPerOwner: getMaxActiveBm25ProfilesPerOwnerV2() },
|
|
123
|
+
null,
|
|
124
|
+
2,
|
|
125
|
+
),
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
b.command("set-max-pending-queries-v2 <n>").action((n) => {
|
|
129
|
+
setMaxPendingBm25QueriesPerProfileV2(Number(n));
|
|
130
|
+
console.log(
|
|
131
|
+
JSON.stringify(
|
|
132
|
+
{
|
|
133
|
+
maxPendingBm25QueriesPerProfile:
|
|
134
|
+
getMaxPendingBm25QueriesPerProfileV2(),
|
|
135
|
+
},
|
|
136
|
+
null,
|
|
137
|
+
2,
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
b.command("set-profile-idle-ms-v2 <ms>").action((ms) => {
|
|
142
|
+
setBm25ProfileIdleMsV2(Number(ms));
|
|
143
|
+
console.log(
|
|
144
|
+
JSON.stringify({ bm25ProfileIdleMs: getBm25ProfileIdleMsV2() }, null, 2),
|
|
145
|
+
);
|
|
146
|
+
});
|
|
147
|
+
b.command("set-query-stuck-ms-v2 <ms>").action((ms) => {
|
|
148
|
+
setBm25QueryStuckMsV2(Number(ms));
|
|
149
|
+
console.log(
|
|
150
|
+
JSON.stringify({ bm25QueryStuckMs: getBm25QueryStuckMsV2() }, null, 2),
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
b.command("auto-stale-idle-v2").action(() =>
|
|
154
|
+
console.log(JSON.stringify(autoStaleIdleBm25ProfilesV2(), null, 2)),
|
|
155
|
+
);
|
|
156
|
+
b.command("auto-fail-stuck-v2").action(() =>
|
|
157
|
+
console.log(JSON.stringify(autoFailStuckBm25QueriesV2(), null, 2)),
|
|
158
|
+
);
|
|
159
|
+
b.command("gov-stats-v2").action(() =>
|
|
160
|
+
console.log(JSON.stringify(getBm25SearchGovStatsV2(), null, 2)),
|
|
161
|
+
);
|
|
78
162
|
}
|