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/org.js
CHANGED
|
@@ -780,3 +780,212 @@ export function registerOrgCommand(program) {
|
|
|
780
780
|
console.log(JSON.stringify(autoRevokeStaleInvitesV2(), null, 2));
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
|
+
|
|
784
|
+
// === Iter19 V2 governance overlay ===
|
|
785
|
+
export function registerOrggovV2Commands(program) {
|
|
786
|
+
const parent = program.commands.find((c) => c.name() === "org");
|
|
787
|
+
if (!parent) return;
|
|
788
|
+
const L = async () => await import("../lib/org-manager.js");
|
|
789
|
+
parent
|
|
790
|
+
.command("orggov-enums-v2")
|
|
791
|
+
.description("Show V2 enums")
|
|
792
|
+
.action(async () => {
|
|
793
|
+
const m = await L();
|
|
794
|
+
console.log(
|
|
795
|
+
JSON.stringify(
|
|
796
|
+
{
|
|
797
|
+
profileMaturity: m.ORGGOV_PROFILE_MATURITY_V2,
|
|
798
|
+
inviteLifecycle: m.ORGGOV_INVITE_LIFECYCLE_V2,
|
|
799
|
+
},
|
|
800
|
+
null,
|
|
801
|
+
2,
|
|
802
|
+
),
|
|
803
|
+
);
|
|
804
|
+
});
|
|
805
|
+
parent
|
|
806
|
+
.command("orggov-config-v2")
|
|
807
|
+
.description("Show V2 config")
|
|
808
|
+
.action(async () => {
|
|
809
|
+
const m = await L();
|
|
810
|
+
console.log(
|
|
811
|
+
JSON.stringify(
|
|
812
|
+
{
|
|
813
|
+
maxActive: m.getMaxActiveOrggovProfilesPerOwnerV2(),
|
|
814
|
+
maxPending: m.getMaxPendingOrggovInvitesPerProfileV2(),
|
|
815
|
+
idleMs: m.getOrggovProfileIdleMsV2(),
|
|
816
|
+
stuckMs: m.getOrggovInviteStuckMsV2(),
|
|
817
|
+
},
|
|
818
|
+
null,
|
|
819
|
+
2,
|
|
820
|
+
),
|
|
821
|
+
);
|
|
822
|
+
});
|
|
823
|
+
parent
|
|
824
|
+
.command("orggov-set-max-active-v2 <n>")
|
|
825
|
+
.description("Set max active")
|
|
826
|
+
.action(async (n) => {
|
|
827
|
+
(await L()).setMaxActiveOrggovProfilesPerOwnerV2(Number(n));
|
|
828
|
+
console.log("ok");
|
|
829
|
+
});
|
|
830
|
+
parent
|
|
831
|
+
.command("orggov-set-max-pending-v2 <n>")
|
|
832
|
+
.description("Set max pending")
|
|
833
|
+
.action(async (n) => {
|
|
834
|
+
(await L()).setMaxPendingOrggovInvitesPerProfileV2(Number(n));
|
|
835
|
+
console.log("ok");
|
|
836
|
+
});
|
|
837
|
+
parent
|
|
838
|
+
.command("orggov-set-idle-ms-v2 <n>")
|
|
839
|
+
.description("Set idle threshold ms")
|
|
840
|
+
.action(async (n) => {
|
|
841
|
+
(await L()).setOrggovProfileIdleMsV2(Number(n));
|
|
842
|
+
console.log("ok");
|
|
843
|
+
});
|
|
844
|
+
parent
|
|
845
|
+
.command("orggov-set-stuck-ms-v2 <n>")
|
|
846
|
+
.description("Set stuck threshold ms")
|
|
847
|
+
.action(async (n) => {
|
|
848
|
+
(await L()).setOrggovInviteStuckMsV2(Number(n));
|
|
849
|
+
console.log("ok");
|
|
850
|
+
});
|
|
851
|
+
parent
|
|
852
|
+
.command("orggov-register-v2 <id> <owner>")
|
|
853
|
+
.description("Register V2 profile")
|
|
854
|
+
.option("--tier <v>", "tier")
|
|
855
|
+
.action(async (id, owner, o) => {
|
|
856
|
+
const m = await L();
|
|
857
|
+
console.log(
|
|
858
|
+
JSON.stringify(
|
|
859
|
+
m.registerOrggovProfileV2({ id, owner, tier: o.tier }),
|
|
860
|
+
null,
|
|
861
|
+
2,
|
|
862
|
+
),
|
|
863
|
+
);
|
|
864
|
+
});
|
|
865
|
+
parent
|
|
866
|
+
.command("orggov-activate-v2 <id>")
|
|
867
|
+
.description("Activate profile")
|
|
868
|
+
.action(async (id) => {
|
|
869
|
+
console.log(
|
|
870
|
+
JSON.stringify((await L()).activateOrggovProfileV2(id), null, 2),
|
|
871
|
+
);
|
|
872
|
+
});
|
|
873
|
+
parent
|
|
874
|
+
.command("orggov-pause-v2 <id>")
|
|
875
|
+
.description("Pause profile")
|
|
876
|
+
.action(async (id) => {
|
|
877
|
+
console.log(
|
|
878
|
+
JSON.stringify((await L()).pauseOrggovProfileV2(id), null, 2),
|
|
879
|
+
);
|
|
880
|
+
});
|
|
881
|
+
parent
|
|
882
|
+
.command("orggov-archive-v2 <id>")
|
|
883
|
+
.description("Archive profile")
|
|
884
|
+
.action(async (id) => {
|
|
885
|
+
console.log(
|
|
886
|
+
JSON.stringify((await L()).archiveOrggovProfileV2(id), null, 2),
|
|
887
|
+
);
|
|
888
|
+
});
|
|
889
|
+
parent
|
|
890
|
+
.command("orggov-touch-v2 <id>")
|
|
891
|
+
.description("Touch profile")
|
|
892
|
+
.action(async (id) => {
|
|
893
|
+
console.log(
|
|
894
|
+
JSON.stringify((await L()).touchOrggovProfileV2(id), null, 2),
|
|
895
|
+
);
|
|
896
|
+
});
|
|
897
|
+
parent
|
|
898
|
+
.command("orggov-get-v2 <id>")
|
|
899
|
+
.description("Get profile")
|
|
900
|
+
.action(async (id) => {
|
|
901
|
+
console.log(JSON.stringify((await L()).getOrggovProfileV2(id), null, 2));
|
|
902
|
+
});
|
|
903
|
+
parent
|
|
904
|
+
.command("orggov-list-v2")
|
|
905
|
+
.description("List profiles")
|
|
906
|
+
.action(async () => {
|
|
907
|
+
console.log(JSON.stringify((await L()).listOrggovProfilesV2(), null, 2));
|
|
908
|
+
});
|
|
909
|
+
parent
|
|
910
|
+
.command("orggov-create-invite-v2 <id> <profileId>")
|
|
911
|
+
.description("Create invite")
|
|
912
|
+
.option("--email <v>", "email")
|
|
913
|
+
.action(async (id, profileId, o) => {
|
|
914
|
+
const m = await L();
|
|
915
|
+
console.log(
|
|
916
|
+
JSON.stringify(
|
|
917
|
+
m.createOrggovInviteV2({ id, profileId, email: o.email }),
|
|
918
|
+
null,
|
|
919
|
+
2,
|
|
920
|
+
),
|
|
921
|
+
);
|
|
922
|
+
});
|
|
923
|
+
parent
|
|
924
|
+
.command("orggov-inviting-invite-v2 <id>")
|
|
925
|
+
.description("Mark invite as inviting")
|
|
926
|
+
.action(async (id) => {
|
|
927
|
+
console.log(
|
|
928
|
+
JSON.stringify((await L()).invitingOrggovInviteV2(id), null, 2),
|
|
929
|
+
);
|
|
930
|
+
});
|
|
931
|
+
parent
|
|
932
|
+
.command("orggov-complete-invite-v2 <id>")
|
|
933
|
+
.description("Complete invite")
|
|
934
|
+
.action(async (id) => {
|
|
935
|
+
console.log(
|
|
936
|
+
JSON.stringify((await L()).completeInviteOrggovV2(id), null, 2),
|
|
937
|
+
);
|
|
938
|
+
});
|
|
939
|
+
parent
|
|
940
|
+
.command("orggov-fail-invite-v2 <id> [reason]")
|
|
941
|
+
.description("Fail invite")
|
|
942
|
+
.action(async (id, reason) => {
|
|
943
|
+
console.log(
|
|
944
|
+
JSON.stringify((await L()).failOrggovInviteV2(id, reason), null, 2),
|
|
945
|
+
);
|
|
946
|
+
});
|
|
947
|
+
parent
|
|
948
|
+
.command("orggov-cancel-invite-v2 <id> [reason]")
|
|
949
|
+
.description("Cancel invite")
|
|
950
|
+
.action(async (id, reason) => {
|
|
951
|
+
console.log(
|
|
952
|
+
JSON.stringify((await L()).cancelOrggovInviteV2(id, reason), null, 2),
|
|
953
|
+
);
|
|
954
|
+
});
|
|
955
|
+
parent
|
|
956
|
+
.command("orggov-get-invite-v2 <id>")
|
|
957
|
+
.description("Get invite")
|
|
958
|
+
.action(async (id) => {
|
|
959
|
+
console.log(JSON.stringify((await L()).getOrggovInviteV2(id), null, 2));
|
|
960
|
+
});
|
|
961
|
+
parent
|
|
962
|
+
.command("orggov-list-invites-v2")
|
|
963
|
+
.description("List invites")
|
|
964
|
+
.action(async () => {
|
|
965
|
+
console.log(JSON.stringify((await L()).listOrggovInvitesV2(), null, 2));
|
|
966
|
+
});
|
|
967
|
+
parent
|
|
968
|
+
.command("orggov-auto-pause-idle-v2")
|
|
969
|
+
.description("Auto-pause idle")
|
|
970
|
+
.action(async () => {
|
|
971
|
+
console.log(
|
|
972
|
+
JSON.stringify((await L()).autoPauseIdleOrggovProfilesV2(), null, 2),
|
|
973
|
+
);
|
|
974
|
+
});
|
|
975
|
+
parent
|
|
976
|
+
.command("orggov-auto-fail-stuck-v2")
|
|
977
|
+
.description("Auto-fail stuck invites")
|
|
978
|
+
.action(async () => {
|
|
979
|
+
console.log(
|
|
980
|
+
JSON.stringify((await L()).autoFailStuckOrggovInvitesV2(), null, 2),
|
|
981
|
+
);
|
|
982
|
+
});
|
|
983
|
+
parent
|
|
984
|
+
.command("orggov-gov-stats-v2")
|
|
985
|
+
.description("V2 gov stats")
|
|
986
|
+
.action(async () => {
|
|
987
|
+
console.log(
|
|
988
|
+
JSON.stringify((await L()).getOrgManagerGovStatsV2(), null, 2),
|
|
989
|
+
);
|
|
990
|
+
});
|
|
991
|
+
}
|
package/src/commands/p2p.js
CHANGED
|
@@ -662,3 +662,212 @@ export function registerP2pCommand(program) {
|
|
|
662
662
|
else logger.log(JSON.stringify(s, null, 2));
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
+
|
|
666
|
+
// === Iter20 V2 governance overlay ===
|
|
667
|
+
export function registerP2pgovV2Commands(program) {
|
|
668
|
+
const parent = program.commands.find((c) => c.name() === "p2p");
|
|
669
|
+
if (!parent) return;
|
|
670
|
+
const L = async () => await import("../lib/p2p-manager.js");
|
|
671
|
+
parent
|
|
672
|
+
.command("p2pgov-enums-v2")
|
|
673
|
+
.description("Show V2 enums")
|
|
674
|
+
.action(async () => {
|
|
675
|
+
const m = await L();
|
|
676
|
+
console.log(
|
|
677
|
+
JSON.stringify(
|
|
678
|
+
{
|
|
679
|
+
profileMaturity: m.P2PGOV_PROFILE_MATURITY_V2,
|
|
680
|
+
gossipLifecycle: m.P2PGOV_GOSSIP_LIFECYCLE_V2,
|
|
681
|
+
},
|
|
682
|
+
null,
|
|
683
|
+
2,
|
|
684
|
+
),
|
|
685
|
+
);
|
|
686
|
+
});
|
|
687
|
+
parent
|
|
688
|
+
.command("p2pgov-config-v2")
|
|
689
|
+
.description("Show V2 config")
|
|
690
|
+
.action(async () => {
|
|
691
|
+
const m = await L();
|
|
692
|
+
console.log(
|
|
693
|
+
JSON.stringify(
|
|
694
|
+
{
|
|
695
|
+
maxActive: m.getMaxActiveP2pgovProfilesPerOwnerV2(),
|
|
696
|
+
maxPending: m.getMaxPendingP2pgovGossipsPerProfileV2(),
|
|
697
|
+
idleMs: m.getP2pgovProfileIdleMsV2(),
|
|
698
|
+
stuckMs: m.getP2pgovGossipStuckMsV2(),
|
|
699
|
+
},
|
|
700
|
+
null,
|
|
701
|
+
2,
|
|
702
|
+
),
|
|
703
|
+
);
|
|
704
|
+
});
|
|
705
|
+
parent
|
|
706
|
+
.command("p2pgov-set-max-active-v2 <n>")
|
|
707
|
+
.description("Set max active")
|
|
708
|
+
.action(async (n) => {
|
|
709
|
+
(await L()).setMaxActiveP2pgovProfilesPerOwnerV2(Number(n));
|
|
710
|
+
console.log("ok");
|
|
711
|
+
});
|
|
712
|
+
parent
|
|
713
|
+
.command("p2pgov-set-max-pending-v2 <n>")
|
|
714
|
+
.description("Set max pending")
|
|
715
|
+
.action(async (n) => {
|
|
716
|
+
(await L()).setMaxPendingP2pgovGossipsPerProfileV2(Number(n));
|
|
717
|
+
console.log("ok");
|
|
718
|
+
});
|
|
719
|
+
parent
|
|
720
|
+
.command("p2pgov-set-idle-ms-v2 <n>")
|
|
721
|
+
.description("Set idle threshold ms")
|
|
722
|
+
.action(async (n) => {
|
|
723
|
+
(await L()).setP2pgovProfileIdleMsV2(Number(n));
|
|
724
|
+
console.log("ok");
|
|
725
|
+
});
|
|
726
|
+
parent
|
|
727
|
+
.command("p2pgov-set-stuck-ms-v2 <n>")
|
|
728
|
+
.description("Set stuck threshold ms")
|
|
729
|
+
.action(async (n) => {
|
|
730
|
+
(await L()).setP2pgovGossipStuckMsV2(Number(n));
|
|
731
|
+
console.log("ok");
|
|
732
|
+
});
|
|
733
|
+
parent
|
|
734
|
+
.command("p2pgov-register-v2 <id> <owner>")
|
|
735
|
+
.description("Register V2 profile")
|
|
736
|
+
.option("--transport <v>", "transport")
|
|
737
|
+
.action(async (id, owner, o) => {
|
|
738
|
+
const m = await L();
|
|
739
|
+
console.log(
|
|
740
|
+
JSON.stringify(
|
|
741
|
+
m.registerP2pgovProfileV2({ id, owner, transport: o.transport }),
|
|
742
|
+
null,
|
|
743
|
+
2,
|
|
744
|
+
),
|
|
745
|
+
);
|
|
746
|
+
});
|
|
747
|
+
parent
|
|
748
|
+
.command("p2pgov-activate-v2 <id>")
|
|
749
|
+
.description("Activate profile")
|
|
750
|
+
.action(async (id) => {
|
|
751
|
+
console.log(
|
|
752
|
+
JSON.stringify((await L()).activateP2pgovProfileV2(id), null, 2),
|
|
753
|
+
);
|
|
754
|
+
});
|
|
755
|
+
parent
|
|
756
|
+
.command("p2pgov-suspend-v2 <id>")
|
|
757
|
+
.description("Suspend profile")
|
|
758
|
+
.action(async (id) => {
|
|
759
|
+
console.log(
|
|
760
|
+
JSON.stringify((await L()).suspendP2pgovProfileV2(id), null, 2),
|
|
761
|
+
);
|
|
762
|
+
});
|
|
763
|
+
parent
|
|
764
|
+
.command("p2pgov-archive-v2 <id>")
|
|
765
|
+
.description("Archive profile")
|
|
766
|
+
.action(async (id) => {
|
|
767
|
+
console.log(
|
|
768
|
+
JSON.stringify((await L()).archiveP2pgovProfileV2(id), null, 2),
|
|
769
|
+
);
|
|
770
|
+
});
|
|
771
|
+
parent
|
|
772
|
+
.command("p2pgov-touch-v2 <id>")
|
|
773
|
+
.description("Touch profile")
|
|
774
|
+
.action(async (id) => {
|
|
775
|
+
console.log(
|
|
776
|
+
JSON.stringify((await L()).touchP2pgovProfileV2(id), null, 2),
|
|
777
|
+
);
|
|
778
|
+
});
|
|
779
|
+
parent
|
|
780
|
+
.command("p2pgov-get-v2 <id>")
|
|
781
|
+
.description("Get profile")
|
|
782
|
+
.action(async (id) => {
|
|
783
|
+
console.log(JSON.stringify((await L()).getP2pgovProfileV2(id), null, 2));
|
|
784
|
+
});
|
|
785
|
+
parent
|
|
786
|
+
.command("p2pgov-list-v2")
|
|
787
|
+
.description("List profiles")
|
|
788
|
+
.action(async () => {
|
|
789
|
+
console.log(JSON.stringify((await L()).listP2pgovProfilesV2(), null, 2));
|
|
790
|
+
});
|
|
791
|
+
parent
|
|
792
|
+
.command("p2pgov-create-gossip-v2 <id> <profileId>")
|
|
793
|
+
.description("Create gossip")
|
|
794
|
+
.option("--topic <v>", "topic")
|
|
795
|
+
.action(async (id, profileId, o) => {
|
|
796
|
+
const m = await L();
|
|
797
|
+
console.log(
|
|
798
|
+
JSON.stringify(
|
|
799
|
+
m.createP2pgovGossipV2({ id, profileId, topic: o.topic }),
|
|
800
|
+
null,
|
|
801
|
+
2,
|
|
802
|
+
),
|
|
803
|
+
);
|
|
804
|
+
});
|
|
805
|
+
parent
|
|
806
|
+
.command("p2pgov-broadcasting-gossip-v2 <id>")
|
|
807
|
+
.description("Mark gossip as broadcasting")
|
|
808
|
+
.action(async (id) => {
|
|
809
|
+
console.log(
|
|
810
|
+
JSON.stringify((await L()).broadcastingP2pgovGossipV2(id), null, 2),
|
|
811
|
+
);
|
|
812
|
+
});
|
|
813
|
+
parent
|
|
814
|
+
.command("p2pgov-complete-gossip-v2 <id>")
|
|
815
|
+
.description("Complete gossip")
|
|
816
|
+
.action(async (id) => {
|
|
817
|
+
console.log(
|
|
818
|
+
JSON.stringify((await L()).completeGossipP2pgovV2(id), null, 2),
|
|
819
|
+
);
|
|
820
|
+
});
|
|
821
|
+
parent
|
|
822
|
+
.command("p2pgov-fail-gossip-v2 <id> [reason]")
|
|
823
|
+
.description("Fail gossip")
|
|
824
|
+
.action(async (id, reason) => {
|
|
825
|
+
console.log(
|
|
826
|
+
JSON.stringify((await L()).failP2pgovGossipV2(id, reason), null, 2),
|
|
827
|
+
);
|
|
828
|
+
});
|
|
829
|
+
parent
|
|
830
|
+
.command("p2pgov-cancel-gossip-v2 <id> [reason]")
|
|
831
|
+
.description("Cancel gossip")
|
|
832
|
+
.action(async (id, reason) => {
|
|
833
|
+
console.log(
|
|
834
|
+
JSON.stringify((await L()).cancelP2pgovGossipV2(id, reason), null, 2),
|
|
835
|
+
);
|
|
836
|
+
});
|
|
837
|
+
parent
|
|
838
|
+
.command("p2pgov-get-gossip-v2 <id>")
|
|
839
|
+
.description("Get gossip")
|
|
840
|
+
.action(async (id) => {
|
|
841
|
+
console.log(JSON.stringify((await L()).getP2pgovGossipV2(id), null, 2));
|
|
842
|
+
});
|
|
843
|
+
parent
|
|
844
|
+
.command("p2pgov-list-gossips-v2")
|
|
845
|
+
.description("List gossips")
|
|
846
|
+
.action(async () => {
|
|
847
|
+
console.log(JSON.stringify((await L()).listP2pgovGossipsV2(), null, 2));
|
|
848
|
+
});
|
|
849
|
+
parent
|
|
850
|
+
.command("p2pgov-auto-suspend-idle-v2")
|
|
851
|
+
.description("Auto-suspend idle")
|
|
852
|
+
.action(async () => {
|
|
853
|
+
console.log(
|
|
854
|
+
JSON.stringify((await L()).autoSuspendIdleP2pgovProfilesV2(), null, 2),
|
|
855
|
+
);
|
|
856
|
+
});
|
|
857
|
+
parent
|
|
858
|
+
.command("p2pgov-auto-fail-stuck-v2")
|
|
859
|
+
.description("Auto-fail stuck gossips")
|
|
860
|
+
.action(async () => {
|
|
861
|
+
console.log(
|
|
862
|
+
JSON.stringify((await L()).autoFailStuckP2pgovGossipsV2(), null, 2),
|
|
863
|
+
);
|
|
864
|
+
});
|
|
865
|
+
parent
|
|
866
|
+
.command("p2pgov-gov-stats-v2")
|
|
867
|
+
.description("V2 gov stats")
|
|
868
|
+
.action(async () => {
|
|
869
|
+
console.log(
|
|
870
|
+
JSON.stringify((await L()).getP2pManagerGovStatsV2(), null, 2),
|
|
871
|
+
);
|
|
872
|
+
});
|
|
873
|
+
}
|
package/src/commands/pdfp.js
CHANGED
|
@@ -37,42 +37,124 @@ export function registerPdfpCommand(program) {
|
|
|
37
37
|
.command("pdfp")
|
|
38
38
|
.description("PDF Parser V2 governance (in-memory, CLI v0.143.0)");
|
|
39
39
|
|
|
40
|
-
p.command("enums-v2").action(() =>
|
|
40
|
+
p.command("enums-v2").action(() =>
|
|
41
|
+
console.log(
|
|
42
|
+
JSON.stringify(
|
|
43
|
+
{ PDFP_PROFILE_MATURITY_V2, PDFP_PARSE_LIFECYCLE_V2 },
|
|
44
|
+
null,
|
|
45
|
+
2,
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
41
49
|
p.command("register-profile-v2")
|
|
42
50
|
.requiredOption("--id <id>")
|
|
43
51
|
.requiredOption("--owner <owner>")
|
|
44
52
|
.option("--encoding <encoding>", "encoding", "utf-8")
|
|
45
|
-
.action((o) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
p.command("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
p.command("
|
|
53
|
+
.action((o) =>
|
|
54
|
+
console.log(JSON.stringify(registerPdfpProfileV2(o), null, 2)),
|
|
55
|
+
);
|
|
56
|
+
p.command("activate-profile-v2 <id>").action((id) =>
|
|
57
|
+
console.log(JSON.stringify(activatePdfpProfileV2(id), null, 2)),
|
|
58
|
+
);
|
|
59
|
+
p.command("stale-profile-v2 <id>").action((id) =>
|
|
60
|
+
console.log(JSON.stringify(stalePdfpProfileV2(id), null, 2)),
|
|
61
|
+
);
|
|
62
|
+
p.command("archive-profile-v2 <id>").action((id) =>
|
|
63
|
+
console.log(JSON.stringify(archivePdfpProfileV2(id), null, 2)),
|
|
64
|
+
);
|
|
65
|
+
p.command("touch-profile-v2 <id>").action((id) =>
|
|
66
|
+
console.log(JSON.stringify(touchPdfpProfileV2(id), null, 2)),
|
|
67
|
+
);
|
|
68
|
+
p.command("get-profile-v2 <id>").action((id) =>
|
|
69
|
+
console.log(JSON.stringify(getPdfpProfileV2(id), null, 2)),
|
|
70
|
+
);
|
|
71
|
+
p.command("list-profiles-v2").action(() =>
|
|
72
|
+
console.log(JSON.stringify(listPdfpProfilesV2(), null, 2)),
|
|
73
|
+
);
|
|
52
74
|
|
|
53
75
|
p.command("create-parse-v2")
|
|
54
76
|
.requiredOption("--id <id>")
|
|
55
77
|
.requiredOption("--profile-id <profileId>")
|
|
56
78
|
.option("--path <path>", "pdf path", "")
|
|
57
79
|
.action((o) => console.log(JSON.stringify(createPdfpParseV2(o), null, 2)));
|
|
58
|
-
p.command("parsing-parse-v2 <id>").action((id) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
p.command("
|
|
62
|
-
|
|
63
|
-
|
|
80
|
+
p.command("parsing-parse-v2 <id>").action((id) =>
|
|
81
|
+
console.log(JSON.stringify(parsingPdfpParseV2(id), null, 2)),
|
|
82
|
+
);
|
|
83
|
+
p.command("parse-parse-v2 <id>").action((id) =>
|
|
84
|
+
console.log(JSON.stringify(parsePdfpParseV2(id), null, 2)),
|
|
85
|
+
);
|
|
86
|
+
p.command("fail-parse-v2 <id>")
|
|
87
|
+
.option("--reason <r>")
|
|
88
|
+
.action((id, o) =>
|
|
89
|
+
console.log(JSON.stringify(failPdfpParseV2(id, o.reason), null, 2)),
|
|
90
|
+
);
|
|
91
|
+
p.command("cancel-parse-v2 <id>")
|
|
92
|
+
.option("--reason <r>")
|
|
93
|
+
.action((id, o) =>
|
|
94
|
+
console.log(JSON.stringify(cancelPdfpParseV2(id, o.reason), null, 2)),
|
|
95
|
+
);
|
|
96
|
+
p.command("get-parse-v2 <id>").action((id) =>
|
|
97
|
+
console.log(JSON.stringify(getPdfpParseV2(id), null, 2)),
|
|
98
|
+
);
|
|
99
|
+
p.command("list-parses-v2").action(() =>
|
|
100
|
+
console.log(JSON.stringify(listPdfpParsesV2(), null, 2)),
|
|
101
|
+
);
|
|
64
102
|
|
|
65
|
-
p.command("config-v2").action(() =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
103
|
+
p.command("config-v2").action(() =>
|
|
104
|
+
console.log(
|
|
105
|
+
JSON.stringify(
|
|
106
|
+
{
|
|
107
|
+
maxActivePdfpProfilesPerOwner: getMaxActivePdfpProfilesPerOwnerV2(),
|
|
108
|
+
maxPendingPdfpParsesPerProfile: getMaxPendingPdfpParsesPerProfileV2(),
|
|
109
|
+
pdfpProfileIdleMs: getPdfpProfileIdleMsV2(),
|
|
110
|
+
pdfpParseStuckMs: getPdfpParseStuckMsV2(),
|
|
111
|
+
},
|
|
112
|
+
null,
|
|
113
|
+
2,
|
|
114
|
+
),
|
|
115
|
+
),
|
|
116
|
+
);
|
|
117
|
+
p.command("set-max-active-profiles-v2 <n>").action((n) => {
|
|
118
|
+
setMaxActivePdfpProfilesPerOwnerV2(Number(n));
|
|
119
|
+
console.log(
|
|
120
|
+
JSON.stringify(
|
|
121
|
+
{ maxActivePdfpProfilesPerOwner: getMaxActivePdfpProfilesPerOwnerV2() },
|
|
122
|
+
null,
|
|
123
|
+
2,
|
|
124
|
+
),
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
p.command("set-max-pending-parses-v2 <n>").action((n) => {
|
|
128
|
+
setMaxPendingPdfpParsesPerProfileV2(Number(n));
|
|
129
|
+
console.log(
|
|
130
|
+
JSON.stringify(
|
|
131
|
+
{
|
|
132
|
+
maxPendingPdfpParsesPerProfile: getMaxPendingPdfpParsesPerProfileV2(),
|
|
133
|
+
},
|
|
134
|
+
null,
|
|
135
|
+
2,
|
|
136
|
+
),
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
p.command("set-profile-idle-ms-v2 <ms>").action((ms) => {
|
|
140
|
+
setPdfpProfileIdleMsV2(Number(ms));
|
|
141
|
+
console.log(
|
|
142
|
+
JSON.stringify({ pdfpProfileIdleMs: getPdfpProfileIdleMsV2() }, null, 2),
|
|
143
|
+
);
|
|
144
|
+
});
|
|
145
|
+
p.command("set-parse-stuck-ms-v2 <ms>").action((ms) => {
|
|
146
|
+
setPdfpParseStuckMsV2(Number(ms));
|
|
147
|
+
console.log(
|
|
148
|
+
JSON.stringify({ pdfpParseStuckMs: getPdfpParseStuckMsV2() }, null, 2),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
p.command("auto-stale-idle-v2").action(() =>
|
|
152
|
+
console.log(JSON.stringify(autoStaleIdlePdfpProfilesV2(), null, 2)),
|
|
153
|
+
);
|
|
154
|
+
p.command("auto-fail-stuck-v2").action(() =>
|
|
155
|
+
console.log(JSON.stringify(autoFailStuckPdfpParsesV2(), null, 2)),
|
|
156
|
+
);
|
|
157
|
+
p.command("gov-stats-v2").action(() =>
|
|
158
|
+
console.log(JSON.stringify(getPdfParserGovStatsV2(), null, 2)),
|
|
159
|
+
);
|
|
78
160
|
}
|