@posthog/agent 2.1.83 → 2.1.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/agent",
3
- "version": "2.1.83",
3
+ "version": "2.1.87",
4
4
  "repository": "https://github.com/PostHog/twig",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -104,7 +104,7 @@
104
104
  "access": "public"
105
105
  },
106
106
  "scripts": {
107
- "build": "tsup",
107
+ "build": "rm -rf dist && tsup",
108
108
  "dev": "tsup --watch",
109
109
  "test": "vitest run",
110
110
  "test:watch": "vitest",
@@ -554,6 +554,31 @@ export function toolUpdateFromToolResult(
554
554
  }
555
555
  return { title: "Question answered" };
556
556
  }
557
+ case "WebFetch": {
558
+ const input = toolUse?.input as Record<string, unknown> | undefined;
559
+ const url = input?.url ? String(input.url) : "";
560
+ const prompt = input?.prompt ? String(input.prompt) : undefined;
561
+
562
+ const resultContent = toAcpContentUpdate(
563
+ toolResult.content,
564
+ "is_error" in toolResult ? toolResult.is_error : false,
565
+ );
566
+
567
+ const content: ToolCallContent[] = [];
568
+ if (url) {
569
+ content.push({
570
+ type: "content",
571
+ content: resourceLink(url, url, {
572
+ description: prompt,
573
+ }),
574
+ });
575
+ }
576
+ if (resultContent.content) {
577
+ content.push(...resultContent.content);
578
+ }
579
+
580
+ return { content };
581
+ }
557
582
  default: {
558
583
  return toAcpContentUpdate(
559
584
  toolResult.content,