Context
The production Worker treats *.wal.app targets as plain HTTP through the portal — it sets mode: 'walrus' and scrapes x-walrus-* response headers (apps/api/src/worker.ts ~2462/2554) but never reads the on-chain Site object. The real, verifiable enumeration already exists in packages/walrus/src/resources.ts listWalrusResources(site), which reads each resource's blob_id from the Sui Site object (~line 103) using a WalrusSiteContext from resolve.ts — but it is Node-only (CLI materializeWalrusSite) and not used in the hosted crawl. So Walrus-native sites are crawled by HTML link-guessing instead of their authoritative on-chain manifest.
Goal / user story
As a user pointing ContextMEM at a Walrus Site (a .wal.app URL, SuiNS name, or 0x site object id), I want it to enumerate the site's resources and blobIds directly from the on-chain Site object, so extraction is complete and provenance is verifiable rather than guessed from anchors.
Acceptance criteria
Implementation notes
- Reuse
packages/walrus/src/resolve.ts (resolveWalrusTarget) + resources.ts (listWalrusResources) from the Worker walrus branch, or port a Worker-safe variant.
- SPIKE first: confirm
@mysten/sui/grpc SuiGrpcClient.getObject runs in the Worker under nodejs_compat (the roadmap notes proof.ts/history.ts/resolve.ts already use it for reads, but they run in Node today). resources.ts uses node:buffer — verify under nodejs_compat.
- Touch
apps/api/src/worker.ts (walrus branch dispatch), wire WalrusResourceRecord[] into the existing SiteStructureInput.walrus.resources seam, and reuse aggregatorUrl from the resolved context.
- Gotchas: large sites need a resource cap/concurrency limit; aggregator fetch sizes must respect the Worker's existing 1.5MB guard; non-HTML resources (assets) should be enumerated but not chunked.
Sui Overflow angle
This is the uniquely Sui-native crawl: reading content straight from on-chain Walrus Site objects and Walrus blobs gives verifiable, tamper-evident provenance no traditional crawler can match. Paired with the chunkGraphDigest-keyed extract receipt, it tells a complete on-chain provenance story — the most differentiated thing to demo at a Sui hackathon.
Dependencies
Spike: @mysten/sui/grpc (SuiGrpcClient) in the Cloudflare Worker (shared with the on-chain receipt work). Coordinates with, but is not blocked by, the on-chain attribution-receipt issue.
Part of the ContextMEM roadmap (#4) • Sui Overflow build.
Context
The production Worker treats
*.wal.apptargets as plain HTTP through the portal — it setsmode: 'walrus'and scrapesx-walrus-*response headers (apps/api/src/worker.ts~2462/2554) but never reads the on-chain Site object. The real, verifiable enumeration already exists inpackages/walrus/src/resources.tslistWalrusResources(site), which reads each resource'sblob_idfrom the Sui Site object (~line 103) using aWalrusSiteContextfromresolve.ts— but it is Node-only (CLImaterializeWalrusSite) and not used in the hosted crawl. So Walrus-native sites are crawled by HTML link-guessing instead of their authoritative on-chain manifest.Goal / user story
As a user pointing ContextMEM at a Walrus Site (a
.wal.appURL, SuiNS name, or0xsite object id), I want it to enumerate the site's resources and blobIds directly from the on-chain Site object, so extraction is complete and provenance is verifiable rather than guessed from anchors.Acceptance criteria
WalrusSiteContextand enumerates resource paths + blobIds from the on-chain Site object (not HTML link discovery).quilt.tsblobAggregatorEndpoint) and mapped into manifest pages/resources carryingsource.blobId/resourcePath.buildSiteStructure(packages/core/src/site-structure.ts) populates its existing Walrus Provenance group frominput.walrus.resourcesfor these runs.FactSourceRefprovenance so the "why" links resolve to on-chain blobs.Implementation notes
packages/walrus/src/resolve.ts(resolveWalrusTarget) +resources.ts(listWalrusResources) from the Worker walrus branch, or port a Worker-safe variant.@mysten/sui/grpcSuiGrpcClient.getObjectruns in the Worker undernodejs_compat(the roadmap notesproof.ts/history.ts/resolve.tsalready use it for reads, but they run in Node today).resources.tsusesnode:buffer— verify undernodejs_compat.apps/api/src/worker.ts(walrus branch dispatch), wireWalrusResourceRecord[]into the existingSiteStructureInput.walrus.resourcesseam, and reuseaggregatorUrlfrom the resolved context.Sui Overflow angle
This is the uniquely Sui-native crawl: reading content straight from on-chain Walrus Site objects and Walrus blobs gives verifiable, tamper-evident provenance no traditional crawler can match. Paired with the
chunkGraphDigest-keyed extract receipt, it tells a complete on-chain provenance story — the most differentiated thing to demo at a Sui hackathon.Dependencies
Spike:
@mysten/sui/grpc(SuiGrpcClient) in the Cloudflare Worker (shared with the on-chain receipt work). Coordinates with, but is not blocked by, the on-chain attribution-receipt issue.Part of the ContextMEM roadmap (#4) • Sui Overflow build.