@posthog/agent 2.1.124 → 2.1.125

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.1.124",
3
+ "version": "2.1.125",
4
4
  "repository": "https://github.com/PostHog/twig",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -76,8 +76,8 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@agentclientprotocol/sdk": "^0.14.0",
79
- "@anthropic-ai/claude-agent-sdk": "0.2.59",
80
- "@anthropic-ai/sdk": "^0.71.0",
79
+ "@anthropic-ai/claude-agent-sdk": "0.2.63",
80
+ "@anthropic-ai/sdk": "^0.78.0",
81
81
  "@hono/node-server": "^1.19.9",
82
82
  "@opentelemetry/api-logs": "^0.208.0",
83
83
  "@opentelemetry/exporter-logs-otlp-http": "^0.208.0",
@@ -257,6 +257,8 @@ function processContentChunk(
257
257
  case "citations_delta":
258
258
  case "signature_delta":
259
259
  case "container_upload":
260
+ case "compaction":
261
+ case "compaction_delta":
260
262
  return null;
261
263
 
262
264
  default:
@@ -1,5 +1,6 @@
1
1
  import { type ChildProcess, spawn } from "node:child_process";
2
2
  import { existsSync } from "node:fs";
3
+ import { delimiter, dirname } from "node:path";
3
4
  import type { Readable, Writable } from "node:stream";
4
5
  import type { ProcessSpawnedCallback } from "../../types.js";
5
6
  import { Logger } from "../../utils/logger.js";
@@ -79,8 +80,8 @@ export function spawnCodexProcess(options: CodexProcessOptions): CodexProcess {
79
80
  const { command, args } = findCodexBinary(options);
80
81
 
81
82
  if (options.binaryPath && existsSync(options.binaryPath)) {
82
- const binDir = options.binaryPath.replace(/\/[^/]+$/, "");
83
- env.PATH = `${binDir}:${env.PATH ?? ""}`;
83
+ const binDir = dirname(options.binaryPath);
84
+ env.PATH = `${binDir}${delimiter}${env.PATH ?? ""}`;
84
85
  }
85
86
 
86
87
  logger.info("Spawning codex-acp process", {
@@ -100,7 +101,7 @@ export function spawnCodexProcess(options: CodexProcessOptions): CodexProcess {
100
101
  });
101
102
 
102
103
  child.stderr?.on("data", (data: Buffer) => {
103
- logger.debug("codex-acp stderr:", data.toString());
104
+ logger.error("codex-acp stderr:", data.toString());
104
105
  });
105
106
 
106
107
  child.on("error", (err) => {
@@ -99,6 +99,7 @@ export function createMockQuery(
99
99
  initializationResult: vi.fn().mockResolvedValue({}),
100
100
  reconnectMcpServer: vi.fn().mockResolvedValue(undefined),
101
101
  toggleMcpServer: vi.fn().mockResolvedValue(undefined),
102
+ supportedAgents: vi.fn().mockResolvedValue([]),
102
103
  stopTask: vi.fn().mockResolvedValue(undefined),
103
104
  [Symbol.asyncDispose]: vi.fn().mockResolvedValue(undefined),
104
105
  _abortController: abortController,
@@ -176,6 +177,9 @@ export function createSuccessResult(
176
177
  },
177
178
  server_tool_use: { web_search_requests: 0, web_fetch_requests: 0 },
178
179
  service_tier: "standard",
180
+ inference_geo: "us",
181
+ iterations: [],
182
+ speed: "standard",
179
183
  },
180
184
  modelUsage: {},
181
185
  permission_denials: [],
@@ -209,6 +213,9 @@ export function createErrorResult(
209
213
  },
210
214
  server_tool_use: { web_search_requests: 0, web_fetch_requests: 0 },
211
215
  service_tier: "standard",
216
+ inference_geo: "us",
217
+ iterations: [],
218
+ speed: "standard",
212
219
  },
213
220
  modelUsage: {},
214
221
  permission_denials: [],