From 5c506814cf7bd3b5671988b8a83793bc3e037ae1 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Wed, 26 Aug 2026 03:20:41 -0700 Subject: [PATCH] Announce diagnostics endpoint and agent skills in dev-server startup output When diagnostics is enabled, append two lines to Vite's startup block: the /__solid/diagnostics endpoint with its method vocabulary, and the paths of the agent skill documents shipped in node_modules. Startup output is the one channel agents reliably read even in projects with no AGENTS.md, so this is the discovery path for existing apps and ports. Dev-serve only. Co-authored-by: Cursor --- .changeset/diagnostics-startup-banner.md | 5 +++++ src/diagnostics/index.ts | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .changeset/diagnostics-startup-banner.md diff --git a/.changeset/diagnostics-startup-banner.md b/.changeset/diagnostics-startup-banner.md new file mode 100644 index 0000000..0c908c6 --- /dev/null +++ b/.changeset/diagnostics-startup-banner.md @@ -0,0 +1,5 @@ +--- +'@solidjs/vite-plugin': patch +--- + +Announce the diagnostics surface in the dev-server startup block when `diagnostics: true` is set: two extra lines after Vite's URLs naming the `/__solid/diagnostics` endpoint (with its method vocabulary) and the agent skill documents shipped in node_modules. Startup output is the one channel agents reliably read even in projects with no AGENTS.md, making this the discovery path for existing apps and ports. Dev-serve only. diff --git a/src/diagnostics/index.ts b/src/diagnostics/index.ts index 96400d7..67d4d9d 100644 --- a/src/diagnostics/index.ts +++ b/src/diagnostics/index.ts @@ -159,6 +159,24 @@ export function solidDiagnostics(): Plugin { }, configureServer(server) { + // Announce the surface in the startup block. This is a discovery + // channel: agents watching dev-server output learn the endpoint and + // the skill documents without any project-level pointer (AGENTS.md). + const originalPrintUrls = server.printUrls.bind(server); + server.printUrls = () => { + originalPrintUrls(); + const local = server.resolvedUrls?.local[0]; + const endpoint = local + ? new URL(DIAGNOSTICS_ENDPOINT, local).href + : DIAGNOSTICS_ENDPOINT; + server.config.logger.info( + ` ➜ Solid diagnostics: ${endpoint} ` + + `(GET status; POST {"method":"begin"|"end"|"whyDidRun"|"costs"})\n` + + ` ➜ Agent skills: node_modules/${DIAGNOSTICS_PACKAGE}/skills/agent-loops/SKILL.md, ` + + `node_modules/solid-js/skills/reactivity-diagnostics/SKILL.md`, + ); + }; + interface Pending { resolve: (response: DiagnosticsResponse) => void; timer: ReturnType;