You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo was carved from the TOON monorepo's docker/ aggregator (see CLAUDE.md and README.md) and still ships the build contexts for every other image in the monorepo. The repo's sole purpose is to build the Arweave DVM container from Dockerfile.dvm over src/entrypoint-dvm.ts.
src/ holds entrypoints for other services plus their tests and helpers.
src/entrypoint-dvm.ts has ZERO relative imports (verified: grep -nE "from '\.|require\(" src/entrypoint-dvm.ts finds nothing relative). Every helper it uses — createJobCounter, createTurboAdapter, formatWincAsBytes, arweaveAddressFromJwk, applyEnvOverlay, config parsing — is inlined in the file itself. It imports only npm packages (@toon-protocol/{sdk,core}, hono, @hono/node-server, node:*, lazy @ardrive/turbo-sdk, arweave). Therefore there are no in-repo "shared helper" source files the DVM depends on. In particular src/shared.ts is imported only by src/entrypoint-sdk.ts, and src/attestation-server.ts is a separate supervisord-managed process (its own doc comment says so) never referenced by the DVM.
src/entrypoint-dvm.test.ts imports only ./entrypoint-dvm.js (relative) + npm packages, so it travels with the DVM entrypoint.
esbuild.config.mjs currently has three entryPoints: entrypoint-sdk.ts, attestation-server.ts, entrypoint-dvm.ts — two of which are being deleted, so this file must be edited (not deleted).
package.jsonmain/start point at dist/entrypoint-sdk.js (deleted entrypoint) and it lists deps used only by deleted entrypoints — so it must be edited.
Scope
DELETE — non-dvm Dockerfiles
Dockerfile.agent-runtime-patched
Dockerfile.akash-anvil
Dockerfile.akash-solana
Dockerfile.akash-solana-explorer
Dockerfile.mill
Dockerfile.nix
Dockerfile.oyster
Dockerfile.sdk-e2e
Dockerfile.toon-client
Dockerfile.town
Dockerfile.townhouse-api
DELETE — non-dvm src files (entrypoints, their tests, helpers)
package.json — remove main/start pointing at dist/entrypoint-sdk.js; prune dependencies now used only by deleted entrypoints. Keep at minimum the deps entrypoint-dvm.ts actually imports: @toon-protocol/sdk, @toon-protocol/core, hono, @hono/node-server; plus @ardrive/turbo-sdk + arweave which the entrypoint dynamically imports. Leave private: true.
esbuild.config.mjs — reduce entryPoints to just src/entrypoint-dvm.ts; trim the external list / comments that only existed for the deleted entrypoints (keep the externals the DVM bundle needs).
tsconfig.json, vitest.config.ts, .gitignore
KEEP — docs
README.md, CLAUDE.md — update the "still contains the other images' build contexts" follow-up note to reflect that the trim is done.
Out of scope
Do NOT rewrite Dockerfile.dvm's COPY graph. It still references monorepo paths that do not exist in this repo (packages/*, examples/*, docker/, patches/, pnpm-workspace.yaml, pnpm-lock.yaml). Fixing the Dockerfile to build standalone is a separate follow-up (tracked alongside the image-publish workflow in CLAUDE.md). This issue only removes the other images' contexts.
Do NOT add the image-publish workflow (separate issue).
Do NOT change src/entrypoint-dvm.ts logic.
Do NOT repin or upgrade dependency versions beyond removing now-unused entries.
Acceptance criteria
All 11 non-dvm Dockerfiles listed above are removed; Dockerfile.dvm remains.
All non-dvm src/ files listed above are removed; only src/entrypoint-dvm.ts and src/entrypoint-dvm.test.ts remain under src/.
supervisord.conf, configs/, dev-fixtures/, akash-ator-probe/, townhouse-ator-sidecar/, docker-compose-oyster.yml are removed.
esbuild.config.mjs lists exactly one entry point: src/entrypoint-dvm.ts.
package.json contains no main/start/script reference to any deleted file (no entrypoint-sdk), and no dependency that is no longer imported by src/entrypoint-dvm.ts.
A grep -rn over kept files (excluding .git, node_modules) finds no remaining references to any deleted file/dir name in package.json, esbuild.config.mjs, Dockerfile.dvm, README.md, CLAUDE.md, or other kept files — i.e. no supervisord, attestation-server, entrypoint-sdk, entrypoint-mill, entrypoint-town, entrypoint-toon-client, entrypoint-townhouse-api, configs/, dev-fixtures, akash-ator-probe, townhouse-ator-sidecar.
pnpm install && pnpm build succeeds and emits dist/entrypoint-dvm.js (and only DVM output).
pnpm test (vitest) passes — only src/entrypoint-dvm.test.ts runs.
Implementation notes
Import trace (the load-bearing finding):src/entrypoint-dvm.ts is fully self-contained — grep -nE "from '\\.|require\\(" src/entrypoint-dvm.ts returns nothing relative. So nothing in src/ (no shared.ts, no helpers) needs to be preserved as a "shared helper." The CLAUDE.md phrase "keep shared helpers" resolves, in this repo, to "no separate helper files exist — they're inlined into the entrypoint."
Files that must be EDITED, not deleted (deleting them breaks the build): package.json, esbuild.config.mjs.
Pre-existing breakage to be aware of (NOT introduced by this task, NOT to be fixed here):
tsconfig.json does "extends": "../tsconfig.json", which is absent in this standalone repo. pnpm typecheck (tsc --noEmit) may already fail for that reason — do not treat a pre-existing typecheck failure as caused by this change. The build script uses esbuild (no typecheck), so pnpm build is the meaningful gate.
Dockerfile.dvm cannot docker build standalone today (missing monorepo COPY paths). Hence docker build -f Dockerfile.dvm is intentionally NOT an acceptance criterion for this issue — it is deferred to the Dockerfile-standalone follow-up.
Validation commands:
git rm <each deleted path> # use git rm so history is clean
pnpm install
pnpm build # must emit dist/entrypoint-dvm.js only
pnpm test # vitest: only entrypoint-dvm.test.ts
# reference sweep over kept files:
grep -rnE 'entrypoint-(sdk|mill|town|toon-client|townhouse-api)|attestation-server|supervisord|configs/|dev-fixtures|akash-ator-probe|townhouse-ator-sidecar' \
--include='*.json' --include='*.mjs' --include='*.ts' --include='Dockerfile*' --include='*.md' . \
| grep -v node_modules
# (should return nothing in KEPT files)
Gotcha:package.json currently lists deps (@toon-protocol/{client,connector,mill,relay,bls}, fastify, @fastify/cors, ajv, ajv-formats, nostr-tools, viem, ws, bs58, @noble/curves, @noble/curves) that were used by the now-deleted entrypoints. Cross-check each against src/entrypoint-dvm.ts's actual imports before removing; when uncertain whether a dep is a transitive runtime need of the bundle, prefer keeping it over breaking the build (the acceptance gate is "build + test pass," not "minimal dep set"). The DVM test (entrypoint-dvm.test.ts) vi.mocks @toon-protocol/sdk and @toon-protocol/pet-dvm; mocks don't require the package to be installed, so a missing @toon-protocol/pet-dvm won't fail vitest — confirm pnpm test still passes after pruning.
Context
This repo was carved from the TOON monorepo's
docker/aggregator (seeCLAUDE.mdandREADME.md) and still ships the build contexts for every other image in the monorepo. The repo's sole purpose is to build the Arweave DVM container fromDockerfile.dvmoversrc/entrypoint-dvm.ts.Grounding facts from the current tree:
Dockerfile.agent-runtime-patched,Dockerfile.akash-anvil,Dockerfile.akash-solana,Dockerfile.akash-solana-explorer,Dockerfile.mill,Dockerfile.nix,Dockerfile.oyster,Dockerfile.sdk-e2e,Dockerfile.toon-client,Dockerfile.town,Dockerfile.townhouse-api.src/holds entrypoints for other services plus their tests and helpers.src/entrypoint-dvm.tshas ZERO relative imports (verified:grep -nE "from '\.|require\(" src/entrypoint-dvm.tsfinds nothing relative). Every helper it uses —createJobCounter,createTurboAdapter,formatWincAsBytes,arweaveAddressFromJwk,applyEnvOverlay, config parsing — is inlined in the file itself. It imports only npm packages (@toon-protocol/{sdk,core},hono,@hono/node-server,node:*, lazy@ardrive/turbo-sdk,arweave). Therefore there are no in-repo "shared helper" source files the DVM depends on. In particularsrc/shared.tsis imported only bysrc/entrypoint-sdk.ts, andsrc/attestation-server.tsis a separate supervisord-managed process (its own doc comment says so) never referenced by the DVM.src/entrypoint-dvm.test.tsimports only./entrypoint-dvm.js(relative) + npm packages, so it travels with the DVM entrypoint.esbuild.config.mjscurrently has threeentryPoints:entrypoint-sdk.ts,attestation-server.ts,entrypoint-dvm.ts— two of which are being deleted, so this file must be edited (not deleted).package.jsonmain/startpoint atdist/entrypoint-sdk.js(deleted entrypoint) and it lists deps used only by deleted entrypoints — so it must be edited.Scope
DELETE — non-dvm Dockerfiles
Dockerfile.agent-runtime-patchedDockerfile.akash-anvilDockerfile.akash-solanaDockerfile.akash-solana-explorerDockerfile.millDockerfile.nixDockerfile.oysterDockerfile.sdk-e2eDockerfile.toon-clientDockerfile.townDockerfile.townhouse-apiDELETE — non-dvm src files (entrypoints, their tests, helpers)
src/entrypoint-sdk.tssrc/entrypoint-mill.ts,src/entrypoint-mill.test.tssrc/entrypoint-toon-client.ts,src/entrypoint-toon-client.test.ts,src/entrypoint-toon-client-helpers.tssrc/entrypoint-town.tssrc/entrypoint-townhouse-api.tssrc/shared.ts,src/shared.test.ts(imported only byentrypoint-sdk.ts)src/attestation-server.ts,src/attestation-server.test.ts(separate supervisord process; not used by the DVM)DELETE — non-dvm build-context dirs & files
supervisord.conf(only referenced by deletedattestation-server.ts+ the akash/oyster/nix/sdk-e2e Dockerfiles)configs/(townhouse-dev-connector.yaml,townhouse-hs-connector.yaml)dev-fixtures/(README + the three mill config fixtures)akash-ator-probe/(Dockerfile, checksums.txt, entrypoint.sh)townhouse-ator-sidecar/(Dockerfile, checksums.txt, entrypoint.sh)docker-compose-oyster.ymlKEEP — dvm sources
Dockerfile.dvmsrc/entrypoint-dvm.tssrc/entrypoint-dvm.test.tsKEEP — repo infra (edit, do not delete)
package.json— removemain/startpointing atdist/entrypoint-sdk.js; prune dependencies now used only by deleted entrypoints. Keep at minimum the depsentrypoint-dvm.tsactually imports:@toon-protocol/sdk,@toon-protocol/core,hono,@hono/node-server; plus@ardrive/turbo-sdk+arweavewhich the entrypoint dynamically imports. Leaveprivate: true.esbuild.config.mjs— reduceentryPointsto justsrc/entrypoint-dvm.ts; trim theexternallist / comments that only existed for the deleted entrypoints (keep the externals the DVM bundle needs).tsconfig.json,vitest.config.ts,.gitignoreKEEP — docs
README.md,CLAUDE.md— update the "still contains the other images' build contexts" follow-up note to reflect that the trim is done.Out of scope
Dockerfile.dvm'sCOPYgraph. It still references monorepo paths that do not exist in this repo (packages/*,examples/*,docker/,patches/,pnpm-workspace.yaml,pnpm-lock.yaml). Fixing the Dockerfile to build standalone is a separate follow-up (tracked alongside the image-publish workflow inCLAUDE.md). This issue only removes the other images' contexts.src/entrypoint-dvm.tslogic.Acceptance criteria
Dockerfile.dvmremains.src/files listed above are removed; onlysrc/entrypoint-dvm.tsandsrc/entrypoint-dvm.test.tsremain undersrc/.supervisord.conf,configs/,dev-fixtures/,akash-ator-probe/,townhouse-ator-sidecar/,docker-compose-oyster.ymlare removed.esbuild.config.mjslists exactly one entry point:src/entrypoint-dvm.ts.package.jsoncontains nomain/start/script reference to any deleted file (noentrypoint-sdk), and no dependency that is no longer imported bysrc/entrypoint-dvm.ts.grep -rnover kept files (excluding.git,node_modules) finds no remaining references to any deleted file/dir name inpackage.json,esbuild.config.mjs,Dockerfile.dvm,README.md,CLAUDE.md, or other kept files — i.e. nosupervisord,attestation-server,entrypoint-sdk,entrypoint-mill,entrypoint-town,entrypoint-toon-client,entrypoint-townhouse-api,configs/,dev-fixtures,akash-ator-probe,townhouse-ator-sidecar.pnpm install && pnpm buildsucceeds and emitsdist/entrypoint-dvm.js(and only DVM output).pnpm test(vitest) passes — onlysrc/entrypoint-dvm.test.tsruns.Implementation notes
Import trace (the load-bearing finding):
src/entrypoint-dvm.tsis fully self-contained —grep -nE "from '\\.|require\\(" src/entrypoint-dvm.tsreturns nothing relative. So nothing insrc/(noshared.ts, no helpers) needs to be preserved as a "shared helper." The CLAUDE.md phrase "keep shared helpers" resolves, in this repo, to "no separate helper files exist — they're inlined into the entrypoint."Files that must be EDITED, not deleted (deleting them breaks the build):
package.json,esbuild.config.mjs.Pre-existing breakage to be aware of (NOT introduced by this task, NOT to be fixed here):
tsconfig.jsondoes"extends": "../tsconfig.json", which is absent in this standalone repo.pnpm typecheck(tsc --noEmit) may already fail for that reason — do not treat a pre-existing typecheck failure as caused by this change. Thebuildscript uses esbuild (no typecheck), sopnpm buildis the meaningful gate.Dockerfile.dvmcannotdocker buildstandalone today (missing monorepo COPY paths). Hencedocker build -f Dockerfile.dvmis intentionally NOT an acceptance criterion for this issue — it is deferred to the Dockerfile-standalone follow-up.Validation commands:
Gotcha:
package.jsoncurrently lists deps (@toon-protocol/{client,connector,mill,relay,bls},fastify,@fastify/cors,ajv,ajv-formats,nostr-tools,viem,ws,bs58,@noble/curves,@noble/curves) that were used by the now-deleted entrypoints. Cross-check each againstsrc/entrypoint-dvm.ts's actual imports before removing; when uncertain whether a dep is a transitive runtime need of the bundle, prefer keeping it over breaking the build (the acceptance gate is "build + test pass," not "minimal dep set"). The DVM test (entrypoint-dvm.test.ts)vi.mocks@toon-protocol/sdkand@toon-protocol/pet-dvm; mocks don't require the package to be installed, so a missing@toon-protocol/pet-dvmwon't fail vitest — confirmpnpm teststill passes after pruning.