mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-13 14:02:16 +00:00
New from-scratch package ui-tui-opentui-v2/ (NOT a port of the superseded React
ui-tui-opentui/; Ink ui-tui/ untouched). Mirrors opencode's method: @opentui/solid
view, Effect 4.0-beta only at the boundary (renderer lifecycle, GatewayService
transport, runtime), plain Solid for the logic/view.
Phase 0 (per docs/plans/opentui-rewrite-v4-spec.md §11):
- deps pinned: effect@4.0.0-beta.78, @opentui/{core,solid,keymap}@0.3.2, solid-js@1.9.10
- strict rails: tsconfig (verbatimModuleSyntax, exactOptionalPropertyTypes,
noUncheckedIndexedAccess, jsxImportSource @opentui/solid), eslint, prettier
- boundary: acquireRelease(createCliRenderer) + finalizers + Deferred-on-destroy;
GatewayService (Context.Service) shape; typed errors (Data.TaggedError); AppLayer
- logic (Solid): createSessionStore + apply(event) reducer (sync-v2 model, minimal)
- view (Solid): App shell (header + transcript); inline color via <span style={{fg}}>
- entry: the one-line render(() => <App/>, renderer) bridge + Effect.provide(layer)
- FakeGateway layer (test/dev seam) streaming a scripted hello
- test rails: test/lib/effect.ts (testEffect/testLayer over ManagedRuntime + TestClock,
no @effect/vitest), test/lib/render.ts (testRender + renderOnce + captureCharFrame)
- 4-layer tests (boundary/store/render) 5/5 green; scripts/check.sh gate green
- docs: v4 spec + living smoke doc (Phase 0 PASS logged); v3 spec + parts/markdown
plan marked superseded
Verified: bun run check green (tsc 0, eslint 0, bun test 5/5); live tmux drive paints
'hermes · opentui · ready' + '✦ Hi there, glitch!' in a real TTY.
33 lines
932 B
JSON
33 lines
932 B
JSON
{
|
|
"name": "@hermes/ui-tui-opentui-v2",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Native OpenTUI engine for Hermes (Solid + Effect-at-boundary, from scratch). Ink (ui-tui/) stays the shipping default.",
|
|
"scripts": {
|
|
"type-check": "tsc --noEmit",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"fmt": "prettier --write src",
|
|
"fix": "prettier --write src && eslint . --fix",
|
|
"test": "bun test",
|
|
"check": "bash scripts/check.sh",
|
|
"dev": "bun src/entry/main.tsx"
|
|
},
|
|
"dependencies": {
|
|
"@opentui/core": "0.3.2",
|
|
"@opentui/keymap": "0.3.2",
|
|
"@opentui/solid": "0.3.2",
|
|
"effect": "4.0.0-beta.78",
|
|
"solid-js": "1.9.10"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9",
|
|
"@types/bun": "latest",
|
|
"eslint": "^9",
|
|
"eslint-plugin-unused-imports": "^4",
|
|
"prettier": "^3",
|
|
"typescript": "^5",
|
|
"typescript-eslint": "^8"
|
|
}
|
|
}
|