@posthog/agent 2.3.670 → 2.3.675

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.
@@ -9471,7 +9471,7 @@ var import_zod4 = require("zod");
9471
9471
  // package.json
9472
9472
  var package_default = {
9473
9473
  name: "@posthog/agent",
9474
- version: "2.3.670",
9474
+ version: "2.3.675",
9475
9475
  repository: "https://github.com/PostHog/code",
9476
9476
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
9477
9477
  exports: {
@@ -14636,11 +14636,25 @@ var signedCommitTool = defineLocalTool({
14636
14636
  description: SIGNED_COMMIT_TOOL_DESCRIPTION,
14637
14637
  schema: signedCommitToolSchema,
14638
14638
  alwaysLoad: true,
14639
- isEnabled: (ctx, meta) => isCloudRun(meta) && !!ctx.token,
14640
- handler: (ctx, args2) => runSignedCommitTool(
14641
- { cwd: ctx.cwd, token: ctx.token ?? "", taskId: ctx.taskId },
14642
- args2
14643
- )
14639
+ isEnabled: (_ctx, meta) => isCloudRun(meta),
14640
+ handler: (ctx, args2) => {
14641
+ const token = ctx.token ?? resolveGithubToken();
14642
+ if (!token) {
14643
+ return Promise.resolve({
14644
+ content: [
14645
+ {
14646
+ type: "text",
14647
+ text: `${SIGNED_COMMIT_TOOL_NAME} failed: no GitHub token in env (GH_TOKEN/GITHUB_TOKEN)`
14648
+ }
14649
+ ],
14650
+ isError: true
14651
+ });
14652
+ }
14653
+ return runSignedCommitTool(
14654
+ { cwd: ctx.cwd, token, taskId: ctx.taskId },
14655
+ args2
14656
+ );
14657
+ }
14644
14658
  });
14645
14659
 
14646
14660
  // src/adapters/local-tools/index.ts