@posthog/agent 2.3.259 → 2.3.263

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 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.259",
248
+ version: "2.3.263",
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: {
@@ -406,7 +406,9 @@ var POSTHOG_NOTIFICATIONS = {
406
406
  /** Marks a boundary for log compaction */
407
407
  COMPACT_BOUNDARY: "_posthog/compact_boundary",
408
408
  /** Token usage update for a session turn */
409
- USAGE_UPDATE: "_posthog/usage_update"
409
+ USAGE_UPDATE: "_posthog/usage_update",
410
+ /** Response to a relayed permission request (plan approval, question) */
411
+ PERMISSION_RESPONSE: "_posthog/permission_response"
410
412
  };
411
413
 
412
414
  // src/utils/common.ts
@@ -2635,6 +2637,11 @@ async function canUseTool(context) {
2635
2637
  if (planFileResult) {
2636
2638
  return planFileResult;
2637
2639
  }
2640
+ if (session.permissionMode === "plan") {
2641
+ const message = `This tool is not available in plan mode. Write your plan to a file in ${getClaudePlansDir()} and call ExitPlanMode when ready.`;
2642
+ await emitToolDenial(context, message);
2643
+ return { behavior: "deny", message, interrupt: false };
2644
+ }
2638
2645
  return handleDefaultPermissionFlow(context);
2639
2646
  }
2640
2647