@reppo/cli 0.1.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/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/api/platform.d.ts +39 -0
- package/dist/api/platform.d.ts.map +1 -0
- package/dist/api/platform.js +148 -0
- package/dist/api/platform.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +60 -0
- package/dist/bin.js.map +1 -0
- package/dist/chain/abis.d.ts +576 -0
- package/dist/chain/abis.d.ts.map +1 -0
- package/dist/chain/abis.js +66 -0
- package/dist/chain/abis.js.map +1 -0
- package/dist/chain/addresses.d.ts +27 -0
- package/dist/chain/addresses.d.ts.map +1 -0
- package/dist/chain/addresses.js +39 -0
- package/dist/chain/addresses.js.map +1 -0
- package/dist/chain/clients.d.ts +46 -0
- package/dist/chain/clients.d.ts.map +1 -0
- package/dist/chain/clients.js +48 -0
- package/dist/chain/clients.js.map +1 -0
- package/dist/chain/contracts.d.ts +28 -0
- package/dist/chain/contracts.d.ts.map +1 -0
- package/dist/chain/contracts.js +70 -0
- package/dist/chain/contracts.js.map +1 -0
- package/dist/chain/errors.d.ts +14 -0
- package/dist/chain/errors.d.ts.map +1 -0
- package/dist/chain/errors.js +72 -0
- package/dist/chain/errors.js.map +1 -0
- package/dist/commands/_base.d.ts +19 -0
- package/dist/commands/_base.d.ts.map +1 -0
- package/dist/commands/_base.js +40 -0
- package/dist/commands/_base.js.map +1 -0
- package/dist/commands/auth.d.ts +9 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +93 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/claim-emissions.d.ts +11 -0
- package/dist/commands/claim-emissions.d.ts.map +1 -0
- package/dist/commands/claim-emissions.js +192 -0
- package/dist/commands/claim-emissions.js.map +1 -0
- package/dist/commands/extend-lock.d.ts +11 -0
- package/dist/commands/extend-lock.d.ts.map +1 -0
- package/dist/commands/extend-lock.js +196 -0
- package/dist/commands/extend-lock.js.map +1 -0
- package/dist/commands/grant-access.d.ts +11 -0
- package/dist/commands/grant-access.d.ts.map +1 -0
- package/dist/commands/grant-access.js +191 -0
- package/dist/commands/grant-access.js.map +1 -0
- package/dist/commands/lock.d.ts +11 -0
- package/dist/commands/lock.d.ts.map +1 -0
- package/dist/commands/lock.js +192 -0
- package/dist/commands/lock.js.map +1 -0
- package/dist/commands/mint-pod.d.ts +15 -0
- package/dist/commands/mint-pod.d.ts.map +1 -0
- package/dist/commands/mint-pod.js +286 -0
- package/dist/commands/mint-pod.js.map +1 -0
- package/dist/commands/query/balance.d.ts +9 -0
- package/dist/commands/query/balance.d.ts.map +1 -0
- package/dist/commands/query/balance.js +91 -0
- package/dist/commands/query/balance.js.map +1 -0
- package/dist/commands/query/datanet.d.ts +10 -0
- package/dist/commands/query/datanet.d.ts.map +1 -0
- package/dist/commands/query/datanet.js +128 -0
- package/dist/commands/query/datanet.js.map +1 -0
- package/dist/commands/query/emissions-due.d.ts +18 -0
- package/dist/commands/query/emissions-due.d.ts.map +1 -0
- package/dist/commands/query/emissions-due.js +170 -0
- package/dist/commands/query/emissions-due.js.map +1 -0
- package/dist/commands/query/pod.d.ts +8 -0
- package/dist/commands/query/pod.d.ts.map +1 -0
- package/dist/commands/query/pod.js +88 -0
- package/dist/commands/query/pod.js.map +1 -0
- package/dist/commands/query/voting-power.d.ts +9 -0
- package/dist/commands/query/voting-power.d.ts.map +1 -0
- package/dist/commands/query/voting-power.js +82 -0
- package/dist/commands/query/voting-power.js.map +1 -0
- package/dist/commands/register-agent.d.ts +9 -0
- package/dist/commands/register-agent.d.ts.map +1 -0
- package/dist/commands/register-agent.js +115 -0
- package/dist/commands/register-agent.js.map +1 -0
- package/dist/commands/unlock.d.ts +11 -0
- package/dist/commands/unlock.d.ts.map +1 -0
- package/dist/commands/unlock.js +181 -0
- package/dist/commands/unlock.js.map +1 -0
- package/dist/commands/vote.d.ts +13 -0
- package/dist/commands/vote.d.ts.map +1 -0
- package/dist/commands/vote.js +174 -0
- package/dist/commands/vote.js.map +1 -0
- package/dist/config/load.d.ts +19 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +66 -0
- package/dist/config/load.js.map +1 -0
- package/dist/output/format.d.ts +43 -0
- package/dist/output/format.d.ts.map +1 -0
- package/dist/output/format.js +58 -0
- package/dist/output/format.js.map +1 -0
- package/dist/state/db.d.ts +47 -0
- package/dist/state/db.d.ts.map +1 -0
- package/dist/state/db.js +169 -0
- package/dist/state/db.js.map +1 -0
- package/dist/state/idempotency.d.ts +66 -0
- package/dist/state/idempotency.d.ts.map +1 -0
- package/dist/state/idempotency.js +173 -0
- package/dist/state/idempotency.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Idempotency layer. Two-phase write protocol so an agent retry that
|
|
3
|
+
* fires *during* a transaction (after submit, before receipt) sees the
|
|
4
|
+
* pending record and short-circuits instead of double-spending.
|
|
5
|
+
*
|
|
6
|
+
* 1. begin(key, command, args) — write { status: 'pending' }
|
|
7
|
+
* 2. markSubmitted(key, command, args, tx)— write { status: 'submitted', txHash }
|
|
8
|
+
* 3. markConfirmed(key, command, args, r) — write { status: 'confirmed', result, txHash }
|
|
9
|
+
* OR
|
|
10
|
+
* markFailed(key, command, args, err) — write { status: 'failed', result: { error } }
|
|
11
|
+
*
|
|
12
|
+
* Every helper takes the full args object so a deterministic fingerprint
|
|
13
|
+
* can be stored on first write. Re-using one --idempotency-key with a
|
|
14
|
+
* different intent (e.g. vote pod 39 like → vote pod 41 dislike) is
|
|
15
|
+
* rejected with `IDEMPOTENCY_ARGS_MISMATCH` instead of silently
|
|
16
|
+
* returning the wrong cached result.
|
|
17
|
+
*
|
|
18
|
+
* Callers should pattern-match `getIdempotent(key, command, args)`
|
|
19
|
+
* BEFORE doing work:
|
|
20
|
+
* - null → fresh, proceed
|
|
21
|
+
* - 'confirmed' → return cached result
|
|
22
|
+
* - 'submitted' → return cached txHash; the agent can poll the tx
|
|
23
|
+
* - 'pending' → another invocation is mid-flight; refuse with code
|
|
24
|
+
* - 'failed' → previous attempt failed; refuse OR allow retry under
|
|
25
|
+
* a fresh key (caller policy)
|
|
26
|
+
*/
|
|
27
|
+
import { createHash } from 'node:crypto';
|
|
28
|
+
import { getIdempotent as readEntry, upsertIdempotent, } from './db.js';
|
|
29
|
+
import { cliError } from '../output/format.js';
|
|
30
|
+
/**
|
|
31
|
+
* SHA-256 of the canonicalized JSON of the args object. Object keys are
|
|
32
|
+
* sorted so {a:1,b:2} and {b:2,a:1} fingerprint identically; bigints
|
|
33
|
+
* are stringified so they survive JSON.stringify; nested arrays/objects
|
|
34
|
+
* recurse. The output is the only thing the cache compares — small
|
|
35
|
+
* representation choices below matter for matching across runs.
|
|
36
|
+
*/
|
|
37
|
+
export function fingerprintArgs(args) {
|
|
38
|
+
const replacer = (_key, value) => {
|
|
39
|
+
if (typeof value === 'bigint')
|
|
40
|
+
return value.toString();
|
|
41
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
42
|
+
const sorted = {};
|
|
43
|
+
for (const k of Object.keys(value).sort()) {
|
|
44
|
+
sorted[k] = value[k];
|
|
45
|
+
}
|
|
46
|
+
return sorted;
|
|
47
|
+
}
|
|
48
|
+
return value;
|
|
49
|
+
};
|
|
50
|
+
const canonical = JSON.stringify(args, replacer);
|
|
51
|
+
return createHash('sha256').update(canonical).digest('hex');
|
|
52
|
+
}
|
|
53
|
+
export async function getIdempotent(key, command, args) {
|
|
54
|
+
const entry = await readEntry(key);
|
|
55
|
+
if (!entry)
|
|
56
|
+
return null;
|
|
57
|
+
if (entry.command !== command) {
|
|
58
|
+
throw cliError('IDEMPOTENCY_COMMAND_MISMATCH', `idempotency key "${key}" was previously used by command "${entry.command}", ` +
|
|
59
|
+
`not "${command}". Use a unique key per (command, intent) pair.`);
|
|
60
|
+
}
|
|
61
|
+
const fp = fingerprintArgs(args);
|
|
62
|
+
// Pre-v0.2 cache entries lack argsFingerprint. Refuse with a clear
|
|
63
|
+
// migration error rather than silently treating any args as a match.
|
|
64
|
+
if (!entry.argsFingerprint) {
|
|
65
|
+
throw cliError('IDEMPOTENCY_LEGACY_ENTRY', `idempotency key "${key}" predates v0.2's args-fingerprint check and cannot be safely re-used.`, 'Delete ~/.reppo/cli-state.json (or set REPPO_STATE_PATH to a fresh file) to clear the legacy cache, then retry with a new --idempotency-key.');
|
|
66
|
+
}
|
|
67
|
+
if (entry.argsFingerprint !== fp) {
|
|
68
|
+
throw cliError('IDEMPOTENCY_ARGS_MISMATCH', `idempotency key "${key}" was previously used with different args ` +
|
|
69
|
+
`(fingerprint ${entry.argsFingerprint.slice(0, 12)}…) and is now being read with new args ` +
|
|
70
|
+
`(fingerprint ${fp.slice(0, 12)}…).`, 'A given idempotency key represents a single intent. Use a fresh key when the args change.');
|
|
71
|
+
}
|
|
72
|
+
return entry;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Inspect the idempotency cache and decide whether the caller should
|
|
76
|
+
* proceed with a write. Lifts the cache-decision logic that previously
|
|
77
|
+
* lived inline in `vote.ts` so every write command shares the same
|
|
78
|
+
* policy:
|
|
79
|
+
* - dry-run: never consult or mutate the cache (sim is read-only;
|
|
80
|
+
* persisting a "submitted" record would let a sim poison the cache
|
|
81
|
+
* for the next real call).
|
|
82
|
+
* - confirmed: short-circuit with the cached result.
|
|
83
|
+
* - submitted: short-circuit with the cached tx hash; user polls.
|
|
84
|
+
* - pending: refuse — another invocation is mid-flight.
|
|
85
|
+
* - failed + txHash: refuse — re-broadcasting under the same key would
|
|
86
|
+
* pay gas for a second doomed attempt; force a fresh key.
|
|
87
|
+
* - failed + no txHash: pre-submit failure, safe to retry: 'proceed'.
|
|
88
|
+
*
|
|
89
|
+
* The result type `R` matches the shape the command stores via
|
|
90
|
+
* `markConfirmed` (e.g. `{ txHash, podId, ..., basescanUrl }` for vote).
|
|
91
|
+
* Cached results are typed as the caller's `R`; runtime shape is whatever
|
|
92
|
+
* the original `markConfirmed` recorded.
|
|
93
|
+
*/
|
|
94
|
+
export async function peekIdempotent(key, command, args, isDryRun) {
|
|
95
|
+
if (!key || isDryRun)
|
|
96
|
+
return { kind: 'proceed' };
|
|
97
|
+
const cached = await getIdempotent(key, command, args);
|
|
98
|
+
if (!cached)
|
|
99
|
+
return { kind: 'proceed' };
|
|
100
|
+
switch (cached.status) {
|
|
101
|
+
case 'confirmed':
|
|
102
|
+
return { kind: 'return-confirmed', result: cached.result, txHash: cached.txHash };
|
|
103
|
+
case 'submitted':
|
|
104
|
+
return { kind: 'return-submitted', result: cached.result, txHash: cached.txHash };
|
|
105
|
+
case 'pending':
|
|
106
|
+
throw cliError('IDEMPOTENCY_IN_FLIGHT', `Idempotency key "${key}" is in 'pending' state — another invocation is mid-flight.`, 'Wait for the in-flight invocation to finish, or use a fresh key.');
|
|
107
|
+
case 'failed':
|
|
108
|
+
if (cached.txHash) {
|
|
109
|
+
throw cliError('IDEMPOTENCY_FAILED_AFTER_BROADCAST', `Idempotency key "${key}" previously broadcast tx ${cached.txHash} which failed. ` +
|
|
110
|
+
`Refusing to re-broadcast under the same key.`, 'Use a fresh --idempotency-key for the retry, and inspect the prior tx on the block explorer to understand the failure.');
|
|
111
|
+
}
|
|
112
|
+
// Pre-submit failure (e.g. validation error). Safe to retry under
|
|
113
|
+
// the same key; fall through.
|
|
114
|
+
return { kind: 'proceed' };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export async function begin(key, command, args) {
|
|
118
|
+
const now = Date.now();
|
|
119
|
+
await upsertIdempotent(key, {
|
|
120
|
+
command,
|
|
121
|
+
argsFingerprint: fingerprintArgs(args),
|
|
122
|
+
status: 'pending',
|
|
123
|
+
result: {},
|
|
124
|
+
txHash: null,
|
|
125
|
+
createdAt: now,
|
|
126
|
+
updatedAt: now,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
export async function markSubmitted(key, command, args, txHash) {
|
|
130
|
+
const now = Date.now();
|
|
131
|
+
await upsertIdempotent(key, {
|
|
132
|
+
command,
|
|
133
|
+
argsFingerprint: fingerprintArgs(args),
|
|
134
|
+
status: 'submitted',
|
|
135
|
+
result: { txHash },
|
|
136
|
+
txHash,
|
|
137
|
+
createdAt: now,
|
|
138
|
+
updatedAt: now,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export async function markConfirmed(key, command, args, result, txHash) {
|
|
142
|
+
const now = Date.now();
|
|
143
|
+
await upsertIdempotent(key, {
|
|
144
|
+
command,
|
|
145
|
+
argsFingerprint: fingerprintArgs(args),
|
|
146
|
+
status: 'confirmed',
|
|
147
|
+
result,
|
|
148
|
+
txHash,
|
|
149
|
+
createdAt: now,
|
|
150
|
+
updatedAt: now,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Mark an idempotency entry as failed. Pass `txHash` when the failure
|
|
155
|
+
* happened *after* the tx was broadcast (e.g. on-chain revert, receipt
|
|
156
|
+
* timeout) so the cached entry retains the hash for forensics + so the
|
|
157
|
+
* "same-key retry on failed" guard in callers can distinguish pre-submit
|
|
158
|
+
* failures (safe to retry) from post-submit failures (must not retry —
|
|
159
|
+
* the tx already executed and may have side-effects).
|
|
160
|
+
*/
|
|
161
|
+
export async function markFailed(key, command, args, error, txHash = null) {
|
|
162
|
+
const now = Date.now();
|
|
163
|
+
await upsertIdempotent(key, {
|
|
164
|
+
command,
|
|
165
|
+
argsFingerprint: fingerprintArgs(args),
|
|
166
|
+
status: 'failed',
|
|
167
|
+
result: txHash ? { error, txHash } : { error },
|
|
168
|
+
txHash,
|
|
169
|
+
createdAt: now,
|
|
170
|
+
updatedAt: now,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=idempotency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idempotency.js","sourceRoot":"","sources":["../../src/state/idempotency.ts"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;QACnB,MAAM,EAAE,EAAE,MAAM,EAAE;QAClB,MAAM;QACN,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;KACf,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAAW,EACX,OAAe,EACf,IAA6B,EAC7B,MAA+B,EAC/B,MAAc;IAEd,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,gBAAgB,CAAC,GAAG,EAAE;QAC1B,OAAO;QACP,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,WAAW;QACnB,MAAM;QACN,MAAM;QACN,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;KACf,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,GAAW,EACX,OAAe,EACf,IAA6B,EAC7B,KAAa,EACb,SAAwB,IAAI;IAE5B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,gBAAgB,CAAC,GAAG,EAAE;QAC1B,OAAO;QACP,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE;QAC9C,MAAM;QACN,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,GAAG;KACf,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reppo/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Command-line interface for Reppo — mint pods, vote, lock REPPO, manage datanets. Built for AI agents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Reppo Labs",
|
|
7
|
+
"homepage": "https://github.com/Reppo-Labs/reppo-cli",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Reppo-Labs/reppo-cli.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Reppo-Labs/reppo-cli/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"reppo",
|
|
17
|
+
"cli",
|
|
18
|
+
"base",
|
|
19
|
+
"agents",
|
|
20
|
+
"web3",
|
|
21
|
+
"datanet"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"reppo": "./dist/bin.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc -p tsconfig.build.json",
|
|
37
|
+
"dev": "tsx src/bin.ts",
|
|
38
|
+
"lint": "eslint src --max-warnings 0",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:watch": "vitest",
|
|
42
|
+
"test:coverage": "vitest run --coverage",
|
|
43
|
+
"prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"clipanion": "^4.0.0-rc.4",
|
|
47
|
+
"proper-lockfile": "^4.1.2",
|
|
48
|
+
"typanion": "^3.14.0",
|
|
49
|
+
"viem": "^2.21.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^20.16.0",
|
|
53
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.59.2",
|
|
55
|
+
"@typescript-eslint/parser": "^8.59.2",
|
|
56
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
57
|
+
"eslint": "^10.3.0",
|
|
58
|
+
"tsx": "^4.19.0",
|
|
59
|
+
"typescript": "^5.6.0",
|
|
60
|
+
"typescript-eslint": "^8.59.2",
|
|
61
|
+
"vitest": "^4.0.0"
|
|
62
|
+
}
|
|
63
|
+
}
|