Skip to content

Capability Seams And Core Services ​

A service can be a core spine service, a swappable capability seam, or a bundle/composition point. The graph shows the package that owns the service declaration, known implementation packages, and packages that consume the service directly.

ctx keyRoleOwnerImplementationsDirect consumersCompanion pluginsNote
ctx.attachmentsseamattachmentattachment-localapi-session-controller, tool-fs, llm-pi-ai, llm-deepseek-The host commits accepted images before session events; provider adapters resolve authorized durable references into provider-native content.
ctx.fileUploadscoreclient-file-upload-api-session-controller-Owns streaming intake, durable storage, and staged receipt lifetime; the Session controller binds receipts to accepted submissions.
ctx.llmseamllmllm-deepseek, llm-pi-ai, llm-replayagent-loop, compaction-basic-Adapters register provider implementations; the loop and compaction call the provider-neutral stream service.
ctx.deepseekLlmApiExtensionsseamdeepseek-llm-api-extensionssession-log-deepseek, plugin-package-inventory-deepseekllm-deepseek-Plugins prepare independent top-level fields; the official adapter merges them and commits their delivery state after HTTP acceptance.
ctx.tokenMetercoretoken-meter-compaction-basic-Owns isolated per-session replay folds; pressure consumers share immutable revisioned measurements.
ctx.toolResultPrunercorecompaction-tool-result-pruner-compaction-basic-Rewrites oversized current tool results through replayable single-node surface replacements before summary compaction.
ctx.sessionscoresession-agent-loop, agent, session-persistence, session-query, session-query-sqlite, subagent-in-process-driver, invariants, message-feedback-Owns append-only Session instances and emits the durable session event feed.
ctx.sessionControllercoreapi-session-controller---Owns Session commands, cold reads, durable-event following, live control state, model catalogs, workspace opening, and Agent activation policy.
ctx.sessionFileReferencescoreapi-session-controller---Delegates file-reference discovery through the Session Controller's established Agent lookup policy.
ctx.sessionSkillCatalogcoreapi-session-controller---Lists the Session composition's user-invocable skills without activating a cold Agent.
ctx.credentialsControllercoreapi-settings-controller---Projects the credential-reference seam onto the generated Remote namespace: batch fan-out, view projection, and refusal mapping live here, not on the seam Definition.
ctx.settingsControllercoreapi-settings-controller---Projects the user-settings seam onto the generated Remote namespace: the read is always redacted and every refusal is classified here, not on the seam Definition.
ctx.workspaceFilescoreapi-workspace-files---Serves stat, paged text, byte windows, directory listings, and the change feed for files inside a Session's workspace root, confined by lstat, containment, and a stat re-check.
ctx.workspaceControllercoreapi-workspace-controller---Owns Workspace commands and reconnect-safe Workspace state delivery through the generated Remote namespace.
ctx.directoryPickerControllercoreapi-workspace-controller---Carries the picking seam onto the wire: capability gating, cancellation, and the seam-coded failures a browser directory flow discriminates on.
ctx.invariantscoreinvariants-session, agent, scope, agent-loop-Companion subpaths register owner-local checks; the service owns selection, uniqueness, child fibers, and package-attributed failures.
ctx.typertcoretypert-registry-typert-loader, api-gateway-Plugins register live zod contributions directly or through dsh-typert-loader; the API gateway consumes invocation descriptors and providers, while other runtime consumers query schemas and reflection metadata at their own edges.
ctx.typertGatewaycoreapi-gateway---Associates generated Remote descriptors with live Cordis services, resolves registered identities, and exposes unary calls through the shared Connection RPC carrier.
ctx.sessionPersistenceseamsession-persistencesession-persistence-jsonlagent-loop, tool-bash, hooks-claude-code, hooks-codex, session-query, session-query-sqlite, message-feedback-The JSONL backend persists the SessionEvent vocabulary as one artifact per Session.
ctx.settingsseamsettingssettings-fileapi-settings-controller, llm-deepseek, llm-pi-ai-Plugins register namespace schemas and resolve layered values; providers store the raw document. The LLM adapters register their entry config as the composition base under the user section; the settings controller serves redacted layered descriptors and writes the user layer.
ctx.subagentModelSelectioncoretool-subagent-tool-subagent-Owns the default-off settings namespace that Agent-scoped delegation tools sample when composing a new top-level Session.
ctx.credentialsseamcredentialscredentials-localapi-settings-controller, llm-deepseek, llm-pi-ai-Configuration carries references to secrets; providers own the values. Consumers resolve per operation, so a rotated credential reaches the very next request; the settings controller exposes value-free views and write-only storage.
ctx.authorizationseamauthorization-llm-pi-ai-Flows are registered by the plugin that knows how to obtain one credential and keyed by the record they write; the seam owns the conversation and the one-attempt-per-key lifecycle, never the protocol.
ctx.sessionTelemetryseamsession-telemetrysession-telemetry-otel--The seam captures, redacts, and hands session records to one backend; nothing else consumes the service — its output leaves the process.
ctx.storageseamstoragestorage-json, storage-sqlitestorage-domain-Backends register side by side under names; data forms (domain first) mount on the hub and translate typed operations into opaque KV-unit primitives.
ctx.storageDomaincorestorage-domain-workspace-Waits for every configured backend, then publishes the domain form as one lifecycle-bound service for typed durable state.
ctx.messageFeedbackcoremessage-feedback---Owns per-assistant-message feedback in the canonical Session log, target validation, per-item compare-and-set, and the Host unary Remote contract. Feedback stays outside model history; log export follows the consumer policy.
ctx.sessionFeedbackcorecommand-feedback---Records one Session-level remark with its category as a log-only feedback/record event on a live Session through the Host unary Remote contract; the /feedback command shares the same producer.
ctx.workspaceRegistrycoreworkspace-api-workspace-controller, api-session-controller-Owns WorkspaceId-branded records over the domain facility; stable sessionIds accounts drive Host RPC and GUI projections.
ctx.sessionQueryseamsession-querysession-query-sqlitesession-reference, tool-session-query-The interface supplies exact reads, filters, and traces; its concrete backend adds full-text reconciliation, ranking, snippets, and cursor generations, while the model consumer owns workspace authority and cursor-free rendering.
ctx.fileReferencesseamfile-referencefile-reference-localapi-session-controller-The interface returns path-only completion candidates within an Agent cwd; providers own namespace access and ranking without reading file contents.
ctx.sessionReferenceResolvercoresession-reference---Projects bounded current-surface conversation snapshots into durable untrusted message context; host adapters own mention syntax.
ctx.sessionTitleseamsession-titlesession-title-first-prompt-llm, session-title-all-prompts-llm--Owns the deterministic fallback, latest-title fold, and sole optional asynchronous provider registration.
ctx.systemPromptcoresystem-prompt-agent-loop, tools, tool-fs, tool-terminal, tool-web-Collects prompt sections and model-facing tool schemas for each step.
ctx.toolscoretools-agent-loop, tool-ask-user, tool-bash, tool-cordis, tool-fs, tool-terminal, tool-skill, tool-subagent, tool-todo, tool-web-Registers capabilities, owns PTC mode transport, and routes calls through pre-policy, monotonic guards, around dispatch, post-policy, and final-result observation.
ctx.userQuestionsseamuser-questions-tool-ask-user-UI front ends provide the active human-answer provider; tool-ask-user pauses a tool call on the provider-neutral ask() promise.
ctx.planModecoreplan-mode---Folds logged plan/mode state, flushes user selections at turn boundaries, renders deployment-owned guidance, registers /plan, and keeps the plan-exit schema stable across transitions.
ctx.agentPresetscoreagent-presets---Discovers preset directories over trusted and user-authored roots and mounts one preset cordis.yml under an agent scope during creation, rejecting a row that never activates or that publishes into the root service realm.
ctx.commandscorecommands---Plugins register direct human commands without sending invocations to the model.
ctx.sessionProjectionscoresession-projection-api-session-controller, tool-todo, session-title-Domains register state-driven fold units; the eager drive keeps per-session watermark states and the Session controller serves baselines and pushes changed values.
ctx.sessionProjectionCachecoresession-projection-cache-api-session-controller, session-query, session-reference, subagent-Durably checkpoints projection unit states per session (throttled + turn/end/detach mandatory points) and serves the cold-read ladder: cache row + persistence tail replay, so listings never load full logs.
ctx.skillsseamskillskill-badge, skill-filesystemtool-skill-Merges provider skill catalogs; tool-skill renders the session-prefix catalog and loads complete skill bodies.
ctx.agentscoreagent-agent-loop, acp, subagent-in-process-driver-Owns live Agent handles, the create/resume factory seam, and process-local initiator propagation.
ctx.agentDefaultModelcoreagent-default-model-api-session-controller, headless-Layers the default ModelSelection through settings so direct and Host-backed Agent entry points share one state owner.
ctx.agentLoopbundleagent-loop-base, sdk-minimal-The one concrete loop plugin; extension packages depend on dsh-agent events and services, not on this package.
ctx.goalscoregoal---Folds revisioned objective state from the session log and keeps live continuation activation process-local.
ctx.e2bcoree2b-fs-e2b, subprocess-e2b-Owns one shared E2B SDK handle, remote working directory, and final sandbox disposition so both fundamental E2B providers inhabit the same Linux runtime.
ctx.subprocessseamsubprocesssubprocess-local, subprocess-e2bbash-local, bash-sandbox, terminal-bash, lsp-stdio, subagent-acp, subagent-codex, subagent-claude-code-The bash executors, the PTY shell backend, the LSP host, and the out-of-process ACP, Codex, and Claude Code subagent backends spawn through ctx.subprocess; the service owns process coordinates, tree/session lifetime, stdio dispositions, terminal mechanics, and kill escalation.
ctx.shellseamshellbash-local, bash-sandbox, pwsh-localtool-bash, tool-pwsh, hooks-claude-code, hooks-codex-The model-facing shell tools and hook bridges consume this seam; sandboxed, remote, or PowerShell executors replace bash-local without touching them.
ctx.shellEnvcoreshell-env-tool-bash, tool-pwsh-Plugins declare effect-scoped DSH_* facts; each shell tool collects one trusted snapshot per execution and its executor rebuilds the namespace.
ctx.terminalsseamterminalterminal-bashtool-terminal-The registry owns exact-Agent session identity and cleanup; backends own terminal mechanics, while tool-terminal exposes the owner-scoped model tools.
ctx.sandboxseamsandboxsandbox-localbash-sandbox, terminal-bash-Consumers hand over the exact argv they are about to spawn; same-world backends wrap it under a per-call policy and report enforcement.
ctx.sandboxPolicycoresandbox-policy-bash-sandbox, fs-sandbox, terminal-bash-The one home for the deployment default mode + workspace root; only the sandboxed executor and provider read the service (the tool layers use the pure sandbox/mode fold it also exports). Both enforcing families read it so bash and fs cannot confine to different roots.
ctx.approvalseamuser-approval-tools, tool-bash, acp-One-shot permission decisions dispatched over the approval/request waterfall; answerers are listeners (the ACP bridge for its own agents), absence fails closed to unavailable.
ctx.permissionPresetscorepermission-presets---User-facing preset table (workspace-write/danger-full-access) bundling the sandbox-mode and approval-policy knobs; a switch writes one permission/preset event through to both knob events.
ctx.codeRuntimeseamcode-runtimecode-runtime-worker-thread, experimental-code-runtime-pythontools-Runs one model-written program against host-provided async bindings; backends differ by substrate and language (the tool registry consumes it for PTC mode).
ctx.fsseamfsfs-local, fs-sandbox, fs-e2btool-fsfs-observation-policytool-fs executes read/write/edit through ctx.fs; fs-sandbox fences mutations by the shared sandbox mode; fs-observation-policy contributes observed-state checks through the fs/* event gate.
ctx.compactionseamcompactioncompaction-basiccompaction-basic-The basic backend consumes post-step pressure and request-error recovery events; there is no model-facing compact tool.
ctx.subagentsseamsubagentsubagent-spawn-in-process, subagent-fork-in-process, subagent-acp, subagent-codex, subagent-claude-code, subagent-dsh-sdktool-subagent, tool-subagent-control, tool-ralph-Providers implement transports; the service also owns optional Activation-based continuation orchestration, tool-subagent selects one-shot or continuable delegation, tool-subagent-control delivers follow-ups, and tool-ralph requires one fresh structured-output route.
ctx.agentTeamscoreexperimental-agent-team-experimental-tool-agent-team, experimental-client-ui-agent-team-Owns the implicit-root roster, durable peer mailbox, shared task DAG, continuable-child lifecycle, and generated Team Remote methods; tool-agent-team contributes model controls and client-ui-agent-team mounts the browser contribution.
ctx.inspectorcoreinspector---Owns the Worker-hosted CDP target and the transport-independent Host and Client observation and Cordis-tree query API.
ctx.jobsseamjobsjobs-localtool-bash, tool-terminal, tool-subagent, tool-jobs-Producers (background bash, PTY sends, and subagent delegations) register running work; tool-jobs is the model-facing controller that reads, lists, and kills it; jobs-local is the process-local registry.
ctx.webseamwebweb-search-exa, web-search-perplexity, web-search-deepseek, web-fetch-httptool-web-Search and fetch providers register into one ctx.web seam; tool-web owns the stable model-facing names.
ctx.spillStoreseamspillspill-localspill-policy-The backend saves oversized tool text and returns a model-facing locator plus retrieval hint; spill-policy is the tools/post-execute consumer that decides when to spill.
ctx.directoryPickerseamhost-directory-pickerhost-directory-picker-native, host-directory-picker-browseapi-workspace-controller-Discriminated interaction capability: the native backend opens one OS chooser on the host display, the browse backend serves listing/creation primitives for the in-app browser; dual-face backends fill ui-workspace directory-flow slots from their browser halves (no wire advertisement).
ctx.webServercorehost-webserver-client-connection, client-modules, client-hmr-Plain node:http carrier: named-route registry, index transform taps, and the static dist fallback; web-transport plugins register their own routes.
ctx.clientModulescoreclient-modules-client-hmr-Composes the DSH_BOOT entry graph from an incremental dsh.client scan, serves plugin bundles, and notifies rebuilt/graph-changed subscribers.
ctx.workflowEngineseamworkflowworkflow-worker-threadtool-workflow, tool-ralph-One engine per context, as in bash, with no named-provider registry; the general workflow and fixed Ralph consumers start runs whose agent() calls fan out through ctx.subagents.
ctx.webhookRuntimecorewebhook-webhook-github-Provider adapters dispatch authenticated deliveries; trusted plugins register independent process-local rules, and the runtime turns non-null results into ordinary Workspace-backed Sessions without delivery or completion state.
ctx.lspseamlsplsp-stdiotool-lsp-Provider registration and selection plus normalized query execution over exactly four operations; the seam offers no protocol escape hatch, so a backend translates into the normalized request and result.
ctx.dynamicCordisRunnercorecordis-host-runner-tool-cordis-Owns the in-memory definition registry, the vm sandbox for host halves, and the request-run round trip; browser pages reach the same service over the wire through its remote namespace.
ctx.cordisInspectcorecordis-host-runner-tool-cordis-Registers host inspect providers, mirrors the client provider manifest, and routes client queries through the dynamic Cordis transport.

Maintenance mode: hybrid: services are discovered from Cordis declarations; interface/implementation/consumer roles are classified in scripts/gen-doc-graphs.ts with a completeness guard.