Files
fusion/package.json
gsxdsm 7e3c68249e feat(dashboard): bearer-token auth with browser persistence + MIT license
Pre-release polish. Two related changes bundled because they both land the
project on public-release footing:

Dashboard auth
- fn dashboard now gates the HTTP API + terminal/badge WebSockets behind a
  bearer token by default. Token resolution order: --token flag,
  FUSION_DASHBOARD_TOKEN env, FUSION_DAEMON_TOKEN env (back-compat), or an
  auto-generated fn_<32 hex>. --no-auth disables. The startup banner prints
  a click-to-open URL with ?token=<token> embedded.
- Auth middleware now also accepts fn_token=<token> as a query-string
  fallback so EventSource and WebSocket clients (which can't set custom
  headers) still authenticate.
- setupTerminalWebSocket / setupBadgeWebSocket now refuse unauthenticated
  upgrades with a proper 401 + socket close.
- Frontend: new auth.ts module captures ?token= off the URL into
  localStorage (key fn.authToken), strips it from the visible URL via
  replaceState, and installs a window.fetch wrapper that injects
  Authorization: Bearer <token> on every same-origin /api/* request.
  EventSource/WebSocket URL builders (api.ts, sse-bus.ts, useTerminal,
  useBadgeWebSocket) route through appendTokenQuery().

MIT license
- LICENSE file at repo root.
- license: "MIT" on root package.json and every packages/*/package.json,
  plus description/bugs metadata on the CLI package.

Docs
- docs/cli-reference.md documents --token / --no-auth / FUSION_DASHBOARD_TOKEN
  and the click-to-open auth flow.
- docs/getting-started.md, docs/docker.md, README.md point at the new flow
  and the CLI reference section.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 20:12:00 -07:00

61 lines
2.6 KiB
JSON

{
"name": "fusion-workspace",
"version": "0.0.0",
"private": true,
"license": "MIT",
"homepage": "https://github.com/Runfusion/Fusion#readme",
"repository": {
"type": "git",
"url": "https://github.com/Runfusion/Fusion"
},
"bugs": {
"url": "https://github.com/Runfusion/Fusion/issues"
},
"type": "module",
"packageManager": "pnpm@10.33.0",
"scripts": {
"dev": "node scripts/dev-with-memory.mjs",
"dev:ui": "pnpm --filter @fusion/dashboard dev",
"lint": "eslint .",
"build": "pnpm -r build",
"build:exe": "pnpm build && pnpm --filter @gsxdsm/fusion build:exe",
"build:exe:all": "pnpm build && pnpm --filter @gsxdsm/fusion build:exe:all",
"test": "pnpm -r --workspace-concurrency=1 test",
"test:fast": "VITEST_MAX_WORKERS=4 pnpm -r --workspace-concurrency=2 test",
"test:isolated": "node scripts/check-test-isolation.mjs --before && pnpm test && node scripts/check-test-isolation.mjs",
"test:check-isolation": "node scripts/check-test-isolation.mjs",
"test:coverage": "pnpm -r --workspace-concurrency=1 exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:core": "pnpm --filter @fusion/core exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:engine": "pnpm --filter @fusion/engine exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:cli": "pnpm --filter @gsxdsm/fusion exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:dashboard": "pnpm --filter @fusion/dashboard exec vitest run --silent=passed-only --reporter=dot --coverage",
"typecheck": "pnpm -r typecheck",
"changeset": "changeset",
"version": "changeset version",
"release:version": "changeset version",
"mobile:build": "pnpm --filter @fusion/dashboard build && pnpm --filter @fusion/mobile cap sync",
"mobile:ios": "pnpm mobile:build && pnpm --filter @fusion/mobile cap open ios",
"mobile:android": "pnpm mobile:build && pnpm --filter @fusion/mobile cap open android",
"mobile:dev:ios": "pnpm --filter @fusion/mobile dev:ios",
"mobile:dev:android": "pnpm --filter @fusion/mobile dev:android",
"mobile:sync": "pnpm --filter @fusion/mobile cap sync",
"build:desktop": "pnpm --filter @fusion/desktop build"
},
"pnpm": {
"onlyBuiltDependencies": [
"electron",
"esbuild",
"koffi",
"protobufjs"
]
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@eslint/js": "^9.0.0",
"eslint": "^9.0.0",
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"typescript-eslint": "^8.0.0"
}
}