@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 +5 -2
- package/dist/agent.js.map +1 -1
- package/dist/posthog-api.js +120 -1
- package/dist/posthog-api.js.map +1 -1
- package/dist/server/agent-server.d.ts +1 -0
- package/dist/server/agent-server.js +125 -120
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +125 -120
- package/dist/server/bin.cjs.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/adapters/claude/session/models.ts +1 -0
- package/src/posthog-api.ts +4 -0
- package/src/server/agent-server.ts +3 -0
- package/src/server/types.ts +1 -0
- package/src/types.ts +1 -0
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.
|
|
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 = {}) {
|