@posthog/agent 2.1.89 → 2.1.105

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/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.89",
279
+ version: "2.1.105",
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: {
@@ -2260,6 +2260,7 @@ var GATEWAY_TO_SDK_MODEL = {
2260
2260
  "claude-opus-4-5": "opus",
2261
2261
  "claude-opus-4-6": "opus",
2262
2262
  "claude-sonnet-4-5": "sonnet",
2263
+ "claude-sonnet-4-6": "sonnet",
2263
2264
  "claude-haiku-4-5": "haiku"
2264
2265
  };
2265
2266
  function toSdkModelId(modelId) {
@@ -3340,6 +3341,7 @@ function getLlmGatewayUrl(posthogHost) {
3340
3341
  }
3341
3342
 
3342
3343
  // src/posthog-api.ts
3344
+ var DEFAULT_USER_AGENT = `posthog/agent.hog.dev; version: ${package_default.version}`;
3343
3345
  var PostHogAPIClient = class {
3344
3346
  config;
3345
3347
  constructor(config) {
@@ -3352,7 +3354,8 @@ var PostHogAPIClient = class {
3352
3354
  get headers() {
3353
3355
  return {
3354
3356
  Authorization: `Bearer ${this.config.getApiKey()}`,
3355
- "Content-Type": "application/json"
3357
+ "Content-Type": "application/json",
3358
+ "User-Agent": this.config.userAgent ?? DEFAULT_USER_AGENT
3356
3359
  };
3357
3360
  }
3358
3361
  async apiRequest(endpoint, options = {}) {