@posthog/agent 2.3.293 → 2.3.297

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.293",
5808
+ version: "2.3.297",
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: {
@@ -12865,6 +12865,7 @@ var AgentServer = class _AgentServer {
12865
12865
  await this.initializationPromise;
12866
12866
  if (this.session && sseController) {
12867
12867
  this.session.sseController = sseController;
12868
+ this.session.hasDesktopConnected = true;
12868
12869
  this.replayPendingEvents();
12869
12870
  }
12870
12871
  return;
@@ -13555,11 +13556,12 @@ ${attributionInstructions}
13555
13556
  {
13556
13557
  const isQuestion = codeToolKind === "question";
13557
13558
  const sessionPermissionMode = this.getSessionPermissionMode();
13558
- const needsRelay = isQuestion || isPlanApproval || this.shouldRelayPermissionToClient(sessionPermissionMode);
13559
- if (needsRelay && this.session?.hasDesktopConnected) {
13560
- this.logger.info("Relaying permission to connected client", {
13559
+ const needsDesktopApproval = isQuestion || this.shouldRelayPermissionToClient(sessionPermissionMode);
13560
+ if (isPlanApproval || needsDesktopApproval && this.session?.hasDesktopConnected) {
13561
+ this.logger.info("Relaying permission request", {
13561
13562
  kind: params.toolCall?.kind,
13562
13563
  isQuestion,
13564
+ hasDesktopConnected: this.session?.hasDesktopConnected ?? false,
13563
13565
  sessionPermissionMode
13564
13566
  });
13565
13567
  return this.relayPermissionToClient(params);