curl -LsSf https://langch.in/dcode | bash
# With model provider extras
# OpenAI, Anthropic, and Gemini are included by default
DEEPAGENTS_CODE_EXTRAS="nvidia,ollama" curl -LsSf https://langch.in/dcode | bash
Run:
dcode
The fastest way to start using Deep Agents. deepagents-code is a pre-built coding agent in your terminal — similar to Claude Code or Cursor — powered by any LLM that supports tool calling. One install command and you're up and running, no code required.
What deepagents-code adds on top of the SDK:
By default, dcode trusts the directory you run it in. Human-in-the-loop approval gates model-requested tool calls, but project artifacts are read before any approval prompt.
Do not run dcode in a directory you do not trust without a sandbox backend. For untrusted repositories, use a remote sandbox so execution is isolated from your machine. Running dcode in a directory lets that directory's files shape execution. See THREAT_MODEL.md for details.
See our Releases and Versioning policies.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see the Contributing Guide.
This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.
Represents a queued user message awaiting processing.
Textual message carrying an external prompt or command.
An action deferred until the current busy state resolves.
Session state for the Textual app.
Posted whenever the chat's vertical scroll offset changes.
Posted whenever the bottom chrome's geometry changes.
Main Textual application for deepagents-code.
Posted by the background server-startup worker on success.
Posted by the background server-startup worker on failure.
Result from running the Textual application.
run_textual_app failure that still carries the app's final state.
Metadata for a single MCP tool.
Metadata for a configured MCP server and its tools.
An MCP configuration file is malformed or structurally invalid.
Lazy, per-server cache of persistent MCP sessions.
A project MCP server row shown to the user and gated for trust.
Raised when an external editor cannot be opened or read.
Represents a pasted image with its base64 encoding.
Represents a pasted video with its base64 encoding.
Structured version facts for a single installed distribution.
Network-free snapshot of the version facts diagnostics need.
Raised when installed extras cannot be determined safely.
Install status for one optional dependency extra.
Resolved recovery action for a missing provider package.
Structured proposal returned by the criteria agent.
A new proposal or a rejection-based regeneration.
An amendment to an accepted goal; both extra fields are required.
Main-agent state carrying a criteria request until it is cleared.
Private per-invocation state for the nested criteria agent.
Run goal-criteria requests entirely inside the main server graph.
Canonical goal/rubric fields used for notices and fingerprints.
Metadata extracted from a canonical goal-state notice.
tool.use hook payload (schema documented in hooks).
tool.error hook payload (schema documented in hooks).
tool.result hook payload (schema documented in hooks).
In-progress state for a single streamed tool call.
Counts of buffered tool calls that never emitted a tool.use.
Middleware that provides an ask_user tool for interactive questioning.
A single choice option for a multiple choice question.
A question to ask the user.
Request payload sent via interrupt when asking the user questions.
Trusted same-turn authorization recorded after an ask_user response.
Widget result when the user submits answers.
Widget result when the user cancels the prompt.
Declared context_schema for the agent graph.
Client-facing builder for the per-run graph context payload.
Discriminator for ConfigResolutionError reasons.
Structured error returned when a login target cannot be resolved.
Successful resolution of a merged MCP config for login.
Resolved server config plus enough context for error messages.
Agent state extended with the cumulative thread-cost channel.
Own the thread's cumulative _session_cost_usd checkpoint value.
Read-only rubric view returned by the get_rubric tool to the model.
Read-only goal view returned by the get_goal tool to the model.
State fields used by goal tools.
Expose constrained goal tools and maintain the goal-state notice.
Stable identifiers for notification actions dispatched by the app.
One button/action row in the notification modal.
Typed payload for a missing-dependency notification.
Typed payload for an update-available notification.
A single notice waiting for user action.
In-memory store of pending notifications.
Revert agent edits to the managed onboarding-name memory block.
A dangerous Unicode character found in text.
Safety analysis output for a URL string.
User-facing OAuth interaction surface shared by CLI and TUI.
Default OAuthInteraction that drives the flow via stdin/stdout.
Goal/rubric state channels shared by every schema that touches them.
Extends agent state with per-checkpoint facts restored on resume.
Persists per-checkpoint resume facts after each model call.
Validate shell commands against an allow-list without HITL interrupts.
Stock HITL routing with an async live-mode read after model completion.
A single labeled diagnostic fact.
A named group of related diagnostic items.
Character set mode for TUI display.
Character glyphs for TUI display.
Global settings and environment detection for deepagents-code.
Why /trace found no LangSmith key, when an empty override is involved.
Offline snapshot of LangSmith tracing configuration for diagnostics.
Base class for typed LangSmith project URL lookup failures.
The langsmith package is not installed.
The LangSmith project URL lookup exceeded its hard timeout.
The LangSmith SDK call raised — auth, 404, network, etc.
The LangSmith project does not exist yet (lookup returned 404).
Result of creating a chat model, bundling the model with its metadata.
Nested-grader state used to scope verification-tool budgets.
Run a context-aware nested grader and retry transient transport failures.
Thread metadata returned by list_threads.
Unified parse result for dropped-path payload detection.
Track pasted images and videos in the current conversation.
Token stats for a single model within a session.
Token and cost stats for one UsageKind bucket.
Usage returned after recording one streamed model message.
Stats accumulated over a single agent turn (or full session).
What a stream consumer last recorded for one request.
Tool-approval policy selected for an interactive thread.
Stored approval-mode control payload.
Active model configuration read from a tool runtime.
Add hook-aware automatic and explicit forced compaction for dcode.
A persisted API key credential.
A persisted OAuth subscription credential.
Result of a credential write that may have warnings to surface.
Result of a credential delete that may have warnings to surface.
A different dcode entry point is winning on PATH than the one we upgraded.
A single package version change parsed from uv's environment-diff output.
Raised when uv tool requested requirements cannot be preserved.
Path-safety and size limits for read-only repository inspection tools.
A single tool's display metadata.
A named group of tools sharing a source.
An MCP server that was discovered but currently exposes no tools.
Everything dcode tools list needs to render, in display order.
Classification that controls whether a command can skip the message queue.
A single slash-command definition.
A single autocomplete entry for the slash-command controller.
OSC 9;4 progress states.
Complete set of semantic colors for one theme variant.
Metadata for a registered theme.
Structured log record retained by the in-memory debug buffer.
Logging handler retaining the most recent structured records in memory.
A transport-independent event delivered from outside the TUI.
Source of external events for the Textual app.
Line-delimited JSON event source over a local Unix domain socket.
Parsed origin remote attribution for coding-agent-v1 traces.
Full configuration payload passed from the app to the server subprocess.
Swap the model or per-call settings from runtime.context.
Raised when model configuration or creation fails.
Raised when no credentials are configured for any default-resolvable provider.
Raised when neither the app nor init_chat_model can infer a provider.
Raised when a provider is selected but its API key env var is unset.
Raised when a provider is selected but its LangChain package is not installed.
Credential readiness state for a model provider.
Origin of a CONFIGURED credential, used to discriminate display.
Credential readiness information for a provider.
A model specification in provider:model format.
Profile data for a model with override tracking.
Configuration for a model provider.
Parsed model configuration from config.toml.
A project-scoped, definition-bound MCP server approval.
User-level allow/deny lists for project MCP servers.
Coalesced thread-selector configuration read from a single TOML parse.
How an option's raw env/TOML value is coerced to a typed value.
One user-tunable configuration option and where it can be set.
Metadata for a custom subagent loaded from filesystem.
State for local context middleware.
Inject local context (git state, project structure, etc.) into the system prompt.
Classifier denial categories exposed to the agent and TUI.
One structured classifier decision for a proposed tool call.
Validated classifier response for one unresolved action batch.
Server-owned denial and availability counters for one thread.
Checkpoint-safe disposition for one gated call.
Private checkpoint record joining model output to after-model routing.
Server-owned provenance for one exclusively allocated scratch file.
Reducer update that creates or removes one exact artifact record.
Agent state carrying private Auto decisions and scratch provenance.
Trusted metadata attached by the Textual client to a user message.
Apply deterministic policy, classifier review, and HITL fallback.
Reject dynamically gated MCP calls when no approval UI exists.
Line counts for a change, named so the pair cannot be swapped silently.
Raised when a downloaded archive fails SHA-256 verification.
Raised when no managed helper binary is available for this system.
Parsed MCP server config entry.
File-backed TokenStorage under ~/.deepagents/.state/mcp-tokens/.
Raised when an MCP server needs interactive re-authentication.
Deterministic chat model for integration tests.
Deterministic tool-calling model for auto-approve integration tests.
Exercise nested criteria generation with a repository read.
Data used to render HITL previews.
Line and byte level metrics for a file operation.
Track a single filesystem tool call.
Collect file operation metrics during an interaction.
Stored content for a collapsed paste.
Explicit user/project path context for project-sensitive behavior.
Whether a probed path exists, is absent, or could not be read.
Local directory or JSON file used as a marketplace source.
GitHub or Git repository used as a marketplace source.
Marketplace manifest downloaded from an HTTP URL.
Parsed plugin manifest.
Inventory of supported plugin components.
A discovered plugin ready to feed dcode adapters.
A plugin stored relative to its marketplace.
A plugin sourced from a GitHub repository.
A plugin sourced from a subdirectory in a Git repository.
A plugin sourced from a Git repository URL.
A catalog entry from a marketplace manifest.
A parsed marketplace manifest.
Persisted marketplace source record.
Install record for a plugin.
Result from plugin discovery.
Raised when a plugin manifest is malformed enough to skip the plugin.
Raised when existing plugin state cannot be safely modified.
Raised when a marketplace cannot be loaded.
Load namespaced plugin skills without extending the SDK source API.
Client that talks to a LangGraph server over HTTP+SSE.
Raised when the HITL interrupt loop exceeds _MAX_HITL_ITERATIONS rounds.
A tool call whose tool.use has fired but whose result has not arrived.
Mutable state accumulated while iterating over the agent stream.
Best-effort background LangSmith thread URL lookup state.
Manages a langgraph dev server subprocess.
An option paired with its resolved effective value, for display.
A tool.result payload held back until the authoritative result arrives.
A validated rubric_evaluation_end event forwarded to the caller.
Adapter for rendering agent output to Textual widgets.
Ask whether to compact a just-resumed thread before the next turn.
Arrow-key navigable plugin manager for /plugins.
Posted when a plugin manager tab label is clicked.
Mouse-clickable tab label in the plugin manager header.
Compact welcome banner shown at startup.
Confirmation overlay before /update --deps upgrades dcode itself.
Confirmation overlay for a dependency refresh.
Confirmation overlay for installing an arbitrary --package.
Confirmation overlay for installing a model provider's extra.
Keep the current goal and lifecycle state visible above the input.
In-TUI first-run notice describing what Auto mode does.
Resolve an inline prompt result at most once.
Soft-wrapping text input shared by inline prompts.
Posted when the user presses Enter to submit text.
Render a selectable inline-prompt option with a cursor gutter.
Strategy for building a tool's HITL approval widget.
Renderer for write_file tool - shows full file content.
Renderer for task tool — interrupt description provides full context.
Renderer for delete tool - shows removed file content when available.
Renderer for edit_file tool - shows unified diff.
Dismissal payload identifying which action the user picked.
Posted when a notification row is clicked with the mouse.
Posted when the user picks SUPPRESS from a notification's detail modal.
Posted for an action that opens a follow-up modal in place.
Modal listing pending notifications with drill-in details.
Free-form answer input for ask-user questions.
Posted when the user presses Enter to submit an ask-user answer.
Interactive widget for asking the user questions.
Message sent when user submits all answers.
Message sent when user cancels the ask_user prompt.
Types of messages in the chat.
Status of a tool call.
In-memory message data for virtualization.
Manages message data and widget window for virtualization.
Docked two-pane panel visualizing js_eval subagent fan-out by phase.
Modal visualization of the current model context window.
Ask before changing agents to resume a thread.
Captured stdout printed during a js_eval evaluation.
A successful js_eval evaluation result.
An error raised during a js_eval evaluation.
Run the ChatGPT OAuth Authorization Code Flow with PKCE inline.
Outcome of the CodexSignedInScreen quick-action overlay.
Quick-action overlay shown when openai_codex is already signed in.
Approval overlay for a skill resolving outside trusted directories.
Base class for tool approval widgets.
Generic approval widget for unknown tools.
Approval widget for write_file - shows file content with syntax highlighting.
Approval widget for edit_file - shows clean diff with colors.
Modal dialog for theme selection with live preview.
TextArea that detects paste-like keystroke bursts.
Paste-aware text area that collapses large pastes into placeholders.
Widget result when the generated criteria are accepted unchanged.
Widget result when the user submits revised criteria.
Widget result when the user rejects criteria with feedback.
Widget result when the user cancels the proposal.
Text input that keeps goal-review edit keystrokes inside the editor.
Posted when the user presses Enter to submit goal-review text.
Posted when Escape should leave goal criteria edit mode.
Inline review widget for generated goal acceptance criteria.
Message sent when the user accepts, edits, or cancels.
A clickable completion option in the autocomplete popup.
Message sent when a completion option is clicked.
Small clickable button shown at the right edge of the chat input row.
Message sent when an input action button is clicked.
Popup widget that displays completion suggestions as clickable options.
Message sent when a completion option is clicked.
TextArea subclass with custom key handling for chat input.
Message sent when text is submitted.
Request previous history entry.
Request next history entry.
Message sent when paste payload resolves to file paths.
Message sent when a paste is large enough to be collapsed.
Posted when the user presses a printable key or backspace.
Chat input widget with prompt, multi-line text, autocomplete, and history.
Message sent when input is submitted.
Message sent when input mode changes.
Posted when the user presses a printable key or backspace in the input.
Modal dialog for switching between available agents.
Manages command history with file persistence.
One startup tip displayed above the chat input.
Modal asking whether to restart the server after an MCP login.
Modal asking whether to reconnect after /mcp disable/enable toggles.
Confirmation overlay for /mcp reconnect --force with no pending login.
Approval menu using standard Textual patterns.
Message sent when user makes a decision.
A selectable tool item in the MCP viewer.
Read-only modal for a failed MCP server's error details.
A selectable server-header row in the MCP viewer.
Modal viewer for active MCP servers and their tools.
Posted when the changelog row is clicked with the mouse.
Modal dedicated to the update-available notification.
Ask whether to reload after leaving the plugin manager.
Outcome of the YOLO first-enable notice.
In-TUI acknowledgement shown before unrestricted YOLO becomes active.
Animated spinner using charset-appropriate frames.
Animated loading indicator with status text and elapsed time.
One-time choice for how Auto mode handles generated goal criteria.
Onboarding screen that asks for the user's name.
Onboarding screen that summarizes installed optional integrations.
Which stored preference Ctrl+S toggles, and how the footer names it.
A clickable model option in the selector.
Message sent when a model option is clicked.
Full-screen modal for model selection.
Modal asking whether to switch cwd when resuming or switching to a thread.
Ask how project hooks in a newly entered workspace should be trusted.
Posted when an _ActionOption is clicked with the mouse.
Modal displaying a single notification's title, body, and actions.
The closed set of LangSmith region selections in the /auth prompt.
Outcome of resolving the region selector to an endpoint to persist.
Outcome of an AuthPromptScreen interaction.
Confirm before launching an authentication flow for a model.
Confirmation overlay shown before clearing a stored credential.
Modal that captures and persists an API key for one provider.
Modal that lists configured providers and lets the user manage keys.
Posted when a key prompt successfully persists credentials.
Posted when a key prompt deletes stored credentials.
A single row in the console's session snapshot.
Modal showing a session snapshot and a live tail of recent log records.
Result of handling a key event in the completion system.
Protocol for views that can display completion suggestions.
Protocol for completion controllers.
Controller for / slash command completion.
Controller for @ file completion with fuzzy matching from current cwd.
Manages multiple completion controllers, delegating to the active one.
Modal dialog for selecting a reasoning effort level.
Result of formatting tool output for display.
Widget displaying a user message.
Posted when the collapsed-body expansion state changes.
Widget displaying a queued (pending) user message in grey.
Widget displaying a skill invocation with collapsible body.
Widget displaying an assistant message with markdown support.
Widget displaying a tool call with collapsible output.
Collapsed one-line stand-in for an assistant step's tool calls.
Widget displaying a diff with syntax highlighting.
Widget displaying an error message.
Compact grader result with complete, scrollable details on demand.
Posted when the grader-details expansion state changes.
Widget displaying an app message.
Widget displaying a summarization completion notification.
A label that displays a model name with smart truncation.
A label that displays the git branch with glyph-aware truncation.
A bullet-separated chain of session metrics.
Two-line status bar for session identity and runtime metrics.
Raised by MCPLoginScreen.action_cancel when the user cancels the flow.
Modal that renders the OAuth login flow and collects user input.
Modal that shows self-update progress and a bounded log tail.
A clickable thread option in the selector.
Message sent when a thread option is clicked.
Emit scroll changes so the parent can refresh the overflow indicator.
Message sent when the controls pane scroll position changes.
Confirmation modal shown before deleting a thread.
Options dropdown overlay that consumes option navigation while focused.
Options dropdown that keeps focus contained while its menu is open.
Modal dialog for browsing and resuming threads.
Modal asking whether to restart the server for a spawn-time change.
Modal dialog for managing warning preferences.
One JSONL record in a materialized transcript projection.
Identity of a materialized transcript file.
Append-only JSONL transcript projections owned by the client process.
Collect completed stream messages into a Hooks transcript runtime.
Live client identity projected into every hook invocation.
Result of a lifecycle hook that may halt the caller.
Result of UserPromptSubmit, including its prompt rewrites.
Owns the Hooks v2 runtime, presenter, hook service, and transcripts.
Validated output and diagnostics from one command handler.
Agent state extensions for server-owned hook middleware.
Emit server-owned lifecycle events over the hook interrupt transport.
Client approval decision compatible with HITL resume payloads.
Normalized result shared by TUI and headless permission handling.
How one batch of gated tool calls was resolved by hooks.
Raised when a client-owned hook stops lifecycle processing.
Client state required to create a domain hook invocation.
Execute client-owned events and apply their common side effects.
Persisted trust record for one canonical workspace root.
Versioned on-disk trust store for project-scoped hooks.
Decides whether project-scoped hooks may run in a given directory.
Supported hook handler executor kinds.
How non-JSON stdout is treated on a successful exit.
How exit code 2 is interpreted for an event.
How matching handler effects are combined.
Immutable capability description for one hook event.
Origin of the matcher groups contributed by one hooks document.
A project or user hooks file, which defines no variables.
Origin and environment for groups one enabled plugin contributed.
Validated configuration plus load diagnostics and source paths.
Execute Hooks v2 invocations against one immutable snapshot.
LangGraph interrupt envelope for a server-owned hook invocation.
Callable that surfaces a user-visible hook notice.
Callable that updates hook-owned transient status text.
Lifecycle update for one running hook handler.
Present hook output consistently across interactive and headless clients.
One ordered command handler in a configuration snapshot.
Matched handlers for one invocation.
Immutable, declaration-ordered Hooks v2 runtime configuration.
Client-only materialization needed to build one hook wire envelope.
Client-owned session runtime around an immutable Hooks snapshot.
Adapt hook invocations and handler output across the wire boundary.
Deduplicate hook fulfillment for one client session.
Supported hook lifecycle events.
Process responsible for originating an event.
Reason a session-start event occurred.
Reason a session-end event occurred.
dcode lifecycle notifications with compatible wire mappings.
Reason context compaction was requested.
Native tool-call data used by hook lifecycle owners.
Resolved subagent identity.
A notification emitted by a dcode lifecycle owner.
Background task state captured for a hook invocation.
Scheduled session prompt captured for a hook invocation.
Context shared by every domain hook event.
Domain payload for SessionStart.
Domain payload for UserPromptSubmit.
Domain payload for SessionEnd.
Domain payload for PermissionRequest.
Domain payload for Notification.
Domain payload for PreToolUse.
Domain payload for PostToolUse.
Domain payload for PostToolUseFailure.
Domain payload for PreCompact.
Domain payload for Stop.
Domain payload for SubagentStart.
Domain payload for SubagentStop.
A domain hook event with its invocation context.
Structured diagnostic produced while processing a hook.
Normalized permission result from hook processing.
Fields common to every event-specific hook decision.
Decision returned for SessionStart.
Decision returned for UserPromptSubmit.
Decision returned for SessionEnd.
Decision returned for PermissionRequest.
Decision returned for Notification.
Decision returned for PreToolUse.
Decision returned for PostToolUse.
Decision returned for PostToolUseFailure.
Decision returned for PreCompact.
Decision returned for Stop.
Decision returned for SubagentStart.
Decision returned for SubagentStop.
Normalized effect produced by one hook handler.
Configuration for a synchronous command hook.
A matcher and its ordered hook handlers.
Top-level configuration grouped by hook event.
Permission modes exposed by the compatible wire protocol.
Notification matcher values exposed on the wire.
Wire representation of model effort.
Permission rule returned by a hook.
Configuration scope targeted by a permission update.
Permission update that adds rules.
Permission update that replaces rules.
Permission update that removes rules.
Permission update that changes the active mode.
Permission update that adds allowed directories.
Permission update that removes allowed directories.
Background task snapshot exposed to hook handlers.
Scheduled session prompt exposed to hook handlers.
Fields common to every hook input.
Wire input for SessionStart.
Wire input for UserPromptSubmit.
Wire input for SessionEnd.
Wire input for PermissionRequest.
Wire input for Notification.
Wire input for PreToolUse.
Wire input for PostToolUse.
Wire input for PostToolUseFailure.
Wire input for PreCompact.
Wire input for Stop.
Wire input for SubagentStart.
Wire input for SubagentStop.
Event-specific output for SessionStart.
Event-specific output for UserPromptSubmit.
Event-specific output for PreToolUse.
Permission-request output that allows a tool call.
Permission-request output that denies a tool call.
Event-specific output for PermissionRequest.
Event-specific output for PostToolUse.
Event-specific output for PostToolUseFailure.
Event-specific output for Stop.
Event-specific output for SubagentStart.
Event-specific output for SubagentStop.
Compatible hook output with retained extension fields.
Request sent for a server-owned hook invocation.
Response returned for a server-owned hook invocation.
Slack-hosted MCP: loopback Authorization Code with a public client.
GitHub-hosted MCP: RFC 8628 Device Authorization Grant.
Outcome of a provider's pre-handshake run_login step.
Base class for provider-specific OAuth dispatch.
Fallback provider for spec-compliant MCP servers with no quirks.
How to install the package that provides a sandbox backend.
Static description of a sandbox provider used by the registry.
Base error for sandbox provider operations.
Raised when the requested sandbox cannot be found.
Interface for creating and deleting sandbox backends.
Merged view of built-in, entry-point, and config sandbox providers.
Snapshot of the ChatGPT OAuth login state.
Raised when the user cancels a sign-in flow mid-callback wait.
Raised when a stored ChatGPT token cannot be refreshed.
UI hooks for the browser loopback sign-in flow.
Configuration for a single config-declared sandbox provider.
Parsed [sandboxes] configuration from config.toml.
Extended skill metadata for CLI display, adds source tracking.
Structured prompt and checkpoint metadata for a skill invocation.
Outcome of a revoke_skill_dir_trust call.
Persist theme preference to ~/.deepagents/config.toml.
Persist a [ui.terminal_themes][term_program] = name entry.
Run the Textual application.
Return the shell command that refreshes this editable environment.
Build the full advisory: one line per violation plus the refresh command.
Return whether this checkout's muted fingerprint matches fingerprint.
Persist fingerprint as this checkout's muted mismatch.
Print the stale-dependency warning to stderr for non-TUI launches.
Block on a continue/mute/abort prompt when an interactive launch is stale.
Load and validate MCP configuration from a JSON file.
Infer the project root that owns a project-level MCP config path.
Return only the project servers that survive the user's trust policy.
Find MCP config files from standard locations.
Split discovered config paths into user-level and project-level configs.
Extract stdio server entries from a parsed MCP config.
Return a ProjectServerSummary for every server in a project config.
Merge multiple MCP config dicts by server name.
Load a single MCP config file, returning None on any error.
Load and validate project configs after resolving precedence.
Load an MCP config file, returning (config, error).
Load MCP tools from a configuration file.
Resolve MCP config and load tools.
Build the plain-text output for the --version CLI flag.
Check if optional dependencies are installed.
Check for recommended external tools and return missing tool names.
Build a PendingNotification for a missing optional tool.
Format a missing-tool warning for non-interactive console output.
Parse command line arguments.
Run the Textual TUI interface (async version).
Read piped stdin and merge it into the parsed CLI arguments.
Block on a continue / mute / abort picker for a stale editable install.
Entry point for console script.
Resolve editor command from environment.
Return a safe configured editor name for user-facing hints.
Open current_text in an external editor.
Remove display-only media placeholders from user text.
Attempt to read an image from the system clipboard.
Read and encode an image file from disk.
Read and encode a video file from disk.
Return whether a path's extension is a known image or video extension.
Try to load a file as an image first, then as a video.
Encode raw bytes to a base64 string.
Create multimodal message content with text, images, and videos.
Collect version facts for the running deepagents-code distribution.
Collect version facts for the installed deepagents SDK distribution.
Return the base deepagents requirement declared by deepagents-code.
Collect the offline version report used by --version, /version, and doctor.
Return the source/metadata drift annotation for the CLI version line.
Return the workspace/editable/drift/mismatch SDK version annotation.
Resolve the diagnostic deepagents SDK version.
Render the installable extras grouped by category as plain text.
Return ready optional dependencies grouped by extra.
Return extras with at least one installed dependency.
Return installed and missing optional dependencies grouped by extra.
Return the installable extra that declares a package.
Resolve how to recover from a missing provider package.
Check that langchain-quickjs is installed for the interpreter.
Render an ExtrasStatus mapping as column-aligned plain text.
Return (package, version) pairs for the core ecosystem dependencies.
Render core ecosystem dependency versions as column-aligned plain text.
Render core ecosystem dependency versions as a markdown fragment.
Render an ExtrasStatus mapping as a markdown fragment.
Return the command name this process was launched with.
Note a non-standard launch name in the Debug Console, once per process.
Create the ephemeral server-side criteria agent graph.
Create the goal-only fallback agent for criteria generation.
Return ordinary text from a local or serialized message.
Return message metadata from a local or serialized message.
Return a message's lc_source value when present.
Return whether a local or serialized message has the human role.
Return whether a message is a goal-state notice or continuation.
Return whether a message claims to be a goal-state notice.
Return whether the latest human turn carries an unsaved goal fallback.
Return whether a message should be omitted from derived transcripts.
Return whether a message is hidden from user-facing session history.
Build a one-time goal continuation.
Project authoritative channels into deterministic notice state.
Serialize authoritative notice state with canonical JSON formatting.
Return a stable digest for authoritative goal/rubric state.
Return whether state contains a goal or an active rubric.
Build one canonical append-only goal/rubric state notice.
Return validated canonical notice metadata from a message.
Return the newest valid notice and its raw-history index.
Return the newest goal-state source index, including invalid messages.
Map a raw ToolMessage.status to the two-value hook domain, fail-closed.
Compute a stable key for buffering an in-progress streamed tool call.
Classify buffered tool calls that never emitted a tool.use.
Build the tool.use hook payload (schema documented in hooks).
Build the tool.error hook payload (schema documented in hooks).
Build the tool.result hook payload (schema documented in hooks).
Resolve ${VAR} references in one MCP server's supported fields.
Return the ordered reasoning effort levels supported by model_spec.
Return the profile's reasoning effort default independently of its levels.
Return whether effort is a supported level for model_spec.
Return whether canonical or native effort parameters are present.
Read canonical or native effort settings using integration precedence.
Remove canonical and native effort settings without changing siblings.
Replace existing effort settings with the standard flat parameter.
Render the placeholder answer recorded for every question on failure.
Render questions and answers as the Q:/A: transcript.
Resolve an MCP config dict for login without printing anything.
Pull server out of a resolved config and validate its shape.
Build the CLI-style hint for an unreadable user trust policy.
Build the CLI-style hint string for skipped project server entries.
Build the CLI-style hint for servers dropped by the legacy-key removal.
Build the CLI-style hint for the renamed, now-ignored env var.
Build the CLI-style hint for dropped malformed saved approvals.
Build the CLI-style hint for discovered configs that failed to load.
Return normalized cache reads and generic, 5m, and 1h writes.
Report whether genai-prices is currently able to price a request.
Estimate one model request's cost in USD from LangChain usage metadata.
Resolve the model and provider attached to a streamed model message.
Argparse type for integer arguments that must be >= 1.
Argparse type for integer arguments that must be >= 0.
Show top-level help information.
Show help information for the list subcommand.
Show help information for the agents subcommand.
Show help information for the reset subcommand.
Show help information for the skills subcommand.
Show help information for the plugin / plugins subcommand.
Show help information for the skills list subcommand.
Show help information for the skills create subcommand.
Show help information for the skills info subcommand.
Show help information for the skills delete subcommand.
Show help information for the skills trust subcommand.
Show help information for the update subcommand.
Show help information for the doctor subcommand.
Show help information for the tools subcommand.
Show help information for the tools list subcommand.
Show help information for the tools install subcommand.
Show help information for the install subcommand.
Show help information for the mcp subcommand.
Show help information for the mcp login subcommand.
Show help information for the mcp config subcommand.
Show help information for the config command.
Show help information for the auth subcommand.
Show help information for the threads subcommand.
Show help information for the threads delete subcommand.
Show help information for the threads list subcommand.
Read criteria when the latest state notice says a rubric is active.
Read a goal when the latest state notice says it is actionable.
Update a goal only when the latest state notice says it is actionable.
Detect deceptive or hidden Unicode code points in text.
Remove known dangerous/invisible Unicode characters from text.
Neutralize control characters and deceptive Unicode in untrusted text.
Render hidden Unicode characters as explicit markers.
Summarize Unicode issues for warning messages.
Join safety warnings into a display string with overflow indicator.
Check a URL for suspicious Unicode and domain spoofing patterns.
Flatten nested dict/list structures into key-path/string pairs.
Return whether a key path suggests URL-like content.
Narrow a persisted proposal kind to a known value.
Narrow a persisted goal-status value to a known GoalStatus.
Load async subagent definitions from config.toml.
Return a sorted list of available agent names from ~/.deepagents/.
List all available agents.
Reset an agent to default or copy from another agent.
Build the ### Model Identity section for the system prompt.
Get the base system prompt for the agent.
Create a CLI-configured agent with flexible options.
Report a server graph startup failure to the parent app process.
Gather every diagnostic section in display order.
Run dcode doctor, printing diagnostics as text or JSON.
Return the first-run onboarding marker path.
Return whether the user has completed onboarding.
Persist that onboarding has completed.
Return the goal criteria preference prompt marker path.
Return whether the goal criteria preference prompt was answered.
Persist that the goal criteria preference prompt was answered.
Persist the optional onboarding name into user agent memory.
Return the managed onboarding name block (markers included) if present.
Remove every onboarding-name marker occurrence from text.
Return whether onboarding should open at interactive startup.
Resolve a LangSmith endpoint shorthand to its canonical URL.
Return whether value is a non-empty http/https URL with a host.
Return and clear the pending orphaned-tracing notice, if any.
Restore caller tracing flags in an environment passed to user code.
Restore caller tracing API keys in an environment passed to user code.
Apply a /auth-stored LangSmith key, tracing, and redaction now.
Return the longest mode prefix and mode for text, if any.
Get the glyph set for the current charset mode.
Reset the glyphs and charset-mode caches (for testing).
Check whether the terminal is in ASCII charset mode.
Return the terminal-appropriate label for the newline keyboard shortcut.
Get the appropriate banner for the current charset mode.
Build the shared coding-agent-v1 trace-metadata block.
Build the LangGraph stream config dict.
Parse shell allow-list from string.
Check if a command contains dangerous shell patterns.
Check if a shell command is in the allow-list.
Resolve the LangSmith project name if tracing is configured.
Report an empty prefixed override that is suppressing a LangSmith key.
Return whether LangSmith secret redaction is enabled for agent traces.
Return whether the agent should proactively save learnings to memory.
Return whether Shift+Tab may enter unrestricted YOLO mode.
Return whether OpenAI model calls should carry a per-thread cache key.
Resolve the Auto classifier spec and any reason it was ignored.
Resolve the model spec the Auto approval classifier should use.
Resolve whether Auto mode applies generated goal criteria without review.
Install the LangSmith SDK secret anonymizer for active agent tracing.
Extra LangSmith project names to dual-write agent traces to.
The single extra LangSmith project to mirror agent runs to, if configured.
Summarize LangSmith tracing configuration for diagnostics.
Fetch the LangSmith project URL, raising on any failure.
Fetch the LangSmith project URL, returning None on any failure.
Build a full LangSmith thread URL if tracing is configured.
Build a LangSmith thread URL only when its project URL is cached.
Reset the LangSmith URL cache (for testing).
Get the default coding agent instructions.
Auto-detect provider from model name.
Create a chat model.
Validate that the model has required capabilities for deepagents.
Resolve the configured runtime logging level.
Configure runtime log level and optional file logging for target.
Return the path of the active debug log file, or None if not logging.
Format ISO timestamp for display (e.g., 'Dec 30, 6:10pm').
Format ISO timestamp as relative time (e.g., '5m ago', '2h ago').
Format a filesystem path for display.
Get path to global database.
Generate a new thread ID as a full UUID7 string.
List threads from checkpoints table.
Populate checkpoint-derived fields for an existing thread list.
Prewarm thread selector cache for faster /threads open.
Get cached recent threads, if available.
Apply cached message counts onto thread rows when freshness matches.
Apply cached initial prompts onto thread rows when freshness matches.
Get the most recent thread, optionally agent-filtered and/or excluding a thread.
Get agent_name for a thread.
Get the most recently stored cwd for a thread.
Check if a thread exists in checkpoints.
Find threads whose IDs start with the given prefix.
Delete thread checkpoints and any offloaded conversation history.
Get AsyncSqliteSaver for the global database.
Read the thread listing limit from DA_CLI_RECENT_THREADS.
CLI handler for deepagents threads list.
CLI handler for: deepagents threads delete.
Extract @file mentions and return the text with resolved file paths.
Parse a paste payload that may contain dragged-and-dropped file paths.
Parse dropped-path payload variants through one entrypoint.
Return whether a payload has the shape a terminal uses for a file drop.
Return resolved file paths from a payload that looks like a file drop.
Parse and resolve a single pasted path payload.
Extract and resolve a leading pasted path token from input text.
Normalize pasted text that may represent a single filesystem path.
Return whether the attached terminal should be treated as kitty-aware.
Classify a streamed model request for cost and usage breakdowns.
Close every request in a ledger that outlives its stream round.
Record usage attached to one streamed model message.
Format a token count into a human-readable short string.
Format an estimated USD cost for compact display.
Print a model-usage stats table to a Rich console.
Return a validated mode, failing closed to manual.
Return the next Shift+Tab approval mode for the active session.
Return the store key for a thread's live approval mode.
Return the stored approval-mode payload.
Read a live approval mode from the server-side LangGraph Store.
Asynchronously read a live approval mode from a LangGraph Store.
Persist approval mode through an agent's remote store client.
Return the installation-local acknowledgement file path.
Return whether the current unrestricted-mode warning was accepted.
Persist the current unrestricted-mode warning acknowledgement.
Return whether the current Auto first-enable notice was already shown.
Persist that the Auto first-enable notice was shown.
Format an auth manager badge for a provider.
Format a model selector provider-header indicator.
Add a --json flag to an argparse parser.
Write a JSON envelope to stdout and flush.
Return the resolved path to the credential store (auth.json).
Return all stored credentials keyed by provider name.
Return the stored API key for provider, or None if unset.
Return the base URL paired with provider's stored key, or None.
Return the LangSmith project paired with provider's stored key, or None.
Persist an API key for provider.
Remove a stored credential for provider.
Return providers that currently have a stored credential, sorted.
Return whether installed package metadata is at least version.
Check for updates using only a fresh local cache entry.
Return the epoch time of the last PyPI update check, or None.
Return whether a recorded check stamp is still within CACHE_TTL.
Fetch the latest deepagents-code version from PyPI, with caching.
Return the targeted pre-release pins installing version requires.
Return whether installing version needs uv pre-release admission.
Return the cached ISO-8601 upload time for version, or None.
Return a human-readable age for version (e.g., 'released 3d ago').
Return ", released Nd ago" for version, or "" when unknown.
Return " (released Nd ago)" for version, or "" when unknown.
Return " (N days old)" for installed versions at least a week old.
Return whole days since the installed version's release, or None.
Return whether an older installed version should warn about updating.
Return the ISO-8601 upload time for deepagents SDK version.
Return a human-readable age for SDK version (e.g., 'released 3d ago').
Return ", released Nd ago" for SDK version, or "" when unknown.
Return whether a resumed session is still in its update grace period.
Reset the resume grace period after a normal interactive launch.
Return whether startup auto-update should skip a recently failed version.
Persist a same-version startup auto-update retry cooldown marker.
Clear a startup auto-update failure marker for version if present.
Return whether the user should be notified about version latest.
Record that the user was notified about version latest.
Clear the "already notified" marker so the update modal re-opens next launch.
Check whether a newer version of deepagents-code is available.
Detect how deepagents-code was installed.
Return the shell command to upgrade deepagents-code.
Return whether pre-release upgrades are supported for the install method.
Return whether a dependency-only refresh is possible for the install.
Return the shadowing dcode entry point on the user's PATH, if any.
Best-effort detect_shadowed_dcode that never raises.
Render a user-facing warning for a shadowed-dcode situation.
Return a session-scoped shell command to prefer the upgraded shim.
Remove old update logs while preserving the newest recent logs.
Return a new timestamped update log path and clean stale logs.
Try to claim the exclusive right to self-upgrade dcode.
Attempt to upgrade deepagents-code using the detected install method.
Refresh dependencies while keeping deepagents-code on this version.
Resolve a dependency refresh plan without mutating the tool environment.
Parse package version changes from uv's environment-diff output.
Render dependency changes as an aligned, human-readable block.
Return whether extra is safe to embed in package-extra syntax.
Return whether package is safe to embed in a --with install command.
Return the uv command that upgrades dcode while clearing stale pins.
Return the uv command that refreshes deps for the current dcode version.
Return the uv command that plans a dependency refresh without installing.
Return the shell command that adds a package to the dcode tool env.
Return the install-script command that installs dcode extras.
Return the install-script command that adds extra to dcode.
Return a manual recovery command for the current install method.
Return a manual recovery command, never raising.
Return the canonical action hint for editable installs missing an extra.
Return the canonical action hint for editable installs needing a package.
Add extra to the installed dcode tool environment.
Add an arbitrary package to the installed dcode tool environment.
Return whether update checks are enabled.
Return whether auto-update is enabled.
Persist the auto-update preference to config.toml.
Return whether the user explicitly chose an auto-update preference.
Return whether to show the one-time auto-update default migration notice.
Record that the one-time auto-update default migration notice was shown.
Return the last version the user saw the "what's new" banner for.
Record that the user has seen the "what's new" banner for version.
Return True if this is the first launch on a newer version.
Return the (status_label, detail) display pair for an unavailable server.
Enumerate the built-in tools the agent binds by default.
Read tools from a local compiled agent when its graph is inspectable.
Discover MCP servers, split into tool groups and unavailable servers.
Split loaded MCP server metadata into tool groups and unavailable servers.
Assemble a ToolCatalog from pre-collected built-in tools and live MCP info.
Collect everything dcode tools list renders.
Return autocomplete entries for slash commands.
Extract skill name and args from a /skill:<name> command.
Build autocomplete entries for discovered skills.
Best-effort write of a terminal control sequence.
Write an OSC <command>;<payload> sequence.
Set the terminal's OSC 9;4 progress indicator.
Clear the terminal's progress indicator.
Set the terminal's dynamic default background color with OSC 11.
Reset the terminal's dynamic default background color with OSC 111.
Restore iTerm2 cursor guide when launch-time profile state required it.
Return whether offload history is routed to non-persistent storage.
Remove a thread's offloaded conversation-history archive.
Return the read-only theme registry, building it on first access.
Rebuild the theme registry from disk.
Return custom CSS variable defaults for the given mode.
Return the ThemeColors for the active Textual theme.
Return the bounded retention bucket key for a log level name.
Attach the in-memory buffer handler to target (idempotent).
Return the installed buffer handler.
Return the default per-process Unix socket path.
Decode one newline-delimited JSON external event.
Locate the effective git metadata directory for a path.
Locate the repository root for a path.
Resolve a validated identity shared by one repository's Git worktrees.
Read the current git branch from repository metadata.
Fall back to git rev-parse for unusual repository layouts.
Resolve the current git branch with a filesystem-first strategy.
Read the current HEAD commit SHA from repository metadata.
Fall back to git rev-parse HEAD for unusual repository layouts.
Resolve the current HEAD commit SHA, filesystem-first.
Read the origin remote URL from the repository config file.
Fall back to git config --get remote.origin.url.
Resolve the origin remote URL, filesystem-first.
Derive repository attribution from an origin remote URL.
Classify a raw env-var string as a truthy, falsy, or unrecognized token.
Return whether env var name is set to a recognizably truthy value.
Allow successful prefixed environment resolutions to be logged again.
Return whichever env var name actually carries the resolved value.
Look up an env var with DEEPAGENTS_CODE_ prefix override.
Return the OS-appropriate cache directory for Deep Agents Code.
Reset module-level caches so the next call recomputes from scratch.
Get available models dynamically from installed LangChain provider packages.
Load upstream profiles merged with config.toml overrides.
Resolve the credential value for provider from any configured source.
Return credential readiness details for a provider.
Check if credentials are available for a provider.
Return the env var name that holds credentials for a provider.
Return base-URL env var names for a provider in resolution order.
Return the canonical base-URL env var name for a provider.
Return the env var that supplies a provider's endpoint when none is stored.
Return whether name is a non-model service configurable via /auth.
Return whether name is the LangSmith tracing service.
Return credential readiness for a non-model service (e.g. "tavily").
Export every stored service key into os.environ.
Export this provider's stored key and endpoint into os.environ.
Log when a provider's key and endpoint resolve from different env tiers.
Persist whether Auto mode applies generated goal criteria without review.
Update the default model in config file.
Persist the model the Auto approval classifier reviews actions with.
Remove the default model from the config file.
Remove the stored Auto classifier model from the config file.
Persist the selected reasoning effort for a model.
Load the selected reasoning effort for a model.
Remove the selected reasoning effort for a model.
Check if a warning key is suppressed in the config file.
Add a warning key to the suppression list in the config file.
Remove a warning key from the suppression list in the config file.
Normalize an exact project root for persisted MCP trust comparisons.
Return a stable fingerprint for an MCP server definition.
Load per-server project MCP allow/deny lists from user-level config.
Persist project-scoped MCP server approvals.
Load all thread-selector settings from one config file read.
Clear the cached ThreadConfig so the next load re-reads disk.
Load thread column visibility from config file.
Save thread column visibility to config file.
Load the relative-time display preference for thread timestamps.
Save the relative-time display preference for thread timestamps.
Load the sort order preference for the thread selector.
Load the default startup approval mode from config.toml.
Save the sort order preference for the thread selector.
Save the directory-scope preference for the thread selector.
Update the recently used model in config file.
Read the most-recent-first list of provider:model specs.
Promote model_spec to the front of the recent-models MRU list.
Update the recently used agent in config file.
Read [agents].recent from the config file.
Update the default agent in config file.
Remove the default agent from the config file.
Read [agents].default from the config file.
Load ~/.deepagents/config.toml.
Resolve an option against the environment then config.toml.
Resolve the [interpreter] options into Settings constructor kwargs.
Resolve the Auto classifier decision-batch budget and its source.
Resolve the wall-clock budget for one Auto classifier decision batch.
Resolve the effective main-agent recursion_limit.
Return the deepagents-code extra that installs provider, if known.
Return the PyPI distribution that provides provider, if known.
Return whether provider's integration package is importable.
Return every option, credentials-first then by domain group.
Return the manifest entry for key, or None when unknown.
Return every manifest key in definition order.
Return every option whose key sits under the dotted prefix section.
Return group names from options in first-seen order.
List subagents from user and/or project directories.
Get the current Deep Agents thread ID for LangSmith or MCP tooling.
Search the web for current information.
Fetch a URL and return the page content as markdown.
Concatenate all section functions into the full detection script.
Build trusted classifier metadata for a client-created user message.
Return whether an MCP tool has coherent read-only annotations.
Return whether a tool carries dcode's MCP wrapper marker.
Return MCP names that require Manual or Auto review.
Return a compact reason safe for persistence, logs, and UI rendering.
Build a safe agent/UI reason for a failed auto classifier call.
Create a private OS-temp text file for this request.
Delete one exact OS-temp artifact created for this request.
Return whether a diff line is the truncation marker.
Split a unified diff back into the lines it was assembled from.
Locate paired file headers immediately preceding a hunk.
Count added and removed lines in unified-diff lines.
Return the managed ripgrep binary path (.exe on Windows).
Return whether managed-tool downloads are disabled via env var.
Return the configured ripgrep installer mode.
Return whether the user opted into the system ripgrep installer.
Idempotently prepend BIN_DIR to os.environ["PATH"].
Ensure a usable rg binary is available, installing if necessary.
Format a duration in seconds into a human-readable string.
Read macOS's "24-Hour Time" preference (AppleICUForce24HourTime).
Whether the system is configured for a 24-hour clock.
Format a message timestamp for display.
Normalize line breaks and escape markdown syntax in external text.
Copy text to the system clipboard.
Copy text to the clipboard and surface the outcome as a toast.
Copy selected text from one screen's widgets to the clipboard.
Resolve environment-variable references in MCP header values.
Construct an OAuthClientProvider for an MCP server.
Return a token-safe single-line summary of an OAuth-login exception.
Find an MCPReauthRequiredError anywhere inside exc's tree.
Return the resource_metadata URL of a 401 OAuth challenge in exc.
Drive OAuth login for server_name, persisting tokens on success.
Truncate a string value if it exceeds max_length.
Format tool calls for display with tool-specific smart formatting.
Convert ToolMessage content into a printable string.
Move legacy state entries from config_dir into state_dir.
Return what a successful file operation could not show, if anything.
Return display_caveat for a successful completed record.
Compute a unified diff between before and after content.
Convert a virtual/relative path to a physical filesystem path.
Return whether a path points at a credential/secret file.
Format a path for display.
Collect summary info and diff for HITL approvals.
Return the number of newline characters in text.
Return whether text should be collapsed into a placeholder.
Format a paste placeholder reference string.
Replace all paste placeholders in text with their full content.
Return the set of server names the user has disabled.
Return True when server_name is in the disabled set.
Add or remove server_name from the persistent disabled set.
Read the server project context from environment transport data.
Find the project root by looking for git metadata.
Find project-specific AGENTS.md file(s).
Classify a path as existing, missing, or unreadable.
Split a plugin id in {plugin}@{marketplace} form.
Return the first supported manifest path under root, if present.
Load an Agent Plugins, Claude, or Codex plugin manifest.
Build component inventory for a plugin.
Return the plugin storage root directory.
Serialize plugin mutations across threads and dcode processes.
Return the data directory path for a plugin id without creating it.
Return the lazily-created data directory for a plugin id.
Return a bounded, collision-resistant filesystem key.
Return a cache key that cannot disclose source credentials.
Return the marketplace cache directory.
Return the versioned plugin install cache root.
Return the versioned cache path for a plugin id.
Load persisted marketplace records.
Persist a marketplace record.
Remove a marketplace record.
Load enabled plugin ids.
Persist a plugin enablement value.
Load installed plugin records.
Add or replace the record for plugin_id in installed_plugins.json.
Return the install entry for a plugin id.
Remove the install record for a plugin.
Copy a plugin into the versioned cache and register the install.
Disable a plugin, remove install records, and delete orphaned cache dirs.
Return a marketplace source safe for display.
Redact credentials from every HTTP URL embedded in text.
Parse a user-provided marketplace source.
Load a marketplace source and return its local install location.
Load a marketplace from either a cached directory or JSON file.
Return a marketplace manifest path under root, if present.
Resolve or materialize a marketplace plugin entry to a plugin root.
Load a marketplace manifest from a root directory.
Normalize a decoded value to the supported JSON type.
Normalize a decoded value to a JSON object.
Build environment variables exposed to plugin subprocesses.
Substitute plugin path variables in a string.
Substitute plugin variables throughout a JSON-compatible value.
Set up the plugin CLI parser.
Execute a plugin management command.
Add a local marketplace to dcode state.
Add a marketplace from a pasted source string.
Remove a marketplace and every plugin installed from it.
Set the enabled state of an installed plugin.
Uninstall a plugin (disable, clear records, delete orphaned cache).
Install a marketplace plugin into the versioned cache and enable it.
Resolve whether plugin auto-updates are enabled and from which source.
Stage updated versions of enabled remote marketplace plugins.
Discover enabled marketplace plugins from their install cache paths.
List plugins from configured marketplaces.
Return plugin ids that have install records.
Namespace a plugin-declared MCP server's name under its plugin id.
List plugin MCP servers as (label, scoped_name, needs_login) tuples.
Return scoped MCP server names without preparing plugin runtime state.
Discover enabled plugins and compose their MCP config layers.
Build MCP config layers for enabled plugins.
Qualify a skill name under its plugin namespace.
Return skill source tuples for plugin skills.
Return plugin skill roots for skill-content containment checks.
Discover plugin skill sources, containment roots, and loaded ids.
Discover plugin skill sources and containment roots.
Build hook sources from enabled or already-discovered plugins.
List the hook events a plugin declares, for display before it loads.
Return (skill_dir, subfolders) pairs found under source_path.
Async counterpart of discover_skill_dirs.
Load and namespace every skill found under a plugin source.
Async counterpart of load_namespaced_skills.
Best-effort error-type name for an exception from RemoteAgent.astream.
Render an exception from RemoteAgent.astream for the UI.
Run a single task non-interactively and exit.
Start a LangGraph server and return a connected remote agent client.
Async context manager that starts a server and guarantees cleanup.
Build the server base URL.
Generate a langgraph.json config file for langgraph dev.
Poll a LangGraph server health endpoint until it responds.
Print every pending debug-preserved server-log path to stderr, once each.
Register the dcode mcp command group.
Handle dcode mcp login <server>.
Handle dcode mcp config.
Register the dcode config command group.
Dispatch a parsed config invocation.
Dispatch dcode install <name>.
Install an optional extra or an arbitrary package via uv --with.
Dispatch a dcode tools subcommand.
Register the dcode auth command group.
Dispatch a parsed dcode auth invocation.
Execute a task with output directed to Textual UI.
Describe the reviewing model in the Auto notice body.
Return the newline-shortcut hint fragment (e.g. 'Ctrl+J newline').
Use the ASCII border variant when the active terminal requires it.
Keep blur from being interpreted as prompt dismissal.
Get the renderer for a tool by name.
Reverse the XML escaping applied by the js_eval wire format.
Parse js_eval output into structured display blocks.
Open the ChatGPT account page in the user's browser.
Coerce arbitrary tool-arg content into a displayable string.
Return whether the style under the mouse points to a clickable link.
Open a URL after applying the shared URL safety check.
Open url in a browser and toast on failure.
Open the URL from a Rich link style on click, if present.
Return whether startup tips should be shown.
Build the style that marks a span as click-to-copy.
Return the copy text and field label from a span style, if any.
Return selection shifted past a diff row's gutter, if one is set.
Yield syntax-highlighted widgets for a unified diff.
Format addition/deletion counts as styled +N -M content.
Keep the bounded source prefixes needed to highlight a diff.
Return a human-readable provider label.
Return a compact brand label for a provider.
Build a one-line summary of a run of tool calls.
Summarize an in-flight run, mixing past and present tense.
Redact secret-like strings inside transcript content.
Run one hook command with bounded time and captured output.
Report whether a pre-execution hook already settled permission for a call.
Translate a hook permission decision into a client review outcome.
Interleave hook decisions with human decisions in request order.
Return value when it is composed only of allowlisted sequences.
Reduce ordered handler results into an event-specific decision.
Return whether project hooks are trusted for a canonical workspace root.
Persist project-hook trust for a workspace root.
Resolve the workspace root that governs hook trust for a directory.
Return the capability entry for event.
Return the project-scoped hooks configuration path.
Return the user-scoped hooks configuration path.
Load, validate, merge, and hash Hooks v2 configuration.
Return the canonical SHA-256 snapshot id for config.
Serialize configuration into a stable byte representation.
Decode one hooks document and fingerprint the exact bytes read.
Build an inherited environment safe to pass to hook subprocesses.
Format a compatible MCP wire tool name.
Map a native tool name to the compatible wire tool name.
Map native tool arguments to the compatible wire input object.
Project a native tool call into compatible wire name and input.
Serialize a hook invocation request for interrupt().
Parse a hook invocation interrupt payload when present.
Serialize a hook invocation response for Command(resume=...).
Validate a resumed hook response against the outstanding request.
Return whether value looks like a Hooks v2 invocation interrupt.
Project a native hook invocation into the compatible wire contract.
Serialize a hook invocation as validated compatible JSON.
Return the compatible notification matcher and wire value.
Convert legacy dotted-event hook entries into Hooks v2 configuration.
Return whether data looks like the legacy list-shaped hooks document.
Attach Hooks v2 snapshot identity and server event gates to context.
Fire matching hook commands with payload serialized as JSON on stdin.
Schedule dispatch_hook as a background task with a strong reference.
Return whether fire-and-forget hook tasks are still in flight.
Await all in-flight fire-and-forget hook tasks.
Execute a server-owned hook request and return a resume payload.
Fulfill a raw interrupt value when it is a hook invocation.
Fulfill pending hook interrupts into a resume map keyed by interrupt id.
Return the provider policy that owns server_url.
Return the ChatGPT OAuth token store path.
Return the current ChatGPT OAuth sign-in state.
Return whether a ChatGPT OAuth token is stored on disk.
Delete the stored ChatGPT OAuth token.
Run the ChatGPT OAuth Authorization Code Flow with PKCE.
Construct a _ChatOpenAICodex model wired to the on-disk token store.
Create or connect to a sandbox of the specified provider.
Get the default working directory for a given sandbox provider.
Check that the required packages for a sandbox provider are installed.
List skills from built-in, user, and/or project directories.
Read the full raw SKILL.md content for a skill.
Discover skills and build pre-resolved containment roots.
Build the wrapped prompt and persisted metadata for a skill.
Check whether a resolved skill directory has been trusted.
Persist trust for a resolved skill directory.
Remove trust for a skill directory.
Remove all trusted skill directories.
Return the sorted list of trusted skill directory paths.
Return trusted directories paired with their approval timestamps.
Return verified trusted skill directories as canonical Path objects.
Merge one skill into merged by name, last-one-wins.
Setup the skills subcommand parser with all its subcommands.
Execute skills subcommands based on parsed arguments.
Deep Agents Code - Interactive AI coding assistant.
Textual UI application.
MCP (Model Context Protocol) tools loader.
Main entry point and loop.
External editor support for composing prompts.
Utilities for handling image and video media from clipboard and files.
Inspect optional-dependency install status for the running distribution.
Server-side helpers for drafting acceptance criteria from goal objectives.
Canonical internal messages for goal state and work continuation.
Ask user middleware for interactive question-answering during agent execution.
Validation and environment-variable expansion for MCP server config.
Reasoning effort support for /effort.
UI-agnostic helpers for resolving an MCP login target.
Estimate and persist cumulative model cost for each thread.
Help screens and argparse utilities for the app.
Goal tools exposed to the agent for persisted TUI goals.
Registry of pending actionable notifications.
Protect machine-managed memory blocks from agent edits.
Unicode security helpers for deceptive text and URL checks.
UI-agnostic interaction interface for MCP OAuth login.
Server-side graph entry point for langgraph dev.
Schema and middleware for per-checkpoint state restored when resuming.
Agent management and creation.
The dcode doctor command: report install health and diagnostics.
First-run onboarding state for the interactive TUI.
Configuration, constants, and model creation.
Rubric middleware retries for transient grader transport failures.
Thread management using LangGraph's built-in checkpoint persistence.
Input handling utilities including image/video tracking and file mention parsing.
Terminal capability detection.
Approval-mode state shared by the Textual client and agent server.
CLI-specific conversation compaction middleware.
Shared provider auth status formatting.
Machine-readable JSON output helpers for CLI subcommands.
User-level credential storage for model providers.
Update lifecycle for deepagents-code.
Enumerate the tools available to the agent.
Unified slash-command registry.
Best-effort writer for terminal escape/control sequences.
iTerm2 cursor guide workaround for Textual alternate-screen rendering.
Storage paths for offloaded conversation history.
LangChain brand colors and semantic constants for the app.
External event ingress for the Textual app.
Middleware for runtime model selection via LangGraph runtime context.
Shared recursive types for JSON-compatible data.
Model configuration management.
Canonical manifest and resolver for every user-tunable scalar config option.
Subagent loader for app.
Custom tools for the agent.
Middleware for injecting local context into system prompt.
Classifier-backed approval policy for the local interactive TUI.
Shared unified-diff helpers.
Auto-install pinned upstream binaries for optional tools.
Lightweight text-formatting helpers.
Clipboard utilities.
OAuth login flow and token storage for MCP servers.
Formatting utilities for tool call display in the app.
One-time migration of legacy state files into ~/.deepagents/.state/.
Helpers for tracking file operations and computing diffs for display.
Large paste collapsing for the chat input.
Persistent store of MCP server names the user has disabled.
Utilities for project root detection and project-specific configuration.
Plugin support for dcode.
Data models for plugins.
Plugin manifest parsing for plugins.
State storage for dcode plugin marketplaces, installs, and enablement.
Marketplace parsing for plugins.
Variable substitution for plugin-provided configuration.
CLI helpers for plugin management.
Plugin discovery, install, and enablement helpers.
Plugin subsystem adapters.
Adapter from plugin MCP declarations to dcode MCP config dictionaries.
Adapter from discovered plugins to SkillsMiddleware sources.
Adapter from plugin hook declarations to Hooks v2 configuration sources.
Code-local skills middleware adapter for plugin namespaces.
Client-side transport and headless execution for Deep Agents Code.
Remote agent client — thin wrapper around LangGraph's RemoteGraph.
Non-interactive execution mode.
Local LangGraph server launch helpers for Deep Agents Code clients.
Server lifecycle orchestration for the app.
LangGraph server lifecycle management for the app.
Client-facing CLI command implementations.
CLI commands of the MCP module.
CLI commands for inspecting the configuration surface.
CLI install path for optional deepagents-code extras.
The dcode tools command group: provision managed external tools.
CLI commands for the auth group: manage stored provider credentials.
Textual user interface package for deepagents-code.
Textual UI adapter for agent execution.
Modal UI components.
Prompt for compacting a large resumed thread.
Interactive plugin manager screen.
Plugin manager view models.
Pure plugin manager content builders.
Plugin manager state loading.
Clickable tab labels for the plugin manager header.
Textual widgets for deepagents-code.
Welcome banner widget.
Confirmation modals for /update dependency-refresh flows in the TUI.
Confirmation modal for /install <package> --package in the TUI.
Persistent inline display for the current goal.
First-enable confirmation modal for Auto mode.
Tool renderers for approval widgets - registry pattern.
Notification center modal for pending actionable notices.
Ask user widget for interactive questions during agent execution.
Message store for virtualized chat history.
Live panel showing subagents fanned out from within js_eval calls.
Color-coded context-window visualization for /context.
Confirmation prompt for resuming a thread owned by another agent.
ChatGPT OAuth sign-in screen, reachable via /auth -> openai_codex.
Trust prompt for skills that resolve outside trusted skill directories.
Tool-specific approval widgets for HITL display.
Interactive theme selector screen for /theme command.
Goal acceptance-criteria review widget.
Chat input widget for deepagents-code with autocomplete and history support.
Interactive agent selector screen for /agents command.
Command history manager for input persistence.
Startup tip widget shown above the chat input.
Confirmation modals for MCP changes that need a server restart.
Approval widget for HITL - using standard Textual patterns.
Read-only MCP server and tool viewer modal.
Dedicated modal for the update-available notification.
Confirmation modal offered after reload-relevant plugin changes.
First-enable confirmation modal before Shift+Tab enters YOLO.
Loading widget with animated spinner for agent activity.
Onboarding screens for the interactive TUI.
Interactive model selector screen for /model command.
Renderers turning a unified diff into one Static per row.
Prompt for switching cwd when resuming or switching threads.
Generic detail modal for a single pending notification.
TUI screens for managing stored model-provider credentials.
Read-only in-app Debug Console modal.
Autocomplete system for @ mentions and / commands.
Interactive reasoning effort selector for /effort.
Message widgets.
Status bar widget.
In-TUI MCP OAuth login modal.
Progress modal for app self-update installs.
Interactive thread selector screen for /threads command.
Confirmation modal offered when a change needs an owned-server respawn.
Notification settings screen for /notifications command.
Screen UI components.
Built-in skills that ship with the Deep Agents Code.
Hook contracts and compatibility dispatch.
Client-owned conversation transcript projections for Hooks v2.
Single-owner coordinator for client-side Hooks v2 state.
Bounded asynchronous command execution for Hooks v2.
Server-owned Hooks v2 lifecycle middleware.
Translation between PermissionRequest decisions and HITL review payloads.
Terminal escape-sequence validation for hook output.
Event-aware reduction for Hooks v2 command output.
Client-owned Hooks v2 lifecycle facade.
Persistent workspace trust for project-scoped hooks.
Capability registry for Hooks v2 events.
Validated Hooks v2 configuration loading, merging, and hashing.
Standalone orchestration for the Hooks v2 execution engine.
Sanitized subprocess environments for Hooks v2 command handlers.
Native dcode tool vocabulary mapped to compatible wire names.
Client↔server interrupt transport for Hooks v2 server-owned events.
Projection from Hooks v2 domain invocations to compatible wire input.
User-facing presentation for Hooks v2 execution.
Immutable runtime snapshots for Hooks v2 configuration.
Session-scoped client facade for the Hooks v2 runtime.
Legacy dotted-event migration helpers for Hooks v2 configuration.
Helpers for attaching Hooks v2 session identity to graph context.
Lightweight hook dispatch for external tool integration.
Canonical boundary between hook domain and wire models.
Client-side fulfillment for server-owned Hooks v2 interrupts.
Typed contracts for the hooks system.
Domain models for hook lifecycle invocations and decisions.
Validated hook configuration models.
External JSON-compatible hook input and output models.
Cached runtime validators for hook model boundaries.
Versioned hook invocation transport models.
Provider-specific MCP OAuth dispatch.
Slack-hosted MCP OAuth provider.
GitHub-hosted MCP OAuth provider.
Policy interface for provider-specific MCP OAuth quirks.
Integrations for external systems used by the Deep Agents Code.
Sandbox provider interface used by Deep Agents Code.
Discovery and instantiation of sandbox providers.
ChatGPT OAuth integration for the openai_codex model provider.
Parsing for the [sandboxes] section of ~/.deepagents/config.toml.
Sandbox lifecycle management with provider abstraction.
Skills module for Deep Agents Code.
Skill loader for CLI commands.
Helpers for loading and formatting skill invocations.
Trust store for skill directories that resolve outside trusted roots.
Shared skill-merge helper with override (name-collision) debug logging.
CLI commands for skill management.
Key for buffering an in-progress streamed tool call.
A whole tool-call arguments value delivered by a provider in one chunk.
Discriminated union for the ask_user widget Future result.
Valid spinner display states, or None to hide.
Tagged union of every persisted credential shape, narrowed by type.
Element type of HITLResponse["decisions"].