@artblocks/abx-cli 0.1.0-alpha.42 → 0.1.0-alpha.44
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/CHANGELOG.md +15 -229
- package/dist/commands/deploy.js +4 -4
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/maintenance.js +3 -3
- package/dist/commands/project.d.ts +1 -1
- package/dist/commands/project.js +8 -8
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/reads.d.ts +1 -1
- package/dist/commands/reads.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +6 -6
- package/dist/config.js.map +1 -1
- package/dist/deploy-plan.d.ts +6 -9
- package/dist/deploy-plan.d.ts.map +1 -1
- package/dist/deploy-plan.js.map +1 -1
- package/dist/ownerops.d.ts +7 -7
- package/dist/ownerops.js +10 -10
- package/dist/ownerops.js.map +1 -1
- package/package.json +8 -8
- package/skill/SKILL.md +1 -1
package/dist/deploy-plan.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The structured `--dry-run --json` / `--json` deploy plan
|
|
2
|
+
* The structured `--dry-run --json` / `--json` deploy plan.
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* JSON-schema integrator today). So this module only adds the other half: a versioned, typed object
|
|
10
|
-
* populated from the SAME locals `commands/deploy.ts` already computed for its human narration, at
|
|
11
|
-
* every existing `emit(jsonSafe({...}))` call site. The prose is untouched, byte-for-byte.
|
|
4
|
+
* The JSON payload and human prose are rendered from the same values but remain separate surfaces.
|
|
5
|
+
* Deploy is a high-stakes command family (real gas, address pinning, salt reservation), its exact
|
|
6
|
+
* dry-run prose is covered extensively, and the end-user skill depends on that prose. This module
|
|
7
|
+
* therefore provides a versioned, typed object populated from the SAME locals `commands/deploy.ts`
|
|
8
|
+
* uses for human narration at every `emit(jsonSafe({...}))` call site.
|
|
12
9
|
*
|
|
13
10
|
* A field a lane genuinely has no answer for is explicit `null`, never silently absent — that
|
|
14
11
|
* distinction (present-but-empty vs. not-applicable-here) is the whole point of a schema. See each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-plan.d.ts","sourceRoot":"","sources":["../src/deploy-plan.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deploy-plan.d.ts","sourceRoot":"","sources":["../src/deploy-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;;;;kCAUkC;AAClC,eAAO,MAAM,0BAA0B,EAAG,CAAU,CAAC;AAErD;;qGAEqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,cAAc,GAAG,QAAQ,GAAG,gBAAgB,GAAG,MAAM,GAAG,cAAc,CAAC;AAE/G,4EAA4E;AAC5E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACrC;;uEAEmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B;;iCAE6B;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;+FAC2F;IAC3F,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;uFACmF;IACnF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;gDAC4C;IAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,C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AAiB,CAAC;IAC1B,UAAU,EAAE,iBAAiB,CAAC;CAC/B;AAED,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,OAAO,0BAA0B,CAAC;IACjD,MAAM,EAAE,gBAAgB,CAAC;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,sBAAsB,CAAC;IACrC,KAAK,EAAE,eAAe,CAAC;IACvB;;sCAEkC;IAClC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,iBAAiB,CAAC;IAC3B;sGACkG;IAClG,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;;+CAK2C;IAC3C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACjC;AAKD;iGACiG;AACjG,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
package/dist/deploy-plan.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-plan.js","sourceRoot":"","sources":["../src/deploy-plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy-plan.js","sourceRoot":"","sources":["../src/deploy-plan.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;kCAUkC;AAClC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAU,CAAC;AA4MrD,4CAA4C;AAC5C,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAE/B;iGACiG;AACjG,MAAM,UAAU,gBAAgB,CAAC,CAAS;IACxC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|
package/dist/ownerops.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export declare function cmdLockDependencies(address: string | undefined, flags:
|
|
|
85
85
|
export declare function cmdLockScript(address: string | undefined, flags: Flags): Promise<void>;
|
|
86
86
|
/**
|
|
87
87
|
* `abx replace-script <address> --script <path>` — the safe, first-class way to replace an
|
|
88
|
-
* UNLOCKED code project's on-chain program
|
|
88
|
+
* UNLOCKED code project's on-chain program. `OnChainScript.sol` permits `setScriptChunk`/
|
|
89
89
|
* `removeLastScriptChunk` right up until `lock-script` — but before this command the only writer
|
|
90
90
|
* was `deploy-code` (its initial setup, or its `--resume` leg for a setup that never landed).
|
|
91
91
|
* Neither is "replace a program that's already live and correct on-chain", which is the gap this
|
|
@@ -414,8 +414,8 @@ export declare function cmdSetField(address: string | undefined, flags: Flags):
|
|
|
414
414
|
* /data/{key}`, the token-api route grammar (`packages/token-api/src/server.ts`'s `/t` and `/c`
|
|
415
415
|
* routes). `base` already carries its OWN `/t` or `/c` prefix (see `TokenURI.sol`/`ContractURI.sol`
|
|
416
416
|
* — `deploy-code`/`deploy`/etc. bake `tokenURIBase = "${host}/t"`), so this never re-adds one.
|
|
417
|
-
* Exported so a creator or an agent never hand-
|
|
418
|
-
*
|
|
417
|
+
* Exported so a creator or an agent never has to hand-assemble this from the docs. The old `attach`
|
|
418
|
+
* output was a bare path, not a URL anyone could actually GET.
|
|
419
419
|
*/
|
|
420
420
|
export declare function canonicalAttachmentUrl(opts: {
|
|
421
421
|
uriBase: string;
|
|
@@ -426,7 +426,7 @@ export declare function canonicalAttachmentUrl(opts: {
|
|
|
426
426
|
}): string;
|
|
427
427
|
/**
|
|
428
428
|
* Is ANY resolver actually answering for this project right now — the precondition for an
|
|
429
|
-
* attachment to ever become fetchable, and the check `attach`
|
|
429
|
+
* attachment to ever become fetchable, and the check `attach` did not originally run (it warned on
|
|
430
430
|
* an EMPTY resolver base, but a non-empty one that answered nothing got a silent, confident "listed
|
|
431
431
|
* in this project's resolver artifacts"). Reuses `cmdVerifyRemote`'s own GET-and-classify shape
|
|
432
432
|
* (`served.ts`'s `fetchServedTokenUri`) rather than a second HTTP client.
|
|
@@ -478,7 +478,7 @@ export declare function probeResolverReachable(opts: {
|
|
|
478
478
|
export declare function cmdAttach(rest: string[], flags: Flags): Promise<void>;
|
|
479
479
|
/**
|
|
480
480
|
* Which scope actually SERVES `field` right now — the same question `abx tokenuri`'s
|
|
481
|
-
* `abx_provenance` line answers, and the one `lock-field`
|
|
481
|
+
* `abx_provenance` line answers, and the one `lock-field` did not originally ask:
|
|
482
482
|
* `lock-field --field description --token 0` reported "would succeed" — and DID succeed — on a
|
|
483
483
|
* project where `description` is COLLECTION-scoped, freezing an empty token-scope slot while the
|
|
484
484
|
* value every viewer actually sees (the collection one) stayed completely mutable. Every statement
|
|
@@ -503,8 +503,8 @@ export interface FieldScopePresence {
|
|
|
503
503
|
}
|
|
504
504
|
export type LockFieldScope = 'token' | 'collection';
|
|
505
505
|
/**
|
|
506
|
-
* Pure decision core for the wrong-scope lock check
|
|
507
|
-
*
|
|
506
|
+
* Pure decision core for the wrong-scope lock check — exported so it is unit-testable with no chain
|
|
507
|
+
* at all, matching `computeAvailability`'s split (project.ts): the
|
|
508
508
|
* chain read is a thin, low-risk passthrough; the judgment call belongs in a function a test can
|
|
509
509
|
* call directly.
|
|
510
510
|
*
|
package/dist/ownerops.js
CHANGED
|
@@ -606,7 +606,7 @@ function replaceScriptGasFloor(finalCalldata, writeByteCounts) {
|
|
|
606
606
|
}
|
|
607
607
|
/**
|
|
608
608
|
* `abx replace-script <address> --script <path>` — the safe, first-class way to replace an
|
|
609
|
-
* UNLOCKED code project's on-chain program
|
|
609
|
+
* UNLOCKED code project's on-chain program. `OnChainScript.sol` permits `setScriptChunk`/
|
|
610
610
|
* `removeLastScriptChunk` right up until `lock-script` — but before this command the only writer
|
|
611
611
|
* was `deploy-code` (its initial setup, or its `--resume` leg for a setup that never landed).
|
|
612
612
|
* Neither is "replace a program that's already live and correct on-chain", which is the gap this
|
|
@@ -2164,14 +2164,14 @@ async function reportUriAfterFieldWrite(contract, collection, flags) {
|
|
|
2164
2164
|
` a field renderer must NEVER revert.`);
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
|
-
// ── attach: the canonical fetch URL + a real reachability probe
|
|
2167
|
+
// ── attach: the canonical fetch URL + a real reachability probe ───────────────
|
|
2168
2168
|
/**
|
|
2169
2169
|
* The exact, directly-fetchable URL for one attached key — `{base}/{chainId}/{address}[/{tokenId}]
|
|
2170
2170
|
* /data/{key}`, the token-api route grammar (`packages/token-api/src/server.ts`'s `/t` and `/c`
|
|
2171
2171
|
* routes). `base` already carries its OWN `/t` or `/c` prefix (see `TokenURI.sol`/`ContractURI.sol`
|
|
2172
2172
|
* — `deploy-code`/`deploy`/etc. bake `tokenURIBase = "${host}/t"`), so this never re-adds one.
|
|
2173
|
-
* Exported so a creator or an agent never hand-
|
|
2174
|
-
*
|
|
2173
|
+
* Exported so a creator or an agent never has to hand-assemble this from the docs. The old `attach`
|
|
2174
|
+
* output was a bare path, not a URL anyone could actually GET.
|
|
2175
2175
|
*/
|
|
2176
2176
|
export function canonicalAttachmentUrl(opts) {
|
|
2177
2177
|
const base = opts.uriBase.replace(/\/+$/, '');
|
|
@@ -2180,7 +2180,7 @@ export function canonicalAttachmentUrl(opts) {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
/**
|
|
2182
2182
|
* Is ANY resolver actually answering for this project right now — the precondition for an
|
|
2183
|
-
* attachment to ever become fetchable, and the check `attach`
|
|
2183
|
+
* attachment to ever become fetchable, and the check `attach` did not originally run (it warned on
|
|
2184
2184
|
* an EMPTY resolver base, but a non-empty one that answered nothing got a silent, confident "listed
|
|
2185
2185
|
* in this project's resolver artifacts"). Reuses `cmdVerifyRemote`'s own GET-and-classify shape
|
|
2186
2186
|
* (`served.ts`'s `fetchServedTokenUri`) rather than a second HTTP client.
|
|
@@ -2308,7 +2308,7 @@ export async function cmdAttach(rest, flags) {
|
|
|
2308
2308
|
for (const p of pairs) {
|
|
2309
2309
|
console.log(` attaching ${bold(p.key)} ${dim(`(${p.mimeType}, ${p.representation})`)} to ${scope}: ${dim(p.uri)}`);
|
|
2310
2310
|
}
|
|
2311
|
-
// Where it surfaces — and whether anything can actually SERVE it
|
|
2311
|
+
// Where it surfaces — and whether anything can actually SERVE it. This used to be one dim
|
|
2312
2312
|
// line assuming a non-empty resolver base meant the artifact would be listed; it never checked.
|
|
2313
2313
|
// An integrator attached five audio stems to a fully-on-chain token, paid to store them, and found
|
|
2314
2314
|
// `tokenURI` listed none of them — "paid for, stored on-chain, and invisible". The on-chain
|
|
@@ -2367,7 +2367,7 @@ export async function cmdAttach(rest, flags) {
|
|
|
2367
2367
|
if (sent) {
|
|
2368
2368
|
const id = flags.token ?? '0';
|
|
2369
2369
|
const names = pairs.map((p) => bold(p.key)).join(', ');
|
|
2370
|
-
//
|
|
2370
|
+
// Preserve the distinction between the on-chain FIELD WRITE succeeding (this line, always true
|
|
2371
2371
|
// when we get here) is not the same fact as the artifact being SERVABLE — say both, separately,
|
|
2372
2372
|
// rather than one "✓ attached" that a reader takes to mean "and it's live".
|
|
2373
2373
|
const servingLine = !uriBase || uriBase.trim() === ''
|
|
@@ -2422,7 +2422,7 @@ async function refuseIfParamKey(contract, field) {
|
|
|
2422
2422
|
}
|
|
2423
2423
|
/**
|
|
2424
2424
|
* Which scope actually SERVES `field` right now — the same question `abx tokenuri`'s
|
|
2425
|
-
* `abx_provenance` line answers, and the one `lock-field`
|
|
2425
|
+
* `abx_provenance` line answers, and the one `lock-field` did not originally ask:
|
|
2426
2426
|
* `lock-field --field description --token 0` reported "would succeed" — and DID succeed — on a
|
|
2427
2427
|
* project where `description` is COLLECTION-scoped, freezing an empty token-scope slot while the
|
|
2428
2428
|
* value every viewer actually sees (the collection one) stayed completely mutable. Every statement
|
|
@@ -2449,8 +2449,8 @@ export async function fieldScopePresence(client, contract, tokenId, field) {
|
|
|
2449
2449
|
return { token: tokenEntry[1] !== '0x', collection: collectionEntry[1] !== '0x' };
|
|
2450
2450
|
}
|
|
2451
2451
|
/**
|
|
2452
|
-
* Pure decision core for the wrong-scope lock check
|
|
2453
|
-
*
|
|
2452
|
+
* Pure decision core for the wrong-scope lock check — exported so it is unit-testable with no chain
|
|
2453
|
+
* at all, matching `computeAvailability`'s split (project.ts): the
|
|
2454
2454
|
* chain read is a thin, low-risk passthrough; the judgment call belongs in a function a test can
|
|
2455
2455
|
* call directly.
|
|
2456
2456
|
*
|