mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
Review on #20379, finding 4 (Medium). Three portability defects in the visual verification harness: - `FORCE_COLOR=3 COLORTERM=truecolor tsx ...` POSIX env assignment does not work under the Windows npm command shell. The script is now a plain Node launcher (scripts/visual/run.mjs) that sets the env itself and spawns tsx via require.resolve('tsx/cli') — no cross-env, no shell syntax. - Hardcoded /tmp/tui-visual.{html,png} resolve to a drive-root path like C:\tmp on native Windows (and fail when that directory doesn't exist). Both scripts now derive the output directory from a shared paths.mjs helper: os.tmpdir()/hermes-tui-visual (created recursively; HERMES_TUI_VISUAL_DIR overrides for CI or side-by-side runs). - electron was undeclared by ui-tui and only worked via hoisting luck. The launcher now resolves it EXPLICITLY from the install tree the desktop workspace already provides (require('electron') in plain Node returns the binary path), with an ELECTRON_BIN override and a clear error pointing at the repo-root install when it's absent — instead of declaring a second ~100MB dependency on a TUI workspace for a dev-only harness. Also fixes the trailing-whitespace line in render.tsx that `git diff --check` flags. Verified end-to-end: render writes the HTML scene sheet and the electron shot step produces the screenshot from the tmpdir path; the missing-electron error path prints the guidance message.
50 lines
1.5 KiB
JSON
50 lines
1.5 KiB
JSON
{
|
|
"name": "hermes-tui",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "npm run build:ink && tsx --watch src/entry.tsx",
|
|
"start": "tsx src/entry.tsx",
|
|
"build": "node scripts/build.mjs",
|
|
"build:ink": "npm run build --prefix packages/hermes-ink",
|
|
"visual": "node scripts/visual/run.mjs",
|
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
"lint": "eslint src/ packages/",
|
|
"lint:fix": "eslint src/ packages/ --fix",
|
|
"fmt": "prettier --write 'src/**/*.{ts,tsx}' 'packages/**/*.{ts,tsx}'",
|
|
"fix": "npm run lint:fix && npm run fmt",
|
|
"check": "npm run build:ink && npm run typecheck && npm run test",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@hermes/ink": "file:./packages/hermes-ink",
|
|
"@hermes/shared": "file:../apps/shared",
|
|
"@nanostores/react": "^1.1.0",
|
|
"ink": "^6.8.0",
|
|
"ink-text-input": "^6.0.0",
|
|
"nanostores": "^1.2.0",
|
|
"react": "^19.2.4",
|
|
"undici": "^6.25.0",
|
|
"unicode-animations": "^1.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9",
|
|
"@types/node": "^22.20.0",
|
|
"@types/react": "^19.2.14",
|
|
"@typescript-eslint/eslint-plugin": "^8",
|
|
"@typescript-eslint/parser": "^8",
|
|
"esbuild": "^0.28.1",
|
|
"eslint": "^9",
|
|
"eslint-plugin-perfectionist": "^5",
|
|
"eslint-plugin-react": "^7",
|
|
"eslint-plugin-react-hooks": "^7",
|
|
"eslint-plugin-unused-imports": "^4",
|
|
"globals": "^16",
|
|
"prettier": "^3",
|
|
"tsx": "^4.22.4",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^4.1.3"
|
|
}
|
|
}
|