@posthog/agent 2.3.306 → 2.3.308

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.3.306",
3
+ "version": "2.3.308",
4
4
  "repository": "https://github.com/PostHog/code",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -103,7 +103,6 @@ function createClaudeConnection(config: AcpConnectionConfig): AcpConnection {
103
103
  ...config.processCallbacks,
104
104
  onStructuredOutput: config.onStructuredOutput,
105
105
  });
106
- logger.info(`Created ${agent.adapterName} agent`);
107
106
  return agent;
108
107
  }, agentStream);
109
108
 
@@ -194,7 +193,6 @@ function createCodexConnection(config: AcpConnectionConfig): AcpConnection {
194
193
  codexProcessOptions: config.codexOptions ?? {},
195
194
  processCallbacks: config.processCallbacks,
196
195
  });
197
- logger.info(`Created ${agent.adapterName} agent`);
198
196
  return agent;
199
197
  }, agentStream);
200
198
 
@@ -433,11 +433,6 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
433
433
  }
434
434
  }
435
435
  this.session.lastContextWindowSize = lastContextWindowSize;
436
- this.logger.debug("Context window size from result", {
437
- sdkReported: contextWindows,
438
- resolved: lastContextWindowSize,
439
- modelId: this.session.modelId,
440
- });
441
436
 
442
437
  this.session.contextSize = lastContextWindowSize;
443
438
  if (lastAssistantTotalUsage !== null) {
@@ -963,7 +958,7 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
963
958
  ? { type: "json_schema" as const, schema: meta.jsonSchema }
964
959
  : undefined;
965
960
 
966
- this.logger.info(isResume ? "Resuming session" : "Creating new session", {
961
+ this.logger.debug(isResume ? "Resuming session" : "Creating new session", {
967
962
  sessionId,
968
963
  taskId,
969
964
  taskRunId: meta?.taskRunId,
@@ -1033,13 +1028,6 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
1033
1028
  this.session = session;
1034
1029
  this.sessionId = sessionId;
1035
1030
 
1036
- this.logger.info(
1037
- isResume
1038
- ? "Session query initialized, awaiting resumption"
1039
- : "Session query initialized, awaiting initialization",
1040
- { sessionId, taskId, taskRunId: meta?.taskRunId },
1041
- );
1042
-
1043
1031
  if (isResume) {
1044
1032
  // Resume must block on initialization to validate the session is still alive.
1045
1033
  // For stale sessions this throws (e.g. "No conversation found").
@@ -1166,17 +1154,6 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
1166
1154
  this.deferBackgroundFetches(q);
1167
1155
  }
1168
1156
 
1169
- this.logger.info(
1170
- isResume
1171
- ? "Session resumed successfully"
1172
- : "Session created successfully",
1173
- {
1174
- sessionId,
1175
- taskId,
1176
- taskRunId: meta?.taskRunId,
1177
- },
1178
- );
1179
-
1180
1157
  return { sessionId, modes, models, configOptions };
1181
1158
  }
1182
1159
 
@@ -1412,7 +1389,6 @@ export class ClaudeAcpAgent extends BaseAcpAgent {
1412
1389
  * Both populate caches used later — neither is needed to return configOptions.
1413
1390
  */
1414
1391
  private deferBackgroundFetches(q: Query): void {
1415
- this.logger.info("Starting background fetches (commands + MCP metadata)");
1416
1392
  Promise.all([
1417
1393
  new Promise<void>((resolve) => setTimeout(resolve, 10)).then(() =>
1418
1394
  this.sendAvailableCommandsUpdate(),
@@ -503,9 +503,6 @@ export async function hydrateSessionJsonl(params: {
503
503
  const jsonlPath = getSessionJsonlPath(params.sessionId, params.cwd);
504
504
  try {
505
505
  await fs.access(jsonlPath);
506
- log.info("Local JSONL exists, skipping S3 hydration", {
507
- sessionId: params.sessionId,
508
- });
509
506
  return true;
510
507
  } catch {
511
508
  // File doesn't exist, proceed with hydration
package/src/agent.ts CHANGED
@@ -76,9 +76,6 @@ export class Agent {
76
76
  options: TaskExecutionOptions = {},
77
77
  ): Promise<InProcessAcpConnection> {
78
78
  const gatewayConfig = await this._configureLlmGateway(options.gatewayUrl);
79
- this.logger.info("Configured LLM gateway", {
80
- adapter: options.adapter,
81
- });
82
79
  this.taskRunId = taskRunId;
83
80
 
84
81
  let allowedModelIds: Set<string> | undefined;
@@ -70,10 +70,6 @@ export class SessionLogWriter {
70
70
  return;
71
71
  }
72
72
 
73
- this.logger.info("Session registered", {
74
- taskId: context.taskId,
75
- runId: context.runId,
76
- });
77
73
  this.sessions.set(sessionId, { context, currentTurnMessages: [] });
78
74
 
79
75
  this.lastFlushAttemptTime.set(sessionId, Date.now());