On this page

Reference hub

Reference inventory and glossary

The map of Shoal documentation, binaries, files, environment variables, adapter catalog, protocol surfaces, and shared terminology.

Status
Inventory for the current source tree
For
All Shoal users and contributors
On this page
  1. Find the right chapter
    1. Start and orient
    2. Language
    3. Shell and tools
    4. Agents and protocol
    5. Operate and contribute
  2. Binary inventory
  3. File and directory inventory
  4. Environment-variable inventory
    1. Standard/XDG
    2. Kernel and MCP
    3. Capture, adapters, and secrets
    4. Configuration overrides
  5. Bundled adapter inventory (49 heads)
    1. Source control and development
    2. Language runtimes and interpreters
    3. JavaScript/Python/package tools
    4. Containers, orchestration, and infrastructure
    5. Cloud/project services
    6. Filesystem, archive, and data
    7. Linux/system inspection
  6. Adapter parser inventory
  7. MCP inventory
    1. Tools (13)
    2. Stable resource roots (6)
    3. Static event channels (4)
  8. Kernel method inventory
  9. Short-reference inventory
  10. Error-code namespaces
  11. Glossary
    1. Adapter
    2. Addressable value
    3. AST
    4. CAS
    5. Channel
    6. Command head
    7. Command mode
    8. Effect
    9. Elision
    10. Evaluator
    11. Expression mode
    12. Feed
    13. Hermetic
    14. Journal
    15. Leash
    16. Outcome
    17. Plan
    18. Principal
    19. PTY
    20. Reef
    21. Reference (ref)
    22. Session
    23. Statement position
    24. Stream
    25. Task
    26. Value position
    27. Wire value
  12. Snapshot notes

Use this page to find the authoritative chapter for a symbol or subsystem. It also inventories the shipped binaries, 49 bundled adapter heads, important files/environment variables, and the terms shared by the language, shell, Reef, kernel, and MCP layers.

Find the right chapter🔗

Start and orient🔗

QuestionChapter
How do I build and run something useful?Quickstart
Why is a line parsed as a command or expression?Command/expression model
How does the interactive editor/session behave?Interactive shell
What does every shoal CLI form do?Command-line interface
How do I translate Bash/zsh/fish/Nushell habits?Migrating from traditional shells
Show practical patterns.Recipes

Language🔗

SubjectChapter
Lexical syntax, literals, comments, namesSyntax and literals
Types, equality, access, coercion, methodsValues, types, and methods
Functions, closures, aliases, control flow, modulesFunctions, control flow, and modules
Outcomes, raised errors, try/catch, assertionsOutcomes and errors
Lists, records, tables, higher-order transformsCollections and tables
Full grammar, operators, patterns, interpolationGrammar reference
Every runtime method by receiverValue-method reference
Every builtin commandBuiltin reference
JSON/YAML/TOML/CSV/math/HTTP/OS/config/env/secretNamespace reference

Shell and tools🔗

SubjectChapter
External argv, outcomes, feed, redirects, interpreter blocksExternal commands
Adapter contract, schemas, parsers, effects, full catalogCommand adapters
Files, cwd, tasks, jobs, journal, CAS, undoFilesystem, jobs, history, and undo
Pull/live streams, channels, handlers, backpressureStreams and channels
Tool manifests/providers/locks/PATH/hermetic modeReef tool resolution
Config discovery/precedence/editor/history/render/promptConfiguration and prompt
Every configurable key chord/actionKeybinding reference

Agents and protocol🔗

SubjectChapter
Architecture/setup/sessions/tokens/tool overviewAgents, kernel, and MCP
Exact schemas/defaults/results for 13 MCP toolsMCP tool reference
Resource URIs/templates/events/cursors/subscriptionsMCP resources and events
Raw Unix-socket JSON-RPC methods/wire values/errorsKernel protocol
Reliable orchestration patternsAgent and MCP workflows
Threat model, Leash, enforcement, P0 defectsSecurity and trust boundaries
Kernel/MCP/LSP/token/secret/history/doctor utilitiesCompanion CLI reference

Operate and contribute🔗

SubjectChapter
What works and what does not?Current status and limits
What should be built next, in what order?Roadmap
Diagnose a symptom.Troubleshooting
How is the implementation constructed?Internal architecture docs

Binary inventory🔗

