@posthog/agent 2.1.87 → 2.1.98
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 +4 -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 +147 -139
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +147 -139
- package/dist/server/bin.cjs.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/posthog-api.ts +4 -0
- package/src/server/agent-server.ts +29 -28
- 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.98",
|
|
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: {
|
|
@@ -3340,6 +3340,7 @@ function getLlmGatewayUrl(posthogHost) {
|
|
|
3340
3340
|
}
|
|
3341
3341
|
|
|
3342
3342
|
// src/posthog-api.ts
|
|
3343
|
+
var DEFAULT_USER_AGENT = `posthog/agent.hog.dev; version: ${package_default.version}`;
|
|
3343
3344
|
var PostHogAPIClient = class {
|
|
3344
3345
|
config;
|
|
3345
3346
|
constructor(config) {
|
|
@@ -3352,7 +3353,8 @@ var PostHogAPIClient = class {
|
|
|
3352
3353
|
get headers() {
|
|
3353
3354
|
return {
|
|
3354
3355
|
Authorization: `Bearer ${this.config.getApiKey()}`,
|
|
3355
|
-
"Content-Type": "application/json"
|
|
3356
|
+
"Content-Type": "application/json",
|
|
3357
|
+
"User-Agent": this.config.userAgent ?? DEFAULT_USER_AGENT
|
|
3356
3358
|
};
|
|
3357
3359
|
}
|
|
3358
3360
|
async apiRequest(endpoint, options = {}) {
|