@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.
@@ -5805,7 +5805,7 @@ var import_hono = require("hono");
5805
5805
  // package.json
5806
5806
  var package_default = {
5807
5807
  name: "@posthog/agent",
5808
- version: "2.3.285",
5808
+ version: "2.3.293",
5809
5809
  repository: "https://github.com/PostHog/code",
5810
5810
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
5811
5811
  exports: {
@@ -10683,17 +10683,20 @@ function selectRecentTurns(turns, maxTokens = DEFAULT_MAX_TOKENS) {
10683
10683
  }
10684
10684
 
10685
10685
  // src/utils/gateway.ts
10686
- function getLlmGatewayUrl(posthogHost, product = "posthog_code") {
10686
+ function getGatewayBaseUrl(posthogHost) {
10687
10687
  const url = new URL(posthogHost);
10688
10688
  const hostname = url.hostname;
10689
10689
  if (hostname === "localhost" || hostname === "127.0.0.1") {
10690
- return `${url.protocol}//localhost:3308/${product}`;
10690
+ return `${url.protocol}//localhost:3308`;
10691
10691
  }
10692
10692
  if (hostname === "host.docker.internal") {
10693
- return `${url.protocol}//host.docker.internal:3308/${product}`;
10693
+ return `${url.protocol}//host.docker.internal:3308`;
10694
10694
  }
10695
10695
  const region = hostname.match(/^(us|eu)\.posthog\.com$/)?.[1] ?? "us";
10696
- return `https://gateway.${region}.posthog.com/${product}`;
10696
+ return `https://gateway.${region}.posthog.com`;
10697
+ }
10698
+ function getLlmGatewayUrl(posthogHost, product = "posthog_code") {
10699
+ return `${getGatewayBaseUrl(posthogHost)}/${product}`;
10697
10700
  }
10698
10701
 
10699
10702
  // src/posthog-api.ts
@@ -13294,12 +13297,13 @@ ${toolSummary}`);
13294
13297
  return process.env.POSTHOG_CODE_INTERACTION_ORIGIN ?? process.env.CODE_INTERACTION_ORIGIN ?? process.env.TWIG_INTERACTION_ORIGIN;
13295
13298
  }
13296
13299
  /**
13297
- * Slack-origin cloud runs auto-publish by default. Every other origin is
13300
+ * Automated-origin cloud runs auto-publish by default. Every other origin is
13298
13301
  * review-first unless the user explicitly asks, and createPr=false always
13299
13302
  * disables publishing.
13300
13303
  */
13301
13304
  shouldAutoPublishCloudChanges() {
13302
- return this.getCloudInteractionOrigin() === "slack" && this.config.createPr !== false;
13305
+ const origin = this.getCloudInteractionOrigin();
13306
+ return (origin === "slack" || origin === "signal_report") && this.config.createPr !== false;
13303
13307
  }
13304
13308
  buildDetectedPrContext(prUrl) {
13305
13309
  if (!this.shouldAutoPublishCloudChanges()) {