Skip to main content

Module facets

Module facets 

Source
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.

Re-exports§

pub use crate::config_policy::CommandConfigStatusContext;
pub use crate::config_policy::CommandPermissionsContext;
pub use debug_receipts::*;

Modules§

debug_receipts
Receipt output data, moved from the shared receipt builder without schema changes. The builder stays host-owned; CLI, API and slash commands share these shapes.

Structs§

CommandApprovalState
Host approval posture for the /restore trust gate (D4: no MODE_POLICY).
ConversationExportProjection
Full conversation projection (D3/D8/D9).
DebugBalanceProjection
Only the provider identity and support decision consumed by /balance. The adapter derives support from the authoritative provider policy; the portable handler decides whether to emit FetchBalance or the original text.
DebugBoundedList
DebugBoundedString
DebugCacheControl
DebugCacheInspectionObservation
One coherent observation, including previous inspection before any write. Inspect errors occur before this value exists and never update session state.
DebugCacheRates
Prompt-cache hit rates, each labelled by whose requests it covers (#6565).
DebugCacheTelemetry
Shared source for /cache [count|stats|zones] branches. One host read preserves ring order, optional telemetry and prefix stability evidence.
DebugCacheTurn
A bounded turn row. Pricing class partition and amount come from the authoritative host, not a second implementation of provider billing. Missing telemetry, missing audit and a measured zero remain distinct.
DebugChangeProjection
DebugConversationUndo
Prepared conversation-only undo: display cells to remove after Engine acknowledgement, and the conversation to install as its history.
DebugCostProjection
Already-authoritative monetary values and bounded route attribution. Calculation and price/source selection stay with the TUI host; formatting, ordering and coverage wording belong to the portable handlers.
DebugCountOnly
DebugPromptContext
The prompt-json shape retains known/unknown state and full ordered tool fields, not an opaque pre-rendered JSON string from the host.
DebugPromptContextSection
DebugPromptInspection
DebugPromptLayer
A cache inspection’s semantic layer, retaining the same public JSON field order as the baseline without borrowing the client request type.
DebugPromptSourceMap
DebugPromptTool
Only the schema field is arbitrary structured JSON, as on the live tool catalog. Optional transport fields retain the core Tool’s omission rules.
DebugRestoredFile
DebugRouteCost
DebugSourceEntry
DebugSystemProjection
Only the data read by the /system renderer, with the host’s mode label.
DebugTokenProjection
Published usage telemetry remains optional: absence is not zero.
DebugToolProjection
DebugToolResultInspection
DebugToolSnapshot
One frozen prepared-request snapshot; no registry or client reference.
DebugTurnMetaInspection
DebugTurnStopDiagnostics
Precise, terminal facts: every optional counter retains unknown vs zero.
DebugUndoRestored
DebugWarmupKey
Full key fields are needed for the existing comparison and JSON report; the short hash is computed by the authoritative host hashing function.
ExportMessage
One projected authoritative message (D3).
ExportMetadata
Portable conversation metadata for the export header (D3).
HostedWorkTarget
/remote-env open hosted-work target. The URL is fully encoded host-side (the portable handler must not depend on urlencoding); repo/branch echo the raw values used by the baseline message replacements.
MediaAttachmentReceipt
Portable receipt for a successful atomic media attachment (FEAT-018 D4). Carries only the information needed for the existing confirmation text.
MemoryDelete
Zero-field success value for delete operations (D2): the handler already owns the selected scope and needs no additional success data.
MemoryExport
Portable export payload — the exported memory document itself, never a preformatted command response.
MemoryHit
Portable semantic hit for a native-memory search or get result.
MemoryReindex
Portable reindex entry count.
MemoryRemembered
Portable result of a successful remember operation.
MemoryStatus
Portable native-memory location summary (status operation).
PlanSections
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.
PlanStep
One semantic plan checklist item.
PluginDetail
Portable full bundle detail for show/review/validate rendering (FEAT-020 D2).
PluginDiagnostic
Portable plugin diagnostic entry.
PluginDshPreview
Portable review of a DeepSeek Harness bundle package before import: what converts, what is skipped, the authority it will request, and the content hash an exact install of the same package stages.
PluginExportReceipt
Portable bundle export receipt (FEAT-020 D2).
PluginLegacyScan
Portable legacy-tool scan result: directory, discovered tools, and load diagnostics for scripts that asked for something the loader ignored.
PluginLegacyTool
Portable legacy executable-tool detail (FEAT-020 D2).
PluginManagedCandidate
Portable Kimi managed-plugin candidate (FEAT-020 D2).
PluginManagedScan
Portable Kimi managed-scan result (FEAT-020 D2).
PluginMarketplaceAddReceipt
Portable marketplace add receipt (FEAT-020 D2).
PluginMarketplaceCandidate
Portable marketplace candidate (FEAT-020 D2).
PluginMarketplaceCatalog
Portable marketplace catalog (FEAT-020 D2).
PluginMarketplaceState
Portable marketplace state: stored catalogs plus an optional host-provided built-in official catalog.
PluginMcpServerDetail
Portable MCP server detail for the capability review body (FEAT-020 D2).
PluginMutationReceipt
Portable mutation receipt returned synchronously by the facet (FEAT-020 D11).
PluginSuggestion
Portable suggestion for the /plugin suggest recommendation output.
PluginSuggestionDismissals
Plugins hidden from proactive suggestions (plugin policy rule 9). Names are lowercase; each list is sorted.
PluginSummary
Portable summary of one loaded plugin bundle (list output, FEAT-020 D2).
ProjectGoalState
Portable goal projection (FEAT-021 D1).
RelayProjection
/relay semantic 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.
RemoteLink
/rc link structured link data.
RemoteSkillEntry
One curated remote registry entry (/skills --remote).
RemoteStartInfo
/rc start wording input: the active-turn copy is used while a turn is loading or a dispatch is in flight.
RestoreSnapshot
One snapshot projected to semantic fields (D8).
ResumeImportReceipt
Portable /resume import receipt. The handler renders Imported foreign session as {truncated_id} ({entry_count} entries, leaf {leaf_display}), and carries sync so the engine adopts the imported conversation instead of staying on the previous one.
SessionArchiveReceipt
/sessions archive|unarchive|restore success projection. The handler renders Archived session {id} ({title}) or Restored session ... from the verb it dispatched.
SessionBranchOutcome
/branch success projection (session/branch.rs). The handler composes the exact success line from these deterministic fields.
SessionForkFromReceipt
/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.
SessionForkReceipt
/fork success projection for an active-conversation fork. The handler composes Forked session {parent} -> {fork} from these required fields.
SessionNewReceipt
/new success projection. The handler renders Started new session {truncated_id} (New Session). Previous sessions remain available via /resume.
SessionSaveReceipt
/save success projection. The host performs the full baseline sequence (snapshot, serialization, atomic write, metadata application, work-state publication); the handler renders Session saved to {display_path} (ID: {truncated_id}).
SessionSyncPayload
Portable synchronization fields carried by shared session and debug actions. Conversation and prompt types are protocol-owned shapes; concrete runtime state and host action conversion remain outside the command contract.
SessionTitleReceipt
/rename success receipt; the title is the sanitized persisted value so the handler echoes exactly what was written.
SkillActivationOutcome
Successful skill activation data (host performs the side effects).
SkillEntry
One discovered skill entry (portable).
SkillMutationReceipt
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.
SkillRecommendation
Remote recommendation for /skills suggest <task>.
SkillRegistryProjection
Portable projection of the host skill registry (discovery, D1).
SnapshotEntry
One snapshot entry for /restore listings.
StructcopyGate
StructcopyPathRoots
Host observations only. Root eligibility, sorting and labels are command policy, and remain portable. Canonicalization failure is ordinary absence.
StructcopyPlan
StructcopyPlanItem
StructcopyToolPair
StructcopyToolResult
StructcopyTranscript
StructcopyUsage
StructcopyWorkflow
Typed form of the existing bounded workflow summary projection. It carries no raw journal events, owner IDs, paths, or executable runtime state.
TitleReport
Bare /title status projection (Window title: [{effective}]{source}).
ToolCallerProjection
One tool-call caller projection (D3). Only the fields the baseline export renders cross the boundary.
TurnHandoffProjection
Turn-handoff projection (D2).

Enums§

DebugActivationReason
DebugCacheInspectionUnavailable
DebugCountingConfidence
DebugDiffObservation
DebugEvidence
DebugPromptLayerStability
DebugProviderAvailability
DebugReceiptError
DebugRestoreAction
DebugSourceKind
DebugSystemPrompt
Source text consumed by /system; retain Text/Blocks/None separately so the portable handler alone owns the separators and empty-state text.
DebugToolProvenance
DebugToolVisibility
DebugTurnOutcomeStatus
DebugTurnStopReason
DebugUndoOutcome
ExportBlock
One projected content block (D3/D9).
HistoryEntry
One projected visible-history fallback entry (D3).
MemoryDeleteScope
Typed delete scope for the non-workspace delete method (D8/D9).
MemoryGetOutcome
Portable get outcome: found hit or explicit not-found.
MemoryImportOutcome
Portable import outcome: imported (with destination) or skipped.
MemoryRememberTarget
Typed remember target (D9): the handler resolves workspace identity through the workspace facet and passes the resulting typed ID here.
PlanProjection
Plan-state distinction for the relay snapshot. Busy reproduces the baseline try_lock failure branch; Absent reproduces an empty snapshot.
PlanStepStatus
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/completed labels.
PluginDiagnosticLevel
Portable plugin diagnostic level (FEAT-020 D2).
PluginMarketplaceInstallPlan
Portable marketplace candidate install plan (FEAT-020 D2).
PluginMcpTransport
Portable MCP transport classification for the capability review body.
PluginMutationOutcome
Portable outcome of a plugin mutation (FEAT-020 D2/D11).
ProjectGoalStatus
Portable goal status for the project facet (FEAT-021 D1).
RemoteOpenOutcome
/rc open outcome. Browser launch stays synchronous and single-attempt; no deferred external-URL action is produced (D6).
RemoteRegistryOutcome
Remote registry fetch outcome (/skills --remote, suggest source).
RestorePointProjection
Restore-point projection with distinct baseline states (D3/D8).
ResumeSource
/resume route resolution (D6). The host resolves argument shape and performs container imports atomically; the handler selects the exact baseline message/action per variant.
ReviewOutcome
/review outcome data (host performs the side effects).
SkillActivationError
Activation failures with the exact data the handler renders.
SkillBundledTier
Curated product tier for bundled (shipped) skills.
SkillMutationOutcome
Portable mutation outcome mirroring the host receipt variants.
SkillSourceKind
Source provenance of a discovered skill (native file vs reviewed plugin snapshot).
SkillSyncEntry
Per-skill outcome of /skills sync.
SkillSyncOutcome
Aggregate /skills sync outcome.
SkillTargetScope
Target scope for skill mutations (/skill install|update|uninstall|trust).
StructcopyBlock
StructcopyContent
StructcopyError
StructcopyExecutionStatus
StructcopyPlanStatus
StructcopyTransport
StructcopyWorkflowStatus
TitleSource
TodoProjection
To-do state distinction for the relay snapshot. The rendered body (if any) is produced host-side from the authoritative graph-backed snapshot seam.
TranscriptProjection
Transcript source precedence (D3): authoritative API messages when present, otherwise the sanitized visible-history fallback.
TreeBodyProjection
/tree body projection. The body rendering source (journal tree and linear transcript) stays TUI-owned; the handler appends the exact guidance lines (D5).

Traits§

CommandCostContext
Cost display and accounting operations.
CommandDebugChangeContext
CommandDebugDiagnosticsContext
Narrow, synchronous data boundary for the debug diagnostics slice.
CommandDebugDiffContext
CommandDebugHistoryContext
CommandDebugReceiptsContext
CommandDebugUndoContext
CommandMediaContext
Atomic composer/media capability (FEAT-018 D4).
CommandMemoryContext
Host memory data for the memory command group (FEAT-019 D1).
CommandModePolicyContext
Operating mode, approval posture, shell access, and policy lock.
CommandModelContext
Model selection, provider identity, and fallback chain.
CommandPluginContext
Host plugin data for the plugin command group (FEAT-020 D1).
CommandPresentationContext
Stable-key translation with named replacements (FEAT-018 D3).
CommandProjectContext
Host project data for the project command group (FEAT-021 D1).
CommandSessionContext
Session identity, messages, queue operations, and token totals.
CommandSessionControlContext
Control authority for the session command slice (FEAT-024 D2/D5).
CommandSessionExportContext
Session-export authority for the /export slice (FEAT-025 D1-D9).
CommandSessionLifecycleContext
Lifecycle authority for the session command slice (FEAT-023 D2).
CommandSessionStructcopyContext
Exact authority for /structcopy, independent of session export/recovery. Observations do not mutate the session. Clipboard is the sole side effect; the caller chooses it only after successful rendering and never for stdout.
CommandSkillGroupContext
Host skill data for the skills command group (FEAT-022 D1).
CommandSkillsContext
Active skill identity and skill-cache refresh.
CommandSystemPromptContext
Read access to the effective system prompt.
CommandWorkspaceContext
Workspace path and a bounded serialized work-state snapshot.