@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.
@@ -1175,7 +1175,7 @@ var import_uuid = require("uuid");
1175
1175
  // package.json
1176
1176
  var package_default = {
1177
1177
  name: "@posthog/agent",
1178
- version: "2.1.60",
1178
+ version: "2.1.67",
1179
1179
  repository: "https://github.com/PostHog/twig",
1180
1180
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
1181
1181
  exports: {
@@ -3085,6 +3085,7 @@ function parseMcpServers(params) {
3085
3085
  }
3086
3086
 
3087
3087
  // src/adapters/claude/session/models.ts
3088
+ var DEFAULT_MODEL = "opus";
3088
3089
  var GATEWAY_TO_SDK_MODEL = {
3089
3090
  "claude-opus-4-5": "opus",
3090
3091
  "claude-opus-4-6": "opus",
@@ -3345,6 +3346,7 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3345
3346
  onProcessExited: this.options?.onProcessExited
3346
3347
  });
3347
3348
  const input = new Pushable();
3349
+ options.model = DEFAULT_MODEL;
3348
3350
  const q = (0, import_claude_agent_sdk.query)({ prompt: input, options });
3349
3351
  const session = this.createSession(
3350
3352
  sessionId,
@@ -3366,7 +3368,10 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3366
3368
  const modelOptions = await this.getModelConfigOptions();
3367
3369
  this.deferBackgroundFetches(q, sessionId, mcpServers);
3368
3370
  session.modelId = modelOptions.currentModelId;
3369
- await this.trySetModel(q, modelOptions.currentModelId);
3371
+ const resolvedSdkModel = toSdkModelId(modelOptions.currentModelId);
3372
+ if (resolvedSdkModel !== DEFAULT_MODEL) {
3373
+ await this.trySetModel(q, modelOptions.currentModelId);
3374
+ }
3370
3375
  const configOptions = await this.buildConfigOptions(modelOptions);
3371
3376
  return {
3372
3377
  sessionId,
@@ -3721,6 +3726,11 @@ function findCodexBinary(options) {
3721
3726
  if (options.binaryPath && (0, import_node_fs.existsSync)(options.binaryPath)) {
3722
3727
  return { command: options.binaryPath, args: configArgs };
3723
3728
  }
3729
+ if (options.binaryPath) {
3730
+ throw new Error(
3731
+ `codex-acp binary not found at ${options.binaryPath}. Run "node apps/twig/scripts/download-binaries.mjs" to download it.`
3732
+ );
3733
+ }
3724
3734
  return { command: "npx", args: ["@zed-industries/codex-acp", ...configArgs] };
3725
3735
  }
3726
3736
  function spawnCodexProcess(options) {