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/vcheck.js
CHANGED
|
@@ -37,42 +37,136 @@ export function registerVcheckCommand(program) {
|
|
|
37
37
|
.command("vcheck")
|
|
38
38
|
.description("Version Checker V2 governance (in-memory, CLI v0.143.0)");
|
|
39
39
|
|
|
40
|
-
v.command("enums-v2").action(() =>
|
|
40
|
+
v.command("enums-v2").action(() =>
|
|
41
|
+
console.log(
|
|
42
|
+
JSON.stringify(
|
|
43
|
+
{ VCHK_PROFILE_MATURITY_V2, VCHK_CHECK_LIFECYCLE_V2 },
|
|
44
|
+
null,
|
|
45
|
+
2,
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
41
49
|
v.command("register-profile-v2")
|
|
42
50
|
.requiredOption("--id <id>")
|
|
43
51
|
.requiredOption("--owner <owner>")
|
|
44
52
|
.option("--channel <channel>", "release channel", "stable")
|
|
45
|
-
.action((o) =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
v.command("
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
v.command("
|
|
53
|
+
.action((o) =>
|
|
54
|
+
console.log(JSON.stringify(registerVchkProfileV2(o), null, 2)),
|
|
55
|
+
);
|
|
56
|
+
v.command("activate-profile-v2 <id>").action((id) =>
|
|
57
|
+
console.log(JSON.stringify(activateVchkProfileV2(id), null, 2)),
|
|
58
|
+
);
|
|
59
|
+
v.command("stale-profile-v2 <id>").action((id) =>
|
|
60
|
+
console.log(JSON.stringify(staleVchkProfileV2(id), null, 2)),
|
|
61
|
+
);
|
|
62
|
+
v.command("archive-profile-v2 <id>").action((id) =>
|
|
63
|
+
console.log(JSON.stringify(archiveVchkProfileV2(id), null, 2)),
|
|
64
|
+
);
|
|
65
|
+
v.command("touch-profile-v2 <id>").action((id) =>
|
|
66
|
+
console.log(JSON.stringify(touchVchkProfileV2(id), null, 2)),
|
|
67
|
+
);
|
|
68
|
+
v.command("get-profile-v2 <id>").action((id) =>
|
|
69
|
+
console.log(JSON.stringify(getVchkProfileV2(id), null, 2)),
|
|
70
|
+
);
|
|
71
|
+
v.command("list-profiles-v2").action(() =>
|
|
72
|
+
console.log(JSON.stringify(listVchkProfilesV2(), null, 2)),
|
|
73
|
+
);
|
|
52
74
|
|
|
53
75
|
v.command("create-check-v2")
|
|
54
76
|
.requiredOption("--id <id>")
|
|
55
77
|
.requiredOption("--profile-id <profileId>")
|
|
56
78
|
.option("--current-version <ver>", "current version", "")
|
|
57
|
-
.action((o) =>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
.action((o) =>
|
|
80
|
+
console.log(
|
|
81
|
+
JSON.stringify(
|
|
82
|
+
createVchkCheckV2({
|
|
83
|
+
id: o.id,
|
|
84
|
+
profileId: o.profileId,
|
|
85
|
+
currentVersion: o.currentVersion,
|
|
86
|
+
}),
|
|
87
|
+
null,
|
|
88
|
+
2,
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
);
|
|
92
|
+
v.command("checking-check-v2 <id>").action((id) =>
|
|
93
|
+
console.log(JSON.stringify(checkingVchkCheckV2(id), null, 2)),
|
|
94
|
+
);
|
|
95
|
+
v.command("complete-check-v2 <id>").action((id) =>
|
|
96
|
+
console.log(JSON.stringify(completeVchkCheckV2(id), null, 2)),
|
|
97
|
+
);
|
|
98
|
+
v.command("fail-check-v2 <id>")
|
|
99
|
+
.option("--reason <r>")
|
|
100
|
+
.action((id, o) =>
|
|
101
|
+
console.log(JSON.stringify(failVchkCheckV2(id, o.reason), null, 2)),
|
|
102
|
+
);
|
|
103
|
+
v.command("cancel-check-v2 <id>")
|
|
104
|
+
.option("--reason <r>")
|
|
105
|
+
.action((id, o) =>
|
|
106
|
+
console.log(JSON.stringify(cancelVchkCheckV2(id, o.reason), null, 2)),
|
|
107
|
+
);
|
|
108
|
+
v.command("get-check-v2 <id>").action((id) =>
|
|
109
|
+
console.log(JSON.stringify(getVchkCheckV2(id), null, 2)),
|
|
110
|
+
);
|
|
111
|
+
v.command("list-checks-v2").action(() =>
|
|
112
|
+
console.log(JSON.stringify(listVchkChecksV2(), null, 2)),
|
|
113
|
+
);
|
|
64
114
|
|
|
65
|
-
v.command("config-v2").action(() =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
115
|
+
v.command("config-v2").action(() =>
|
|
116
|
+
console.log(
|
|
117
|
+
JSON.stringify(
|
|
118
|
+
{
|
|
119
|
+
maxActiveVchkProfilesPerOwner: getMaxActiveVchkProfilesPerOwnerV2(),
|
|
120
|
+
maxPendingVchkChecksPerProfile: getMaxPendingVchkChecksPerProfileV2(),
|
|
121
|
+
vchkProfileIdleMs: getVchkProfileIdleMsV2(),
|
|
122
|
+
vchkCheckStuckMs: getVchkCheckStuckMsV2(),
|
|
123
|
+
},
|
|
124
|
+
null,
|
|
125
|
+
2,
|
|
126
|
+
),
|
|
127
|
+
),
|
|
128
|
+
);
|
|
129
|
+
v.command("set-max-active-profiles-v2 <n>").action((n) => {
|
|
130
|
+
setMaxActiveVchkProfilesPerOwnerV2(Number(n));
|
|
131
|
+
console.log(
|
|
132
|
+
JSON.stringify(
|
|
133
|
+
{ maxActiveVchkProfilesPerOwner: getMaxActiveVchkProfilesPerOwnerV2() },
|
|
134
|
+
null,
|
|
135
|
+
2,
|
|
136
|
+
),
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
v.command("set-max-pending-checks-v2 <n>").action((n) => {
|
|
140
|
+
setMaxPendingVchkChecksPerProfileV2(Number(n));
|
|
141
|
+
console.log(
|
|
142
|
+
JSON.stringify(
|
|
143
|
+
{
|
|
144
|
+
maxPendingVchkChecksPerProfile: getMaxPendingVchkChecksPerProfileV2(),
|
|
145
|
+
},
|
|
146
|
+
null,
|
|
147
|
+
2,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
v.command("set-profile-idle-ms-v2 <ms>").action((ms) => {
|
|
152
|
+
setVchkProfileIdleMsV2(Number(ms));
|
|
153
|
+
console.log(
|
|
154
|
+
JSON.stringify({ vchkProfileIdleMs: getVchkProfileIdleMsV2() }, null, 2),
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
v.command("set-check-stuck-ms-v2 <ms>").action((ms) => {
|
|
158
|
+
setVchkCheckStuckMsV2(Number(ms));
|
|
159
|
+
console.log(
|
|
160
|
+
JSON.stringify({ vchkCheckStuckMs: getVchkCheckStuckMsV2() }, null, 2),
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
v.command("auto-stale-idle-v2").action(() =>
|
|
164
|
+
console.log(JSON.stringify(autoStaleIdleVchkProfilesV2(), null, 2)),
|
|
165
|
+
);
|
|
166
|
+
v.command("auto-fail-stuck-v2").action(() =>
|
|
167
|
+
console.log(JSON.stringify(autoFailStuckVchkChecksV2(), null, 2)),
|
|
168
|
+
);
|
|
169
|
+
v.command("gov-stats-v2").action(() =>
|
|
170
|
+
console.log(JSON.stringify(getVersionCheckerGovStatsV2(), null, 2)),
|
|
171
|
+
);
|
|
78
172
|
}
|
package/src/commands/wallet.js
CHANGED
|
@@ -691,3 +691,212 @@ export function registerWalletCommand(program) {
|
|
|
691
691
|
console.log(JSON.stringify(autoFailStuckTxV2(), null, 2));
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
|
+
|
|
695
|
+
// === Iter20 V2 governance overlay ===
|
|
696
|
+
export function registerWalgovV2Commands(program) {
|
|
697
|
+
const parent = program.commands.find((c) => c.name() === "wallet");
|
|
698
|
+
if (!parent) return;
|
|
699
|
+
const L = async () => await import("../lib/wallet-manager.js");
|
|
700
|
+
parent
|
|
701
|
+
.command("walgov-enums-v2")
|
|
702
|
+
.description("Show V2 enums")
|
|
703
|
+
.action(async () => {
|
|
704
|
+
const m = await L();
|
|
705
|
+
console.log(
|
|
706
|
+
JSON.stringify(
|
|
707
|
+
{
|
|
708
|
+
profileMaturity: m.WALGOV_PROFILE_MATURITY_V2,
|
|
709
|
+
transferLifecycle: m.WALGOV_TRANSFER_LIFECYCLE_V2,
|
|
710
|
+
},
|
|
711
|
+
null,
|
|
712
|
+
2,
|
|
713
|
+
),
|
|
714
|
+
);
|
|
715
|
+
});
|
|
716
|
+
parent
|
|
717
|
+
.command("walgov-config-v2")
|
|
718
|
+
.description("Show V2 config")
|
|
719
|
+
.action(async () => {
|
|
720
|
+
const m = await L();
|
|
721
|
+
console.log(
|
|
722
|
+
JSON.stringify(
|
|
723
|
+
{
|
|
724
|
+
maxActive: m.getMaxActiveWalgovProfilesPerOwnerV2(),
|
|
725
|
+
maxPending: m.getMaxPendingWalgovTransfersPerProfileV2(),
|
|
726
|
+
idleMs: m.getWalgovProfileIdleMsV2(),
|
|
727
|
+
stuckMs: m.getWalgovTransferStuckMsV2(),
|
|
728
|
+
},
|
|
729
|
+
null,
|
|
730
|
+
2,
|
|
731
|
+
),
|
|
732
|
+
);
|
|
733
|
+
});
|
|
734
|
+
parent
|
|
735
|
+
.command("walgov-set-max-active-v2 <n>")
|
|
736
|
+
.description("Set max active")
|
|
737
|
+
.action(async (n) => {
|
|
738
|
+
(await L()).setMaxActiveWalgovProfilesPerOwnerV2(Number(n));
|
|
739
|
+
console.log("ok");
|
|
740
|
+
});
|
|
741
|
+
parent
|
|
742
|
+
.command("walgov-set-max-pending-v2 <n>")
|
|
743
|
+
.description("Set max pending")
|
|
744
|
+
.action(async (n) => {
|
|
745
|
+
(await L()).setMaxPendingWalgovTransfersPerProfileV2(Number(n));
|
|
746
|
+
console.log("ok");
|
|
747
|
+
});
|
|
748
|
+
parent
|
|
749
|
+
.command("walgov-set-idle-ms-v2 <n>")
|
|
750
|
+
.description("Set idle threshold ms")
|
|
751
|
+
.action(async (n) => {
|
|
752
|
+
(await L()).setWalgovProfileIdleMsV2(Number(n));
|
|
753
|
+
console.log("ok");
|
|
754
|
+
});
|
|
755
|
+
parent
|
|
756
|
+
.command("walgov-set-stuck-ms-v2 <n>")
|
|
757
|
+
.description("Set stuck threshold ms")
|
|
758
|
+
.action(async (n) => {
|
|
759
|
+
(await L()).setWalgovTransferStuckMsV2(Number(n));
|
|
760
|
+
console.log("ok");
|
|
761
|
+
});
|
|
762
|
+
parent
|
|
763
|
+
.command("walgov-register-v2 <id> <owner>")
|
|
764
|
+
.description("Register V2 profile")
|
|
765
|
+
.option("--chain <v>", "chain")
|
|
766
|
+
.action(async (id, owner, o) => {
|
|
767
|
+
const m = await L();
|
|
768
|
+
console.log(
|
|
769
|
+
JSON.stringify(
|
|
770
|
+
m.registerWalgovProfileV2({ id, owner, chain: o.chain }),
|
|
771
|
+
null,
|
|
772
|
+
2,
|
|
773
|
+
),
|
|
774
|
+
);
|
|
775
|
+
});
|
|
776
|
+
parent
|
|
777
|
+
.command("walgov-activate-v2 <id>")
|
|
778
|
+
.description("Activate profile")
|
|
779
|
+
.action(async (id) => {
|
|
780
|
+
console.log(
|
|
781
|
+
JSON.stringify((await L()).activateWalgovProfileV2(id), null, 2),
|
|
782
|
+
);
|
|
783
|
+
});
|
|
784
|
+
parent
|
|
785
|
+
.command("walgov-freeze-v2 <id>")
|
|
786
|
+
.description("Freeze profile")
|
|
787
|
+
.action(async (id) => {
|
|
788
|
+
console.log(
|
|
789
|
+
JSON.stringify((await L()).freezeWalgovProfileV2(id), null, 2),
|
|
790
|
+
);
|
|
791
|
+
});
|
|
792
|
+
parent
|
|
793
|
+
.command("walgov-archive-v2 <id>")
|
|
794
|
+
.description("Archive profile")
|
|
795
|
+
.action(async (id) => {
|
|
796
|
+
console.log(
|
|
797
|
+
JSON.stringify((await L()).archiveWalgovProfileV2(id), null, 2),
|
|
798
|
+
);
|
|
799
|
+
});
|
|
800
|
+
parent
|
|
801
|
+
.command("walgov-touch-v2 <id>")
|
|
802
|
+
.description("Touch profile")
|
|
803
|
+
.action(async (id) => {
|
|
804
|
+
console.log(
|
|
805
|
+
JSON.stringify((await L()).touchWalgovProfileV2(id), null, 2),
|
|
806
|
+
);
|
|
807
|
+
});
|
|
808
|
+
parent
|
|
809
|
+
.command("walgov-get-v2 <id>")
|
|
810
|
+
.description("Get profile")
|
|
811
|
+
.action(async (id) => {
|
|
812
|
+
console.log(JSON.stringify((await L()).getWalgovProfileV2(id), null, 2));
|
|
813
|
+
});
|
|
814
|
+
parent
|
|
815
|
+
.command("walgov-list-v2")
|
|
816
|
+
.description("List profiles")
|
|
817
|
+
.action(async () => {
|
|
818
|
+
console.log(JSON.stringify((await L()).listWalgovProfilesV2(), null, 2));
|
|
819
|
+
});
|
|
820
|
+
parent
|
|
821
|
+
.command("walgov-create-transfer-v2 <id> <profileId>")
|
|
822
|
+
.description("Create transfer")
|
|
823
|
+
.option("--to <v>", "to")
|
|
824
|
+
.action(async (id, profileId, o) => {
|
|
825
|
+
const m = await L();
|
|
826
|
+
console.log(
|
|
827
|
+
JSON.stringify(
|
|
828
|
+
m.createWalgovTransferV2({ id, profileId, to: o.to }),
|
|
829
|
+
null,
|
|
830
|
+
2,
|
|
831
|
+
),
|
|
832
|
+
);
|
|
833
|
+
});
|
|
834
|
+
parent
|
|
835
|
+
.command("walgov-signing-transfer-v2 <id>")
|
|
836
|
+
.description("Mark transfer as signing")
|
|
837
|
+
.action(async (id) => {
|
|
838
|
+
console.log(
|
|
839
|
+
JSON.stringify((await L()).signingWalgovTransferV2(id), null, 2),
|
|
840
|
+
);
|
|
841
|
+
});
|
|
842
|
+
parent
|
|
843
|
+
.command("walgov-complete-transfer-v2 <id>")
|
|
844
|
+
.description("Complete transfer")
|
|
845
|
+
.action(async (id) => {
|
|
846
|
+
console.log(
|
|
847
|
+
JSON.stringify((await L()).completeTransferWalgovV2(id), null, 2),
|
|
848
|
+
);
|
|
849
|
+
});
|
|
850
|
+
parent
|
|
851
|
+
.command("walgov-fail-transfer-v2 <id> [reason]")
|
|
852
|
+
.description("Fail transfer")
|
|
853
|
+
.action(async (id, reason) => {
|
|
854
|
+
console.log(
|
|
855
|
+
JSON.stringify((await L()).failWalgovTransferV2(id, reason), null, 2),
|
|
856
|
+
);
|
|
857
|
+
});
|
|
858
|
+
parent
|
|
859
|
+
.command("walgov-cancel-transfer-v2 <id> [reason]")
|
|
860
|
+
.description("Cancel transfer")
|
|
861
|
+
.action(async (id, reason) => {
|
|
862
|
+
console.log(
|
|
863
|
+
JSON.stringify((await L()).cancelWalgovTransferV2(id, reason), null, 2),
|
|
864
|
+
);
|
|
865
|
+
});
|
|
866
|
+
parent
|
|
867
|
+
.command("walgov-get-transfer-v2 <id>")
|
|
868
|
+
.description("Get transfer")
|
|
869
|
+
.action(async (id) => {
|
|
870
|
+
console.log(JSON.stringify((await L()).getWalgovTransferV2(id), null, 2));
|
|
871
|
+
});
|
|
872
|
+
parent
|
|
873
|
+
.command("walgov-list-transfers-v2")
|
|
874
|
+
.description("List transfers")
|
|
875
|
+
.action(async () => {
|
|
876
|
+
console.log(JSON.stringify((await L()).listWalgovTransfersV2(), null, 2));
|
|
877
|
+
});
|
|
878
|
+
parent
|
|
879
|
+
.command("walgov-auto-freeze-idle-v2")
|
|
880
|
+
.description("Auto-freeze idle")
|
|
881
|
+
.action(async () => {
|
|
882
|
+
console.log(
|
|
883
|
+
JSON.stringify((await L()).autoFreezeIdleWalgovProfilesV2(), null, 2),
|
|
884
|
+
);
|
|
885
|
+
});
|
|
886
|
+
parent
|
|
887
|
+
.command("walgov-auto-fail-stuck-v2")
|
|
888
|
+
.description("Auto-fail stuck transfers")
|
|
889
|
+
.action(async () => {
|
|
890
|
+
console.log(
|
|
891
|
+
JSON.stringify((await L()).autoFailStuckWalgovTransfersV2(), null, 2),
|
|
892
|
+
);
|
|
893
|
+
});
|
|
894
|
+
parent
|
|
895
|
+
.command("walgov-gov-stats-v2")
|
|
896
|
+
.description("V2 gov stats")
|
|
897
|
+
.action(async () => {
|
|
898
|
+
console.log(
|
|
899
|
+
JSON.stringify((await L()).getWalletManagerGovStatsV2(), null, 2),
|
|
900
|
+
);
|
|
901
|
+
});
|
|
902
|
+
}
|
package/src/commands/webfetch.js
CHANGED
|
@@ -2,40 +2,149 @@
|
|
|
2
2
|
* `cc webfetch` — Web Fetch V2 governance overlay (in-memory, atop lib/web-fetch.js).
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
WFET_TARGET_MATURITY_V2,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
WFET_TARGET_MATURITY_V2,
|
|
6
|
+
WFET_JOB_LIFECYCLE_V2,
|
|
7
|
+
setMaxActiveWfetTargetsPerOwnerV2,
|
|
8
|
+
getMaxActiveWfetTargetsPerOwnerV2,
|
|
9
|
+
setMaxPendingWfetJobsPerTargetV2,
|
|
10
|
+
getMaxPendingWfetJobsPerTargetV2,
|
|
11
|
+
setWfetTargetIdleMsV2,
|
|
12
|
+
getWfetTargetIdleMsV2,
|
|
13
|
+
setWfetJobStuckMsV2,
|
|
14
|
+
getWfetJobStuckMsV2,
|
|
15
|
+
registerWfetTargetV2,
|
|
16
|
+
activateWfetTargetV2,
|
|
17
|
+
degradeWfetTargetV2,
|
|
18
|
+
retireWfetTargetV2,
|
|
19
|
+
touchWfetTargetV2,
|
|
20
|
+
getWfetTargetV2,
|
|
21
|
+
listWfetTargetsV2,
|
|
22
|
+
createWfetJobV2,
|
|
23
|
+
fetchingWfetJobV2,
|
|
24
|
+
succeedWfetJobV2,
|
|
25
|
+
failWfetJobV2,
|
|
26
|
+
cancelWfetJobV2,
|
|
27
|
+
getWfetJobV2,
|
|
28
|
+
listWfetJobsV2,
|
|
29
|
+
autoDegradeIdleWfetTargetsV2,
|
|
30
|
+
autoFailStuckWfetJobsV2,
|
|
31
|
+
getWebFetchGovStatsV2,
|
|
32
|
+
_resetStateWebFetchV2,
|
|
13
33
|
} from "../lib/web-fetch.js";
|
|
14
34
|
|
|
15
35
|
export function registerWebfetchCommand(program) {
|
|
16
36
|
const wf = program.command("webfetch").description("Web Fetch V2 governance");
|
|
17
|
-
wf.command("enums-v2").action(() =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
wf.command("
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
wf.command("enums-v2").action(() =>
|
|
38
|
+
console.log(
|
|
39
|
+
JSON.stringify(
|
|
40
|
+
{
|
|
41
|
+
targetMaturity: WFET_TARGET_MATURITY_V2,
|
|
42
|
+
jobLifecycle: WFET_JOB_LIFECYCLE_V2,
|
|
43
|
+
},
|
|
44
|
+
null,
|
|
45
|
+
2,
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
wf.command("config-v2").action(() =>
|
|
50
|
+
console.log(
|
|
51
|
+
JSON.stringify(
|
|
52
|
+
{
|
|
53
|
+
maxActiveWfetTargetsPerOwner: getMaxActiveWfetTargetsPerOwnerV2(),
|
|
54
|
+
maxPendingWfetJobsPerTarget: getMaxPendingWfetJobsPerTargetV2(),
|
|
55
|
+
wfetTargetIdleMs: getWfetTargetIdleMsV2(),
|
|
56
|
+
wfetJobStuckMs: getWfetJobStuckMsV2(),
|
|
57
|
+
},
|
|
58
|
+
null,
|
|
59
|
+
2,
|
|
60
|
+
),
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
wf.command("set-max-active-v2 <n>").action((n) => {
|
|
64
|
+
setMaxActiveWfetTargetsPerOwnerV2(Number(n));
|
|
65
|
+
console.log("ok");
|
|
66
|
+
});
|
|
67
|
+
wf.command("set-max-pending-v2 <n>").action((n) => {
|
|
68
|
+
setMaxPendingWfetJobsPerTargetV2(Number(n));
|
|
69
|
+
console.log("ok");
|
|
70
|
+
});
|
|
71
|
+
wf.command("set-idle-ms-v2 <n>").action((n) => {
|
|
72
|
+
setWfetTargetIdleMsV2(Number(n));
|
|
73
|
+
console.log("ok");
|
|
74
|
+
});
|
|
75
|
+
wf.command("set-stuck-ms-v2 <n>").action((n) => {
|
|
76
|
+
setWfetJobStuckMsV2(Number(n));
|
|
77
|
+
console.log("ok");
|
|
78
|
+
});
|
|
79
|
+
wf.command("register-target-v2 <id> <owner>")
|
|
80
|
+
.option("--baseUrl <u>", "baseUrl")
|
|
81
|
+
.action((id, owner, o) =>
|
|
82
|
+
console.log(
|
|
83
|
+
JSON.stringify(
|
|
84
|
+
registerWfetTargetV2({ id, owner, baseUrl: o.baseUrl }),
|
|
85
|
+
null,
|
|
86
|
+
2,
|
|
87
|
+
),
|
|
88
|
+
),
|
|
89
|
+
);
|
|
90
|
+
wf.command("activate-target-v2 <id>").action((id) =>
|
|
91
|
+
console.log(JSON.stringify(activateWfetTargetV2(id), null, 2)),
|
|
92
|
+
);
|
|
93
|
+
wf.command("degrade-target-v2 <id>").action((id) =>
|
|
94
|
+
console.log(JSON.stringify(degradeWfetTargetV2(id), null, 2)),
|
|
95
|
+
);
|
|
96
|
+
wf.command("retire-target-v2 <id>").action((id) =>
|
|
97
|
+
console.log(JSON.stringify(retireWfetTargetV2(id), null, 2)),
|
|
98
|
+
);
|
|
99
|
+
wf.command("touch-target-v2 <id>").action((id) =>
|
|
100
|
+
console.log(JSON.stringify(touchWfetTargetV2(id), null, 2)),
|
|
101
|
+
);
|
|
102
|
+
wf.command("get-target-v2 <id>").action((id) =>
|
|
103
|
+
console.log(JSON.stringify(getWfetTargetV2(id), null, 2)),
|
|
104
|
+
);
|
|
105
|
+
wf.command("list-targets-v2").action(() =>
|
|
106
|
+
console.log(JSON.stringify(listWfetTargetsV2(), null, 2)),
|
|
107
|
+
);
|
|
108
|
+
wf.command("create-job-v2 <id> <targetId>")
|
|
109
|
+
.option("--kind <k>", "kind", "GET")
|
|
110
|
+
.action((id, targetId, o) =>
|
|
111
|
+
console.log(
|
|
112
|
+
JSON.stringify(
|
|
113
|
+
createWfetJobV2({ id, targetId, kind: o.kind }),
|
|
114
|
+
null,
|
|
115
|
+
2,
|
|
116
|
+
),
|
|
117
|
+
),
|
|
118
|
+
);
|
|
119
|
+
wf.command("fetching-job-v2 <id>").action((id) =>
|
|
120
|
+
console.log(JSON.stringify(fetchingWfetJobV2(id), null, 2)),
|
|
121
|
+
);
|
|
122
|
+
wf.command("succeed-job-v2 <id>").action((id) =>
|
|
123
|
+
console.log(JSON.stringify(succeedWfetJobV2(id), null, 2)),
|
|
124
|
+
);
|
|
125
|
+
wf.command("fail-job-v2 <id> [reason]").action((id, reason) =>
|
|
126
|
+
console.log(JSON.stringify(failWfetJobV2(id, reason), null, 2)),
|
|
127
|
+
);
|
|
128
|
+
wf.command("cancel-job-v2 <id> [reason]").action((id, reason) =>
|
|
129
|
+
console.log(JSON.stringify(cancelWfetJobV2(id, reason), null, 2)),
|
|
130
|
+
);
|
|
131
|
+
wf.command("get-job-v2 <id>").action((id) =>
|
|
132
|
+
console.log(JSON.stringify(getWfetJobV2(id), null, 2)),
|
|
133
|
+
);
|
|
134
|
+
wf.command("list-jobs-v2").action(() =>
|
|
135
|
+
console.log(JSON.stringify(listWfetJobsV2(), null, 2)),
|
|
136
|
+
);
|
|
137
|
+
wf.command("auto-degrade-idle-v2").action(() =>
|
|
138
|
+
console.log(JSON.stringify(autoDegradeIdleWfetTargetsV2(), null, 2)),
|
|
139
|
+
);
|
|
140
|
+
wf.command("auto-fail-stuck-v2").action(() =>
|
|
141
|
+
console.log(JSON.stringify(autoFailStuckWfetJobsV2(), null, 2)),
|
|
142
|
+
);
|
|
143
|
+
wf.command("gov-stats-v2").action(() =>
|
|
144
|
+
console.log(JSON.stringify(getWebFetchGovStatsV2(), null, 2)),
|
|
145
|
+
);
|
|
146
|
+
wf.command("reset-state-v2").action(() => {
|
|
147
|
+
_resetStateWebFetchV2();
|
|
148
|
+
console.log(JSON.stringify({ ok: true }, null, 2));
|
|
149
|
+
});
|
|
41
150
|
}
|