@ank1015/llm-server
v0.0.5
Published
Node-only Hono orchestration server for projects, artifact directories, agent sessions, and installable skills
Maintainers
Readme
@ank1015/llm-server
Published Node package for the monorepo's Hono backend, project storage model, session orchestration, terminal transport, and installable-skill APIs.
Status
This package is published as @ank1015/llm-server and is also consumed by the npx @ank1015/llm launcher.
It is the main backend for the repo's app clients and local session workflows. When run through npx @ank1015/llm, the public app and API share the launcher's port (3210 by default), while the Hono server process runs on a private internal port selected by the launcher.
Commands
pnpm --filter @ank1015/llm-server build
pnpm --filter @ank1015/llm-server typecheck
pnpm --filter @ank1015/llm-server lint
pnpm --filter @ank1015/llm-server test
pnpm --filter @ank1015/llm-server test:unit
pnpm --filter @ank1015/llm-server test:integration
pnpm --filter @ank1015/llm-server test:live
pnpm --filter @ank1015/llm-server dev
pnpm --filter @ank1015/llm-server start
pnpm --filter @ank1015/llm-server test-skill -- --prompt "Open the target page"What It Contains
- Hono route modules for projects, artifact directories, checkpoints, keys, models, sessions, skills, and terminal APIs
- Core services for project/artifact lookup, SDK-backed session persistence, compaction sidecars, and terminal registry state
- HTTP and WebSocket server wiring used by the local desktop and web-facing flows
- Package-local TypeBox contracts and DTOs for the server boundary
Runtime Defaults
Standalone pnpm --filter @ank1015/llm-server start / node dist/server.js defaults:
HOSTdefaults to127.0.0.1PORTdefaults to8001projectsRootdefaults to~/projectsdataRootdefaults to~/.llm/projects
Repo-local callers can override filesystem paths through the internal config module before starting the app or tests.
Packaged npx @ank1015/llm defaults:
- public web and API origin:
http://127.0.0.1:3210 - override with
llm --host <host> --port <port> - API requests should use same-origin
/apiroutes from the web app instead of assuming8001
Module Map
src/app.ts- Hono app construction and route mountingsrc/http-server.ts- Node HTTP server and terminal WebSocket upgrade handlingsrc/server.ts- local process entrypoint usingHOSTandPORTsrc/routes/- package HTTP route handlers grouped by resource familysrc/core/project/- project metadata and workspace lookupsrc/core/artifact-dir/- artifact directory metadata, skill helpers, and temp workspace helperssrc/core/session/- session storage, prompt execution, live run registry, compaction, and context reframingsrc/core/terminal/- terminal registry and PTY helperssrc/test-skill.ts- standalone CLI that runs the server agent prompt/tools with appended Chrome docs and exports a Markdown transcriptsrc/contracts/- route request and response schemassrc/types/- server-local DTO and model typesdocs/- package-facing backend notes
Docs
docs/architecture.md- backend module map and storage layoutdocs/configuration.md- runtime host, port, and filesystem configurationdocs/testing.md- unit, integration, and live test guidance
Notes
- The package is Node-only and requires local filesystem and subprocess access.
- Terminal sessions use
node-pty; the package includes a Python 3 PTY fallback on Unix-like hosts for specificposix_spawnfailures. - Claude credential reload creates a temporary executable wrapper:
.cmdon Windows, POSIXshelsewhere. test-skillaccepts--prompt, optional--cwd, and optional--output, then writes a conversation-style Markdown transcript after the run finishes.
