Files
dohooo__helmor/cloud/package.json
Caspian Zhao 339c532bdf fix(team-cloud): bundle the provisioning toolkit so release builds can create teams (P1-1a)
A release install could never create a team — three independent dead ends:
cloud/scripts wasn't bundled, \`bun\` was spawned by bare name (Finder PATH has
none), and wrangler was never locatable (the "Rust passes HELMOR_WRANGLER_BIN"
comment was a lie). The error then pointed at the Advanced-setup panel R5-A
deleted — an infinite loop with no exit.

- stage-vendor: new team-cloud lane (release-gated like cursor-worker) stages
  vendor/team-cloud/ = prebuilt provision-team.mjs + team-containers.mjs
  (bun build --target=node), wrangler.toml + schema.sql + Worker src, and a
  PRUNED wrangler node_modules (keep-the-JS-drop-the-payloads: workerd binary
  ×2 + sharp/@img removed; 189MB → 67MB, every provision verb validated green
  — evidence in .agent-contexts/team-cloud-round6/class1-findings.md F1).
  Integrity asserts fail the build if any provisioning file is missing, the
  prune regressed, a wrong-arch esbuild slipped in, or the pruned tree stops
  loading (wrangler --version smoke).
- commands/team_cloud: new tooling module resolves script + runtime — dev:
  repo .ts under PATH bun (unchanged); release: staged .mjs under the vendored
  Node (zero PATH dependency). Truthful errors, no more Advanced-setup ghost.
- provision-team.ts/team-containers.ts: wrangler self-resolved next to the
  script and run under process.execPath (the .bin shim's \`env node\` shebang
  can't work from Finder); wrangler cwd moved to a writable temp dir (release
  payload lives in read-only Resources); schema path made absolute; login
  detection fixed to parse whoami OUTPUT (wrangler 4.100 exits 0 when logged
  out, so fresh machines never got the browser login).
- create-flow: error phase gains Copy details next to Try again.
- cloud/scripts now typechecked (tsc -p scripts, node types only) via cloud's
  typecheck chain; bun-only local-docker-team.ts stays excluded by design.
2026-07-10 15:40:53 -07:00

27 lines
866 B
JSON

{
"name": "@helmor/cloud",
"description": "Helmor Team Cloud Sandbox — Cloudflare Worker control plane (Phase 0).",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "wrangler dev",
"dev:docker": "bun run scripts/local-docker-team.ts",
"build:docker:local": "docker buildx build --platform ${HELMOR_LOCAL_TEAM_PLATFORM:-linux/arm64} -f Dockerfile.local --target runtime -t ${HELMOR_LOCAL_TEAM_IMAGE:-helmor-team-local:dev} --load ..",
"deploy": "wrangler deploy",
"typecheck": "tsc --noEmit && tsc -p scripts --noEmit",
"test": "vitest run"
},
"dependencies": {
"@cloudflare/sandbox": "0.12.1"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.16.15",
"@cloudflare/workers-types": "^4.20260609.0",
"@types/node": "^24",
"typescript": "^5.7.0",
"vitest": "^4.1.8",
"wrangler": "^4.0.0"
}
}