@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/dist/adapters/claude/conversion/tool-use-to-acp.js +22 -0
- package/dist/adapters/claude/conversion/tool-use-to-acp.js.map +1 -1
- package/dist/agent.js +24 -2
- package/dist/agent.js.map +1 -1
- package/dist/server/agent-server.js +24 -2
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +24 -2
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +2 -2
- package/src/adapters/claude/conversion/tool-use-to-acp.ts +25 -0
|
@@ -1183,7 +1183,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
1183
1183
|
// package.json
|
|
1184
1184
|
var package_default = {
|
|
1185
1185
|
name: "@posthog/agent",
|
|
1186
|
-
version: "2.1.
|
|
1186
|
+
version: "2.1.87",
|
|
1187
1187
|
repository: "https://github.com/PostHog/twig",
|
|
1188
1188
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
1189
1189
|
exports: {
|
|
@@ -1243,7 +1243,7 @@ var package_default = {
|
|
|
1243
1243
|
author: "PostHog",
|
|
1244
1244
|
license: "SEE LICENSE IN LICENSE",
|
|
1245
1245
|
scripts: {
|
|
1246
|
-
build: "tsup",
|
|
1246
|
+
build: "rm -rf dist && tsup",
|
|
1247
1247
|
dev: "tsup --watch",
|
|
1248
1248
|
test: "vitest run",
|
|
1249
1249
|
"test:watch": "vitest",
|
|
@@ -2009,6 +2009,28 @@ function toolUpdateFromToolResult(toolResult, toolUse) {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
return { title: "Question answered" };
|
|
2011
2011
|
}
|
|
2012
|
+
case "WebFetch": {
|
|
2013
|
+
const input = toolUse?.input;
|
|
2014
|
+
const url = input?.url ? String(input.url) : "";
|
|
2015
|
+
const prompt = input?.prompt ? String(input.prompt) : void 0;
|
|
2016
|
+
const resultContent = toAcpContentUpdate(
|
|
2017
|
+
toolResult.content,
|
|
2018
|
+
"is_error" in toolResult ? toolResult.is_error : false
|
|
2019
|
+
);
|
|
2020
|
+
const content = [];
|
|
2021
|
+
if (url) {
|
|
2022
|
+
content.push({
|
|
2023
|
+
type: "content",
|
|
2024
|
+
content: resourceLink(url, url, {
|
|
2025
|
+
description: prompt
|
|
2026
|
+
})
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
if (resultContent.content) {
|
|
2030
|
+
content.push(...resultContent.content);
|
|
2031
|
+
}
|
|
2032
|
+
return { content };
|
|
2033
|
+
}
|
|
2012
2034
|
default: {
|
|
2013
2035
|
return toAcpContentUpdate(
|
|
2014
2036
|
toolResult.content,
|