Domain Glossary
Shared terms used across Hya’s codebase, APIs, and documentation (aligned with root CONTEXT.md).
Kernel & Context
- Context $(m, g, w)$: What a round operates on—the visible transcript ($m$), the ordered session
todochecklist ($g$), and recorded workspace file observations ($w$). - Model append: Adding the model’s own sampled output (text, reasoning, tool calls) to Context—treated as a claim or plan, never outside proof.
- Tool append: Adding a deterministic outside observation (a tool result/error paired with a call, or user input).
- Rewrite: The kernel’s destructive context reset (triggered past 80% window occupancy or via the
rewritetool) that drops earlier steps behind a marker repeating all removed user prompts and the currenttodolist. - Compaction (
hya/compaction): Full-mode native extension steps (shaketool-output eviction toartifact://andremoteprovider/responses/compact) that run before the kernel’sRewrite. - Bare mode (
hya --bare,hya serve --bare,hya exec --bare): Running the unifiedSessionEnginewith the empty built-in bundle set—zero built-in bundles loaded, the 8 standard bare tools (read,write,edit,bash,grep,todo,rewrite,skill), optional native Code Mode, the minimalhya-baredefault agent, and standardAGENTS.md/skills/MCP/plugin adapters. Combine with--pure(hya exec --bare --pure) to skip external context and plugins.
Sessions, Agents & Bundles
- Session (
hysec_...): One persisted, event-sourced conversation inevent_log. Both main chats and spawned subagents are full Sessions. - Turn: One cycle from prompt/command/shell admission through 0+ provider/tool rounds to
MessageFinished. - Agent: A role definition (ID, prompt, model policy,
resource_view,can_spawn,hook_refs). Its Origin is either built-in (hya/core-agents,hya/multi-agent,hya/plan, orhya-barein bare mode) or bundle (clampedInternalPublicplane + its own bundle’s resources). - Bundle (
.hyabundle,schema_version: 2): Hya’s deterministic package unit (kind: Bundle), carrying any mix of agents, skills, tools, MCP servers, hooks, native ABI v2cdylibs or JS sidecar processes, custom HTTP/gRPCBundleApiroutes, permission modes, CLI commands,@hya/tui-sdkv2 TUI extensions, and dataassets:(Workflow sourcesworkflows/<id>.hya.mdand channel templateschannels/<id>.yamlare assets read by the bundle that owns the domain). - Core: What stays in
crates/with every bundle disabled: the context kernel, the standard tools, the tool registry and permission plane, MCP, Code Mode, the plugin host, skills, the extension host (HookChain,RuntimeRegistry), the Native ABI, and the loader. Official and community bundles are installed through the same registry protocol. - Event::Extension &
Projection::extensions: The single generic event-log variant ({ session, bundle, kind, payload }) and folded map populated by native ABI v2ProjectionReducers so domain state stays single-source event-sourced without pollutinghya-protoorhya-store.
Subagents, Teams & Workflows
- Team: The tree of Sessions rooted at one Main agent (
handle = "main", max depth2). - Subagent (Member): A child Session spawned via
task(or a Workflow Stage), named deterministically asmain/<type>-<operator>. Every subagent is an episodic resident actor supervised byhya/multi-agent. - Episode & Handoff: One bounded activation of a subagent from spawn/revival until
report(orarchive). Ending an episode writes a state Handoff summary, releases its concurrency budget, and archives the subagent; a downward#DMfrom its parent revives it into episoden + 1with that Handoff. - Channel (
#DM-{8}&#announce-{8}): Strictly vertical parent ⇄ direct-child mail pipes recorded asEvent::Extensionon the team-rootevent_logbyhya/agent-channels. Siblings never see or message each other. - Workflow (
*.hya.md): A compiled, acyclic graph of Stages, compiled and executed durably by thehya/workflownative ABI v2 bundle on resident subagent sessions. A bundle ships one as an ordinaryassets:entry (workflows/<name>.hya.md). (Distinct from a dynamic JS Workflow program inhya-extra/orchestrator.)
Workspaces, Daemon & Relay
- Backend daemon: The detached
hya serveprocess owning a SQLite database via<db>.runtime-owner.lockand<db>.server.json. - Project (
prj_...) & Project roots: A client-chosen workspace consisting of one or more ordered absolute folders on the backend host. File tools access paths inside any root freely and promptExternalDirectoryoutside (ProjectScope). - Catalog scope: The
Global,Directory(path), orProject { id, roots }key used to lazily compose and cache active bundles, plugins, skills, commands, andAGENTS.md. - Temporary vs. Ephemeral session: A Temporary session (
--temp) works in~/.cache/hya/scratch/<id>outside any Project (never auto-deleted). An Ephemeral session (ephemeral: true) is an unused pre-opened root session that the daemon reaps ~5s after the last client disconnects. - Relay, Room, Relay link & Bridge: Remote access pieces (
hya-relay):hya proxyhosts blind Rooms;hya serve --relayregisters the Room and prints the secrethya://link;hya bridge/hya --connectopens a local loopback listener tunnelinghya.v2inside end-to-endNoise_NKpsk0encryption.