# vedanttathe/deployguru architecture

> Architecture diagram of the GitHub repository vedanttathe/deployguru, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vedanttathe/deployguru
- Repository: https://github.com/vedanttathe/deployguru

## Overview

#### Purpose and delivery surfaces
Continue is an AI coding-agent platform: users delegate coding workflows through a terminal CLI, VS Code, or JetBrains, with shared model, context, tool, and configuration capabilities. Primary entry points are the CLI executable (`extensions/cli/src/index.ts`), VS Code activation (`extensions/vscode/src/extension.ts`, `extensions/vscode/src/activation/activate.ts`), and IntelliJ plugin startup (`extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt`).

#### Shared agent core
The TypeScript core is the principal runtime behind IDE experiences. It coordinates configuration, conversations, LLM streaming, context, edits, and IDE protocol operations. Its public orchestration and cross-runtime message contracts are centered in:
- `core/core.ts`
- `core/protocol/core.ts`
- `core/protocol/ide.ts`

IDE hosts implement the protocol boundary rather than embedding core business logic directly, enabling equivalent features across editor platforms.

#### Model abstraction and streamed generation
Model selection is configuration-driven, then normalized behind a common LLM layer that supports cloud, proxy, and local providers. Chat/completion streams flow from provider adapters through prompt/template handling and back to the caller incrementally.
- `core/llm/index.ts`
- `core/llm/streamChat.ts`
- `core/llm/llms/index.ts`

Material external services include OpenAI-compatible APIs, Anthropic, Azure, Bedrock, Gemini, Ollama, and many other provider integrations. `packages/openai-adapters/src/index.ts` provides a reusable OpenAI/Vercel-oriented adapter layer.

#### Context, retrieval, and indexing
Before generation, agents assemble context from the active IDE/workspace, files, Git, terminals, web/docs, and MCP servers. Codebase retrieval is backed by local indexing and optional reranking; documentation crawling is a separate ingestion path.
- `core/context/providers/index.ts`
- `core/context/retrieval/retrieval.ts`
- `core/indexing/CodebaseIndexer.ts`

The boundary is important: IDE-specific file/editor access comes through protocol implementations, while core owns provider composition, chunking, search, and retrieval logic. Tree-sitter assets support language-aware extraction.

#### Tools, MCP, and edits
Agents can invoke built-in filesystem, search, terminal, web, and edit tools; execution is gated by policy and surfaced for approval in clients. MCP adds externally hosted tools/context over managed connections.
- `core/tools/callTool.ts`
- `core/tools/definitions/index.ts`
- `core/context/mcp/MCPConnection.ts`

Edits are applied through deterministic find/replace, unified diff, and streamed/lazy-apply paths rather than direct model output writes:
- `core/edit/searchAndReplace/performReplace.ts`
- `core/edit/lazy/streamLazyApply.ts`

#### CLI agent runtime
The Node/TypeScript CLI is both an interactive TUI and headless automation entry point. A service container wires auth, configuration, models, MCP, permissions, history, and remote APIs; streamed responses repeatedly execute tool calls until completion.
- `extensions/cli/src/services/ServiceContainer.ts`
- `extensions/cli/src/stream/streamChatResponse.ts`
- `extensions/cli/src/permissions/permissionChecker.ts`

Its terminal UI is React/Ink-style TSX (`extensions/cli/src/ui/TUIChat.tsx`). It connects to platform APIs through `extensions/cli/src/CLIPlatformClient.ts` and supports cloud-oriented workflows/remote execution.

#### IDE presentation and local processes
VS Code hosts webviews, editor decorations, autocomplete, and apply UX while adapting VS Code APIs to core:
- `extensions/vscode/src/extension/VsCodeExtension.ts`
- `extensions/vscode/src/VsCodeIde.ts`
- `extensions/vscode/src/autocomplete/completionProvider.ts`

JetBrains is a Kotlin/Gradle plugin with analogous IDE adapters and can launch/connect to the Node binary over IPC/TCP:
- `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt`
- `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/process/ContinueBinaryProcess.kt`
- `binary/src/index.ts`

The React GUI webview is a separate frontend, communicating through an IDE messenger and Redux stream/tool thunks:
- `gui/src/main.tsx`
- `gui/src/context/IdeMessenger.tsx`
- `gui/src/redux/thunks/streamResponse.ts`

