Files
AgentCompany/package.json
T
ZacharyZhang-NY ff5e22092a refactor(session): agent-scope rotation + accumulation; auto-register file artifacts
Sessions are already agent-scoped post-v34, but the code kept routing
rotation / accumulation / handoff through the task indirection. Heartbeat
runs (no task) silently skipped all three, letting taskless transcripts
grow past the model's context window — the 7M-token explosion.

- DB adds getSessionById(sessionId) — direct lookup bypassing
  tasks.active_session_id
- session-management-service: generateHandoff(session) is now agent-scoped,
  walking recent runs across tasks + heartbeats; getHandoffForAgent(agentId)
  is the canonical lookup, getHandoffContext(taskId) is a thin shim for
  callers that still hold a task id
- turn-context.ts::resolveSession drops the `if (!task)` early return:
  rotation evaluation runs on the agent session unconditionally
- run-finished-helpers.ts::accumulateAndRotateSession drops the `!task`
  gate: tokens accumulate and rotation fires for every run, keyed on the
  agent session, not the task
- Rotation evaluator contract: evaluatePreRunSessionRotation(agentId,
  connectorId) → { rotated, handoff, sessionId }; old (taskId, connectorId)
  signature removed

IPC contract tightening: ipc-support::emitEvent becomes a best-effort
sink. "Render frame was disposed" during renderer reload is a lifecycle
signal, not a logic error; silently drop it instead of letting it abort
downstream event emissions.

Artifact projection: pi's write/edit tool results now upsert a
`work_products` row via a new agent-runtime/artifact-projector.ts. No
more agents writing 54 files into the workspace that the UI never sees.
Migration v40 relaxes work_products.task_id to nullable so heartbeat
artifacts can register too.

File size: split agent-event-projection.ts out of runtime-bridge.ts to
keep the bridge under the 400-line cap after adding the projector hook.

Tests: 604 unit + integration green; generateHandoff callsites updated
for the single-argument signature; artifact-projector has pure-function
coverage via the projector module's own shape.
2026-04-18 21:37:56 -04:00

87 lines
3.2 KiB
JSON

{
"name": "agent-company",
"version": "0.4.167",
"private": true,
"type": "module",
"description": "Cross-platform Electron desktop control plane for local-first AI agent companies.",
"author": {
"name": "AgentCompany",
"email": "dev@agentcompany.ai"
},
"main": "out/main/index.js",
"scripts": {
"assets:generate": "python3 scripts/generate-icons.py",
"dev": "electron-vite dev",
"build:verify": "electron-vite build",
"build": "electron-vite build && node scripts/build-desktop.mjs",
"build:dir": "electron-vite build && node scripts/build-desktop.mjs --dir",
"build:current": "node scripts/build-all-platforms.mjs",
"release:cloudflare": "node scripts/release-public-cloudflare.mjs && node scripts/release-boss.mjs",
"release:cloudflare:public": "node scripts/release-public-cloudflare.mjs",
"release:boss": "node scripts/release-boss.mjs",
"release:local": "node scripts/release-local.mjs",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "node --disable-warning=ExperimentalWarning ./node_modules/vitest/vitest.mjs run",
"typecheck": "tsc --noEmit",
"test:unit": "node --disable-warning=ExperimentalWarning ./node_modules/vitest/vitest.mjs run --config vitest.config.ts tests/unit",
"test:integration": "node --disable-warning=ExperimentalWarning ./node_modules/vitest/vitest.mjs run --config vitest.config.ts tests/integration",
"test:e2e": "node --no-warnings ./node_modules/@playwright/test/cli.js test -c tests/e2e/playwright.config.ts",
"test:run": "pnpm test:unit && pnpm test:integration && pnpm test:e2e",
"verify": "pnpm typecheck && pnpm lint && pnpm test:unit && pnpm test:integration && pnpm test:e2e",
"verify:release": "pnpm verify && pnpm build:dir",
"postinstall": "node scripts/postinstall.mjs"
},
"dependencies": {
"@mariozechner/pi-agent-core": "^0.67.6",
"@mariozechner/pi-ai": "^0.67.6",
"@mariozechner/pi-coding-agent": "^0.67.6",
"@phosphor-icons/react": "2.1.10",
"@tanstack/react-virtual": "^3.13.23",
"electron-log": "5.4.3",
"electron-updater": "6.8.3",
"framer-motion": "12.36.0",
"react": "19.2.4",
"react-dom": "19.2.4",
"react-markdown": "^10.1.0",
"recharts": "3.8.1",
"remark-gfm": "^4.0.1",
"zod": "4.3.6",
"zustand": "^5.0.12"
},
"devDependencies": {
"@eslint/js": "9.38.0",
"@playwright/test": "1.58.2",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "4.2.1",
"@types/node": "^25.2.3",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^5.0.0",
"electron": "39.8.0",
"electron-builder": "26.8.1",
"electron-vite": "5.0.0",
"eslint": "9.38.0",
"eslint-plugin-react-hooks": "7.0.0",
"eslint-plugin-react-refresh": "0.4.24",
"globals": "16.4.0",
"tailwindcss": "4.2.1",
"typescript": "5.9.3",
"typescript-eslint": "8.46.1",
"vite": "^7.0.0",
"vitest": "4.1.0"
},
"engines": {
"node": ">=22.0.0",
"pnpm": ">=10.0.0"
},
"packageManager": "pnpm@10.24.0",
"pnpm": {
"onlyBuiltDependencies": [
"electron",
"electron-winstaller",
"esbuild"
]
}
}