@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.
@@ -122,7 +122,6 @@ declare class Agent {
122
122
  private acpConnection?;
123
123
  private taskRunId?;
124
124
  private sessionLogWriter?;
125
- debug: boolean;
126
125
  constructor(config: AgentConfig);
127
126
  private _configureLlmGateway;
128
127
  run(taskId: string, taskRunId: string, options?: TaskExecutionOptions): Promise<InProcessAcpConnection>;
package/dist/agent.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { b as Agent } from './agent-9gv5HohC.js';
1
+ export { b as Agent } from './agent-DK1apkaG.js';
2
2
  import './types.js';
3
3
  import '@agentclientprotocol/sdk';
4
4
  import './logger-DDBiMOOD.js';
package/dist/agent.js CHANGED
@@ -276,7 +276,7 @@ import { v7 as uuidv7 } from "uuid";
276
276
  // package.json
277
277
  var package_default = {
278
278
  name: "@posthog/agent",
279
- version: "2.1.62",
279
+ version: "2.1.67",
280
280
  repository: "https://github.com/PostHog/twig",
281
281
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
282
282
  exports: {
@@ -2222,6 +2222,7 @@ function parseMcpServers(params) {
2222
2222
  }
2223
2223
 
2224
2224
  // src/adapters/claude/session/models.ts
2225
+ var DEFAULT_MODEL = "opus";
2225
2226
  var GATEWAY_TO_SDK_MODEL = {
2226
2227
  "claude-opus-4-5": "opus",
2227
2228
  "claude-opus-4-6": "opus",
@@ -2482,6 +2483,7 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
2482
2483
  onProcessExited: this.options?.onProcessExited
2483
2484
  });
2484
2485
  const input = new Pushable();
2486
+ options.model = DEFAULT_MODEL;
2485
2487
  const q = query({ prompt: input, options });
2486
2488
  const session = this.createSession(
2487
2489
  sessionId,
@@ -2503,7 +2505,10 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
2503
2505
  const modelOptions = await this.getModelConfigOptions();
2504
2506
  this.deferBackgroundFetches(q, sessionId, mcpServers);
2505
2507
  session.modelId = modelOptions.currentModelId;
2506
- await this.trySetModel(q, modelOptions.currentModelId);
2508
+ const resolvedSdkModel = toSdkModelId(modelOptions.currentModelId);
2509
+ if (resolvedSdkModel !== DEFAULT_MODEL) {
2510
+ await this.trySetModel(q, modelOptions.currentModelId);
2511
+ }
2507
2512
  const configOptions = await this.buildConfigOptions(modelOptions);
2508
2513
  return {
2509
2514
  sessionId,
@@ -3697,11 +3702,9 @@ var Agent = class {
3697
3702
  acpConnection;
3698
3703
  taskRunId;
3699
3704
  sessionLogWriter;
3700
- debug;
3701
3705
  constructor(config) {
3702
- this.debug = config.debug || false;
3703
3706
  this.logger = new Logger({
3704
- debug: this.debug,
3707
+ debug: config.debug || false,
3705
3708
  prefix: "[PostHog Agent]",
3706
3709
  onLog: config.onLog
3707
3710
  });