@posthog/agent 2.1.62 → 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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AcpConnection, a as AcpConnectionConfig, b as Agent, c as AgentAdapter, C as CodexProcessOptions, I as InProcessAcpConnection, O as OtelLogConfig, d as OtelLogWriter, S as SessionContext, e as SessionLogWriter, f as SessionLogWriterOptions, g as createAcpConnection } from './agent-9gv5HohC.js';
1
+ export { A as AcpConnection, a as AcpConnectionConfig, b as Agent, c as AgentAdapter, C as CodexProcessOptions, I as InProcessAcpConnection, O as OtelLogConfig, d as OtelLogWriter, S as SessionContext, e as SessionLogWriter, f as SessionLogWriterOptions, g as createAcpConnection } from './agent-DK1apkaG.js';
2
2
  import { McpServerConfig } from '@anthropic-ai/claude-agent-sdk';
3
3
  import { L as Logger } from './logger-DDBiMOOD.js';
4
4
  export { a as LoggerConfig } from './logger-DDBiMOOD.js';
package/dist/index.js CHANGED
@@ -1174,7 +1174,7 @@ import { v7 as uuidv7 } from "uuid";
1174
1174
  // package.json
1175
1175
  var package_default = {
1176
1176
  name: "@posthog/agent",
1177
- version: "2.1.62",
1177
+ version: "2.1.67",
1178
1178
  repository: "https://github.com/PostHog/twig",
1179
1179
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
1180
1180
  exports: {
@@ -3128,6 +3128,7 @@ function parseMcpServers(params) {
3128
3128
  }
3129
3129
 
3130
3130
  // src/adapters/claude/session/models.ts
3131
+ var DEFAULT_MODEL = "opus";
3131
3132
  var GATEWAY_TO_SDK_MODEL = {
3132
3133
  "claude-opus-4-5": "opus",
3133
3134
  "claude-opus-4-6": "opus",
@@ -3388,6 +3389,7 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3388
3389
  onProcessExited: this.options?.onProcessExited
3389
3390
  });
3390
3391
  const input = new Pushable();
3392
+ options.model = DEFAULT_MODEL;
3391
3393
  const q = query({ prompt: input, options });
3392
3394
  const session = this.createSession(
3393
3395
  sessionId,
@@ -3409,7 +3411,10 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
3409
3411
  const modelOptions = await this.getModelConfigOptions();
3410
3412
  this.deferBackgroundFetches(q, sessionId, mcpServers);
3411
3413
  session.modelId = modelOptions.currentModelId;
3412
- await this.trySetModel(q, modelOptions.currentModelId);
3414
+ const resolvedSdkModel = toSdkModelId(modelOptions.currentModelId);
3415
+ if (resolvedSdkModel !== DEFAULT_MODEL) {
3416
+ await this.trySetModel(q, modelOptions.currentModelId);
3417
+ }
3413
3418
  const configOptions = await this.buildConfigOptions(modelOptions);
3414
3419
  return {
3415
3420
  sessionId,
@@ -4603,11 +4608,9 @@ var Agent = class {
4603
4608
  acpConnection;
4604
4609
  taskRunId;
4605
4610
  sessionLogWriter;
4606
- debug;
4607
4611
  constructor(config) {
4608
- this.debug = config.debug || false;
4609
4612
  this.logger = new Logger({
4610
- debug: this.debug,
4613
+ debug: config.debug || false,
4611
4614
  prefix: "[PostHog Agent]",
4612
4615
  onLog: config.onLog
4613
4616
  });