@artblocks/abx-effects 0.1.0-alpha.2 → 0.1.0-alpha.21

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 ADDED
@@ -0,0 +1,320 @@
1
+ # @artblocks/abx-effects
2
+
3
+ ## 0.1.0-alpha.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [c9f7aeb]
8
+ - @artblocks/abx-sdk@0.1.0-alpha.21
9
+ - @artblocks/abx-storage@0.1.0-alpha.21
10
+
11
+ ## 0.1.0-alpha.20
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [84ca9dd]
16
+ - Updated dependencies [84ca9dd]
17
+ - @artblocks/abx-sdk@0.1.0-alpha.20
18
+ - @artblocks/abx-storage@0.1.0-alpha.20
19
+
20
+ ## 0.1.0-alpha.19
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [b1c333d]
25
+ - Updated dependencies [b1c333d]
26
+ - @artblocks/abx-sdk@0.1.0-alpha.19
27
+ - @artblocks/abx-storage@0.1.0-alpha.19
28
+
29
+ ## 0.1.0-alpha.18
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [77a6248]
34
+ - Updated dependencies [77a6248]
35
+ - @artblocks/abx-sdk@0.1.0-alpha.18
36
+ - @artblocks/abx-storage@0.1.0-alpha.18
37
+
38
+ ## 0.1.0-alpha.17
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [c5b8ec3]
43
+ - Updated dependencies [5b29f53]
44
+ - @artblocks/abx-sdk@0.1.0-alpha.17
45
+ - @artblocks/abx-storage@0.1.0-alpha.17
46
+
47
+ ## 0.1.0-alpha.16
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [9c287c0]
52
+ - Updated dependencies [b5744a1]
53
+ - Updated dependencies [9c287c0]
54
+ - @artblocks/abx-sdk@0.1.0-alpha.16
55
+ - @artblocks/abx-storage@0.1.0-alpha.16
56
+
57
+ ## 0.1.0-alpha.15
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [7fec2d7]
62
+ - @artblocks/abx-sdk@0.1.0-alpha.15
63
+ - @artblocks/abx-storage@0.1.0-alpha.15
64
+
65
+ ## 0.1.0-alpha.14
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies [1b6b741]
70
+ - Updated dependencies [1b6b741]
71
+ - Updated dependencies [1b6b741]
72
+ - Updated dependencies [1b6b741]
73
+ - Updated dependencies [1b6b741]
74
+ - Updated dependencies [1b6b741]
75
+ - Updated dependencies [f64a31f]
76
+ - Updated dependencies [1b6b741]
77
+ - Updated dependencies [1b6b741]
78
+ - Updated dependencies [1b6b741]
79
+ - Updated dependencies [1b6b741]
80
+ - Updated dependencies [1b6b741]
81
+ - Updated dependencies [1b6b741]
82
+ - Updated dependencies [1b6b741]
83
+ - Updated dependencies [1b6b741]
84
+ - Updated dependencies [1b6b741]
85
+ - Updated dependencies [1b6b741]
86
+ - @artblocks/abx-sdk@0.1.0-alpha.14
87
+ - @artblocks/abx-storage@0.1.0-alpha.14
88
+
89
+ ## 0.1.0-alpha.13
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [528c6c6]
94
+ - @artblocks/abx-sdk@0.1.0-alpha.13
95
+ - @artblocks/abx-storage@0.1.0-alpha.13
96
+
97
+ ## 0.1.0-alpha.12
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [afa9dd4]
102
+ - Updated dependencies [8c254d5]
103
+ - @artblocks/abx-sdk@0.1.0-alpha.12
104
+ - @artblocks/abx-storage@0.1.0-alpha.12
105
+
106
+ ## 0.1.0-alpha.11
107
+
108
+ ### Patch Changes
109
+
110
+ - Updated dependencies [d40caf4]
111
+ - Updated dependencies [d40caf4]
112
+ - @artblocks/abx-sdk@0.1.0-alpha.11
113
+ - @artblocks/abx-storage@0.1.0-alpha.11
114
+
115
+ ## 0.1.0-alpha.10
116
+
117
+ ### Patch Changes
118
+
119
+ - 11fa933: The remaining phases of the simplification refactor that hadn't yet gotten a changeset: the CLI's
120
+ internal module split, the token-api/effects/mint-page convergence on the SDK, the shipped skill's
121
+ rewrite for the simplified surface, and a new SDK README.
122
+
123
+ - **`abx`'s `main.ts` split into domain command modules** (`commands/{deploy,project,reads,service,
124
+ scaffold,storage}.ts`, shared `output.ts`/`errors.ts`), with one exit-discipline rule
125
+ (`process.exitCode` + return, or a typed `CliError`, everywhere — bare `process.exit` only at the
126
+ entry guard, the top-level catch, and the keep-alive SIGINT handler). Purely internal: a 207-fixture
127
+ byte-diff matrix (every help text, dry-run, error path, and exit code) confirmed identical output
128
+ before and after.
129
+ - **token-api / effects / mint-page converge on the SDK**: `@artblocks/abx-storage` gains one
130
+ `resolveGatewayBase` (`readiness.ts`), replacing three near-identical copies (two in token-api, one
131
+ inline in storage itself); token-api exports `buildGeneratorDocument` so the CLI's `abx preview`
132
+ consumes the real generator-document assembler instead of a hand-kept duplicate; the effects runner
133
+ now resolves its config via the SDK's `readEnv` and gets a `makePublicClient` fallback transport, so
134
+ `ABX_RPC_URL` accepts a comma-separated failover list like every other RPC var; the scaffolded
135
+ mint-page app now imports ABIs from `@artblocks/abx-sdk/abi` and a browser-safe `makePublicClient` +
136
+ typed `readSaleConfig` instead of hand-rolled fetch/decode, and pins its generated `package.json` to
137
+ the SDK's _resolved_ version via a new `@artblocks/abx-sdk/package.json` export (alpha version
138
+ counters diverge per package under changesets, so pinning the CLI's own number could produce an
139
+ unsatisfiable range).
140
+ - **The shipped skill (`.claude/skills/abx-self-host/`) is rewritten for the surface phases 0–5
141
+ actually shipped**: every warning made obsolete by an enforcement is deleted rather than softened —
142
+ predict-only deploy-preview addresses, the `approvals N` line, the single `ABX_REMOTE_SELF_*`
143
+ credential grammar, `doctor`'s version/provenance ladder, `storage show --check`, the render/storage
144
+ combo validator's dry-run row, and `ABX_DEPLOYER_PK` as the only key name. Retired names swept from
145
+ `dev-loop-test`, the agent-eval scenarios, and spec prose. The skill ships bundled inside this CLI
146
+ package (co-versioned via `SKILL.md` frontmatter), so it rides this same patch.
147
+ - **New `packages/sdk/README.md`**: what the SDK is, the send-injection model (`PreparedTx` +
148
+ `SendTx`, `makeHotSender` for a hot key, bring-your-own for a wallet/multisig), a complete
149
+ deploy → upload → mint → read walkthrough against real exports, and browser-use notes (explicit
150
+ `rpcUrls`, no env, the `/node` subpath is Node-only). Included in the npm tarball automatically
151
+ (README is one of the files npm always packs, regardless of the `files` allowlist).
152
+
153
+ - 11fa933: Phase 1 of the simplification refactor: one transaction shape with one send-injection point, and an SDK that never touches `.env` or a Node-only global on its own. Two related passes, same release.
154
+
155
+ **One transaction shape, one executor.** `StagingTx`/`SendStagingTx` are gone — everything is a `PreparedTx` sent through a single `SendTx`. New `execute.ts` carries `makeHotSender` (pins the nonce once, detects an under-estimated gas limit against a just-deployed target, throws a typed `TxRevertedError` instead of reporting a reverted tx as confirmed) plus `pinGas`/`waitForCodeAt`, moved from the CLI (`gas.ts` is gone) with their design comments intact. Every `deployX` is now `prepareDeployX` (pure) + `deployX(send, ...)`; the CLI's hot lane and `abx deploy-code --resume` both delegate to the same sender instead of hand-rolling their own nonce/gas loop — the class of bug that reported a burned, reverted transaction as a successful deploy can't recur in a second call site because there is no longer a second implementation.
156
+
157
+ **The SDK never loads `.env` implicitly.** `loadDotEnv`/`parseEnvContent` moved to a new `@artblocks/abx-sdk/node` subpath — the only module that touches `node:fs`/`node:path`. The package's main entry is now browser-bundle-safe (a permanent esbuild smoke test guards it); a host calls `loadDotEnv()` once at startup (the CLI's `main()`, the effects runner's `main()`) and the SDK core reads whatever's already in `process.env` through a tiny `readEnv` that no-ops outside Node. `ClientOptions` gained `rpcUrls?: string[]` and `makeWalletClient`/`envSigningKey` gained a `privateKey`/`override` escape — explicit config now wins outright over env resolution, following the same override → env → manifest precedence `deployments.ts` already used for contract addresses.
158
+
159
+ **Single signing-key name.** `ABX_DEPLOYER_PK` is the only env var the SDK reads for a hot key — `SEPOLIA_FUNDED_PK` and `SEPOLIA_WALLET_PK` (earlier-alpha names) are no longer consulted. A caller with one of the old names set now gets a `MissingSigningKeyError` that names the new one explicitly and says the old ones are retired, rather than a plain "no key found" that leaves an upgrader hunting for why a key that's clearly _there_ isn't being read. Sandbox/e2e scripts and test fixtures move to the new name too.
160
+
161
+ **Shared, environment-neutral utilities.** New `sdk/src/util.ts`: `sleep`, a `linearBackoffDelay` helper (service.ts's retry ladder and the effects runner's resolver poll both use it now instead of hand-rolled backoff math), `parseDataUri` (replaces three near-identical `data:` URI regexes across the CLI and the tokenURI probe with one permissive parser), and `tryReadContract` (replaces three near-identical try/read-return-undefined helpers; the CLI's "no contract at this address" diagnostic still wraps it where that mattered). `Buffer` is gone from the SDK core (chunk hex-encoding and param base64-encoding now use viem's `bytesToHex` and a ~12-line dependency-free base64 codec) — nothing in the SDK's main import graph is Node-only any more.
162
+
163
+ - Updated dependencies [11fa933]
164
+ - Updated dependencies [11fa933]
165
+ - Updated dependencies [11fa933]
166
+ - Updated dependencies [11fa933]
167
+ - @artblocks/abx-sdk@0.1.0-alpha.10
168
+ - @artblocks/abx-storage@0.1.0-alpha.10
169
+
170
+ ## 0.1.0-alpha.9
171
+
172
+ ### Patch Changes
173
+
174
+ - Updated dependencies [df298d8]
175
+ - Updated dependencies [df298d8]
176
+ - Updated dependencies [df298d8]
177
+ - @artblocks/abx-sdk@0.1.0-alpha.9
178
+ - @artblocks/abx-storage@0.1.0-alpha.9
179
+
180
+ ## 0.1.0-alpha.8
181
+
182
+ ### Patch Changes
183
+
184
+ - Updated dependencies [e325b46]
185
+ - @artblocks/abx-sdk@0.1.0-alpha.8
186
+ - @artblocks/abx-storage@0.1.0-alpha.8
187
+
188
+ ## 0.1.0-alpha.7
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies [1b50f9d]
193
+ - Updated dependencies [1b50f9d]
194
+ - @artblocks/abx-sdk@0.1.0-alpha.7
195
+ - @artblocks/abx-storage@0.1.0-alpha.7
196
+
197
+ ## 0.1.0-alpha.6
198
+
199
+ ### Patch Changes
200
+
201
+ - Updated dependencies [1158420]
202
+ - Updated dependencies [1158420]
203
+ - Updated dependencies [1158420]
204
+ - @artblocks/abx-sdk@0.1.0-alpha.6
205
+ - @artblocks/abx-storage@0.1.0-alpha.6
206
+
207
+ ## 0.1.0-alpha.5
208
+
209
+ ### Minor Changes
210
+
211
+ - feba8c2: A resolver is no longer an object store: effect outputs split into **bound** and **referenced**
212
+ (`specs/protocol/effects.md → Bound vs referenced`), and the artifact registry enforces the split.
213
+
214
+ An output is **bound** iff a binding stitches its _content_ into the metadata JSON (today exactly
215
+ `render/traits` → `attributes`); everything else is **referenced** — the projection carries its URL,
216
+ or it only appears in the `artifacts` manifest. That one distinction decides who holds the bytes, and
217
+ it is now the wire rule rather than a runner constant.
218
+
219
+ - **`POST /v1/effect-artifacts` derives the mode from the binding, and refuses both mismatches.**
220
+ Bytes for a referenced output → `400` (the resolver redirects either way, so the bytes buy no
221
+ capability and cost it storage, retention and egress). A locator for a bound output → `400` (its
222
+ content is assembled into `tokenURI`; a pointer there used to be recorded and then silently never
223
+ stitch — a wrong answer served confidently). Bound content is capped at **64 KB**, and a locator
224
+ that only the producer could resolve (loopback/private host, presigned expiring URL) is rejected.
225
+ The resolver never fetches a locator while handling the write, and serves registered locators by
226
+ `302` — never by proxying.
227
+ - **Bound content moved out of byte custody** into the artifact row (`effect_artifacts.bytes`). Two
228
+ distinct rules, deliberately not one: a node **MUST** serve and stitch bound content only at the
229
+ token's current settled `inputsHash`, and it **MAY** drop superseded content whenever it likes
230
+ (nothing may read it, and it is re-creatable). The reference drops eagerly, on each bound
231
+ registration, so it holds at most `64 KB × minted × bound outputs` — but retention is a service
232
+ policy, not an obligation. Either way "conforming means holding a bounded amount of JSON in the
233
+ database you already run" is now literally true: a resolver in the publish topology needs no object
234
+ storage at all.
235
+ - **`abx-effects-publish/v1` is gone** (not deprecated): the two routes ride `abx-control-plane/v1`.
236
+ Once referenced output is locator-only, accepting a registration is a database insert, so the
237
+ capability flag described a distinction that no longer exists. A service that won't take a caller's
238
+ artifacts refuses on the credential (`403`) — interfaces describe wire grammar, tokens describe
239
+ permission. The interface ids are also explicitly **all-or-nothing**, and the conformance fixture
240
+ now checks that every route a declared interface names actually answers.
241
+ - **The runner declares bound outputs** (`EffectOutputDecl.bound`), refuses to start when it has a
242
+ publish token but a backend that can't name a locator, preflights the descriptor + credential
243
+ before spending a render, and **latches** on a permanent (4xx) publish failure instead of
244
+ re-rendering every sweep forever. Skips now re-register rows, so a transient publish failure heals
245
+ without a re-render.
246
+ - **The CLI refuses the impossible combination up front**: `abx render --remote`, `abx effects`
247
+ against a remote resolver, and `abx deploy-effects` all require a backend that can name a reachable
248
+ URL — `cloud` (S3/R2 + public base), `ipfs`, or `arweave`, named as **peers**. Derived output is
249
+ re-creatable, so the protocol has no preference among schemes: a chosen `https://` gateway or
250
+ bucket URL is exactly as legitimate as `ipfs://`/`ar://`, and reachability — not durability — is
251
+ the requirement. Rendering **co-located** with the resolver remains fully supported on any backend,
252
+ including `fs`.
253
+
254
+ Breaking for producers that relied on pushing media bytes to a resolver: publish a locator instead,
255
+ or co-locate. Breaking for clients that read `abx-effects-publish/v1` from a descriptor.
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [feba8c2]
260
+ - @artblocks/abx-sdk@0.1.0-alpha.5
261
+ - @artblocks/abx-storage@0.1.0-alpha.5
262
+
263
+ ## 0.1.0-alpha.4
264
+
265
+ ### Patch Changes
266
+
267
+ - Updated dependencies [67b686b]
268
+ - @artblocks/abx-sdk@0.1.0-alpha.4
269
+ - @artblocks/abx-storage@0.1.0-alpha.4
270
+
271
+ ## 0.1.0-alpha.3
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies [a72723d]
276
+ - @artblocks/abx-sdk@0.1.0-alpha.3
277
+ - @artblocks/abx-storage@0.1.0-alpha.3
278
+
279
+ ## 0.1.0-alpha.2
280
+
281
+ ### Minor Changes
282
+
283
+ - 3745bd3: Remote services are first-class: a provider-neutral control plane, named remotes, and a service
284
+ descriptor (specs/self-host-toolkit/remote-services.md).
285
+
286
+ - **Control plane moves to `/v1`** (hard cutover; `/admin/*` is gone — redeploy self-hosted nodes):
287
+ `POST/GET /v1/projects`, `DELETE|reindex|status /v1/projects/{chainId}/{address}`,
288
+ `POST /v1/effect-artifacts|effect-status`. `chainId` is explicit and validated everywhere; every
289
+ error carries a machine `code` (`unauthorized` 401 · `forbidden` 403 · `unsupported_chain` ·
290
+ `not_registered` · `disabled`) replacing the old prose-sniffed 404. One bearer guard replaces the
291
+ four inline copies; OPTIONS preflight now answers so browser clients can send `Authorization`.
292
+ - **`GET /.well-known/abx-service`** — the public service descriptor: `interfaces` (present iff
293
+ actually enabled), `chains`, `auth` (with optional provider-set `signupUrl`/`docsUrl` via
294
+ `ABX_SERVICE_*` env), and `render.attached` (managed rendering, probed from the runner's
295
+ `/health`) — so an agent can match a project to a provider before registering.
296
+ - **Named remotes in the CLI**: `--remote <name>` reads `ABX_REMOTE_<NAME>_URL`/`_TOKEN`
297
+ (a managed provider's per-account key — never falls back to `ABX_RESOLVER_ADMIN_TOKEN`);
298
+ `--remote <url> [--remote-token <t>]` for ad-hoc targets; bare `--remote` stays the self-host
299
+ default. New `abx remote [name|url]` inspects a service's descriptor and the projects a token
300
+ sees. `migrate --from/--to` accept names; only the destination needs a credential.
301
+ - **The SDK gains its first HTTP surface**: `AbxServiceClient` (endpoint + injected bearer, retry
302
+ on 5xx/network, immediate typed `AbxServiceError` on 4xx) — shared by the CLI and the effects
303
+ runner's publish lane. `envSuffix()` is the shared env-name normalization.
304
+ - **Conformance fixture**: `pnpm conformance -- <base-url> [--token …]` self-verifies any
305
+ implementation; the e2e suite runs it against the reference container.
306
+
307
+ ### Patch Changes
308
+
309
+ - Updated dependencies [3745bd3]
310
+ - Updated dependencies [3745bd3]
311
+ - @artblocks/abx-sdk@0.1.0-alpha.2
312
+ - @artblocks/abx-storage@0.1.0-alpha.2
313
+
314
+ ## 0.1.0-alpha.1
315
+
316
+ ### Patch Changes
317
+
318
+ - Updated dependencies [4074766]
319
+ - @artblocks/abx-sdk@0.1.0-alpha.1
320
+ - @artblocks/abx-storage@0.1.0-alpha.1
package/dist/harness.d.ts CHANGED
@@ -35,6 +35,21 @@ export interface EffectContext {
35
35
  export interface EffectOutputDecl {
36
36
  key: string;
37
37
  mimeType: string;
38
+ /**
39
+ * This output's content stitches into the metadata JSON (`specs/protocol/effects.md → Bound vs
40
+ * referenced`) — `traits` today. Bound output is published as capped inline **bytes**, because a
41
+ * locator can't work: the resolver assembles the content into `tokenURI`, so a pointer there would
42
+ * put a third-party fetch on its hottest read.
43
+ *
44
+ * Everything else is **referenced**: the PRODUCER holds the bytes and publishes a reachable
45
+ * locator. The resolver serves referenced output by redirect either way, so handing it the bytes
46
+ * buys no capability and costs it an object store — it refuses them with a `400`.
47
+ *
48
+ * Declared here, next to the mimeType, for the same reason the type is: the serving side must not
49
+ * have to guess. A declaration the resolver doesn't share (an effect whose bindings it doesn't
50
+ * implement) is refused loudly rather than stored unservable.
51
+ */
52
+ bound?: boolean;
38
53
  }
39
54
  export interface EffectModule {
40
55
  /** Lowercase dot-namespaced effect key (`render`, `inference.caption`, …). */
@@ -44,9 +59,10 @@ export interface EffectModule {
44
59
  run(ctx: EffectContext): Promise<Record<string, EffectOutput | null>>;
45
60
  }
46
61
  /** One artifact registration — the row a runner records (co-located, via `recordArtifact`) or
47
- * publishes (`/v1/effect-artifacts`) per declared output, so the resolver can enumerate the
48
- * token's data plane without learning any effect's internals. `locator === null` means the bytes
49
- * live in custody at `key` (shared disk, or published bytes held by the resolver). */
62
+ * registers (`/v1/effect-artifacts`) per declared output, so the resolver can enumerate the
63
+ * token's data plane without learning any effect's internals. `locator === null` means the content
64
+ * isn't reached by pointer: a BOUND output (held with the row / stitched into the JSON), or a
65
+ * co-located producer's bytes in the shared backend at `key`. */
50
66
  export interface EffectArtifactRecord {
51
67
  key: Hex;
52
68
  address: string;
@@ -64,13 +80,17 @@ export interface RunnerOptions {
64
80
  storage: StorageBackend;
65
81
  effects: EffectModule[];
66
82
  environmentId?: string;
67
- /** When set, publish each stored artifact to the resolver's control plane
83
+ /** When set, register each artifact with the resolver's control plane
68
84
  * (POST /v1/effect-artifacts) so a resolver that does NOT share this backend's disk can serve it
69
- * — a durable locator (ipfs/ar) when the backend exposes one, else the raw bytes. Bearer only;
70
- * never signs on-chain. Omit for the co-located topology (runner + resolver share one backend). */
85
+ * — a locator for referenced output, capped content for bound output
86
+ * (`specs/protocol/effects.md Bound vs referenced`). Requires a backend that exposes a locator;
87
+ * the constructor refuses otherwise. Bearer only; never signs on-chain. Omit for the co-located
88
+ * topology (runner + resolver share one backend). */
71
89
  adminToken?: string;
72
- /** Also (re)publish artifacts that already exist in storage (not just freshly-rendered ones) — the
73
- * idempotent republish that restores a resolver which lost its volume. Requires `adminToken`. */
90
+ /** Re-register artifacts that already exist in storage (not just freshly-rendered ones) — the
91
+ * idempotent repair that restores a resolver which lost its rows, and that lands a publish which
92
+ * failed transiently after the bytes were stored. **Default on** with `adminToken` (it costs a
93
+ * presence probe and a locator string); pass `false` to opt out. */
74
94
  republish?: boolean;
75
95
  /** Co-located topology: record each declared output into the resolver's artifact registry
76
96
  * directly (the shared SQLite store) — the enumeration surface the manifest lists. Recorded on
@@ -109,6 +129,17 @@ export declare class EffectRunner {
109
129
  private readonly pending;
110
130
  private draining;
111
131
  private idleWaiters;
132
+ /**
133
+ * Set once a publish fails for a reason retrying can't fix (a 4xx, an unusable locator). While
134
+ * latched, the runner renders NOTHING: a render whose publish can't land is a render that this
135
+ * runner's own idempotency probe will ask for again on the next sweep, and every sweep after —
136
+ * so continuing would burn Chromium and storage indefinitely to produce an artifact nobody can
137
+ * serve. One actionable error beats an infinite quiet loop. Cleared by fixing the config and
138
+ * restarting, or by an explicit `force` (the operator asserting they've fixed it).
139
+ */
140
+ private publishLatch;
141
+ /** The startup handshake, run once and reused (see {@link preflight}). */
142
+ private preflightOnce;
112
143
  constructor(opts: RunnerOptions);
113
144
  /** Merge a notification into the queue and kick the drain. Returns the queue depth. */
114
145
  enqueue(address: string, tokenIds?: string[], force?: boolean): number;
@@ -121,9 +152,23 @@ export declare class EffectRunner {
121
152
  private drain;
122
153
  /** All projects the resolver serves → sweep each code project. */
123
154
  sweepAll(): Promise<SweepStats>;
155
+ /**
156
+ * The startup handshake for the publish topology — run once, before any render, so a
157
+ * misconfiguration costs a round trip instead of a Chromium launch. Checks the two things a
158
+ * producer can know up front:
159
+ *
160
+ * - the descriptor declares `abx-control-plane/v1` (which now carries the artifact-registry
161
+ * routes — there is no separate publish capability to negotiate) and serves our chain;
162
+ * - our credential actually works, via one authenticated control-plane read.
163
+ *
164
+ * A service's capabilities and a caller's permissions should never be discoverable only by
165
+ * crashing after the expensive part. Descriptor trouble is a WARNING (a node may be older than
166
+ * this field, and the publish still works); a definitive credential rejection latches.
167
+ */
168
+ private preflight;
124
169
  /** Sweep one project: run every effect for every token whose current output is missing.
125
170
  * `opts.force` re-renders even when the current output already exists (the repair lane for a
126
- * bad/blank/timed-out capture — the art is otherwise deterministic, so a normal sweep skips it). */
171
+ * bad/blank/timed-out capture — the render is otherwise deterministic, so a normal sweep skips it). */
127
172
  sweepProject(address: string, tokenIds?: string[], opts?: {
128
173
  force?: boolean;
129
174
  }): Promise<SweepStats>;
@@ -135,17 +180,30 @@ export declare class EffectRunner {
135
180
  * is never here — it stays artifact-presence at the settled inputsHash. */
136
181
  private reportStatus;
137
182
  /**
138
- * Publish one stored output to the resolver's control plane so a node that doesn't share this
139
- * backend's disk can serve it. Inline-bound outputs (`INLINE_OUTPUTS` they stitch into the
140
- * metadata JSON, so the resolver needs the content, not a redirect) → always bytes. Everything
141
- * else a durable locator when the backend exposes one (ipfs/ar), so the resolver 302-redirects;
142
- * else raw bytes. `contentType` is the DECLARED mimeType.
183
+ * Register one stored output with the resolver's control plane so a node that doesn't share this
184
+ * backend's disk can serve it. The form follows the output's DECLARED class
185
+ * (`specs/protocol/effects.md → Bound vs referenced`), and the resolver enforces the same rule
186
+ * from its side this is one contract, not a preference on either end:
187
+ *
188
+ * - **bound** (`traits`) → the content, capped. The resolver stitches it into the token JSON.
189
+ * - **referenced** (`image`, `print`, …) → a reachable locator from THIS backend. We hold the
190
+ * bytes; the resolver holds a pointer and redirects. If the backend can't produce a locator
191
+ * there is no legal publish, and that is a configuration error we refuse to paper over —
192
+ * the constructor's boot guard normally catches it before a single render is spent.
193
+ *
194
+ * `contentType` is the DECLARED mimeType.
143
195
  */
144
196
  private publishArtifact;
145
197
  /** Record one artifact row into the co-located registry (`RunnerOptions.recordArtifact`). */
146
198
  private record;
147
- /** Re-publish already-stored outputs for (effect, token) at the current inputsHash — no re-render.
148
- * Restores a resolver that lost its volume (the bytes still live in this backend). */
199
+ /**
200
+ * Re-register already-stored outputs for (effect, token) at the current inputsHash no re-render.
201
+ * Cheap now that referenced output travels as a pointer: a presence probe plus a locator string,
202
+ * no byte read (only a bound output's small content is read). That is why it runs on every skip in
203
+ * the publish topology rather than being opt-in: it self-heals a resolver that lost its rows AND —
204
+ * the case that matters more — a publish that failed transiently after the bytes had already
205
+ * landed here, which the "is the artifact stored?" ledger would otherwise mark done forever.
206
+ */
149
207
  private republishFromStorage;
150
208
  /** Re-record registry rows for outputs already stored at the current inputsHash — presence probes
151
209
  * only, no byte reads, no re-render. The deterministic-image lane records its stable public URL
@@ -170,7 +228,7 @@ export declare class EffectRunner {
170
228
  * substituted URL lives under that public base. Then the still is written to the exact object the
171
229
  * on-chain pointer names (`<publicBase>/<objectKey>`) — marketplaces read the on-chain tokenURI →
172
230
  * this URL, never a resolver, and the URL is stable across re-renders (the pixels change, the
173
- * pointer doesn't → no chain write to update art). Any other host → null (the normal locator lane).
231
+ * pointer doesn't → no chain write to update content). Any other host → null (the normal locator lane).
174
232
  */
175
233
  private deterministicImageTarget;
176
234
  private getState;
@@ -1 +1 @@
1
- {"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAA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from 'node:http';
2
2
  import { hexToString } from 'viem';
3
- import { AbxServiceClient, buildTokenData, contentDigestOf, inputsHash, isCodeProject, renderArtifactKey, } from '@artblocks/abx-sdk';
3
+ import { AbxServiceClient, BOUND_ARTIFACT_MAX_BYTES, CONTROL_PLANE_INTERFACE, buildTokenData, contentDigestOf, inputsHash, isCodeProject, linearBackoffDelay, locatorRejectionReason, renderArtifactKey, sleep, } from '@artblocks/abx-sdk';
4
4
  /** Give up on an artifact key after this many failed runs (a deterministically-crashing script
5
5
  * must not hot-loop). In-memory: a runner restart, a NEW inputsHash (the state changed), or an
6
6
  * explicit `force` all reset it. The failure itself is reported to the resolver with the error. */
7
7
  const MAX_ATTEMPTS = 3;
8
- /** Outputs that BIND into the metadata JSON itself (the resolver needs the content, not a
9
- * redirect) published/recorded as bytes, never as a locator. Everything else prefers the
10
- * backend's durable locator (ipfs/ar/https) and falls back to bytes. */
11
- const INLINE_OUTPUTS = new Set(['traits']);
8
+ /** A publish that failed for a reason retrying can't fix (400/403/404 the wrong shape, a token
9
+ * that isn't allowed to write, a route the service doesn't serve). Distinct from a transient one
10
+ * because the response is opposite: stop, don't back off. See {@link EffectRunner.publishLatch}. */
11
+ class PublishConfigError extends Error {
12
+ }
12
13
  export class EffectRunner {
13
14
  opts;
14
15
  log;
@@ -23,10 +24,31 @@ export class EffectRunner {
23
24
  pending = new Map();
24
25
  draining = false;
25
26
  idleWaiters = [];
27
+ /**
28
+ * Set once a publish fails for a reason retrying can't fix (a 4xx, an unusable locator). While
29
+ * latched, the runner renders NOTHING: a render whose publish can't land is a render that this
30
+ * runner's own idempotency probe will ask for again on the next sweep, and every sweep after —
31
+ * so continuing would burn Chromium and storage indefinitely to produce an artifact nobody can
32
+ * serve. One actionable error beats an infinite quiet loop. Cleared by fixing the config and
33
+ * restarting, or by an explicit `force` (the operator asserting they've fixed it).
34
+ */
35
+ publishLatch = null;
36
+ /** The startup handshake, run once and reused (see {@link preflight}). */
37
+ preflightOnce = null;
26
38
  constructor(opts) {
27
39
  this.opts = opts;
28
40
  this.log = opts.log ?? ((line) => console.log(`[effects] ${line}`));
29
41
  this.service = opts.adminToken ? new AbxServiceClient({ baseUrl: opts.resolverUrl, token: opts.adminToken }) : null;
42
+ // Boot guard: in the publish topology (we don't share the resolver's disk), referenced output
43
+ // can ONLY reach it as a locator — so a backend that can't produce one has no lane, and every
44
+ // render would be wasted work ending in a 400. Refuse at construction, where the fix is cheap,
45
+ // rather than after the first expensive capture. (Enforcing beats warning: the prose version of
46
+ // this was the trap agents kept walking into.)
47
+ if (opts.adminToken && !opts.storage.locator) {
48
+ throw new Error(`this storage backend exposes no locator, so a remote resolver could never serve the renders it holds. ` +
49
+ `Either point the runner at a backend that does — cloud/S3 or R2 with a public base, ipfs, or arweave (peers; pick on operational grounds, not durability dogma) — ` +
50
+ `or run co-located with the resolver, sharing one backend and no admin token.`);
51
+ }
30
52
  }
31
53
  /** Merge a notification into the queue and kick the drain. Returns the queue depth. */
32
54
  enqueue(address, tokenIds, force = false) {
@@ -95,15 +117,76 @@ export class EffectRunner {
95
117
  }
96
118
  return total;
97
119
  }
120
+ /**
121
+ * The startup handshake for the publish topology — run once, before any render, so a
122
+ * misconfiguration costs a round trip instead of a Chromium launch. Checks the two things a
123
+ * producer can know up front:
124
+ *
125
+ * - the descriptor declares `abx-control-plane/v1` (which now carries the artifact-registry
126
+ * routes — there is no separate publish capability to negotiate) and serves our chain;
127
+ * - our credential actually works, via one authenticated control-plane read.
128
+ *
129
+ * A service's capabilities and a caller's permissions should never be discoverable only by
130
+ * crashing after the expensive part. Descriptor trouble is a WARNING (a node may be older than
131
+ * this field, and the publish still works); a definitive credential rejection latches.
132
+ */
133
+ async preflight() {
134
+ if (!this.service)
135
+ return;
136
+ if (!this.preflightOnce) {
137
+ this.preflightOnce = (async () => {
138
+ try {
139
+ const d = await this.service.descriptor();
140
+ if (!d.interfaces?.includes(CONTROL_PLANE_INTERFACE)) {
141
+ this.log(`warning: ${this.opts.resolverUrl} declares no ${CONTROL_PLANE_INTERFACE} — publishes may be refused ` +
142
+ `(interfaces: ${d.interfaces?.join(', ') || 'none'})`);
143
+ }
144
+ }
145
+ catch (err) {
146
+ this.log(`warning: could not read the service descriptor (${err.message}) — continuing`);
147
+ }
148
+ try {
149
+ await this.service.listProjects();
150
+ }
151
+ catch (err) {
152
+ const status = err.status;
153
+ if (status === 401 || status === 403 || status === 404) {
154
+ this.publishLatch =
155
+ `the resolver at ${this.opts.resolverUrl} rejected our control-plane credential (${status}) — ` +
156
+ `renders would be published nowhere. Check the admin/remote token; nothing has been rendered.`;
157
+ this.log(`publish lane unavailable: ${this.publishLatch}`);
158
+ }
159
+ else {
160
+ this.log(`warning: control-plane preflight failed (${err.message}) — treating as transient`);
161
+ }
162
+ }
163
+ })();
164
+ }
165
+ return this.preflightOnce;
166
+ }
98
167
  /** Sweep one project: run every effect for every token whose current output is missing.
99
168
  * `opts.force` re-renders even when the current output already exists (the repair lane for a
100
- * bad/blank/timed-out capture — the art is otherwise deterministic, so a normal sweep skips it). */
169
+ * bad/blank/timed-out capture — the render is otherwise deterministic, so a normal sweep skips it). */
101
170
  async sweepProject(address, tokenIds, opts) {
102
171
  const stats = { ran: 0, skipped: 0, failed: 0, errors: [] };
172
+ if (opts?.force)
173
+ this.publishLatch = null; // the operator asserting the config is fixed
174
+ await this.preflight();
175
+ // Latched: render nothing and say why once. Reporting it as a failure (rather than a silent
176
+ // skip) is the point — `abx render` surfaces it, and a hosted runner's logs carry one
177
+ // actionable line instead of a re-render loop nobody notices until the bill arrives.
178
+ if (this.publishLatch) {
179
+ stats.failed += 1;
180
+ stats.errors.push(this.publishLatch);
181
+ this.log(`skipping ${address}: ${this.publishLatch}`);
182
+ return stats;
183
+ }
103
184
  const state = await this.getState(address);
104
185
  if (!state || !isCodeProject(state))
105
186
  return stats;
106
- const tokens = (tokenIds ? state.tokens.filter((t) => tokenIds.includes(t.tokenId)) : state.tokens.filter((t) => t.minted))
187
+ const tokens = (tokenIds
188
+ ? state.tokens.filter((t) => tokenIds.includes(t.tokenId) && t.lifecycle !== 'burned')
189
+ : state.tokens.filter((t) => t.lifecycle === 'live'))
107
190
  // ascending — token 0 (the collection page / oldest listings) lands first on a big fan-out
108
191
  .sort((a, b) => (BigInt(a.tokenId) < BigInt(b.tokenId) ? -1 : 1));
109
192
  // An explicit token id that matched nothing minted is a no-op that must SAY so — not a silent
@@ -133,6 +216,13 @@ export class EffectRunner {
133
216
  const line = `${item.effect.key} ${address}/${item.token.tokenId}: ${err.message}`;
134
217
  stats.errors.push(line);
135
218
  this.log(`${line} (failed)`);
219
+ // A publish that can't succeed by retrying stops the whole pool: every remaining token
220
+ // would render, fail the same way, and be re-rendered next sweep. Fix the config, restart.
221
+ if (err instanceof PublishConfigError) {
222
+ this.publishLatch = `${err.message} — rendering stopped; fix this and restart (or re-run with force)`;
223
+ this.log(`publish lane unavailable: ${this.publishLatch}`);
224
+ return;
225
+ }
136
226
  }
137
227
  }
138
228
  };
@@ -162,7 +252,7 @@ export class EffectRunner {
162
252
  // current output exists — idempotent (no re-render). Republish from storage on request so a
163
253
  // resolver that lost its volume can be restored without re-rendering (RunnerOptions.republish).
164
254
  // (No republish in the deterministic lane: the bytes already live at the public S3 key.)
165
- if (!detImg && this.opts.adminToken && this.opts.republish)
255
+ if (!detImg && this.opts.adminToken && this.opts.republish !== false)
166
256
  await this.republishFromStorage(effect, state, token, hash);
167
257
  // Registry repair lane: re-record rows for whatever is stored at the current hash — a cheap
168
258
  // local upsert per output, so a wiped artifact registry self-heals on the next sweep.
@@ -254,14 +344,41 @@ export class EffectRunner {
254
344
  }
255
345
  }
256
346
  /**
257
- * Publish one stored output to the resolver's control plane so a node that doesn't share this
258
- * backend's disk can serve it. Inline-bound outputs (`INLINE_OUTPUTS` they stitch into the
259
- * metadata JSON, so the resolver needs the content, not a redirect) → always bytes. Everything
260
- * else a durable locator when the backend exposes one (ipfs/ar), so the resolver 302-redirects;
261
- * else raw bytes. `contentType` is the DECLARED mimeType.
347
+ * Register one stored output with the resolver's control plane so a node that doesn't share this
348
+ * backend's disk can serve it. The form follows the output's DECLARED class
349
+ * (`specs/protocol/effects.md → Bound vs referenced`), and the resolver enforces the same rule
350
+ * from its side this is one contract, not a preference on either end:
351
+ *
352
+ * - **bound** (`traits`) → the content, capped. The resolver stitches it into the token JSON.
353
+ * - **referenced** (`image`, `print`, …) → a reachable locator from THIS backend. We hold the
354
+ * bytes; the resolver holds a pointer and redirects. If the backend can't produce a locator
355
+ * there is no legal publish, and that is a configuration error we refuse to paper over —
356
+ * the constructor's boot guard normally catches it before a single render is spent.
357
+ *
358
+ * `contentType` is the DECLARED mimeType.
262
359
  */
263
360
  async publishArtifact(state, token, hash, effect, decl, output, key) {
264
- const locator = INLINE_OUTPUTS.has(decl.key) ? null : ((await this.opts.storage.locator?.(key)) ?? null);
361
+ let body;
362
+ if (decl.bound) {
363
+ if (output.bytes.length > BOUND_ARTIFACT_MAX_BYTES) {
364
+ throw new PublishConfigError(`bound output '${effect.key}/${decl.key}' is ${output.bytes.length}B — over the ${BOUND_ARTIFACT_MAX_BYTES}B cap a resolver accepts. ` +
365
+ `An output this size is referenced, not bound: drop \`bound\` from its declaration so it publishes as a locator.`);
366
+ }
367
+ body = { bytes_base64: Buffer.from(output.bytes).toString('base64') };
368
+ }
369
+ else {
370
+ const locator = (await this.opts.storage.locator?.(key)) ?? null;
371
+ if (!locator) {
372
+ throw new PublishConfigError(`no locator for '${effect.key}/${decl.key}' from this storage backend — a resolver that doesn't share this disk can only serve referenced output by redirect, so it needs a URL. ` +
373
+ `Use a backend that exposes one (cloud/S3 or R2 with a public base, ipfs, arweave), or run this runner co-located with the resolver (drop the admin token and share the backend).`);
374
+ }
375
+ const bad = locatorRejectionReason(locator);
376
+ if (bad) {
377
+ throw new PublishConfigError(`this backend's locator for '${effect.key}/${decl.key}' (${locator}) won't be accepted: ${bad}. ` +
378
+ `A locator must resolve for anyone — check the public base / gateway this backend is configured with.`);
379
+ }
380
+ body = { locator };
381
+ }
265
382
  try {
266
383
  await this.service.publishEffectArtifact({
267
384
  chainId: state.chainId,
@@ -271,18 +388,29 @@ export class EffectRunner {
271
388
  output: decl.key,
272
389
  effectKey: effect.key,
273
390
  contentType: decl.mimeType,
274
- ...(locator ? { locator } : { bytes_base64: Buffer.from(output.bytes).toString('base64') }),
391
+ ...body,
275
392
  });
276
393
  }
277
394
  catch (err) {
278
- throw new Error(`publish ${decl.key} ${state.address}/${token.tokenId} ${err.message}`);
395
+ // Classify, because the two cases want opposite behavior. A 4xx will never succeed by
396
+ // retrying, and swallowing it is expensive in a way a log line hides: the work ledger is
397
+ // "custody lacks the artifact at the current hash", so an unpublished render re-renders on
398
+ // EVERY sweep, forever. A 5xx/network failure is transient — leave the artifact missing and
399
+ // let the next sweep retry it.
400
+ const status = err.status;
401
+ const detail = `publish ${decl.key} ${state.address}/${token.tokenId} → ${err.message}`;
402
+ if (status !== undefined && status >= 400 && status < 500 && status !== 408 && status !== 429) {
403
+ throw new PublishConfigError(detail);
404
+ }
405
+ throw new Error(detail);
279
406
  }
280
- this.log(`published ${decl.key} ${state.address}/${token.tokenId} (${locator ? `locator ${locator}` : `${output.bytes.length}B`})`);
407
+ this.log(`registered ${decl.key} ${state.address}/${token.tokenId} ` +
408
+ `(${'locator' in body ? `locator ${body.locator}` : `${output.bytes.length}B bound`})`);
281
409
  }
282
410
  /** Record one artifact row into the co-located registry (`RunnerOptions.recordArtifact`). */
283
411
  async record(state, token, hash, effect, decl, key, locatorOverride) {
284
- const locator = locatorOverride ??
285
- (INLINE_OUTPUTS.has(decl.key) ? null : ((await this.opts.storage.locator?.(key)) ?? null));
412
+ // A bound output's content is served from the registry row / shared custody, never a pointer.
413
+ const locator = locatorOverride ?? (decl.bound ? null : ((await this.opts.storage.locator?.(key)) ?? null));
286
414
  await this.opts.recordArtifact({
287
415
  key,
288
416
  address: state.address.toLowerCase(),
@@ -294,14 +422,28 @@ export class EffectRunner {
294
422
  locator,
295
423
  });
296
424
  }
297
- /** Re-publish already-stored outputs for (effect, token) at the current inputsHash — no re-render.
298
- * Restores a resolver that lost its volume (the bytes still live in this backend). */
425
+ /**
426
+ * Re-register already-stored outputs for (effect, token) at the current inputsHash no re-render.
427
+ * Cheap now that referenced output travels as a pointer: a presence probe plus a locator string,
428
+ * no byte read (only a bound output's small content is read). That is why it runs on every skip in
429
+ * the publish topology rather than being opt-in: it self-heals a resolver that lost its rows AND —
430
+ * the case that matters more — a publish that failed transiently after the bytes had already
431
+ * landed here, which the "is the artifact stored?" ledger would otherwise mark done forever.
432
+ */
299
433
  async republishFromStorage(effect, state, token, hash) {
300
434
  for (const decl of effect.outputs) {
301
435
  const key = this.artifactKey(state, token, hash, effect, decl.key);
302
- const stored = await this.opts.storage.get(key);
303
- if (stored)
304
- await this.publishArtifact(state, token, hash, effect, decl, stored, key);
436
+ if (decl.bound) {
437
+ const stored = await this.opts.storage.get(key);
438
+ if (stored)
439
+ await this.publishArtifact(state, token, hash, effect, decl, stored, key);
440
+ continue;
441
+ }
442
+ if (await this.opts.storage.has(key)) {
443
+ // The bytes never leave this backend, so an empty placeholder is all publishArtifact needs
444
+ // for a referenced output — it publishes the locator, not the content.
445
+ await this.publishArtifact(state, token, hash, effect, decl, { bytes: new Uint8Array(), contentType: decl.mimeType }, key);
446
+ }
305
447
  }
306
448
  }
307
449
  /** Re-record registry rows for outputs already stored at the current inputsHash — presence probes
@@ -403,7 +545,7 @@ export class EffectRunner {
403
545
  * substituted URL lives under that public base. Then the still is written to the exact object the
404
546
  * on-chain pointer names (`<publicBase>/<objectKey>`) — marketplaces read the on-chain tokenURI →
405
547
  * this URL, never a resolver, and the URL is stable across re-renders (the pixels change, the
406
- * pointer doesn't → no chain write to update art). Any other host → null (the normal locator lane).
548
+ * pointer doesn't → no chain write to update content). Any other host → null (the normal locator lane).
407
549
  */
408
550
  deterministicImageTarget(state, token) {
409
551
  const publicBase = this.opts.storage.publicBase;
@@ -452,7 +594,7 @@ export class EffectRunner {
452
594
  lastErr = err;
453
595
  }
454
596
  if (attempt < 3)
455
- await new Promise((r) => setTimeout(r, 750 * (attempt + 1)));
597
+ await sleep(linearBackoffDelay(attempt + 1, 750));
456
598
  }
457
599
  throw new Error(`resolver unreachable at ${url} — ${lastErr?.message ?? String(lastErr)} ` +
458
600
  `(is \`abx serve\` running there?)`);
@@ -1 +1 @@
1
- {"version":3,"file":"harness.js","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAc,MAAM,WAAW,CAAC;AACpD,OAAO,EAAC,WAAW,EAAC,MAAM,MAAM,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,iBAAiB,GAMlB,MAAM,oBAAoB,CAAC;AAiG5B;;oGAEoG;AACpG,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB;;yEAEyE;AACzE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAU3C,MAAM,OAAO,YAAY;IACN,IAAI,CAAgB;IACpB,GAAG,CAAyB;IAC7C,kGAAkG;IACjF,OAAO,CAA0B;IAClD,8DAA8D;IAC7C,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtD;;;6EAGyE;IACxD,OAAO,GAAG,IAAI,GAAG,EAA0D,CAAC;IACrF,QAAQ,GAAG,KAAK,CAAC;IACjB,WAAW,GAAsB,EAAE,CAAC;IAE5C,YAAY,IAAmB;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,EAAC,OAAO,EAAE,IAAI,CAA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AC;YAC5C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,GAAG,GAAG,CAAC;YAChB,CAAC;YACD,IAAI,OAAO,GAAG,CAAC;gBAAE,MAAM,KAAK,CAAC,kBAAkB,CAAC,OAAO,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACrE,CAAC;QACD,MAAM,IAAI,KAAK,CACb,2BAA2B,GAAG,MAAO,OAAiB,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG;YACnF,mCAAmC,CACtC,CAAC;IACJ,CAAC;CACF;AAED,SAAS,QAAQ,CAAC,GAAwC;IACxD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACnC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/main.js CHANGED
@@ -1,15 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import { createPublicClient, http } from 'viem';
3
- import { loadDotEnv } from '@artblocks/abx-sdk';
2
+ import { loadDotEnv } from '@artblocks/abx-sdk/node';
3
+ import { makePublicClient, readEnv } from '@artblocks/abx-sdk';
4
4
  import { resolveBackend } from '@artblocks/abx-storage';
5
5
  import { EffectRunner } from './harness.js';
6
6
  import { renderEffect } from './render.js';
7
7
  /**
8
- * The effect runner entrypoint — the deployed, long-running form (an artist runs this
8
+ * The effect runner entrypoint — the deployed, long-running form (a creator runs this
9
9
  * beside their resolver during a drop; `docker compose` or a bare `pnpm abx-effects`).
10
10
  *
11
11
  * Config (env): ABX_RESOLVER_URL (required) · ABX_RPC_URL (recommended — augment hooks
12
- * + data-backed params need reads) · ABX_EFFECTS_PORT (default 8788) ·
12
+ * + data-backed params need reads; a comma/whitespace-separated list gets the SDK's
13
+ * fallback-transport failover across endpoints — the same primitive the CLI/indexer use via
14
+ * `resolveRpcUrls` — a single URL behaves exactly as before) · ABX_EFFECTS_PORT (default 8788) ·
13
15
  * ABX_EFFECTS_INTERVAL_MS (default 300000 — the SAFETY FLOOR: the resolver's chain watcher
14
16
  * `POST /notify` is the primary trigger; the sweep only catches a missed ping / cold start) ·
15
17
  * ABX_EFFECTS_CONCURRENCY (default 1 — parallel renders while draining) ·
@@ -28,20 +30,25 @@ import { renderEffect } from './render.js';
28
30
  */
29
31
  async function main() {
30
32
  loadDotEnv();
31
- const resolverUrl = (process.env.ABX_RESOLVER_URL ?? 'http://localhost:8787').replace(/\/$/, '');
32
- const rpc = process.env.ABX_RPC_URL;
33
- const client = rpc ? createPublicClient({ transport: http(rpc) }) : null;
33
+ const resolverUrl = (readEnv('ABX_RESOLVER_URL') ?? 'http://localhost:8787').replace(/\/$/, '');
34
+ // Unset no client (this runner tolerates that — only augment hooks + data-backed params need
35
+ // reads). Set the SDK's makePublicClient, which gives a viem `fallback` transport across every
36
+ // endpoint when the value holds more than one (comma/whitespace-separated) — a single URL is
37
+ // still just `http(url)`, identical to before. An explicit `rpcUrls` override short-circuits the
38
+ // SDK's own env resolution entirely, so this stays the ONE place ABX_RPC_URL is read.
39
+ const rpcUrl = readEnv('ABX_RPC_URL');
40
+ const client = rpcUrl ? makePublicClient({ rpcUrls: rpcUrl.split(/[\s,]+/).filter(Boolean) }) : null;
34
41
  const runner = new EffectRunner({
35
42
  resolverUrl,
36
43
  client,
37
44
  storage: resolveBackend(),
38
45
  effects: [renderEffect()],
39
- environmentId: process.env.ABX_ENVIRONMENT_ID ?? 'web:any',
46
+ environmentId: readEnv('ABX_ENVIRONMENT_ID') ?? 'web:any',
40
47
  // With a token, publish each render to the resolver's control plane (locator bridge) so a runner
41
48
  // that doesn't share the resolver's disk still lands the thumbnail. Omit ⇒ co-located shared store.
42
- adminToken: process.env.ABX_RESOLVER_ADMIN_TOKEN,
43
- concurrency: Number(process.env.ABX_EFFECTS_CONCURRENCY ?? 1),
44
- authToken: process.env.ABX_EFFECTS_TOKEN,
49
+ adminToken: readEnv('ABX_RESOLVER_ADMIN_TOKEN'),
50
+ concurrency: Number(readEnv('ABX_EFFECTS_CONCURRENCY') ?? 1),
51
+ authToken: readEnv('ABX_EFFECTS_TOKEN'),
45
52
  });
46
53
  const args = process.argv.slice(2);
47
54
  if (args[0] === '--once') {
@@ -52,10 +59,10 @@ async function main() {
52
59
  console.log(`[effects] once: ran=${stats.ran} skipped=${stats.skipped} failed=${stats.failed}`);
53
60
  return;
54
61
  }
55
- const port = Number(process.env.ABX_EFFECTS_PORT ?? 8788);
62
+ const port = Number(readEnv('ABX_EFFECTS_PORT') ?? 8788);
56
63
  // 300s: the sweep is the SAFETY FLOOR (missed ping / cold start / new project), not the trigger —
57
64
  // the resolver's chain watcher POSTs /notify the moment settled state changes.
58
- const intervalMs = Number(process.env.ABX_EFFECTS_INTERVAL_MS ?? 300_000);
65
+ const intervalMs = Number(readEnv('ABX_EFFECTS_INTERVAL_MS') ?? 300_000);
59
66
  runner.startHttp(port);
60
67
  runner.startLoop(intervalMs);
61
68
  console.log(`[effects] runner up — resolver=${resolverUrl} port=${port} sweep=${intervalMs}ms (safety floor) ` +
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,MAAM,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC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G,YAAY,CAuC9F"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,YAAY,EAAe,MAAM,cAAc,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,QAAQ,GAAE;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAM,GAAG,YAAY,CAyC9F"}
package/dist/render.js CHANGED
@@ -25,8 +25,10 @@ export function renderEffect(defaults = {}) {
25
25
  return {
26
26
  key: 'render',
27
27
  outputs: [
28
+ // `traits` is the one BOUND output (its content stitches into `attributes`); `image` and
29
+ // `print` are referenced — the producer holds those bytes and publishes a locator.
28
30
  { key: 'image', mimeType: 'image/png' },
29
- { key: 'traits', mimeType: 'application/json' },
31
+ { key: 'traits', mimeType: 'application/json', bound: true },
30
32
  { key: 'print', mimeType: 'image/png' },
31
33
  ],
32
34
  async run(ctx) {
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,YAAY,CAAC,WAAiD,EAAE;IAC9E,OAAO;QACL,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE;YACP,EAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAC;YACrC,EAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,EAAC;YAC7C,EAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAC;SACtC;QACD,KAAK,CAAC,GAAG,CAAC,GAAkB;YAC1B,MAAM,KAAK,GAAG,MAAM,CAClB,mBAAmB,CAAC,GAAG,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,QAA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AE,GAAG,EAAE,EAAE,IAAI,WAAW,sCAAsC;YACtG,kHAAkH;YAClH,0CAA0C,CAC7C,CAAC;IACJ,CAAC;IACD,+FAA+F;IAC/F,MAAM,IAAI;SACP,eAAe,CAAC,0CAA0C,EAAE,SAAS,EAAE,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC;SAC5F,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC1B,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,CAAe,CAAC;IACjE,MAAM,MAAM,GAAG,UAAU;QACvB,CAAC,CAAE,CAAC,MAAM,IAAI;aACT,QAAQ,CAAC,gFAAgF,CAAC;aAC1F,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAmB;QACzC,CAAC,CAAC,IAAI,CAAC;IACT,OAAO,EAAC,GAAG,EAAE,MAAM,EAAC,CAAC;AACvB,CAAC;AAED,oFAAoF;AACpF,KAAK,UAAU,cAAc;IAC3B,IAAI,CAAC;QACH,MAAM,EAAC,aAAa,EAAC,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACpD,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,OAAO,WAAW,CAAC,YAAY,CAA6C,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,mFAAmF;YACjF,sFAAsF,CACzF,CAAC;IACJ,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artblocks/abx-effects",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.21",
4
4
  "license": "MIT",
5
5
  "description": "ABX Self-Host Toolkit (Layer 3) — the reference effect runner. A deployed, long-running service hosting spine-subscribing effects (render first) behind one harness; stateless via inputsHash addressing. The playwright npm package is a normal (small, browserless) dependency pinned EXACTLY to the Dockerfile.effects base-image tag; browsers install only where captures run (`npx playwright install chromium`).",
6
6
  "type": "module",
@@ -13,6 +13,7 @@
13
13
  },
14
14
  "files": [
15
15
  "dist",
16
+ "CHANGELOG.md",
16
17
  "LICENSE"
17
18
  ],
18
19
  "sideEffects": false,
@@ -40,8 +41,8 @@
40
41
  "dependencies": {
41
42
  "playwright": "1.61.1",
42
43
  "viem": "^2.21.0",
43
- "@artblocks/abx-storage": "0.1.0-alpha.2",
44
- "@artblocks/abx-sdk": "0.1.0-alpha.2"
44
+ "@artblocks/abx-sdk": "0.1.0-alpha.21",
45
+ "@artblocks/abx-storage": "0.1.0-alpha.21"
45
46
  },
46
47
  "scripts": {
47
48
  "build": "tsc -b tsconfig.build.json"