@posthog/agent 2.3.155 → 2.3.163
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/dist/adapters/claude/permissions/permission-options.js +3 -3
- package/dist/adapters/claude/permissions/permission-options.js.map +1 -1
- package/dist/adapters/claude/questions/utils.d.ts +6 -82
- package/dist/adapters/claude/tools.js +2 -2
- package/dist/adapters/claude/tools.js.map +1 -1
- package/dist/agent.js +5 -5
- package/dist/agent.js.map +1 -1
- package/dist/execution-mode.js +2 -2
- package/dist/execution-mode.js.map +1 -1
- package/dist/posthog-api.js +2 -2
- package/dist/posthog-api.js.map +1 -1
- package/dist/server/agent-server.d.ts +7 -26
- package/dist/server/agent-server.js +7 -7
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +13 -13
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +2 -2
- package/src/adapters/claude/permissions/permission-options.ts +1 -1
- package/src/execution-mode.ts +2 -2
- package/src/server/bin.ts +7 -11
- package/src/server/schemas.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/agent",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.163",
|
|
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": {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"tar": "^7.5.0",
|
|
104
104
|
"uuid": "13.0.0",
|
|
105
105
|
"yoga-wasm-web": "^0.3.3",
|
|
106
|
-
"zod": "^
|
|
106
|
+
"zod": "^4.2.0"
|
|
107
107
|
},
|
|
108
108
|
"files": [
|
|
109
109
|
"dist/**/*",
|
|
@@ -100,7 +100,7 @@ export function buildExitPlanModePermissionOptions(): PermissionOption[] {
|
|
|
100
100
|
if (ALLOW_BYPASS) {
|
|
101
101
|
options.push({
|
|
102
102
|
kind: "allow_always",
|
|
103
|
-
name: "Yes,
|
|
103
|
+
name: "Yes, auto-accept all permissions",
|
|
104
104
|
optionId: "bypassPermissions",
|
|
105
105
|
});
|
|
106
106
|
}
|
package/src/execution-mode.ts
CHANGED
|
@@ -35,8 +35,8 @@ const availableModes: ModeInfo[] = [
|
|
|
35
35
|
if (ALLOW_BYPASS) {
|
|
36
36
|
availableModes.push({
|
|
37
37
|
id: "bypassPermissions",
|
|
38
|
-
name: "
|
|
39
|
-
description: "
|
|
38
|
+
name: "Auto-accept Permissions",
|
|
39
|
+
description: "Auto-accept all permission requests",
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
|
package/src/server/bin.ts
CHANGED
|
@@ -7,25 +7,21 @@ import { claudeCodeConfigSchema, mcpServersSchema } from "./schemas";
|
|
|
7
7
|
const envSchema = z.object({
|
|
8
8
|
JWT_PUBLIC_KEY: z
|
|
9
9
|
.string({
|
|
10
|
-
|
|
11
|
-
"JWT_PUBLIC_KEY is required for authenticating client connections",
|
|
10
|
+
error: "JWT_PUBLIC_KEY is required for authenticating client connections",
|
|
12
11
|
})
|
|
13
12
|
.min(1, "JWT_PUBLIC_KEY cannot be empty"),
|
|
14
|
-
POSTHOG_API_URL: z
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"POSTHOG_API_URL is required for LLM gateway communication",
|
|
18
|
-
})
|
|
19
|
-
.url("POSTHOG_API_URL must be a valid URL"),
|
|
13
|
+
POSTHOG_API_URL: z.url({
|
|
14
|
+
error: "POSTHOG_API_URL is required for LLM gateway communication",
|
|
15
|
+
}),
|
|
20
16
|
POSTHOG_PERSONAL_API_KEY: z
|
|
21
17
|
.string({
|
|
22
|
-
|
|
18
|
+
error:
|
|
23
19
|
"POSTHOG_PERSONAL_API_KEY is required for authenticating with PostHog services",
|
|
24
20
|
})
|
|
25
21
|
.min(1, "POSTHOG_PERSONAL_API_KEY cannot be empty"),
|
|
26
22
|
POSTHOG_PROJECT_ID: z
|
|
27
23
|
.string({
|
|
28
|
-
|
|
24
|
+
error:
|
|
29
25
|
"POSTHOG_PROJECT_ID is required for routing requests to the correct project",
|
|
30
26
|
})
|
|
31
27
|
.regex(/^\d+$/, "POSTHOG_PROJECT_ID must be a numeric string")
|
|
@@ -34,7 +30,7 @@ const envSchema = z.object({
|
|
|
34
30
|
|
|
35
31
|
const program = new Command();
|
|
36
32
|
|
|
37
|
-
function parseJsonOption<S extends z.
|
|
33
|
+
function parseJsonOption<S extends z.ZodType>(
|
|
38
34
|
raw: string | undefined,
|
|
39
35
|
schema: S,
|
|
40
36
|
flag: string,
|
package/src/server/schemas.ts
CHANGED
|
@@ -8,7 +8,7 @@ const httpHeaderSchema = z.object({
|
|
|
8
8
|
const remoteMcpServerSchema = z.object({
|
|
9
9
|
type: z.enum(["http", "sse"]),
|
|
10
10
|
name: z.string().min(1, "MCP server name is required"),
|
|
11
|
-
url: z.
|
|
11
|
+
url: z.url({ error: "MCP server url must be a valid URL" }),
|
|
12
12
|
headers: z.array(httpHeaderSchema).default([]),
|
|
13
13
|
});
|
|
14
14
|
|
|
@@ -35,7 +35,7 @@ export const claudeCodeConfigSchema = z.object({
|
|
|
35
35
|
export const jsonRpcRequestSchema = z.object({
|
|
36
36
|
jsonrpc: z.literal("2.0"),
|
|
37
37
|
method: z.string(),
|
|
38
|
-
params: z.record(z.unknown()).optional(),
|
|
38
|
+
params: z.record(z.string(), z.unknown()).optional(),
|
|
39
39
|
id: z.union([z.string(), z.number()]).optional(),
|
|
40
40
|
});
|
|
41
41
|
|