Documentation
¶
Overview ¶
Package mivia is the migration record for the session-analysis schema v1 -> v2 change.
WHAT CHANGED (schema v1 -> v2; contract files under .agents/skills/session-analysis/):
- queries.py now emits three new report fields: "derivation" (workspace_id algorithm disclosure, hex_chars=16), "store_accounting" (context_sessions lifecycle breakdown: total/tombstoned/alive/never_published_source_sequence_0/ published_source_sequence_gt0), and "admissions_coverage.note" (an empty admitted-tool set deletes the admission row; see internal/storage/session_admissions.go:38-43).
- report-template.md grew a Findings "[SOURCES: ...]" column, a MIGRATION note, and a "## Migration" section with the deployment checklist.
- The previous workspace_id derivation (8 hex chars) mis-scoped every run against the harness ledger (16 hex chars); the corrected derivation is disclosed in the output under "derivation".
WHY NO go.mod REPLACE: nothing in this module imports the skill package, so a fake "replace" directive would be an inert footgun that silently redirects any future real dependency on that path. The migration is recorded here and in report-template.md instead; queries.py, this file, and report-template.md together form the v1->v2 contract.
Consumers: findings templates and dashboards reading report JSON should move to the v2 field names; v1 field names keep parsing (nothing was removed or rekeyed).
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
mivia
command
Command mivia is the MiviaLabs local CLI AI agent entrypoint.
|
Command mivia is the MiviaLabs local CLI AI agent entrypoint. |
|
internal
|
|
|
agent
The SDK imports are out-of-prefix; the gate filters them out of the in-prefix edge set (scripts/check_import_layers.py compute_edges), and the policy baseline is unchanged.
|
The SDK imports are out-of-prefix; the gate filters them out of the in-prefix edge set (scripts/check_import_layers.py compute_edges), and the policy baseline is unchanged. |
|
agentmsg
Package agentmsg is the leaf surface for typed agent-to-agent messages.
|
Package agentmsg is the leaf surface for typed agent-to-agent messages. |
|
agents
Package agents resolves file-backed agent definitions into immutable runtime snapshots.
|
Package agents resolves file-backed agent definitions into immutable runtime snapshots. |
|
chat
Package chat implements multi-turn sessions with disk persistence.
|
Package chat implements multi-turn sessions with disk persistence. |
|
cli
Package cli implements mivia command handlers.
|
Package cli implements mivia command handlers. |
|
clichat
Typed action model: every transcript action is a tool (⚙), an agent (◆), or a skill (§).
|
Typed action model: every transcript action is a tool (⚙), an agent (◆), or a skill (§). |
|
cliworkflow
Package cliworkflow holds the workflow CLI domain: workflow run, resume, deliver, status, events, approve, reject, cancel, cleanup, delete, and gc commands, the session workflow tool engine, and the workflow snapshot and verifier pinning machinery.
|
Package cliworkflow holds the workflow CLI domain: workflow run, resume, deliver, status, events, approve, reject, cancel, cleanup, delete, and gc commands, the session workflow tool engine, and the workflow snapshot and verifier pinning machinery. |
|
codeintel
Package codeintel resolves symbol references by type-checking a workspace.
|
Package codeintel resolves symbol references by type-checking a workspace. |
|
composition
Package composition owns session wiring: registries, dispatchers, hooks, MCP merge, session construction.
|
Package composition owns session wiring: registries, dispatchers, hooks, MCP merge, session construction. |
|
config
Package config loads mivia TOML configuration and resolves provider settings.
|
Package config loads mivia TOML configuration and resolves provider settings. |
|
contextmgr
Package contextmgr owns context preparation policy and provider-message conversion.
|
Package contextmgr owns context preparation policy and provider-message conversion. |
|
contextstate
Package contextstate is the CLI's durable context contract layer.
|
Package contextstate is the CLI's durable context contract layer. |
|
coordinator
Package coordinator provides the orchestration seam between model-facing tools and the subagent execution pool.
|
Package coordinator provides the orchestration seam between model-facing tools and the subagent execution pool. |
|
diff
Package diff provides bounded, dependency-free line diffs for tool output.
|
Package diff provides bounded, dependency-free line diffs for tool output. |
|
faultinject
Package faultinject provides a deterministic, counter-based fault and hang trigger for concurrency and failure-path tests.
|
Package faultinject provides a deterministic, counter-based fault and hang trigger for concurrency and failure-path tests. |
|
gittest
Package gittest holds test-process configuration for packages whose tests spawn real git processes against temporary fixture repositories.
|
Package gittest holds test-process configuration for packages whose tests spawn real git processes against temporary fixture repositories. |
|
hooks
Package hooks owns mivia's deterministic lifecycle-hook layer: the config shape and the isolated execution path hook commands run through.
|
Package hooks owns mivia's deterministic lifecycle-hook layer: the config shape and the isolated execution path hook commands run through. |
|
hooksession
Package hooksession owns the running session's resolved lifecycle-hook state: discovery, arming, and the /hooks listing text.
|
Package hooksession owns the running session's resolved lifecycle-hook state: discovery, arming, and the /hooks listing text. |
|
hub
Package hub lets several `mivia` processes working the same session - a terminal TUI and, e.g., mivia-agent-desktop's spawned `mivia chat --json` process - see each other's live turns.
|
Package hub lets several `mivia` processes working the same session - a terminal TUI and, e.g., mivia-agent-desktop's spawned `mivia chat --json` process - see each other's live turns. |
|
jschema
Package jschema is a fail-closed JSON Schema compile/validate wrapper for structured subagent outputs (plan tools/02).
|
Package jschema is a fail-closed JSON Schema compile/validate wrapper for structured subagent outputs (plan tools/02). |
|
ledger
Package ledger defines immutable identity types, snapshots, and the repository boundary for subagent orchestration.
|
Package ledger defines immutable identity types, snapshots, and the repository boundary for subagent orchestration. |
|
ledgercore
Package ledgercore provides shared primitives and infrastructure for event-sourced ledger implementations in the mivia agent.
|
Package ledgercore provides shared primitives and infrastructure for event-sourced ledger implementations in the mivia agent. |
|
mcp
Package mcp implements MCP client configuration and tool adapters.
|
Package mcp implements MCP client configuration and tool adapters. |
|
memory
Package memory implements durable agent memory: project-scoped and org-scoped entries with a strict Markdown format.
|
Package memory implements durable agent memory: project-scoped and org-scoped entries with a strict Markdown format. |
|
miviaauth
Package miviaauth provides primitives to interact with the openapi HTTP API.
|
Package miviaauth provides primitives to interact with the openapi HTTP API. |
|
prompts
Package prompts holds prompt fragments that the compiled-in system prompts share.
|
Package prompts holds prompt fragments that the compiled-in system prompts share. |
|
provider
Package provider implements LLM chat adapters for mivia.
|
Package provider implements LLM chat adapters for mivia. |
|
providerregistry
Package providerregistry owns dependency-neutral built-in provider metadata.
|
Package providerregistry owns dependency-neutral built-in provider metadata. |
|
reasoning
Package reasoning is the provider-neutral vocabulary for model reasoning control: how hard a model should think, and which wire dialect expresses that to its provider.
|
Package reasoning is the provider-neutral vocabulary for model reasoning control: how hard a model should think, and which wire dialect expresses that to its provider. |
|
redact
Package redact applies the workspace's redaction policy to operator-visible text and structured values.
|
Package redact applies the workspace's redaction policy to operator-visible text and structured values. |
|
remainder
Package remainder owns the truncated-result spool and its caller-scoped visibility grants.
|
Package remainder owns the truncated-result spool and its caller-scoped visibility grants. |
|
runtime
Package runtime contains the shared invocation boundary for model-directed work.
|
Package runtime contains the shared invocation boundary for model-directed work. |
|
sdkadapter
Package sdkadapter - shared approval types.
|
Package sdkadapter - shared approval types. |
|
secretpath
Package secretpath matches configured workspace secret paths.
|
Package secretpath matches configured workspace secret paths. |
|
skills
Package skills defines independently typed, policy-bearing skills.
|
Package skills defines independently typed, policy-bearing skills. |
|
storage
Package storage provides the validation seam for durable agent events.
|
Package storage provides the validation seam for durable agent events. |
|
subagents
Package subagents provides shared prompt constants for sub-agent handlers.
|
Package subagents provides shared prompt constants for sub-agent handlers. |
|
testenv
Package testenv isolates a test binary from the developer's own machine state.
|
Package testenv isolates a test binary from the developer's own machine state. |
|
textutil
Package textutil provides small, dependency-free string-safety primitives shared by packages that must not depend on each other: rune-safe byte-cap truncation (jschema, delivery) and control-byte detection (workflows/controller, workflows/compiler).
|
Package textutil provides small, dependency-free string-safety primitives shared by packages that must not depend on each other: rune-safe byte-cap truncation (jschema, delivery) and control-byte detection (workflows/controller, workflows/compiler). |
|
tools
Package tools implements workspace-bound agent tools.
|
Package tools implements workspace-bound agent tools. |
|
ui/app
Package app is the root Bubble Tea model: a Screen router (a stack, not nullable dialog pointers - build spec section 4.5) plus the global keymap.
|
Package app is the root Bubble Tea model: a Screen router (a stack, not nullable dialog pointers - build spec section 4.5) plus the global keymap. |
|
ui/component/approval
Package approval renders one pending tool-approval request inline and turns keypresses into a ports.Decision.
|
Package approval renders one pending tool-approval request inline and turns keypresses into a ports.Decision. |
|
ui/component/blackboard
Package blackboard renders the interactive run blackboard and inter-agent messaging center in the Terminal UI.
|
Package blackboard renders the interactive run blackboard and inter-agent messaging center in the Terminal UI. |
|
ui/component/composer
Package composer is the multi-line message input plus a slash-command completion list and an @-mention file picker.
|
Package composer is the multi-line message input plus a slash-command completion list and an @-mention file picker. |
|
ui/component/field
Package field is one editable settings row: a label plus either free text (KindText, wrapping bubbles/textinput) or a cycled value from a closed set (KindChoice, no textinput at all - so an invalid value is unreachable, not merely rejected).
|
Package field is one editable settings row: a label plus either free text (KindText, wrapping bubbles/textinput) or a cycled value from a closed set (KindChoice, no textinput at all - so an invalid value is unreachable, not merely rejected). |
|
ui/component/history
Package history renders the message history overlay above the composer and lets the user navigate and select previous prompt messages.
|
Package history renders the message history overlay above the composer and lets the user navigate and select previous prompt messages. |
|
ui/component/picker
Package picker is a generic, minimal list picker.
|
Package picker is a generic, minimal list picker. |
|
ui/component/queue
Package queue renders the queued messages overlay above the composer and lets the user inspect, navigate, and remove queued messages.
|
Package queue renders the queued messages overlay above the composer and lets the user inspect, navigate, and remove queued messages. |
|
ui/component/statusline
Package statusline renders the permanent status row above the composer: the brand mark in the turn's state, the activity label, and the elapsed time while a turn is in flight, and the row is reserved (and shows the keymap hint) when it is not.
|
Package statusline renders the permanent status row above the composer: the brand mark in the turn's state, the activity label, and the elapsed time while a turn is in flight, and the row is reserved (and shows the keymap hint) when it is not. |
|
ui/component/topbar
Package topbar is the cockpit's fixed top row: the brand mark and wordmark on the left, the session's model and context usage on the right.
|
Package topbar is the cockpit's fixed top row: the brand mark and wordmark on the left, the session's model and context usage on the right. |
|
ui/component/transcript
Package transcript renders the conversation for the inline-first UI.
|
Package transcript renders the conversation for the inline-first UI. |
|
ui/component/welcome
Package welcome renders the start screen splash banner for a clean CLI session.
|
Package welcome renders the start screen splash banner for a clean CLI session. |
|
ui/jsonout
Package jsonout is the --output json renderer: newline-delimited JSON, one uievent.Event per line, in the same wire form testdata/ fixtures use.
|
Package jsonout is the --output json renderer: newline-delimited JSON, one uievent.Event per line, in the same wire form testdata/ fixtures use. |
|
ui/render
Package render turns theme roles into concrete lipgloss styles and renders structured event bodies (diffs, markdown, dialogs, headers) into styled text.
|
Package render turns theme roles into concrete lipgloss styles and renders structured event bodies (diffs, markdown, dialogs, headers) into styled text. |
|
ui/screen/conversation
agent_stall.go holds the "stalled" display derivation for the files panel's subagent rows.
|
agent_stall.go holds the "stalled" display derivation for the files panel's subagent rows. |
|
ui/screen/settings
Package settings is the full-screen /settings modal: a left nav sidebar (General, Models, MCP, Agents, Automations) beside a detail pane, keeping the top bar and a status row.
|
Package settings is the full-screen /settings modal: a left nav sidebar (General, Models, MCP, Agents, Automations) beside a detail pane, keeping the top bar and a status row. |
|
ui/screen/themepicker
Package themepicker is the alt-screen modal (build spec section 3.4) that live-previews and selects an app-wide theme.
|
Package themepicker is the alt-screen modal (build spec section 3.4) that live-previews and selects an app-wide theme. |
|
ui/screen/transcript
Package transcript is the full-screen pager over the conversation (cockpit-research.md rule 6.2).
|
Package transcript is the full-screen pager over the conversation (cockpit-research.md rule 6.2). |
|
ui/select
Package sel holds the value types for component-owned mouse text selection.
|
Package sel holds the value types for component-owned mouse text selection. |
|
ui/stream
Package stream is the non-TTY plain renderer: readable text with no ANSI escapes, no theme dependency, safe to pipe.
|
Package stream is the non-TTY plain renderer: readable text with no ANSI escapes, no theme dependency, safe to pipe. |
|
ui/theme
Package theme is the single source of style for internal/ui: semantic roles, never raw colours at call sites.
|
Package theme is the single source of style for internal/ui: semantic roles, never raw colours at call sites. |
|
uiadapter
Package uiadapter: Phase 2 Conversation and TurnHandle over chat.Session.
|
Package uiadapter: Phase 2 Conversation and TurnHandle over chat.Session. |
|
uikit/clipboardwrite
Package clipboardwrite shells out to the local system's clipboard tool as a fallback delivery path alongside OSC 52.
|
Package clipboardwrite shells out to the local system's clipboard tool as a fallback delivery path alongside OSC 52. |
|
uikit/config
Package config holds every timing, limit, and threshold used by the new UI in one place.
|
Package config holds every timing, limit, and threshold used by the new UI in one place. |
|
uikit/intent
Package intent carries user intents from the UI to the harness, the input side of the uievent contract.
|
Package intent carries user intents from the UI to the harness, the input side of the uievent contract. |
|
uikit/keymap
Package keymap is the keymap as data, not as code.
|
Package keymap is the keymap as data, not as code. |
|
uikit/ports
Package ports defines the consumer-side interfaces between the UI and the harness.
|
Package ports defines the consumer-side interfaces between the UI and the harness. |
|
uikit/replay
Package replay implements ports.Conversation/TurnHandle/Approver over a fixed sequence of uievent.Event, replayed on every Send call.
|
Package replay implements ports.Conversation/TurnHandle/Approver over a fixed sequence of uievent.Event, replayed on every Send call. |
|
uikit/termprobe
Package termprobe turns terminal environment facts into cockpit decisions.
|
Package termprobe turns terminal environment facts into cockpit decisions. |
|
uikit/uievent
Package uievent defines the canonical UI event stream: the contract between the harness and all three renderers (TUI, plain stream, JSON).
|
Package uievent defines the canonical UI event stream: the contract between the harness and all three renderers (TUI, plain stream, JSON). |
|
usage
Package usage defines the usage-accounting contract shared by the agent runtime and the storage layer.
|
Package usage defines the usage-accounting contract shared by the agent runtime and the storage layer. |
|
version
Package version reports build identity for the mivia CLI.
|
Package version reports build identity for the mivia CLI. |
|
workflows/controller
Package blockedpath detects when task text or agent output instructs a write to a workspace path that the host write-path policy blocklists for workflow agents.
|
Package blockedpath detects when task text or agent output instructs a write to a workspace path that the host write-path policy blocklists for workflow agents. |
|
workflows/definition
Package verifier provides the execution machinery for deterministic verifier profiles behind evidence_gate steps.
|
Package verifier provides the execution machinery for deterministic verifier profiles behind evidence_gate steps. |
|
workflows/delivery
Package delivery runs delivery commands against pinned git contexts.
|
Package delivery runs delivery commands against pinned git contexts. |
|
workflows/ledger
Package agenttools exposes in-process workflow tools for the agent surface.
|
Package agenttools exposes in-process workflow tools for the agent surface. |
|
workflows/localengine
Package localengine provides an in-process workflow Engine for agent tools.
|
Package localengine provides an in-process workflow Engine for agent tools. |
|
workspace
Package workspace confines filesystem access to a root directory.
|
Package workspace confines filesystem access to a root directory. |
Click to show internal directories.
Click to hide internal directories.