diff --git a/.claude/skills/wizard-development/SKILL.md b/.claude/skills/wizard-development/SKILL.md index 5fbadeb52..2e2469947 100644 --- a/.claude/skills/wizard-development/SKILL.md +++ b/.claude/skills/wizard-development/SKILL.md @@ -20,7 +20,7 @@ infrastructure should consume those boundaries. | Concern | Owner | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Framework detection, context, env conventions | [FrameworkConfig](../../../src/programs/program-contract/framework-config.ts) and [framework configs](../../../src/services/frameworks/) | -| Integration instructions (skills) | [context-mill](https://github.com/PostHog/context-mill). With `wizard-agent-dag-skills` on, a task reads the skill that replaces the one its prompt names; see the [orchestrator sequence](../../../src/agent/runner/sequence/README.md#orchestrator) | +| Integration instructions (skills) | [context-mill](https://github.com/PostHog/context-mill). A step skill written once for every framework is completed from the framework's pack; see the [orchestrator sequence](../../../src/agent/runner/sequence/README.md#orchestrator) | | Orchestrator task graphs and task prompts | Each program's `agent/` folder; see [agent prompts](../../../src/programs/README.md#agent-prompts) | | Programs: detection, runs, prerequisites and outcomes | One folder per program in [programs](../../../src/programs/), entered through its `index.ts` | | Tools: commands that run no agent | [tools](../../../src/tools/), entered through `@tools`, with their screens in [TUI tools](../../../src/tui/tools/) | diff --git a/docs/local-dev.md b/docs/local-dev.md index 03aa0427d..742af2ff2 100644 --- a/docs/local-dev.md +++ b/docs/local-dev.md @@ -166,8 +166,8 @@ headless runs. | `--context-mill-version ` | `POSTHOG_WIZARD_CONTEXT_MILL_VERSION` | skills → that release | ```bash -npx @posthog/wizard --context-mill-version 1.59.0 -POSTHOG_WIZARD_CONTEXT_MILL_VERSION=v1.59.0 npx @posthog/wizard +npx @posthog/wizard --context-mill-version 1.66.0 +POSTHOG_WIZARD_CONTEXT_MILL_VERSION=v1.66.0 npx @posthog/wizard ``` The value is a release version, with or without the `v` prefix. An empty value @@ -175,14 +175,17 @@ or `latest` follows the latest release. Any other value stops the run with `PHW_CLI_BAD_ARGS`. A pinned run reads -`https://github.com/PostHog/context-mill/releases/download/v1.59.0/` and fails -over to `https://context-mill.posthog.com/v1.59.0/`. A version with no release +`https://github.com/PostHog/context-mill/releases/download/v1.66.0/` and fails +over to `https://context-mill.posthog.com/v1.66.0/`. A version with no release fails when the run first fetches a menu. The `[agent-runner] targets` line in the debug log shows the release a run used. -A pinned run reads no repackaged skill; see the +The oldest release a pin may name is 1.66.0, the first that publishes the +skills the bundled agent prompts name. An older version, or a prerelease of +1.66.0 itself, stops the run with `PHW_CLI_BAD_ARGS` and a message that names +that release. A pinned run's agent +prompts are the ones the wizard bundles, as in any run; see the [orchestrator sequence](../src/agent/runner/sequence/README.md#orchestrator). -Its agent prompts are the ones the wizard bundles, as in any run. The pin cannot be combined with `--local-context-mill` or `--local-dev`. Pass `--no-local-context-mill` to keep the other local targets. diff --git a/fixtures/context-mill/repackaged/original/SKILL.md b/fixtures/context-mill/repackaged/completed/SKILL.md similarity index 99% rename from fixtures/context-mill/repackaged/original/SKILL.md rename to fixtures/context-mill/repackaged/completed/SKILL.md index 3ce633ffe..fca8846d4 100644 --- a/fixtures/context-mill/repackaged/original/SKILL.md +++ b/fixtures/context-mill/repackaged/completed/SKILL.md @@ -3,7 +3,7 @@ name: integration-v2-init-flask description: Initialize PostHog and set its environment variables metadata: author: PostHog - version: dev + version: 1.66.0 --- # Initialize PostHog diff --git a/fixtures/context-mill/repackaged/original/references/COMMANDMENTS.md b/fixtures/context-mill/repackaged/completed/references/COMMANDMENTS.md similarity index 100% rename from fixtures/context-mill/repackaged/original/references/COMMANDMENTS.md rename to fixtures/context-mill/repackaged/completed/references/COMMANDMENTS.md diff --git a/fixtures/context-mill/repackaged/original/references/content-security-policy.md b/fixtures/context-mill/repackaged/completed/references/content-security-policy.md similarity index 100% rename from fixtures/context-mill/repackaged/original/references/content-security-policy.md rename to fixtures/context-mill/repackaged/completed/references/content-security-policy.md diff --git a/fixtures/context-mill/repackaged/original/references/flask.md b/fixtures/context-mill/repackaged/completed/references/flask.md similarity index 100% rename from fixtures/context-mill/repackaged/original/references/flask.md rename to fixtures/context-mill/repackaged/completed/references/flask.md diff --git a/fixtures/context-mill/repackaged/pair.json b/fixtures/context-mill/repackaged/pair.json index 601d071e0..f8aa4d5a2 100644 --- a/fixtures/context-mill/repackaged/pair.json +++ b/fixtures/context-mill/repackaged/pair.json @@ -1,9 +1,11 @@ { - "replaces": "integration-v2-init", "framework": "flask", "product": "integration", - "original": "integration-v2-init-flask", "step": "integration-init", "pack": "integration-flask", - "contextMill": "dev" + "contextMill": "1.66.0", + "completed": { + "skill": "integration-v2-init-flask", + "contextMill": "1.66.0" + } } diff --git a/fixtures/context-mill/repackaged/step/SKILL.md b/fixtures/context-mill/repackaged/step/SKILL.md index 22198b5dc..7599fd8ef 100644 --- a/fixtures/context-mill/repackaged/step/SKILL.md +++ b/fixtures/context-mill/repackaged/step/SKILL.md @@ -3,7 +3,7 @@ name: integration-init description: Initialize PostHog and set its environment variables metadata: author: PostHog - version: dev + version: 1.66.0 --- # Initialize PostHog diff --git a/fixtures/context-mill/skill-menu.json b/fixtures/context-mill/skill-menu.json index 8f87e235d..4250603e9 100644 --- a/fixtures/context-mill/skill-menu.json +++ b/fixtures/context-mill/skill-menu.json @@ -1,13 +1,13 @@ { "version": "1.0", - "buildVersion": "1.65.0", + "buildVersion": "1.66.0", "categories": { "ai-observability": [ { "id": "ai-observability-openai-python", "name": "PostHog AI Observability integration for OpenAI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openai-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openai-python.zip", "framework": "openai", "default": true, "title": "OpenAI (Python)", @@ -25,7 +25,7 @@ "id": "ai-observability-openai-node", "name": "PostHog AI Observability integration for OpenAI (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openai-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openai-node.zip", "framework": "openai", "title": "OpenAI (Node)", "description": "PostHog AI Observability integration for OpenAI (Node)", @@ -41,7 +41,7 @@ "id": "ai-observability-anthropic-python", "name": "PostHog AI Observability integration for Anthropic (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-anthropic-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-anthropic-python.zip", "framework": "anthropic", "default": true, "title": "Anthropic (Python)", @@ -59,7 +59,7 @@ "id": "ai-observability-anthropic-node", "name": "PostHog AI Observability integration for Anthropic (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-anthropic-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-anthropic-node.zip", "framework": "anthropic", "title": "Anthropic (Node)", "description": "PostHog AI Observability integration for Anthropic (Node)", @@ -75,7 +75,7 @@ "id": "ai-observability-langchain-python", "name": "PostHog AI Observability integration for LangChain (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-langchain-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-langchain-python.zip", "framework": "langchain", "default": true, "title": "LangChain (Python)", @@ -93,7 +93,7 @@ "id": "ai-observability-langchain-node", "name": "PostHog AI Observability integration for LangChain (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-langchain-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-langchain-node.zip", "framework": "langchain", "title": "LangChain (Node)", "description": "PostHog AI Observability integration for LangChain (Node)", @@ -109,7 +109,7 @@ "id": "ai-observability-vercel-ai", "name": "PostHog AI Observability integration for Vercel AI SDK", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-vercel-ai.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-vercel-ai.zip", "framework": "vercel-ai", "title": "Vercel AI SDK", "description": "PostHog AI Observability integration for Vercel AI SDK", @@ -125,7 +125,7 @@ "id": "ai-observability-google-python", "name": "PostHog AI Observability integration for Google Gemini (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-google-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-google-python.zip", "framework": "google-gemini", "default": true, "title": "Google Gemini (Python)", @@ -143,7 +143,7 @@ "id": "ai-observability-google-node", "name": "PostHog AI Observability integration for Google Gemini (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-google-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-google-node.zip", "framework": "google-gemini", "title": "Google Gemini (Node)", "description": "PostHog AI Observability integration for Google Gemini (Node)", @@ -159,7 +159,7 @@ "id": "ai-observability-manual-capture", "name": "PostHog AI Observability using explicit $ai_generation capture calls (no auto-instrumentation)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-manual-capture.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-manual-capture.zip", "framework": "manual-capture", "title": "Manual capture", "description": "PostHog AI Observability using explicit $ai_generation capture calls (no auto-instrumentation)", @@ -174,7 +174,7 @@ "id": "ai-observability-azure-openai-python", "name": "PostHog AI Observability integration for Azure OpenAI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-azure-openai-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-azure-openai-python.zip", "framework": "azure-openai", "default": true, "title": "Azure OpenAI (Python)", @@ -192,7 +192,7 @@ "id": "ai-observability-azure-openai-node", "name": "PostHog AI Observability integration for Azure OpenAI (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-azure-openai-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-azure-openai-node.zip", "framework": "azure-openai", "title": "Azure OpenAI (Node)", "description": "PostHog AI Observability integration for Azure OpenAI (Node)", @@ -208,7 +208,7 @@ "id": "ai-observability-aws-bedrock-python", "name": "PostHog AI Observability integration for AWS Bedrock (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-aws-bedrock-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-aws-bedrock-python.zip", "framework": "aws-bedrock", "default": true, "title": "AWS Bedrock (Python)", @@ -226,7 +226,7 @@ "id": "ai-observability-aws-bedrock-node", "name": "PostHog AI Observability integration for AWS Bedrock (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-aws-bedrock-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-aws-bedrock-node.zip", "framework": "aws-bedrock", "title": "AWS Bedrock (Node)", "description": "PostHog AI Observability integration for AWS Bedrock (Node)", @@ -242,7 +242,7 @@ "id": "ai-observability-cerebras-python", "name": "PostHog AI Observability integration for Cerebras (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cerebras-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cerebras-python.zip", "framework": "cerebras", "default": true, "title": "Cerebras (Python)", @@ -260,7 +260,7 @@ "id": "ai-observability-cerebras-node", "name": "PostHog AI Observability integration for Cerebras (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cerebras-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cerebras-node.zip", "framework": "cerebras", "title": "Cerebras (Node)", "description": "PostHog AI Observability integration for Cerebras (Node)", @@ -276,7 +276,7 @@ "id": "ai-observability-cohere-python", "name": "PostHog AI Observability integration for Cohere (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cohere-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cohere-python.zip", "framework": "cohere", "default": true, "title": "Cohere (Python)", @@ -294,7 +294,7 @@ "id": "ai-observability-cohere-node", "name": "PostHog AI Observability integration for Cohere (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cohere-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cohere-node.zip", "framework": "cohere", "title": "Cohere (Node)", "description": "PostHog AI Observability integration for Cohere (Node)", @@ -310,7 +310,7 @@ "id": "ai-observability-deepseek-python", "name": "PostHog AI Observability integration for DeepSeek (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-deepseek-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-deepseek-python.zip", "framework": "deepseek", "default": true, "title": "DeepSeek (Python)", @@ -328,7 +328,7 @@ "id": "ai-observability-deepseek-node", "name": "PostHog AI Observability integration for DeepSeek (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-deepseek-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-deepseek-node.zip", "framework": "deepseek", "title": "DeepSeek (Node)", "description": "PostHog AI Observability integration for DeepSeek (Node)", @@ -344,7 +344,7 @@ "id": "ai-observability-fireworks-ai-python", "name": "PostHog AI Observability integration for Fireworks AI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-fireworks-ai-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-fireworks-ai-python.zip", "framework": "fireworks-ai", "default": true, "title": "Fireworks AI (Python)", @@ -362,7 +362,7 @@ "id": "ai-observability-fireworks-ai-node", "name": "PostHog AI Observability integration for Fireworks AI (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-fireworks-ai-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-fireworks-ai-node.zip", "framework": "fireworks-ai", "title": "Fireworks AI (Node)", "description": "PostHog AI Observability integration for Fireworks AI (Node)", @@ -378,7 +378,7 @@ "id": "ai-observability-groq-python", "name": "PostHog AI Observability integration for Groq (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-groq-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-groq-python.zip", "framework": "groq", "default": true, "title": "Groq (Python)", @@ -396,7 +396,7 @@ "id": "ai-observability-groq-node", "name": "PostHog AI Observability integration for Groq (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-groq-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-groq-node.zip", "framework": "groq", "title": "Groq (Node)", "description": "PostHog AI Observability integration for Groq (Node)", @@ -412,7 +412,7 @@ "id": "ai-observability-hugging-face-python", "name": "PostHog AI Observability integration for Hugging Face (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-hugging-face-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-hugging-face-python.zip", "framework": "hugging-face", "default": true, "title": "Hugging Face (Python)", @@ -430,7 +430,7 @@ "id": "ai-observability-hugging-face-node", "name": "PostHog AI Observability integration for Hugging Face (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-hugging-face-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-hugging-face-node.zip", "framework": "hugging-face", "title": "Hugging Face (Node)", "description": "PostHog AI Observability integration for Hugging Face (Node)", @@ -446,7 +446,7 @@ "id": "ai-observability-mistral-python", "name": "PostHog AI Observability integration for Mistral (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-mistral-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-mistral-python.zip", "framework": "mistral", "default": true, "title": "Mistral (Python)", @@ -464,7 +464,7 @@ "id": "ai-observability-mistral-node", "name": "PostHog AI Observability integration for Mistral (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-mistral-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-mistral-node.zip", "framework": "mistral", "title": "Mistral (Node)", "description": "PostHog AI Observability integration for Mistral (Node)", @@ -480,7 +480,7 @@ "id": "ai-observability-ollama-python", "name": "PostHog AI Observability integration for Ollama (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-ollama-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-ollama-python.zip", "framework": "ollama", "default": true, "title": "Ollama (Python)", @@ -498,7 +498,7 @@ "id": "ai-observability-ollama-node", "name": "PostHog AI Observability integration for Ollama (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-ollama-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-ollama-node.zip", "framework": "ollama", "title": "Ollama (Node)", "description": "PostHog AI Observability integration for Ollama (Node)", @@ -514,7 +514,7 @@ "id": "ai-observability-perplexity-python", "name": "PostHog AI Observability integration for Perplexity (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-perplexity-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-perplexity-python.zip", "framework": "perplexity", "default": true, "title": "Perplexity (Python)", @@ -532,7 +532,7 @@ "id": "ai-observability-perplexity-node", "name": "PostHog AI Observability integration for Perplexity (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-perplexity-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-perplexity-node.zip", "framework": "perplexity", "title": "Perplexity (Node)", "description": "PostHog AI Observability integration for Perplexity (Node)", @@ -548,7 +548,7 @@ "id": "ai-observability-together-ai-python", "name": "PostHog AI Observability integration for Together AI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-together-ai-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-together-ai-python.zip", "framework": "together-ai", "default": true, "title": "Together AI (Python)", @@ -566,7 +566,7 @@ "id": "ai-observability-together-ai-node", "name": "PostHog AI Observability integration for Together AI (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-together-ai-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-together-ai-node.zip", "framework": "together-ai", "title": "Together AI (Node)", "description": "PostHog AI Observability integration for Together AI (Node)", @@ -582,7 +582,7 @@ "id": "ai-observability-xai-python", "name": "PostHog AI Observability integration for xAI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-xai-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-xai-python.zip", "framework": "xai", "default": true, "title": "xAI (Python)", @@ -600,7 +600,7 @@ "id": "ai-observability-xai-node", "name": "PostHog AI Observability integration for xAI (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-xai-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-xai-node.zip", "framework": "xai", "title": "xAI (Node)", "description": "PostHog AI Observability integration for xAI (Node)", @@ -616,7 +616,7 @@ "id": "ai-observability-autogen", "name": "PostHog AI Observability for AutoGen (multi-agent framework, Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-autogen.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-autogen.zip", "framework": "autogen", "title": "AutoGen", "description": "PostHog AI Observability for AutoGen (multi-agent framework, Python)", @@ -632,7 +632,7 @@ "id": "ai-observability-claude-agent-sdk", "name": "PostHog AI Observability for Anthropic's Claude Agent SDK (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-claude-agent-sdk.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-claude-agent-sdk.zip", "framework": "claude-agent-sdk", "title": "Claude Agent SDK", "description": "PostHog AI Observability for Anthropic's Claude Agent SDK (Python)", @@ -648,7 +648,7 @@ "id": "ai-observability-crewai", "name": "PostHog AI Observability for CrewAI (multi-agent orchestration, Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-crewai.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-crewai.zip", "framework": "crewai", "title": "CrewAI", "description": "PostHog AI Observability for CrewAI (multi-agent orchestration, Python)", @@ -664,7 +664,7 @@ "id": "ai-observability-dspy", "name": "PostHog AI Observability for DSPy (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-dspy.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-dspy.zip", "framework": "dspy", "title": "DSPy", "description": "PostHog AI Observability for DSPy (Python)", @@ -680,7 +680,7 @@ "id": "ai-observability-llamaindex", "name": "PostHog AI Observability for LlamaIndex (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-llamaindex.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-llamaindex.zip", "framework": "llamaindex", "title": "LlamaIndex", "description": "PostHog AI Observability for LlamaIndex (Python)", @@ -696,7 +696,7 @@ "id": "ai-observability-mirascope", "name": "PostHog AI Observability for Mirascope (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-mirascope.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-mirascope.zip", "framework": "mirascope", "title": "Mirascope", "description": "PostHog AI Observability for Mirascope (Python)", @@ -712,7 +712,7 @@ "id": "ai-observability-openai-agents", "name": "PostHog AI Observability for the OpenAI Agents SDK (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openai-agents.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openai-agents.zip", "framework": "openai-agents", "title": "OpenAI Agents SDK", "description": "PostHog AI Observability for the OpenAI Agents SDK (Python)", @@ -728,7 +728,7 @@ "id": "ai-observability-pydantic-ai", "name": "PostHog AI Observability for Pydantic AI (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-pydantic-ai.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-pydantic-ai.zip", "framework": "pydantic-ai", "title": "Pydantic AI", "description": "PostHog AI Observability for Pydantic AI (Python)", @@ -744,7 +744,7 @@ "id": "ai-observability-semantic-kernel", "name": "PostHog AI Observability for Microsoft Semantic Kernel (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-semantic-kernel.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-semantic-kernel.zip", "framework": "semantic-kernel", "title": "Semantic Kernel", "description": "PostHog AI Observability for Microsoft Semantic Kernel (Python)", @@ -760,7 +760,7 @@ "id": "ai-observability-smolagents", "name": "PostHog AI Observability for smolagents (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-smolagents.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-smolagents.zip", "framework": "smolagents", "title": "smolagents", "description": "PostHog AI Observability for smolagents (Python)", @@ -776,7 +776,7 @@ "id": "ai-observability-convex", "name": "PostHog AI Observability for Convex (Node, Vercel AI SDK inside)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-convex.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-convex.zip", "framework": "convex", "title": "Convex", "description": "PostHog AI Observability for Convex (Node, Vercel AI SDK inside)", @@ -792,7 +792,7 @@ "id": "ai-observability-mastra", "name": "PostHog AI Observability for Mastra (agent framework, Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-mastra.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-mastra.zip", "framework": "mastra", "title": "Mastra", "description": "PostHog AI Observability for Mastra (agent framework, Node)", @@ -808,7 +808,7 @@ "id": "ai-observability-google-adk", "name": "PostHog AI Observability for the Google Agent Development Kit (agent framework, Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-google-adk.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-google-adk.zip", "framework": "google-adk", "title": "Google ADK", "description": "PostHog AI Observability for the Google Agent Development Kit (agent framework, Node)", @@ -824,7 +824,7 @@ "id": "ai-observability-instructor-python", "name": "PostHog AI Observability integration for Instructor (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-instructor-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-instructor-python.zip", "framework": "instructor", "default": true, "title": "Instructor (Python)", @@ -842,7 +842,7 @@ "id": "ai-observability-instructor-node", "name": "PostHog AI Observability integration for Instructor (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-instructor-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-instructor-node.zip", "framework": "instructor", "title": "Instructor (Node)", "description": "PostHog AI Observability integration for Instructor (Node)", @@ -858,7 +858,7 @@ "id": "ai-observability-langgraph-python", "name": "PostHog AI Observability integration for LangGraph (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-langgraph-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-langgraph-python.zip", "framework": "langgraph", "default": true, "title": "LangGraph (Python)", @@ -876,7 +876,7 @@ "id": "ai-observability-langgraph-node", "name": "PostHog AI Observability integration for LangGraph (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-langgraph-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-langgraph-node.zip", "framework": "langgraph", "title": "LangGraph (Node)", "description": "PostHog AI Observability integration for LangGraph (Node)", @@ -892,7 +892,7 @@ "id": "ai-observability-cloudflare-ai-gateway-python", "name": "PostHog AI Observability integration for Cloudflare AI Gateway (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cloudflare-ai-gateway-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cloudflare-ai-gateway-python.zip", "framework": "cloudflare-ai-gateway", "default": true, "title": "Cloudflare AI Gateway (Python)", @@ -910,7 +910,7 @@ "id": "ai-observability-cloudflare-ai-gateway-node", "name": "PostHog AI Observability integration for Cloudflare AI Gateway (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-cloudflare-ai-gateway-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-cloudflare-ai-gateway-node.zip", "framework": "cloudflare-ai-gateway", "title": "Cloudflare AI Gateway (Node)", "description": "PostHog AI Observability integration for Cloudflare AI Gateway (Node)", @@ -926,7 +926,7 @@ "id": "ai-observability-helicone-python", "name": "PostHog AI Observability integration for Helicone (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-helicone-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-helicone-python.zip", "framework": "helicone", "default": true, "title": "Helicone (Python)", @@ -944,7 +944,7 @@ "id": "ai-observability-helicone-node", "name": "PostHog AI Observability integration for Helicone (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-helicone-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-helicone-node.zip", "framework": "helicone", "title": "Helicone (Node)", "description": "PostHog AI Observability integration for Helicone (Node)", @@ -960,7 +960,7 @@ "id": "ai-observability-openrouter-python", "name": "PostHog AI Observability integration for OpenRouter (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openrouter-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openrouter-python.zip", "framework": "openrouter", "default": true, "title": "OpenRouter (Python)", @@ -978,7 +978,7 @@ "id": "ai-observability-openrouter-node", "name": "PostHog AI Observability integration for OpenRouter (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openrouter-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openrouter-node.zip", "framework": "openrouter", "title": "OpenRouter (Node)", "description": "PostHog AI Observability integration for OpenRouter (Node)", @@ -994,7 +994,7 @@ "id": "ai-observability-portkey-python", "name": "PostHog AI Observability integration for Portkey (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-portkey-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-portkey-python.zip", "framework": "portkey", "default": true, "title": "Portkey (Python)", @@ -1012,7 +1012,7 @@ "id": "ai-observability-portkey-node", "name": "PostHog AI Observability integration for Portkey (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-portkey-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-portkey-node.zip", "framework": "portkey", "title": "Portkey (Node)", "description": "PostHog AI Observability integration for Portkey (Node)", @@ -1028,7 +1028,7 @@ "id": "ai-observability-dedalus-python", "name": "PostHog AI Observability integration for Dedalus Labs (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-dedalus-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-dedalus-python.zip", "framework": "dedalus", "default": true, "title": "Dedalus Labs (Python)", @@ -1046,7 +1046,7 @@ "id": "ai-observability-dedalus-node", "name": "PostHog AI Observability integration for Dedalus Labs (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-dedalus-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-dedalus-node.zip", "framework": "dedalus", "title": "Dedalus Labs (Node)", "description": "PostHog AI Observability integration for Dedalus Labs (Node)", @@ -1062,7 +1062,7 @@ "id": "ai-observability-litellm", "name": "PostHog AI Observability for LiteLLM (unified LLM SDK / proxy, Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-litellm.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-litellm.zip", "framework": "litellm", "title": "LiteLLM", "description": "PostHog AI Observability for LiteLLM (unified LLM SDK / proxy, Python)", @@ -1078,7 +1078,7 @@ "id": "ai-observability-opentelemetry-python", "name": "PostHog AI Observability integration for OpenTelemetry (Python)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-opentelemetry-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-opentelemetry-python.zip", "framework": "opentelemetry", "default": true, "title": "OpenTelemetry (Python)", @@ -1096,7 +1096,7 @@ "id": "ai-observability-opentelemetry-node", "name": "PostHog AI Observability integration for OpenTelemetry (Node)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-opentelemetry-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-opentelemetry-node.zip", "framework": "opentelemetry", "title": "OpenTelemetry (Node)", "description": "PostHog AI Observability integration for OpenTelemetry (Node)", @@ -1112,7 +1112,7 @@ "id": "ai-observability-opentelemetry-go", "name": "PostHog AI Observability integration for OpenTelemetry (Go)", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-opentelemetry-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-opentelemetry-go.zip", "framework": "opentelemetry", "title": "OpenTelemetry (Go)", "description": "PostHog AI Observability integration for OpenTelemetry (Go)", @@ -1128,7 +1128,7 @@ "id": "ai-observability-claude-code", "name": "PostHog AI Observability for Anthropic Claude Code sessions via the @posthog/ai-plugin", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-claude-code.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-claude-code.zip", "framework": "claude-code", "title": "Claude Code", "description": "PostHog AI Observability for Anthropic Claude Code sessions via the @posthog/ai-plugin", @@ -1143,7 +1143,7 @@ "id": "ai-observability-openclaw", "name": "PostHog AI Observability for the OpenClaw self-hosted AI gateway via the @posthog/openclaw plugin", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-openclaw.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-openclaw.zip", "framework": "openclaw", "title": "OpenClaw", "description": "PostHog AI Observability for the OpenClaw self-hosted AI gateway via the @posthog/openclaw plugin", @@ -1158,7 +1158,7 @@ "id": "ai-observability-pi", "name": "PostHog AI Observability for the Pi terminal coding agent via the @posthog/pi extension", "group": "ai-observability", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/ai-observability-pi.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/ai-observability-pi.zip", "framework": "pi", "title": "Pi Coding Agent", "description": "PostHog AI Observability for the Pi terminal coding agent via the @posthog/pi extension", @@ -1175,7 +1175,7 @@ "id": "audit", "name": "Audit an existing PostHog integration for correctness and best practices", "group": "audit", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit.zip", "title": "PostHog audit", "description": "Audit an existing PostHog integration for correctness and best practices", "tags": [ @@ -1189,7 +1189,7 @@ "id": "audit-attribution", "name": "Audit a PostHog integration's marketing attribution capture for UTM survival, click-id coverage, cross-subdomain identity, and consent/cookieless interactions", "group": "audit-attribution", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-attribution.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-attribution.zip", "title": "PostHog audit — attribution", "description": "Audit a PostHog integration's marketing attribution capture for UTM survival, click-id coverage, cross-subdomain identity, and consent/cookieless interactions", "tags": [ @@ -1203,7 +1203,7 @@ "id": "audit-autocapture", "name": "Audit a PostHog autocapture setup for correctness and cost-optimization opportunities", "group": "audit-autocapture", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-autocapture.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-autocapture.zip", "title": "PostHog audit — autocapture", "description": "Audit a PostHog autocapture setup for correctness and cost-optimization opportunities", "tags": [ @@ -1217,7 +1217,7 @@ "id": "audit-events", "name": "Audit a PostHog integration's event capture quality and cost-optimization opportunities", "group": "audit-events", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-events.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-events.zip", "title": "PostHog audit — events", "description": "Audit a PostHog integration's event capture quality and cost-optimization opportunities", "tags": [ @@ -1231,7 +1231,7 @@ "id": "audit-feature-flags", "name": "Audit a PostHog integration's feature flag usage for correctness and cost-optimization opportunities", "group": "audit-feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-feature-flags.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-feature-flags.zip", "title": "PostHog audit — feature flags", "description": "Audit a PostHog integration's feature flag usage for correctness and cost-optimization opportunities", "tags": [ @@ -1245,7 +1245,7 @@ "id": "audit-identify", "name": "Audit a PostHog integration's $identify implementation for correctness and cost-optimization opportunities", "group": "audit-identify", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-identify.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-identify.zip", "title": "PostHog audit — identify", "description": "Audit a PostHog integration's $identify implementation for correctness and cost-optimization opportunities", "tags": [ @@ -1259,7 +1259,7 @@ "id": "audit-session-replay", "name": "Audit a PostHog session replay setup for correctness and cost-optimization opportunities", "group": "audit-session-replay", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/audit-session-replay.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/audit-session-replay.zip", "title": "PostHog audit — session replay", "description": "Audit a PostHog session replay setup for correctness and cost-optimization opportunities", "tags": [ @@ -1273,7 +1273,7 @@ "id": "creating-product-tours", "name": "Build an in-app product tour that guides users through a feature inside the user's own application. Targeting via PostHog feature flags, tracking via PostHog events, custom reusable UI components. Use when a user asks to create a product tour, onboarding walkthrough, feature spotlight, or step-by-step guide in their app.", "group": "creating-product-tours", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/creating-product-tours.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/creating-product-tours.zip", "title": "Creating product tours", "description": "Build an in-app product tour that guides users through a feature inside the user's own application. Targeting via PostHog feature flags, tracking via PostHog events, custom reusable UI components. Use when a user asks to create a product tour, onboarding walkthrough, feature spotlight, or step-by-step guide in their app.", "tags": [ @@ -1289,7 +1289,7 @@ "id": "data-warehouse-destination-setup", "name": "Send PostHog events to the user's own data warehouse with a batch export", "group": "data-warehouse-destination", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/data-warehouse-destination-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/data-warehouse-destination-setup.zip", "title": "Data Warehouse Destination Setup", "description": "Send PostHog events to the user's own data warehouse with a batch export", "tags": [ @@ -1305,7 +1305,7 @@ "id": "data-warehouse-source-setup", "name": "Connect a detected data source to the PostHog data warehouse", "group": "data-warehouse-source", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/data-warehouse-source-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/data-warehouse-source-setup.zip", "title": "Data Warehouse Source Setup", "description": "Connect a detected data source to the PostHog data warehouse", "tags": [ @@ -1322,7 +1322,7 @@ "id": "error-tracking-react", "name": "PostHog error tracking for React", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-react.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-react.zip", "title": "React", "description": "PostHog error tracking for React", "tags": [ @@ -1335,7 +1335,7 @@ "id": "error-tracking-web", "name": "PostHog error tracking for Web (JavaScript)", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-web.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-web.zip", "title": "Web (JavaScript)", "description": "PostHog error tracking for Web (JavaScript)", "tags": [ @@ -1348,7 +1348,7 @@ "id": "error-tracking-nextjs", "name": "PostHog error tracking for Next.js", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-nextjs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-nextjs.zip", "title": "Next.js", "description": "PostHog error tracking for Next.js", "tags": [ @@ -1362,7 +1362,7 @@ "id": "error-tracking-node", "name": "PostHog error tracking for Node.js", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-node.zip", "title": "Node.js", "description": "PostHog error tracking for Node.js", "tags": [ @@ -1375,7 +1375,7 @@ "id": "error-tracking-python", "name": "PostHog error tracking for Python", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-python.zip", "title": "Python", "description": "PostHog error tracking for Python", "tags": [ @@ -1387,7 +1387,7 @@ "id": "error-tracking-django", "name": "PostHog error tracking for Django", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-django.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-django.zip", "title": "Django", "description": "PostHog error tracking for Django", "tags": [ @@ -1400,7 +1400,7 @@ "id": "error-tracking-flask", "name": "PostHog error tracking for Flask", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-flask.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-flask.zip", "title": "Flask", "description": "PostHog error tracking for Flask", "tags": [ @@ -1413,7 +1413,7 @@ "id": "error-tracking-php", "name": "PostHog error tracking for PHP", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-php.zip", "title": "PHP", "description": "PostHog error tracking for PHP", "tags": [ @@ -1425,7 +1425,7 @@ "id": "error-tracking-laravel", "name": "PostHog error tracking for Laravel", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-laravel.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-laravel.zip", "title": "Laravel", "description": "PostHog error tracking for Laravel", "tags": [ @@ -1438,7 +1438,7 @@ "id": "error-tracking-wordpress", "name": "PostHog error tracking for WordPress", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-wordpress.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-wordpress.zip", "title": "WordPress", "description": "PostHog error tracking for WordPress", "tags": [ @@ -1452,7 +1452,7 @@ "id": "error-tracking-ruby", "name": "PostHog error tracking for Ruby", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-ruby.zip", "title": "Ruby", "description": "PostHog error tracking for Ruby", "tags": [ @@ -1464,7 +1464,7 @@ "id": "error-tracking-ruby-on-rails", "name": "PostHog error tracking for Ruby on Rails", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-ruby-on-rails.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-ruby-on-rails.zip", "title": "Ruby on Rails", "description": "PostHog error tracking for Ruby on Rails", "tags": [ @@ -1477,7 +1477,7 @@ "id": "error-tracking-go", "name": "PostHog error tracking for Go", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-go.zip", "title": "Go", "description": "PostHog error tracking for Go", "tags": [ @@ -1489,7 +1489,7 @@ "id": "error-tracking-rust", "name": "PostHog error tracking for Rust", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-rust.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-rust.zip", "title": "Rust", "description": "PostHog error tracking for Rust", "tags": [ @@ -1501,7 +1501,7 @@ "id": "error-tracking-dotnet", "name": "PostHog error tracking for .NET / ASP.NET Core", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-dotnet.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-dotnet.zip", "title": ".NET / ASP.NET Core", "description": "PostHog error tracking for .NET / ASP.NET Core", "tags": [ @@ -1515,7 +1515,7 @@ "id": "error-tracking-elixir", "name": "PostHog error tracking for Elixir", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-elixir.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-elixir.zip", "title": "Elixir", "description": "PostHog error tracking for Elixir", "tags": [ @@ -1527,7 +1527,7 @@ "id": "error-tracking-angular", "name": "PostHog error tracking for Angular", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-angular.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-angular.zip", "title": "Angular", "description": "PostHog error tracking for Angular", "tags": [ @@ -1540,7 +1540,7 @@ "id": "error-tracking-svelte", "name": "PostHog error tracking for Svelte", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-svelte.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-svelte.zip", "title": "Svelte", "description": "PostHog error tracking for Svelte", "tags": [ @@ -1553,7 +1553,7 @@ "id": "error-tracking-nuxt", "name": "PostHog error tracking for Nuxt", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-nuxt.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-nuxt.zip", "title": "Nuxt", "description": "PostHog error tracking for Nuxt", "tags": [ @@ -1566,7 +1566,7 @@ "id": "error-tracking-react-native", "name": "PostHog error tracking for React Native", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-react-native.zip", "title": "React Native", "description": "PostHog error tracking for React Native", "tags": [ @@ -1579,7 +1579,7 @@ "id": "error-tracking-flutter", "name": "PostHog error tracking for Flutter", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-flutter.zip", "title": "Flutter", "description": "PostHog error tracking for Flutter", "tags": [ @@ -1592,7 +1592,7 @@ "id": "error-tracking-ios", "name": "PostHog error tracking for iOS", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-ios.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-ios.zip", "title": "iOS", "description": "PostHog error tracking for iOS", "tags": [ @@ -1605,7 +1605,7 @@ "id": "error-tracking-android", "name": "PostHog error tracking for Android", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-android.zip", "title": "Android", "description": "PostHog error tracking for Android", "tags": [ @@ -1619,7 +1619,7 @@ "id": "error-tracking-hono", "name": "PostHog error tracking for Hono", "group": "error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-hono.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-hono.zip", "title": "Hono", "description": "PostHog error tracking for Hono", "tags": [ @@ -1633,7 +1633,7 @@ "id": "error-tracking-link-releases-python", "name": "Link each production deploy to a PostHog Error Tracking release for Python", "group": "error-tracking-link-releases", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-link-releases-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-link-releases-python.zip", "title": "Python", "description": "Link each production deploy to a PostHog Error Tracking release for Python", "tags": [ @@ -1647,7 +1647,7 @@ "id": "error-tracking-link-releases-ruby", "name": "Link each production deploy to a PostHog Error Tracking release for Ruby", "group": "error-tracking-link-releases", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-link-releases-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-link-releases-ruby.zip", "title": "Ruby", "description": "Link each production deploy to a PostHog Error Tracking release for Ruby", "tags": [ @@ -1661,7 +1661,7 @@ "id": "error-tracking-link-releases-php", "name": "Link each production deploy to a PostHog Error Tracking release for PHP", "group": "error-tracking-link-releases", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-link-releases-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-link-releases-php.zip", "title": "PHP", "description": "Link each production deploy to a PostHog Error Tracking release for PHP", "tags": [ @@ -1677,7 +1677,7 @@ "id": "error-tracking-upload-source-maps-web", "name": "Upload source maps to PostHog Error Tracking for Web (JavaScript)", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-web.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-web.zip", "title": "Web (JavaScript)", "description": "Upload source maps to PostHog Error Tracking for Web (JavaScript)", "tags": [ @@ -1692,7 +1692,7 @@ "id": "error-tracking-upload-source-maps-nextjs", "name": "Upload source maps to PostHog Error Tracking for Next.js", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-nextjs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-nextjs.zip", "title": "Next.js", "description": "Upload source maps to PostHog Error Tracking for Next.js", "tags": [ @@ -1708,7 +1708,7 @@ "id": "error-tracking-upload-source-maps-node", "name": "Upload source maps to PostHog Error Tracking for Node.js", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-node.zip", "title": "Node.js", "description": "Upload source maps to PostHog Error Tracking for Node.js", "tags": [ @@ -1723,7 +1723,7 @@ "id": "error-tracking-upload-source-maps-react", "name": "Upload source maps to PostHog Error Tracking for React", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-react.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-react.zip", "title": "React", "description": "Upload source maps to PostHog Error Tracking for React", "tags": [ @@ -1738,7 +1738,7 @@ "id": "error-tracking-upload-source-maps-angular", "name": "Upload source maps to PostHog Error Tracking for Angular", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-angular.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-angular.zip", "title": "Angular", "description": "Upload source maps to PostHog Error Tracking for Angular", "tags": [ @@ -1753,7 +1753,7 @@ "id": "error-tracking-upload-source-maps-nuxt", "name": "Upload source maps to PostHog Error Tracking for Nuxt", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-nuxt.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-nuxt.zip", "title": "Nuxt", "description": "Upload source maps to PostHog Error Tracking for Nuxt", "tags": [ @@ -1769,7 +1769,7 @@ "id": "error-tracking-upload-source-maps-react-native", "name": "Upload source maps to PostHog Error Tracking for React Native", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-react-native.zip", "title": "React Native", "description": "Upload source maps to PostHog Error Tracking for React Native", "tags": [ @@ -1784,7 +1784,7 @@ "id": "error-tracking-upload-source-maps-android", "name": "Upload ProGuard / R8 mapping files to PostHog Error Tracking for Android", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-android.zip", "title": "Android", "description": "Upload ProGuard / R8 mapping files to PostHog Error Tracking for Android", "tags": [ @@ -1800,7 +1800,7 @@ "id": "error-tracking-upload-source-maps-flutter", "name": "Upload Flutter debug symbols to PostHog Error Tracking", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-flutter.zip", "title": "Flutter", "description": "Upload Flutter debug symbols to PostHog Error Tracking", "tags": [ @@ -1815,7 +1815,7 @@ "id": "error-tracking-upload-source-maps-ios", "name": "Upload dSYM debug symbols to PostHog Error Tracking for iOS", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-ios.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-ios.zip", "title": "iOS", "description": "Upload dSYM debug symbols to PostHog Error Tracking for iOS", "tags": [ @@ -1830,7 +1830,7 @@ "id": "error-tracking-upload-source-maps-go", "name": "Upload native debug symbols to PostHog Error Tracking for Go", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-go.zip", "title": "Go", "description": "Upload native debug symbols to PostHog Error Tracking for Go", "tags": [ @@ -1844,7 +1844,7 @@ "id": "error-tracking-upload-source-maps-rust", "name": "Upload native debug symbols to PostHog Error Tracking for Rust", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-rust.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-rust.zip", "title": "Rust", "description": "Upload native debug symbols to PostHog Error Tracking for Rust", "tags": [ @@ -1858,7 +1858,7 @@ "id": "error-tracking-upload-source-maps-vite", "name": "Upload source maps to PostHog Error Tracking for Vite", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-vite.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-vite.zip", "title": "Vite", "description": "Upload source maps to PostHog Error Tracking for Vite", "tags": [ @@ -1873,7 +1873,7 @@ "id": "error-tracking-upload-source-maps-webpack", "name": "Upload source maps to PostHog Error Tracking for Webpack", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-webpack.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-webpack.zip", "title": "Webpack", "description": "Upload source maps to PostHog Error Tracking for Webpack", "tags": [ @@ -1888,7 +1888,7 @@ "id": "error-tracking-upload-source-maps-rollup", "name": "Upload source maps to PostHog Error Tracking for Rollup", "group": "error-tracking-upload-source-maps", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/error-tracking-upload-source-maps-rollup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/error-tracking-upload-source-maps-rollup.zip", "title": "Rollup", "description": "Upload source maps to PostHog Error Tracking for Rollup", "tags": [ @@ -1905,7 +1905,7 @@ "id": "events-audit", "name": "Audit PostHog events in a codebase — produce an inventory of every captured event mapped to its file, area, and 30-day volume for the product team to query", "group": "events-audit", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/events-audit.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/events-audit.zip", "title": "PostHog events audit", "description": "Audit PostHog events in a codebase — produce an inventory of every captured event mapped to its file, area, and 30-day volume for the product team to query", "tags": [ @@ -1921,7 +1921,7 @@ "id": "feature-flags-react", "name": "PostHog feature flags for React applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-react.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-react.zip", "title": "React", "description": "PostHog feature flags for React applications", "tags": [ @@ -1934,7 +1934,7 @@ "id": "feature-flags-nextjs", "name": "PostHog feature flags for Next.js applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-nextjs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-nextjs.zip", "title": "Next.js", "description": "PostHog feature flags for Next.js applications", "tags": [ @@ -1949,7 +1949,7 @@ "id": "feature-flags-react-native", "name": "PostHog feature flags for React Native applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-react-native.zip", "title": "React Native", "description": "PostHog feature flags for React Native applications", "tags": [ @@ -1963,7 +1963,7 @@ "id": "feature-flags-web", "name": "PostHog feature flags for Web (JavaScript) applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-web.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-web.zip", "title": "Web (JavaScript)", "description": "PostHog feature flags for Web (JavaScript) applications", "tags": [ @@ -1975,7 +1975,7 @@ "id": "feature-flags-nodejs", "name": "PostHog feature flags for Node.js applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-nodejs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-nodejs.zip", "title": "Node.js", "description": "PostHog feature flags for Node.js applications", "tags": [ @@ -1987,7 +1987,7 @@ "id": "feature-flags-python", "name": "PostHog feature flags for Python applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-python.zip", "title": "Python", "description": "PostHog feature flags for Python applications", "tags": [ @@ -1999,7 +1999,7 @@ "id": "feature-flags-django", "name": "PostHog feature flags for Django applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-django.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-django.zip", "title": "Django", "description": "PostHog feature flags for Django applications", "tags": [ @@ -2012,7 +2012,7 @@ "id": "feature-flags-flask", "name": "PostHog feature flags for Flask applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-flask.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-flask.zip", "title": "Flask", "description": "PostHog feature flags for Flask applications", "tags": [ @@ -2025,7 +2025,7 @@ "id": "feature-flags-php", "name": "PostHog feature flags for PHP applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-php.zip", "title": "PHP", "description": "PostHog feature flags for PHP applications", "tags": [ @@ -2037,7 +2037,7 @@ "id": "feature-flags-laravel", "name": "PostHog feature flags for Laravel applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-laravel.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-laravel.zip", "title": "Laravel", "description": "PostHog feature flags for Laravel applications", "tags": [ @@ -2050,7 +2050,7 @@ "id": "feature-flags-wordpress", "name": "PostHog feature flags for WordPress applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-wordpress.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-wordpress.zip", "title": "WordPress", "description": "PostHog feature flags for WordPress applications", "tags": [ @@ -2064,7 +2064,7 @@ "id": "feature-flags-ruby", "name": "PostHog feature flags for Ruby applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-ruby.zip", "title": "Ruby", "description": "PostHog feature flags for Ruby applications", "tags": [ @@ -2076,7 +2076,7 @@ "id": "feature-flags-ruby-on-rails", "name": "PostHog feature flags for Ruby on Rails applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-ruby-on-rails.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-ruby-on-rails.zip", "title": "Ruby on Rails", "description": "PostHog feature flags for Ruby on Rails applications", "tags": [ @@ -2089,7 +2089,7 @@ "id": "feature-flags-go", "name": "PostHog feature flags for Go applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-go.zip", "title": "Go", "description": "PostHog feature flags for Go applications", "tags": [ @@ -2101,7 +2101,7 @@ "id": "feature-flags-java", "name": "PostHog feature flags for Java applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-java.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-java.zip", "title": "Java", "description": "PostHog feature flags for Java applications", "tags": [ @@ -2113,7 +2113,7 @@ "id": "feature-flags-rust", "name": "PostHog feature flags for Rust applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-rust.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-rust.zip", "title": "Rust", "description": "PostHog feature flags for Rust applications", "tags": [ @@ -2125,7 +2125,7 @@ "id": "feature-flags-dotnet", "name": "PostHog feature flags for .NET applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-dotnet.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-dotnet.zip", "title": ".NET", "description": "PostHog feature flags for .NET applications", "tags": [ @@ -2138,7 +2138,7 @@ "id": "feature-flags-aspnetcore-feature-management", "name": "PostHog feature flags for ASP.NET Core applications using Microsoft.FeatureManagement", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-aspnetcore-feature-management.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-aspnetcore-feature-management.zip", "title": "ASP.NET Core Feature Management", "description": "PostHog feature flags for ASP.NET Core applications using Microsoft.FeatureManagement", "tags": [ @@ -2153,7 +2153,7 @@ "id": "feature-flags-elixir", "name": "PostHog feature flags for Elixir applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-elixir.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-elixir.zip", "title": "Elixir", "description": "PostHog feature flags for Elixir applications", "tags": [ @@ -2165,7 +2165,7 @@ "id": "feature-flags-android", "name": "PostHog feature flags for Android applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-android.zip", "title": "Android", "description": "PostHog feature flags for Android applications", "tags": [ @@ -2178,7 +2178,7 @@ "id": "feature-flags-ios", "name": "PostHog feature flags for iOS applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-ios.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-ios.zip", "title": "iOS", "description": "PostHog feature flags for iOS applications", "tags": [ @@ -2191,7 +2191,7 @@ "id": "feature-flags-flutter", "name": "PostHog feature flags for Flutter applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-flutter.zip", "title": "Flutter", "description": "PostHog feature flags for Flutter applications", "tags": [ @@ -2204,7 +2204,7 @@ "id": "feature-flags-api", "name": "PostHog feature flags for API applications", "group": "feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/feature-flags-api.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/feature-flags-api.zip", "title": "API", "description": "PostHog feature flags for API applications", "tags": [ @@ -2218,7 +2218,7 @@ "id": "integration-nextjs-app-router", "name": "PostHog integration for Next.js App Router applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-nextjs-app-router.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-nextjs-app-router.zip", "framework": "nextjs", "default": true, "title": "Next.js App Router", @@ -2232,6 +2232,7 @@ "javascript_web", "javascript_node", "framework:nextjs", + "frameworkVariant:app-router", "integration", "default" ] @@ -2240,7 +2241,7 @@ "id": "integration-nextjs-pages-router", "name": "PostHog integration for Next.js Pages Router applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-nextjs-pages-router.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-nextjs-pages-router.zip", "framework": "nextjs", "title": "Next.js Pages Router", "description": "PostHog integration for Next.js Pages Router applications", @@ -2253,6 +2254,7 @@ "javascript_web", "javascript_node", "framework:nextjs", + "frameworkVariant:pages-router", "integration" ] }, @@ -2260,7 +2262,7 @@ "id": "integration-react-react-router-6", "name": "PostHog integration for React Router v6 applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-react-router-6.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-react-router-6.zip", "framework": "react-router", "default": true, "title": "React Router v6", @@ -2273,6 +2275,7 @@ "javascript", "javascript_web", "framework:react-router", + "frameworkVariant:v6", "integration", "default" ] @@ -2281,7 +2284,7 @@ "id": "integration-react-react-router-7-framework", "name": "PostHog integration for React Router v7 - Framework mode applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-react-router-7-framework.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-react-router-7-framework.zip", "framework": "react-router", "title": "React Router v7 - Framework mode", "description": "PostHog integration for React Router v7 - Framework mode applications", @@ -2295,6 +2298,7 @@ "javascript_node", "javascript_web", "framework:react-router", + "frameworkVariant:v7-framework", "integration" ] }, @@ -2302,7 +2306,7 @@ "id": "integration-react-react-router-7-data", "name": "PostHog integration for React Router v7 - Data mode applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-react-router-7-data.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-react-router-7-data.zip", "framework": "react-router", "title": "React Router v7 - Data mode", "description": "PostHog integration for React Router v7 - Data mode applications", @@ -2315,6 +2319,7 @@ "javascript", "javascript_web", "framework:react-router", + "frameworkVariant:v7-data", "integration" ] }, @@ -2322,7 +2327,7 @@ "id": "integration-react-react-router-7-declarative", "name": "PostHog integration for React Router v7 - Declarative mode applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-react-router-7-declarative.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-react-router-7-declarative.zip", "framework": "react-router", "title": "React Router v7 - Declarative mode", "description": "PostHog integration for React Router v7 - Declarative mode applications", @@ -2335,6 +2340,7 @@ "javascript", "javascript_web", "framework:react-router", + "frameworkVariant:v7-declarative", "integration" ] }, @@ -2342,7 +2348,7 @@ "id": "integration-react-vite", "name": "PostHog integration for React applications built with Vite (no router)", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-vite.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-vite.zip", "title": "React (Vite)", "description": "PostHog integration for React applications built with Vite (no router)", "tags": [ @@ -2358,7 +2364,7 @@ "id": "integration-nuxt-3-6", "name": "PostHog integration for Nuxt versions 3.0 to 3.6", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-nuxt-3-6.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-nuxt-3-6.zip", "framework": "nuxt", "default": true, "title": "Nuxt 3.6", @@ -2377,7 +2383,7 @@ "id": "integration-nuxt-4", "name": "PostHog integration for Nuxt 4 applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-nuxt-4.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-nuxt-4.zip", "framework": "nuxt", "title": "Nuxt 4", "description": "PostHog integration for Nuxt 4 applications", @@ -2390,6 +2396,7 @@ "javascript_web", "javascript_node", "framework:nuxt", + "frameworkVariant:4.x", "integration" ] }, @@ -2397,7 +2404,7 @@ "id": "integration-vue-3", "name": "PostHog integration for Vue 3 applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-vue-3.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-vue-3.zip", "framework": "vue", "title": "Vue 3", "description": "PostHog integration for Vue 3 applications", @@ -2414,7 +2421,7 @@ "id": "integration-django", "name": "PostHog integration for Django applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-django.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-django.zip", "framework": "django", "title": "Django", "description": "PostHog integration for Django applications", @@ -2429,7 +2436,7 @@ "id": "integration-flask", "name": "PostHog integration for Flask applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-flask.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-flask.zip", "framework": "flask", "title": "Flask", "description": "PostHog integration for Flask applications", @@ -2444,7 +2451,7 @@ "id": "integration-fastapi", "name": "PostHog integration for FastAPI applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-fastapi.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-fastapi.zip", "framework": "fastapi", "title": "FastAPI", "description": "PostHog integration for FastAPI applications", @@ -2459,7 +2466,7 @@ "id": "integration-react-tanstack-router-file-based", "name": "PostHog integration for React applications using TanStack Router with file-based routing", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-tanstack-router-file-based.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-tanstack-router-file-based.zip", "framework": "tanstack-router", "title": "React with TanStack Router (file-based)", "description": "PostHog integration for React applications using TanStack Router with file-based routing", @@ -2470,6 +2477,7 @@ "javascript", "javascript_web", "framework:tanstack-router", + "frameworkVariant:file-based", "integration" ] }, @@ -2477,7 +2485,7 @@ "id": "integration-react-tanstack-router-code-based", "name": "PostHog integration for React applications using TanStack Router with code-based routing", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-tanstack-router-code-based.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-tanstack-router-code-based.zip", "framework": "tanstack-router", "default": true, "title": "React with TanStack Router (code-based)", @@ -2489,6 +2497,7 @@ "javascript", "javascript_web", "framework:tanstack-router", + "frameworkVariant:code-based", "integration", "default" ] @@ -2497,7 +2506,7 @@ "id": "integration-tanstack-start", "name": "PostHog integration for TanStack Start full-stack applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-tanstack-start.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-tanstack-start.zip", "framework": "tanstack-start", "title": "TanStack Start", "description": "PostHog integration for TanStack Start full-stack applications", @@ -2516,7 +2525,7 @@ "id": "integration-laravel", "name": "PostHog integration for Laravel applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-laravel.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-laravel.zip", "framework": "laravel", "title": "Laravel", "description": "PostHog integration for Laravel applications", @@ -2531,7 +2540,7 @@ "id": "integration-php", "name": "PostHog integration for any PHP application using the PHP SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-php.zip", "title": "PHP", "description": "PostHog integration for any PHP application using the PHP SDK", "tags": [ @@ -2543,7 +2552,7 @@ "id": "integration-wordpress", "name": "PostHog integration for self-hosted WordPress sites and plugins, combining client-side autocapture with server-side PHP SDK capture", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-wordpress.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-wordpress.zip", "framework": "wordpress", "title": "WordPress", "description": "PostHog integration for self-hosted WordPress sites and plugins, combining client-side autocapture with server-side PHP SDK capture", @@ -2559,7 +2568,7 @@ "id": "integration-ruby-on-rails", "name": "PostHog integration for Ruby on Rails applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-ruby-on-rails.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-ruby-on-rails.zip", "framework": "rails", "title": "Ruby on Rails", "description": "PostHog integration for Ruby on Rails applications", @@ -2574,7 +2583,7 @@ "id": "integration-android", "name": "PostHog integration for Android applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-android.zip", "framework": "android", "title": "Android", "description": "PostHog integration for Android applications", @@ -2590,7 +2599,7 @@ "id": "integration-sveltekit", "name": "PostHog integration for SvelteKit applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-sveltekit.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-sveltekit.zip", "framework": "sveltekit", "title": "SvelteKit", "description": "PostHog integration for SvelteKit applications", @@ -2608,7 +2617,7 @@ "id": "integration-python", "name": "PostHog integration for any Python application using the Python SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-python.zip", "framework": "python", "title": "Python", "description": "PostHog integration for any Python application using the Python SDK", @@ -2622,7 +2631,7 @@ "id": "integration-javascript_node", "name": "PostHog integration for server-side Node.js applications using posthog-node", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-javascript_node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-javascript_node.zip", "framework": "javascript_node", "title": "JavaScript Node", "description": "PostHog integration for server-side Node.js applications using posthog-node", @@ -2637,7 +2646,7 @@ "id": "integration-javascript_web", "name": "PostHog integration for client-side web JavaScript applications using posthog-js", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-javascript_web.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-javascript_web.zip", "framework": "javascript_web", "title": "JavaScript Web", "description": "PostHog integration for client-side web JavaScript applications using posthog-js", @@ -2652,7 +2661,7 @@ "id": "integration-ruby", "name": "PostHog integration for any Ruby application using the Ruby SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-ruby.zip", "framework": "ruby", "title": "Ruby", "description": "PostHog integration for any Ruby application using the Ruby SDK", @@ -2666,7 +2675,7 @@ "id": "integration-elixir", "name": "PostHog integration for Elixir and Phoenix applications using the posthog SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-elixir.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-elixir.zip", "framework": "elixir", "title": "Elixir", "description": "PostHog integration for Elixir and Phoenix applications using the posthog SDK", @@ -2682,7 +2691,7 @@ "id": "integration-java", "name": "PostHog integration for Java and Spring Boot applications using the posthog-server SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-java.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-java.zip", "framework": "java", "title": "Java (Spring Boot)", "description": "PostHog integration for Java and Spring Boot applications using the posthog-server SDK", @@ -2697,7 +2706,7 @@ "id": "integration-go", "name": "PostHog integration for Go applications using the posthog-go SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-go.zip", "framework": "go", "title": "Go", "description": "PostHog integration for Go applications using the posthog-go SDK", @@ -2711,7 +2720,7 @@ "id": "integration-rust", "name": "PostHog integration for Rust applications using the posthog-rs SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-rust.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-rust.zip", "framework": "rust", "title": "Rust", "description": "PostHog integration for Rust applications using the posthog-rs SDK", @@ -2725,7 +2734,7 @@ "id": "integration-swift", "name": "PostHog integration for Swift iOS and macOS applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-swift.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-swift.zip", "framework": "swift", "title": "Swift (iOS/macOS)", "description": "PostHog integration for Swift iOS and macOS applications", @@ -2743,7 +2752,7 @@ "id": "integration-flutter", "name": "PostHog integration for Flutter applications using the posthog_flutter SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-flutter.zip", "framework": "flutter", "title": "Flutter", "description": "PostHog integration for Flutter applications using the posthog_flutter SDK", @@ -2759,7 +2768,7 @@ "id": "integration-kmp", "name": "PostHog integration for Kotlin Multiplatform (KMP) shared code targeting Android, iOS, and web using the posthog-kmp SDK", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-kmp.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-kmp.zip", "framework": "kmp", "title": "Kotlin Multiplatform", "description": "PostHog integration for Kotlin Multiplatform (KMP) shared code targeting Android, iOS, and web using the posthog-kmp SDK", @@ -2776,7 +2785,7 @@ "id": "integration-react-native", "name": "PostHog integration for React Native applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-react-native.zip", "framework": "react-native", "default": true, "title": "React Native", @@ -2794,7 +2803,7 @@ "id": "integration-expo", "name": "PostHog integration for Expo applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-expo.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-expo.zip", "framework": "react-native", "title": "Expo", "description": "PostHog integration for Expo applications", @@ -2804,6 +2813,7 @@ "javascript", "typescript", "framework:react-native", + "frameworkVariant:expo", "integration" ] }, @@ -2811,7 +2821,7 @@ "id": "integration-astro-static", "name": "PostHog integration for static Astro sites using SSG", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-astro-static.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-astro-static.zip", "framework": "astro", "title": "Astro (Static)", "description": "PostHog integration for static Astro sites using SSG", @@ -2821,6 +2831,7 @@ "typescript", "javascript_web", "framework:astro", + "frameworkVariant:static", "integration" ] }, @@ -2828,7 +2839,7 @@ "id": "integration-astro-view-transitions", "name": "PostHog integration for Astro with ClientRouter view transitions", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-astro-view-transitions.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-astro-view-transitions.zip", "framework": "astro", "title": "Astro (View Transitions)", "description": "PostHog integration for Astro with ClientRouter view transitions", @@ -2839,6 +2850,7 @@ "typescript", "javascript_web", "framework:astro", + "frameworkVariant:view-transitions", "integration" ] }, @@ -2846,7 +2858,7 @@ "id": "integration-astro-ssr", "name": "PostHog integration for server-rendered Astro applications with API routes", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-astro-ssr.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-astro-ssr.zip", "framework": "astro", "title": "Astro (SSR)", "description": "PostHog integration for server-rendered Astro applications with API routes", @@ -2858,6 +2870,7 @@ "javascript_web", "javascript_node", "framework:astro", + "frameworkVariant:ssr", "integration" ] }, @@ -2865,7 +2878,7 @@ "id": "integration-astro-hybrid", "name": "PostHog integration for Astro hybrid rendering with both static and server-rendered pages", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-astro-hybrid.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-astro-hybrid.zip", "framework": "astro", "default": true, "title": "Astro (Hybrid)", @@ -2878,6 +2891,7 @@ "javascript_web", "javascript_node", "framework:astro", + "frameworkVariant:hybrid", "integration", "default" ] @@ -2886,7 +2900,7 @@ "id": "integration-angular", "name": "PostHog integration for Angular applications", "group": "integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-angular.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-angular.zip", "framework": "angular", "title": "Angular", "description": "PostHog integration for Angular applications", @@ -2900,12 +2914,244 @@ ] } ], + "integration/build": [ + { + "id": "integration-build", + "name": "Install dependencies and verify the project builds", + "group": "integration-build", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-build.zip", + "replaces": "integration-v2-build", + "title": "PostHog build step", + "description": "Install dependencies and verify the project builds", + "tags": [ + "orchestrator", + "build", + "integration-build" + ] + } + ], + "integration/capture": [ + { + "id": "integration-capture", + "name": "Instrument the planned events with PostHog capture calls", + "group": "integration-capture", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-capture.zip", + "replaces": "integration-v2-capture", + "frameworkReferences": "integration", + "title": "PostHog capture step", + "description": "Instrument the planned events with PostHog capture calls", + "tags": [ + "orchestrator", + "capture", + "integration-capture" + ] + } + ], + "integration/dashboard": [ + { + "id": "integration-dashboard", + "name": "Create a starter PostHog dashboard from the captured events", + "group": "integration-dashboard", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-dashboard.zip", + "replaces": "integration-v2-dashboard", + "title": "PostHog dashboard step", + "description": "Create a starter PostHog dashboard from the captured events", + "tags": [ + "orchestrator", + "dashboard", + "integration-dashboard" + ] + } + ], + "integration/error-tracking": [ + { + "id": "integration-error-tracking", + "name": "Capture exceptions with PostHog around critical flows", + "group": "integration-error-tracking", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-error-tracking.zip", + "replaces": "integration-v2-error-tracking-step", + "frameworkReferences": "error-tracking", + "title": "PostHog error tracking step", + "description": "Capture exceptions with PostHog around critical flows", + "tags": [ + "orchestrator", + "error-tracking", + "integration-error-tracking" + ] + } + ], + "integration/feature-flags": [ + { + "id": "integration-feature-flags", + "name": "Evaluate the example PostHog feature flags, one per side of the app", + "group": "integration-feature-flags", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-feature-flags.zip", + "replaces": "integration-v2-feature-flags-step", + "frameworkReferences": "feature-flags", + "title": "PostHog feature flags step", + "description": "Evaluate the example PostHog feature flags, one per side of the app", + "tags": [ + "orchestrator", + "feature-flags", + "integration-feature-flags" + ] + } + ], + "integration/identify": [ + { + "id": "integration-identify", + "name": "Identify users at login and signup", + "group": "integration-identify", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-identify.zip", + "replaces": "integration-v2-identify", + "title": "PostHog identify step", + "description": "Identify users at login and signup", + "tags": [ + "orchestrator", + "identify", + "integration-identify" + ] + } + ], + "integration/init": [ + { + "id": "integration-init", + "name": "Initialize PostHog and set its environment variables", + "group": "integration-init", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-init.zip", + "replaces": "integration-v2-init", + "frameworkReferences": "integration", + "title": "PostHog init step", + "description": "Initialize PostHog and set its environment variables", + "tags": [ + "orchestrator", + "init", + "integration-init" + ] + } + ], + "integration/insight": [ + { + "id": "integration-insight", + "name": "Create PostHog insights (trends, funnels) attached to a dashboard", + "group": "integration-insight", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-insight.zip", + "replaces": "integration-v2-insight", + "title": "PostHog insight step", + "description": "Create PostHog insights (trends, funnels) attached to a dashboard", + "tags": [ + "orchestrator", + "insight", + "integration-insight" + ] + } + ], + "integration/install": [ + { + "id": "integration-install", + "name": "Install the PostHog SDK with the project's package manager", + "group": "integration-install", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-install.zip", + "replaces": "integration-v2-install", + "frameworkReferences": "integration", + "title": "PostHog install step", + "description": "Install the PostHog SDK with the project's package manager", + "tags": [ + "orchestrator", + "install", + "integration-install" + ] + } + ], + "integration/mcp": [ + { + "id": "integration-mcp", + "name": "How to call PostHog MCP tools (discover, inspect, then call)", + "group": "integration-mcp", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-mcp.zip", + "replaces": "integration-v2-mcp", + "title": "PostHog MCP step", + "description": "How to call PostHog MCP tools (discover, inspect, then call)", + "tags": [ + "orchestrator", + "mcp", + "integration-mcp" + ] + } + ], + "integration/notebook": [ + { + "id": "integration-notebook", + "name": "Mirror the setup report into a shareable PostHog notebook", + "group": "integration-notebook", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-notebook.zip", + "replaces": "integration-v2-notebook", + "title": "PostHog notebook step", + "description": "Mirror the setup report into a shareable PostHog notebook", + "tags": [ + "orchestrator", + "notebook", + "integration-notebook" + ] + } + ], + "integration/report": [ + { + "id": "integration-report", + "name": "Publish the PostHog setup report from the run's handoffs", + "group": "integration-report", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-report.zip", + "replaces": "integration-v2-report", + "title": "PostHog report step", + "description": "Publish the PostHog setup report from the run's handoffs", + "tags": [ + "orchestrator", + "report", + "integration-report" + ] + } + ], + "integration/session-replay": [ + { + "id": "integration-session-replay", + "name": "Make session replay record for {framework_name}", + "group": "integration-session-replay", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-session-replay.zip", + "replaces": "replay-vision-enable-replay", + "frameworkReferences": "integration", + "title": "PostHog session replay step", + "description": "Make session replay record for {framework_name}", + "tags": [ + "orchestrator", + "replay-vision", + "session-replay", + "integration-session-replay" + ] + } + ], + "integration/warehouse": [ + { + "id": "integration-warehouse", + "name": "Connect the detected data sources to the PostHog data warehouse", + "group": "integration-warehouse", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-warehouse.zip", + "replaces": "integration-v2-warehouse", + "title": "PostHog warehouse step", + "description": "Connect the detected data sources to the PostHog data warehouse", + "tags": [ + "orchestrator", + "data-warehouse", + "sources", + "integration-warehouse" + ] + } + ], "integration-v2/build": [ { "id": "integration-v2-build", "name": "Install dependencies and verify the project builds", "group": "integration-v2-build", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-build.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-build.zip", "title": "PostHog build step", "description": "Install dependencies and verify the project builds", "tags": [ @@ -3568,7 +3814,7 @@ ] } ], - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-capture.json", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-capture.json", "tags": [ "orchestrator", "capture", @@ -3581,7 +3827,7 @@ "id": "integration-v2-dashboard", "name": "Create a starter PostHog dashboard from the captured events", "group": "integration-v2-dashboard", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-dashboard.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-dashboard.zip", "title": "PostHog dashboard step", "description": "Create a starter PostHog dashboard from the captured events", "tags": [ @@ -4244,7 +4490,7 @@ ] } ], - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-error-tracking-step.json", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-error-tracking-step.json", "tags": [ "orchestrator", "error-tracking", @@ -4257,7 +4503,7 @@ "id": "integration-v2-feature-flags-step-nextjs-app-router", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-nextjs-app-router.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-nextjs-app-router.zip", "framework": "nextjs", "default": true, "title": "Next.js App Router", @@ -4281,7 +4527,7 @@ "id": "integration-v2-feature-flags-step-nextjs-pages-router", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-nextjs-pages-router.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-nextjs-pages-router.zip", "framework": "nextjs", "title": "Next.js Pages Router", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4303,7 +4549,7 @@ "id": "integration-v2-feature-flags-step-react-react-router-6", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-react-router-6.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-react-router-6.zip", "framework": "react-router", "default": true, "title": "React Router v6", @@ -4326,7 +4572,7 @@ "id": "integration-v2-feature-flags-step-react-react-router-7-framework", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-react-router-7-framework.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-react-router-7-framework.zip", "framework": "react-router", "title": "React Router v7 - Framework mode", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4349,7 +4595,7 @@ "id": "integration-v2-feature-flags-step-react-react-router-7-data", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-react-router-7-data.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-react-router-7-data.zip", "framework": "react-router", "title": "React Router v7 - Data mode", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4371,7 +4617,7 @@ "id": "integration-v2-feature-flags-step-react-react-router-7-declarative", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-react-router-7-declarative.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-react-router-7-declarative.zip", "framework": "react-router", "title": "React Router v7 - Declarative mode", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4393,7 +4639,7 @@ "id": "integration-v2-feature-flags-step-react-vite", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-vite.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-vite.zip", "title": "React (Vite)", "description": "Evaluate the example PostHog feature flags, one per side of the app", "tags": [ @@ -4411,7 +4657,7 @@ "id": "integration-v2-feature-flags-step-nuxt-3-6", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-nuxt-3-6.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-nuxt-3-6.zip", "framework": "nuxt", "title": "Nuxt 3.6", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4430,7 +4676,7 @@ "id": "integration-v2-feature-flags-step-nuxt-4", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-nuxt-4.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-nuxt-4.zip", "framework": "nuxt", "default": true, "title": "Nuxt 4", @@ -4454,7 +4700,7 @@ "id": "integration-v2-feature-flags-step-vue-3", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-vue-3.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-vue-3.zip", "framework": "vue", "title": "Vue 3", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4473,7 +4719,7 @@ "id": "integration-v2-feature-flags-step-django", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-django.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-django.zip", "framework": "django", "title": "Django", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4490,7 +4736,7 @@ "id": "integration-v2-feature-flags-step-flask", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-flask.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-flask.zip", "framework": "flask", "title": "Flask", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4507,7 +4753,7 @@ "id": "integration-v2-feature-flags-step-fastapi", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-fastapi.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-fastapi.zip", "framework": "fastapi", "title": "FastAPI", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4524,7 +4770,7 @@ "id": "integration-v2-feature-flags-step-react-tanstack-router-file-based", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-tanstack-router-file-based.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-tanstack-router-file-based.zip", "framework": "tanstack-router", "title": "React with TanStack Router (file-based)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4544,7 +4790,7 @@ "id": "integration-v2-feature-flags-step-react-tanstack-router-code-based", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-tanstack-router-code-based.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-tanstack-router-code-based.zip", "framework": "tanstack-router", "default": true, "title": "React with TanStack Router (code-based)", @@ -4566,7 +4812,7 @@ "id": "integration-v2-feature-flags-step-tanstack-start", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-tanstack-start.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-tanstack-start.zip", "framework": "tanstack-start", "title": "TanStack Start", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4587,7 +4833,7 @@ "id": "integration-v2-feature-flags-step-laravel", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-laravel.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-laravel.zip", "framework": "laravel", "title": "Laravel", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4604,7 +4850,7 @@ "id": "integration-v2-feature-flags-step-php", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-php.zip", "title": "PHP", "description": "Evaluate the example PostHog feature flags, one per side of the app", "tags": [ @@ -4618,7 +4864,7 @@ "id": "integration-v2-feature-flags-step-wordpress", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-wordpress.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-wordpress.zip", "framework": "wordpress", "title": "WordPress", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4636,7 +4882,7 @@ "id": "integration-v2-feature-flags-step-ruby-on-rails", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-ruby-on-rails.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-ruby-on-rails.zip", "framework": "rails", "title": "Ruby on Rails", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4653,7 +4899,7 @@ "id": "integration-v2-feature-flags-step-android", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-android.zip", "framework": "android", "title": "Android", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4671,7 +4917,7 @@ "id": "integration-v2-feature-flags-step-sveltekit", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-sveltekit.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-sveltekit.zip", "framework": "sveltekit", "title": "SvelteKit", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4691,7 +4937,7 @@ "id": "integration-v2-feature-flags-step-python", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-python.zip", "framework": "python", "title": "Python", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4707,7 +4953,7 @@ "id": "integration-v2-feature-flags-step-javascript_node", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-javascript_node.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-javascript_node.zip", "framework": "javascript_node", "title": "JavaScript Node", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4724,7 +4970,7 @@ "id": "integration-v2-feature-flags-step-javascript_web", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-javascript_web.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-javascript_web.zip", "framework": "javascript_web", "title": "JavaScript Web", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4741,7 +4987,7 @@ "id": "integration-v2-feature-flags-step-ruby", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-ruby.zip", "framework": "ruby", "title": "Ruby", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4757,7 +5003,7 @@ "id": "integration-v2-feature-flags-step-elixir", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-elixir.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-elixir.zip", "framework": "elixir", "title": "Elixir", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4775,7 +5021,7 @@ "id": "integration-v2-feature-flags-step-java", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-java.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-java.zip", "framework": "java", "title": "Java (Spring Boot)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4792,7 +5038,7 @@ "id": "integration-v2-feature-flags-step-go", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-go.zip", "framework": "go", "title": "Go", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4808,7 +5054,7 @@ "id": "integration-v2-feature-flags-step-rust", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-rust.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-rust.zip", "framework": "rust", "title": "Rust", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4824,7 +5070,7 @@ "id": "integration-v2-feature-flags-step-swift", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-swift.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-swift.zip", "framework": "swift", "title": "Swift (iOS/macOS)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4844,7 +5090,7 @@ "id": "integration-v2-feature-flags-step-flutter", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-flutter.zip", "framework": "flutter", "title": "Flutter", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4862,7 +5108,7 @@ "id": "integration-v2-feature-flags-step-kmp", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-kmp.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-kmp.zip", "framework": "kmp", "title": "Kotlin Multiplatform", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4881,7 +5127,7 @@ "id": "integration-v2-feature-flags-step-react-native", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-react-native.zip", "framework": "react-native", "default": true, "title": "React Native", @@ -4901,7 +5147,7 @@ "id": "integration-v2-feature-flags-step-expo", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-expo.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-expo.zip", "framework": "react-native", "title": "Expo", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4920,7 +5166,7 @@ "id": "integration-v2-feature-flags-step-astro-static", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-astro-static.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-astro-static.zip", "framework": "astro", "title": "Astro (Static)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4939,7 +5185,7 @@ "id": "integration-v2-feature-flags-step-astro-view-transitions", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-astro-view-transitions.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-astro-view-transitions.zip", "framework": "astro", "title": "Astro (View Transitions)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4959,7 +5205,7 @@ "id": "integration-v2-feature-flags-step-astro-ssr", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-astro-ssr.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-astro-ssr.zip", "framework": "astro", "title": "Astro (SSR)", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -4980,7 +5226,7 @@ "id": "integration-v2-feature-flags-step-astro-hybrid", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-astro-hybrid.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-astro-hybrid.zip", "framework": "astro", "default": true, "title": "Astro (Hybrid)", @@ -5003,7 +5249,7 @@ "id": "integration-v2-feature-flags-step-angular", "name": "Evaluate the example PostHog feature flags, one per side of the app", "group": "integration-v2-feature-flags-step", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-feature-flags-step-angular.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-feature-flags-step-angular.zip", "framework": "angular", "title": "Angular", "description": "Evaluate the example PostHog feature flags, one per side of the app", @@ -5024,7 +5270,7 @@ "id": "integration-v2-identify", "name": "Identify users at login and signup", "group": "integration-v2-identify", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-identify.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-identify.zip", "title": "PostHog identify step", "description": "Identify users at login and signup", "tags": [ @@ -5687,7 +5933,7 @@ ] } ], - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-init.json", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-init.json", "tags": [ "orchestrator", "init", @@ -5700,7 +5946,7 @@ "id": "integration-v2-insight", "name": "Create PostHog insights (trends, funnels) attached to a dashboard", "group": "integration-v2-insight", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-insight.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-insight.zip", "title": "PostHog insight step", "description": "Create PostHog insights (trends, funnels) attached to a dashboard", "tags": [ @@ -6363,7 +6609,7 @@ ] } ], - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-install.json", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-install.json", "tags": [ "orchestrator", "install", @@ -6376,7 +6622,7 @@ "id": "integration-v2-mcp", "name": "How to call PostHog MCP tools (discover, inspect, then call)", "group": "integration-v2-mcp", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-mcp.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-mcp.zip", "title": "PostHog MCP step", "description": "How to call PostHog MCP tools (discover, inspect, then call)", "tags": [ @@ -6391,7 +6637,7 @@ "id": "integration-v2-notebook", "name": "Mirror the setup report into a shareable PostHog notebook", "group": "integration-v2-notebook", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-notebook.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-notebook.zip", "title": "PostHog notebook step", "description": "Mirror the setup report into a shareable PostHog notebook", "tags": [ @@ -6406,7 +6652,7 @@ "id": "integration-v2-report", "name": "Publish the PostHog setup report from the run's handoffs", "group": "integration-v2-report", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-report.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-report.zip", "title": "PostHog report step", "description": "Publish the PostHog setup report from the run's handoffs", "tags": [ @@ -6421,7 +6667,7 @@ "id": "integration-v2-warehouse", "name": "Connect the detected data sources to the PostHog data warehouse", "group": "integration-v2-warehouse", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/integration-v2-warehouse.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/integration-v2-warehouse.zip", "title": "PostHog warehouse step", "description": "Connect the detected data sources to the PostHog data warehouse", "tags": [ @@ -6437,7 +6683,7 @@ "id": "llm-analytics-setup", "name": "PostHog AI Observability for all supported providers", "group": "llm-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/llm-analytics-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/llm-analytics-setup.zip", "title": "all supported providers", "description": "PostHog AI Observability for all supported providers", "tags": [ @@ -6450,7 +6696,7 @@ "id": "llm-analytics-dotnet-openai", "name": "PostHog AI Observability for .NET applications using PostHog.AI with OpenAI or Azure OpenAI", "group": "llm-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/llm-analytics-dotnet-openai.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/llm-analytics-dotnet-openai.zip", "title": ".NET OpenAI / Azure OpenAI (PostHog.AI)", "description": "PostHog AI Observability for .NET applications using PostHog.AI with OpenAI or Azure OpenAI", "tags": [ @@ -6468,7 +6714,7 @@ "id": "logs-javascript", "name": "PostHog logs for Web (JavaScript)", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-javascript.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-javascript.zip", "title": "Web (JavaScript)", "description": "PostHog logs for Web (JavaScript)", "tags": [ @@ -6481,7 +6727,7 @@ "id": "logs-nextjs", "name": "PostHog logs for Next.js", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-nextjs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-nextjs.zip", "title": "Next.js", "description": "PostHog logs for Next.js", "tags": [ @@ -6494,7 +6740,7 @@ "id": "logs-nodejs", "name": "PostHog logs for Node.js", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-nodejs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-nodejs.zip", "title": "Node.js", "description": "PostHog logs for Node.js", "tags": [ @@ -6506,7 +6752,7 @@ "id": "logs-python", "name": "PostHog logs for Python", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-python.zip", "title": "Python", "description": "PostHog logs for Python", "tags": [ @@ -6518,7 +6764,7 @@ "id": "logs-go", "name": "PostHog logs for Go", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-go.zip", "title": "Go", "description": "PostHog logs for Go", "tags": [ @@ -6530,7 +6776,7 @@ "id": "logs-java", "name": "PostHog logs for Java", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-java.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-java.zip", "title": "Java", "description": "PostHog logs for Java", "tags": [ @@ -6542,7 +6788,7 @@ "id": "logs-datadog", "name": "PostHog logs for Datadog", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-datadog.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-datadog.zip", "title": "Datadog", "description": "PostHog logs for Datadog", "tags": [ @@ -6554,7 +6800,7 @@ "id": "logs-react-native", "name": "PostHog logs for React Native", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-react-native.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-react-native.zip", "title": "React Native", "description": "PostHog logs for React Native", "tags": [ @@ -6567,7 +6813,7 @@ "id": "logs-android", "name": "PostHog logs for Android", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-android.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-android.zip", "title": "Android", "description": "PostHog logs for Android", "tags": [ @@ -6581,7 +6827,7 @@ "id": "logs-ios", "name": "PostHog logs for iOS", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-ios.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-ios.zip", "title": "iOS", "description": "PostHog logs for iOS", "tags": [ @@ -6594,7 +6840,7 @@ "id": "logs-flutter", "name": "PostHog logs for Flutter", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-flutter.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-flutter.zip", "title": "Flutter", "description": "PostHog logs for Flutter", "tags": [ @@ -6607,7 +6853,7 @@ "id": "logs-other", "name": "PostHog logs for Other Languages", "group": "logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/logs-other.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/logs-other.zip", "title": "Other Languages", "description": "PostHog logs for Other Languages", "tags": [ @@ -6620,7 +6866,7 @@ "id": "mcp-analytics", "name": "Add PostHog MCP analytics to a TypeScript, JavaScript, Python, Go, Ruby (experimental), or Rust (experimental) MCP server. Captures tool calls, agent intent, failures, protocol revision, the calling model, and conversation IDs, with the same defaults in every SDK. Each SDK supports legacy sessions and the handshake-free 2026-07-28 revision. Detects the server style and wires in compatible instrumentation, credentials, conversation correlation, and graceful shutdown.", "group": "mcp-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/mcp-analytics.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/mcp-analytics.zip", "title": "any TypeScript, JavaScript, Python, Go, Ruby, or Rust MCP server", "description": "Add PostHog MCP analytics to a TypeScript, JavaScript, Python, Go, Ruby (experimental), or Rust (experimental) MCP server. Captures tool calls, agent intent, failures, protocol revision, the calling model, and conversation IDs, with the same defaults in every SDK. Each SDK supports legacy sessions and the handshake-free 2026-07-28 revision. Detects the server style and wires in compatible instrumentation, credentials, conversation correlation, and graceful shutdown.", "tags": [ @@ -6632,7 +6878,7 @@ "id": "mcp-analytics-python", "name": "Add PostHog MCP analytics to a TypeScript, JavaScript, Python, Go, Ruby (experimental), or Rust (experimental) MCP server. Captures tool calls, agent intent, failures, protocol revision, the calling model, and conversation IDs, with the same defaults in every SDK. Each SDK supports legacy sessions and the handshake-free 2026-07-28 revision. Detects the server style and wires in compatible instrumentation, credentials, conversation correlation, and graceful shutdown.", "group": "mcp-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/mcp-analytics-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/mcp-analytics-python.zip", "title": "any Python MCP server", "description": "Add PostHog MCP analytics to a TypeScript, JavaScript, Python, Go, Ruby (experimental), or Rust (experimental) MCP server. Captures tool calls, agent intent, failures, protocol revision, the calling model, and conversation IDs, with the same defaults in every SDK. Each SDK supports legacy sessions and the handshake-free 2026-07-28 revision. Detects the server style and wires in compatible instrumentation, credentials, conversation correlation, and graceful shutdown.", "tags": [ @@ -6647,7 +6893,7 @@ "id": "metrics-javascript", "name": "PostHog metrics for Web (JavaScript)", "group": "metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/metrics-javascript.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/metrics-javascript.zip", "title": "Web (JavaScript)", "description": "PostHog metrics for Web (JavaScript)", "tags": [ @@ -6660,7 +6906,7 @@ "id": "metrics-nodejs", "name": "PostHog metrics for Node.js", "group": "metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/metrics-nodejs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/metrics-nodejs.zip", "title": "Node.js", "description": "PostHog metrics for Node.js", "tags": [ @@ -6672,7 +6918,7 @@ "id": "metrics-python", "name": "PostHog metrics for Python", "group": "metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/metrics-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/metrics-python.zip", "title": "Python", "description": "PostHog metrics for Python", "tags": [ @@ -6684,7 +6930,7 @@ "id": "metrics-kubernetes", "name": "PostHog metrics for Kubernetes", "group": "metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/metrics-kubernetes.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/metrics-kubernetes.zip", "title": "Kubernetes", "description": "PostHog metrics for Kubernetes", "tags": [ @@ -6696,7 +6942,7 @@ "id": "metrics-other", "name": "PostHog metrics for Other Languages", "group": "metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/metrics-other.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/metrics-other.zip", "title": "Other Languages", "description": "PostHog metrics for Other Languages", "tags": [ @@ -6709,7 +6955,7 @@ "id": "migrate-statsig", "name": "Migrate an existing analytics or feature-flag vendor to PostHog. Replaces SDK call sites in-place, removes the source package, and writes a migration report. Replacement-only, doesn't adds new instrumentation.", "group": "migrate", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/migrate-statsig.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/migrate-statsig.zip", "title": "Statsig → PostHog", "description": "Migrate an existing analytics or feature-flag vendor to PostHog. Replaces SDK call sites in-place, removes the source package, and writes a migration report. Replacement-only, doesn't adds new instrumentation.", "tags": [ @@ -6724,7 +6970,7 @@ "id": "migrate-email-resend", "name": "Migrate transactional email from Resend to PostHog. Use when asked to migrate from Resend, replace Resend with PostHog, switch email providers, or re-import the Resend suppression list into PostHog after a migration. It finds every Resend send in the code, sets up the sender and DNS next to the records the app sends with now, imports the suppression list, moves each send PostHog can take to PostHog's SDK for its language (Node.js, Python, Go, Ruby, PHP, .NET, Rust, or Elixir), and writes a migration report that lists the sends that stay.", "group": "migrate-email", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/migrate-email-resend.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/migrate-email-resend.zip", "title": "Resend", "description": "Migrate transactional email from Resend to PostHog. Use when asked to migrate from Resend, replace Resend with PostHog, switch email providers, or re-import the Resend suppression list into PostHog after a migration. It finds every Resend send in the code, sets up the sender and DNS next to the records the app sends with now, imports the suppression list, moves each send PostHog can take to PostHog's SDK for its language (Node.js, Python, Go, Ruby, PHP, .NET, Rust, or Elixir), and writes a migration report that lists the sends that stay.", "tags": [ @@ -6740,7 +6986,7 @@ "id": "omnibus-instrument-error-tracking", "name": "Add PostHog error tracking to capture and monitor exceptions. Use after implementing features or reviewing PRs to ensure errors are tracked with stack traces and source maps. Also handles initial PostHog SDK setup if not yet installed.", "group": "omnibus-instrument-error-tracking", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-error-tracking.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-error-tracking.zip", "title": "all supported platforms", "description": "Add PostHog error tracking to capture and monitor exceptions. Use after implementing features or reviewing PRs to ensure errors are tracked with stack traces and source maps. Also handles initial PostHog SDK setup if not yet installed.", "tags": [ @@ -6755,7 +7001,7 @@ "id": "omnibus-instrument-feature-flags", "name": "Add PostHog feature flags to gate new functionality. Use after implementing features or reviewing PRs to ensure safe rollouts with feature flag controls. Also handles initial PostHog SDK setup if not yet installed.", "group": "omnibus-instrument-feature-flags", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-feature-flags.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-feature-flags.zip", "title": "all supported platforms", "description": "Add PostHog feature flags to gate new functionality. Use after implementing features or reviewing PRs to ensure safe rollouts with feature flag controls. Also handles initial PostHog SDK setup if not yet installed.", "tags": [ @@ -6770,7 +7016,7 @@ "id": "omnibus-instrument-integration", "name": "Add PostHog SDK integration to your application. Use when setting up PostHog for the first time or reviewing PRs that need PostHog initialization. Covers SDK installation, provider setup, and basic configuration for any framework.", "group": "omnibus-instrument-integration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-integration.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-integration.zip", "title": "all supported frameworks", "description": "Add PostHog SDK integration to your application. Use when setting up PostHog for the first time or reviewing PRs that need PostHog initialization. Covers SDK installation, provider setup, and basic configuration for any framework.", "tags": [ @@ -6784,7 +7030,7 @@ "id": "omnibus-instrument-llm-analytics", "name": "Add PostHog AI Observability to trace AI model usage. Use after implementing LLM features or reviewing PRs to ensure all generations are captured with token counts, latency, and costs. Also handles initial PostHog SDK setup if not yet installed.", "group": "omnibus-instrument-llm-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-llm-analytics.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-llm-analytics.zip", "title": "all supported providers", "description": "Add PostHog AI Observability to trace AI model usage. Use after implementing LLM features or reviewing PRs to ensure all generations are captured with token counts, latency, and costs. Also handles initial PostHog SDK setup if not yet installed.", "tags": [ @@ -6799,7 +7045,7 @@ "id": "omnibus-instrument-logs", "name": "Add PostHog log capture to track application logs. Use after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. Also handles initial OTLP exporter setup if not yet configured.", "group": "omnibus-instrument-logs", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-logs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-logs.zip", "title": "all supported platforms", "description": "Add PostHog log capture to track application logs. Use after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. Also handles initial OTLP exporter setup if not yet configured.", "tags": [ @@ -6813,7 +7059,7 @@ "id": "omnibus-instrument-metrics", "name": "Add PostHog metric capture to track counters, gauges, and histograms. Use after implementing features or reviewing PRs to ensure key operations are measured, or when asked to add metrics, counters, or track a value over time. Also handles mirroring existing Prometheus/StatsD/OpenTelemetry metrics into PostHog and initial OTLP exporter setup.", "group": "omnibus-instrument-metrics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-metrics.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-metrics.zip", "title": "all supported platforms", "description": "Add PostHog metric capture to track counters, gauges, and histograms. Use after implementing features or reviewing PRs to ensure key operations are measured, or when asked to add metrics, counters, or track a value over time. Also handles mirroring existing Prometheus/StatsD/OpenTelemetry metrics into PostHog and initial OTLP exporter setup.", "tags": [ @@ -6827,7 +7073,7 @@ "id": "omnibus-instrument-product-analytics", "name": "Add PostHog product analytics events to track user behavior. Use after implementing new features or reviewing PRs to ensure meaningful user actions are captured. Also handles initial PostHog SDK setup if not yet installed.", "group": "omnibus-instrument-product-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-product-analytics.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-product-analytics.zip", "title": "all supported frameworks", "description": "Add PostHog product analytics events to track user behavior. Use after implementing new features or reviewing PRs to ensure meaningful user actions are captured. Also handles initial PostHog SDK setup if not yet installed.", "tags": [ @@ -6841,7 +7087,7 @@ "id": "omnibus-instrument-reverse-proxy", "name": "Route PostHog's browser traffic through the app's own domain, so ad blockers don't drop events, session replays, and feature flag calls. Use when the user asks for a reverse proxy or agrees to one you suggested, for example after adding posthog-js or when events or recordings seem to be missing. Don't set one up unprompted. Prefers a self-hosted proxy where the app's platform makes it a small change, such as Next.js or Cloudflare, and PostHog's managed reverse proxy elsewhere.", "group": "omnibus-instrument-reverse-proxy", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-reverse-proxy.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-reverse-proxy.zip", "title": "all supported platforms", "description": "Route PostHog's browser traffic through the app's own domain, so ad blockers don't drop events, session replays, and feature flag calls. Use when the user asks for a reverse proxy or agrees to one you suggested, for example after adding posthog-js or when events or recordings seem to be missing. Don't set one up unprompted. Prefers a self-hosted proxy where the app's platform makes it a small change, such as Next.js or Cloudflare, and PostHog's managed reverse proxy elsewhere.", "tags": [ @@ -6856,7 +7102,7 @@ "id": "omnibus-instrument-tracing", "name": "Add PostHog distributed tracing to see how requests flow through services and where time goes. Use after implementing features or reviewing PRs to ensure request entry points, outbound calls, and background jobs produce spans, or when asked to add tracing or spans. Also handles pointing existing OpenTelemetry tracing at PostHog and initial OTLP exporter setup.", "group": "omnibus-instrument-tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/omnibus-instrument-tracing.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/omnibus-instrument-tracing.zip", "title": "all supported platforms", "description": "Add PostHog distributed tracing to see how requests flow through services and where time goes. Use after implementing features or reviewing PRs to ensure request entry points, outbound calls, and background jobs produce spans, or when asked to add tracing or spans. Also handles pointing existing OpenTelemetry tracing at PostHog and initial OTLP exporter setup.", "tags": [ @@ -6870,7 +7116,7 @@ "id": "posthog-best-practices", "name": "Framework-agnostic, distilled best practices for using PostHog", "group": "posthog-best-practices", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/posthog-best-practices.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/posthog-best-practices.zip", "title": "PostHog best practices", "description": "Framework-agnostic, distilled best practices for using PostHog", "tags": [ @@ -6884,7 +7130,7 @@ "id": "quack-quack", "name": "Add QUACK QUACK comments to your codebase (for internal dev and testing)", "group": "quack", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/quack-quack.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/quack-quack.zip", "title": "Quack Quack Duck Comments (for internal dev and testing)", "description": "Add QUACK QUACK comments to your codebase (for internal dev and testing)", "tags": [ @@ -6898,7 +7144,7 @@ "id": "replay-vision-setup", "name": "Set up PostHog Replay vision. Makes sure session replay is recording (server-side enable plus a posthog-js init check), then creates vision scanners scoped to the product's key flows, read out of the repo. Scanners watch each new session recording with an LLM and report scores, tags, and summaries as queryable events.", "group": "replay-vision", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-setup.zip", "title": "PostHog Replay vision", "description": "Set up PostHog Replay vision. Makes sure session replay is recording (server-side enable plus a posthog-js init check), then creates vision scanners scoped to the product's key flows, read out of the repo. Scanners watch each new session recording with an LLM and report scores, tags, and summaries as queryable events.", "tags": [ @@ -7600,7 +7846,7 @@ ] } ], - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-enable-replay.json", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-enable-replay.json", "tags": [ "orchestrator", "replay-vision", @@ -7614,7 +7860,7 @@ "id": "replay-vision-scanner-broken-experiences", "name": "The breakage monitor brief for Replay vision", "group": "replay-vision-scanner-broken-experiences", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanner-broken-experiences.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanner-broken-experiences.zip", "title": "Breakage scanner", "description": "The breakage monitor brief for Replay vision", "tags": [ @@ -7629,7 +7875,7 @@ "id": "replay-vision-scanner-flow-outcome", "name": "The key flow outcome classifier brief for Replay vision", "group": "replay-vision-scanner-flow-outcome", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanner-flow-outcome.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanner-flow-outcome.zip", "title": "Key flow outcome scanner", "description": "The key flow outcome classifier brief for Replay vision", "tags": [ @@ -7644,7 +7890,7 @@ "id": "replay-vision-scanner-problems", "name": "The problems monitor brief for Replay vision", "group": "replay-vision-scanner-problems", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanner-problems.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanner-problems.zip", "title": "Problems scanner", "description": "The problems monitor brief for Replay vision", "tags": [ @@ -7659,7 +7905,7 @@ "id": "replay-vision-scanner-session-summaries", "name": "The summary scanner brief for Replay vision", "group": "replay-vision-scanner-session-summaries", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanner-session-summaries.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanner-session-summaries.zip", "title": "Summary scanner", "description": "The summary scanner brief for Replay vision", "tags": [ @@ -7674,7 +7920,7 @@ "id": "replay-vision-scanner-user-frustration", "name": "The frustration monitor brief for Replay vision", "group": "replay-vision-scanner-user-frustration", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanner-user-frustration.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanner-user-frustration.zip", "title": "Frustration scanner", "description": "The frustration monitor brief for Replay vision", "tags": [ @@ -7689,7 +7935,7 @@ "id": "replay-vision-scanners-core", "name": "Shared mechanics for creating Replay vision scanners", "group": "replay-vision-scanners-core", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/replay-vision-scanners-core.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/replay-vision-scanners-core.zip", "title": "Replay vision scanner mechanics", "description": "Shared mechanics for creating Replay vision scanners", "tags": [ @@ -7704,7 +7950,7 @@ "id": "revenue-analytics-setup", "name": "Set up Stripe revenue analytics with PostHog", "group": "revenue-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/revenue-analytics-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/revenue-analytics-setup.zip", "title": "Stripe Revenue Analytics", "description": "Set up Stripe revenue analytics with PostHog", "tags": [ @@ -7718,7 +7964,7 @@ "id": "self-driving-setup", "name": "Set up PostHog Self-driving — enable the right signal sources, tune the scout troop, and design custom scouts", "group": "self-driving", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/self-driving-setup.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/self-driving-setup.zip", "title": "PostHog Self-driving", "description": "Set up PostHog Self-driving — enable the right signal sources, tune the scout troop, and design custom scouts", "tags": [ @@ -7732,7 +7978,7 @@ "id": "tools-and-features-hogql", "name": "HogQL queries for PostHog analytics", "group": "tools-and-features", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tools-and-features-hogql.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tools-and-features-hogql.zip", "title": "HogQL", "description": "HogQL queries for PostHog analytics", "tags": [ @@ -7746,7 +7992,7 @@ "id": "tracing-nodejs", "name": "PostHog distributed tracing for Node.js", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-nodejs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-nodejs.zip", "title": "Node.js", "description": "PostHog distributed tracing for Node.js", "tags": [ @@ -7758,7 +8004,7 @@ "id": "tracing-nextjs", "name": "PostHog distributed tracing for Next.js", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-nextjs.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-nextjs.zip", "title": "Next.js", "description": "PostHog distributed tracing for Next.js", "tags": [ @@ -7771,7 +8017,7 @@ "id": "tracing-python", "name": "PostHog distributed tracing for Python", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-python.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-python.zip", "title": "Python", "description": "PostHog distributed tracing for Python", "tags": [ @@ -7783,7 +8029,7 @@ "id": "tracing-go", "name": "PostHog distributed tracing for Go", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-go.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-go.zip", "title": "Go", "description": "PostHog distributed tracing for Go", "tags": [ @@ -7795,7 +8041,7 @@ "id": "tracing-java", "name": "PostHog distributed tracing for Java", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-java.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-java.zip", "title": "Java", "description": "PostHog distributed tracing for Java", "tags": [ @@ -7807,7 +8053,7 @@ "id": "tracing-dotnet", "name": "PostHog distributed tracing for .NET", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-dotnet.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-dotnet.zip", "title": ".NET", "description": "PostHog distributed tracing for .NET", "tags": [ @@ -7820,7 +8066,7 @@ "id": "tracing-php", "name": "PostHog distributed tracing for PHP", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-php.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-php.zip", "title": "PHP", "description": "PostHog distributed tracing for PHP", "tags": [ @@ -7832,7 +8078,7 @@ "id": "tracing-ruby", "name": "PostHog distributed tracing for Ruby", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-ruby.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-ruby.zip", "title": "Ruby", "description": "PostHog distributed tracing for Ruby", "tags": [ @@ -7844,7 +8090,7 @@ "id": "tracing-other", "name": "PostHog distributed tracing for Other Languages", "group": "tracing", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/tracing-other.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/tracing-other.zip", "title": "Other Languages", "description": "PostHog distributed tracing for Other Languages", "tags": [ @@ -7857,7 +8103,7 @@ "id": "web-analytics-doctor", "name": "Audit and fix common PostHog web analytics misconfigurations", "group": "web-analytics", - "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.65.0/web-analytics-doctor.zip", + "downloadUrl": "https://github.com/PostHog/context-mill/releases/download/v1.66.0/web-analytics-doctor.zip", "title": "Web Analytics Doctor", "description": "Audit and fix common PostHog web analytics misconfigurations", "tags": [ @@ -8401,6 +8647,90 @@ "displayName": "Data Warehouse Destination Setup", "description": "Send PostHog events to the user's own data warehouse with a batch export" }, + { + "skillId": "integration-build", + "role": "internal", + "displayName": "PostHog build step", + "description": "Install dependencies and verify the project builds" + }, + { + "skillId": "integration-capture", + "role": "internal", + "displayName": "PostHog capture step", + "description": "Instrument the planned events with PostHog capture calls" + }, + { + "skillId": "integration-dashboard", + "role": "internal", + "displayName": "PostHog dashboard step", + "description": "Create a starter PostHog dashboard from the captured events" + }, + { + "skillId": "integration-error-tracking", + "role": "internal", + "displayName": "PostHog error tracking step", + "description": "Capture exceptions with PostHog around critical flows" + }, + { + "skillId": "integration-feature-flags", + "role": "internal", + "displayName": "PostHog feature flags step", + "description": "Evaluate the example PostHog feature flags, one per side of the app" + }, + { + "skillId": "integration-identify", + "role": "internal", + "displayName": "PostHog identify step", + "description": "Identify users at login and signup" + }, + { + "skillId": "integration-init", + "role": "internal", + "displayName": "PostHog init step", + "description": "Initialize PostHog and set its environment variables" + }, + { + "skillId": "integration-insight", + "role": "internal", + "displayName": "PostHog insight step", + "description": "Create PostHog insights (trends, funnels) attached to a dashboard" + }, + { + "skillId": "integration-install", + "role": "internal", + "displayName": "PostHog install step", + "description": "Install the PostHog SDK with the project's package manager" + }, + { + "skillId": "integration-mcp", + "role": "internal", + "displayName": "PostHog MCP step", + "description": "How to call PostHog MCP tools (discover, inspect, then call)" + }, + { + "skillId": "integration-notebook", + "role": "internal", + "displayName": "PostHog notebook step", + "description": "Mirror the setup report into a shareable PostHog notebook" + }, + { + "skillId": "integration-report", + "role": "internal", + "displayName": "PostHog report step", + "description": "Publish the PostHog setup report from the run's handoffs" + }, + { + "skillId": "integration-session-replay", + "role": "internal", + "displayName": "PostHog session replay step", + "description": "Make session replay record for {framework_name}" + }, + { + "skillId": "integration-warehouse", + "role": "internal", + "displayName": "PostHog warehouse step", + "description": "Connect the detected data sources to the PostHog data warehouse" + }, { "skillId": "integration-v2-build", "role": "internal", diff --git a/package.json b/package.json index 428a58f2f..c62fe5723 100644 --- a/package.json +++ b/package.json @@ -160,8 +160,7 @@ "wizard-ci-record": "tsx scripts/tui-record.no-jest.ts", "decisions-detect": "tsx scripts/decisions-detect.no-jest.ts", "check:decisions-bundle": "tsx scripts/check-decisions-bundle.no-jest.ts", - "record:context-mill-fixtures": "tsx scripts/record-context-mill-fixtures.no-jest.ts", - "verify:repackaged-skills": "tsx --tsconfig tsconfig.base.json scripts/verify-repackaged-skills.no-jest.ts", + "record:context-mill-fixtures": "tsx --tsconfig tsconfig.base.json scripts/record-context-mill-fixtures.no-jest.ts", "visual-dags": "tsx scripts/visual-dags.no-jest.ts" }, "lint-staged": { diff --git a/scripts/README.md b/scripts/README.md index e079e6ef1..c1b9c8218 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -40,34 +40,27 @@ arguments. For new runs follow the [current host limitations](../e2e-harness/ARCHITECTURE.md#current-host-limitations) before choosing credentials or an EU project. -## Repackaged skills - -`pnpm verify:repackaged-skills [dist-or-url]` runs -`verify-repackaged-skills.no-jest.ts` against a context-mill build's -`dist/skills` folder, or a release's download URL, the latest by default. For -every framework and every skill a menu entry replaces, it resolves both skills -as a run does, completes the replacement from the framework's pack, and -compares the files a task reads: every file byte for byte, and `SKILL.md` but -for the `name` in its frontmatter. A skill family is compared once per -framework, and one skill once. It prints each pair that differs, and each -replaced name it found no skill to compare with, and exits 1 when there is -either. Run it before `wizard-agent-dag-skills` reaches a new group of users. - -With `--record` it also writes one matching pair into -`fixtures/context-mill/repackaged/`: the step skill as published, the files of -the pack that completing it reads, and the skill it replaces. A unit test -completes that step from that pack and expects that skill, which keeps the -wizard's fill in step with context-mill's in CI. Record it again when -context-mill changes how it builds a step skill or a pack. - ## Context-mill fixtures `pnpm record:context-mill-fixtures [base-url]` runs -`record-context-mill-fixtures.no-jest.ts`, which records a context-mill -release's skill menu into `fixtures/context-mill/`, the fixture the behavior -checks compare against. It leaves `repackaged/` as it is. -Commit the result on its own with the reason, since a changed fixture changes -what "unchanged" means. +`record-context-mill-fixtures.no-jest.ts`, which records two fixtures from a +context-mill release, the latest by default, into `fixtures/context-mill/`: the +skill menu, and one step skill with its framework's pack in `repackaged/`. + +The pair is the step skill as published in `step/`, the files of the pack that +completing it reads in `pack/`, and in `completed/` the skill context-mill +itself published for the same step and framework. The step's menu entry names +the skill family it replaces, and `completed/` is that family's skill for the +pair's framework. A unit test completes the step from the pack and expects +`completed/`, leaving out only the frontmatter `name` line, where the two ids +differ. + +The recorder never writes `completed/` from the wizard's own fill. A release +that no longer publishes the replaced family leaves `completed/` as it is, and +the recorder says so; `pair.json` names the skill and the release it was +recorded from, 1.66.0 today. Record the pair again when context-mill changes +how it builds a step skill or a pack. Commit the result on its own with the +reason, since a changed fixture changes what "unchanged" means. ## Credentials for full agent runs diff --git a/scripts/record-context-mill-fixtures.no-jest.ts b/scripts/record-context-mill-fixtures.no-jest.ts index 460e26c40..a2d83f742 100644 --- a/scripts/record-context-mill-fixtures.no-jest.ts +++ b/scripts/record-context-mill-fixtures.no-jest.ts @@ -3,6 +3,10 @@ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; +import { unzipSync } from 'fflate'; +import { VARIANT_FILE, type SkillFiles } from '@shared/skill-composition'; +import type { SkillEntry, SkillMenu } from '@shared/skill-menu'; +import { FRAMEWORK_KEY, resolveSkill } from '@shared/skill-resolution'; const BASE_URL = process.argv[2] ?? @@ -13,38 +17,176 @@ const OUT_DIR = path.resolve( 'fixtures', 'context-mill', ); +const PAIR_DIR = path.join(OUT_DIR, 'repackaged'); -async function fetchText(url: string): Promise { +/** The step skill and framework recorded as a pair, and the skill family whose pick is the framework's pack. */ +const PAIR = { step: 'integration-init', framework: 'flask' }; +const PACK_FAMILY = 'integration'; + +/** A menu entry as a release publishes it, with the fields only older releases carry. */ +type PublishedEntry = SkillEntry & { + replaces?: string; + bundle?: boolean; +}; + +/** What `pair.json` records. */ +type PairRecord = { + framework: string; + product: string; + step: string; + pack: string; + contextMill?: string; + /** The skill context-mill published for the pair, and the release `completed/` was recorded from. */ + completed?: { skill: string; contextMill?: string }; +}; + +async function fetchBytes(url: string): Promise { const res = await fetch(url, { redirect: 'follow' }); if (!res.ok) throw new Error(`${url}: HTTP ${res.status}`); - return res.text(); + return new Uint8Array(await res.arrayBuffer()); } -/** The menu's build version. Throws on text that is not a skill menu. */ -function menuVersion(text: string): string | undefined { - const menu = JSON.parse(text) as { - buildVersion?: string; - categories?: unknown; - }; +const text = (bytes: Uint8Array): string => Buffer.from(bytes).toString('utf8'); + +/** The menu. Throws on text that is not a skill menu. */ +function parseMenu(raw: string): SkillMenu { + const menu = JSON.parse(raw) as SkillMenu; if (typeof menu.categories !== 'object' || menu.categories === null) { throw new Error(`${BASE_URL}/skill-menu.json is not a skill menu`); } - return menu.buildVersion; + return menu; +} + +/** The files a menu entry's zip installs, read beside the menu so a base URL other than the release's works. */ +async function filesOf(entry: SkillEntry): Promise { + const data = await fetchBytes( + `${BASE_URL}/${path.posix.basename(entry.downloadUrl)}`, + ); + return Object.fromEntries( + Object.entries(unzipSync(data)) + .filter(([file]) => !file.endsWith('/')) + .map(([file, contents]) => [file, text(contents)]), + ); +} + +/** The files of a pack that completing a skill reads: its variant.json, the product's pages and its rules file. */ +function packFilesRead(pack: SkillFiles, product: string): SkillFiles { + const variant = JSON.parse(pack[VARIANT_FILE]) as { + rules: { file: string } | null; + products: Record; + }; + const names = [ + VARIANT_FILE, + ...variant.products[product].map((page) => page.file), + ...(variant.rules ? [variant.rules.file] : []), + ]; + return Object.fromEntries(names.map((name) => [name, pack[name]])); +} + +/** The skill context-mill itself publishes for the pair, written for one framework, or undefined when the release publishes none. */ +async function publishedSkill( + entries: readonly PublishedEntry[], + step: PublishedEntry, + pack: SkillEntry, +): Promise<{ id: string; files: SkillFiles } | undefined> { + const family = step.replaces; + if (!family) return undefined; + const variant = pack.id.slice(PACK_FAMILY.length + 1); + const id = `${family}-${variant}`; + const own = entries.find((entry) => entry.id === id && !entry.bundle); + if (own) return { id, files: await filesOf(own) }; + const bundle = entries.find((entry) => entry.id === family && entry.bundle); + if (!bundle) return undefined; + const { variants } = JSON.parse( + text( + await fetchBytes( + `${BASE_URL}/${path.posix.basename(bundle.downloadUrl)}`, + ), + ), + ) as { variants: Record }; + const files = variants[variant]; + return files && { id, files }; +} + +/** Where a recorded file goes. Throws unless it stays inside its folder of the fixture, so a published file name cannot write anywhere else. */ +function pairFile(folder: string, file: string): string { + const root = path.join(PAIR_DIR, folder); + const target = path.resolve(root, file); + if (!target.startsWith(root + path.sep)) { + throw new Error(`${file} would be recorded outside ${root}`); + } + return target; } async function main(): Promise { - const skillMenu = await fetchText(`${BASE_URL}/skill-menu.json`); - // Read before anything is written, so a response that is not a menu leaves the fixture alone. - const version = menuVersion(skillMenu); + const skillMenu = text(await fetchBytes(`${BASE_URL}/skill-menu.json`)); + // Read before anything is written, so a response that is not a menu leaves the fixtures alone. + const menu = parseMenu(skillMenu); + const entries: PublishedEntry[] = Object.values(menu.categories).flat(); + const step = entries.find((entry) => entry.id === PAIR.step); + const product = step?.frameworkReferences; + const pack = resolveSkill(entries, PACK_FAMILY, { + [FRAMEWORK_KEY]: [PAIR.framework], + }); + if (!step || !product || !pack) { + throw new Error( + `${BASE_URL} has no ${PAIR.step} to complete, or no pack for ${PAIR.framework}.`, + ); + } + const stepFiles = await filesOf(step); + const packFiles = await filesOf(pack); + // The expected result is context-mill's own skill, never this fill's output, so the two cannot drift unseen. + const published = await publishedSkill(entries, step, pack); + const recorded: Record = { + step: stepFiles, + pack: packFilesRead(packFiles, product), + ...(published ? { completed: published.files } : {}), + }; + // Every destination is checked before a fixture is replaced or a file is written. + const writes = Object.entries(recorded).flatMap(([folder, files]) => + Object.entries(files).map( + ([file, contents]) => [pairFile(folder, file), contents] as const, + ), + ); + const pairPath = path.join(PAIR_DIR, 'pair.json'); + const before = fs.existsSync(pairPath) + ? (JSON.parse(fs.readFileSync(pairPath, 'utf8')) as PairRecord) + : undefined; - // Only the menu is replaced; `repackaged/` belongs to `verify:repackaged-skills --record`. fs.mkdirSync(OUT_DIR, { recursive: true }); fs.writeFileSync(path.join(OUT_DIR, 'skill-menu.json'), skillMenu); + // A folder that is not recorded again stays as it is. + for (const folder of Object.keys(recorded)) { + fs.rmSync(path.join(PAIR_DIR, folder), { recursive: true, force: true }); + } + for (const [target, contents] of writes) { + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.writeFileSync(target, contents); + } + const pair: PairRecord = { + framework: PAIR.framework, + product, + step: step.id, + pack: pack.id, + contextMill: menu.buildVersion, + completed: published + ? { skill: published.id, contextMill: menu.buildVersion } + : before?.completed, + }; + fs.writeFileSync(pairPath, `${JSON.stringify(pair, null, 2)}\n`); console.log( `Recorded context-mill ${ - version ?? 'unknown version' - }: the skill menu into ${path.relative(process.cwd(), OUT_DIR)}`, + menu.buildVersion ?? 'unknown version' + }: the skill menu, and ${step.id} with ${pack.id}, into ${path.relative( + process.cwd(), + OUT_DIR, + )}`, + ); + console.log( + published + ? `Recorded ${published.id}, the skill context-mill publishes for the pair, as completed/.` + : 'This release publishes no skill written for the pair, so completed/ is left as it was.', ); } diff --git a/scripts/verify-repackaged-skills.no-jest.ts b/scripts/verify-repackaged-skills.no-jest.ts deleted file mode 100644 index edb4fd6e0..000000000 --- a/scripts/verify-repackaged-skills.no-jest.ts +++ /dev/null @@ -1,241 +0,0 @@ -/** Checks that a run reads the same documents from the repackaged skills as from the skills they replace; see scripts/README.md. */ - -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; -import { unzipSync } from 'fflate'; -import { - VARIANT_FILE, - compareSkillFiles, - composeStepSkill, - type SkillFiles, -} from '@shared/skill-composition'; -import type { SkillBundle } from '@shared/skill-install'; -import { - expandBundleEntry, - type SkillEntry, - type SkillMenu, -} from '@shared/skill-menu'; -import { - FRAMEWORK_KEY, - resolveReplacement, - resolveSkill, -} from '@shared/skill-resolution'; - -const ARGS = process.argv.slice(2); -const SOURCE = - ARGS.find((arg) => !arg.startsWith('--')) ?? - 'https://github.com/PostHog/context-mill/releases/latest/download'; -/** With `--record`, one matching pair is written as the fixture the composition test reads. */ -const RECORD = ARGS.includes('--record'); -const FIXTURE = { name: 'integration-v2-init', framework: 'flask' }; -const FIXTURE_DIR = path.resolve( - path.dirname(fileURLToPath(import.meta.url)), - '..', - 'fixtures', - 'context-mill', - 'repackaged', -); -/** The skill family whose pick is the run's framework pack. */ -const PACK_FAMILY = 'integration'; - -const cache = new Map>(); - -/** One published file, from a build's `dist/skills` folder or a release's download URL. */ -function load(name: string): Promise { - let loading = cache.get(name); - if (!loading) { - loading = /^https?:\/\//.test(SOURCE) - ? fetch(`${SOURCE}/${name}`).then(async (response) => { - if (!response.ok) throw new Error(`${name}: HTTP ${response.status}`); - return new Uint8Array(await response.arrayBuffer()); - }) - : fs.promises.readFile(path.join(SOURCE, name)); - cache.set(name, loading); - } - return loading; -} - -const text = (bytes: Uint8Array): string => Buffer.from(bytes).toString('utf8'); - -/** The files a menu entry installs: its zip's, or its variant's inside a bundle. */ -async function filesOf(entry: SkillEntry): Promise { - const data = await load(path.posix.basename(entry.downloadUrl)); - if (entry.bundle) { - const bundle = JSON.parse(text(data)) as SkillBundle; - const files = bundle.variants[entry.id.slice(bundle.id.length + 1)]; - if (!files) throw new Error(`${bundle.id} has no variant ${entry.id}`); - return files; - } - return Object.fromEntries( - Object.entries(unzipSync(data)) - .filter(([file]) => !file.endsWith('/')) - .map(([file, contents]) => [file, text(contents)]), - ); -} - -/** The files of a pack that completing a skill reads: its variant.json, the product's pages and its rules file. */ -function packFilesRead(pack: SkillFiles, product: string): SkillFiles { - const variant = JSON.parse(pack[VARIANT_FILE]) as { - rules: { file: string } | null; - products: Record; - }; - const names = [ - VARIANT_FILE, - ...variant.products[product].map((page) => page.file), - ...(variant.rules ? [variant.rules.file] : []), - ]; - return Object.fromEntries(names.map((name) => [name, pack[name]])); -} - -/** One pair as recorded: the step as published, what completing it reads from the pack, and the skill it replaces. */ -type RecordedPair = { - pair: Record; - step: SkillFiles; - pack: SkillFiles; - original: SkillFiles; -}; - -/** Where a recorded file goes. Throws unless it stays inside its folder of the fixture, so a published file name cannot write anywhere else. */ -function fixtureFile(folder: string, file: string): string { - const root = path.join(FIXTURE_DIR, folder); - const target = path.resolve(root, file); - if (!target.startsWith(root + path.sep)) { - throw new Error(`${file} would be recorded outside ${root}`); - } - return target; -} - -function writeFixture(recorded: RecordedPair): void { - // Every destination is checked before the fixture is replaced or a file is written. - const writes = (['step', 'pack', 'original'] as const).flatMap((folder) => - Object.entries(recorded[folder]).map( - ([file, contents]) => [fixtureFile(folder, file), contents] as const, - ), - ); - fs.rmSync(FIXTURE_DIR, { recursive: true, force: true }); - for (const [target, contents] of writes) { - fs.mkdirSync(path.dirname(target), { recursive: true }); - fs.writeFileSync(target, contents); - } - fs.writeFileSync( - path.join(FIXTURE_DIR, 'pair.json'), - `${JSON.stringify(recorded.pair, null, 2)}\n`, - ); -} - -async function main(): Promise { - const menu = JSON.parse(text(await load('skill-menu.json'))) as SkillMenu; - const entries = Object.values(menu.categories) - .flat() - .flatMap(expandBundleEntry); - const frameworks = [ - ...new Set( - entries - .filter((entry) => entry.group === PACK_FAMILY && entry.framework) - .map((entry) => entry.framework as string), - ), - ].sort(); - const replaced = [ - ...new Set( - entries.flatMap((entry) => (entry.replaces ? [entry.replaces] : [])), - ), - ].sort(); - if (replaced.length === 0) { - throw new Error(`The menu at ${SOURCE} has no entry with \`replaces\`.`); - } - - let pairs = 0; - let recorded: RecordedPair | undefined; - const differing: string[] = []; - for (const name of replaced) { - const replacement = resolveReplacement(entries, name) as SkillEntry; - const product = replacement.frameworkReferences; - // One skill with a replacement no pack completes reads the same for every framework, so it is compared once. - const oneSkill = entries.some((entry) => entry.id === name); - let compared = 0; - for (const framework of oneSkill && !product ? [undefined] : frameworks) { - const keys = { [FRAMEWORK_KEY]: framework ? [framework] : undefined }; - const today = resolveSkill(entries, name, keys); - if (!today) continue; - pairs += 1; - compared += 1; - const label = `${name} on ${framework ?? 'every framework'}`; - try { - const step = await filesOf(replacement); - const pack = product - ? resolveSkill(entries, PACK_FAMILY, keys) - : undefined; - if (product && !pack) throw new Error('no pack for the framework'); - const packFiles = pack ? await filesOf(pack) : undefined; - const repackaged = - product && packFiles - ? composeStepSkill(step, packFiles, product) - : step; - const original = await filesOf(today); - const differences = compareSkillFiles(original, repackaged); - if (differences.length > 0) { - differing.push(`${label} (${today.id}): ${differences.join('; ')}`); - } else if ( - product && - pack && - packFiles && - name === FIXTURE.name && - framework === FIXTURE.framework - ) { - recorded = { - pair: { - replaces: name, - framework, - product, - original: today.id, - step: replacement.id, - pack: pack.id, - contextMill: menu.buildVersion, - }, - step, - pack: packFilesRead(packFiles, product), - original, - }; - } - } catch (error) { - differing.push( - `${label}: ${error instanceof Error ? error.message : String(error)}`, - ); - } - } - if (compared === 0) { - differing.push(`${name}: no skill to compare its replacement with`); - } - } - - console.log( - `${replaced.length} skills have a replacement. Compared ${pairs} skill and framework pairs across ${frameworks.length} frameworks.`, - ); - if (RECORD) { - if (!recorded) { - throw new Error( - `Nothing recorded: ${FIXTURE.name} on ${FIXTURE.framework} has no matching pair at ${SOURCE}.`, - ); - } - writeFixture(recorded); - console.log( - `Recorded ${FIXTURE.name} on ${FIXTURE.framework} into ${path.relative( - process.cwd(), - FIXTURE_DIR, - )}.`, - ); - } - if (differing.length === 0) { - console.log('Every pair reads the same documents both ways.'); - return; - } - console.log(`${differing.length} differences:`); - for (const line of differing) console.log(` - ${line}`); - process.exitCode = 1; -} - -main().catch((error) => { - console.error(error instanceof Error ? error.message : error); - process.exitCode = 1; -}); diff --git a/src/agent/agent-interface.ts b/src/agent/agent-interface.ts index c6a851089..866afd3e0 100644 --- a/src/agent/agent-interface.ts +++ b/src/agent/agent-interface.ts @@ -43,6 +43,7 @@ import type { AgentFailure } from './runner/shared/types'; import type { AgentResult } from './runner/harness/types'; import { createCustomHeaders } from '@utils/custom-headers'; import type { HostResolution } from '@shared/host-resolution'; +import type { MatchKeys } from '@shared/skill-resolution'; import { buildWizardPropertiesBlob, gatewayAuth, @@ -225,6 +226,8 @@ export type AgentConfig = { programId: string; /** Whether this program's `publish_handoff` mirrors the report into a PostHog notebook. */ handoffNotebook?: boolean; + /** The run's match keys, which `install_skill` picks the framework's pack with. */ + matchKeys?: () => MatchKeys; /** Program identifier — selects the model for that program. */ integrationLabel?: string; /** @@ -705,6 +708,7 @@ export async function initializeAgent( workingDirectory: config.workingDirectory, detectPackageManager: config.detectPackageManager, skillsBaseUrl: config.skillsBaseUrl, + matchKeys: config.matchKeys, askBridge: config.askBridge, askMaxQuestions: config.askMaxQuestions, orchestrator: config.orchestrator, diff --git a/src/agent/runner/harness/anthropic/__tests__/pending-question.test.ts b/src/agent/runner/harness/anthropic/__tests__/pending-question.test.ts index 727f9cb38..e7e447025 100644 --- a/src/agent/runner/harness/anthropic/__tests__/pending-question.test.ts +++ b/src/agent/runner/harness/anthropic/__tests__/pending-question.test.ts @@ -78,6 +78,7 @@ async function initializeHarness( boot: { programId: 'test', skillsBaseUrl: 'https://skills.test', + matchKeys: () => ({}), credentials, wizardFlags: {}, wizardFlagPayloads: {}, diff --git a/src/agent/runner/harness/anthropic/index.ts b/src/agent/runner/harness/anthropic/index.ts index 5fef22d50..b36b6969a 100644 --- a/src/agent/runner/harness/anthropic/index.ts +++ b/src/agent/runner/harness/anthropic/index.ts @@ -58,6 +58,7 @@ export const anthropicBackend: AgentHarness = { detectPackageManager: config.detectPackageManager ?? detectNodePackageManagers, skillsBaseUrl, + matchKeys: boot.matchKeys, wizardFlags, wizardMetadata, programId: boot.programId, @@ -148,6 +149,7 @@ export const anthropicBackend: AgentHarness = { host: boot.credentials.host, detectPackageManager: detectNodePackageManagers, skillsBaseUrl: boot.skillsBaseUrl, + matchKeys: boot.matchKeys, programId: boot.programId, handoffNotebook: boot.handoffNotebook, wizardFlags: boot.wizardFlags, diff --git a/src/agent/runner/harness/pi/__tests__/structured-run.test.ts b/src/agent/runner/harness/pi/__tests__/structured-run.test.ts index c8f718113..50f69284d 100644 --- a/src/agent/runner/harness/pi/__tests__/structured-run.test.ts +++ b/src/agent/runner/harness/pi/__tests__/structured-run.test.ts @@ -295,6 +295,7 @@ function runInputs( credentials, programId: 'posthog-integration', skillsBaseUrl: '', + matchKeys: () => ({}), wizardFlags: {}, wizardFlagPayloads: {}, wizardMetadata: {}, diff --git a/src/agent/runner/harness/pi/index.ts b/src/agent/runner/harness/pi/index.ts index bdf98b65f..e1b2666b7 100644 --- a/src/agent/runner/harness/pi/index.ts +++ b/src/agent/runner/harness/pi/index.ts @@ -589,6 +589,7 @@ export const piBackend: AgentHarness = { workingDirectory: input.installDir, skillsBaseUrl: boot.skillsBaseUrl, triageProvider: boot.triageProvider, + matchKeys: boot.matchKeys, emit, programId: boot.programId, handoffNotebook: boot.handoffNotebook, diff --git a/src/agent/runner/harness/pi/task.ts b/src/agent/runner/harness/pi/task.ts index 7cee2c65e..cc89a8dce 100644 --- a/src/agent/runner/harness/pi/task.ts +++ b/src/agent/runner/harness/pi/task.ts @@ -416,6 +416,7 @@ export async function runPiTask(inputs: TaskRunInputs): Promise { workingDirectory: dir, skillsBaseUrl: boot.skillsBaseUrl, triageProvider: boot.triageProvider, + matchKeys: boot.matchKeys, emit, taskAgent: orchestrator.currentTaskId !== undefined, programId: boot.programId, diff --git a/src/agent/runner/harness/pi/tools.ts b/src/agent/runner/harness/pi/tools.ts index e7575e750..9fb142614 100644 --- a/src/agent/runner/harness/pi/tools.ts +++ b/src/agent/runner/harness/pi/tools.ts @@ -3,7 +3,7 @@ * so the tools the wizard prompt depends on — skill discovery/install and * fenced `.env` edits — are exposed to pi as native `defineTool` tools backed * by the same helpers the claude-agent-sdk path uses (`fetchSkillMenu`, - * `installSkillById`, `checkEnvKeys`, `mergeEnvValues`). Same tool names as the + * `installToolSkill`, `checkEnvKeys`, `mergeEnvValues`). Same tool names as the * MCP server so the shared prompt is unchanged. `wizard_ask` is wired here too * (same schema, caps, and askBridge as the MCP tool) so interactive programs * can interview the user on pi; without a bridge (CI) it errors on call. @@ -53,9 +53,16 @@ import { WIZARD_ASK_TOOL_DESCRIPTION, } from '../../../tools/tools'; import { fetchSkillMenu } from '@shared/skill-menu'; -import { installSkillById } from '@shared/skill-install'; import type { LLMProvider } from '@posthog/warlock'; -import { scanInstalledSkill } from '../../../yara-hooks'; +import { + scanInstalledSkill, + scanInstalledSkillFile, +} from '../../../yara-hooks'; +import { + incompleteSkillMessage, + installToolSkill, +} from '../../sequence/orchestrator/repackaged-skills'; +import type { MatchKeys } from '@shared/skill-resolution'; import type { ProgressEmitter } from '../../../progress'; import { isFullyCancelled, @@ -102,6 +109,8 @@ export interface PiToolsContext { disallowedTools?: readonly string[]; /** Scan-triage classifier, resolved once in bootstrap. Absent → scans fail closed. */ triageProvider?: LLMProvider; + /** The run's match keys, which pick the framework's pack for a skill `install_skill` completes from it. */ + matchKeys?: () => MatchKeys; /** Where `publish_handoff` reports. Absent → the handoff is written but reported nowhere. */ emit?: ProgressEmitter; /** Set for one task of an orchestrated run: `publish_handoff` then reminds it to report with complete_task. */ @@ -171,12 +180,17 @@ export function createWizardPiTools(ctx: PiToolsContext): ToolDefinition[] { skillId: Type.String({ description: 'Skill ID from load_skill_menu' }), }), async execute(_id, args) { - const result = await installSkillById( - args.skillId, - workingDirectory, + const result = await installToolSkill(args.skillId, { + installDir: workingDirectory, skillsBaseUrl, - { scan: (dir) => scanInstalledSkill(dir, triageProvider) }, - ); + matchKeys: ctx.matchKeys?.() ?? {}, + scan: (dir) => scanInstalledSkill(dir, triageProvider), + scanFile: (file) => scanInstalledSkillFile(file, triageProvider), + }); + if (result.kind === 'incomplete') { + logToFile(`[pi] install_skill ${args.skillId}: ${result.reason}`); + return text(incompleteSkillMessage(args.skillId, result.reason)); + } if (result.kind !== 'ok') { logToFile(`[pi] install_skill ${args.skillId}: ${result.kind}`); return text( diff --git a/src/agent/runner/sequence/README.md b/src/agent/runner/sequence/README.md index 372e480bc..bff6c6047 100644 --- a/src/agent/runner/sequence/README.md +++ b/src/agent/runner/sequence/README.md @@ -50,33 +50,41 @@ picks the family's skill for the run's match keys. The match keys are the run config's `matchKeys`, which the program runner fills from the project's traits, with the run's framework as the `framework` key. -With `wizard-agent-dag-skills` on, a task reads the skill that stands in for the -one its prompt names: the menu entry whose `replaces` is that name. -[repackaged-skills.ts](orchestrator/repackaged-skills.ts) installs it, once a -run. An entry with `frameworkReferences` is one skill written for every -framework. It is installed into an emptied folder, so a page an earlier run -left there does not replace the pack's, and completed from the framework's -reference skill with `@shared/skill-composition`. Completing it rewrites -`SKILL.md`, the one file no install scan has read, so that file is scanned. - -The replacement's id comes from the menu and names a folder, so an id that is -not one plain name is refused before anything is removed or installed. When a -replacement cannot be used for any reason, a thrown error included, the task -reads the skill its prompt names and the run sends -`orchestrator repackaged skill unavailable` with the reason: no reference -skill, a failed install, a pack that cannot complete it, a link on the way, or -a scan that rejects it or fails. A completed skill the scan did not pass is -deleted. -Every event sent after the menu loads carries which a run read as the -`orchestrator_skills` tag: `repackaged` when the flag is on and the menu has a -replacement, `bundles` otherwise. - -`pnpm verify:repackaged-skills [dist-or-url]` checks a context-mill build or -release: for every framework and every replaced skill, the files a task reads -are the same both ways. +A menu entry with `frameworkReferences` is a step skill written once for every +framework. [repackaged-skills.ts](orchestrator/repackaged-skills.ts) installs +it once a run. It builds the skill in a temp folder outside the project: +it installs the skill there, completes it from the framework's reference +skill with `@shared/skill-composition`, and scans `SKILL.md`, the one file +completing rewrites and no install scan has read. Only a skill that is +complete and scanned is put in place, and the temp folder is removed either +way. + +The skill replaces its folder whole, so a page an earlier run left there does +not survive. In the run's own cache any folder may be replaced. In +`.claude/skills`, which is the project's, a folder is replaced only when it +carries the wizard's `.posthog-wizard` marker: one the wizard did not install, +or a link standing there, is refused and left as it is, before anything is +downloaded. + +The skill's id comes from the menu and names a folder, so an id that is not one +plain name is refused before anything is installed. When the skill cannot be +completed for any reason, a thrown error included, nothing reaches its folder, +every task that names it fails as it does when a skill fails to install, and +the run sends `orchestrator repackaged skill unavailable` once with the +reason: a failed install, a pack that cannot complete it, a link on the way, a +folder the wizard does not own, or a scan that rejects it or fails. A run that +installed no reference skill cannot complete one, so it fails before any task +starts, as it does for a skill the menu cannot supply. + +The `install_skill` tool completes such a skill the same way, in both +sequences: `installToolSkill` in the same file picks the framework's pack with +the run's match keys, reads it from a scratch folder, and puts the completed +skill in `.claude/skills`. A run with no framework gets an error that says so, +and nothing is installed. A run pinned to a context-mill release with `--context-mill-version` reads its -skills from that release, and reads no repackaged skill. Its prompts are the +skills from that release. The oldest release a pin may name is 1.66.0, the +first that publishes the skills the bundled prompts name. Its prompts are the bundled ones, as in any run. Before the tasks run, the runner installs the framework's `integration` skill as diff --git a/src/agent/runner/sequence/orchestrator/__tests__/delivered-report.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/delivered-report.test.ts index 0bd572b8f..31af42f2b 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/delivered-report.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/delivered-report.test.ts @@ -24,7 +24,6 @@ vi.mock('../../../switchboard', async () => { resolveHarness: () => ({ harness: 'pi', model: [...VALID_MODELS][0] }), resolveStageOverrides: () => ({}), areSeededTasksEnabled: () => false, - isAgentDagSkillsEnabled: () => false, getHarness: () => ({ runTask: (inputs: unknown) => harnessRun(inputs) }), }; }); diff --git a/src/agent/runner/sequence/orchestrator/__tests__/executor.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/executor.test.ts index aa4e9647a..b6b075d8c 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/executor.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/executor.test.ts @@ -202,6 +202,10 @@ describe('drainQueue', () => { await drainQueue(q, noReport, { maxStarts: 50 }); expect(q.get(a.id)?.status).toBe('failed'); expect(q.get(a.id)?.attempts).toBe(2); + expect(q.get(a.id)?.error).toEqual({ + type: 'no-report', + message: 'Task ended without calling complete_task.', + }); }); it('succeeds on a retry within the attempt budget', async () => { @@ -223,6 +227,23 @@ describe('drainQueue', () => { await drainQueue(q, throwing, { maxStarts: 50 }); expect(q.get(a.id)?.status).toBe('failed'); expect(analytics.captureException).toHaveBeenCalled(); + // The failure says why the task could not run, not only that it did not report. + expect(q.get(a.id)?.error).toEqual({ + type: 'no-report', + message: 'Task ended without calling complete_task: agent exploded', + }); + }); + + it('records the error of the last attempt when a throwing task is retried', async () => { + let calls = 0; + const a = q.enqueue({ type: 'install', maxAttempts: 2 }); + const throwing: RunTask = () => + Promise.reject(new Error(`attempt ${(calls += 1)} failed`)); + await drainQueue(q, throwing, { maxStarts: 50 }); + expect(q.get(a.id)?.attempts).toBe(2); + expect(q.get(a.id)?.error?.message).toBe( + 'Task ended without calling complete_task: attempt 2 failed', + ); }); it('does not run a task whose dependency failed', async () => { diff --git a/src/agent/runner/sequence/orchestrator/__tests__/frontmatter-queue.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/frontmatter-queue.test.ts index 10f5a48a3..a70c04e08 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/frontmatter-queue.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/frontmatter-queue.test.ts @@ -20,7 +20,6 @@ vi.mock('../../../switchboard', async () => { resolveHarness: () => ({ harness: 'pi', model: [...VALID_MODELS][0] }), resolveStageOverrides: () => ({}), areSeededTasksEnabled: () => seededTasks, - isAgentDagSkillsEnabled: () => false, getHarness: () => ({ runTask: (inputs: unknown) => harnessRun(inputs) }), }; }); diff --git a/src/agent/runner/sequence/orchestrator/__tests__/missing-skills.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/missing-skills.test.ts index 783e9ed9e..0ee993c7d 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/missing-skills.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/missing-skills.test.ts @@ -24,7 +24,6 @@ vi.mock('../../../switchboard', async () => { resolveHarness: () => ({ harness: 'pi', model: [...VALID_MODELS][0] }), resolveStageOverrides: () => ({}), areSeededTasksEnabled: () => false, - isAgentDagSkillsEnabled: () => false, getHarness: () => ({ runTask: (inputs: unknown) => harnessRun(inputs) }), }; }); diff --git a/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skill-installer.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skill-installer.test.ts index f092ef3d5..917a11fca 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skill-installer.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skill-installer.test.ts @@ -1,8 +1,8 @@ -/** Each way the installer of a repackaged skill ends: installed, completed and scanned, or handed back to the skill the prompt names. */ +/** Each way the installer of a step skill ends: installed, completed and scanned, or refused with its reason. */ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import type { InstallSkillResult } from '@shared/skill-install'; +import { WIZARD_MARKER, type InstallSkillResult } from '@shared/skill-install'; import type { SkillEntry } from '@shared/skill-menu'; import { repackagedSkillInstaller, @@ -11,6 +11,8 @@ import { const SKILLS_ROOT = '.posthog-wizard-cache/skills'; const REFERENCE = '.posthog-wizard-cache/reference/integration-nextjs'; +// A pack folder with pages and no `variant.json`. +const NO_VARIANT = '.posthog-wizard-cache/reference/no-variant'; const PACK: Record = { 'variant.json': JSON.stringify({ @@ -36,17 +38,17 @@ const entry = (id: string, rest: Partial): SkillEntry => ({ downloadUrl: `https://skills.test/${id}.zip`, ...rest, }); -const INSTALL = entry('integration-install', { - replaces: 'flow-install', +const INSTALL = { + ...entry('integration-install', {}), frameworkReferences: 'integration', -}); -const KEPT = entry('integration-kept', { replaces: 'kept-skill' }); +}; describe('repackagedSkillInstaller', () => { let dir = ''; let installed: string[] = []; + let stages: string[] = []; let scanned: string[] = []; - let unavailable: { skill: string; name: string; reason: string }[] = []; + let unavailable: { skill: string; reason: string }[] = []; const write = (root: string, files: Record) => { for (const [file, contents] of Object.entries(files)) { @@ -54,111 +56,104 @@ describe('repackagedSkillInstaller', () => { fs.writeFileSync(path.join(root, file), contents); } }; - const skillFile = (id: string, file: string) => - path.join(dir, SKILLS_ROOT, id, file); - const read = (id: string, file: string): string | undefined => - fs.existsSync(skillFile(id, file)) - ? fs.readFileSync(skillFile(id, file), 'utf8') + const folder = (id: string, root = SKILLS_ROOT) => path.join(dir, root, id); + const read = ( + id: string, + file: string, + root = SKILLS_ROOT, + ): string | undefined => + fs.existsSync(path.join(folder(id, root), file)) + ? fs.readFileSync(path.join(folder(id, root), file), 'utf8') : undefined; + const leftStages = () => stages.filter((stage) => fs.existsSync(stage)); - /** Unpacks a skill the way the installer does: over whatever is in its folder. */ - const install = (id: string): Promise => { + /** Unpacks a skill where the installer asks, as the real install does. */ + const install = (id: string, stage: string): Promise => { installed.push(id); - write(path.join(dir, SKILLS_ROOT, id), { - 'SKILL.md': id === INSTALL.id ? STEP : 'kept, republished', - }); - return Promise.resolve({ kind: 'ok', path: `${SKILLS_ROOT}/${id}` }); + stages.push(stage); + write(path.join(stage, 'skill', id), { 'SKILL.md': STEP }); + return Promise.resolve({ kind: 'ok', path: `skill/${id}` }); }; const run = (overrides: Partial = {}) => repackagedSkillInstaller({ - entries: [INSTALL, KEPT], installDir: dir, skillsRoot: SKILLS_ROOT, + ownsSkillsRoot: true, referencePath: REFERENCE, install, scanFile: (file) => { - scanned.push(file); + scanned.push(fs.readFileSync(file, 'utf8')); return Promise.resolve(null); }, - onUnavailable: (replacement, name, reason) => - unavailable.push({ skill: replacement.id, name, reason }), + onUnavailable: (skill, reason) => + unavailable.push({ skill: skill.id, reason }), ...overrides, }); beforeEach(() => { dir = fs.mkdtempSync(path.join(os.tmpdir(), 'repackaged-installer-')); installed = []; + stages = []; scanned = []; unavailable = []; write(path.join(dir, REFERENCE), PACK); + write(path.join(dir, NO_VARIANT), { 'references/next-js.md': 'a page' }); }); afterEach(() => fs.rmSync(dir, { recursive: true, force: true })); - it('installs the replacement, completes it from the pack and scans the SKILL.md it rewrote', async () => { - expect(await run()('flow-install')).toBe(`${SKILLS_ROOT}/${INSTALL.id}`); + it('builds the skill in a temp folder, scans the SKILL.md it rewrote, then puts it in place', async () => { + expect(await run()(INSTALL)).toBe(`${SKILLS_ROOT}/${INSTALL.id}`); expect(read(INSTALL.id, 'SKILL.md')).toBe(COMPLETED); expect(read(INSTALL.id, 'references/next-js.md')).toBe('the library page'); - expect(scanned).toEqual([skillFile(INSTALL.id, 'SKILL.md')]); - expect(unavailable).toEqual([]); - }); - - it('installs a replacement no pack completes as it is', async () => { - expect(await run({ referencePath: undefined })('kept-skill')).toBe( - `${SKILLS_ROOT}/${KEPT.id}`, - ); - - expect(read(KEPT.id, 'SKILL.md')).toBe('kept, republished'); - expect(scanned).toEqual([]); + expect(read(INSTALL.id, WIZARD_MARKER)).toBe(''); + expect(scanned).toEqual([COMPLETED]); + expect(leftStages()).toEqual([]); expect(unavailable).toEqual([]); }); - it('installs nothing for a name the menu has no replacement for', async () => { - expect(await run()('unreplaced-skill')).toBeUndefined(); - - expect(installed).toEqual([]); - expect(unavailable).toEqual([]); - }); - - it('installs a replacement once, however many tasks name it', async () => { + it('installs a skill once, however many tasks name it', async () => { const installer = run(); - await Promise.all([installer('flow-install'), installer('flow-install')]); + await Promise.all([installer(INSTALL), installer(INSTALL)]); expect(installed).toEqual([INSTALL.id]); }); - it('empties the folder first, so a page an earlier run left does not replace the pack page', async () => { - write(path.join(dir, SKILLS_ROOT, INSTALL.id), { + it('replaces a folder in its own root whole, so no page an earlier run left survives', async () => { + write(folder(INSTALL.id), { 'references/next-js.md': 'an earlier release', + 'references/gone.md': 'a page the pack no longer has', }); - await run()('flow-install'); + await run()(INSTALL); expect(read(INSTALL.id, 'references/next-js.md')).toBe('the library page'); + expect(read(INSTALL.id, 'references/gone.md')).toBeUndefined(); }); - it('hands the task back when the run has no framework pack, and installs nothing', async () => { - expect( - await run({ referencePath: undefined })('flow-install'), - ).toBeUndefined(); + it('refuses the skill when the run has no framework pack, and installs nothing', async () => { + await expect(run({ referencePath: undefined })(INSTALL)).rejects.toThrow( + 'no framework pack', + ); expect(installed).toEqual([]); expect(unavailable).toEqual([ - { skill: INSTALL.id, name: 'flow-install', reason: 'no framework pack' }, + { skill: INSTALL.id, reason: 'no framework pack' }, ]); }); - // The id comes from the menu, and it names a folder the installer removes. + // The id comes from the menu, and it names the folder the installer replaces. it.each(['../../src', '..', 'a/b'])( 'removes and installs nothing for the menu id %j', async (id) => { write(path.join(dir, 'src'), { 'app.ts': 'the app' }); - const entries = [{ ...INSTALL, id }]; - expect(await run({ entries })('flow-install')).toBeUndefined(); + await expect(run()({ ...INSTALL, id })).rejects.toThrow( + `unusable skill id: ${id}`, + ); expect(fs.readFileSync(path.join(dir, 'src/app.ts'), 'utf8')).toBe( 'the app', @@ -168,7 +163,7 @@ describe('repackagedSkillInstaller', () => { ); expect(installed).toEqual([]); expect(unavailable).toEqual([ - { skill: id, name: 'flow-install', reason: `unusable skill id: ${id}` }, + { skill: id, reason: `unusable skill id: ${id}` }, ]); }, ); @@ -190,76 +185,158 @@ describe('repackagedSkillInstaller', () => { }, 'disk full', ], - ])('hands the task back when %s', async (_, overrides, reason) => { + ])('refuses the skill when %s', async (_, overrides, reason) => { const installer = run(overrides); - expect(await installer('flow-install')).toBeUndefined(); - expect(await installer('flow-install')).toBeUndefined(); + await expect(installer(INSTALL)).rejects.toThrow(reason); + await expect(installer(INSTALL)).rejects.toThrow(reason); - // A replacement is reported once, however many tasks wait on it. - expect(unavailable).toEqual([ - { skill: INSTALL.id, name: 'flow-install', reason }, - ]); + // A skill is reported once, however many tasks wait on it. + expect(unavailable).toEqual([{ skill: INSTALL.id, reason }]); }); - it('hands the task back and leaves the skill as installed when the pack cannot complete it', async () => { - fs.rmSync(path.join(dir, REFERENCE, 'variant.json')); - - expect(await run()('flow-install')).toBeUndefined(); - - expect(read(INSTALL.id, 'SKILL.md')).toBe(STEP); - expect(scanned).toEqual([]); - expect(unavailable).toEqual([ + it.each([ + [ + 'the download fails after it wrote files', { - skill: INSTALL.id, - name: 'flow-install', - reason: 'the pack has no variant.json', + install: (id: string, stage: string): Promise => { + stages.push(stage); + write(path.join(stage, 'skill', id), { 'SKILL.md': STEP }); + return Promise.resolve({ + kind: 'download-failed', + message: 'zip entry escapes destination', + }); + }, }, - ]); - }); - - it.each([ + 'download-failed: zip entry escapes destination', + ], + [ + 'the pack cannot complete it', + { referencePath: NO_VARIANT }, + 'the pack has no variant.json', + ], [ 'the scan rejects the completed skill', - () => Promise.resolve('prompt injection in SKILL.md'), + { scanFile: () => Promise.resolve('prompt injection in SKILL.md') }, 'prompt injection in SKILL.md', ], [ 'the scan fails', - () => Promise.reject(new Error('engine unavailable')), + { scanFile: () => Promise.reject(new Error('engine unavailable')) }, 'scan failed: engine unavailable', ], ])( - 'hands the task back and deletes the completed skill when %s', - async (_, scanFile, reason) => { - expect(await run({ scanFile })('flow-install')).toBeUndefined(); - - expect(fs.existsSync(path.join(dir, SKILLS_ROOT, INSTALL.id))).toBe( - false, - ); - expect(unavailable).toEqual([ - { skill: INSTALL.id, name: 'flow-install', reason }, - ]); + 'leaves no skill folder and no temp folder when %s', + async (_, overrides, reason) => { + await expect(run(overrides)(INSTALL)).rejects.toThrow(reason); + + expect(fs.existsSync(folder(INSTALL.id))).toBe(false); + expect(stages).toHaveLength(1); + expect(leftStages()).toEqual([]); + expect(unavailable).toEqual([{ skill: INSTALL.id, reason }]); }, ); it.skipIf(process.platform === 'win32')( - 'hands the task back, and writes nothing through it, when the skills folder is a link', + 'refuses the skill, and writes nothing through it, when the skills folder is a link', async () => { fs.mkdirSync(path.join(dir, 'outside', INSTALL.id), { recursive: true }); fs.symlinkSync(path.join(dir, 'outside'), path.join(dir, SKILLS_ROOT)); - expect(await run()('flow-install')).toBeUndefined(); + const reason = `a skill path passes through a link: ${SKILLS_ROOT}`; + await expect(run()(INSTALL)).rejects.toThrow(reason); expect(fs.readdirSync(path.join(dir, 'outside'))).toEqual([INSTALL.id]); expect(installed).toEqual([]); - expect(unavailable).toEqual([ - { - skill: INSTALL.id, - name: 'flow-install', - reason: `a skill path passes through a link: ${SKILLS_ROOT}`, - }, - ]); + expect(unavailable).toEqual([{ skill: INSTALL.id, reason }]); }, ); + + // `.claude/skills` is the project's: what the wizard did not put there is not its to replace. + describe('in a skills root the project owns', () => { + const ROOT = '.claude/skills'; + const NOT_OURS = `${ROOT}/${INSTALL.id} is already there and the wizard did not install it`; + const project = (overrides: Partial = {}) => + run({ skillsRoot: ROOT, ownsSkillsRoot: false, ...overrides }); + + it('installs into a folder that is not there yet, and marks it', async () => { + expect(await project()(INSTALL)).toBe(`${ROOT}/${INSTALL.id}`); + + expect(read(INSTALL.id, 'SKILL.md', ROOT)).toBe(COMPLETED); + expect(read(INSTALL.id, WIZARD_MARKER, ROOT)).toBe(''); + }); + + it('replaces a folder the wizard installed', async () => { + write(folder(INSTALL.id, ROOT), { + [WIZARD_MARKER]: '', + 'references/gone.md': 'a page the pack no longer has', + }); + + await project()(INSTALL); + + expect(read(INSTALL.id, 'SKILL.md', ROOT)).toBe(COMPLETED); + expect(read(INSTALL.id, 'references/gone.md', ROOT)).toBeUndefined(); + }); + + it.each([ + ['would succeed', {}], + [ + 'would fail', + { + install: (): Promise => + Promise.resolve({ kind: 'download-failed', message: 'offline' }), + }, + ], + ])( + 'keeps a folder the wizard did not install, and fetches nothing, when the install %s', + async (_, overrides) => { + write(folder(INSTALL.id, ROOT), { 'my-notes.md': 'mine' }); + + await expect(project(overrides)(INSTALL)).rejects.toThrow(NOT_OURS); + + expect(fs.readdirSync(folder(INSTALL.id, ROOT))).toEqual([ + 'my-notes.md', + ]); + expect(read(INSTALL.id, 'my-notes.md', ROOT)).toBe('mine'); + expect(installed).toEqual([]); + expect(unavailable).toEqual([{ skill: INSTALL.id, reason: NOT_OURS }]); + }, + ); + + it('keeps a folder that appears while the skill installs', async () => { + const appears = (id: string, stage: string) => { + write(folder(id, ROOT), { 'my-notes.md': 'mine' }); + return install(id, stage); + }; + + await expect(project({ install: appears })(INSTALL)).rejects.toThrow( + NOT_OURS, + ); + + expect(fs.readdirSync(folder(INSTALL.id, ROOT))).toEqual(['my-notes.md']); + expect(leftStages()).toEqual([]); + }); + + it.skipIf(process.platform === 'win32')( + 'refuses a link standing where the skill goes, even to a folder the wizard marked', + async () => { + write(path.join(dir, 'elsewhere'), { + [WIZARD_MARKER]: '', + 'kept.md': 'kept', + }); + fs.mkdirSync(path.join(dir, ROOT), { recursive: true }); + fs.symlinkSync(path.join(dir, 'elsewhere'), folder(INSTALL.id, ROOT)); + + await expect(project()(INSTALL)).rejects.toThrow(NOT_OURS); + + expect( + fs.readFileSync(path.join(dir, 'elsewhere/kept.md'), 'utf8'), + ).toBe('kept'); + expect(fs.lstatSync(folder(INSTALL.id, ROOT)).isSymbolicLink()).toBe( + true, + ); + expect(installed).toEqual([]); + }, + ); + }); }); diff --git a/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skills.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skills.test.ts index fa798d568..74c73f7a1 100644 --- a/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skills.test.ts +++ b/src/agent/runner/sequence/orchestrator/__tests__/repackaged-skills.test.ts @@ -1,4 +1,4 @@ -/** With `wizard-agent-dag-skills` on, a task reads the skill that stands in for the one its prompt names, completed from the framework's pack. */ +/** A task reads a skill written once for every framework after the run completes it from the framework's pack. */ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; @@ -50,10 +50,10 @@ vi.mock('../../../switchboard', async () => { resolveHarness: () => ({ harness: 'pi', model: [...VALID_MODELS][0] }), resolveStageOverrides: () => ({}), areSeededTasksEnabled: () => false, - isAgentDagSkillsEnabled: () => skillsFlag, getHarness: () => ({ runTask: (inputs: unknown) => harnessRun(inputs) }), }; }); +import { ErrorCodes } from '@shared/errors'; import { analytics } from '@utils/analytics'; import { RunOutcome } from '../../../shared/types'; import { runOrchestrator } from '../orchestrator-runner'; @@ -62,7 +62,7 @@ import type { QueueStore } from '../queue'; const FLOW: Record = { install: - '---\nskills: [flow-install, kept-skill]\ndependsOn: []\n---\ninstall', + '---\nskills: [integration-install, kept-skill]\ndependsOn: []\n---\ninstall', report: '---\nsink: true\nskills: [kept-skill]\ndependsOn: [install]\n---\nreport', }; @@ -82,16 +82,8 @@ const MENU = { framework: 'nextjs', default: true, }), - entry('flow-install-nextjs', { - group: 'flow-install', - framework: 'nextjs', - }), entry('kept-skill'), - entry('integration-install', { - replaces: 'flow-install', - frameworkReferences: 'integration', - }), - entry('integration-kept', { replaces: 'kept-skill' }), + entry('integration-install', { frameworkReferences: 'integration' }), ], }, }; @@ -111,13 +103,11 @@ const PACK = { }; const SKILLS: Record> = { 'integration-nextjs': PACK, - 'flow-install-nextjs': { 'SKILL.md': 'install, as bundled today' }, - 'kept-skill': { 'SKILL.md': 'kept, as published today' }, + 'kept-skill': { 'SKILL.md': 'kept, as published' }, 'integration-install': { 'SKILL.md': '# Install for {framework_name}\n\n{framework_docs}\n{framework_rules}\n', }, - 'integration-kept': { 'SKILL.md': 'kept, republished' }, }; /** A record without one of its keys. */ @@ -134,9 +124,8 @@ type Inputs = { orchestrator: { store: QueueStore }; }; -let skillsFlag = true; let skills = SKILLS; -let menu = MENU; +const menu = MENU; let installs: string[] = []; let scanned: string[] = []; let scan: () => Promise = () => Promise.resolve(null); @@ -172,12 +161,10 @@ function harnessRun(raw: unknown) { return Promise.resolve({ kind: 'success' as const }); } -describe('repackaged skills', () => { +describe('step skills completed from the pack', () => { beforeEach(() => { dir = fs.mkdtempSync(path.join(os.tmpdir(), 'repackaged-skills-')); - skillsFlag = true; skills = SKILLS; - menu = MENU; installs = []; scanned = []; scan = () => Promise.resolve(null); @@ -223,14 +210,15 @@ describe('repackaged skills', () => { ) .map(([, properties]) => properties); - it('installs the skill that stands in for each name, completed from the pack', async () => { + it('installs each skill a prompt names, and completes the one written for every framework', async () => { const result = await run(); expect(result.outcome).toBe(RunOutcome.Success); expect(installs).toEqual([ 'integration-nextjs', 'integration-install', - 'integration-kept', + 'kept-skill', + 'kept-skill', ]); expect(completed).toEqual({ skill: @@ -238,22 +226,15 @@ describe('repackaged skills', () => { page: 'the library page', }); expect(prompts.install).toContain('skills/integration-install/SKILL.md'); - expect(prompts.install).toContain('skills/integration-kept/SKILL.md'); - expect(prompts.install).not.toContain('flow-install-nextjs'); + expect(prompts.install).toContain('skills/kept-skill/SKILL.md'); expect(unavailable()).toEqual([]); - expect(scanned).toEqual([ - path.join( - dir, - '.posthog-wizard-cache/skills/integration-install/SKILL.md', - ), + // The one file scanned is the rewritten SKILL.md, in the temp folder the skill is built in. + expect(scanned.map((file) => file.split(path.sep).slice(-2))).toEqual([ + ['integration-install', 'SKILL.md'], ]); - expect(analytics.setTag).toHaveBeenCalledWith( - 'orchestrator_skills', - 'repackaged', - ); }); - it('starts a replacement from an empty folder, so a page an earlier run left does not replace the pack page', async () => { + it('starts the skill from an empty folder, so a page an earlier run left does not replace the pack page', async () => { const left = path.join( dir, '.posthog-wizard-cache/skills/integration-install/references', @@ -268,66 +249,16 @@ describe('repackaged skills', () => { expect(unavailable()).toEqual([]); }); - it.skipIf(process.platform === 'win32')( - 'falls back to the skill the prompt names when the skills folder is a link', - async () => { - fs.mkdirSync(path.join(dir, 'outside')); - fs.mkdirSync(path.join(dir, '.posthog-wizard-cache')); - fs.symlinkSync( - path.join(dir, 'outside'), - path.join(dir, '.posthog-wizard-cache/skills'), - ); - - const result = await run(); - - expect(result.outcome).toBe(RunOutcome.Success); - expect(prompts.install).toContain('skills/flow-install-nextjs/SKILL.md'); - expect(installs).not.toContain('integration-install'); - expect(unavailable()).toContainEqual({ - skill: 'integration-install', - replaces: 'flow-install', - reason: - 'a skill path passes through a link: .posthog-wizard-cache/skills', - framework: 'nextjs', - }); - }, - ); - - it('installs the skills the prompts name while the flag is off', async () => { - skillsFlag = false; - const result = await run(); - - expect(result.outcome).toBe(RunOutcome.Success); - expect(installs).toEqual([ - 'integration-nextjs', - 'flow-install-nextjs', - 'kept-skill', - 'kept-skill', - ]); - expect(prompts.install).toContain('skills/flow-install-nextjs/SKILL.md'); - expect(analytics.setTag).toHaveBeenCalledWith( - 'orchestrator_skills', - 'bundles', - ); - }); - - it('reports bundles when the menu has no replacement, whatever the flag says', async () => { - menu = { - categories: { - skills: MENU.categories.skills.filter( - (skill) => !('replaces' in skill), - ), - }, - }; + it('fails the run before any task starts when the pack did not install', async () => { + skills = without(SKILLS, 'integration-nextjs'); const result = await run(); - expect(result.outcome).toBe(RunOutcome.Success); - expect(prompts.install).toContain('skills/flow-install-nextjs/SKILL.md'); - expect(analytics.setTag).toHaveBeenCalledWith( - 'orchestrator_skills', - 'bundles', + expect(result.outcome).toBe(RunOutcome.Failed); + expect(result.failure?.code).toBe( + ErrorCodes.AgentOrchestratorSkillVariantMissing, ); - expect(unavailable()).toEqual([]); + expect(installs).not.toContain('integration-install'); + expect(prompts).toEqual({}); }); it.each([ @@ -348,13 +279,6 @@ describe('repackaged skills', () => { }, 'skill-not-found', ], - [ - 'the run has no reference skill to complete it from', - () => { - skills = without(SKILLS, 'integration-nextjs'); - }, - 'no framework pack', - ], [ 'the scan rejects the completed skill', () => { @@ -370,22 +294,41 @@ describe('repackaged skills', () => { 'scan failed: engine unavailable', ], ])( - 'falls back to the skill the prompt names when %s', + 'fails the task, which never reads the skill, when %s', async (_, arrange, reason) => { arrange(); const result = await run(); - expect(result.outcome).toBe(RunOutcome.Success); - // A completed skill the scan did not pass is gone before any task starts. - if (scanned.length > 0) expect(completed.skill).toBe(''); - expect(installs).toContain('flow-install-nextjs'); - expect(prompts.install).toContain('skills/flow-install-nextjs/SKILL.md'); - expect(prompts.install).toContain('skills/integration-kept/SKILL.md'); + expect(result.outcome).toBe(RunOutcome.Failed); + expect(prompts.install).toBeUndefined(); + expect(read('integration-install', 'SKILL.md')).toBeUndefined(); + // The skill is reported once, however many attempts wait on it. + expect(unavailable()).toEqual([ + { skill: 'integration-install', reason, framework: 'nextjs' }, + ]); + }, + ); + + it.skipIf(process.platform === 'win32')( + 'fails the task, and writes nothing through it, when the skills folder is a link', + async () => { + fs.mkdirSync(path.join(dir, 'outside')); + fs.mkdirSync(path.join(dir, '.posthog-wizard-cache')); + fs.symlinkSync( + path.join(dir, 'outside'), + path.join(dir, '.posthog-wizard-cache/skills'), + ); + + const result = await run(); + + expect(result.outcome).toBe(RunOutcome.Failed); + expect(prompts.install).toBeUndefined(); + expect(installs).not.toContain('integration-install'); expect(unavailable()).toEqual([ { skill: 'integration-install', - replaces: 'flow-install', - reason, + reason: + 'a skill path passes through a link: .posthog-wizard-cache/skills', framework: 'nextjs', }, ]); diff --git a/src/agent/runner/sequence/orchestrator/__tests__/tool-skill-install.test.ts b/src/agent/runner/sequence/orchestrator/__tests__/tool-skill-install.test.ts new file mode 100644 index 000000000..1e79c41e1 --- /dev/null +++ b/src/agent/runner/sequence/orchestrator/__tests__/tool-skill-install.test.ts @@ -0,0 +1,289 @@ +/** What `install_skill` installs: a skill as published, or one completed from the framework's pack, never a half-completed one. */ +import fs from 'fs'; +import * as path from 'path'; +import * as os from 'os'; + +vi.mock('@utils/analytics', () => ({ + analytics: { wizardCapture: vi.fn(), setTag: vi.fn() }, +})); +vi.mock('@shared/skill-menu', () => ({ + fetchSkillMenu: () => Promise.resolve(menu), +})); +vi.mock('@shared/skill-install', async (importActual) => ({ + ...(await importActual()), + // Writes the files a skill ships, where the real install would unpack them. + installSkillById: ( + id: string, + installDir: string, + _url: string, + options: { skillsRoot?: string }, + ) => { + const files = SKILLS[id]; + if (!files) + return Promise.resolve({ kind: 'skill-not-found', skillId: id }); + const relative = `${options.skillsRoot ?? '.claude/skills'}/${id}`; + installed.push(path.join(installDir, relative)); + if (offline.has(id)) + return Promise.resolve({ kind: 'download-failed', message: 'offline' }); + for (const [file, contents] of Object.entries(files)) { + const target = path.join(installDir, relative, file); + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.writeFileSync(target, contents); + } + return Promise.resolve({ kind: 'ok', path: relative }); + }, +})); + +import { analytics } from '@utils/analytics'; +import { installToolSkill } from '../repackaged-skills'; + +const entry = (id: string, rest: object = {}) => ({ + id, + name: id, + group: id, + downloadUrl: `https://skills.test/${id}.zip`, + ...rest, +}); +const MENU = { + categories: { + skills: [ + entry('integration-nextjs', { + group: 'integration', + tags: ['framework:nextjs', 'default'], + }), + entry('plain-skill'), + entry('integration-install', { frameworkReferences: 'integration' }), + ], + }, +}; +const SKILLS: Record> = { + 'integration-nextjs': { + 'variant.json': JSON.stringify({ + id: 'nextjs', + displayName: 'Next.js', + rules: { file: 'references/COMMANDMENTS.md', description: 'Rules' }, + products: { + integration: [ + { file: 'references/next-js.md', description: 'Next.js' }, + ], + }, + }), + 'references/next-js.md': 'the library page', + 'references/COMMANDMENTS.md': 'the rules', + }, + 'plain-skill': { 'SKILL.md': 'as published' }, + 'integration-install': { + 'SKILL.md': + '# Install for {framework_name}\n\n{framework_docs}\n{framework_rules}\n', + }, +}; + +// Null when the menu cannot be fetched. +let menu: typeof MENU | null = MENU; +let installed: string[] = []; +// Skills whose download fails. +let offline = new Set(); +let dir = ''; + +const read = (id: string, file: string): string | undefined => { + const target = path.join(dir, '.claude/skills', id, file); + return fs.existsSync(target) ? fs.readFileSync(target, 'utf8') : undefined; +}; + +describe('installToolSkill', () => { + beforeEach(() => { + dir = fs.mkdtempSync(path.join(os.tmpdir(), 'tool-skill-install-')); + menu = MENU; + installed = []; + offline = new Set(); + vi.mocked(analytics.wizardCapture).mockClear(); + }); + + afterEach(() => fs.rmSync(dir, { recursive: true, force: true })); + + const install = ( + skillId: string, + over: { + framework?: string; + scanFile?: () => Promise; + } = {}, + ) => + installToolSkill(skillId, { + installDir: dir, + skillsBaseUrl: 'https://skills.test', + matchKeys: over.framework ? { framework: [over.framework] } : {}, + scan: () => Promise.resolve(null), + scanFile: over.scanFile ?? (() => Promise.resolve(null)), + }); + + it('installs nothing when the menu cannot be fetched', async () => { + menu = null; + + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ kind: 'menu-fetch-failed' }); + + expect(installed).toEqual([]); + expect(fs.existsSync(path.join(dir, '.claude'))).toBe(false); + }); + + it('installs a skill with no framework references as it is published', async () => { + expect(await install('plain-skill')).toEqual({ + kind: 'ok', + path: '.claude/skills/plain-skill', + }); + expect(read('plain-skill', 'SKILL.md')).toBe('as published'); + }); + + it("completes a step skill from the framework's pack, and leaves no pack behind", async () => { + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ kind: 'ok', path: '.claude/skills/integration-install' }); + + expect(read('integration-install', 'SKILL.md')).toBe( + '# Install for Next.js\n\n- `references/next-js.md` - Next.js\n- `references/COMMANDMENTS.md` - Rules\n', + ); + expect(read('integration-install', 'references/next-js.md')).toBe( + 'the library page', + ); + expect(fs.readdirSync(path.join(dir, '.claude/skills'))).toEqual([ + 'integration-install', + ]); + const pack = installed.find((target) => + target.endsWith('integration-nextjs'), + ); + expect(pack && fs.existsSync(pack)).toBe(false); + }); + + it('refuses a step skill, says why and installs nothing when the run has no framework', async () => { + expect(await install('integration-install')).toEqual({ + kind: 'incomplete', + skillId: 'integration-install', + reason: 'no framework pack', + }); + + expect(read('integration-install', 'SKILL.md')).toBeUndefined(); + expect(analytics.wizardCapture).toHaveBeenCalledWith( + 'orchestrator repackaged skill unavailable', + { + skill: 'integration-install', + reason: 'no framework pack', + framework: undefined, + }, + ); + }); + + it.each([ + ['the install would succeed', false], + ['the download fails', true], + ])( + 'keeps a skill folder the project made itself when %s', + async (_, fails) => { + const mine = path.join(dir, '.claude/skills/integration-install'); + fs.mkdirSync(mine, { recursive: true }); + fs.writeFileSync(path.join(mine, 'my-notes.md'), 'mine'); + if (fails) offline.add('integration-install'); + + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ + kind: 'incomplete', + skillId: 'integration-install', + reason: + '.claude/skills/integration-install is already there and the wizard did not install it', + }); + + expect(fs.readdirSync(mine)).toEqual(['my-notes.md']); + expect(read('integration-install', 'my-notes.md')).toBe('mine'); + }, + ); + + it('installs nothing, and says why, when the download of a step skill fails', async () => { + offline.add('integration-install'); + + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ + kind: 'incomplete', + skillId: 'integration-install', + reason: 'download-failed: offline', + }); + + expect(fs.existsSync(path.join(dir, '.claude/skills'))).toBe(false); + }); + + it("refuses a step skill, says why and installs nothing when the framework's pack does not install", async () => { + offline.add('integration-nextjs'); + const reason = + 'the framework pack did not install: download-failed: offline'; + + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ kind: 'incomplete', skillId: 'integration-install', reason }); + + // Only the pack was tried, and its scratch folder is gone. + expect(installed).toHaveLength(1); + expect(fs.existsSync(path.dirname(path.dirname(installed[0])))).toBe(false); + expect(fs.existsSync(path.join(dir, '.claude'))).toBe(false); + expect(analytics.wizardCapture).toHaveBeenCalledWith( + 'orchestrator repackaged skill unavailable', + { skill: 'integration-install', reason, framework: 'nextjs' }, + ); + }); + + it('reports a scratch folder that cannot be made as a skill it could not complete', async () => { + const made = vi.spyOn(fs, 'mkdtempSync').mockImplementationOnce(() => { + throw new Error('ENOSPC: no space left on device'); + }); + + try { + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ + kind: 'incomplete', + skillId: 'integration-install', + reason: 'ENOSPC: no space left on device', + }); + expect(installed).toEqual([]); + } finally { + made.mockRestore(); + } + }); + + it('keeps the result of an install whose temp folders cannot be removed', async () => { + const remove = fs.rmSync.bind(fs); + const kept: string[] = []; + const removing = vi + .spyOn(fs, 'rmSync') + .mockImplementation((target, options) => { + if (String(target).startsWith(dir)) return remove(target, options); + kept.push(String(target)); + throw new Error('EBUSY: resource busy or locked'); + }); + + try { + expect( + await install('integration-install', { framework: 'nextjs' }), + ).toEqual({ kind: 'ok', path: '.claude/skills/integration-install' }); + expect(kept).toHaveLength(2); + } finally { + removing.mockRestore(); + for (const target of kept) + remove(target, { recursive: true, force: true }); + } + }); + + it('refuses a step skill, and installs nothing, when the scan rejects the completed SKILL.md', async () => { + const result = await install('integration-install', { + framework: 'nextjs', + scanFile: () => Promise.resolve('prompt injection in SKILL.md'), + }); + + expect(result).toEqual({ + kind: 'incomplete', + skillId: 'integration-install', + reason: 'prompt injection in SKILL.md', + }); + expect(read('integration-install', 'SKILL.md')).toBeUndefined(); + }); +}); diff --git a/src/agent/runner/sequence/orchestrator/executor.ts b/src/agent/runner/sequence/orchestrator/executor.ts index 61362d280..761014594 100644 --- a/src/agent/runner/sequence/orchestrator/executor.ts +++ b/src/agent/runner/sequence/orchestrator/executor.ts @@ -78,11 +78,14 @@ async function runOne( ): Promise { if (signal?.aborted) return; store.start(task.id); + // Why the task could not run, when it threw instead of ending without a report. + let thrown: string | undefined; try { await runTask(task); } catch (error) { if (signal?.aborted) return; if (error instanceof RunTaskFatal) throw error; + thrown = error instanceof Error ? error.message : String(error); // The task threw rather than reporting. The outcome check below handles // the queue; the exception itself should never be silent. logToFile(`[executor] runTask threw for ${task.type}:`, error); @@ -104,7 +107,9 @@ async function runOne( } else { store.fail(task.id, { type: 'no-report', - message: 'Task ended without calling complete_task.', + message: thrown + ? `Task ended without calling complete_task: ${thrown}` + : 'Task ended without calling complete_task.', }); } return; diff --git a/src/agent/runner/sequence/orchestrator/orchestrator-runner.ts b/src/agent/runner/sequence/orchestrator/orchestrator-runner.ts index fb9be1bb1..7fb8605b5 100644 --- a/src/agent/runner/sequence/orchestrator/orchestrator-runner.ts +++ b/src/agent/runner/sequence/orchestrator/orchestrator-runner.ts @@ -37,11 +37,7 @@ import { scanInstalledSkillFile, } from '../../../yara-hooks'; import { fetchSkillMenu, type SkillEntry } from '@shared/skill-menu'; -import { - FRAMEWORK_KEY, - resolveSkill, - type MatchKeys, -} from '@shared/skill-resolution'; +import { resolveSkill } from '@shared/skill-resolution'; import { analytics } from '@utils/analytics'; import { ciExcludedTaskTypes } from '@utils/ci-flag-overrides'; import { logToFile } from '@utils/debug'; @@ -62,12 +58,12 @@ import type { SequenceResult, SequenceContext, } from '../../shared/types'; +import { runFramework, runMatchKeys } from '../../shared/match-keys'; import { createEmitSpinner } from '../../shared/progress-collector'; import { createAskBridge } from '../../shared/ask'; import { areSeededTasksEnabled, getHarness, - isAgentDagSkillsEnabled, resolveHarness, resolveStageOverrides, type HarnessPick, @@ -97,7 +93,11 @@ import { } from './task-deadline'; import { dependencyClosure, uncoveredBySink } from './queue-tools'; import { deferSeededTasks } from './seeded-deps'; -import { repackagedSkillInstaller } from './repackaged-skills'; +import { + FRAMEWORK_PACK_FAMILY, + repackagedSkillInstaller, + reportSkillUnavailable, +} from './repackaged-skills'; import { queueTaskGraph, TaskGraphError } from './task-graph'; import { LONGER_ASK_TIMEOUT_MS, shouldDisableAsk } from '@shared/ask-policy'; import { @@ -255,9 +255,6 @@ async function fetchSkillMenuEntries( return Object.values(menu.categories).flat(); } -/** The framework reference is the full `integration` skill, which the menu ids as `integration-`. */ -const REFERENCE_SKILL = 'integration'; - /** * How long an optional step's notice waits for an answer. * @@ -884,29 +881,15 @@ async function executeOrchestrator( let referenceInstallPath: string | undefined; const menuSkillEntries = await fetchSkillMenuEntries(boot.skillsBaseUrl); if (signal?.aborted) return cancelledRun(); - // The framework key for reference + variant resolution. `input.integration` - // is the detected framework and always wins; `input.skillId` is the - // fallback for the basic-integration path, where the caller sets it to the - // framework label. Programs whose run config carries their own skill id - // (agent-skill commands like replay-vision) would otherwise leak that id in - // here as a bogus framework after the caller overwrites the detect result. - const framework = input.integration ?? input.skillId ?? undefined; - // The project's traits supply the match keys, and the framework key above replaces theirs. - const matchKeys: MatchKeys = { - ...config.matchKeys?.(), - [FRAMEWORK_KEY]: framework ? [framework] : undefined, - }; - const pickSkillId = (skillId: string) => - resolveSkill(menuSkillEntries, skillId, matchKeys)?.id; - // `wizard-agent-dag-skills` has a task read the skill that stands in for the one its prompt names, when the menu has any. - const repackagedSkills = - isAgentDagSkillsEnabled(boot.wizardFlags) && - menuSkillEntries.some((entry) => entry.replaces !== undefined); - analytics.setTag( - 'orchestrator_skills', - repackagedSkills ? 'repackaged' : 'bundles', - ); - const referenceSkillId = framework ? pickSkillId(REFERENCE_SKILL) : undefined; + // The framework the reference skill and every skill family resolve for. + const framework = runFramework(input); + const matchKeys = runMatchKeys(config, input); + const pickSkillEntry = (skillId: string) => + resolveSkill(menuSkillEntries, skillId, matchKeys); + const pickSkillId = (skillId: string) => pickSkillEntry(skillId)?.id; + const referenceSkillId = framework + ? pickSkillId(FRAMEWORK_PACK_FAMILY) + : undefined; if (referenceSkillId) { const ref = await installSkillById( referenceSkillId, @@ -950,7 +933,11 @@ async function executeOrchestrator( const missingSkills = new Set(); for (const type of registry.types) { for (const skillId of registry.get(type)?.skills ?? []) { - if (pickSkillId(skillId)) continue; + const picked = pickSkillEntry(skillId); + // A skill completed from the framework's pack is missing when the run installed no pack. + if (picked && !(picked.frameworkReferences && !referenceInstallPath)) { + continue; + } missingVariants.push(`${type}/${skillId}`); missingSkills.add(skillId); logToFile( @@ -1353,32 +1340,22 @@ async function executeOrchestrator( // its agent prompt (the WHAT) and the mini-skills it needs (the HOW), then // runs on its own model and tools. const taskSkillsRoot = path.join(QUEUE_DIR_NAME, 'skills'); - // With the flag off, or a menu with no replacement, every task reads the skill its prompt names. - const installRepackagedSkill = repackagedSkills - ? repackagedSkillInstaller({ - entries: menuSkillEntries, - installDir: input.installDir, - skillsRoot: taskSkillsRoot, - referencePath: referenceInstallPath, - install: (skillId) => - installSkillById(skillId, input.installDir, boot.skillsBaseUrl, { - skillsRoot: taskSkillsRoot, - scan: (dir) => scanInstalledSkill(dir, boot.triageProvider), - }), - scanFile: (file) => scanInstalledSkillFile(file, boot.triageProvider), - onUnavailable: (replacement, name, reason) => { - logToFile( - `[orchestrator] repackaged skill ${replacement.id} unavailable for ${name}: ${reason}`, - ); - analytics.wizardCapture('orchestrator repackaged skill unavailable', { - skill: replacement.id, - replaces: name, - reason: reason.slice(0, 200), - framework, - }); - }, - }) - : () => Promise.resolve(undefined); + // A skill written once for every framework is completed from the run's pack before a task reads it. + const installCompletedSkill = repackagedSkillInstaller({ + installDir: input.installDir, + skillsRoot: taskSkillsRoot, + // The run's cache is the wizard's own, so a folder an earlier run left there is replaced. + ownsSkillsRoot: true, + referencePath: referenceInstallPath, + install: (skillId, dir) => + installSkillById(skillId, dir, boot.skillsBaseUrl, { + skillsRoot: 'skill', + scan: (scanned) => scanInstalledSkill(scanned, boot.triageProvider), + }), + scanFile: (file) => scanInstalledSkillFile(file, boot.triageProvider), + onUnavailable: (skill, reason) => + reportSkillUnavailable(skill, reason, framework), + }); // Task agents can install durable skills mid-run (load_skill), and only the // framework reference docs earn a place — snapshot what was already there so // the sweeps remove exactly what this run added. @@ -1399,17 +1376,11 @@ async function executeOrchestrator( const skillPaths: string[] = []; for (const skillId of resolved.skills) { if (signal?.aborted) return; - const repackaged = await installRepackagedSkill(skillId); - if (signal?.aborted) return; - if (repackaged) { - skillPaths.push(path.join(repackaged, 'SKILL.md')); - continue; - } - // Agent prompts name the bare step-skill (`integration-v2-install`); - // SDK-divergent steps ship per-framework variants, so resolve against - // the menu with the session's framework before installing. - const variantId = pickSkillId(skillId); - if (!variantId) { + // A prompt names a skill by menu id or by family; a family resolves + // against the menu with the run's match keys before installing. + const picked = pickSkillEntry(skillId); + const variantId = picked?.id; + if (!picked || !variantId) { logToFile( `[orchestrator] no skill variant type=${ task.type @@ -1417,6 +1388,25 @@ async function executeOrchestrator( ); continue; } + const { frameworkReferences } = picked; + if (frameworkReferences) { + // A task without its instructions must fail here, not run blind. + const completed = await installCompletedSkill({ + ...picked, + frameworkReferences, + }).catch((error: unknown) => { + throw new Error( + `Skill "${variantId}" for task "${ + task.type + }" could not be completed from the framework's pack (${ + error instanceof Error ? error.message : String(error) + }).`, + ); + }); + if (signal?.aborted) return; + skillPaths.push(path.join(completed, 'SKILL.md')); + continue; + } const result = await installSkillById( variantId, input.installDir, diff --git a/src/agent/runner/sequence/orchestrator/repackaged-skills.ts b/src/agent/runner/sequence/orchestrator/repackaged-skills.ts index f0654c09d..3293a6023 100644 --- a/src/agent/runner/sequence/orchestrator/repackaged-skills.ts +++ b/src/agent/runner/sequence/orchestrator/repackaged-skills.ts @@ -1,95 +1,243 @@ -/** Installs the skill that stands in for the one a task's prompt names; the sequence README's `wizard-agent-dag-skills` passage has the rule. */ +/** Installs a step skill written once for every framework and completes it from the framework's pack; the sequence README's step skills passage has the rule. */ +import fs from 'fs'; +import os from 'os'; import path from 'path'; +import { completeSkillFromPack, skillFolder } from '@shared/skill-composition'; import { - completeSkillFromPack, - removeSkillFolder, -} from '@shared/skill-composition'; -import type { InstallSkillResult } from '@shared/skill-install'; -import type { SkillEntry } from '@shared/skill-menu'; -import { resolveReplacement } from '@shared/skill-resolution'; + WIZARD_MARKER, + installSkillById, + type InstallSkillResult, + type SkillScanner, +} from '@shared/skill-install'; +import { fetchSkillMenu, type SkillEntry } from '@shared/skill-menu'; +import { + FRAMEWORK_KEY, + resolveSkill, + type MatchKeys, +} from '@shared/skill-resolution'; +import { analytics } from '@utils/analytics'; +import { logToFile } from '@utils/debug'; const SKILL_FILE = 'SKILL.md'; +/** The skill family whose pick for a run is its framework's pack, which the menu ids as `integration-`. */ +export const FRAMEWORK_PACK_FAMILY = 'integration'; + +/** Where a tool call installs a skill, relative to the install directory. */ +const TOOL_SKILLS_ROOT = path.join('.claude', 'skills'); + +/** Where a skill unpacks inside the temp folder it is built in. */ +const STAGE_ROOT = 'skill'; + /** What one run gives the installer. */ export type RepackagedSkillRun = { - /** The menu's entries; a name's replacement is the entry whose `replaces` is that name. */ - entries: readonly SkillEntry[]; installDir: string; /** Where task skills install, relative to `installDir`. */ skillsRoot: string; - /** The framework's reference skill, relative to `installDir`; undefined when the run has none. */ + /** Whether every folder under `skillsRoot` is the wizard's own, so one already there may be replaced. */ + ownsSkillsRoot: boolean; + /** The framework's reference skill, relative to `installDir` or absolute; undefined when the run has none. */ referencePath: string | undefined; - /** Installs a menu skill under `skillsRoot`. */ - install: (skillId: string) => Promise; + /** Installs a menu skill under `dir`; an `ok` result's path is relative to `dir`. */ + install: (skillId: string, dir: string) => Promise; /** Scans one file; a string is the reason the file is refused. */ scanFile: (file: string) => Promise; - /** Called once for a replacement the run cannot use, before the task reads the skill its prompt names. */ - onUnavailable: ( - replacement: SkillEntry, - name: string, - reason: string, - ) => void; + /** Called once for a skill the run cannot complete, before every task that waits on it fails. */ + onUnavailable: (skill: SkillEntry, reason: string) => void; }; const message = (error: unknown): string => error instanceof Error ? error.message : String(error); -/** Install a replacement and complete it from the framework's pack; throws the reason when the run cannot use it. */ -async function installReplacement( - replacement: SkillEntry, - run: RepackagedSkillRun, -): Promise { - const product = replacement.frameworkReferences; - if (product && !run.referencePath) throw new Error('no framework pack'); - const skillsDir = path.join(run.installDir, run.skillsRoot); - // A folder an earlier run left behind would pass its old pages off as the skill's own. - removeSkillFolder(skillsDir, replacement.id, run.installDir); - const result = await run.install(replacement.id); - if (result.kind !== 'ok') throw new Error(result.kind); - if (!product || !run.referencePath) return result.path; - - const completed = path.join(run.installDir, result.path); - completeSkillFromPack( - completed, - path.join(run.installDir, run.referencePath), - product, +/** Why an install did not end `ok`, with the detail a failed download carries. */ +const installFailure = ( + result: Exclude, +): string => + result.kind === 'download-failed' + ? `${result.kind}: ${result.message}` + : result.kind; + +/** The folder a completed skill lands in; throws when one the wizard did not install is already there. */ +function landingFolder(skill: SkillEntry, run: RepackagedSkillRun): string { + const target = skillFolder( + path.join(run.installDir, run.skillsRoot), + skill.id, run.installDir, ); - // Completing rewrites SKILL.md, the one file no install scan has read. - const verdict = await run - .scanFile(path.join(completed, SKILL_FILE)) - .catch((error: unknown) => `scan failed: ${message(error)}`); - if (verdict) { + const found = fs.lstatSync(target, { throwIfNoEntry: false }); + if (!found || run.ownsSkillsRoot) return target; + const marker = fs.lstatSync(path.join(target, WIZARD_MARKER), { + throwIfNoEntry: false, + }); + if (!found.isDirectory() || !marker?.isFile()) { + throw new Error( + `${run.skillsRoot}/${skill.id} is already there and the wizard did not install it`, + ); + } + return target; +} + +/** Install a skill and complete it from the framework's pack; throws the reason when the run cannot use it. */ +async function installCompleted( + skill: SkillEntry, + product: string, + run: RepackagedSkillRun, +): Promise { + if (!run.referencePath) throw new Error('no framework pack'); + // Checked before anything is fetched, so a skill that cannot land is never downloaded. + landingFolder(skill, run); + // The skill is built outside the project, so an unfinished one never reaches a folder an agent reads. + const stage = fs.mkdtempSync(path.join(os.tmpdir(), 'posthog-wizard-')); + try { + const result = await run.install(skill.id, stage); + if (result.kind !== 'ok') throw new Error(installFailure(result)); + const staged = path.join(stage, result.path); + completeSkillFromPack( + staged, + path.resolve(run.installDir, run.referencePath), + product, + stage, + ); + // Completing rewrites SKILL.md, the one file no install scan has read. + const verdict = await run + .scanFile(path.join(staged, SKILL_FILE)) + .catch((error: unknown) => `scan failed: ${message(error)}`); + if (verdict) throw new Error(verdict); + + // Checked again, since the install took time, then replaced whole so no earlier page survives. + const target = landingFolder(skill, run); + fs.rmSync(target, { recursive: true, force: true }); + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.cpSync(staged, target, { recursive: true }); + fs.writeFileSync(path.join(target, WIZARD_MARKER), ''); + } finally { try { - removeSkillFolder(skillsDir, replacement.id, run.installDir); + fs.rmSync(stage, { recursive: true, force: true }); } catch { - // The task reads the skill its prompt names either way. + // A temp folder that will not delete is the system's to clear. } - throw new Error(verdict); } - return result.path; + return `${run.skillsRoot}/${skill.id}`; } -/** The installer for one run: the installed path of the skill that stands in for a name, or undefined to read the skill the prompt names. */ +/** The installer for one run: the installed path of a skill whose menu entry has `frameworkReferences`, completed from the framework's pack. It rejects with the reason when the run cannot complete the skill. */ export function repackagedSkillInstaller( run: RepackagedSkillRun, -): (name: string) => Promise { - // A replacement installs once a run, so no task reads one that another is still completing. - const installs = new Map>(); - return (name) => { - const replacement = resolveReplacement(run.entries, name); - if (!replacement) return Promise.resolve(undefined); - const started = installs.get(replacement.id); +): (skill: SkillEntry & { frameworkReferences: string }) => Promise { + // A skill installs once a run, so no task reads one that another is still completing. + const installs = new Map>(); + return (skill) => { + const started = installs.get(skill.id); if (started) return started; - // Any failure, a thrown one included, sends every task that waits on it to the skill its prompt names. - const install = installReplacement(replacement, run).catch( - (error: unknown) => { - run.onUnavailable(replacement, name, message(error)); - return undefined; - }, - ); - installs.set(replacement.id, install); + // Any failure, a thrown one included, is reported once and fails every task that waits on it. + const install = Promise.resolve() + .then(() => installCompleted(skill, skill.frameworkReferences, run)) + .catch((error: unknown) => { + run.onUnavailable(skill, message(error)); + throw error instanceof Error ? error : new Error(message(error)); + }); + installs.set(skill.id, install); return install; }; } + +/** What a tool call gives `installToolSkill`. */ +export type ToolSkillInstall = { + installDir: string; + skillsBaseUrl: string; + /** The run's match keys, which pick the framework's pack. */ + matchKeys: MatchKeys; + /** Scans an installed skill folder; a string is the reason it is refused. */ + scan: SkillScanner; + /** Scans one file; a string is the reason the file is refused. */ + scanFile: (file: string) => Promise; +}; + +/** Report a skill the run could not complete from the framework's pack. */ +export function reportSkillUnavailable( + skill: SkillEntry, + reason: string, + framework: string | undefined, +): void { + logToFile(`[skills] ${skill.id} could not be completed: ${reason}`); + analytics.wizardCapture('orchestrator repackaged skill unavailable', { + skill: skill.id, + reason: reason.slice(0, 200), + framework, + }); +} + +/** What a tool tells its agent about an `incomplete` result. */ +export const incompleteSkillMessage = ( + skillId: string, + reason: string, +): string => + `Error installing skill "${skillId}": it is completed from the project's framework pack, and that failed (${reason}).`; + +/** `incomplete`: the skill is completed from the framework's pack, and the run could not complete it. */ +export type ToolSkillResult = + | InstallSkillResult + | { kind: 'incomplete'; skillId: string; reason: string }; + +/** Install the menu skill `skillId` for a tool call: as published, or completed from the framework's pack when its entry has `frameworkReferences`. */ +export async function installToolSkill( + skillId: string, + run: ToolSkillInstall, +): Promise { + const menu = await fetchSkillMenu(run.skillsBaseUrl); + if (!menu) return { kind: 'menu-fetch-failed' }; + const entries = Object.values(menu.categories).flat(); + const skill = entries.find((entry) => entry.id === skillId); + if (!skill) return { kind: 'skill-not-found', skillId }; + const install = (id: string, installDir = run.installDir, root?: string) => + installSkillById(id, installDir, run.skillsBaseUrl, { + skillsRoot: root, + scan: run.scan, + }); + const { frameworkReferences } = skill; + if (!frameworkReferences) return install(skill.id); + const onUnavailable = (unavailable: SkillEntry, reason: string) => + reportSkillUnavailable( + unavailable, + reason, + run.matchKeys[FRAMEWORK_KEY]?.[0], + ); + + // The pack is read once and thrown away, so it never lands in the project. + let scratch: string | undefined; + try { + scratch = fs.mkdtempSync(path.join(os.tmpdir(), 'posthog-wizard-')); + const pack = resolveSkill(entries, FRAMEWORK_PACK_FAMILY, run.matchKeys); + const packInstall = pack && (await install(pack.id, scratch, 'pack')); + if (packInstall && packInstall.kind !== 'ok') { + const reason = `the framework pack did not install: ${installFailure( + packInstall, + )}`; + onUnavailable(skill, reason); + return { kind: 'incomplete', skillId, reason }; + } + const complete = repackagedSkillInstaller({ + installDir: run.installDir, + skillsRoot: TOOL_SKILLS_ROOT, + // `.claude/skills` is the project's, so a folder there is replaced only when the wizard installed it. + ownsSkillsRoot: false, + referencePath: packInstall && path.join(scratch, packInstall.path), + install: (id, dir) => install(id, dir, STAGE_ROOT), + scanFile: run.scanFile, + onUnavailable, + }); + return { + kind: 'ok', + path: await complete({ ...skill, frameworkReferences }), + }; + } catch (error) { + return { kind: 'incomplete', skillId, reason: message(error) }; + } finally { + try { + if (scratch) fs.rmSync(scratch, { recursive: true, force: true }); + } catch { + // A scratch folder that will not delete does not change what was installed. + } + } +} diff --git a/src/agent/runner/shared/bootstrap.ts b/src/agent/runner/shared/bootstrap.ts index 6cbd7e611..b41559edb 100644 --- a/src/agent/runner/shared/bootstrap.ts +++ b/src/agent/runner/shared/bootstrap.ts @@ -16,6 +16,7 @@ import { CallType, IS_DEV } from '@shared/constants'; import { VERSION } from '@shared/version'; import { mcpUrlFor } from '@shared/host-resolution'; import type { WizardRunOptions } from '@utils/types'; +import { runMatchKeys } from './match-keys'; import type { BootstrapResult, ResolvedRunConfig, RunInput } from './types'; // ── Helpers ────────────────────────────────────────────────────────── @@ -84,6 +85,7 @@ export async function prepareRun( wizardFlagPayloads, wizardMetadata, project: input.project, + matchKeys: () => runMatchKeys(config, input), // Resolved once, here: the only place holding both the run-level harness // and the gateway auth. Every skill install downstream reads it off boot. triageProvider: createTriageLLMProvider(async () => { diff --git a/src/agent/runner/shared/match-keys.ts b/src/agent/runner/shared/match-keys.ts new file mode 100644 index 000000000..41883424c --- /dev/null +++ b/src/agent/runner/shared/match-keys.ts @@ -0,0 +1,22 @@ +/** The match keys one run picks skills with. */ +import { FRAMEWORK_KEY, type MatchKeys } from '@shared/skill-resolution'; +import type { ResolvedRunConfig, RunInput } from './types'; + +/** The framework a run resolves skills for: the detected one, else the run's skill id, which a caller may set to the framework label. */ +export function runFramework( + input: Pick, +): string | undefined { + return input.integration ?? input.skillId ?? undefined; +} + +/** The project's traits as match keys, with the run's framework as the `framework` key. */ +export function runMatchKeys( + config: Pick, + input: Pick, +): MatchKeys { + const framework = runFramework(input); + return { + ...config.matchKeys?.(), + [FRAMEWORK_KEY]: framework ? [framework] : undefined, + }; +} diff --git a/src/agent/runner/shared/types.ts b/src/agent/runner/shared/types.ts index f39501fef..39faf78f2 100644 --- a/src/agent/runner/shared/types.ts +++ b/src/agent/runner/shared/types.ts @@ -293,6 +293,8 @@ export interface BootstrapResult { project: ApiProject | null; /** Scan-triage classifier on this run's harness. Undefined → skill scans fail closed. */ triageProvider: LLMProvider | undefined; + /** The run's match keys, read when a tool installs a skill completed from the framework's pack. */ + matchKeys: () => MatchKeys; } /** diff --git a/src/agent/runner/switchboard/flags/__tests__/flags.test.ts b/src/agent/runner/switchboard/flags/__tests__/flags.test.ts index 74952a421..0593d1622 100644 --- a/src/agent/runner/switchboard/flags/__tests__/flags.test.ts +++ b/src/agent/runner/switchboard/flags/__tests__/flags.test.ts @@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { join, dirname } from 'node:path'; -import { afterEach, describe, it, expect, vi } from 'vitest'; +import { describe, it, expect, vi } from 'vitest'; import * as constants from '@shared/constants'; import { DEFAULT_AGENT_MODEL, @@ -10,19 +10,13 @@ import { GPT5_6_TERRA_MODEL, Harness, Sequence, - WIZARD_AGENT_DAG_SKILLS_FLAG_KEY, WIZARD_ORCHESTRATOR_FLAG_KEY, WIZARD_ORCHESTRATOR_OVERRIDE_FLAG_KEY, WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, } from '@shared/constants'; -import { - initContextMillVersion, - resetContextMillVersion, -} from '@shared/context-mill-version'; import { areSeededTasksEnabled, DEFAULT_BINDING, - isAgentDagSkillsEnabled, resolveBinding, resolveStageOverrides, type SwitchboardCtx, @@ -383,22 +377,3 @@ describe('areSeededTasksEnabled', () => { expect(areSeededTasksEnabled()).toBe(false); }); }); - -describe('isAgentDagSkillsEnabled', () => { - afterEach(() => resetContextMillVersion()); - - it("only literal 'true' enables the repackaged skills", () => { - const key = WIZARD_AGENT_DAG_SKILLS_FLAG_KEY; - expect(isAgentDagSkillsEnabled({ [key]: 'true' })).toBe(true); - expect(isAgentDagSkillsEnabled({ [key]: 'false' })).toBe(false); - expect(isAgentDagSkillsEnabled({})).toBe(false); - expect(isAgentDagSkillsEnabled()).toBe(false); - }); - - it('a run pinned to a context-mill release never reads them', () => { - initContextMillVersion('1.59.0'); - expect( - isAgentDagSkillsEnabled({ [WIZARD_AGENT_DAG_SKILLS_FLAG_KEY]: 'true' }), - ).toBe(false); - }); -}); diff --git a/src/agent/runner/switchboard/flags/agent-dag.ts b/src/agent/runner/switchboard/flags/agent-dag.ts deleted file mode 100644 index c50dfc826..000000000 --- a/src/agent/runner/switchboard/flags/agent-dag.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** The agent DAG switch: one boolean flag for the orchestrator's repackaged skills. */ -import { WIZARD_AGENT_DAG_SKILLS_FLAG_KEY } from '@shared/constants'; -import { getContextMillVersion } from '@shared/context-mill-version'; - -/** Whether tasks read the repackaged step skills, which a run pinned to a context-mill release never does. */ -export function isAgentDagSkillsEnabled( - flags: Record = {}, -): boolean { - if (getContextMillVersion()) return false; - return flags[WIZARD_AGENT_DAG_SKILLS_FLAG_KEY] === 'true'; -} diff --git a/src/agent/runner/switchboard/flags/index.ts b/src/agent/runner/switchboard/flags/index.ts index 7795ec7b1..3d9d4b9da 100644 --- a/src/agent/runner/switchboard/flags/index.ts +++ b/src/agent/runner/switchboard/flags/index.ts @@ -74,7 +74,6 @@ export function resolveStageOverrides( } export { isOrchestratorEnabled, areSeededTasksEnabled } from './orchestrator'; -export { isAgentDagSkillsEnabled } from './agent-dag'; export type { ConfigFlag, FlagRoute, diff --git a/src/agent/runner/switchboard/index.ts b/src/agent/runner/switchboard/index.ts index 13875b0e5..5eccdf41f 100644 --- a/src/agent/runner/switchboard/index.ts +++ b/src/agent/runner/switchboard/index.ts @@ -143,6 +143,5 @@ export { export { isOrchestratorEnabled, areSeededTasksEnabled, - isAgentDagSkillsEnabled, resolveStageOverrides, } from './flags'; diff --git a/src/agent/tools/mcp.ts b/src/agent/tools/mcp.ts index a409dce75..696d8da75 100644 --- a/src/agent/tools/mcp.ts +++ b/src/agent/tools/mcp.ts @@ -28,14 +28,18 @@ import { publishHandoff, } from './handoff'; import { createSecretVault, type SecretVault } from '@shared/secret-vault'; -import { downloadSkill } from '@shared/skill-install'; import type { ProgressEmitter } from '../progress'; import { buildOrchestratorTools, type OrchestratorToolsContext, } from '../runner/sequence/orchestrator/queue-tools'; import type { LLMProvider } from '@posthog/warlock'; -import { scanInstalledSkill } from '../yara-hooks'; +import { scanInstalledSkill, scanInstalledSkillFile } from '../yara-hooks'; +import { + incompleteSkillMessage, + installToolSkill, +} from '../runner/sequence/orchestrator/repackaged-skills'; +import type { MatchKeys } from '@shared/skill-resolution'; import { ASK_MAX_QUESTIONS_PER_CALL, DEFAULT_ASK_MAX_QUESTIONS, @@ -150,6 +154,9 @@ export interface WizardToolsOptions { /** Scan-triage classifier for install_skill's scan, resolved by the caller. */ triageProvider: LLMProvider; + /** The run's match keys, which pick the framework's pack for a skill `install_skill` completes from it. */ + matchKeys?: () => MatchKeys; + /** Where `publish_handoff` reports. Absent → the handoff is written but reported nowhere. */ emit?: ProgressEmitter; @@ -433,54 +440,66 @@ export async function createWizardToolsServer(options: WizardToolsOptions) { }; } - // Look up download URL from cached menu - const allSkills: SkillEntry[] = Object.values(cachedSkillMenu).flat(); - const skill = allSkills.find((s) => s.id === args.skillId); - if (!skill) { + const result = await installToolSkill(args.skillId, { + installDir: workingDirectory, + skillsBaseUrl, + matchKeys: options.matchKeys?.() ?? {}, + scan: (dir) => scanInstalledSkill(dir, triageProvider), + scanFile: (file) => scanInstalledSkillFile(file, triageProvider), + }); + if (result.kind === 'ok') { return { content: [ { type: 'text' as const, - text: `Error: skill "${args.skillId}" not found. Use load_skill_menu to see available skills.`, + text: `Skill installed to .claude/skills/${args.skillId}/`, }, ], - isError: true, }; } - - const result = await downloadSkill(skill, workingDirectory, { - scan: (dir) => scanInstalledSkill(dir, triageProvider), - }); - if (result.success) { + if (result.kind === 'skill-not-found') { return { content: [ { type: 'text' as const, - text: `Skill installed to .claude/skills/${args.skillId}/`, + text: `Error: skill "${args.skillId}" not found. Use load_skill_menu to see available skills.`, }, ], + isError: true, }; - } else { - // The agent only sees a tool-result string — report the failure too. - analytics.captureException( - new Error('Skill install failed: download-failed'), - { - source: 'install_skill_tool', - skill_id: args.skillId, - error_detail: String(result.error).slice(0, 500), - platform: process.platform, - }, - ); + } + if (result.kind === 'incomplete') { return { content: [ { type: 'text' as const, - text: `Error installing skill: ${result.error}`, + text: incompleteSkillMessage(args.skillId, result.reason), }, ], isError: true, }; } + const detail = + result.kind === 'download-failed' ? result.message : result.kind; + // The agent only sees a tool-result string — report the failure too. + analytics.captureException( + new Error(`Skill install failed: ${result.kind}`), + { + source: 'install_skill_tool', + skill_id: args.skillId, + error_detail: String(detail).slice(0, 500), + platform: process.platform, + }, + ); + return { + content: [ + { + type: 'text' as const, + text: `Error installing skill: ${detail}`, + }, + ], + isError: true, + }; }, ); diff --git a/src/cli/__tests__/cli.test.ts b/src/cli/__tests__/cli.test.ts index f6c6b0de9..f4f1ba866 100644 --- a/src/cli/__tests__/cli.test.ts +++ b/src/cli/__tests__/cli.test.ts @@ -305,7 +305,7 @@ describe('CLI argument parsing', () => { describe('--context-mill-version', () => { const PINNED = - 'https://github.com/PostHog/context-mill/releases/download/v1.59.0'; + 'https://github.com/PostHog/context-mill/releases/download/v1.66.0'; async function skillsBaseUrl(): Promise { const { getSkillsBaseUrl } = await import('@shared/constants'); @@ -313,14 +313,14 @@ describe('CLI argument parsing', () => { } test('pins the skills origin to the release', async () => { - await runCLI(['--context-mill-version', '1.59.0']); + await runCLI(['--context-mill-version', '1.66.0']); expect(mockRunTuiCli).toHaveBeenCalled(); expect(await skillsBaseUrl()).toBe(PINNED); }); // The cloud runner configures a run through the sandbox environment. test('resolves POSTHOG_WIZARD_CONTEXT_MILL_VERSION from the environment', async () => { - process.env.POSTHOG_WIZARD_CONTEXT_MILL_VERSION = 'v1.59.0'; + process.env.POSTHOG_WIZARD_CONTEXT_MILL_VERSION = 'v1.66.0'; await runCLI([]); expect(mockRunTuiCli).toHaveBeenCalled(); expect(await skillsBaseUrl()).toBe(PINNED); @@ -333,7 +333,7 @@ describe('CLI argument parsing', () => { }); test('rejects a pin combined with a local context-mill', async () => { - await runCLI(['--context-mill-version', '1.59.0', '--local-dev']); + await runCLI(['--context-mill-version', '1.66.0', '--local-dev']); expect(process.exit).toHaveBeenCalledWith(1); }); }); diff --git a/src/cli/commands/error-tracking.ts b/src/cli/commands/error-tracking.ts index 898066c66..63bd8c541 100644 --- a/src/cli/commands/error-tracking.ts +++ b/src/cli/commands/error-tracking.ts @@ -8,8 +8,8 @@ import { nativeCommandFactory } from './factories/native-command-factory'; * * Wires up exception capture and — where the platform needs it — source-map / * debug-symbol upload. Runs the `error-tracking` orchestrator flow, which - * reuses the integration-v2 install/init mini-agents when the repo has no - * PostHog integration yet, so it works on uninstrumented projects too. + * installs and initializes the SDK first when the repo has no PostHog + * integration yet, so it works on uninstrumented projects too. */ export const errorTrackingCommand: Command = nativeCommandFactory(errorTrackingConfig); diff --git a/src/cli/commands/replay-vision.ts b/src/cli/commands/replay-vision.ts index 05faae0dc..50dd4dace 100644 --- a/src/cli/commands/replay-vision.ts +++ b/src/cli/commands/replay-vision.ts @@ -8,8 +8,8 @@ import { nativeCommandFactory } from './factories/native-command-factory'; * * Enables session replay recording and creates vision scanners tailored to * the product's key flows. Runs the `replay-vision` orchestrator flow, which - * reuses the integration-v2 install/init mini-agents when the repo has no - * PostHog integration yet. + * installs and initializes the SDK first when the repo has no PostHog + * integration yet. */ export const replayVisionCommand: Command = nativeCommandFactory(replayVisionConfig); diff --git a/src/cli/wizard.ts b/src/cli/wizard.ts index 6cca3f41c..1701586df 100644 --- a/src/cli/wizard.ts +++ b/src/cli/wizard.ts @@ -82,7 +82,7 @@ export const GLOBAL_OPTIONS = { }, 'context-mill-version': { describe: - 'Fetch skills from this context-mill release (e.g. 1.59.0) instead of the latest\nenv: POSTHOG_WIZARD_CONTEXT_MILL_VERSION', + 'Fetch skills from this context-mill release (e.g. 1.66.0) instead of the latest\nenv: POSTHOG_WIZARD_CONTEXT_MILL_VERSION', type: 'string' as const, coerce: parseContextMillVersion, hidden: true, diff --git a/src/programs/error-tracking/agent/capture-exceptions.md b/src/programs/error-tracking/agent/capture-exceptions.md index 37040bc0b..ad2740b10 100644 --- a/src/programs/error-tracking/agent/capture-exceptions.md +++ b/src/programs/error-tracking/agent/capture-exceptions.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-sol effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-error-tracking-step, posthog-best-practices] +skills: [integration-error-tracking, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [install, init] diff --git a/src/programs/error-tracking/agent/init.md b/src/programs/error-tracking/agent/init.md index 5b19422af..27835b387 100644 --- a/src/programs/error-tracking/agent/init.md +++ b/src/programs/error-tracking/agent/init.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-init, posthog-best-practices] +skills: [integration-init, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep, Bash, check_env_keys, set_env_values] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/error-tracking/agent/install.md b/src/programs/error-tracking/agent/install.md index 0bb1cb16b..b6188a6a9 100644 --- a/src/programs/error-tracking/agent/install.md +++ b/src/programs/error-tracking/agent/install.md @@ -5,7 +5,7 @@ label: Add the PostHog SDK to the manifest model_pi: openai/gpt-5.6-terra effort_pi: medium model_sdk: claude-haiku-4-5 -skills: [integration-v2-install] +skills: [integration-install] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/error-tracking/index.ts b/src/programs/error-tracking/index.ts index 76e0c41d9..d79612d0e 100644 --- a/src/programs/error-tracking/index.ts +++ b/src/programs/error-tracking/index.ts @@ -88,8 +88,9 @@ async function prepareErrorTrackingRun( const ERROR_TRACKING_PROMPT = `Set up PostHog error tracking end-to-end: 1. If PostHog is not integrated yet, install and initialize the SDK first — - do not abort. Pick the matching variant from the skill menu's - "integration-v2/install" and "integration-v2/init" categories. + do not abort. Install the "integration-install" skill, then the + "integration-init" skill (the skill menu's "integration/install" and + "integration/init" categories), and follow each. 2. Wire up exception capture: install the "error-tracking" skill variant that matches this project's platform (\`load_skill_menu\` with @@ -134,10 +135,11 @@ const ERROR_TRACKING_RUN: ProgramRun = { * `wizard error-tracking` — flat command on the orchestrator sequence. * * Makes uncaught errors reach PostHog with readable stack traces. The - * orchestrator runs the `error-tracking` agent flow (context-mill - * `context/agents/error-tracking`): the seed enqueues the install/init tasks - * (sharing integration-v2's step-skills, like replay-vision) when the project - * has no PostHog yet, then exception capture, then — when the platform needs + * orchestrator runs the `error-tracking` agent flow, the prompts in this + * program's `agent/` folder: the seed enqueues the install/init tasks (on the + * `integration-install` and `integration-init` step skills, like + * replay-vision) when the project has no PostHog yet, then exception capture, + * then — when the platform needs * it — the source-map subgraph adapted from the standalone * `upload-source-maps` flow, or, on Python, Ruby and PHP, the `link-releases` * task that resolves a release in the production deploy. diff --git a/src/programs/feature-flags/agent/create-flag.md b/src/programs/feature-flags/agent/create-flag.md index 04bbefd39..0aac8651f 100644 --- a/src/programs/feature-flags/agent/create-flag.md +++ b/src/programs/feature-flags/agent/create-flag.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-mcp] +skills: [integration-mcp] allowedTools: [Read, posthog_exec] disallowedTools: [Write, Edit, Bash, enqueue_task] dependsOn: [] diff --git a/src/programs/feature-flags/agent/evaluate.md b/src/programs/feature-flags/agent/evaluate.md index 83aab53f1..83a2f4d37 100644 --- a/src/programs/feature-flags/agent/evaluate.md +++ b/src/programs/feature-flags/agent/evaluate.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-sol effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-feature-flags-step] +skills: [integration-feature-flags] allowedTools: [Read, Write, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/feature-flags/agent/init.md b/src/programs/feature-flags/agent/init.md index 516bdbd6c..40208fb9e 100644 --- a/src/programs/feature-flags/agent/init.md +++ b/src/programs/feature-flags/agent/init.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-init, posthog-best-practices] +skills: [integration-init, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep, check_env_keys, set_env_values] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/feature-flags/agent/install.md b/src/programs/feature-flags/agent/install.md index 950dd81f7..105709d5f 100644 --- a/src/programs/feature-flags/agent/install.md +++ b/src/programs/feature-flags/agent/install.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-install] +skills: [integration-install] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/feature-flags/agent/report.md b/src/programs/feature-flags/agent/report.md index 340ed97d2..1f6cfcd0b 100644 --- a/src/programs/feature-flags/agent/report.md +++ b/src/programs/feature-flags/agent/report.md @@ -7,7 +7,7 @@ model_pi: openai/gpt-5.6-sol effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-notebook, integration-v2-mcp] +skills: [integration-notebook, integration-mcp] allowedTools: [Read, Glob, Grep, posthog_exec] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/feature-flags/index.ts b/src/programs/feature-flags/index.ts index b544b974b..302f2cc5b 100644 --- a/src/programs/feature-flags/index.ts +++ b/src/programs/feature-flags/index.ts @@ -23,7 +23,7 @@ import { FEATURE_FLAGS_SCOPE_ADDITIONS } from './scopes.js'; const FEATURE_FLAGS_REPORT_FILE = 'posthog-feature-flags-report.md'; const FEATURE_FLAGS_DOCS_URL = 'https://posthog.com/docs/feature-flags'; -export const FEATURE_FLAGS_STEP_SKILL_ID = 'integration-v2-feature-flags-step'; +export const FEATURE_FLAGS_STEP_SKILL_ID = 'integration-feature-flags'; /** KMP skill variants carry no `framework` tag, so orchestrator preflight aborts every KMP run. */ export const FEATURE_FLAGS_UNSUPPORTED: ReadonlySet = new Set([ diff --git a/src/programs/metrics/agent/report.md b/src/programs/metrics/agent/report.md index d1b5362cf..fc40c6eb4 100644 --- a/src/programs/metrics/agent/report.md +++ b/src/programs/metrics/agent/report.md @@ -7,7 +7,7 @@ model_pi: openai/gpt-5.6-luna effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-notebook] +skills: [integration-notebook] allowedTools: [Read, Glob, Grep, posthog_exec] disallowedTools: [enqueue_task] dependsOn: [instrument-metrics] diff --git a/src/programs/metrics/index.ts b/src/programs/metrics/index.ts index 2a8aa26cc..482ca4347 100644 --- a/src/programs/metrics/index.ts +++ b/src/programs/metrics/index.ts @@ -25,7 +25,7 @@ export const config: ProgramConfig = { harness: Harness.pi, model: DEFAULT_AGENT_MODEL, }, - // Orchestrator flow (context-mill `context/agents/metrics`): the seed queues + // Orchestrator flow (the prompts in this program's `agent/` folder): the seed queues // verify-sdk → instrument-metrics → report; the tasks install the matching // platform variant themselves. Explicit so renaming the program can't // silently detach the flow. diff --git a/src/programs/posthog-integration/agent/capture.md b/src/programs/posthog-integration/agent/capture.md index d544ce500..5a39f94f6 100644 --- a/src/programs/posthog-integration/agent/capture.md +++ b/src/programs/posthog-integration/agent/capture.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-capture, posthog-best-practices] +skills: [integration-capture, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [install, init, identify, mcp-analytics] diff --git a/src/programs/posthog-integration/agent/dashboard.md b/src/programs/posthog-integration/agent/dashboard.md index a5f99df09..eafb1226b 100644 --- a/src/programs/posthog-integration/agent/dashboard.md +++ b/src/programs/posthog-integration/agent/dashboard.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-dashboard, integration-v2-insight, integration-v2-mcp] +skills: [integration-dashboard, integration-insight, integration-mcp] allowedTools: [Read, Glob, Grep, posthog_exec] disallowedTools: [Write, Edit, Bash, enqueue_task] dependsOn: [capture, mcp-analytics] diff --git a/src/programs/posthog-integration/agent/error-tracking.md b/src/programs/posthog-integration/agent/error-tracking.md index 340b131b1..348634f65 100644 --- a/src/programs/posthog-integration/agent/error-tracking.md +++ b/src/programs/posthog-integration/agent/error-tracking.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-error-tracking-step, posthog-best-practices] +skills: [integration-error-tracking, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [install, init] diff --git a/src/programs/posthog-integration/agent/identify.md b/src/programs/posthog-integration/agent/identify.md index 249599bb1..42a4d8cb0 100644 --- a/src/programs/posthog-integration/agent/identify.md +++ b/src/programs/posthog-integration/agent/identify.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-identify, posthog-best-practices] +skills: [integration-identify, posthog-best-practices] allowedTools: [Read, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [install, init] diff --git a/src/programs/posthog-integration/agent/init.md b/src/programs/posthog-integration/agent/init.md index 9a920e455..52cac00f2 100644 --- a/src/programs/posthog-integration/agent/init.md +++ b/src/programs/posthog-integration/agent/init.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-init, posthog-best-practices] +skills: [integration-init, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/posthog-integration/agent/install.md b/src/programs/posthog-integration/agent/install.md index ed786b96e..1fce587a0 100644 --- a/src/programs/posthog-integration/agent/install.md +++ b/src/programs/posthog-integration/agent/install.md @@ -5,7 +5,7 @@ label: Add the PostHog SDK to the manifest model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-haiku-4-5 -skills: [integration-v2-install] +skills: [integration-install] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/posthog-integration/agent/report.md b/src/programs/posthog-integration/agent/report.md index a7dbabba6..4b23013a6 100644 --- a/src/programs/posthog-integration/agent/report.md +++ b/src/programs/posthog-integration/agent/report.md @@ -7,7 +7,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: high -skills: [integration-v2-report, integration-v2-notebook, integration-v2-mcp] +skills: [integration-report, integration-notebook, integration-mcp] allowedTools: [Read, Glob, Grep, posthog_exec] disallowedTools: [enqueue_task] dependsOn: [dashboard, review] diff --git a/src/programs/posthog-integration/agent/review.md b/src/programs/posthog-integration/agent/review.md index e36bef4e9..a9dd2ac64 100644 --- a/src/programs/posthog-integration/agent/review.md +++ b/src/programs/posthog-integration/agent/review.md @@ -8,7 +8,7 @@ model_pi: openai/gpt-5.6-sol effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: high -skills: [posthog-best-practices, integration-v2-build] +skills: [posthog-best-practices, integration-build] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [install, init, identify, mcp-analytics, error-tracking, capture, ai-observability, logs] diff --git a/src/programs/posthog-integration/agent/warehouse.md b/src/programs/posthog-integration/agent/warehouse.md index 9079ae5a4..54768bfe1 100644 --- a/src/programs/posthog-integration/agent/warehouse.md +++ b/src/programs/posthog-integration/agent/warehouse.md @@ -7,7 +7,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: medium model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-warehouse, integration-v2-mcp] +skills: [integration-warehouse, integration-mcp] allowedTools: [Read, Glob, Grep, wizard_ask, posthog_exec] disallowedTools: [Write, Edit, Bash, enqueue_task] dependsOn: [] diff --git a/src/programs/posthog-integration/index.ts b/src/programs/posthog-integration/index.ts index 1138cdd1d..470afb65b 100644 --- a/src/programs/posthog-integration/index.ts +++ b/src/programs/posthog-integration/index.ts @@ -49,7 +49,7 @@ const WAREHOUSE_SOURCES_DOCS_URL = /** Task type of the seeded step below, matched against the drain's result. */ const WAREHOUSE_SEED_TASK_TYPE = 'warehouse'; -/** The context-mill `integration-v2` task that instruments the project's MCP server. */ +/** The `integration-v2` flow's task that instruments the project's MCP server. */ const MCP_ANALYTICS_TASK_TYPE = 'mcp-analytics'; /** Candidate paths the MCP fact names before it summarizes the rest. */ diff --git a/src/programs/replay-vision/agent/enable-replay.md b/src/programs/replay-vision/agent/enable-replay.md index 0ea492cd6..f036a9f97 100644 --- a/src/programs/replay-vision/agent/enable-replay.md +++ b/src/programs/replay-vision/agent/enable-replay.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [replay-vision-enable-replay] +skills: [integration-session-replay] allowedTools: [Read, Edit, Glob, Grep, posthog_exec] disallowedTools: [Write, Bash, enqueue_task] dependsOn: [install, init] diff --git a/src/programs/replay-vision/agent/init.md b/src/programs/replay-vision/agent/init.md index b4c614142..585606b51 100644 --- a/src/programs/replay-vision/agent/init.md +++ b/src/programs/replay-vision/agent/init.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-sonnet-5 effort_sdk: medium -skills: [integration-v2-init, posthog-best-practices] +skills: [integration-init, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/replay-vision/agent/install.md b/src/programs/replay-vision/agent/install.md index 7cbd0230e..09945f0a1 100644 --- a/src/programs/replay-vision/agent/install.md +++ b/src/programs/replay-vision/agent/install.md @@ -5,7 +5,7 @@ label: Add the PostHog SDK to the manifest model_pi: openai/gpt-5.6-terra effort_pi: low model_sdk: claude-haiku-4-5 -skills: [integration-v2-install] +skills: [integration-install] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/replay-vision/index.ts b/src/programs/replay-vision/index.ts index aa52950a3..4b55296c0 100644 --- a/src/programs/replay-vision/index.ts +++ b/src/programs/replay-vision/index.ts @@ -120,15 +120,15 @@ const base = createSkillProgram({ * * Makes session replay record (server toggle + client init check), then * creates vision scanners scoped to the product's key flows, read out of the - * repo. The orchestrator runs the `replay-vision` agent flow (context-mill - * `context/agents/replay-vision`): the seed enqueues the install/init tasks - * (copied from integration-v2, sharing its step-skills) when the project has - * no PostHog yet, so the command works on uninstrumented repos instead of - * aborting. + * repo. The orchestrator runs the `replay-vision` agent flow, the prompts in + * this program's `agent/` folder: the seed enqueues the install/init tasks + * (on the `integration-install` and `integration-init` step skills) when the + * project has no PostHog yet, so the command works on uninstrumented repos + * instead of aborting. * * Departures from a plain `createSkillProgram`: - * - `onReady` detection, so `session.skillId` carries the framework id the - * orchestrator's preflight resolves reference + mini-skill variants with. + * - `onReady` detection, so the session carries the framework the + * orchestrator's preflight resolves the framework pack with. * - `agentFlow` pinned (the id would default to the same value — explicit so * renaming the program can't silently detach the flow). * - `ciPreRun` is the headless equivalent of `onReady`. Both come from the diff --git a/src/programs/support/agent/enable-support.md b/src/programs/support/agent/enable-support.md index 574cfb232..d27cbfdd3 100644 --- a/src/programs/support/agent/enable-support.md +++ b/src/programs/support/agent/enable-support.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-6.1-terra effort_pi: low model_sdk: claude-sonnet-5-5 effort_sdk: medium -skills: [integration-v2-mcp] +skills: [integration-mcp] allowedTools: [Read, posthog_exec] disallowedTools: [Write, Edit, Bash, enqueue_task] dependsOn: [] diff --git a/src/programs/support/agent/identify.md b/src/programs/support/agent/identify.md index 71c7a5b8d..f0d2d22c3 100644 --- a/src/programs/support/agent/identify.md +++ b/src/programs/support/agent/identify.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-6.1-terra effort_pi: medium model_sdk: claude-sonnet-5-5 effort_sdk: high -skills: [integration-v2-identify, posthog-best-practices] +skills: [integration-identify, posthog-best-practices] allowedTools: [Read, Edit, Glob, Grep] disallowedTools: [enqueue_task] dependsOn: [widget] diff --git a/src/programs/support/agent/init.md b/src/programs/support/agent/init.md index 115a6c9a5..ea1e4db14 100644 --- a/src/programs/support/agent/init.md +++ b/src/programs/support/agent/init.md @@ -6,7 +6,7 @@ model_pi: openai/gpt-6.1-terra effort_pi: low model_sdk: claude-sonnet-5-5 effort_sdk: medium -skills: [integration-v2-init, posthog-best-practices] +skills: [integration-init, posthog-best-practices] allowedTools: [Read, Write, Edit, Glob, Grep, check_env_keys, set_env_values] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/support/agent/install.md b/src/programs/support/agent/install.md index d481ce36d..b8f9550de 100644 --- a/src/programs/support/agent/install.md +++ b/src/programs/support/agent/install.md @@ -5,7 +5,7 @@ label: Add posthog-js to the manifest model_pi: openai/gpt-6.1-terra effort_pi: low model_sdk: claude-haiku-4-5 -skills: [integration-v2-install] +skills: [integration-install] allowedTools: [Read, Edit, Glob, Grep, Bash] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/support/agent/report.md b/src/programs/support/agent/report.md index 379ee218b..0ba021bd7 100644 --- a/src/programs/support/agent/report.md +++ b/src/programs/support/agent/report.md @@ -7,7 +7,7 @@ model_pi: openai/gpt-6.1-terra effort_pi: medium model_sdk: claude-sonnet-5-5 effort_sdk: medium -skills: [integration-v2-notebook, integration-v2-mcp] +skills: [integration-notebook, integration-mcp] allowedTools: [Read, Glob, Grep, posthog_exec] disallowedTools: [enqueue_task] dependsOn: [] diff --git a/src/programs/support/index.ts b/src/programs/support/index.ts index 4231462a9..408814dd8 100644 --- a/src/programs/support/index.ts +++ b/src/programs/support/index.ts @@ -90,7 +90,7 @@ function buildSupportNextSteps(credentials: Credentials): { /** * `wizard support` — set up PostHog Support (code name: conversations). * - * Runs the `support` orchestrator flow (context-mill `context/agents/support`): + * Runs the `support` orchestrator flow (the prompts in this program's `agent/` folder): * the seed queues install/init when PostHog is missing, then enables the * product server-side, makes sure the posthog-js init doesn't cancel the * widget, wires identification, and writes the report. diff --git a/src/shared/README.md b/src/shared/README.md index deb25a425..7c9690e7e 100644 --- a/src/shared/README.md +++ b/src/shared/README.md @@ -33,11 +33,14 @@ Modules callers reach most: - `@shared/fetch-retry`: `fetchWithRetry(url, { fetchImpl?, sleepImpl?, maxAttempts? })`, one retry and failover policy for every critical-path fetch. - `@shared/skill-menu`: `fetchSkillMenu(skillsBaseUrl, retryOpts?)` returns the parsed `SkillMenu` or `null`; `expandBundleEntry`, `SkillEntry`, `CliEntry`. - `@shared/skill-resolution`: `resolveSkill(entries, name, matchKeys)` returns the menu skill a name stands for in one run. A menu id is that skill. Any other name is a skill family, an entry's `group`. A `key:value` tag is a match key: it says which projects a skill is written for, and the run supplies its values as `MatchKeys`. Among a family's skills, one whose match key disagrees with the run's value is dropped, one with no `framework` key is dropped, and the rest rank by keys that agree, then the `default` tag, then menu order. A key the run has no value for never disagrees. A run with no `framework` value resolves no family. An entry's `framework` and `default` fields count as tags, so a menu without tags resolves the same. - `resolveReplacement(entries, name)` returns the entry whose `replaces` is that name, the skill that stands in for it. -- `@shared/skill-composition`: `completeSkillFromPack(skillDir, packDir, product, boundaryDir)` completes a step skill written once for every framework from that framework's pack. The pack's `variant.json` lists its rules file and each product's pages. Those files are copied into the skill's `references/`, and in `SKILL.md` `{framework_name}` becomes the pack's name while the `{framework_docs}` and `{framework_rules}` lines become the lines that list them. `composeStepSkill(stepFiles, packFiles, product)` is the same on files in memory. `compareSkillFiles(today, repackaged)` lists what differs between the files a task reads today and the files it reads from a replacement: every file byte for byte, and `SKILL.md` but for the `name` in its frontmatter. `pnpm verify:repackaged-skills` and the recorded pair's test both call it. Both throw when the pack cannot complete the skill, and both refuse a pack page whose path has a part that is not a plain name or that does not end in `.md`: the install scan reads lowercase extensions and skips dotfiles, so such a page would reach a task unscanned. A `variant.json` with no `rules` reads as one with none. `completeSkillFromPack` checks every target before its first write and throws, writing nothing, when a file would leave `boundaryDir` or pass through a link below it: a folder on the way that is a link, or a file that is one. It does not scan what it writes; the caller scans the `SKILL.md` it rewrites. It takes every file in the skill's folder as the skill's own, so the caller empties that folder before it installs the skill: `removeSkillFolder(skillsRoot, id, boundaryDir)` removes the folder of skill `id` under `skillsRoot`, or a link standing there. It refuses an `id` that is not one plain name, since the id comes from the menu, and it reaches `skillsRoot` through no link below `boundaryDir`. +- `@shared/skill-composition`: `completeSkillFromPack(skillDir, packDir, product, boundaryDir)` completes a step skill written once for every framework from that framework's pack. The pack's `variant.json` lists its rules file and each product's pages. Those files are copied into the skill's `references/`, and in `SKILL.md` `{framework_name}` becomes the pack's name while the `{framework_docs}` and `{framework_rules}` lines become the lines that list them. `composeStepSkill(stepFiles, packFiles, product)` is the same on files in memory. Both throw when the pack cannot complete the skill, and both refuse a pack page whose path has a part that is not a plain name or that does not end in `.md`: the install scan reads lowercase extensions and skips dotfiles, so such a page would reach a task unscanned. A `variant.json` with no `rules` reads as one with none. `completeSkillFromPack` checks every target before its first write and throws, writing nothing, when a file would leave `boundaryDir` or pass through a link below it: a folder on the way that is a link, or a file that is one. It does not scan what it writes; the caller scans the `SKILL.md` it rewrites. It takes every file in the skill's folder as the skill's own, so the caller completes a skill in a folder that holds nothing else. `skillFolder(skillsRoot, id, boundaryDir)` is the folder of skill `id` under `skillsRoot`. It refuses an `id` that is not one plain name, since the id comes from the menu, and it reaches `skillsRoot` through no link below `boundaryDir`. - `@shared/skill-install`: `downloadSkill(entry, installDir, options?)` and `installSkillById(skillId, installDir, skillsBaseUrl, options?)` install a - skill into a project; `InstallSkillResult`, `isSkillInstallCommand`. + skill into a project; `InstallSkillResult`, `isSkillInstallCommand`. An + install that fails removes the folder it made and keeps one that was there + first, and an entry whose id is not one plain name is refused before a + folder is made. `WIZARD_MARKER` is the file every installed skill folder + carries. - `@shared/ask-policy`: `shouldDisableAsk(flags)` and `LONGER_ASK_TIMEOUT_MS`, when `wizard_ask` may reach a human and how long an errand question waits. - `@shared/claude-settings`: settings conflict detection, backup and restore. diff --git a/src/shared/__tests__/context-mill-version.test.ts b/src/shared/__tests__/context-mill-version.test.ts index 40c8453cb..a6d2cd651 100644 --- a/src/shared/__tests__/context-mill-version.test.ts +++ b/src/shared/__tests__/context-mill-version.test.ts @@ -16,10 +16,10 @@ import { initLocalDev, resetLocalDev } from '@shared/local-dev'; describe('parseContextMillVersion', () => { it.each([ - ['1.59.0', 'v1.59.0'], - ['v1.59.0', 'v1.59.0'], - [' 1.59.0 ', 'v1.59.0'], - ['1.60.0-rc.1', 'v1.60.0-rc.1'], + ['1.66.0', 'v1.66.0'], + ['v1.66.0', 'v1.66.0'], + [' 1.66.0 ', 'v1.66.0'], + ['1.67.0-rc.1', 'v1.67.0-rc.1'], ])('normalizes %j to the release tag', (raw, tag) => { expect(parseContextMillVersion(raw)).toBe(tag); }); @@ -30,13 +30,13 @@ describe('parseContextMillVersion', () => { // The value becomes a URL path, so nothing but a version may pass. it.each([ - '1.59', + '1.66', 'main', '../../evil', - '1.59.0/../latest', - '1.59.0?x=1', - 'v1.59.0 v1.60.0', - ['1.59.0', '1.60.0'], + '1.66.0/../latest', + '1.66.0?x=1', + 'v1.66.0 v1.67.0', + ['1.66.0', '1.67.0'], ])('rejects %j', (raw) => { expect(() => parseContextMillVersion(raw)).toThrow( /Invalid context-mill version/, @@ -44,6 +44,27 @@ describe('parseContextMillVersion', () => { }); }); +describe('the oldest release a pin may name', () => { + // A prerelease of the oldest release comes before it. + it.each([ + '1.65.0', + 'v1.59.0', + '0.99.0', + '1.65.9-rc.1', + '1.66.0-rc.1', + 'v1.66.0-beta', + ])('refuses %j and names the floor', (raw) => { + expect(() => parseContextMillVersion(raw)).toThrow(/older than 1\.66\.0/); + }); + + it.each(['1.66.0', '1.66.1', '1.66.1-rc.1', '1.100.0', '2.0.0'])( + 'accepts %j', + (raw) => { + expect(parseContextMillVersion(raw)).toBe(`v${raw}`); + }, + ); +}); + describe('getSkillsBaseUrl with a pinned release', () => { afterEach(() => { resetContextMillVersion(); @@ -51,13 +72,13 @@ describe('getSkillsBaseUrl with a pinned release', () => { }); it('fetches the pinned release, with the AWS mirror as its failover', () => { - initContextMillVersion('1.59.0'); - const menuUrl = `${getSkillsBaseUrl()}/agent-menu.json`; + initContextMillVersion('1.66.0'); + const menuUrl = `${getSkillsBaseUrl()}/skill-menu.json`; expect(menuUrl).toBe( - 'https://github.com/PostHog/context-mill/releases/download/v1.59.0/agent-menu.json', + 'https://github.com/PostHog/context-mill/releases/download/v1.66.0/skill-menu.json', ); expect(awsUrlFor(menuUrl)).toBe( - 'https://context-mill.posthog.com/v1.59.0/agent-menu.json', + 'https://context-mill.posthog.com/v1.66.0/skill-menu.json', ); }); @@ -69,7 +90,7 @@ describe('getSkillsBaseUrl with a pinned release', () => { it('keeps a local context-mill ahead of a pin set outside the CLI', () => { initLocalDev({ localContextMill: true }); - initContextMillVersion('1.59.0'); + initContextMillVersion('1.66.0'); expect(getSkillsBaseUrl()).toBe(LOCAL_SKILLS_BASE_URL); }); }); diff --git a/src/shared/__tests__/skill-composition-fixture.test.ts b/src/shared/__tests__/skill-composition-fixture.test.ts index b67bb1ed8..cb8493690 100644 --- a/src/shared/__tests__/skill-composition-fixture.test.ts +++ b/src/shared/__tests__/skill-composition-fixture.test.ts @@ -1,13 +1,9 @@ import * as fs from 'fs'; import * as path from 'path'; import { describe, expect, it } from 'vitest'; -import { - compareSkillFiles, - composeStepSkill, - type SkillFiles, -} from '@shared/skill-composition'; +import { composeStepSkill, type SkillFiles } from '@shared/skill-composition'; -// A pair recorded from a context-mill build: this fill is a copy of context-mill's, and the pair keeps the two in step. +// `completed/` is the skill context-mill itself published for the pair's framework, so this fill is checked against context-mill's own. describe('a recorded context-mill pair', () => { const root = path.resolve( __dirname, @@ -27,11 +23,16 @@ describe('a recorded context-mill pair', () => { }, ), ) as SkillFiles; - it('completes the recorded step from the recorded pack into the skill it replaces', () => { + // The two skills carry different ids, so the frontmatter `name` line is the one line left out. + const unnamed = (files: SkillFiles): SkillFiles => ({ + ...files, + 'SKILL.md': files['SKILL.md'].replace(/^name: .*\n/m, ''), + }); + + it('completes the recorded step from the recorded pack into the skill context-mill published', () => { const pair = JSON.parse( fs.readFileSync(path.join(root, 'pair.json'), 'utf8'), ) as { product: string }; - const original = tree(path.join(root, 'original')); const composed = composeStepSkill( tree(path.join(root, 'step')), @@ -39,7 +40,8 @@ describe('a recorded context-mill pair', () => { pair.product, ); - expect(compareSkillFiles(original, composed)).toEqual([]); - expect(composed['SKILL.md']).not.toBe(original['SKILL.md']); + expect(unnamed(composed)).toEqual( + unnamed(tree(path.join(root, 'completed'))), + ); }); }); diff --git a/src/shared/__tests__/skill-composition.test.ts b/src/shared/__tests__/skill-composition.test.ts index 7e6a54943..8d4b3b43e 100644 --- a/src/shared/__tests__/skill-composition.test.ts +++ b/src/shared/__tests__/skill-composition.test.ts @@ -4,10 +4,9 @@ import * as path from 'path'; import { afterEach, beforeEach, describe, expect, it } from 'vitest'; import { VARIANT_FILE, - compareSkillFiles, completeSkillFromPack, composeStepSkill, - removeSkillFolder, + skillFolder, type SkillFiles, } from '@shared/skill-composition'; @@ -213,73 +212,6 @@ describe('composeStepSkill', () => { ); }); -describe('compareSkillFiles', () => { - const skill = ( - name: string, - body = 'Do the step.', - rest: SkillFiles = {}, - ): SkillFiles => ({ - 'SKILL.md': `---\nname: ${name}\ndescription: A step\n---\n\n${body}\n`, - 'references/page.md': 'a page', - ...rest, - }); - const today = skill('integration-v2-init-nextjs'); - - it('finds nothing between a skill and a replacement that differs only in its name', () => { - expect(compareSkillFiles(today, skill('integration-init'))).toEqual([]); - }); - - it.each([ - [ - 'a different body', - skill('integration-init', 'Do another step.'), - ['SKILL.md reads differently'], - ], - [ - 'a different description', - { - ...skill('integration-init'), - 'SKILL.md': - '---\nname: integration-init\ndescription: Another step\n---\n\nDo the step.\n', - }, - ['SKILL.md frontmatter differs'], - ], - [ - 'a page with other content', - skill('integration-init', undefined, { - 'references/page.md': 'another page', - }), - ['references/page.md differs'], - ], - [ - 'a page too many', - skill('integration-init', undefined, { 'references/extra.md': 'x' }), - ['references/extra.md is new'], - ], - [ - 'a page too few', - { 'SKILL.md': skill('integration-init')['SKILL.md'] }, - ['references/page.md is gone'], - ], - ['no SKILL.md', { 'references/page.md': 'a page' }, ['SKILL.md is gone']], - ])('reports a replacement with %s', (_, repackaged, differences) => { - expect(compareSkillFiles(today, repackaged)).toEqual(differences); - }); - - it('reports every difference, not the first alone', () => { - const repackaged = skill('integration-init', 'Do another step.', { - 'references/page.md': 'another page', - 'references/extra.md': 'x', - }); - - expect(compareSkillFiles(today, repackaged).sort()).toEqual([ - 'SKILL.md reads differently', - 'references/extra.md is new', - 'references/page.md differs', - ]); - }); -}); - describe('completeSkillFromPack', () => { let dir: string; @@ -399,47 +331,30 @@ describe('completeSkillFromPack', () => { expect(read('skill/SKILL.md')).toBe(INIT['SKILL.md']); }); - describe('removeSkillFolder', () => { - it('removes the folder and leaves the rest of the boundary', () => { - removeSkillFolder(dir, 'skill', dir); - - expect(fs.readdirSync(dir)).toEqual(['pack']); + describe('skillFolder', () => { + it('names the folder of a skill under the skills root', () => { + expect(skillFolder(dir, 'skill', dir)).toBe(path.join(dir, 'skill')); }); it.skipIf(process.platform === 'win32')( - 'removes a link standing where the folder goes, and not what it points at', - () => { - fs.symlinkSync(path.join(dir, 'pack'), path.join(dir, 'linked')); - - removeSkillFolder(dir, 'linked', dir); - - expect(fs.readdirSync(dir).sort()).toEqual(['pack', 'skill']); - expect(read('pack/references/next-js.md')).toBe('the library page'); - }, - ); - - it.skipIf(process.platform === 'win32')( - 'removes nothing through a linked folder on the way', + 'names nothing through a linked folder on the way', () => { fs.mkdirSync(path.join(dir, 'outside/skill'), { recursive: true }); fs.symlinkSync(path.join(dir, 'outside'), path.join(dir, 'cache')); expect(() => - removeSkillFolder(path.join(dir, 'cache'), 'skill', dir), + skillFolder(path.join(dir, 'cache'), 'skill', dir), ).toThrow(/through a link/); - expect(fs.existsSync(path.join(dir, 'outside/skill'))).toBe(true); }, ); - // The id comes from the menu, so one that names another folder must remove nothing. + // The id comes from the menu, so one that names another folder is refused. it.each(['../pack', '..', '../../pack', 'a/b', '.hidden', ''])( - 'removes nothing for the id %j', + 'refuses the id %j', (id) => { - expect(() => - removeSkillFolder(path.join(dir, 'skill'), id, dir), - ).toThrow(/unusable skill id/); - expect(fs.readdirSync(dir).sort()).toEqual(['pack', 'skill']); - expect(read('skill/SKILL.md')).toBe(INIT['SKILL.md']); + expect(() => skillFolder(path.join(dir, 'skill'), id, dir)).toThrow( + /unusable skill id/, + ); }, ); }); diff --git a/src/shared/__tests__/skill-install.test.ts b/src/shared/__tests__/skill-install.test.ts index f31c7133b..4ca25996f 100644 --- a/src/shared/__tests__/skill-install.test.ts +++ b/src/shared/__tests__/skill-install.test.ts @@ -441,11 +441,70 @@ describe('downloadSkill (e2e over HTTP)', () => { 'skill install failed', expect.objectContaining({ step: 'scan', skill_id: 'dummy' }), ); + // The files no scan read go with the folder the install made. + expect(fs.existsSync(path.dirname(skillFile()))).toBe(false); } finally { captured.mockRestore(); await server.close(); } }); + + // A menu id names the folder an install writes to. + it.each(['../../outside', '..', 'a/b', '/tmp/x'])( + 'refuses the menu id %j, and fetches and writes nothing', + async (id) => { + let requests = 0; + const server = await startServer((_req, res) => { + requests += 1; + res.writeHead(200, { 'Content-Type': 'application/zip' }); + res.end(Buffer.from(dummyZip())); + }); + + try { + const result = await downloadSkill( + { id, name: 'Dummy', downloadUrl: `${server.baseUrl}/skill.zip` }, + path.join(tmpDir, 'project'), + { scan: clean }, + ); + + expect(result).toEqual({ + success: false, + error: `unusable skill id: ${id}`, + }); + expect(requests).toBe(0); + expect(fs.readdirSync(tmpDir)).toEqual([]); + } finally { + await server.close(); + } + }, + ); + + it('keeps a folder that was there first when the install fails', async () => { + const server = await startServer((_req, res) => { + res.writeHead(404); + res.end(); + }); + const notes = path.join(path.dirname(skillFile()), 'my-notes.md'); + fs.mkdirSync(path.dirname(notes), { recursive: true }); + fs.writeFileSync(notes, 'mine'); + + try { + const result = await downloadSkill( + { + id: 'dummy', + name: 'Dummy', + downloadUrl: `${server.baseUrl}/skill.zip`, + }, + tmpDir, + { scan: clean }, + ); + + expect(result.success).toBe(false); + expect(fs.readFileSync(notes, 'utf8')).toBe('mine'); + } finally { + await server.close(); + } + }); }); describe('removeRunSkills', () => { diff --git a/src/shared/__tests__/skill-resolution.test.ts b/src/shared/__tests__/skill-resolution.test.ts index 03946d92c..6ab2c762b 100644 --- a/src/shared/__tests__/skill-resolution.test.ts +++ b/src/shared/__tests__/skill-resolution.test.ts @@ -1,10 +1,6 @@ import { describe, expect, it } from 'vitest'; import type { SkillEntry } from '@shared/skill-menu'; -import { - resolveReplacement, - resolveSkill, - skillTags, -} from '@shared/skill-resolution'; +import { resolveSkill, skillTags } from '@shared/skill-resolution'; const entry = (id: string, rest: Partial = {}): SkillEntry => ({ id, @@ -121,21 +117,3 @@ describe('resolveSkill', () => { ); }); }); - -describe('resolveReplacement', () => { - const entries = [ - ...MENU, - entry('integration-install', { replaces: 'integration-v2-install' }), - ]; - - it('finds the skill that stands in for a name', () => { - expect(resolveReplacement(entries, 'integration-v2-install')?.id).toBe( - 'integration-install', - ); - }); - - it('finds none for a name nothing replaces, or for the replacement itself', () => { - expect(resolveReplacement(entries, 'integration')).toBeUndefined(); - expect(resolveReplacement(entries, 'integration-install')).toBeUndefined(); - }); -}); diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 77c0e5598..903a5db4d 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -345,8 +345,6 @@ export const WIZARD_DECISIONS_DETECTION_FLAG_KEY = 'wizard-decisions-detection'; /** Boolean flag: true lets the warehouse-destination program run. */ export const WIZARD_WAREHOUSE_DESTINATIONS_FLAG_KEY = 'wizard-warehouse-destinations'; -/** Boolean flag: true has orchestrator tasks read the repackaged step skills; see the sequence README under `wizard-agent-dag-skills`. */ -export const WIZARD_AGENT_DAG_SKILLS_FLAG_KEY = 'wizard-agent-dag-skills'; // Reading a flag enters this run into that flag's experiment, so a closed set — not a // `wizard-` prefix anyone can name into — decides what a run evaluates. Test-pinned exhaustive. export const WIZARD_FLAG_KEYS = [ @@ -360,7 +358,6 @@ export const WIZARD_FLAG_KEYS = [ WIZARD_DEFAULT_MCP_ANALYTICS_FLAG_KEY, WIZARD_DECISIONS_DETECTION_FLAG_KEY, WIZARD_WAREHOUSE_DESTINATIONS_FLAG_KEY, - WIZARD_AGENT_DAG_SKILLS_FLAG_KEY, ] as const; /** User-Agent for wizard HTTP requests and MCP server identification. */ export const WIZARD_USER_AGENT = `posthog/wizard; version: ${VERSION}`; diff --git a/src/shared/context-mill-version.ts b/src/shared/context-mill-version.ts index d8ce6e0f5..3d0673f8a 100644 --- a/src/shared/context-mill-version.ts +++ b/src/shared/context-mill-version.ts @@ -3,10 +3,23 @@ * latest. See docs/local-dev.md#pinning-a-context-mill-release. */ -/** `1.59.0` or `v1.59.0`, with an optional prerelease. */ -const RELEASE_VERSION = /^v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)$/; +/** `1.66.0` or `v1.66.0`, with an optional prerelease. */ +const RELEASE_VERSION = /^v?((\d+)\.(\d+)\.(\d+)(-[0-9A-Za-z.-]+)?)$/; -/** Returns the release tag (`v1.59.0`), or undefined for empty and `latest`; throws on anything else, since the value becomes a URL path. */ +/** The oldest release whose skills the bundled agent prompts name. */ +const CONTEXT_MILL_FLOOR = '1.66.0'; + +const FLOOR_PARTS = CONTEXT_MILL_FLOOR.split('.').map(Number); + +/** Whether a release is older than the floor; a prerelease of the floor comes before it. */ +function belowFloor(parts: readonly number[], prerelease: boolean): boolean { + for (let i = 0; i < FLOOR_PARTS.length; i++) { + if (parts[i] !== FLOOR_PARTS[i]) return parts[i] < FLOOR_PARTS[i]; + } + return prerelease; +} + +/** Returns the release tag (`v1.66.0`), or undefined for empty and `latest`; throws on anything else, since the value becomes a URL path, and on a release older than the floor. */ export function parseContextMillVersion(raw: unknown): string | undefined { if (raw === undefined || raw === null) return undefined; const value = String(raw).trim(); @@ -14,7 +27,13 @@ export function parseContextMillVersion(raw: unknown): string | undefined { const match = RELEASE_VERSION.exec(value); if (!match) { throw new Error( - `Invalid context-mill version "${value}". Use a release version such as 1.59.0, or "latest".`, + `Invalid context-mill version "${value}". Use a release version such as ${CONTEXT_MILL_FLOOR}, or "latest".`, + ); + } + const parts = [Number(match[2]), Number(match[3]), Number(match[4])]; + if (belowFloor(parts, match[5] !== undefined)) { + throw new Error( + `context-mill ${match[1]} is older than ${CONTEXT_MILL_FLOOR}, the oldest release this wizard can read. Use ${CONTEXT_MILL_FLOOR} or later, or "latest".`, ); } return `v${match[1]}`; diff --git a/src/shared/skill-composition.ts b/src/shared/skill-composition.ts index 4adda01af..6a9bfb57a 100644 --- a/src/shared/skill-composition.ts +++ b/src/shared/skill-composition.ts @@ -51,7 +51,7 @@ function parseVariant(text: string): PackVariant { } /** One plain part of a path or one skill id: it starts with a letter or digit and has no separator. */ -const PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/; +export const PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/; /** Where a pack's file lands in the skill: `references/`. A page the install scan would skip is refused: every part is plain and it ends in `.md`. */ function referencePath(file: string): string { @@ -124,47 +124,6 @@ export function composeStepSkill( return files; } -const FRONTMATTER = /^---\n([\s\S]*?)\n---\n\n?/; - -/** A SKILL.md's frontmatter without `name`, the one field a skill and its replacement must differ in. */ -const frontmatterWithoutName = (skill: string): string => - (FRONTMATTER.exec(skill)?.[1] ?? '') - .split('\n') - .filter((line) => !line.startsWith('name:')) - .join('\n'); - -/** What differs between the files a task reads today and the files it reads from the replacement: one line each, and none when they read the same. */ -export function compareSkillFiles( - today: SkillFiles, - repackaged: SkillFiles, -): string[] { - const differences: string[] = []; - for (const file of new Set([ - ...Object.keys(today), - ...Object.keys(repackaged), - ])) { - if (!Object.hasOwn(repackaged, file)) differences.push(`${file} is gone`); - else if (!Object.hasOwn(today, file)) differences.push(`${file} is new`); - else if (file === SKILL_FILE) { - if ( - today[file].replace(FRONTMATTER, '') !== - repackaged[file].replace(FRONTMATTER, '') - ) { - differences.push(`${SKILL_FILE} reads differently`); - } - if ( - frontmatterWithoutName(today[file]) !== - frontmatterWithoutName(repackaged[file]) - ) { - differences.push(`${SKILL_FILE} frontmatter differs`); - } - } else if (today[file] !== repackaged[file]) { - differences.push(`${file} differs`); - } - } - return differences; -} - /** Every file under `dir`, keyed by its path from `dir` with `/` separators. */ function readFiles(dir: string, prefix = ''): SkillFiles { const files: SkillFiles = {}; @@ -212,19 +171,19 @@ function plainPath( return target; } -/** Remove the folder of skill `id` under `skillsRoot`, or a link standing there; `id` is one plain name, and `skillsRoot` is reached through no link below `boundaryDir`. */ -export function removeSkillFolder( +/** The folder of skill `id` under `skillsRoot`: `id` is one plain name, and `skillsRoot` is reached through no link below `boundaryDir`. */ +export function skillFolder( skillsRoot: string, id: string, boundaryDir: string, -): void { +): string { if (!PLAIN_NAME.test(id)) throw new Error(`unusable skill id: ${id}`); const root = plainPath( boundaryDir, path.relative(path.resolve(boundaryDir), path.resolve(skillsRoot)), 'folder', ); - fs.rmSync(path.join(root, id), { recursive: true, force: true }); + return path.join(root, id); } /** Complete the step skill at `skillDir` from the pack at `packDir`, writing through no link below `boundaryDir`; throws and leaves the skill as it was otherwise. */ diff --git a/src/shared/skill-install.ts b/src/shared/skill-install.ts index 008301f79..74b62b39a 100644 --- a/src/shared/skill-install.ts +++ b/src/shared/skill-install.ts @@ -6,6 +6,7 @@ import { unzipSync } from 'fflate'; import { logToFile } from '@utils/debug'; import { analytics } from '@utils/analytics'; import { fetchWithRetry, type RetryOpts } from '@shared/fetch-retry'; +import { PLAIN_NAME } from '@shared/skill-composition'; import { fetchSkillMenu, type SkillEntry } from '@shared/skill-menu'; /** A bundle's files, keyed by variant short id then path. */ @@ -74,6 +75,9 @@ async function downloadWithRetry( return new Uint8Array(await resp.arrayBuffer()); } +/** The file the wizard drops in every skill folder it installs. */ +export const WIZARD_MARKER = '.posthog-wizard'; + /** Scans an extracted skill directory; a returned reason means it is poisoned. Injected because @shared cannot import @agent. */ export type SkillScanner = (skillDir: string) => Promise; @@ -93,10 +97,24 @@ export async function downloadSkill( installDir: string, { skillsRoot, scan }: SkillInstallOptions, ): Promise<{ success: boolean; error?: string }> { + // The id comes from the menu and names the folder written to, so it is one plain name. + if (!PLAIN_NAME.test(skillEntry.id)) { + const error = `unusable skill id: ${skillEntry.id}`; + logToFile(`downloadSkill: ${error}`); + analytics.wizardCapture('skill install failed', { + skill_id: skillEntry.id.slice(0, 200), + step: 'download', + platform: process.platform, + error, + }); + return { success: false, error }; + } const skillDir = skillsRoot ? path.join(installDir, skillsRoot, skillEntry.id) : path.join(installDir, '.claude', 'skills', skillEntry.id); let step: 'download' | 'extract' | 'scan' = 'download'; + // A failed install removes only a folder it made, so files that were there first stay. + const existed = fs.existsSync(skillDir); try { fs.mkdirSync(skillDir, { recursive: true }); @@ -109,7 +127,7 @@ export async function downloadSkill( skillEntry.id, ) : extractZipArchive(data, skillDir); - fs.writeFileSync(path.join(skillDir, '.posthog-wizard'), ''); + fs.writeFileSync(path.join(skillDir, WIZARD_MARKER), ''); // Same scan the Bash-install hook runs — TS-path installs (linear // pre-install, MCP/pi install_skill, orchestrator cache + reference) @@ -143,6 +161,13 @@ export async function downloadSkill( return { success: true }; } catch (err: any) { logToFile(`downloadSkill: error: ${err.message}`); + if (!existed) { + try { + fs.rmSync(skillDir, { recursive: true, force: true }); + } catch { + // The install has failed either way. + } + } // A skill-less run still reports success — keep the failure visible. analytics.wizardCapture('skill install failed', { skill_id: skillEntry.id, @@ -154,9 +179,6 @@ export async function downloadSkill( } } -/** The file the wizard drops in every skill folder it installs. */ -const WIZARD_MARKER = '.posthog-wizard'; - const claudeSkillsDir = (installDir: string): string => path.join(installDir, '.claude', 'skills'); diff --git a/src/shared/skill-menu.ts b/src/shared/skill-menu.ts index 7fafec4c8..5936d228a 100644 --- a/src/shared/skill-menu.ts +++ b/src/shared/skill-menu.ts @@ -27,8 +27,6 @@ export type SkillEntry = { description?: string; /** What the skill is, and as `key:value` the projects it is written for; see `@shared/skill-resolution`. */ tags?: string[]; - /** The menu id or skill family this skill stands in for; see `resolveReplacement`. */ - replaces?: string; /** The product whose pages, from the framework's pack, complete this skill; see `@shared/skill-composition`. */ frameworkReferences?: string; /** Menu-only: the variants inside a bundle, expanded into entries of their own on fetch. */ diff --git a/src/shared/skill-resolution.ts b/src/shared/skill-resolution.ts index 5e3befef0..61530e3d1 100644 --- a/src/shared/skill-resolution.ts +++ b/src/shared/skill-resolution.ts @@ -31,14 +31,6 @@ function matchKeysOf(tags: ReadonlySet): Map { return keys; } -/** The skill that stands in for `name`, a menu id or a skill family, or undefined when the menu has none. */ -export function resolveReplacement( - entries: readonly SkillEntry[], - name: string, -): SkillEntry | undefined { - return entries.find((entry) => entry.replaces === name); -} - /** The skill `name` stands for, a menu id or a skill family, or undefined when none fits the run's match keys. */ export function resolveSkill( entries: readonly SkillEntry[], diff --git a/src/tui/programs/error-tracking/screens/ErrorTrackingIntroScreen.tsx b/src/tui/programs/error-tracking/screens/ErrorTrackingIntroScreen.tsx index efe8c373e..d903d4615 100644 --- a/src/tui/programs/error-tracking/screens/ErrorTrackingIntroScreen.tsx +++ b/src/tui/programs/error-tracking/screens/ErrorTrackingIntroScreen.tsx @@ -20,7 +20,7 @@ export const ErrorTrackingIntroScreen = ({ const { session } = store; // The flow resolves its skills per framework after the project pick. Point // "more info" at the capture step, the one skill every run of this flow installs. - const skillId = 'integration-v2-error-tracking-step'; + const skillId = 'integration-error-tracking'; const { skillEntry, fetchFailed } = useSkillEntry(skillId); const body = showingMoreInfo ? (