Expand description
Independent, object-safe capability shapes for staged command migration.
FEAT-014 publishes these interfaces without implementing them for the TUI
or changing an existing command. Later work adopts them inside
codewhale-tui one command group at a time. Only after every group uses
these shapes will groups move physically into a commands crate.
Structs§
- Command
Approval State - Host approval posture for the
/restoretrust gate (D4: no MODE_POLICY). - Hosted
Work Target /remote-env openhosted-work target. The URL is fully encoded host-side (the portable handler must not depend onurlencoding); repo/branch echo the raw values used by the baseline message replacements.- Media
Attachment Receipt - Portable receipt for a successful atomic media attachment (FEAT-018 D4). Carries only the information needed for the existing confirmation text.
- Memory
Delete - Zero-field success value for delete operations (D2): the handler already owns the selected scope and needs no additional success data.
- Memory
Export - Portable export payload — the exported memory document itself, never a preformatted command response.
- Memory
Hit - Portable semantic hit for a native-memory search or get result.
- Memory
Reindex - Portable reindex entry count.
- Memory
Remembered - Portable result of a successful remember operation.
- Memory
Status - Portable native-memory location summary (status operation).
- Plan
Sections - Semantic plan snapshot fields consumed by
/relay. Values are the raw snapshot values; the handler applies the baseline trim/empty filtering and label composition so ordering and spacing stay byte-identical. - Plan
Step - One semantic plan checklist item.
- Plugin
Detail - Portable full bundle detail for show/review/validate rendering (FEAT-020 D2).
- Plugin
Diagnostic - Portable plugin diagnostic entry.
- Plugin
Export Receipt - Portable bundle export receipt (FEAT-020 D2).
- Plugin
Legacy Scan - Portable legacy-tool scan result: directory and discovered tools.
- Plugin
Legacy Tool - Portable legacy executable-tool detail (FEAT-020 D2).
- Plugin
Managed Candidate - Portable Kimi managed-plugin candidate (FEAT-020 D2).
- Plugin
Managed Scan - Portable Kimi managed-scan result (FEAT-020 D2).
- Plugin
Marketplace AddReceipt - Portable marketplace add receipt (FEAT-020 D2).
- Plugin
Marketplace Candidate - Portable marketplace candidate (FEAT-020 D2).
- Plugin
Marketplace Catalog - Portable marketplace catalog (FEAT-020 D2).
- Plugin
Marketplace State - Portable marketplace state: stored catalogs plus an optional host-provided
built-in
officialcatalog. - Plugin
McpServer Detail - Portable MCP server detail for the capability review body (FEAT-020 D2).
- Plugin
Mutation Receipt - Portable mutation receipt returned synchronously by the facet (FEAT-020 D11).
- Plugin
Suggestion - Portable suggestion for the
/plugin suggestrecommendation output. - Plugin
Summary - Portable summary of one loaded plugin bundle (list output, FEAT-020 D2).
- Project
Goal State - Portable goal projection (FEAT-021 D1).
- Project
Share Projection - Portable session-share projection (FEAT-021 D1).
- Relay
Projection /relaysemantic snapshot (D4). The handler composes the byte-identical instruction from these deterministic fields;crate::prompts,crate::todo_snapshot, goal/todo/plan machinery, Work-state objects, and locks stay host-side.- Remote
Link /rc linkstructured link data.- Remote
Skill Entry - One curated remote registry entry (
/skills --remote). - Remote
Start Info /rc startwording input: the active-turn copy is used while a turn is loading or a dispatch is in flight.- Resume
Import Receipt - Portable
/resumeimport receipt. The handler rendersImported foreign session as {truncated_id} ({entry_count} entries, leaf {leaf_display}). - Session
Archive Receipt /sessions archive|unarchive|restoresuccess projection. The handler rendersArchived session {id} ({title})orRestored session ...from the verb it dispatched.- Session
Branch Outcome /branchsuccess projection (session/branch.rs). The handler composes the exact success line from these deterministic fields.- Session
Fork From Receipt /fork <session_id|prefix>success projection. Explicit-source forks always report their spawn depth, so the contract makes that field required rather than permitting an invalid missing-depth state.- Session
Fork Receipt /forksuccess projection for an active-conversation fork. The handler composesForked session {parent} -> {fork}from these required fields.- Session
NewReceipt /newsuccess projection. The handler rendersStarted new session {truncated_id} (New Session). Previous sessions remain available via /resume.- Session
Save Receipt /savesuccess projection. The host performs the full baseline sequence (snapshot, serialization, atomic write, metadata application, work-state publication); the handler rendersSession saved to {display_path} (ID: {truncated_id}).- Session
Sync Payload - Portable synchronization fields a lifecycle handler maps into the
temporary
SyncSessionaction payload. The conversation and prompt types arecodewhale-corerequest types shared by the contract and the TUI (FEAT-037 will move shared outcome ownership; FEAT-023 keeps the bounded reference only for/forkand/newtransitions, D6). - Session
Title Receipt /renamesuccess receipt; the title is the sanitized persisted value so the handler echoes exactly what was written.- Skill
Activation Outcome - Successful skill activation data (host performs the side effects).
- Skill
Entry - One discovered skill entry (portable).
- Skill
Mutation Receipt - Synchronous portable receipt for a skill mutation (FEAT-020 D11 mirror): the host owns the async network bridge; the handler renders the receipt byte-identically from these values.
- Skill
Recommendation - Remote recommendation for
/skills suggest <task>. - Skill
Registry Projection - Portable projection of the host skill registry (discovery, D1).
- Snapshot
Entry - One snapshot entry for
/restorelistings. - Title
Report - Bare
/titlestatus projection (Window title: [{effective}]{source}).
Enums§
- Memory
Delete Scope - Typed delete scope for the non-workspace delete method (D8/D9).
- Memory
GetOutcome - Portable get outcome: found hit or explicit not-found.
- Memory
Import Outcome - Portable import outcome: imported (with destination) or skipped.
- Memory
Remember Target - Typed remember target (D9): the handler resolves workspace identity through the workspace facet and passes the resulting typed ID here.
- Plan
Projection - Plan-state distinction for the relay snapshot.
Busyreproduces the baselinetry_lockfailure branch;Absentreproduces an empty snapshot. - Plan
Step Status - Portable plan-step status. The adapter maps the TUI plan status onto this
semantic enum; the command handler remains the sole owner of the exact
pending/in_progress/completedlabels. - Plugin
Diagnostic Level - Portable plugin diagnostic level (FEAT-020 D2).
- Plugin
Marketplace Install Plan - Portable marketplace candidate install plan (FEAT-020 D2).
- Plugin
McpTransport - Portable MCP transport classification for the capability review body.
- Plugin
Mutation Outcome - Portable outcome of a plugin mutation (FEAT-020 D2/D11).
- Project
Goal Status - Portable goal status for the project facet (FEAT-021 D1).
- Remote
Open Outcome /rc openoutcome. Browser launch stays synchronous and single-attempt; no deferred external-URL action is produced (D6).- Remote
Registry Outcome - Remote registry fetch outcome (
/skills --remote, suggest source). - Resume
Source /resumeroute resolution (D6). The host resolves argument shape and performs container imports atomically; the handler selects the exact baseline message/action per variant.- Review
Outcome /reviewoutcome data (host performs the side effects).- Skill
Activation Error - Activation failures with the exact data the handler renders.
- Skill
Bundled Tier - Curated product tier for bundled (shipped) skills.
- Skill
Mutation Outcome - Portable mutation outcome mirroring the host receipt variants.
- Skill
Source Kind - Source provenance of a discovered skill (native file vs reviewed plugin snapshot).
- Skill
Sync Entry - Per-skill outcome of
/skills sync. - Skill
Sync Outcome - Aggregate
/skills syncoutcome. - Skill
Target Scope - Target scope for skill mutations (
/skill install|update|uninstall|trust). - Title
Source - Todo
Projection - To-do state distinction for the relay snapshot. The rendered body (if any) is produced host-side from the authoritative graph-backed snapshot seam.
- Tree
Body Projection /treebody projection. The body rendering source (journal tree and linear transcript) stays TUI-owned; the handler appends the exact guidance lines (D5).
Traits§
- Command
Cost Context - Cost display and accounting operations.
- Command
Media Context - Atomic composer/media capability (FEAT-018 D4).
- Command
Memory Context - Host memory data for the memory command group (FEAT-019 D1).
- Command
Mode Policy Context - Operating mode, approval posture, shell access, and policy lock.
- Command
Model Context - Model selection, provider identity, effort, and fallback chain.
- Command
Plugin Context - Host plugin data for the plugin command group (FEAT-020 D1).
- Command
Presentation Context - Stable-key translation with named replacements (FEAT-018 D3).
- Command
Project Context - Host project data for the project command group (FEAT-021 D1).
- Command
Session Context - Session identity, messages, queue operations, and token totals.
- Command
Session Control Context - Control authority for the session command slice (FEAT-024 D2/D5).
- Command
Session Lifecycle Context - Lifecycle authority for the session command slice (FEAT-023 D2).
- Command
Skill Group Context - Host skill data for the skills command group (FEAT-022 D1).
- Command
Skills Context - Active skill identity and skill-cache refresh.
- Command
System Prompt Context - Read access to the effective system prompt.
- Command
Workspace Context - Workspace path and a bounded serialized work-state snapshot.