@posthog/agent 2.3.504 → 2.3.507

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.
@@ -8755,7 +8755,7 @@ var import_zod3 = require("zod");
8755
8755
  // package.json
8756
8756
  var package_default = {
8757
8757
  name: "@posthog/agent",
8758
- version: "2.3.504",
8758
+ version: "2.3.507",
8759
8759
  repository: "https://github.com/PostHog/code",
8760
8760
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
8761
8761
  exports: {
@@ -21753,6 +21753,15 @@ ${attributionInstructions}
21753
21753
  `;
21754
21754
  }
21755
21755
  if (!this.config.repositoryPath) {
21756
+ const publishInstructions = this.config.createPr === false ? `
21757
+ When the user asks for code changes:
21758
+ - You may clone a repository and make local edits in that clone
21759
+ - Do NOT create branches, commits, push changes, or open pull requests in this run` : `
21760
+ When the user explicitly asks to clone or work in a GitHub repository:
21761
+ - Clone the repository into /tmp/workspace/repos/<owner>/<repo> using \`gh repo clone <owner>/<repo> /tmp/workspace/repos/<owner>/<repo>\`
21762
+ - Work from inside that cloned repository for follow-up code changes
21763
+ - If the user explicitly asks you to open or update a pull request, create a branch, commit the requested changes, push it, and open a draft pull request from inside the clone
21764
+ - Do NOT create branches, commits, push changes, or open pull requests unless the user explicitly asks for that`;
21756
21765
  return `
21757
21766
  # Cloud Task Execution \u2014 No Repository Mode
21758
21767
 
@@ -21765,11 +21774,12 @@ When the user asks about analytics, data, metrics, events, funnels, dashboards,
21765
21774
 
21766
21775
  When the user asks for code changes or software engineering tasks:
21767
21776
  - Let them know you can help but don't have a repository connected for this session
21768
- - Offer to write code snippets, scripts, or provide guidance
21777
+ - If they have not specified a repository to clone, offer to write code snippets, scripts, or provide guidance
21778
+ ${publishInstructions}
21769
21779
 
21770
21780
  Important:
21771
- - Do NOT create branches, commits, or pull requests in this mode.
21772
21781
  - Prefer using MCP tools to answer questions with real data over giving generic advice.
21782
+ ${attributionInstructions}
21773
21783
  `;
21774
21784
  }
21775
21785
  if (!shouldAutoCreatePr) {