Ports the engine off the second JS runtime onto Node 26.3 (node:ffi) so the repo ships a single JavaScript runtime: child_process for the gateway, vitest for tests, an esbuild + Solid build step. Mouse selection copies the rendered text you highlight, and the clipboard path is crash-proofed (a broken copy pipe no longer quits the UI). Renames the engine dir ui-tui-opentui-v2/ -> ui-opentui/ and updates the launcher/installer/Docker references.
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
/**
|
|
* Typed errors at the gateway boundary.
|
|
*
|
|
* Per spec v4 §3.4: internal errors use `Data.TaggedError`; wire/serializable
|
|
* errors use Schema-based tagged errors (added in Phase 1 alongside the
|
|
* GatewayEvent schema). Phase 0 ships the internal set the renderer/transport
|
|
* boundary needs.
|
|
*
|
|
* Boundary code yields these directly (`return yield* new FooError(...)`) — no
|
|
* throw / try-catch / Promise.catch / orDie.
|
|
*/
|
|
import { Data } from 'effect'
|
|
|
|
/** The renderer (createCliRenderer) failed to acquire. */
|
|
export class RendererError extends Data.TaggedError('RendererError')<{
|
|
readonly cause: unknown
|
|
}> {}
|
|
|
|
/** Could not resolve a usable Python interpreter for the gateway. */
|
|
export class PythonResolutionError extends Data.TaggedError('PythonResolutionError')<{
|
|
readonly tried: ReadonlyArray<string>
|
|
}> {}
|
|
|
|
/** A JSON-RPC request to the gateway failed (timeout, transport down, rpc error). */
|
|
export class GatewayError extends Data.TaggedError('GatewayError')<{
|
|
readonly method: string
|
|
readonly reason: 'timeout' | 'transport-down' | 'rpc-error'
|
|
readonly message: string
|
|
}> {}
|