@posthog/agent 2.3.316 → 2.3.326

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.316",
5808
+ version: "2.3.326",
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: {
@@ -12573,6 +12573,9 @@ var setConfigOptionParamsSchema = import_v4.z.object({
12573
12573
  configId: import_v4.z.string().min(1, "configId is required"),
12574
12574
  value: import_v4.z.string().min(1, "value is required")
12575
12575
  });
12576
+ var refreshSessionParamsSchema = import_v4.z.object({
12577
+ mcpServers: mcpServersSchema
12578
+ });
12576
12579
  var commandParamsSchemas = {
12577
12580
  user_message: userMessageParamsSchema,
12578
12581
  "posthog/user_message": userMessageParamsSchema,
@@ -12583,10 +12586,13 @@ var commandParamsSchemas = {
12583
12586
  permission_response: permissionResponseParamsSchema,
12584
12587
  "posthog/permission_response": permissionResponseParamsSchema,
12585
12588
  set_config_option: setConfigOptionParamsSchema,
12586
- "posthog/set_config_option": setConfigOptionParamsSchema
12589
+ "posthog/set_config_option": setConfigOptionParamsSchema,
12590
+ refresh_session: refreshSessionParamsSchema,
12591
+ "posthog/refresh_session": refreshSessionParamsSchema,
12592
+ "_posthog/refresh_session": refreshSessionParamsSchema
12587
12593
  };
12588
12594
  function validateCommandParams(method, params) {
12589
- const schema = commandParamsSchemas[method] ?? commandParamsSchemas[method.replace("posthog/", "")];
12595
+ const schema = commandParamsSchemas[method] ?? commandParamsSchemas[method.replace(/^_?posthog\//, "")];
12590
12596
  if (!schema) {
12591
12597
  return { success: false, error: `Unknown method: ${method}` };
12592
12598
  }
@@ -13056,6 +13062,18 @@ var AgentServer = class _AgentServer {
13056
13062
  configOptions: result.configOptions
13057
13063
  };
13058
13064
  }
13065
+ case POSTHOG_METHODS.REFRESH_SESSION:
13066
+ case "posthog/refresh_session":
13067
+ case "refresh_session": {
13068
+ const mcpServers = Array.isArray(params.mcpServers) ? params.mcpServers : [];
13069
+ this.logger.info("Refresh session requested", {
13070
+ serverCount: mcpServers.length
13071
+ });
13072
+ return await this.session.clientConnection.extMethod(
13073
+ POSTHOG_METHODS.REFRESH_SESSION,
13074
+ { mcpServers }
13075
+ );
13076
+ }
13059
13077
  case POSTHOG_NOTIFICATIONS.PERMISSION_RESPONSE:
13060
13078
  case "permission_response": {
13061
13079
  const requestId = params.requestId;