Files
stack/packages/mosaic/package.json
ms-856-build 1e6937c488
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
fix(framework): install deps on worktree bootstrap + legible deps-preflight at gate seam (#856)
Worker git-worktrees under a fresh `git worktree add` have empty
node_modules/.bin (pnpm workspaces do not share node_modules across
worktrees), so every gate binary (tsc/eslint/prettier/vitest) fails with
a raw `sh: 1: <tool>: not found` before the QA gate suite ever runs a
real check. That failure is indistinguishable from a genuine test/lint
failure -- a false-red gate that was responsible for 131/147 fleet
tool-errors.

- plugins/mosaic-framework/src/index.ts: the injected "Git Worktree
  Requirement" instructions now direct every worker to run
  `pnpm install --frozen-lockfile --prefer-offline` immediately after
  `git worktree add`/`cd`, before any gate is invoked.
- packages/mosaic/framework/tools/qa/qa-hook-stdin.sh: the common
  gate-entry seam (registered as the PostToolUse hook for every
  Edit/Write/MultiEdit in runtime/claude/settings.json) now preflights
  node_modules/.bin presence for JS/TS files and fails with an explicit
  "deps not installed -- run pnpm install" sentinel instead of silently
  letting a raw not-found surface downstream.
- packages/mosaic/framework/tools/qa/test-deps-preflight.sh: new
  regression harness (wired into test:framework-shell) covering missing
  node_modules/.bin, empty node_modules/.bin, populated node_modules/.bin,
  and non-JS/TS skip behavior.

Closes #856.
2026-07-20 04:16:30 -05:00

72 lines
2.6 KiB
JSON

{
"name": "@mosaicstack/mosaic",
"version": "0.0.48",
"repository": {
"type": "git",
"url": "https://git.mosaicstack.dev/mosaicstack/stack.git",
"directory": "packages/mosaic"
},
"description": "Mosaic agent framework — installation wizard and meta package",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"mosaic": "dist/cli.js",
"mosaic-wizard": "dist/index.js"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"lint": "eslint src",
"typecheck": "tsc --noEmit",
"test": "vitest run --passWithNoTests && pnpm run test:framework-shell",
"test:framework-shell": "python3 src/lease-broker/daemon_deadline_unittest.py && python3 src/lease-broker/normative_fragments_unittest.py && python3 src/lease-broker/receipt_challenge_unittest.py && python3 src/lease-broker/context_recovery_unittest.py && python3 src/lease-broker/recovery_runtime_unittest.py && python3 src/lease-broker/recovery_b1_adversarial_unittest.py && python3 src/lease-broker/framework_skill_portability_unittest.py && python3 src/mutator-gate/runtime_tools_unittest.py && python3 src/mutator-gate/runtime_launch_guard_unittest.py && python3 framework/tools/lease-broker/check-runtime-launches.py --root ../.. && bash framework/tools/codex/test-pr-diff-context.sh && bash framework/tools/qa/test-deps-preflight.sh"
},
"dependencies": {
"@mosaicstack/brain": "workspace:*",
"@mosaicstack/config": "workspace:*",
"@mosaicstack/db": "workspace:*",
"@mosaicstack/forge": "workspace:*",
"@mosaicstack/log": "workspace:*",
"@mosaicstack/macp": "workspace:*",
"@mosaicstack/memory": "workspace:*",
"@mosaicstack/prdy": "workspace:*",
"@mosaicstack/quality-rails": "workspace:*",
"@mosaicstack/queue": "workspace:*",
"@mosaicstack/storage": "workspace:*",
"@mosaicstack/types": "workspace:*",
"@clack/prompts": "^0.9.1",
"commander": "^13.0.0",
"ink": "^5.0.0",
"ink-spinner": "^5.0.0",
"ink-text-input": "^6.0.0",
"picocolors": "^1.1.1",
"react": "^18.3.0",
"socket.io-client": "^4.8.0",
"yaml": "^2.6.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^2.0.0",
"@types/react": "^18.3.0",
"tsx": "^4.0.0",
"typescript": "^5.8.0",
"vitest": "^2.0.0"
},
"publishConfig": {
"registry": "https://git.mosaicstack.dev/api/packages/mosaicstack/npm/",
"access": "public"
},
"files": [
"dist",
"framework"
],
"license": "MIT"
}