Adds a per-machine singleton lock that engages in
ProjectEngineManager.createAndStart() before any engine subsystems
spin up. Two fn dashboard processes can no longer run engines for the
same project on the same host — previously they would share .fusion/
state and corrupt worktrees / task rows for in-process projects.
The guard combines two independent checks:
- A proper-lockfile file at <project>/.fusion/engine.lock with
stale-lock recovery (auto-released on process death).
- A loopback listener on a hashed per-project address — UDS on
POSIX, named pipe on Windows. Stale UDS files are probed and
unlinked before a retry bind.
Failures raise EngineAlreadyRunningError. Both guards are released
from stopAll() and pauseProject(); a release on engine.start()
failure lets retries re-acquire cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
1.5 KiB
JSON
56 lines
1.5 KiB
JSON
{
|
|
"name": "@fusion/engine",
|
|
"version": "0.32.0",
|
|
"license": "MIT",
|
|
"description": "Fusion engine: executor, merger, scheduler, and automation runtime for the Fusion AI coding agent.",
|
|
"homepage": "https://github.com/Runfusion/Fusion#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Runfusion/Fusion",
|
|
"directory": "packages/engine"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/Runfusion/Fusion/issues"
|
|
},
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"source": "./src/index.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run --silent=passed-only --reporter=dot",
|
|
"test:executor": "vitest run src/__tests__/executor-*.test.ts",
|
|
"test:watch": "vitest src/__tests__/executor-*.test.ts --watch"
|
|
},
|
|
"dependencies": {
|
|
"@fusion/core": "workspace:*",
|
|
"@fusion/pi-claude-cli": "workspace:*",
|
|
"@mariozechner/pi-ai": "^0.73.0",
|
|
"@mariozechner/pi-coding-agent": "^0.73.0",
|
|
"cron-parser": "^5.5.0",
|
|
"proper-lockfile": "^4.1.2",
|
|
"typebox": "^1.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
"@types/node": "^25.5.0",
|
|
"@types/proper-lockfile": "^4.1.4",
|
|
"@vitest/coverage-v8": "^3.1.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^3.1.0"
|
|
},
|
|
"private": true
|
|
}
|