@elgora/cli 10.1.0 → 10.2.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/README.md +1 -1
- package/dist/cli.js +17 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ answer.
|
|
|
34
34
|
another AI review, or reviews them first.
|
|
35
35
|
- `poster:open-winning-submission` retrieves the finalized winning Submission
|
|
36
36
|
for the funding Poster and decrypts it locally.
|
|
37
|
-
- `check-
|
|
37
|
+
- `check-challenge <bounty_challenge_md_path|->` checks structural conformance offline,
|
|
38
38
|
returns an issue list and exits non-zero on failure. It needs no wallet or
|
|
39
39
|
network and does not replace hosted semantic readiness review.
|
|
40
40
|
- `spec-commitment` reproduces the challenge's `spec_commitment` offline.
|
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import path4 from "path";
|
|
|
5
5
|
import { config as loadDotenv } from "dotenv";
|
|
6
6
|
import { ZodError as ZodError2 } from "zod";
|
|
7
7
|
|
|
8
|
-
// src/check-
|
|
8
|
+
// src/check-challenge.ts
|
|
9
9
|
import { readFile } from "fs/promises";
|
|
10
10
|
import { text as readStdinText } from "stream/consumers";
|
|
11
11
|
|
|
@@ -1544,16 +1544,16 @@ function getDeployment(chainId) {
|
|
|
1544
1544
|
return DEPLOYMENTS[chainId];
|
|
1545
1545
|
}
|
|
1546
1546
|
|
|
1547
|
-
// src/check-
|
|
1548
|
-
var
|
|
1547
|
+
// src/check-challenge.ts
|
|
1548
|
+
var CHECK_CHALLENGE_USAGE = "Usage: elgora-cli check-challenge <bounty_challenge_md_path>\n or: elgora-cli check-challenge -";
|
|
1549
1549
|
async function main(_env = process.env, argv = process.argv.slice(2)) {
|
|
1550
1550
|
const markdown = await readBountyChallengeMarkdown(argv);
|
|
1551
1551
|
const { issues, profile } = checkChallengeConformance(markdown);
|
|
1552
1552
|
console.log(
|
|
1553
1553
|
JSON.stringify({
|
|
1554
|
-
event: issues.length === 0 ? "
|
|
1554
|
+
event: issues.length === 0 ? "check_challenge.structure_conforming" : "check_challenge.issues",
|
|
1555
1555
|
profile: profile?.profile ?? null,
|
|
1556
|
-
// Named so a caller cannot read a clean result as "this
|
|
1556
|
+
// Named so a caller cannot read a clean result as "this challenge is safe".
|
|
1557
1557
|
checked: "structure",
|
|
1558
1558
|
issues: issues.map((issue) => ({
|
|
1559
1559
|
code: issue.code,
|
|
@@ -1569,7 +1569,7 @@ async function main(_env = process.env, argv = process.argv.slice(2)) {
|
|
|
1569
1569
|
async function readBountyChallengeMarkdown(argv) {
|
|
1570
1570
|
const path5 = argv[0];
|
|
1571
1571
|
if (!path5) {
|
|
1572
|
-
throw new Error(
|
|
1572
|
+
throw new Error(CHECK_CHALLENGE_USAGE);
|
|
1573
1573
|
}
|
|
1574
1574
|
if (path5 === "-") {
|
|
1575
1575
|
return readStdinText(process.stdin);
|
|
@@ -7127,8 +7127,8 @@ function resolveChainId(selector) {
|
|
|
7127
7127
|
}
|
|
7128
7128
|
|
|
7129
7129
|
// src/version.ts
|
|
7130
|
-
var CLI_VERSION = true ? "10.
|
|
7131
|
-
var CLI_NODE_ENGINES = true ? "
|
|
7130
|
+
var CLI_VERSION = true ? "10.2.0" : "0.0.0-dev";
|
|
7131
|
+
var CLI_NODE_ENGINES = true ? "24.x || 26.x" : "24.x || 26.x";
|
|
7132
7132
|
|
|
7133
7133
|
// src/node-engines.ts
|
|
7134
7134
|
function unsupportedNodeMessage(running = process.versions.node, range = CLI_NODE_ENGINES) {
|
|
@@ -7569,10 +7569,10 @@ async function main10(env = process.env, argv = process.argv.slice(2)) {
|
|
|
7569
7569
|
const { value: previous, argv: paths } = takeFlag(
|
|
7570
7570
|
args,
|
|
7571
7571
|
"--previous",
|
|
7572
|
-
"--previous must be one bytes32
|
|
7572
|
+
"--previous must be one bytes32 challenge commitment"
|
|
7573
7573
|
);
|
|
7574
7574
|
if (previous && !isHexBytes32(previous))
|
|
7575
|
-
throw new Error("--previous must be one bytes32
|
|
7575
|
+
throw new Error("--previous must be one bytes32 challenge commitment");
|
|
7576
7576
|
if (paths.length !== 1 || !paths[0] || paths[0].startsWith("--"))
|
|
7577
7577
|
throw new Error(USAGE2);
|
|
7578
7578
|
const config = loadPosterConfig(env, apiBaseUrl);
|
|
@@ -8634,7 +8634,7 @@ var COMMANDS = {
|
|
|
8634
8634
|
"roster:verify-guardian-proof": main13,
|
|
8635
8635
|
"solver:submit": main15,
|
|
8636
8636
|
claim: main2,
|
|
8637
|
-
"check-
|
|
8637
|
+
"check-challenge": main,
|
|
8638
8638
|
"spec-commitment": main14,
|
|
8639
8639
|
"verification-record": main16
|
|
8640
8640
|
};
|
|
@@ -8707,8 +8707,8 @@ var COMMAND_HELP = {
|
|
|
8707
8707
|
},
|
|
8708
8708
|
"poster:review": {
|
|
8709
8709
|
usage: "elgora-cli poster:review <path|-> [--previous <commitment>]",
|
|
8710
|
-
title: "Review a
|
|
8711
|
-
description: "Sign and send the exact Markdown for a readiness review. Ready prints\n review.ready; Elgora keeps the approval for these exact bytes.\n Not-ready prints all issues and exits 2; other failures exit 1.\n --previous sends the previous
|
|
8710
|
+
title: "Review a challenge before publishing it.",
|
|
8711
|
+
description: "Sign and send the exact Markdown for a readiness review. Ready prints\n review.ready; Elgora keeps the approval for these exact bytes.\n Not-ready prints all issues and exits 2; other failures exit 1.\n --previous sends the previous challenge commitment with the signed request.",
|
|
8712
8712
|
required: ["ELGORA_POSTER_PRIVATE_KEY"],
|
|
8713
8713
|
defaulted: [
|
|
8714
8714
|
"ELGORA_CHAIN_ID",
|
|
@@ -8786,10 +8786,10 @@ var COMMAND_HELP = {
|
|
|
8786
8786
|
required: [],
|
|
8787
8787
|
defaulted: ["ELGORA_CHAIN_ID", "ELGORA_HUB_ADDRESS", "ELGORA_RPC_URL"]
|
|
8788
8788
|
},
|
|
8789
|
-
"check-
|
|
8790
|
-
usage: "elgora-cli check-
|
|
8791
|
-
title: "Check a challenge
|
|
8792
|
-
description: "Run the same structural module the API runs before its readiness\n review: frontmatter, a known profile, and every declared tightening.\n Reports each issue with a stable code and the field that fixes it,\n and exits non-zero when any is found. A Guardian runs this against a\n bounty's committed bytes before judging, because a
|
|
8789
|
+
"check-challenge": {
|
|
8790
|
+
usage: "elgora-cli check-challenge <bounty_challenge_md_path|->",
|
|
8791
|
+
title: "Check a challenge's structure against Elgora's rules.",
|
|
8792
|
+
description: "Run the same structural module the API runs before its readiness\n review: frontmatter, a known profile, and every declared tightening.\n Reports each issue with a stable code and the field that fixes it,\n and exits non-zero when any is found. A Guardian runs this against a\n bounty's committed bytes before judging, because a challenge can reach\n chain without passing publication. It checks structure only: whether\n the challenge tries to instruct you, or carries unsafe content, is a\n reading you make yourself. Pass '-' to read from stdin. Makes no\n network call and needs no configuration or secret.",
|
|
8793
8793
|
required: []
|
|
8794
8794
|
},
|
|
8795
8795
|
"spec-commitment": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elgora/cli",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Command-line client for Elgora, a decentralized bounty marketplace for science. Lets Posters, Solvers, and Guardians interact with Elgora's public API and on-chain contracts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "
|
|
22
|
+
"node": "24.x || 26.x"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup && chmod +x dist/cli.js",
|