ExecutablePrimary interface
shoalREPL, scripts/stdin/-c, fmt, doctor, lsp, mcp, completions, prompt tools.
shoal-kernelLong-lived Unix-socket JSON-RPC evaluator/session host.
shoal-mcpMCP stdio facade.
shoal-lspLSP stdio server.
shoal-tokenToken create/list/revoke.
shoal-secretSecret set/list/delete.
shoal-historyJournal query/show/pin/unpin/GC/undo.
shoal-doctorInstallation diagnostics.
shoal-sandbox-execInternal filesystem-sandbox child launcher.
shoal-landlock-helperLow-level enforcement test/helper.

The packages are separate. See install commands.

File and directory inventory🔗

NameLocation/defaultRole
Shoal script*.shlNative source/module/runner file.
User config$XDG_CONFIG_HOME/shoal/shoal.toml or ~/.config/shoal/shoal.tomlUser layer, prompt/editor/history/reef/etc.
Project configproject-discovered shoal.toml according to config rulesProject layer.
Reef manifest.reef.tomlNative project tool constraints/runners/hermetic intent.
Reef lockreef.lock beside nearest native scopeResolved tool/provider/path/hash bindings.
Leash policyusually $XDG_CONFIG_HOME/shoal/leash.tomlPrincipal grants/approval/sandbox intent.
Built-in adaptersrepository/package adapters/*.tomlShipped command schemas.
User adapters$XDG_CONFIG_HOME/shoal/adaptersCustom command schemas.
Journal/CAS$XDG_STATE_HOME/shoal or ~/.local/state/shoal for main/kernelSQLite/WAL metadata and content blobs.
Token storekernel <state-dir>/tokens.jsonKeyed token digests/metadata.
Line historyconfigurable; normally XDG stateReedline recall store, distinct from journal.
Secret directoryXDG data shoal/secrets (or evaluator override)master.key + authenticated encrypted envelope.
Kernel socketXDG runtime or UID-qualified temp fallbackLocal IPC boundary.

Do not assume all companion defaults agree: shoal-history/doctor use XDG data in places where shell/kernel use XDG state. The path matrix is authoritative.

Environment-variable inventory🔗

Standard/XDG🔗

VariableRole
HOMEFallback anchor for config/state/data and ~/ grants.
XDG_CONFIG_HOMEUser config/policy/adapters.
XDG_STATE_HOMEMain shell/kernel state/journal/token default.
XDG_DATA_HOMESecret store and current history/doctor companion defaults.
XDG_RUNTIME_DIRPreferred kernel socket root.
TMPDIRUID-qualified socket fallback and temporary trash/files.
NO_COLORDisable color where the host honors it.
EDITOR / VISUALExternal editor behavior.

Kernel and MCP🔗

VariableRole
SHOAL_SOCKETExplicit MCP/kernel-client socket selection.
SHOAL_SESSIONMCP attachment session.
SHOAL_TOKENMCP bearer token—secret, never log.
SHOAL_NO_AUTOSTARTNonempty disables MCP’s detached kernel startup.
SHOAL_TOKEN_STOREshoal-token CLI store override; kernel ignores it.
SHOAL_KERNELMain config/env compatibility setting for kernel enablement.
SHOAL_KERNEL_SESSIONMain config/env compatibility setting for kernel session.
SHOAL_LEASH_POLICYMain configuration override for policy path where supported.
SHOAL_JOURNAL_ENABLEDMain configuration override.

Capture, adapters, and secrets🔗

VariableRole
SHOAL_CAPTURE_CAP_BYTESResident process-output capture cap (default 64 MiB).
SHOAL_CAPTURE_SPILL_CAP_BYTESCAS spill cap (default 1 GiB).
SHOAL_ADAPTER_PATHReplacement custom adapter search path; not simple append.
SHOAL_SECRET_DIREvaluator secret-store override; shoal-secret CLI ignores it.

Configuration overrides🔗

The configuration loader also recognizes environment overrides including:

SHOAL_EDITOR_MODE
SHOAL_EDITOR_BRACKETED_PASTE
SHOAL_COMPLETION_MENU
SHOAL_COMPLETION_FUZZY
SHOAL_COMPLETION_CASE_INSENSITIVE
SHOAL_COMPLETION_MAX_RESULTS
SHOAL_HISTORY
SHOAL_HISTORY_MAX_ENTRIES
SHOAL_HISTORY_FILE
SHOAL_HISTORY_DEDUP
SHOAL_RENDER_WIDTH
SHOAL_RENDER_COLOR
SHOAL_RENDER_PAGING
SHOAL_RENDER_PAGER
SHOAL_RENDER_ECHO
SHOAL_PROMPT
SHOAL_PROMPT_TEMPLATE
SHOAL_NERD_FONT

Use Configuration and prompt for value parsing and precedence; an inventory alone is not sufficient to configure them correctly.

Bundled adapter inventory (49 heads)🔗

An adapter head is the Shoal command name selected before subcommand parsing. Availability still depends on the external executable/platform.

Source control and development🔗

cargo  git  gh  go  jj  rg  rustup

Language runtimes and interpreters🔗

bash  deno  jq  node  python  ruby  yq

JavaScript/Python/package tools🔗

brew  bun  npm  pip  pnpm  uv  yarn

Containers, orchestration, and infrastructure🔗

docker  helm  kubectl  podman  terraform

Cloud/project services🔗

aws  gcloud

Filesystem, archive, and data🔗

curl  df  du  env  fd  findmnt  sqlite3  stat  tar  unzip  zip

Linux/system inspection🔗

ip  journalctl  lsblk  lscpu  ps  ss  systemctl  systemd-analyze  vmstat  who

Count check:

7 + 7 + 7 + 5 + 2 + 11 + 10 = 49

The adapter catalog documents each head’s class, structured subcommands/output, and caveats. A listed adapter does not mean the tool is installed or every subcommand is structured.

Adapter parser inventory🔗

json
ndjson
csv
tsv
z-records
porcelain-v2
cols
cols2
tsv-headerless
lines
kv
none

See Structured output parsers for exact behavior.

MCP inventory🔗

Tools (13)🔗

shoal_exec
shoal_plan
shoal_apply
shoal_get
shoal_journal
shoal_cancel
shoal_cap_request
shoal_pty_open
shoal_pty_send
shoal_pty_read
shoal_pty_resize
shoal_pty_close
shoal_pty_list

Stable resource roots (6)🔗

shoal://journal
shoal://jobs
shoal://session/cwd
shoal://session/env
shoal://session/reef
shoal://pty

Dynamic resources add tasks, plans, and PTYs. Transcript/content values are reached from returned refs/templates.

Static event channels (4)🔗

session.transcript
journal
approval
render

Dynamic forms are task.{id} and user.{name}. There is no currently advertised Reef channel.

Kernel method inventory🔗

session.attach  session.env  session.reef
parse           complete     explain
exec            value.get    blob.get
journal.query
task.list       task.get     task.await
task.cancel     task.suspend task.resume
plan.get        plan.list    plan.apply
cap.request
pty.open        pty.send     pty.read
pty.resize      pty.close    pty.list
events.read     events.publish
events.subscribe events.unsubscribe

journal.query and cap.request currently lack the required attachment gate; treat that as a security defect, not a pre-auth API. See Kernel method index.

Short-reference inventory🔗

FormMeaningLifetime/scope
out:NTranscript value/errorNamed session, live kernel/evaluator.
task:NBackground/timed taskNamed session, live kernel.
pty:NInteractive PTYNamed session, live kernel.
plan:HEXStored planLive kernel; metadata caller-scoped but current ID collision-prone.
val:blake3:HASHContent-addressed value/blobState-store/CAS retention.

Equivalent resource URIs use shoal://out/N, shoal://task/N, etc. Never persist the first four as durable business IDs.

Error-code namespaces🔗

Shoal has two distinct error namespaces:

  1. kernel/MCP JSON-RPC numeric codes (-32602, -32011, etc.);
  2. language error-value string codes (type_error, cmd_failed, etc.).

Do not compare a language code to an RPC number. Kernel errors and language errors document their control paths.

Glossary🔗

Adapter🔗

A TOML declaration that gives a command head typed parameters, invocation rewriting, output parser/schema, accepted statuses, class, and planning effects. It wraps an external executable; it is not the executable or an OS sandbox.

Addressable value🔗

A value stored behind a short ref/resource URI so a client can retrieve a field or slice without re-executing source.

AST🔗

Abstract syntax tree produced by Shoal parsing. Kernel attach/parse currently reports AST vocabulary version 2.

CAS🔗

Content-addressed store. Journal outputs/large bytes can be stored by BLAKE3 hash and later retrieved while retained. A hash does not imply authorization or permanence.

Channel🔗

A named event conduit. Language/wire clients may publish only user.*; kernel owns semantic channels. A channel event has per-channel sequence/timestamp/payload.

Command head🔗

The first command-shaped word used for resolution, such as git in git status. It can resolve to a lexical function/alias, builtin, Reef tool, adapter, external program, or interpreter path according to current precedence.

Command mode🔗

Parser/evaluator reading where an unbound statement-head word is a command and subsequent words are arguments. It coexists with expression mode; it is not a separate shell language.

Effect🔗

Planner description such as filesystem read/write/delete, process spawn, network connect/listen, environment/secret/session/journal/time, or opaque. Effects are analysis/policy data, not proof of native program behavior.

Elision🔗

Replacement of a large wire value with type/count/schema/preview/render-head plus URI, preserving addressability while bounding context.

Evaluator🔗

The runtime object holding lexical/session state, cwd/env, Reef resolver, ports, journal, cancellation, event bus, and command execution. The local REPL and each named kernel session own separate evaluators.

Expression mode🔗

Evaluation of names/literals/operators/calls/methods. Parenthesizing a command places it at a value boundary inside an expression.

Feed🔗

Explicit serialization of a finite value to a child process’s stdin. It is the byte-boundary bridge, not a typed pipeline operator.

Hermetic🔗

Context-specific. Reef hermetic mode removes ambient PATH tail. Leash hermetic=true requests fail-closed sandbox behavior for represented dimensions. Neither alone is a full hermetic container.

Journal🔗

SQLite/WAL structured execution record with source/AST/effects/principal/status/output descriptors and optional undo inverses. Distinct from editor line history.

Leash🔗

Principal policy/effect evaluator plus OS sandbox selection. It can allow/deny/request approval and apply filesystem confinement where supported.

Outcome🔗

External/builtin process result containing status, success, signal, semantic out, stdout/stderr, duration, PID, command, and optional source span. Statement/value position controls whether non-ok raises.

Plan🔗

Derived effects/reversibility/estimates/verdict for source before spawn. Stored plans can be approved/applied. Current short identity/approval security gaps are documented prominently.

Principal🔗

Identity attached to a kernel connection: token-supplied agent string or tokenless local uid:<euid>. Leash policy keys by principal.

PTY🔗

Pseudoterminal session for interactive programs. MCP exposes a rendered emulator screen and semantic key input, not raw ANSI history.

Reef🔗

Tool constraint/resolution/lock/provider/PATH subsystem. It selects what executable/version/hash a command should use; Leash governs what behavior is allowed.

Reference (ref)🔗

A compact handle such as out:17 or task:9. Meaning depends on kind and lifetime; it is not automatically durable, secret, collision-proof, or an authorization token.

Session🔗

A named kernel evaluator namespace sharing bindings/cwd/env/transcript/tasks/PTys/Reef state. It is currently a collaboration boundary, not principal isolation.

Statement position🔗

Top-level command/control context where a non-ok outcome normally raises cmd_failed and aborts subsequent statements.

Stream🔗

Lazy/single-consumption sequence, potentially live. Live sources have bounded/coalescing behavior; streams currently do not chunk over the kernel wire or feed a process incrementally.

Task🔗

Background evaluator/kernel execution with lifecycle/cancellation/result reference. Timeout can return ongoing work as a task rather than terminate it.

Value position🔗

Expression/capture context where a failed external outcome remains inspectable as a value.

Wire value🔗

JSON object tagged by $ that represents a Shoal value across the kernel/MCP boundary. Secrets carry only names; large values can become $:"ref".

Snapshot notes🔗

  • Workspace/package version is currently 0.1.0; contracts are preview.
  • Conformance corpus: 1,310 cases, 1,306 pass, 4 explicit host/harness skips as of 2026-07-16.
  • Bundled adapter heads: 49.
  • MCP tools: 13.
  • MCP protocol initialization version: 2025-06-18.
  • Kernel serialized AST version: 2.
  • Supported deployment platforms: Linux/macOS preview; Windows unsupported.

For changes since this inventory was written, prefer the source registries/tests and update this page in the same change.

Type to search every guide navigate open esc close
Diagram