Files
Maestro/package.json
chr1syy 0c9a0dedbf Windows Enhancement and Fixes for 0.15.0-RC (#264)
* refactor: consolidate PATH building logic into shared utilities

- Add buildExpandedPath() and buildExpandedEnv() to shared/pathUtils.ts
- Refactor 5 files to use shared PATH functions, eliminating ~170 lines of duplication
- Fix Windows .NET SDK PATH issue by including dotnet installation paths
- Ensure consistent cross-platform PATH handling across CLI agents, detectors, and process managers

Files changed:
- src/shared/pathUtils.ts (added 2 functions)
- src/cli/services/agent-spawner.ts (refactored 3 functions)
- src/main/utils/cliDetection.ts (refactored 1 function)
- src/main/agent-detector.ts (refactored 1 method)
- src/main/process-manager/utils/envBuilder.ts (refactored 1 function)

* refactor: consolidate PATH building logic into shared utilities

- Add buildExpandedPath() and buildExpandedEnv() to shared/pathUtils.ts
- Refactor 5 files to use shared PATH functions, eliminating ~170 lines of duplication
- Fix Windows .NET SDK PATH issue by including dotnet installation paths
- Ensure consistent cross-platform PATH handling across CLI agents, detectors, and process managers

Files changed:
- src/shared/pathUtils.ts (added 2 functions)
- src/cli/services/agent-spawner.ts (refactored 3 functions)
- src/main/utils/cliDetection.ts (refactored 1 function)
- src/main/agent-detector.ts (refactored 1 method)
- src/main/process-manager/utils/envBuilder.ts (refactored 1 function)

* fix(windows): enable PATH access for agent processes

Remove faulty basename rewriting that prevented shell execution from working properly on Windows. Full executable paths are now passed directly to cmd.exe, allowing agents to access PATH and run commands like node -v and dotnet -h.

- Modified process.ts to keep full paths when using shell execution
- Updated ChildProcessSpawner.ts to avoid basename rewriting
- Fixes ENOENT errors when agents spawn on Windows

Resolves issue where agents couldn't execute PATH-based commands.

fix: add missing lint-staged configuration

Add lint-staged configuration to package.json to run prettier and eslint on staged TypeScript files before commits.

* fix(windows): resolve SSH path detection with CRLF line endings

Fix SSH command spawning failure on Windows by properly handling CRLF line endings from the 'where' command. The issue was that result.stdout.trim().split('\n')[0] left trailing \r characters in detected paths, causing ENOENT errors when spawning SSH processes.

Updated detectSshPath() to use split(/\r?\n/) for cross-platform line ending handling
Applied same fix to detect cloudflared and gh paths for consistency
Ensures SSH binary paths are clean of trailing whitespace/carriage returns
Resolves "spawn C:\Windows\System32\OpenSSH\ssh.exe\r ENOENT" errors when using SSH remote agents on Windows.

* fix: resolve SSH remote execution issues with stream-json and slash commands

- Fix SSH remote execution failing with stream-json input by detecting
  --input-format stream-json and sending prompts via stdin instead of
  command line arguments, preventing shell interpretation of markdown
  content (fixes GitHub issue #262)

- Add sendPromptViaStdin flag to ProcessConfig interface for explicit
  stream-json mode detection

- Implement proper image support in buildStreamJsonMessage for Claude
  Code stream-json format, parsing data URLs and including images as
  base64 content in the message

- Add file existence check in discoverSlashCommands to prevent ENOENT
  errors when agent paths are invalid

- Simplify ChildProcessSpawner stdin handling to ensure images are
  always included in stream-json messages sent via stdin

- Update stream-json message format to use proper {"type": "user_message",
  "content": [...]} structure with text and image content arrays
2026-01-31 17:38:15 -05:00

316 lines
9.5 KiB
JSON

{
"name": "maestro",
"version": "0.15.0",
"description": "Maestro hones fractured attention into focused intent.",
"main": "dist/main/index.js",
"author": {
"name": "Pedram Amini",
"email": "pedram@runmaestro.ai"
},
"license": "AGPL 3.0",
"repository": {
"type": "git",
"url": "https://github.com/pedramamini/maestro.git"
},
"bin": {
"maestro-cli": "./dist/cli/maestro-cli.js"
},
"scripts": {
"dev": "concurrently \"npm run dev:main\" \"npm run dev:renderer\"",
"dev:prod-data": "USE_PROD_DATA=1 concurrently \"npm run dev:main:prod-data\" \"npm run dev:renderer\"",
"dev:demo": "MAESTRO_DEMO_DIR=/tmp/maestro-demo npm run dev",
"dev:main": "npm run build:prompts && tsc -p tsconfig.main.json && npm run build:preload && NODE_ENV=development electron .",
"dev:main:prod-data": "npm run build:prompts && tsc -p tsconfig.main.json && npm run build:preload && NODE_ENV=development USE_PROD_DATA=1 electron .",
"dev:renderer": "vite",
"dev:web": "vite --config vite.config.web.mts",
"dev:win": "powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/start-dev.ps1",
"build": "npm run build:prompts && npm run build:main && npm run build:preload && npm run build:renderer && npm run build:web && npm run build:cli",
"build:prompts": "node scripts/generate-prompts.mjs",
"build:main": "tsc -p tsconfig.main.json",
"build:preload": "node scripts/build-preload.mjs",
"build:cli": "node scripts/build-cli.mjs",
"build:renderer": "vite build",
"build:web": "vite build --config vite.config.web.mts",
"package": "node scripts/set-version.mjs npm run build && node scripts/set-version.mjs electron-builder --mac --win --linux",
"package:mac": "node scripts/set-version.mjs npm run build && node scripts/set-version.mjs electron-builder --mac",
"package:win": "node scripts/set-version.mjs npm run build && node scripts/set-version.mjs electron-builder --win",
"package:linux": "node scripts/set-version.mjs npm run build && node scripts/set-version.mjs electron-builder --linux",
"start": "electron .",
"clean": "rm -rf dist release node_modules/.vite",
"prepare": "echo 'No prepare script'",
"postinstall": "electron-rebuild -f -w node-pty,better-sqlite3",
"lint": "tsc -p tsconfig.lint.json && tsc -p tsconfig.main.json --noEmit && tsc -p tsconfig.cli.json --noEmit",
"lint:eslint": "eslint src/",
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:e2e": "npm run build:main && npm run build:renderer && playwright test",
"test:e2e:ui": "npm run build:main && npm run build:renderer && playwright test --ui",
"test:e2e:headed": "npm run build:main && npm run build:renderer && playwright test --headed",
"test:integration": "vitest run --config vitest.integration.config.ts",
"test:integration:watch": "vitest --config vitest.integration.config.ts",
"test:performance": "vitest run --config vitest.performance.config.mts",
"refresh-speckit": "node scripts/refresh-speckit.mjs",
"refresh-openspec": "node scripts/refresh-openspec.mjs"
},
"build": {
"npmRebuild": false,
"appId": "com.maestro.app",
"productName": "Maestro",
"publish": {
"provider": "github",
"owner": "pedramamini",
"repo": "Maestro"
},
"directories": {
"output": "release",
"buildResources": "build"
},
"files": [
"dist/**/*",
"package.json"
],
"asarUnpack": [
"node_modules/node-pty/**/*",
"node_modules/better-sqlite3/**/*"
],
"mac": {
"category": "public.app-category.developer-tools",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"notarize": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64"
]
},
{
"target": "zip",
"arch": [
"x64",
"arm64"
]
}
],
"icon": "build/icon.icns",
"extraResources": [
{
"from": "dist/cli/maestro-cli.js",
"to": "maestro-cli.js"
},
{
"from": "src/prompts/speckit",
"to": "prompts/speckit"
},
{
"from": "src/prompts/openspec",
"to": "prompts/openspec"
}
]
},
"afterSign": "scripts/notarize.js",
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
},
{
"target": "portable",
"arch": [
"x64"
]
}
],
"icon": "build/icon.ico",
"extraResources": [
{
"from": "dist/cli/maestro-cli.js",
"to": "maestro-cli.js"
},
{
"from": "src/prompts/speckit",
"to": "prompts/speckit"
},
{
"from": "src/prompts/openspec",
"to": "prompts/openspec"
}
]
},
"linux": {
"target": [
"AppImage",
"deb",
"rpm"
],
"category": "Development",
"icon": "build/icon.png",
"extraResources": [
{
"from": "dist/cli/maestro-cli.js",
"to": "maestro-cli.js"
},
{
"from": "src/prompts/speckit",
"to": "prompts/speckit"
},
{
"from": "src/prompts/openspec",
"to": "prompts/openspec"
}
]
},
"deb": {
"depends": [
"libgtk-3-0",
"libnotify4",
"libnss3",
"libxss1",
"libxtst6",
"xdg-utils",
"libatspi2.0-0",
"libuuid1",
"libdrm2",
"libgbm1",
"libasound2"
]
},
"rpm": {
"depends": [
"gtk3",
"libnotify",
"nss",
"libXScrnSaver",
"(libXtst or libXtst6)",
"xdg-utils",
"at-spi2-core",
"(libuuid or libuuid1)",
"libdrm",
"mesa-libgbm",
"alsa-lib"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"artifactName": "${productName}-Setup-${version}.${ext}"
},
"portable": {
"artifactName": "${productName}-Portable-${version}.${ext}"
}
},
"dependencies": {
"@dagrejs/dagre": "^1.1.8",
"@emoji-mart/data": "^1.2.1",
"@emoji-mart/react": "^1.1.1",
"@fastify/cors": "^8.5.0",
"@fastify/rate-limit": "^9.1.0",
"@fastify/static": "^7.0.4",
"@fastify/websocket": "^9.0.0",
"@sentry/electron": "^7.5.0",
"@tanstack/react-virtual": "^3.13.13",
"@types/d3-force": "^3.0.10",
"@types/dompurify": "^3.0.5",
"adm-zip": "^0.5.16",
"ansi-to-html": "^0.7.2",
"archiver": "^7.0.1",
"better-sqlite3": "^12.5.0",
"canvas-confetti": "^1.9.4",
"chokidar": "^3.6.0",
"commander": "^14.0.2",
"d3-force": "^3.0.0",
"date-fns": "^4.1.0",
"diff": "^8.0.2",
"dompurify": "^3.3.0",
"electron-store": "^8.1.0",
"electron-updater": "^6.6.2",
"fastify": "^4.25.2",
"js-tiktoken": "^1.0.21",
"marked": "^17.0.1",
"mermaid": "^11.12.1",
"node-pty": "^1.1.0",
"qrcode": "^1.5.4",
"qrcode.react": "^4.2.0",
"react-diff-view": "^3.3.2",
"react-markdown": "^10.1.0",
"react-syntax-highlighter": "^16.1.0",
"reactflow": "^11.11.4",
"recharts": "^3.6.0",
"rehype-raw": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"ws": "^8.16.0"
},
"devDependencies": {
"@electron/notarize": "^3.1.1",
"@eslint/js": "^9.39.2",
"@playwright/test": "^1.57.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@types/adm-zip": "^0.5.7",
"@types/archiver": "^7.0.0",
"@types/better-sqlite3": "^7.6.13",
"@types/canvas-confetti": "^1.9.0",
"@types/electron-devtools-installer": "^2.2.5",
"@types/node": "^20.10.6",
"@types/qrcode": "^1.5.6",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^8.50.1",
"@typescript-eslint/parser": "^8.50.1",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/coverage-v8": "^4.0.15",
"@welldone-software/why-did-you-render": "^8.0.3",
"autoprefixer": "^10.4.16",
"baseline-browser-mapping": "^2.9.17",
"canvas": "^3.2.0",
"concurrently": "^8.2.2",
"electron": "^28.3.3",
"electron-builder": "^24.9.1",
"electron-devtools-installer": "^4.0.0",
"electron-playwright-helpers": "^2.0.1",
"electron-rebuild": "^3.2.9",
"esbuild": "^0.24.2",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"globals": "^16.5.0",
"jsdom": "^27.2.0",
"lucide-react": "^0.303.0",
"playwright": "^1.57.0",
"postcss": "^8.4.33",
"prettier": "^3.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3",
"typescript-eslint": "^8.50.1",
"vite": "^5.0.11",
"vite-plugin-electron": "^0.28.2",
"vitest": "^4.0.15"
},
"engines": {
"node": ">=22.0.0"
},
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix"
]
}
}