@posthog/agent 2.3.406 → 2.3.425
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/agent.js +14 -1
- package/dist/agent.js.map +1 -1
- package/dist/posthog-api.js +1 -1
- package/dist/posthog-api.js.map +1 -1
- package/dist/server/agent-server.js +91 -11
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +94 -14
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +3 -3
- package/src/server/agent-server.ts +2 -0
- package/src/server/agentsh-runtime.test.ts +107 -0
- package/src/server/agentsh-runtime.ts +97 -0
package/dist/agent.js
CHANGED
|
@@ -4030,7 +4030,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
4030
4030
|
// package.json
|
|
4031
4031
|
var package_default = {
|
|
4032
4032
|
name: "@posthog/agent",
|
|
4033
|
-
version: "2.3.
|
|
4033
|
+
version: "2.3.425",
|
|
4034
4034
|
repository: "https://github.com/PostHog/code",
|
|
4035
4035
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
4036
4036
|
exports: {
|
|
@@ -7974,6 +7974,8 @@ var ParseResult = class {
|
|
|
7974
7974
|
return this.calls.filter((c) => CAPTURE_METHODS.has(c.method)).map((c) => ({
|
|
7975
7975
|
name: c.key,
|
|
7976
7976
|
line: c.line,
|
|
7977
|
+
keyStartCol: c.keyStartCol,
|
|
7978
|
+
keyEndCol: c.keyEndCol,
|
|
7977
7979
|
dynamic: c.dynamic ?? false,
|
|
7978
7980
|
viaWrapper: c.viaWrapper,
|
|
7979
7981
|
inJsx: c.inJsx
|
|
@@ -7984,6 +7986,8 @@ var ParseResult = class {
|
|
|
7984
7986
|
method: c.method,
|
|
7985
7987
|
flagKey: c.key,
|
|
7986
7988
|
line: c.line,
|
|
7989
|
+
keyStartCol: c.keyStartCol,
|
|
7990
|
+
keyEndCol: c.keyEndCol,
|
|
7987
7991
|
viaWrapper: c.viaWrapper,
|
|
7988
7992
|
inJsx: c.inJsx
|
|
7989
7993
|
}));
|
|
@@ -8133,6 +8137,15 @@ var PostHogEnricher = class {
|
|
|
8133
8137
|
settled[4]
|
|
8134
8138
|
);
|
|
8135
8139
|
}
|
|
8140
|
+
/**
|
|
8141
|
+
* Detect wrapper functions (functions that internally call a PostHog SDK
|
|
8142
|
+
* method) defined in the given source. Used by callers like `enrichSource`
|
|
8143
|
+
* to pick up same-file wrappers such as `track(...)` without threading
|
|
8144
|
+
* through filesystem I/O.
|
|
8145
|
+
*/
|
|
8146
|
+
async findWrappersInSource(source, languageId) {
|
|
8147
|
+
return this.detector.findWrappers(source, languageId);
|
|
8148
|
+
}
|
|
8136
8149
|
async parseFile(filePath) {
|
|
8137
8150
|
const ext = path3.extname(filePath).toLowerCase();
|
|
8138
8151
|
const languageId = EXT_TO_LANG_ID[ext];
|