@corenel/term
v0.7.0
Published
Corenel's terminal face — a headless chat controller plus its Ink views. `./session` is ink-free and shared with the CLI's readline fallback; only `./ink` pulls React. dist/ is bundled (see build.mjs), but @corenel/harness and @corenel/protocol stay EXTER
Readme
@corenel/term
Corenel's terminal face: a headless chat controller and the Ink
views that render it. Published so @corenel/cli
can depend on it; usable directly if you are building a terminal agent of your own.
Requires Node 22+.
The split that matters
./session and its siblings are Ink-free. Only ./ink pulls in React.
That is deliberate: the CLI runs the same controller behind two faces — the full
terminal UI on a TTY, and a plain readline loop when output is piped, under
TERM=dumb, in CI, or with --no-tui. Both drive one controller, so a fix to
turn handling lands in both faces at once rather than in whichever one somebody
remembered.
| Export | What it is | Pulls React |
| --- | --- | --- |
| ./session | The turn controller — runs a turn, emits deltas | no |
| ./state | The conversation state a face renders | no |
| ./commands | Slash commands (/clear, /resume, …) | no |
| ./describe | Human-readable renderings of harness events | no |
| ./persist | Save and reopen conversations | no |
| ./ink | The full terminal UI: scrollback, live tail, modals, palette | yes |
import { TermSession } from '@corenel/term/session';Packaging
dist/ is bundled (see build.mjs): @corenel/harness and @corenel/protocol
are inlined at build time and are not runtime dependencies. The only things
installed alongside this package are ink, ink-text-input, openai and
react.
One consequence worth knowing before you use this from TypeScript: the published
.d.ts files still reference @corenel/harness and @corenel/protocol for
types. The JavaScript runs without them, but a TypeScript consumer needs both
installed for those types to resolve. Both are on npm.
Licensed under Elastic-2.0.
