@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
package/dist/server/bin.cjs
CHANGED
|
@@ -1175,7 +1175,7 @@ var import_uuid = require("uuid");
|
|
|
1175
1175
|
// package.json
|
|
1176
1176
|
var package_default = {
|
|
1177
1177
|
name: "@posthog/agent",
|
|
1178
|
-
version: "2.1.
|
|
1178
|
+
version: "2.1.87",
|
|
1179
1179
|
repository: "https://github.com/PostHog/twig",
|
|
1180
1180
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
1181
1181
|
exports: {
|
|
@@ -1235,7 +1235,7 @@ var package_default = {
|
|
|
1235
1235
|
author: "PostHog",
|
|
1236
1236
|
license: "SEE LICENSE IN LICENSE",
|
|
1237
1237
|
scripts: {
|
|
1238
|
-
build: "tsup",
|
|
1238
|
+
build: "rm -rf dist && tsup",
|
|
1239
1239
|
dev: "tsup --watch",
|
|
1240
1240
|
test: "vitest run",
|
|
1241
1241
|
"test:watch": "vitest",
|
|
@@ -2001,6 +2001,28 @@ function toolUpdateFromToolResult(toolResult, toolUse) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
return { title: "Question answered" };
|
|
2003
2003
|
}
|
|
2004
|
+
case "WebFetch": {
|
|
2005
|
+
const input = toolUse?.input;
|
|
2006
|
+
const url = input?.url ? String(input.url) : "";
|
|
2007
|
+
const prompt = input?.prompt ? String(input.prompt) : void 0;
|
|
2008
|
+
const resultContent = toAcpContentUpdate(
|
|
2009
|
+
toolResult.content,
|
|
2010
|
+
"is_error" in toolResult ? toolResult.is_error : false
|
|
2011
|
+
);
|
|
2012
|
+
const content = [];
|
|
2013
|
+
if (url) {
|
|
2014
|
+
content.push({
|
|
2015
|
+
type: "content",
|
|
2016
|
+
content: resourceLink(url, url, {
|
|
2017
|
+
description: prompt
|
|
2018
|
+
})
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
if (resultContent.content) {
|
|
2022
|
+
content.push(...resultContent.content);
|
|
2023
|
+
}
|
|
2024
|
+
return { content };
|
|
2025
|
+
}
|
|
2004
2026
|
default: {
|
|
2005
2027
|
return toAcpContentUpdate(
|
|
2006
2028
|
toolResult.content,
|