@posthog/agent 2.3.302 → 2.3.304

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.302",
5808
+ version: "2.3.304",
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: {
@@ -10334,6 +10334,16 @@ function toCodexPermissionMode(mode) {
10334
10334
  }
10335
10335
  return "auto";
10336
10336
  }
10337
+ function prependPrContext(params) {
10338
+ const prContext = params._meta?.prContext;
10339
+ if (typeof prContext !== "string" || prContext.length === 0) {
10340
+ return params;
10341
+ }
10342
+ return {
10343
+ ...params,
10344
+ prompt: [{ type: "text", text: prContext }, ...params.prompt]
10345
+ };
10346
+ }
10337
10347
  var CODEX_NATIVE_MODE = {
10338
10348
  default: "auto",
10339
10349
  acceptEdits: "auto",
@@ -10541,7 +10551,9 @@ var CodexAcpAgent = class extends BaseAcpAgent {
10541
10551
  this.session.interruptReason = void 0;
10542
10552
  resetUsage(this.sessionState);
10543
10553
  await this.broadcastUserMessage(params);
10544
- const response = await this.codexConnection.prompt(params);
10554
+ const response = await this.codexConnection.prompt(
10555
+ prependPrContext(params)
10556
+ );
10545
10557
  if (this.sessionState.taskRunId) {
10546
10558
  const { accumulatedUsage } = this.sessionState;
10547
10559
  await this.client.extNotification(POSTHOG_NOTIFICATIONS.TURN_COMPLETE, {