@posthog/agent 2.1.2 → 2.1.5

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.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.2",
1177
+ version: "2.1.5",
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: {
@@ -4504,20 +4504,22 @@ var Agent = class {
4504
4504
  if (config.posthog) {
4505
4505
  this.posthogAPI = new PostHogAPIClient(config.posthog);
4506
4506
  }
4507
- if (config.otelTransport) {
4508
- this.sessionLogWriter = new SessionLogWriter({
4509
- otelConfig: {
4510
- posthogHost: config.otelTransport.host,
4511
- apiKey: config.otelTransport.apiKey,
4512
- logsPath: config.otelTransport.logsPath
4513
- },
4514
- logger: this.logger.child("SessionLogWriter")
4515
- });
4516
- } else if (config.posthog) {
4517
- this.sessionLogWriter = new SessionLogWriter({
4518
- posthogAPI: this.posthogAPI,
4519
- logger: this.logger.child("SessionLogWriter")
4520
- });
4507
+ if (!config.skipLogPersistence) {
4508
+ if (config.otelTransport) {
4509
+ this.sessionLogWriter = new SessionLogWriter({
4510
+ otelConfig: {
4511
+ posthogHost: config.otelTransport.host,
4512
+ apiKey: config.otelTransport.apiKey,
4513
+ logsPath: config.otelTransport.logsPath
4514
+ },
4515
+ logger: this.logger.child("SessionLogWriter")
4516
+ });
4517
+ } else if (config.posthog) {
4518
+ this.sessionLogWriter = new SessionLogWriter({
4519
+ posthogAPI: this.posthogAPI,
4520
+ logger: this.logger.child("SessionLogWriter")
4521
+ });
4522
+ }
4521
4523
  }
4522
4524
  }
4523
4525
  _configureLlmGateway(_adapter) {