@posthog/agent 2.3.145 → 2.3.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/agent",
3
- "version": "2.3.145",
3
+ "version": "2.3.152",
4
4
  "repository": "https://github.com/PostHog/code",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -67,6 +67,7 @@ import {
67
67
  getEffortOptions,
68
68
  resolveModelPreference,
69
69
  supports1MContext,
70
+ supportsMcpInjection,
70
71
  toSdkModelId,
71
72
  } from "./session/models";
72
73
  import {
@@ -797,7 +798,11 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
797
798
  const settingsManager = new SettingsManager(cwd);
798
799
  await settingsManager.initialize();
799
800
 
800
- const mcpServers = parseMcpServers(params);
801
+ const earlyModelId =
802
+ settingsManager.getSettings().model || meta?.model || "";
803
+ const mcpServers = supportsMcpInjection(earlyModelId)
804
+ ? parseMcpServers(params)
805
+ : {};
801
806
  const systemPrompt = buildSystemPrompt(meta?.systemPrompt);
802
807
 
803
808
  this.logger.info(isResume ? "Resuming session" : "Creating new session", {
@@ -37,6 +37,12 @@ export function supportsMaxEffort(modelId: string): boolean {
37
37
  return MODELS_WITH_MAX_EFFORT.has(modelId);
38
38
  }
39
39
 
40
+ const MODELS_TO_EXCLUDE_MCP_TOOLS = new Set(["claude-haiku-4-5"]);
41
+
42
+ export function supportsMcpInjection(modelId: string): boolean {
43
+ return !MODELS_TO_EXCLUDE_MCP_TOOLS.has(modelId);
44
+ }
45
+
40
46
  interface EffortOption {
41
47
  value: string;
42
48
  name: string;