A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
feat: migrate to @github/copilot-language-server, enable GitHub copilot in Conda environments (#5010)
Myles Scolnick09fd33cc02e7
diff --git a/docs/guides/troubleshooting.md b/docs/guides/troubleshooting.mdindex 3ef6ac3cb3..160c9a2b31 100644--- a/docs/guides/troubleshooting.md+++ b/docs/guides/troubleshooting.md@@ -101,7 +101,6 @@ If you find yourself needing to force execution order often, it might be a sign## General debugging tips-### Understanding dependencies- Use the Variables Panel to inspect variable values and see where they're defined and used.@@ -126,7 +125,6 @@ sys.path[0] == 'path/to/'You can add entries to `sys.path` in your pyproject.toml [runtime configuration](../guides/configuration/runtime_configuration.md).-### Other patchesWhen running as a notebook, marimo makes the following changes to variables:@@ -162,3 +160,16 @@ marimo edit --proxy example.com:8080# ormarimo run --proxy example.com:8080```++### Reading the logs++marimo will output logs to `$XDG_CACHE_HOME/marimo/logs/*`. To view the logs, run:++```bash+cat $XDG_CACHE_HOME/marimo/logs/github-copilot-lsp.log+```++Available logs are:++- `github-copilot-lsp.log`+- `pylsp.log`diff --git a/frontend/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx b/frontend/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsxindex 078c63cb40..1f244a7eca 100644--- a/frontend/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx+++ b/frontend/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx@@ -34,6 +34,8 @@ export const CopilotStatusIcon: React.FC = () => {return null;};+const logger = Logger.get("[copilot-status-bar]");+const GitHubCopilotStatus: React.FC = () => {const isGitHubCopilotSignedIn = useAtomValue(isGitHubCopilotSignedInState);const isLoading = useAtomValue(githubCopilotLoadingVersion) !== null;@@ -53,7 +55,7 @@ const GitHubCopilotStatus: React.FC = () => {try {// If we fail to initialize, show connection errorawait client.initializePromise.catch((error) => {- Logger.error("Copilot#checkConnection: Failed to initialize", error);+ logger.error("Failed to initialize", error);client.close();throw error;});@@ -73,7 +75,7 @@ const GitHubCopilotStatus: React.FC = () => {if (!mounted) {return;}- Logger.warn("Copilot#checkConnection: Connection failed", error);+ logger.warn("Connection failed", error);setCopilotSignedIn(false);setStep("connectionError");toast({diff --git a/frontend/src/core/codemirror/copilot/__tests__/copilot.test.ts b/frontend/src/core/codemirror/copilot/__tests__/copilot.test.tsindex 523977bad0..3c5e302517 100644--- a/frontend/src/core/codemirror/copilot/__tests__/copilot.test.ts+++ b/frontend/src/core/codemirror/copilot/__tests__/copilot.test.ts@@ -2,7 +2,7 @@import { describe, it, expect } from "vitest";import { exportedForTesting } from "../extension";import { EditorView } from "@codemirror/view";-import type { CopilotGetCompletionsResult } from "../types";+import type { InlineCompletionList } from "vscode-languageserver-protocol";const { getCopilotRequest, getSuggestion } = exportedForTesting;@@ -18,8 +18,7 @@ describe("getCopilotRequest", () => {const allCode = state.doc.toString();const result = getCopilotRequest(state, allCode);- expect(result.doc.source).toMatchInlineSnapshot(`""`);- expect(result.doc.position).toMatchInlineSnapshot(`+ expect(result.position).toMatchInlineSnapshot(`{"character": 0,"line": 0,@@ -36,11 +35,7 @@ describe("getCopilotRequest", () => {const allCode = state.doc.toString();const result = getCopilotRequest(state, allCode);- expect(result.doc.source).toMatchInlineSnapshot(`- "x = 1- y ="- `);- expect(result.doc.position).toMatchInlineSnapshot(`+ expect(result.position).toMatchInlineSnapshot(`{"character": 0,"line": 0,@@ -61,11 +56,7 @@ describe("getCopilotRequest", () => {const allCode = state.doc.toString();const result = getCopilotRequest(state, allCode);- expect(result.doc.source).toMatchInlineSnapshot(`- "x = 1- y ="- `);- expect(result.doc.position).toMatchInlineSnapshot(`+ expect(result.position).toMatchInlineSnapshot(`{"character": 3,"line": 1,@@ -82,13 +73,7 @@ describe("getCopilotRequest", () => {const allCode = `${OTHER_CODE}\n${state.doc.toString()}`;const result = getCopilotRequest(state, allCode);- expect(result.doc.source).toMatchInlineSnapshot(`- "import numpy as np- import pandas as pd- x = 1- y ="- `);- expect(result.doc.position).toMatchInlineSnapshot(`+ expect(result.position).toMatchInlineSnapshot(`{"character": 0,"line": 2,@@ -109,13 +94,11 @@ describe("getCopilotRequest", () => {const allCode = `${OTHER_CODE}\n${state.doc.toString()}`;const result = getCopilotRequest(state, allCode);- expect(result.doc.source).toMatchInlineSnapshot(`- "import numpy as np- import pandas as pd- x = 1+ expect(state.doc.toString()).toMatchInlineSnapshot(`+ "x = 1y ="`);- expect(result.doc.position).toMatchInlineSnapshot(`+ expect(result.position).toMatchInlineSnapshot(`{"character": 3,"line": 3,@@ -130,7 +113,7 @@ describe("getSuggestion", () => {doc: "mo",extensions: [],});- const response = { completions: [] };+ const response: InlineCompletionList = { items: [] };const position = { line: 0, character: 0 };const result = getSuggestion(response, position, view.state);@@ -143,14 +126,17 @@ describe("getSuggestion", () => {doc: "mo",extensions: [],});- const response = {- completions: [+ const response: InlineCompletionList = {+ items: [{- displayText: "mo.ui.table(",- position: { line: 0, character: 0 },+ insertText: "mo.ui.table(",+ range: {+ start: { line: 0, character: 0 },+ end: { line: 0, character: 0 },+ },},],- } as CopilotGetCompletionsResult;+ };// We are 2 characters into the lineconst position = { line: 0, character: 0 };@@ -164,14 +150,17 @@ describe("getSuggestion", () => {doc: "mo",extensions: [],});- const response = {- completions: [+ const response: InlineCompletionList = {+ items: [{- displayText: ".ui.table(",- position: { line: 0, character: 2 },+ insertText: ".ui.table(",+ range: {+ start: { line: 0, character: 2 },+ end: { line: 0, character: 2 },+ },},],- } as CopilotGetCompletionsResult;+ };// We are 2 characters into the lineconst position = { line: 0, character: 2 };@@ -180,19 +169,22 @@ describe("getSuggestion", () => {expect(result).toBe(".ui.table(");});- it("should trim the beginning of displayText when startOffset is negative", () => {+ it("should trim the beginning of insertText when startOffset is negative", () => {const view = new EditorView({doc: "mo",extensions: [],});- const response = {- completions: [+ const response: InlineCompletionList = {+ items: [{- displayText: "mo.ui.table(",- position: { line: 0, character: 0 },+ insertText: "mo.ui.table(",+ range: {+ start: { line: 0, character: 0 },+ end: { line: 0, character: 0 },+ },},],- } as CopilotGetCompletionsResult;+ };// We are 2 characters into the lineconst position = { line: 0, character: 2 };@@ -201,7 +193,7 @@ describe("getSuggestion", () => {expect(result).toBe(".ui.table(");});- it("should trim end of displayText when it matches the next characters - on the same line", () => {+ it("should trim end of insertText when it matches the next characters - on the same line", () => {const view = new EditorView({doc: "print('hello') # comment",// Cursor ------- ^@@ -211,14 +203,17 @@ describe("getSuggestion", () => {view.dispatch({selection: { anchor: 12 },});- const response = {- completions: [+ const response: InlineCompletionList = {+ items: [{- displayText: " world')",- position: { line: 0, character: 12 },+ insertText: " world')",+ range: {+ start: { line: 0, character: 12 },+ end: { line: 0, character: 12 },+ },},],- } as CopilotGetCompletionsResult;+ };// We are 2 characters into the lineconst position = { line: 0, character: 12 };@@ -228,7 +223,7 @@ describe("getSuggestion", () => {expect(result).toBe(" world");});- it("should trim end of displayText when it matches the next characters - on the next line", () => {+ it("should trim end of insertText when it matches the next characters - on the next line", () => {const view = new EditorView({doc: `mo.md("""\nhello\n""")`,// Cursor ----------- ^@@ -242,14 +237,17 @@ describe("getSuggestion", () => {const textUpToCursor = view.state.doc.sliceString(0, 15);expect(textUpToCursor).toBe(`mo.md("""\nhello`);- const response = {- completions: [+ const response: InlineCompletionList = {+ items: [{- displayText: `hello world\n""")`,- position: { line: 1, character: 0 },+ insertText: `hello world\n""")`,+ range: {+ start: { line: 1, character: 0 },+ end: { line: 1, character: 0 },+ },},],- } as CopilotGetCompletionsResult;+ };// We are 5 characters into the line (past the hello)const position = { line: 1, character: 5 };diff --git a/frontend/src/core/codemirror/copilot/client.ts b/frontend/src/core/codemirror/copilot/client.tsindex 230c061340..9046897c74 100644--- a/frontend/src/core/codemirror/copilot/client.ts+++ b/frontend/src/core/codemirror/copilot/client.ts@@ -6,10 +6,10 @@ import { WebSocketTransport } from "@open-rpc/client-js";import { Transport } from "@open-rpc/client-js/build/transports/Transport";import type { JSONRPCRequestData } from "@open-rpc/client-js/build/Request";import { waitForEnabledCopilot } from "./state";-import { waitForWs } from "@/utils/waitForWs";-import { resolveToWsUrl } from "@/core/websocket/createWsUrl";import { Logger } from "@/utils/Logger";import { toast } from "@/components/ui/use-toast";+import { resolveToWsUrl } from "@/core/websocket/createWsUrl";+import { waitForConnectionOpen } from "@/core/network/connection";// Dummy file for the copilot language serverexport const COPILOT_FILENAME = "/__marimo_copilot__.py";@@ -69,7 +69,7 @@ class LazyWebsocketTransport extends Transport {// Wait for copilot to be enabledawait waitForEnabledCopilot();// Wait for ws to be available with retries- await waitForWs(this.WS_URL, 3);+ await waitForConnectionOpen();// Try connecting with retriesreturn this.tryConnect();diff --git a/frontend/src/core/codemirror/copilot/copilot-config.tsx b/frontend/src/core/codemirror/copilot/copilot-config.tsxindex 174482128d..0c5d469231 100644--- a/frontend/src/core/codemirror/copilot/copilot-config.tsx+++ b/frontend/src/core/codemirror/copilot/copilot-config.tsx@@ -10,14 +10,13 @@ import { Label } from "@/components/ui/label";import { toast } from "@/components/ui/use-toast";import { copyToClipboard } from "@/utils/copy";import { Logger } from "@/utils/Logger";-import { useOpenSettingsToTab } from "@/components/app-config/state";+import type { GitHubCopilotStatus } from "./types";export const CopilotConfig = memo(() => {const [copilotSignedIn, copilotChangeSignIn] = useAtom(isGitHubCopilotSignedInState,);const [step, setStep] = useAtom(copilotSignedInState);- const { handleClick: openSettings } = useOpenSettingsToTab();const [localData, setLocalData] = useState<{ url: string; code: string }>();const [loading, setLoading] = useState(false);@@ -25,11 +24,8 @@ export const CopilotConfig = memo(() => {evt.preventDefault();setLoading(true);try {- const client = getCopilotClient();- const { verificationUri, status, userCode } =- await client.signInInitiate();-- if (status === "OK" || status === "AlreadySignedIn") {+ const { verificationUri, status, userCode } = await initiateSignIn();+ if (isSignedIn(status)) {copilotChangeSignIn(true);} else {setStep("signingIn");@@ -45,44 +41,14 @@ export const CopilotConfig = memo(() => {if (!localData) {return;}- const client = getCopilotClient();- const MAX_RETRIES = 3;- const RETRY_DELAY_MS = 1000;+ setLoading(true);try {- setLoading(true);- Logger.log("Copilot#tryFinishSignIn: Attempting to confirm sign-in");- const { status } = await client.signInConfirm({- userCode: localData.code,- });-- if (status === "OK" || status === "AlreadySignedIn") {- Logger.log("Copilot#tryFinishSignIn: Sign-in confirmed successfully");+ const result = await handleSignInConfirmation(localData.code);+ if (result.success) {copilotChangeSignIn(true);setStep("signedIn");- } else {- Logger.warn(- "Copilot#tryFinishSignIn: Sign-in confirmation returned unexpected status",- { status },- );- setStep("signInFailed");- }- } catch (error) {- Logger.warn(- "Copilot#tryFinishSignIn: Initial sign-in confirmation failed, attempting retries",- );-- // Check if it's a connection error- if (- error instanceof Error &&- (error.message.includes("ECONNREFUSED") ||- error.message.includes("WebSocket") ||- error.message.includes("network"))- ) {- Logger.error(- "Copilot#tryFinishSignIn: Connection error during sign-in",- error,- );+ } else if (result.error === "connection") {setStep("connectionError");toast({title: "GitHub Copilot Connection Error",@@ -90,53 +56,9 @@ export const CopilotConfig = memo(() => {variant: "danger",action: <Button onClick={trySignIn}>Retry</Button>,});- return;- }-- // If not a connection error, try seeing if we're already signed in- // We try multiple times with a delay between attempts- for (let i = 0; i < MAX_RETRIES; i++) {- try {- await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY_MS));- const signedIn = await client.signedIn();- if (signedIn) {- Logger.log(- "Copilot#tryFinishSignIn: Successfully signed in after retry",- );- copilotChangeSignIn(true);- setStep("signedIn");- return;- }- } catch (retryError) {- Logger.warn("Copilot#tryFinishSignIn: Retry attempt failed", {- attempt: i + 1,- maxRetries: MAX_RETRIES,- });- // Check for connection errors during retry- if (- retryError instanceof Error &&- (retryError.message.includes("ECONNREFUSED") ||- retryError.message.includes("WebSocket") ||- retryError.message.includes("network"))- ) {- setStep("connectionError");- toast({- title: "GitHub Copilot Connection Error",- description:- "Lost connection during sign-in. Please check settings and try again.",- variant: "danger",- action: (- <Button variant="link" onClick={() => openSettings("ai")}>- Settings- </Button>- ),- });- return;- }- }+ } else {+ setStep("signInFailed");}- Logger.error("Copilot#tryFinishSignIn: All sign-in attempts failed");- setStep("signInFailed");} finally {setLoading(false);}@@ -144,10 +66,9 @@ export const CopilotConfig = memo(() => {const signOut = async (evt: React.MouseEvent) => {evt.preventDefault();- const client = getCopilotClient();+ await handleSignOut();copilotChangeSignIn(false);setStep("signedOut");- await client.signOut();};const renderBody = () => {@@ -274,4 +195,91 @@ export const CopilotConfig = memo(() => {return renderBody();});+CopilotConfig.displayName = "CopilotConfig";++// Utility functions+const MAX_RETRIES = 5;+const RETRY_DELAY_MS = 3000;++async function initiateSignIn() {+ const client = getCopilotClient();+ return await client.signInInitiate();+}++async function handleSignInConfirmation(userCode: string) {+ const client = getCopilotClient();++ try {+ Logger.log("Copilot#tryFinishSignIn: Attempting to confirm sign-in");+ const { status } = await client.signInConfirm({ userCode });++ if (isSignedIn(status)) {+ Logger.log("Copilot#tryFinishSignIn: Sign-in confirmed successfully");+ return { success: true };+ }++ Logger.warn(+ "Copilot#tryFinishSignIn: Sign-in confirmation returned unexpected status",+ { status },+ );+ return { success: false };+ } catch (error) {+ if (isConnectionError(error)) {+ Logger.error(+ "Copilot#tryFinishSignIn: Connection error during sign-in",+ error,+ );+ return { success: false, error: "connection" };+ }++ return await handleSignInRetry(client);+ }+}++async function handleSignInRetry(client: ReturnType<typeof getCopilotClient>) {+ for (let i = 0; i < MAX_RETRIES; i++) {+ try {+ await new Promise((resolve) => setTimeout(resolve, RETRY_DELAY_MS));+ const signedIn = await client.signedIn();+ if (signedIn) {+ Logger.log(+ "Copilot#tryFinishSignIn: Successfully signed in after retry",+ );+ return { success: true };+ }+ } catch (retryError) {+ Logger.warn("Copilot#tryFinishSignIn: Retry attempt failed", {+ attempt: i + 1,+ maxRetries: MAX_RETRIES,+ });++ if (isConnectionError(retryError)) {+ return { success: false, error: "connection" };+ }+ }+ }++ Logger.error("Copilot#tryFinishSignIn: All sign-in attempts failed");+ return { success: false };+}++async function handleSignOut() {+ const client = getCopilotClient();+ await client.signOut();+}++function isConnectionError(error: unknown): boolean {+ return (+ error instanceof Error &&+ (error.message.includes("ECONNREFUSED") ||+ error.message.includes("WebSocket") ||+ error.message.includes("network"))+ );+}++function isSignedIn(status: GitHubCopilotStatus): boolean {+ return (+ status === "SignedIn" || status === "AlreadySignedIn" || status === "OK"+ );+}diff --git a/frontend/src/core/codemirror/copilot/extension.ts b/frontend/src/core/codemirror/copilot/extension.tsindex 7091a9973a..10c9372d13 100644--- a/frontend/src/core/codemirror/copilot/extension.ts+++ b/frontend/src/core/codemirror/copilot/extension.ts@@ -7,12 +7,7 @@ import {type Text,} from "@codemirror/state";import { keymap } from "@codemirror/view";-import {- COPILOT_FILENAME,- LANGUAGE_ID,- copilotServer,- getCopilotClient,-} from "./client";+import { COPILOT_FILENAME, copilotServer, getCopilotClient } from "./client";import {inlineCompletion,rejectInlineCompletion,@@ -25,19 +20,23 @@ import {import { isCopilotEnabled } from "./state";import { getCodes } from "./getCodes";import type { CompletionConfig } from "@/core/config/config-schema";-import type {- CopilotGetCompletionsParams,- CopilotGetCompletionsResult,-} from "./types";import { Logger } from "@/utils/Logger";import { languageAdapterState } from "../language/extension";import { API } from "@/core/network/api";import type { AiInlineCompletionRequest } from "@/core/kernel/messages";import type { EditorView } from "@codemirror/view";import { isInVimMode } from "../utils";+import {+ InlineCompletionTriggerKind,+ type InlineCompletionItem,+ type InlineCompletionList,+ type InlineCompletionParams,+} from "vscode-languageserver-protocol";const copilotCompartment = new Compartment();+const logger = Logger.get("@github/copilot-language-server");+const commonInlineCompletionConfig = {delay: 500, // default is 500msincludeKeymap: true,@@ -97,14 +96,7 @@ export const copilotBundle = (config: CompletionConfig): Extension => {const request = getCopilotRequest(state, allCode);const response = await getCopilotClient().getCompletion(request);- const suggestion = getSuggestion(- response,- request.doc.position,- state,- );- if (suggestion) {- Logger.debug("Copilot suggestion:", suggestion);- }+ const suggestion = getSuggestion(response, request.position, state);return suggestion;},}),@@ -177,7 +169,7 @@ export const copilotBundle = (config: CompletionConfig): Extension => {function getCopilotRequest(state: EditorState,allCode: string,-): CopilotGetCompletionsParams {+): InlineCompletionParams {// We need to update the position of the cursor because added newlines// from appending the other codeconst currentCode = state.doc.toString();@@ -186,41 +178,52 @@ function getCopilotRequest(const position = offsetToPos(state.doc, state.selection.main.head);position.line += numberOfNewLines;-return {- doc: {- source: allCode,+ textDocument: {+ uri: `file://${COPILOT_FILENAME}`,+ version: "replace_me" as unknown as number,+ },+ position: position,+ context: {+ triggerKind: InlineCompletionTriggerKind.Automatic,+ },+ formattingOptions: {tabSize: state.tabSize,- indentSize: 1,insertSpaces: true,- path: COPILOT_FILENAME,- version: "replace_me" as unknown as number,- uri: `file://${COPILOT_FILENAME}`,- relativePath: COPILOT_FILENAME,- languageId: LANGUAGE_ID,- position: position,},- };+ } as InlineCompletionParams;}function getSuggestion(- response: CopilotGetCompletionsResult,- userPosition: CopilotGetCompletionsParams["doc"]["position"],+ response: InlineCompletionList | InlineCompletionItem[] | null,+ userPosition: InlineCompletionParams["position"],state: EditorState,): string {- // Empty (can happen if it is a stale request)- if (response.completions.length === 0) {+ if (!response) {+ logger.error("No response from copilot");return "";}- const { displayText, position: completionPosition } = response.completions[0];+ const first = Array.isArray(response) ? response[0] : response.items[0];+ if (!first) {+ logger.debug("No response from copilot");+ return "";+ }++ const { insertText, range } = first;+ const insertTextString = String(insertText);++ if (!range) {+ logger.error("No range from copilot");+ return insertTextString;+ }// Calculate the start of the suggestion relative to the current position- const startOffset = completionPosition.character - userPosition.character;+ const startOffset = range.start.character - userPosition.character;// If startOffset is negative, we need to trim the beginning of displayTextconst resultText =- startOffset < 0 ? displayText.slice(-startOffset) : displayText;+ startOffset < 0 ? insertTextString.slice(-startOffset) : insertTextString;// If the end of the suggestion already exists next in the document, we should trim it,// for example closing quotes, brackets, etc.diff --git a/frontend/src/core/codemirror/copilot/language-server.ts b/frontend/src/core/codemirror/copilot/language-server.tsindex 16081a9ada..bf9a4b7e57 100644--- a/frontend/src/core/codemirror/copilot/language-server.ts+++ b/frontend/src/core/codemirror/copilot/language-server.ts@@ -7,22 +7,16 @@ import type {DidOpenTextDocumentParams,Hover,HoverParams,+ InlineCompletionItem,+ InlineCompletionList,+ InlineCompletionParams,} from "vscode-languageserver-protocol";import { VersionedTextDocumentIdentifier } from "vscode-languageserver-protocol";-import { LanguageServerClient } from "@marimo-team/codemirror-languageserver";import type {- CopilotStatus,- CopilotSignInInitiateParams,- CopilotSignInInitiateResult,- CopilotSignInConfirmParams,- CopilotSignInConfirmResult,- CopilotSignOutParams,- CopilotSignOutResult,- CopilotGetCompletionsParams,- CopilotGetCompletionsResult,- CopilotAcceptCompletionParams,- CopilotRejectCompletionParams,+ GitHubCopilotSignInConfirmParams,+ GitHubCopilotSignInInitiateResult,+ GitHubCopilotStatusResult,} from "./types";import {isCopilotEnabled,@@ -33,15 +27,18 @@ import { getCodes } from "./getCodes";import { Logger } from "@/utils/Logger";import { throttle } from "lodash-es";+const logger = Logger.get("@github/copilot-language-server");+// A map of request methods and their parameters and return typesexport interface LSPRequestMap {- checkStatus: [{}, { status: CopilotStatus; user: string }];- signInInitiate: [CopilotSignInInitiateParams, CopilotSignInInitiateResult];- signInConfirm: [CopilotSignInConfirmParams, CopilotSignInConfirmResult];- signOut: [CopilotSignOutParams, CopilotSignOutResult];- notifyAccepted: [CopilotAcceptCompletionParams, unknown];- notifyRejected: [CopilotRejectCompletionParams, unknown];- getCompletions: [CopilotGetCompletionsParams, CopilotGetCompletionsResult];+ checkStatus: [{}, GitHubCopilotStatusResult];+ signIn: [{}, GitHubCopilotSignInInitiateResult];+ signInConfirm: [GitHubCopilotSignInConfirmParams, GitHubCopilotStatusResult];+ signOut: [{}, GitHubCopilotStatusResult];+ "textDocument/inlineCompletion": [+ InlineCompletionParams,+ InlineCompletionList | InlineCompletionItem[] | null,+ ];}/**@@ -59,11 +56,35 @@ export class CopilotLanguageServerClient extends LanguageServerClient {// eslint-disable-next-line @typescript-eslint/no-explicit-anyreturn await (this as any).request(method, params);} catch (error) {- Logger.error("CopilotLanguageServerClient#request: Error", error);+ logger.error("#request: Error", error);throw error;}}+ // eslint-disable-next-line @typescript-eslint/no-explicit-any+ override async notify(method: any, params: any): Promise<any> {+ logger.debug("#notify", method, params);+ return super.notify(method, params);+ }++ override getInitializationOptions() {+ const info = {+ name: "marimo",+ version: "0.1.0",+ };+ return {+ ...super.getInitializationOptions(),+ workspaceFolders: [],+ capabilities: {+ workspace: { workspaceFolders: false },+ },+ initializationOptions: {+ editorInfo: info,+ editorPluginInfo: info,+ },+ };+ }+private isDisabled() {return !isCopilotEnabled();}@@ -105,15 +126,15 @@ export class CopilotLanguageServerClient extends LanguageServerClient {const changes = params.contentChanges;if (changes.length !== 1) {- Logger.warn(- "CopilotLanguageServerClient#textDocumentDidChange: Multiple changes detected. This is not supported.",+ logger.warn(+ "#textDocumentDidChange: Multiple changes detected. This is not supported.",changes,);}const change = changes[0];if ("range" in change) {- Logger.warn(- "CopilotLanguageServerClient#textDocumentDidChange: Copilot doesn't support range changes.",+ logger.warn(+ "#textDocumentDidChange: Copilot doesn't support range changes.",change,);}@@ -140,28 +161,25 @@ export class CopilotLanguageServerClient extends LanguageServerClient {}async signInInitiate() {- Logger.log("Copilot#signInInitiate: Starting sign-in flow");+ logger.log("#signInInitiate: Starting sign-in flow");try {- const result = await this._request("signInInitiate", {});- Logger.log("Copilot#signInInitiate: Sign-in flow started successfully");+ const result = await this._request("signIn", {});+ logger.log("#signInInitiate: Sign-in flow started successfully");return result;} catch (error) {- Logger.warn(- "Copilot#signInInitiate: Failed to start sign-in flow",- error,- );+ logger.warn("#signInInitiate: Failed to start sign-in flow", error);throw error;}}- async signInConfirm(params: CopilotSignInConfirmParams) {- Logger.log("Copilot#signInConfirm: Confirming sign-in");+ async signInConfirm(params: GitHubCopilotSignInConfirmParams) {+ logger.log("#signInConfirm: Confirming sign-in");try {const result = await this._request("signInConfirm", params);- Logger.log("Copilot#signInConfirm: Sign-in confirmed successfully");+ logger.log("#signInConfirm: Sign-in confirmed successfully");return result;} catch (error) {- Logger.warn("Copilot#signInConfirm: Failed to confirm sign-in", error);+ logger.warn("#signInConfirm: Failed to confirm sign-in", error);throw error;}}@@ -169,34 +187,26 @@ export class CopilotLanguageServerClient extends LanguageServerClient {async signedIn() {try {const { status } = await this._request("checkStatus", {});- Logger.log("Copilot#signedIn: Status check completed", { status });+ logger.log("#checkStatus: Status check completed", { status });return (status === "SignedIn" || status === "AlreadySignedIn" || status === "OK");} catch (error) {- Logger.warn("Copilot#signedIn: Failed to check sign-in status", error);+ logger.warn("#signedIn: Failed to check sign-in status", error);throw error;}}- // COMPLETIONS- acceptCompletion(params: CopilotAcceptCompletionParams) {- return this._request("notifyAccepted", params);- }-- rejectCompletions(params: CopilotRejectCompletionParams) {- return this._request("notifyRejected", params);- }-private getCompletionInternal = async (- params: CopilotGetCompletionsParams,+ params: InlineCompletionParams,version: number,- ): Promise<CopilotGetCompletionsResult> => {- return await this._request("getCompletions", {- doc: {- ...params.doc,+ ): Promise<InlineCompletionList | InlineCompletionItem[] | null> => {+ return await this._request("textDocument/inlineCompletion", {+ ...params,+ textDocument: {+ ...params.textDocument,version: version,- },+ } as VersionedTextDocumentIdentifier,});};@@ -210,18 +220,19 @@ export class CopilotLanguageServerClient extends LanguageServerClient {);async getCompletion(- params: CopilotGetCompletionsParams,- ): Promise<CopilotGetCompletionsResult> {+ params: InlineCompletionParams,+ ): Promise<InlineCompletionList | InlineCompletionItem[] | null> {if (this.isDisabled()) {- return { completions: [] };+ return null;}const requestVersion = this.documentVersion;- params.doc.version = requestVersion;+ (params.textDocument as VersionedTextDocumentIdentifier).version =+ requestVersion;// If version is 0, it means the document hasn't been opened yetif (requestVersion === 0) {- return { completions: [] };+ return null;}// Start a loading indicator@@ -235,9 +246,9 @@ export class CopilotLanguageServerClient extends LanguageServerClient {// If the document version has changed since the request was made, return an empty responseif (requestVersion !== this.documentVersion) {- return { completions: [] };+ return null;}- return response || { completions: [] };+ return response ?? null;}}diff --git a/frontend/src/core/codemirror/copilot/types.ts b/frontend/src/core/codemirror/copilot/types.tsindex 8db6627bf0..aff3c9da76 100644--- a/frontend/src/core/codemirror/copilot/types.ts+++ b/frontend/src/core/codemirror/copilot/types.ts@@ -1,99 +1,41 @@/* Copyright 2024 Marimo. All rights reserved. *//* eslint-disable @typescript-eslint/no-empty-interface */-export type CopilotSignInInitiateParams = {};-export interface CopilotSignInInitiateResult {- verificationUri: string;- status: string;+export interface GitHubCopilotSignInInitiateResult {+ verificationUri: string; // https://github.com/login/device+ status: GitHubCopilotStatus; // PromptUserDeviceFlowuserCode: string;- expiresIn: number;- interval: number;+ expiresIn: number; // Seconds (usually 15 minutes)+ interval: number; // For polling+ command: {+ command: string; // github.copilot.finishDeviceFlow+ title: string; // Sign in with GitHub+ arguments: string[];+ };}-export interface CopilotSignInConfirmParams {++export interface GitHubCopilotSignInConfirmParams {userCode: string;}/*** Copilot account status.*/-export type CopilotStatus =+export type GitHubCopilotStatus =| "SignedIn"| "AlreadySignedIn"| "MaybeOk"| "NotAuthorized"| "NotSignedIn"+ | "PromptUserDeviceFlow"| "OK";/*** Copilot status.*/-export type CopilotRequestStatus = "InProgress" | "Warning" | "Normal";+export type GitHubCopilotRequestStatus = "InProgress" | "Warning" | "Normal";-export interface CopilotSignInConfirmResult {- status: CopilotStatus;+export interface GitHubCopilotStatusResult {+ status: GitHubCopilotStatus;user: string;}-export type CopilotSignOutParams = {};-export interface CopilotSignOutResult {- status: CopilotStatus;-}-export interface CopilotGetCompletionsParams {- doc: {- source: string;- tabSize: number;- indentSize: number;- insertSpaces: boolean;- path: string;- uri: string;- relativePath: string;- languageId: string;- version: number;- position: {- line: number;- character: number;- };- };-}--export interface CopilotGetCompletionsResult {- completions: Array<{- text: string;- docVersion: number;- position: {- line: number;- character: number;- };- uuid: string;- range: {- start: {- line: number;- character: number;- };- end: {- line: number;- character: number;- };- };- displayText: string;- point: {- line: number;- character: number;- };- region: {- start: {- line: number;- character: number;- };- end: {- line: number;- character: number;- };- };- }>;-}-export interface CopilotAcceptCompletionParams {- uuid: string;-}-export interface CopilotRejectCompletionParams {- uuids: string[];-}diff --git a/lsp/index.test.ts b/lsp/index.test.tsnew file mode 100644index 0000000000..1ac34de0a6--- /dev/null+++ b/lsp/index.test.ts@@ -0,0 +1,21 @@+import { spawn } from "node:child_process";+import { describe, it, expect } from "vitest";++describe("LSP Server", () => {+ it("should start and be killable", async () => {+ const process = spawn("node", ["./dist/index.cjs"]);++ // Give it a moment to start+ await new Promise((resolve) => setTimeout(resolve, 1000));++ // Kill the process+ process.kill();++ // Wait for process to die+ await new Promise<void>((resolve) => {+ process.on("exit", () => resolve());+ });++ expect(process.killed).toBe(true);+ });+});diff --git a/lsp/index.ts b/lsp/index.tsindex 072d16e619..f913d3018a 100644--- a/lsp/index.ts+++ b/lsp/index.ts@@ -5,6 +5,42 @@ import { WebSocketServer } from "ws";import type * as rpc from "@sourcegraph/vscode-ws-jsonrpc";import * as rpcServer from "@sourcegraph/vscode-ws-jsonrpc/lib/server";import path from "node:path";+import fs from "node:fs/promises";++const LOG_FILE = path.join(+ process.env.XDG_CACHE_HOME || path.join(process.env.HOME || "", ".cache"),+ "marimo",+ "logs",+ "github-copilot-lsp.log",+);++let logFileCreated = false;++const appendToFileLog = async (...args: any[]) => {+ const log = args.join(" ");+ if (!logFileCreated) {+ await fs.mkdir(path.dirname(LOG_FILE), { recursive: true });+ // Clear file on startup+ await fs.writeFile(LOG_FILE, "");+ logFileCreated = true;+ }+ await fs.appendFile(LOG_FILE, `${log}\n`);+};++const Logger = {+ debug: (...args: any[]) => {+ console.log(...args);+ void appendToFileLog("[DEBUG]", ...args);+ },+ log: (...args: any[]) => {+ console.log(...args);+ void appendToFileLog("[INFO]", ...args);+ },+ error: (...args: any[]) => {+ console.error(...args);+ void appendToFileLog("[ERROR]", ...args);+ },+};// Adapted from https://github.com/wylieconlon/jsonrpc-ws-proxy@@ -18,66 +54,118 @@ if (argv.help) {const serverPort: number = Number.parseInt(argv.port) || 3000;const languageServers: Record<string, string[]> = {- copilot: [- "node",- path.join(__dirname, "copilot", "dist", "language-server.js"),- ],+ copilot: ["node", path.join(__dirname, "language-server.js"), "--stdio"],};-const wss = new WebSocketServer(- {- port: serverPort,- perMessageDeflate: false,- },- () => {- console.log(`Listening to http and ws requests on ${serverPort}`);- },-);-function toSocket(webSocket: ws): rpc.IWebSocket {return {- send: (content) => webSocket.send(content),- onMessage: (cb) => (webSocket.onmessage = (event) => cb(event.data)),- onError: (cb) =>- (webSocket.onerror = (event) => {+ send: (content) => {+ try {+ webSocket.send(content);+ } catch (error) {+ Logger.error("Failed to send message:", error);+ }+ },+ onMessage: (cb) => {+ webSocket.onmessage = (event) => {+ try {+ Logger.debug("Received message:", event.data);+ cb(event.data);+ } catch (error) {+ Logger.error("Error processing message:", error);+ }+ };+ },+ onError: (cb) => {+ webSocket.onerror = (event) => {+ Logger.error("WebSocket error:", event);if ("message" in event) {cb(event.message);}- }),- onClose: (cb) =>- (webSocket.onclose = (event) => cb(event.code, event.reason)),- dispose: () => webSocket.close(),+ };+ },+ onClose: (cb) => {+ webSocket.onclose = (event) => {+ Logger.log(+ `WebSocket closed with code ${event.code}, reason: ${event.reason}`,+ );+ cb(event.code, event.reason);+ };+ },+ dispose: () => {+ try {+ webSocket.close();+ } catch (error) {+ Logger.error("Error closing WebSocket:", error);+ }+ },};}-wss.on("connection", (client: ws, request: http.IncomingMessage) => {- let langServer: string[] | undefined;+// Add error handling for WebSocket server creation+try {+ const wss = new WebSocketServer(+ {+ port: serverPort,+ perMessageDeflate: false,+ },+ () => {+ Logger.log(`WebSocket server listening on port ${serverPort}`);+ },+ );- Object.keys(languageServers).forEach((key) => {- if (request.url === `/${key}`) {- langServer = languageServers[key];- }+ wss.on("error", (error) => {+ Logger.error("WebSocket server error:", error);});- if (!langServer || !langServer.length) {- console.error("Invalid language server", request.url);- client.close();- return;- }+ wss.on("connection", (client: ws, request: http.IncomingMessage) => {+ Logger.log(`New connection from ${request.socket.remoteAddress}`);- const localConnection = rpcServer.createServerProcess(- "local",- langServer[0],- langServer.slice(1),- );- const socket = toSocket(client);- const connection = rpcServer.createWebSocketConnection(socket);+ let langServer: string[] | undefined;++ Object.keys(languageServers).forEach((key) => {+ if (request.url === `/${key}`) {+ langServer = languageServers[key];+ Logger.log(`Matched language server: ${key}`);+ }+ });++ if (!langServer || !langServer.length) {+ Logger.error(`Invalid language server requested: ${request.url}`);+ client.close();+ return;+ }++ try {+ const localConnection = rpcServer.createServerProcess(+ "local",+ langServer[0],+ langServer.slice(1),+ );+ Logger.log(`Created language server process: ${langServer.join(" ")}`);- rpcServer.forward(connection, localConnection);- console.log("Forwarding new client");+ const socket = toSocket(client);+ const connection = rpcServer.createWebSocketConnection(socket);- socket.onClose((code, reason) => {- console.log("Client closed", reason);- localConnection.dispose();+ rpcServer.forward(connection, localConnection);+ Logger.log("Forwarding new client connection");++ socket.onClose((code, reason) => {+ Logger.log(+ `Client connection closed - Code: ${code}, Reason: ${reason}`,+ );+ try {+ localConnection.dispose();+ } catch (error) {+ Logger.error("Error disposing local connection:", error);+ }+ });+ } catch (error) {+ Logger.error("Failed to establish language server connection:", error);+ client.close();+ }});-});+} catch (error) {+ Logger.error("[FATAL] Failed to start WebSocket server:", error);+ process.exit(1);+}diff --git a/lsp/package.json b/lsp/package.jsonindex 8475090847..804048403f 100644--- a/lsp/package.json+++ b/lsp/package.json@@ -2,22 +2,25 @@"main": "dist/index.cjs","scripts": {"build:ts": "tsup index.ts --format cjs --minify",- "build:deps": "cp -LR node_modules/copilot-node-server/copilot dist/",+ "build:deps": "cp -LR node_modules/@github/copilot-language-server/dist/ dist/","typecheck": "tsc --noEmit",- "build": "pnpm run build:ts && pnpm run build:deps"+ "build": "pnpm run build:ts && pnpm run build:deps",+ "test": "vitest"},"dependencies": {- "copilot-node-server": "1.41.0"+ "@github/copilot-language-server": "^1.322.0"},"devDependencies": {"@sourcegraph/vscode-ws-jsonrpc": "0.0.3-fork","@types/minimist": "^1.2.5","@types/node": "^20.17.32","@types/ws": "^8.18.1",+ "@vitest/expect": "^1.4.0","jsonrpc-ws-proxy": "^0.0.5","minimist": "^1.2.8","tsup": "^8.4.0","typescript": "^5.8.3",+ "vitest": "^1.4.0","ws": "^8.18.1"},"packageManager": "[email protected]"diff --git a/lsp/pnpm-lock.yaml b/lsp/pnpm-lock.yamlindex 2a20eedf01..15e2e39948 100644--- a/lsp/pnpm-lock.yaml+++ b/lsp/pnpm-lock.yaml@@ -8,9 +8,9 @@ importers:.:dependencies:- copilot-node-server:- specifier: 1.41.0- version: 1.41.0+ '@github/copilot-language-server':+ specifier: ^1.322.0+ version: 1.322.0devDependencies:'@sourcegraph/vscode-ws-jsonrpc':specifier: 0.0.3-fork@@ -24,6 +24,9 @@ importers:'@types/ws':specifier: ^8.18.1version: 8.18.1+ '@vitest/expect':+ specifier: ^1.4.0+ version: 1.6.1jsonrpc-ws-proxy:specifier: ^0.0.5version: 0.0.5@@ -32,112 +35,217 @@ importers:version: 1.2.8tsup:specifier: ^8.4.0- version: 8.4.0([email protected])+ version: 8.4.0([email protected])([email protected])typescript:specifier: ^5.8.3version: 5.8.3+ vitest:+ specifier: ^1.4.0+ version: 1.6.1(@types/[email protected])ws:specifier: ^8.18.1version: 8.18.1packages:+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==}+ engines: {node: '>=12'}+ cpu: [ppc64]+ os: [aix]+'@esbuild/[email protected]':resolution: {integrity: sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==}engines: {node: '>=18'}cpu: [ppc64]os: [aix]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==}engines: {node: '>=18'}cpu: [arm64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==}+ engines: {node: '>=12'}+ cpu: [arm]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==}engines: {node: '>=18'}cpu: [arm]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [android]+'@esbuild/[email protected]':resolution: {integrity: sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==}engines: {node: '>=18'}cpu: [x64]os: [android]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==}engines: {node: '>=18'}cpu: [arm64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [darwin]+'@esbuild/[email protected]':resolution: {integrity: sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==}engines: {node: '>=18'}cpu: [x64]os: [darwin]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==}engines: {node: '>=18'}cpu: [arm64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [freebsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==}engines: {node: '>=18'}cpu: [x64]os: [freebsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==}engines: {node: '>=18'}cpu: [arm64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==}+ engines: {node: '>=12'}+ cpu: [arm]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==}engines: {node: '>=18'}cpu: [arm]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==}+ engines: {node: '>=12'}+ cpu: [ia32]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==}engines: {node: '>=18'}cpu: [ia32]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==}+ engines: {node: '>=12'}+ cpu: [loong64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==}engines: {node: '>=18'}cpu: [loong64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==}+ engines: {node: '>=12'}+ cpu: [mips64el]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==}engines: {node: '>=18'}cpu: [mips64el]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==}+ engines: {node: '>=12'}+ cpu: [ppc64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==}engines: {node: '>=18'}cpu: [ppc64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==}+ engines: {node: '>=12'}+ cpu: [riscv64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==}engines: {node: '>=18'}cpu: [riscv64]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==}+ engines: {node: '>=12'}+ cpu: [s390x]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==}engines: {node: '>=18'}cpu: [s390x]os: [linux]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [linux]+'@esbuild/[email protected]':resolution: {integrity: sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==}engines: {node: '>=18'}@@ -150,6 +258,12 @@ packages:cpu: [arm64]os: [netbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [netbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==}engines: {node: '>=18'}@@ -162,40 +276,78 @@ packages:cpu: [arm64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [openbsd]+'@esbuild/[email protected]':resolution: {integrity: sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==}engines: {node: '>=18'}cpu: [x64]os: [openbsd]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [sunos]+'@esbuild/[email protected]':resolution: {integrity: sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==}engines: {node: '>=18'}cpu: [x64]os: [sunos]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==}+ engines: {node: '>=12'}+ cpu: [arm64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==}engines: {node: '>=18'}cpu: [arm64]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==}+ engines: {node: '>=12'}+ cpu: [ia32]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==}engines: {node: '>=18'}cpu: [ia32]os: [win32]+ '@esbuild/[email protected]':+ resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==}+ engines: {node: '>=12'}+ cpu: [x64]+ os: [win32]+'@esbuild/[email protected]':resolution: {integrity: sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==}engines: {node: '>=18'}cpu: [x64]os: [win32]+ '@github/[email protected]':+ resolution: {integrity: sha512-KV26tFuWAKqB1eECUoZ/ohit9ekYxEqBA2NuMfIfKnIyINrdVgB39V9j595aAXD8CQAzxq9iW55n0urfDxdeSQ==}+ hasBin: true+'@isaacs/[email protected]':resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}engines: {node: '>=12'}+ '@jest/[email protected]':+ resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+'@jridgewell/[email protected]':resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}engines: {node: '>=6.0.0'}@@ -211,6 +363,9 @@ packages:'@jridgewell/[email protected]':resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}+ '@jridgewell/[email protected]':+ resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}+'@jridgewell/[email protected]':resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==}@@ -313,6 +468,9 @@ packages:cpu: [x64]os: [win32]+ '@sinclair/[email protected]':+ resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}+'@sourcegraph/[email protected]':resolution: {integrity: sha512-EJLq/ni66glk3xYyOZtUIEbjTCw8kMI6RvO0YQtPd+4um2+aTSM1LfN4NrsiVrRkG7EG/U2OkFlKqT8mGo6w4Q==}@@ -328,6 +486,30 @@ packages:'@types/[email protected]':resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==}+ '@vitest/[email protected]':+ resolution: {integrity: sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw==}++ '@vitest/[email protected]':+ resolution: {integrity: sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g==}++ resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}+ engines: {node: '>=0.4.0'}++ resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==}+ engines: {node: '>=0.4.0'}+ hasBin: true+resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}engines: {node: '>=8'}@@ -340,6 +522,10 @@ packages:resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}engines: {node: '>=8'}+ resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}+ engines: {node: '>=10'}+resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}engines: {node: '>=12'}@@ -350,6 +536,9 @@ packages:resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}+ resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}+resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==}@@ -369,6 +558,13 @@ packages:resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}engines: {node: '>=8'}+ resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==}+ engines: {node: '>=4'}++ resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}+resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}engines: {node: '>= 14.16.0'}@@ -384,14 +580,13 @@ packages:resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}engines: {node: '>= 6'}+ resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==}+resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==}engines: {node: ^14.18.0 || >=16.10.0}- resolution: {integrity: sha512-r2+uaWa05wvxNALv8rLegRCOlcopUDLYOd8kAHTAM8xpqBNK5TcMqFbGufxKF7YIWpBwcyfNaAIb724Un5e1eA==}- hasBin: true-resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}engines: {node: '>= 8'}@@ -405,6 +600,14 @@ packages:supports-color:optional: true+ resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==}+ engines: {node: '>=6'}++ resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}@@ -414,6 +617,11 @@ packages:resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}+ resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}+ engines: {node: '>=12'}+ hasBin: true+resolution: {integrity: sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==}engines: {node: '>=18'}@@ -424,6 +632,13 @@ packages:engines: {node: '>=4'}hasBin: true+ resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}++ resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}+ engines: {node: '>=16.17'}+resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}peerDependencies:@@ -441,14 +656,29 @@ packages:engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}os: [darwin]+ resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==}++ resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}+ engines: {node: '>=16'}+resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}hasBin: true+ resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}+ engines: {node: '>=16.17.0'}+resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}engines: {node: '>=8'}+ resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}@@ -459,6 +689,9 @@ packages:resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==}engines: {node: '>=10'}+ resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==}+resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}hasBin: true@@ -478,12 +711,29 @@ packages:resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==}engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+ resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==}+ engines: {node: '>=14'}+resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}+ resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}+resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}+ resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}++ resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}++ resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}engines: {node: '>=16 || 14 >=14.17'}@@ -495,16 +745,36 @@ packages:resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}engines: {node: '>=16 || 14 >=14.17'}+ resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}+resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}+ resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}+ hasBin: true++ resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}+resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}engines: {node: '>=0.10.0'}+ resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}+ engines: {node: '>=18'}+resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==}@@ -512,10 +782,23 @@ packages:resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}engines: {node: '>=8'}+ resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==}+ engines: {node: '>=12'}+resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}engines: {node: '>=16 || 14 >=14.18'}+ resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}++ resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}++ resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}+resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}@@ -527,6 +810,9 @@ packages:resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}engines: {node: '>= 6'}+ resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}+resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==}engines: {node: '>= 18'}@@ -545,10 +831,21 @@ packages:yaml:optional: true+ resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==}+ engines: {node: ^10 || ^12 || >=14}++ resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}+resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}engines: {node: '>=6'}+ resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==}+resolution: {integrity: sha512-h80JrZu/MHUZCyHu5ciuoI0+WxsCxzxJTILn6Fs8rxSnFPh+UVHYfeIxK1nVGugMqkfC4vJcBOYbkfkwYK0+gw==}engines: {node: '>= 14.18.0'}@@ -570,10 +867,17 @@ packages:resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}engines: {node: '>=8'}+ resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}+resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}engines: {node: '>=14'}+ resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}+ engines: {node: '>=0.10.0'}+resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==}engines: {node: '>= 8'}@@ -581,6 +885,12 @@ packages:resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==}+ resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}++ resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==}+resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}engines: {node: '>=8'}@@ -597,6 +907,13 @@ packages:resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}engines: {node: '>=12'}+ resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}+ engines: {node: '>=12'}++ resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==}+resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}engines: {node: '>=16 || 14 >=14.17'}@@ -609,6 +926,9 @@ packages:resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}+ resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}+resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==}@@ -616,6 +936,14 @@ packages:resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==}engines: {node: '>=12.0.0'}+ resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==}+ engines: {node: '>=14.0.0'}++ resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==}+ engines: {node: '>=14.0.0'}+resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==}@@ -645,18 +973,96 @@ packages:typescript:optional: true+ resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==}+ engines: {node: '>=4'}+resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}engines: {node: '>=14.17'}hasBin: true+ resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}+resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}+ resolution: {integrity: sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true++ resolution: {integrity: sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true+ peerDependencies:+ '@types/node': ^18.0.0 || >=20.0.0+ less: '*'+ lightningcss: ^1.21.0+ sass: '*'+ sass-embedded: '*'+ stylus: '*'+ sugarss: '*'+ terser: ^5.4.0+ peerDependenciesMeta:+ '@types/node':+ optional: true+ less:+ optional: true+ lightningcss:+ optional: true+ sass:+ optional: true+ sass-embedded:+ optional: true+ stylus:+ optional: true+ sugarss:+ optional: true+ terser:+ optional: true++ resolution: {integrity: sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==}+ engines: {node: ^18.0.0 || >=20.0.0}+ hasBin: true+ peerDependencies:+ '@edge-runtime/vm': '*'+ '@types/node': ^18.0.0 || >=20.0.0+ '@vitest/browser': 1.6.1+ '@vitest/ui': 1.6.1+ happy-dom: '*'+ jsdom: '*'+ peerDependenciesMeta:+ '@edge-runtime/vm':+ optional: true+ '@types/node':+ optional: true+ '@vitest/browser':+ optional: true+ '@vitest/ui':+ optional: true+ happy-dom:+ optional: true+ jsdom:+ optional: true+resolution: {integrity: sha512-perEnXQdQOJMTDFNv+UF3h1Y0z4iSiaN9jIlb0OqIYgosPCZGYh/MCUlkFtV2668PL69lRDO32hmvL2yiidUYg==}engines: {node: '>=8.0.0 || >=10.0.0'}+ resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==}+ engines: {node: '>=14.0.0'}++ resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==}++ resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==}+resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}@@ -668,6 +1074,11 @@ packages:engines: {node: '>= 8'}hasBin: true+ resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}+ engines: {node: '>=8'}+ hasBin: true+resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}engines: {node: '>=10'}@@ -699,83 +1110,160 @@ packages:utf-8-validate:optional: true+ resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==}+ engines: {node: '>=12.20'}+snapshots:+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@esbuild/[email protected]':+ optional: true+'@esbuild/[email protected]':optional: true+ '@github/[email protected]':+ dependencies:+ vscode-languageserver-protocol: 3.17.5+'@isaacs/[email protected]':dependencies:string-width: 5.1.2@@ -785,6 +1273,10 @@ snapshots:wrap-ansi: 8.1.0wrap-ansi-cjs: [email protected]+ '@jest/[email protected]':+ dependencies:+ '@sinclair/typebox': 0.27.8+'@jridgewell/[email protected]':dependencies:'@jridgewell/set-array': 1.1.2@@ -797,6 +1289,8 @@ snapshots:'@jridgewell/[email protected]': {}+ '@jridgewell/[email protected]': {}+'@jridgewell/[email protected]':dependencies:'@jridgewell/resolve-uri': 3.1.1@@ -862,6 +1356,8 @@ snapshots:'@rollup/[email protected]':optional: true+ '@sinclair/[email protected]': {}+'@sourcegraph/[email protected]':dependencies:vscode-jsonrpc: 4.0.0@@ -878,6 +1374,41 @@ snapshots:dependencies:'@types/node': 20.17.32+ '@vitest/[email protected]':+ dependencies:+ '@vitest/spy': 1.6.1+ '@vitest/utils': 1.6.1+ chai: 4.5.0++ '@vitest/[email protected]':+ dependencies:+ '@vitest/utils': 1.6.1+ p-limit: 5.0.0+ pathe: 1.1.2++ '@vitest/[email protected]':+ dependencies:+ magic-string: 0.30.17+ pathe: 1.1.2+ pretty-format: 29.7.0++ '@vitest/[email protected]':+ dependencies:+ tinyspy: 2.2.1++ '@vitest/[email protected]':+ dependencies:+ diff-sequences: 29.6.3+ estree-walker: 3.0.3+ loupe: 2.3.7+ pretty-format: 29.7.0++ dependencies:+ acorn: 8.14.1++ [email protected]: {}+@@ -886,6 +1417,8 @@ snapshots:dependencies:color-convert: 2.0.1+ [email protected]: {}+@@ -894,6 +1427,8 @@ snapshots:dependencies:sprintf-js: 1.0.3+ [email protected]: {}+@@ -909,6 +1444,20 @@ snapshots:+ dependencies:+ assertion-error: 1.1.0+ check-error: 1.0.3+ deep-eql: 4.1.4+ get-func-name: 2.0.2+ loupe: 2.3.7+ pathval: 1.1.1+ type-detect: 4.1.0++ dependencies:+ get-func-name: 2.0.2+dependencies:readdirp: 4.1.1@@ -921,9 +1470,9 @@ snapshots:- [email protected]: {}+ [email protected]: {}- [email protected]: {}+ [email protected]: {}dependencies:@@ -935,12 +1484,44 @@ snapshots:dependencies:ms: 2.1.3+ dependencies:+ type-detect: 4.1.0++ [email protected]: {}++ optionalDependencies:+ '@esbuild/aix-ppc64': 0.21.5+ '@esbuild/android-arm': 0.21.5+ '@esbuild/android-arm64': 0.21.5+ '@esbuild/android-x64': 0.21.5+ '@esbuild/darwin-arm64': 0.21.5+ '@esbuild/darwin-x64': 0.21.5+ '@esbuild/freebsd-arm64': 0.21.5+ '@esbuild/freebsd-x64': 0.21.5+ '@esbuild/linux-arm': 0.21.5+ '@esbuild/linux-arm64': 0.21.5+ '@esbuild/linux-ia32': 0.21.5+ '@esbuild/linux-loong64': 0.21.5+ '@esbuild/linux-mips64el': 0.21.5+ '@esbuild/linux-ppc64': 0.21.5+ '@esbuild/linux-riscv64': 0.21.5+ '@esbuild/linux-s390x': 0.21.5+ '@esbuild/linux-x64': 0.21.5+ '@esbuild/netbsd-x64': 0.21.5+ '@esbuild/openbsd-x64': 0.21.5+ '@esbuild/sunos-x64': 0.21.5+ '@esbuild/win32-arm64': 0.21.5+ '@esbuild/win32-ia32': 0.21.5+ '@esbuild/win32-x64': 0.21.5+optionalDependencies:'@esbuild/aix-ppc64': 0.25.0@@ -971,6 +1552,22 @@ snapshots:+ dependencies:+ '@types/estree': 1.0.6++ dependencies:+ cross-spawn: 7.0.3+ get-stream: 8.0.1+ human-signals: 5.0.0+ is-stream: 3.0.0+ merge-stream: 2.0.0+ npm-run-path: 5.3.0+ onetime: 6.0.0+ signal-exit: 4.1.0+ strip-final-newline: 3.0.0+optionalDependencies:picomatch: 4.0.2@@ -983,6 +1580,10 @@ snapshots:optional: true+ [email protected]: {}++ [email protected]: {}+dependencies:foreground-child: 3.3.0@@ -992,8 +1593,12 @@ snapshots:package-json-from-dist: 1.0.0path-scurry: 1.11.1+ [email protected]: {}++ [email protected]: {}+@@ -1004,6 +1609,8 @@ snapshots:+ [email protected]: {}+dependencies:argparse: 1.0.10@@ -1025,10 +1632,27 @@ snapshots:+ dependencies:+ mlly: 1.7.4+ pkg-types: 1.3.1++ dependencies:+ get-func-name: 2.0.2++ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.0++ [email protected]: {}++ [email protected]: {}+dependencies:brace-expansion: 2.0.1@@ -1037,6 +1661,13 @@ snapshots:+ dependencies:+ acorn: 8.14.1+ pathe: 2.0.3+ pkg-types: 1.3.1+ ufo: 1.6.1+@@ -1045,29 +1676,73 @@ snapshots:object-assign: 4.1.1thenify-all: 1.6.0+ [email protected]: {}++ dependencies:+ path-key: 4.0.0++ dependencies:+ mimic-fn: 4.0.0++ dependencies:+ yocto-queue: 1.2.1++ [email protected]: {}+dependencies:lru-cache: 10.4.3minipass: 7.1.2+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ dependencies:+ confbox: 0.1.8+ mlly: 1.7.4+ pathe: 2.0.3+dependencies:lilconfig: 3.1.2+ optionalDependencies:+ postcss: 8.5.3++ dependencies:+ nanoid: 3.3.11+ picocolors: 1.1.1+ source-map-js: 1.2.1++ dependencies:+ '@jest/schemas': 29.6.3+ ansi-styles: 5.2.0+ react-is: 18.3.1+ [email protected]: {}+@@ -1103,14 +1778,22 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:whatwg-url: 7.1.0+ [email protected]: {}++ [email protected]: {}+dependencies:emoji-regex: 8.0.0@@ -1131,6 +1814,12 @@ snapshots:dependencies:ansi-regex: 6.0.1+ [email protected]: {}++ dependencies:+ js-tokens: 9.0.1+dependencies:'@jridgewell/gen-mapping': 0.3.3@@ -1149,6 +1838,8 @@ snapshots:dependencies:any-promise: 1.3.0+ [email protected]: {}+@@ -1156,6 +1847,10 @@ snapshots:fdir: 6.4.3([email protected])picomatch: 4.0.2+ [email protected]: {}++ [email protected]: {}+dependencies:punycode: 2.3.0@@ -1164,7 +1859,7 @@ snapshots:dependencies:bundle-require: 5.1.0([email protected])cac: 6.7.14@@ -1174,7 +1869,7 @@ snapshots:esbuild: 0.25.0joycon: 3.1.1picocolors: 1.1.1- postcss-load-config: 6.0.1+ postcss-load-config: 6.0.1([email protected])resolve-from: 5.0.0rollup: 4.34.8source-map: 0.8.0-beta.0@@ -1183,6 +1878,7 @@ snapshots:tinyglobby: 0.2.12tree-kill: 1.2.2optionalDependencies:+ postcss: 8.5.3typescript: 5.8.3transitivePeerDependencies:- jiti@@ -1190,12 +1886,86 @@ snapshots:- tsx- yaml+ [email protected]: {}++ [email protected]: {}++ [email protected](@types/[email protected]):+ dependencies:+ cac: 6.7.14+ debug: 4.4.0+ pathe: 1.1.2+ picocolors: 1.1.1+ vite: 5.4.19(@types/[email protected])+ transitivePeerDependencies:+ - '@types/node'+ - less+ - lightningcss+ - sass+ - sass-embedded+ - stylus+ - sugarss+ - supports-color+ - terser++ [email protected](@types/[email protected]):+ dependencies:+ esbuild: 0.21.5+ postcss: 8.5.3+ rollup: 4.34.8+ optionalDependencies:+ '@types/node': 20.17.32+ fsevents: 2.3.3++ [email protected](@types/[email protected]):+ dependencies:+ '@vitest/expect': 1.6.1+ '@vitest/runner': 1.6.1+ '@vitest/snapshot': 1.6.1+ '@vitest/spy': 1.6.1+ '@vitest/utils': 1.6.1+ acorn-walk: 8.3.4+ chai: 4.5.0+ debug: 4.4.0+ execa: 8.0.1+ local-pkg: 0.5.1+ magic-string: 0.30.17+ pathe: 1.1.2+ picocolors: 1.1.1+ std-env: 3.9.0+ strip-literal: 2.1.1+ tinybench: 2.9.0+ tinypool: 0.8.4+ vite: 5.4.19(@types/[email protected])+ vite-node: 1.6.1(@types/[email protected])+ why-is-node-running: 2.3.0+ optionalDependencies:+ '@types/node': 20.17.32+ transitivePeerDependencies:+ - less+ - lightningcss+ - sass+ - sass-embedded+ - stylus+ - sugarss+ - supports-color+ - terser++ [email protected]: {}++ dependencies:+ vscode-jsonrpc: 8.2.0+ vscode-languageserver-types: 3.17.5++ [email protected]: {}+@@ -1208,6 +1978,11 @@ snapshots:dependencies:isexe: 2.0.0+ dependencies:+ siginfo: 2.0.0+ stackback: 0.0.2+dependencies:ansi-styles: 4.3.0@@ -1225,3 +2000,5 @@ snapshots:async-limiter: 1.0.1++ [email protected]: {}diff --git a/marimo/_loggers.py b/marimo/_loggers.pyindex 4204dba0df..240a071bba 100644--- a/marimo/_loggers.py+++ b/marimo/_loggers.py@@ -2,6 +2,7 @@from __future__ import annotationsimport logging+from pathlib import Pathfrom typing import Optionalfrom marimo._utils.log_formatter import LogFormatter@@ -72,3 +73,20 @@ def get_logger(name: str, level: Optional[int] = None) -> logging.Logger:def marimo_logger() -> logging.Logger:return get_logger("marimo")+++def get_log_directory() -> Path:+ import os++ xdg_cache_home = os.getenv("XDG_CACHE_HOME", None)+ if xdg_cache_home is None:+ return Path.home() / ".cache" / "marimo" / "logs"+ return Path(xdg_cache_home) / "marimo" / "logs"+++def make_log_directory() -> None:+ try:+ log_dir = get_log_directory()+ log_dir.mkdir(parents=True, exist_ok=True)+ except Exception as e:+ marimo_logger().debug(f"Failed to create log directory: {e}")diff --git a/marimo/_server/lsp.py b/marimo/_server/lsp.pyindex c241e75983..f828bc1146 100644--- a/marimo/_server/lsp.py+++ b/marimo/_server/lsp.py@@ -194,6 +194,9 @@ class PyLspServer(BaseLspServer):def get_command(self) -> list[str]:import sys+ _loggers.make_log_directory()+ log_file = _loggers.get_log_directory() / "pylsp.log"+return [sys.executable,"-m",@@ -203,6 +206,8 @@ class PyLspServer(BaseLspServer):"--port",str(self.port),"--check-parent-process",+ "--log-file",+ str(log_file),]def missing_binary_alert(self) -> Alert:diff --git a/tests/_server/test_lsp.py b/tests/_server/test_lsp.pyindex eb00a8fe65..71077de6f8 100644--- a/tests/_server/test_lsp.py+++ b/tests/_server/test_lsp.py@@ -16,6 +16,7 @@ from marimo._config.manager import (MarimoConfigReader,MarimoConfigReaderWithOverrides,)+from marimo._loggers import get_log_directoryfrom marimo._messaging.ops import Alertfrom marimo._server.lsp import (BaseLspServer,@@ -112,6 +113,8 @@ def test_pylsp_server():"--port","8000","--check-parent-process",+ "--log-file",+ str(get_log_directory() / "pylsp.log"),]alert = server.missing_binary_alert()assert "Python LSP" in alert.title