dash — the REPL handle
dash is seeded into every in-app Python REPL session and scripts the running dashboard — panes, layout, I/O, settings, git — and every module can add a dash.<name> facade (dash.lens reads llama.cpp traces as numpy). dash.help() prints the same list at the prompt. It is a global, not an importable module: there is no import dash. See the Python SDK.
Also browsable, with search, in the Python reference pane (/pydoc) under Dashboard SDKs.
dash
call
call(name: str, **args: Any) -> Any
Relay an arbitrary tool by name — covers every widget `agentTool` and
agent-exposed command, so new capabilities are reachable without an SDK
change.
context
context(instance_id: str) -> Any
Read an active pane instance's current state/selection snapshot (instanceId from
`panes.open_list()`).
help
help() -> None
Print the whole `dash` surface (facades, methods, and one-line docs).
dash.code
find
find(query: str, limit: int=50) -> list[dict[str, Any]]
Fuzzy symbol search across the workspace roots (exact-name / structural).
locus
locus() -> dict[str, Any]
The current code locus (path + optional range/symbol), or `{}` if none.
reindex
reindex() -> dict[str, Any]
Rebuild the semantic index over the workspace roots (blocks until done).
search
search(query: str, limit: int=10) -> dict[str, Any]
Semantic search: find definitions by meaning (embeddings). Returns
`{building: True}` with no results until the index is built — run
`dash.code.reindex()` first if so.
set_locus
set_locus(path: str, line: int | None=None, symbol: str | None=None) -> dict[str, Any]
Point the locus at `path` (optionally a 1-based `line`/`symbol`); browsers
open and scroll to it.
symbols
symbols(path: str) -> list[dict[str, Any]]
The definitions (outline) in a file — functions, classes, methods, ….
dash.git
blame
blame(path: str) -> dict[str, Any]
Per-line authorship for a file, each line tagged with the session that wrote
its commit (if any).
commit
commit(message: str, paths: list[str] | None=None) -> dict[str, Any]
Stage + commit, stamping the active chat session as provenance trailers.
log
log(limit: int=20) -> dict[str, Any]
Recent commits; a `session_id` marks a commit agent-authored.
dash.io
clear
clear() -> dict[str, Any]
Empty the telemetry ring buffer.
errors
errors(limit: int=20) -> list[dict[str, Any]]
Recent events that failed (error set, or HTTP status ≥ 400).
recent
recent(limit: int=20) -> list[dict[str, Any]]
The most recent I/O events (newest last), each as a dict.
dash.layout
arrange
arrange(style: str='columns') -> Any
Re-lay the centre: `columns`, `rows`, `grid`, `tabs` or `even`.
backdrop
backdrop(backdrop_id: str, **params: Any) -> Any
Set the desktop backdrop. Ids are in `describe()["desktop"]["backdrops"]`.
describe
describe() -> Any
The whole workbench: the centre tree of tab groups, the docks, what is
maximized and focused, and the backdrop.
place
place(instance_id: str, to: str, group: str | None=None) -> Any
Move a pane: `center`, `dock-left`/`dock-right`/`dock-bottom`,
`split-left`/`split-right`/`split-above`/`split-below` (beside `group`, or
the group it is in), or `group` (as a tab of `group`).
set_region_view
set_region_view(instance_id: str, view_id: str) -> Any
Show a specific region view on its host pane (opens the strip).
state
state(instance_id: str, state: str) -> Any
`maximize`, `restore`, `hide`, `show`, `present` or `unpresent`.
Only a docked pane hides, and a hidden one keeps running.
theme
theme(theme_id: str) -> Any
Switch the app theme. Ids are in `describe()["desktop"]["themes"]`.
toggle_region
toggle_region(instance_id: str, position: str, open: bool | None=None) -> Any
Toggle a pane's region strip (`left`/`right`/`bottom`); `open` forces a state.
window
window(instance_id: str, snap: str | None=None, rect: dict[str, float] | None=None) -> Any
Deprecated: use `place()`. Gives the pane a group of its own; `snap`
maps to a split on that side, `max` to maximize; `rect` is ignored.
window_state
window_state(instance_id: str, state: str, snap: str | None=None) -> Any
Deprecated: use `state()` / `place()`. `minimize` hides the pane's dock.
dash.lens
attention
attention(trace_id: str, layer: int, head: int=0, pass_index: int=0) -> Any
One head's query x key matrix at `layer`, cropped to the KV in use.
delta
delta(trace_id: str, layer: int, pass_index: int=0) -> dict[str, Any]
What block `layer` wrote into the residual stream, per token.
experts
experts(trace_id: str, pass_index: int=0) -> dict[str, Any]
Mixture-of-experts routing (`moe: False` on a dense model).
focus
focus(*, trace_id: str='', layer: int | None=None, position: int | None=None, token_id: int | None=None, stage: str | None=None, step: int | None=None) -> dict[str, Any]
Point the user's panes at part of the model (the model-locus bus).
`stage` (`attention`, `ffn`, …) and `step` (a record index) move the
stepper's cursor, which the model explorer follows.
grid
grid(trace_id: str, *, lens: str='identity', k: int=5, layers: list[int] | None=None, positions: list[int] | None=None, pass_index: int=0) -> dict[str, Any]
The layer x position readout. Carries `verified` — check it before
believing the cells.
lenses
lenses(trace_id: str) -> list[dict[str, Any]]
Which lenses apply to a trace's model; `identity` is always present.
locus
locus() -> dict[str, Any]
The model locus most recently set from this side.
program
program(trace_id: str, pass_index: int=0) -> list[dict[str, Any]]
The records of one pass in execution order — what the stepper steps.
tensor
tensor(trace_id: str, name: str, pass_index: int=0) -> Any
One record as a numpy array in `[ne3, ne2, ne1, ne0]` order, strides
honoured (`l_out-12`, `kq_soft_max-3`, …).
traces
traces(limit: int=20, model_sha: str='', derived_from: str='') -> list[dict[str, Any]]
Stored traces, newest first (the `llamacpp_traces` catalog in app.db).
track
track(trace_id: str, token_id: int, *, lens: str='identity', pass_index: int=0) -> dict[str, Any]
One vocabulary token's rank and logit at every cell — the token pin.
vocab
vocab(trace_id: str, query: str, limit: int=20) -> list[dict[str, Any]]
Search the traced model's own vocabulary — what a swap must name.
dash.panes
available
available() -> Any
Every view that can be opened, with id, title, role (document/widget/tool),
and the region views it hosts.
close
close(instance_id: str) -> Any
Close an open pane instance by its instance ID (from `open_list()`).
focus
focus(instance_id: str) -> Any
Bring a pane forward: show its tab, and its dock if hidden.
open
open(view_id: str) -> Any
Open a view by its view ID (from `available()`) where its role puts it.
open_list
open_list() -> Any
Pane instances currently open (view id, instanceId, role, and where
each one lives).
dash.settings
all
all() -> dict[str, Any]
Every persisted override, as a flat key→value dict.
get
get(key: str, default: Any=None) -> Any
The value for `key` (the persisted override, else `default`).
set
set(key: str, value: Any) -> dict[str, Any]
Persist an override for `key`.