Files
sigil/package.json
xiaoju 3709fae5e1 fix: /run/{name} → 302 redirect, bypass CF same-zone fetch limitation
CF Workers cannot fetch() other workers on the same .workers.dev zone.
This caused all /run/{name} routes to return Cloudflare's HTML 404
instead of proxying to the sub-worker.

Fix: replace inline fetch() proxy with a redirect-based approach:
- Default (browser/curl): 302 redirect to sub-worker URL
- Accept: application/json: return JSON with {url, capability, cold_start}

LRU bookkeeping (page-in, access count) still happens in Sigil before
the redirect, so cold capabilities are warmed up transparently.

New backend method: resolveInvoke() — same LRU/page-in logic as invoke()
but returns route info instead of executing the subrequest.

Fixes: https://sigil.shazhou.workers.dev/run/* returning CF 404
Reported-by: 小墨 🖊️
2026-04-03 09:15:58 +00:00

23 lines
582 B
JSON

{
"name": "sigil",
"version": "0.1.0",
"description": "Capability registry for Uncaged — LRU-managed Cloudflare Workers",
"private": true,
"scripts": {
"dev": "wrangler dev",
"build": "wrangler deploy --dry-run --outdir dist",
"deploy": "wrangler deploy",
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240405.0",
"pnpm": "^10.33.0",
"typescript": "^5.4.5",
"vitest": "^1.5.0",
"wrangler": "^4.80.0"
}
}