mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
Desktop drew ```mermaid fences with mermaid.js 11.17.2: a 2.97 MB (768 KB gzip) lazy chunk, 1.3 s of main-thread work to draw 15 diagrams even with the runtime already loaded, and a full re-render of every diagram on each light/dark flip. Heybinshao proposed Pele in #145052. Pele (obsidianmd/pele, MIT, by kepano) renders the same Mermaid syntax to plain SVG, synchronously, with no dependencies. This swaps it in behind the existing RichCodeBlock `mermaid` entry and keeps the rest of the path: - `pele/lazy`, so a diagram loads only its own type's chunk (the pattern from TudeOrangBiasa/brainondesk#98 and Limatura/tessera#148). The `mermaid` advancedChunks group is gone; a group would merge the types back into one chunk. - Still an <img> data: URI, so the SVG stays an isolated document with no scripts. Links and images are off, as under mermaid's strict mode (as in 7Yearsss/reizo-studio#155). - Colors: the app's `--dt-*` tokens are resolved to concrete values and written onto the SVG root as `--pele-*`. A token that does not resolve is left to Pele's default rather than becoming black. The resolved theme is the render-cache key, so skins re-color too, not only the mode flip. - No mermaid fallback (energon and brainondesk keep one). Mermaid's own syntax docs (492 fences) draw in exactly the same 476 cases with both renderers; the 16 misses are all zenuml, an external plugin neither ships. Two follow-ups came from profiling the first Pele version: - Every diagram re-resolved the palette on mount and on each repaint, one forced style recalc per token: 246 recalcs per 15-diagram re-render. The theme is now resolved once per repaint, shared through useSyncExternalStore, with all probes styled before any is read. - The palette went in through a DOMParser/XMLSerializer round trip, and the alt text through another parse. The palette is now a string insert into Pele's root style, and the alt-text parse runs only when the SVG has a <title> or <desc>. xmlWellFormedSvg and normalizeSvgSize only existed to repair mermaid's HTML serialisation (#133089), so they go, along with their tests. The #133089 case is kept as a test against real Pele output. Pele is pinned to 1.6.0, the newest release that passes the repo's 14-day min-release-age. Refs #145052
90 lines
2.7 KiB
JSON
90 lines
2.7 KiB
JSON
{
|
|
"name": "hermes-agent",
|
|
"version": "1.0.0",
|
|
"description": "An AI agent with advanced tool-calling capabilities, featuring a flexible toolsets system for organizing and managing tools.",
|
|
"private": true,
|
|
"workspaces": [
|
|
"apps/*",
|
|
"ui-tui",
|
|
"ui-tui/packages/*",
|
|
"web",
|
|
"tests-js"
|
|
],
|
|
"scripts": {
|
|
"postinstall": "echo '✅ Node dependencies installed. Run: python run_agent.py --help'",
|
|
"install:root": "npm install --workspaces=false",
|
|
"install:web": "npm install --workspace web",
|
|
"install:tui": "npm install --workspace ui-tui",
|
|
"install:desktop": "npm install --workspace apps/desktop",
|
|
"audit:root": "npm audit --workspaces=false",
|
|
"audit:web": "npm audit --workspace web",
|
|
"audit:tui": "npm audit --workspace ui-tui",
|
|
"audit:fix:root": "npm audit fix --workspaces=false",
|
|
"audit:fix:web": "npm audit fix --workspace web",
|
|
"audit:fix:tui": "npm audit fix --workspace ui-tui",
|
|
"check": "npm run --ws check",
|
|
"fix": "npm run --ws fix",
|
|
"prepare": "node -e \"const {existsSync}=require('fs');const {spawnSync}=require('child_process');if(existsSync('.git'))spawnSync('lefthook',['install'],{stdio:'inherit',shell:true})\""
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/NousResearch/Hermes-Agent.git"
|
|
},
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/NousResearch/Hermes-Agent/issues"
|
|
},
|
|
"homepage": "https://github.com/NousResearch/Hermes-Agent#readme",
|
|
"devDependencies": {
|
|
"@eslint/js": "9.39.5",
|
|
"eslint": "10.12.0",
|
|
"eslint-plugin-perfectionist": "5.12.1",
|
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
"globals": "17.13.0",
|
|
"lefthook": "2.2.1",
|
|
"typescript": "6.0.3",
|
|
"typescript-eslint": "8.71.1"
|
|
},
|
|
"overrides": {
|
|
"@electron/osx-sign": {
|
|
"isbinaryfile": "5.0.7"
|
|
},
|
|
"lodash": "4.18.1",
|
|
"protobufjs": "^8.7.1",
|
|
"brace-expansion": "5.0.12",
|
|
"dompurify": "3.4.17",
|
|
"katex": "0.19.0",
|
|
"ip-address": "10.7.4",
|
|
"nanoid@^3": "3.3.20",
|
|
"nanoid@^6": "6.0.2",
|
|
"js-yaml@^4": "4.3.2",
|
|
"undici@^6": "6.29.0",
|
|
"undici@^7": "7.30.0",
|
|
"postcss": "8.5.29",
|
|
"postcss-selector-parser": "7.1.6",
|
|
"tar": "7.5.22",
|
|
"source-map-js": "1.2.2",
|
|
"yaml": "2.9.1",
|
|
"vitest": "4.1.12",
|
|
"@vitest/mocker": "4.1.12"
|
|
},
|
|
"engines": {
|
|
"node": ">=26",
|
|
"npm": "<11.10.0 || >=11.17.0"
|
|
},
|
|
"allowScripts": {
|
|
"unicode-animations": false,
|
|
"esbuild@0.28.2": true,
|
|
"node-pty@1.1.0": true,
|
|
"electron-winstaller@5.4.0": true,
|
|
"fsevents@2.3.3": true,
|
|
"get-windows@9.3.0": true,
|
|
"lefthook@2.2.1": true
|
|
},
|
|
"dependencies": {
|
|
"js-yaml": "4.3.2",
|
|
"semver": "7.7.4"
|
|
}
|
|
}
|