@posthog/agent 2.3.285 → 2.3.293
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 +8 -5
- package/dist/agent.js.map +1 -1
- package/dist/posthog-api.d.ts +2 -1
- package/dist/posthog-api.js +12 -5
- package/dist/posthog-api.js.map +1 -1
- package/dist/server/agent-server.d.ts +1 -1
- package/dist/server/agent-server.js +11 -7
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +11 -7
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +3 -3
- package/src/posthog-api.ts +2 -2
- package/src/server/agent-server.test.ts +10 -0
- package/src/server/agent-server.ts +3 -2
- package/src/utils/gateway.ts +18 -10
package/dist/agent.js
CHANGED
|
@@ -245,7 +245,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
245
245
|
// package.json
|
|
246
246
|
var package_default = {
|
|
247
247
|
name: "@posthog/agent",
|
|
248
|
-
version: "2.3.
|
|
248
|
+
version: "2.3.293",
|
|
249
249
|
repository: "https://github.com/PostHog/code",
|
|
250
250
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
251
251
|
exports: {
|
|
@@ -4979,17 +4979,20 @@ function createCodexConnection(config) {
|
|
|
4979
4979
|
}
|
|
4980
4980
|
|
|
4981
4981
|
// src/utils/gateway.ts
|
|
4982
|
-
function
|
|
4982
|
+
function getGatewayBaseUrl(posthogHost) {
|
|
4983
4983
|
const url = new URL(posthogHost);
|
|
4984
4984
|
const hostname = url.hostname;
|
|
4985
4985
|
if (hostname === "localhost" || hostname === "127.0.0.1") {
|
|
4986
|
-
return `${url.protocol}//localhost:3308
|
|
4986
|
+
return `${url.protocol}//localhost:3308`;
|
|
4987
4987
|
}
|
|
4988
4988
|
if (hostname === "host.docker.internal") {
|
|
4989
|
-
return `${url.protocol}//host.docker.internal:3308
|
|
4989
|
+
return `${url.protocol}//host.docker.internal:3308`;
|
|
4990
4990
|
}
|
|
4991
4991
|
const region = hostname.match(/^(us|eu)\.posthog\.com$/)?.[1] ?? "us";
|
|
4992
|
-
return `https://gateway.${region}.posthog.com
|
|
4992
|
+
return `https://gateway.${region}.posthog.com`;
|
|
4993
|
+
}
|
|
4994
|
+
function getLlmGatewayUrl(posthogHost, product = "posthog_code") {
|
|
4995
|
+
return `${getGatewayBaseUrl(posthogHost)}/${product}`;
|
|
4993
4996
|
}
|
|
4994
4997
|
|
|
4995
4998
|
// src/posthog-api.ts
|