@posthog/agent 2.3.524 → 2.3.526
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 +1 -1
- package/dist/agent.js.map +1 -1
- package/dist/handoff-checkpoint.js +2 -2
- package/dist/handoff-checkpoint.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 +8 -8
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +8 -8
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +3 -3
- package/src/handoff-checkpoint.ts +2 -2
- package/src/server/agent-server.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/agent",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.526",
|
|
4
4
|
"repository": "https://github.com/PostHog/code",
|
|
5
5
|
"description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
6
6
|
"exports": {
|
|
@@ -102,9 +102,9 @@
|
|
|
102
102
|
"tsx": "^4.20.6",
|
|
103
103
|
"typescript": "^5.5.0",
|
|
104
104
|
"vitest": "^2.1.8",
|
|
105
|
-
"@posthog/git": "1.0.0",
|
|
106
105
|
"@posthog/shared": "1.0.0",
|
|
107
|
-
"@posthog/enricher": "1.0.0"
|
|
106
|
+
"@posthog/enricher": "1.0.0",
|
|
107
|
+
"@posthog/git": "1.0.0"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"@agentclientprotocol/sdk": "0.19.0",
|
|
@@ -300,7 +300,7 @@ export class HandoffCheckpointTracker {
|
|
|
300
300
|
checkpoint: GitHandoffCheckpoint,
|
|
301
301
|
uploads: Uploads,
|
|
302
302
|
): void {
|
|
303
|
-
this.logger.
|
|
303
|
+
this.logger.debug("Captured handoff checkpoint", {
|
|
304
304
|
branch: checkpoint.branch,
|
|
305
305
|
head: checkpoint.head?.slice(0, 7),
|
|
306
306
|
totalBytes: this.sumRawBytes(uploads.pack, uploads.index),
|
|
@@ -312,7 +312,7 @@ export class HandoffCheckpointTracker {
|
|
|
312
312
|
_downloads: Downloads,
|
|
313
313
|
totalBytes: number,
|
|
314
314
|
): void {
|
|
315
|
-
this.logger.
|
|
315
|
+
this.logger.debug("Applied handoff checkpoint", {
|
|
316
316
|
branch: checkpoint.branch,
|
|
317
317
|
head: checkpoint.head?.slice(0, 7),
|
|
318
318
|
totalBytes,
|
|
@@ -588,7 +588,7 @@ export class AgentServer {
|
|
|
588
588
|
switch (method) {
|
|
589
589
|
case POSTHOG_NOTIFICATIONS.USER_MESSAGE:
|
|
590
590
|
case "user_message": {
|
|
591
|
-
this.logger.
|
|
591
|
+
this.logger.debug("Received user_message command", {
|
|
592
592
|
hasContent:
|
|
593
593
|
typeof params.content === "string"
|
|
594
594
|
? params.content.trim().length > 0
|
|
@@ -608,7 +608,7 @@ export class AgentServer {
|
|
|
608
608
|
if (prompt.length === 0) {
|
|
609
609
|
throw new Error("User message cannot be empty");
|
|
610
610
|
}
|
|
611
|
-
this.logger.
|
|
611
|
+
this.logger.debug("Built user_message prompt", {
|
|
612
612
|
blockTypes: prompt.map((block) => block.type),
|
|
613
613
|
});
|
|
614
614
|
const promptPreview = promptBlocksToText(prompt);
|
|
@@ -718,7 +718,7 @@ export class AgentServer {
|
|
|
718
718
|
? params.mcpServers
|
|
719
719
|
: [];
|
|
720
720
|
|
|
721
|
-
this.logger.
|
|
721
|
+
this.logger.debug("Refresh session requested", {
|
|
722
722
|
serverCount: mcpServers.length,
|
|
723
723
|
});
|
|
724
724
|
|
|
@@ -1191,7 +1191,7 @@ export class AgentServer {
|
|
|
1191
1191
|
this.resumeState.latestGitCheckpoint,
|
|
1192
1192
|
);
|
|
1193
1193
|
checkpointApplied = true;
|
|
1194
|
-
this.logger.
|
|
1194
|
+
this.logger.debug("Git checkpoint applied", {
|
|
1195
1195
|
branch: this.resumeState.latestGitCheckpoint.branch,
|
|
1196
1196
|
head: this.resumeState.latestGitCheckpoint.head,
|
|
1197
1197
|
packBytes: metrics.packBytes,
|
|
@@ -1314,7 +1314,7 @@ export class AgentServer {
|
|
|
1314
1314
|
taskId: taskRun.task,
|
|
1315
1315
|
runId: taskRun.id,
|
|
1316
1316
|
});
|
|
1317
|
-
this.logger.
|
|
1317
|
+
this.logger.debug("Built pending user prompt", {
|
|
1318
1318
|
hasMessage: typeof message === "string" && message.trim().length > 0,
|
|
1319
1319
|
requestedArtifactCount: artifactIds.length,
|
|
1320
1320
|
blockTypes: prompt.map((block) => block.type),
|