@posthog/agent 2.1.60 → 2.1.67

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.
@@ -1183,7 +1183,7 @@ import { v7 as uuidv7 } from "uuid";
1183
1183
  // package.json
1184
1184
  var package_default = {
1185
1185
  name: "@posthog/agent",
1186
- version: "2.1.60",
1186
+ version: "2.1.67",
1187
1187
  repository: "https://github.com/PostHog/twig",
1188
1188
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
1189
1189
  exports: {
@@ -3093,6 +3093,7 @@ function parseMcpServers(params) {
3093
3093
  }
3094
3094
 
3095
3095
  // src/adapters/claude/session/models.ts
3096
+ var DEFAULT_MODEL = "opus";
3096
3097
  var GATEWAY_TO_SDK_MODEL = {
3097
3098
  "claude-opus-4-5": "opus",
3098
3099
  "claude-opus-4-6": "opus",
@@ -3353,6 +3354,7 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3353
3354
  onProcessExited: this.options?.onProcessExited
3354
3355
  });
3355
3356
  const input = new Pushable();
3357
+ options.model = DEFAULT_MODEL;
3356
3358
  const q = query({ prompt: input, options });
3357
3359
  const session = this.createSession(
3358
3360
  sessionId,
@@ -3374,7 +3376,10 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3374
3376
  const modelOptions = await this.getModelConfigOptions();
3375
3377
  this.deferBackgroundFetches(q, sessionId, mcpServers);
3376
3378
  session.modelId = modelOptions.currentModelId;
3377
- await this.trySetModel(q, modelOptions.currentModelId);
3379
+ const resolvedSdkModel = toSdkModelId(modelOptions.currentModelId);
3380
+ if (resolvedSdkModel !== DEFAULT_MODEL) {
3381
+ await this.trySetModel(q, modelOptions.currentModelId);
3382
+ }
3378
3383
  const configOptions = await this.buildConfigOptions(modelOptions);
3379
3384
  return {
3380
3385
  sessionId,
@@ -3729,6 +3734,11 @@ function findCodexBinary(options) {
3729
3734
  if (options.binaryPath && existsSync3(options.binaryPath)) {
3730
3735
  return { command: options.binaryPath, args: configArgs };
3731
3736
  }
3737
+ if (options.binaryPath) {
3738
+ throw new Error(
3739
+ `codex-acp binary not found at ${options.binaryPath}. Run "node apps/twig/scripts/download-binaries.mjs" to download it.`
3740
+ );
3741
+ }
3732
3742
  return { command: "npx", args: ["@zed-industries/codex-acp", ...configArgs] };
3733
3743
  }
3734
3744
  function spawnCodexProcess(options) {