@posthog/agent 2.3.173 → 2.3.187

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.
@@ -894,7 +894,7 @@ var require_dist2 = __commonJS({
894
894
 
895
895
  // src/server/bin.ts
896
896
  var import_commander = require("commander");
897
- var import_zod4 = require("zod");
897
+ var import_v42 = require("zod/v4");
898
898
 
899
899
  // src/server/agent-server.ts
900
900
  var import_sdk5 = require("@agentclientprotocol/sdk");
@@ -904,7 +904,7 @@ var import_hono = require("hono");
904
904
  // package.json
905
905
  var package_default = {
906
906
  name: "@posthog/agent",
907
- version: "2.3.173",
907
+ version: "2.3.187",
908
908
  repository: "https://github.com/PostHog/code",
909
909
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
910
910
  exports: {
@@ -12102,45 +12102,45 @@ function validateJwt(token, publicKey) {
12102
12102
  }
12103
12103
 
12104
12104
  // src/server/schemas.ts
12105
- var import_zod3 = require("zod");
12106
- var httpHeaderSchema = import_zod3.z.object({
12107
- name: import_zod3.z.string(),
12108
- value: import_zod3.z.string()
12105
+ var import_v4 = require("zod/v4");
12106
+ var httpHeaderSchema = import_v4.z.object({
12107
+ name: import_v4.z.string(),
12108
+ value: import_v4.z.string()
12109
12109
  });
12110
- var remoteMcpServerSchema = import_zod3.z.object({
12111
- type: import_zod3.z.enum(["http", "sse"]),
12112
- name: import_zod3.z.string().min(1, "MCP server name is required"),
12113
- url: import_zod3.z.url({ error: "MCP server url must be a valid URL" }),
12114
- headers: import_zod3.z.array(httpHeaderSchema).default([])
12110
+ var remoteMcpServerSchema = import_v4.z.object({
12111
+ type: import_v4.z.enum(["http", "sse"]),
12112
+ name: import_v4.z.string().min(1, "MCP server name is required"),
12113
+ url: import_v4.z.url({ error: "MCP server url must be a valid URL" }),
12114
+ headers: import_v4.z.array(httpHeaderSchema).default([])
12115
12115
  });
12116
- var mcpServersSchema = import_zod3.z.array(remoteMcpServerSchema);
12117
- var claudeCodeConfigSchema = import_zod3.z.object({
12118
- systemPrompt: import_zod3.z.union([
12119
- import_zod3.z.string(),
12120
- import_zod3.z.object({
12121
- type: import_zod3.z.literal("preset"),
12122
- preset: import_zod3.z.literal("claude_code"),
12123
- append: import_zod3.z.string().optional()
12116
+ var mcpServersSchema = import_v4.z.array(remoteMcpServerSchema);
12117
+ var claudeCodeConfigSchema = import_v4.z.object({
12118
+ systemPrompt: import_v4.z.union([
12119
+ import_v4.z.string(),
12120
+ import_v4.z.object({
12121
+ type: import_v4.z.literal("preset"),
12122
+ preset: import_v4.z.literal("claude_code"),
12123
+ append: import_v4.z.string().optional()
12124
12124
  })
12125
12125
  ]).optional(),
12126
- plugins: import_zod3.z.array(import_zod3.z.object({ type: import_zod3.z.literal("local"), path: import_zod3.z.string() })).optional()
12126
+ plugins: import_v4.z.array(import_v4.z.object({ type: import_v4.z.literal("local"), path: import_v4.z.string() })).optional()
12127
12127
  });
12128
- var jsonRpcRequestSchema = import_zod3.z.object({
12129
- jsonrpc: import_zod3.z.literal("2.0"),
12130
- method: import_zod3.z.string(),
12131
- params: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.unknown()).optional(),
12132
- id: import_zod3.z.union([import_zod3.z.string(), import_zod3.z.number()]).optional()
12128
+ var jsonRpcRequestSchema = import_v4.z.object({
12129
+ jsonrpc: import_v4.z.literal("2.0"),
12130
+ method: import_v4.z.string(),
12131
+ params: import_v4.z.record(import_v4.z.string(), import_v4.z.unknown()).optional(),
12132
+ id: import_v4.z.union([import_v4.z.string(), import_v4.z.number()]).optional()
12133
12133
  });
12134
- var userMessageParamsSchema = import_zod3.z.object({
12135
- content: import_zod3.z.string().min(1, "Content is required")
12134
+ var userMessageParamsSchema = import_v4.z.object({
12135
+ content: import_v4.z.string().min(1, "Content is required")
12136
12136
  });
12137
12137
  var commandParamsSchemas = {
12138
12138
  user_message: userMessageParamsSchema,
12139
12139
  "posthog/user_message": userMessageParamsSchema,
12140
- cancel: import_zod3.z.object({}).optional(),
12141
- "posthog/cancel": import_zod3.z.object({}).optional(),
12142
- close: import_zod3.z.object({}).optional(),
12143
- "posthog/close": import_zod3.z.object({}).optional()
12140
+ cancel: import_v4.z.object({}).optional(),
12141
+ "posthog/cancel": import_v4.z.object({}).optional(),
12142
+ close: import_v4.z.object({}).optional(),
12143
+ "posthog/close": import_v4.z.object({}).optional()
12144
12144
  };
12145
12145
  function validateCommandParams(method, params) {
12146
12146
  const schema = commandParamsSchemas[method] ?? commandParamsSchemas[method.replace("posthog/", "")];
@@ -13364,17 +13364,17 @@ ${attributionInstructions}
13364
13364
  };
13365
13365
 
13366
13366
  // src/server/bin.ts
13367
- var envSchema = import_zod4.z.object({
13368
- JWT_PUBLIC_KEY: import_zod4.z.string({
13367
+ var envSchema = import_v42.z.object({
13368
+ JWT_PUBLIC_KEY: import_v42.z.string({
13369
13369
  error: "JWT_PUBLIC_KEY is required for authenticating client connections"
13370
13370
  }).min(1, "JWT_PUBLIC_KEY cannot be empty"),
13371
- POSTHOG_API_URL: import_zod4.z.url({
13371
+ POSTHOG_API_URL: import_v42.z.url({
13372
13372
  error: "POSTHOG_API_URL is required for LLM gateway communication"
13373
13373
  }),
13374
- POSTHOG_PERSONAL_API_KEY: import_zod4.z.string({
13374
+ POSTHOG_PERSONAL_API_KEY: import_v42.z.string({
13375
13375
  error: "POSTHOG_PERSONAL_API_KEY is required for authenticating with PostHog services"
13376
13376
  }).min(1, "POSTHOG_PERSONAL_API_KEY cannot be empty"),
13377
- POSTHOG_PROJECT_ID: import_zod4.z.string({
13377
+ POSTHOG_PROJECT_ID: import_v42.z.string({
13378
13378
  error: "POSTHOG_PROJECT_ID is required for routing requests to the correct project"
13379
13379
  }).regex(/^\d+$/, "POSTHOG_PROJECT_ID must be a numeric string").transform((val) => parseInt(val, 10))
13380
13380
  });