#### Configuration, control plane, and observability
Local JSON/YAML/Markdown configuration resolves assistants, model roles, rules, prompts, MCP, and workspace overrides. Hub/platform configuration and organization policy form a remote control-plane boundary.
- `core/config/ConfigHandler.ts`
- `packages/config-yaml/src/index.ts`
- `core/control-plane/client.ts`

Generated TypeScript/Python SDKs expose platform API contracts (`packages/continue-sdk/openapi.yaml`). Analytics/error integrations include PostHog, Sentry, Logstash, and Continue Proxy pathways under `core/control-plane/analytics/`.

Main entry points: [`core/core.ts`](https://github.com/vedanttathe/deployguru/blob/main/core/core.ts) (Agent orchestration), [`extensions/cli/src/services/ServiceContainer.ts`](https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/services/ServiceContainer.ts) (CLI service container), [`core/config/ConfigHandler.ts`](https://github.com/vedanttathe/deployguru/blob/main/core/config/ConfigHandler.ts) (Local configuration), [`core/llm/streamChat.ts`](https://github.com/vedanttathe/deployguru/blob/main/core/llm/streamChat.ts) (LLM streaming layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Delivery surfaces"]
  node_cli_entry["CLI executable<br/>Node entrypoint<br/>[index.ts]"]
  node_vscode_activation["VS Code activation<br/>extension entrypoint<br/>[extension.ts]"]
  node_intellij_startup["JetBrains startup<br/>Kotlin plugin entrypoint"]
  node_vscode_host["VS Code IDE adapter<br/>protocol host<br/>[VsCodeIde.ts]"]
  node_autocomplete["Autocomplete<br/>VS Code feature"]
  node_jetbrains_messenger["JetBrains core messenger<br/>IPC protocol host<br/>[CoreMessenger.kt]"]
end

subgraph group_core["Shared agent core"]
  node_core_orchestrator["Agent orchestration<br/>TypeScript core<br/>[core.ts]"]
  node_core_protocol["Core protocol<br/>message contract<br/>[core.ts]"]
  node_ide_protocol["IDE protocol<br/>message contract<br/>[ide.ts]"]
  node_llm_layer["LLM streaming layer<br/>model abstraction<br/>[streamChat.ts]"]
  node_provider_adapters["Provider adapters<br/>LLM integrations<br/>[index.ts]"]
  node_context_retrieval["Context &amp; retrieval<br/>context pipeline<br/>[retrieval.ts]"]
  node_indexer["Codebase indexer<br/>local indexing<br/>[CodebaseIndexer.ts]"]
  node_tools["Tools &amp; approvals<br/>tool execution<br/>[callTool.ts]"]
  node_mcp["MCP connections<br/>external tool context<br/>[MCPConnection.ts]"]
  node_edit_engine["Deterministic edits<br/>edit application<br/>[performReplace.ts]"]
end

subgraph group_cli["CLI runtime"]
  node_service_container["CLI service container<br/>runtime composition"]
  node_cli_stream_loop["CLI agent stream loop<br/>tool-call loop"]
  node_cli_tui["Terminal chat UI<br/>React Ink UI<br/>[TUIChat.tsx]"]
end

subgraph group_control["Configuration &amp; platform"]
  node_config["Local configuration<br/>configuration resolver<br/>[ConfigHandler.ts]"]
  node_control_plane["Platform control plane<br/>remote API client<br/>[client.ts]"]
end

node_model_providers{{"Model providers<br/>external APIs"}}

node_cli_entry -->|"boots"| node_service_container
node_cli_tui -->|"requests responses"| node_cli_stream_loop
node_service_container -->|"configures"| node_cli_stream_loop
node_cli_stream_loop -->|"runs agent flow"| node_core_orchestrator
node_vscode_activation -->|"initializes"| node_vscode_host
node_vscode_host -->|"implements"| node_ide_protocol
node_autocomplete -->|"requests completions"| node_llm_layer
node_intellij_startup -->|"starts"| node_jetbrains_messenger
node_jetbrains_messenger -->|"implements"| node_ide_protocol
node_core_orchestrator -->|"orchestrates through"| node_core_protocol
node_core_orchestrator -->|"uses IDE operations"| node_ide_protocol
node_core_orchestrator -->|"assembles context"| node_context_retrieval
node_core_orchestrator -->|"streams generation"| node_llm_layer
node_core_orchestrator -->|"invokes"| node_tools
node_core_orchestrator -->|"applies edits"| node_edit_engine
node_context_retrieval -->|"searches codebase"| node_indexer
node_context_retrieval -->|"includes external context"| node_mcp
node_llm_layer -->|"selects adapter"| node_provider_adapters
node_provider_adapters -->|"calls"| node_model_providers
node_config -->|"supplies agent configuration"| node_core_orchestrator
node_config -->|"selects models"| node_llm_layer
node_service_container -->|"loads"| node_config
node_service_container -->|"connects"| node_control_plane
node_control_plane -.->|"provides policy and hub config"| node_config

click node_cli_entry "https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/index.ts"
click node_vscode_activation "https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/extension.ts"
click node_intellij_startup "https://github.com/vedanttathe/deployguru/blob/main/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt"
click node_vscode_host "https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/VsCodeIde.ts"
click node_autocomplete "https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/autocomplete/completionProvider.ts"
click node_jetbrains_messenger "https://github.com/vedanttathe/deployguru/blob/main/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt"
click node_core_orchestrator "https://github.com/vedanttathe/deployguru/blob/main/core/core.ts"
click node_core_protocol "https://github.com/vedanttathe/deployguru/blob/main/core/protocol/core.ts"
click node_ide_protocol "https://github.com/vedanttathe/deployguru/blob/main/core/protocol/ide.ts"
click node_llm_layer "https://github.com/vedanttathe/deployguru/blob/main/core/llm/streamChat.ts"
click node_provider_adapters "https://github.com/vedanttathe/deployguru/blob/main/core/llm/llms/index.ts"
click node_context_retrieval "https://github.com/vedanttathe/deployguru/blob/main/core/context/retrieval/retrieval.ts"
click node_indexer "https://github.com/vedanttathe/deployguru/blob/main/core/indexing/CodebaseIndexer.ts"
click node_tools "https://github.com/vedanttathe/deployguru/blob/main/core/tools/callTool.ts"
click node_mcp "https://github.com/vedanttathe/deployguru/blob/main/core/context/mcp/MCPConnection.ts"
click node_edit_engine "https://github.com/vedanttathe/deployguru/blob/main/core/edit/searchAndReplace/performReplace.ts"
click node_service_container "https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/services/ServiceContainer.ts"
click node_cli_stream_loop "https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/stream/streamChatResponse.ts"
click node_cli_tui "https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/ui/TUIChat.tsx"
click node_config "https://github.com/vedanttathe/deployguru/blob/main/core/config/ConfigHandler.ts"
click node_control_plane "https://github.com/vedanttathe/deployguru/blob/main/core/control-plane/client.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_entry,node_vscode_activation,node_intellij_startup,node_vscode_host,node_autocomplete,node_jetbrains_messenger toneBlue
class node_core_orchestrator,node_core_protocol,node_ide_protocol,node_llm_layer,node_provider_adapters,node_context_retrieval,node_indexer,node_tools,node_mcp,node_edit_engine toneAmber
class node_service_container,node_cli_stream_loop,node_cli_tui toneMint
class node_config,node_control_plane toneRose
class node_model_providers toneNeutral
```

## Components

### Delivery surfaces

- [CLI executable](https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/index.ts): Node entrypoint · `extensions/cli/src/index.ts`
- [VS Code activation](https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/extension.ts): extension entrypoint · `extensions/vscode/src/extension.ts`
- [JetBrains startup](https://github.com/vedanttathe/deployguru/blob/main/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt): Kotlin plugin entrypoint · `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/activities/ContinuePluginStartupActivity.kt`
- [VS Code IDE adapter](https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/VsCodeIde.ts): protocol host · Adapts VS Code APIs and hosts editor UX. · `extensions/vscode/src/VsCodeIde.ts`
- [Autocomplete](https://github.com/vedanttathe/deployguru/blob/main/extensions/vscode/src/autocomplete/completionProvider.ts): VS Code feature · `extensions/vscode/src/autocomplete/completionProvider.ts`
- [JetBrains core messenger](https://github.com/vedanttathe/deployguru/blob/main/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt): IPC protocol host · `extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt`

### Shared agent core

- [Agent orchestration](https://github.com/vedanttathe/deployguru/blob/main/core/core.ts): TypeScript core · Coordinates conversations, context, streaming, edits, and IDE operations. · `core/core.ts`
- [Core protocol](https://github.com/vedanttathe/deployguru/blob/main/core/protocol/core.ts): message contract · `core/protocol/core.ts`
- [IDE protocol](https://github.com/vedanttathe/deployguru/blob/main/core/protocol/ide.ts): message contract · `core/protocol/ide.ts`
- [LLM streaming layer](https://github.com/vedanttathe/deployguru/blob/main/core/llm/streamChat.ts): model abstraction · Normalizes configured cloud, proxy, and local providers. · `core/llm/streamChat.ts`
- [Provider adapters](https://github.com/vedanttathe/deployguru/blob/main/core/llm/llms/index.ts): LLM integrations · `core/llm/llms/index.ts`
- [Context & retrieval](https://github.com/vedanttathe/deployguru/blob/main/core/context/retrieval/retrieval.ts): context pipeline · Composes workspace, Git, terminal, web, docs, and MCP context. · `core/context/retrieval/retrieval.ts`
- [Codebase indexer](https://github.com/vedanttathe/deployguru/blob/main/core/indexing/CodebaseIndexer.ts): local indexing · Builds searchable codebase context. · `core/indexing/CodebaseIndexer.ts`
- [Tools & approvals](https://github.com/vedanttathe/deployguru/blob/main/core/tools/callTool.ts): tool execution · Invokes filesystem, search, terminal, web, and edit tools under policy. · `core/tools/callTool.ts`
- [MCP connections](https://github.com/vedanttathe/deployguru/blob/main/core/context/mcp/MCPConnection.ts): external tool context · `core/context/mcp/MCPConnection.ts`
- [Deterministic edits](https://github.com/vedanttathe/deployguru/blob/main/core/edit/searchAndReplace/performReplace.ts): edit application · Applies find/replace, diffs, and lazy streamed edits. · `core/edit/searchAndReplace/performReplace.ts`

### CLI runtime

- [CLI service container](https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/services/ServiceContainer.ts): runtime composition · Wires auth, models, MCP, permissions, history, and remote APIs. · `extensions/cli/src/services/ServiceContainer.ts`
- [CLI agent stream loop](https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/stream/streamChatResponse.ts): tool-call loop · Streams responses and repeatedly executes tool calls. · `extensions/cli/src/stream/streamChatResponse.ts`
- [Terminal chat UI](https://github.com/vedanttathe/deployguru/blob/main/extensions/cli/src/ui/TUIChat.tsx): React Ink UI · `extensions/cli/src/ui/TUIChat.tsx`

### Configuration & platform

- [Local configuration](https://github.com/vedanttathe/deployguru/blob/main/core/config/ConfigHandler.ts): configuration resolver · Resolves assistants, models, rules, prompts, MCP, and workspace overrides. · `core/config/ConfigHandler.ts`
- [Platform control plane](https://github.com/vedanttathe/deployguru/blob/main/core/control-plane/client.ts): remote API client · Provides hub configuration, organization policy, analytics, and proxy pathways. · `core/control-plane/client.ts`

### Other components

- **Model providers**: external APIs · OpenAI-compatible, Anthropic, Azure, Bedrock, Gemini, Ollama, and others.

## Connections

- CLI executable → CLI service container: boots
- Terminal chat UI → CLI agent stream loop: requests responses
- CLI service container → CLI agent stream loop: configures
- CLI agent stream loop → Agent orchestration: runs agent flow
- VS Code activation → VS Code IDE adapter: initializes
- VS Code IDE adapter → IDE protocol: implements
- Autocomplete → LLM streaming layer: requests completions
- JetBrains startup → JetBrains core messenger: starts
- JetBrains core messenger → IDE protocol: implements
- Agent orchestration → Core protocol: orchestrates through
- Agent orchestration → IDE protocol: uses IDE operations
- Agent orchestration → Context & retrieval: assembles context
- Agent orchestration → LLM streaming layer: streams generation
- Agent orchestration → Tools & approvals: invokes
- Agent orchestration → Deterministic edits: applies edits
- Context & retrieval → Codebase indexer: searches codebase
- Context & retrieval → MCP connections: includes external context
- LLM streaming layer → Provider adapters: selects adapter
- Provider adapters → Model providers: calls
- Local configuration → Agent orchestration: supplies agent configuration
- Local configuration → LLM streaming layer: selects models
- CLI service container → Local configuration: loads
- CLI service container → Platform control plane: connects
- Platform control plane → Local configuration: provides policy and hub config
