@posthog/agent 2.3.297 → 2.3.302
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 +118 -1
- package/dist/agent.js.map +1 -1
- package/dist/index.d.ts +3 -6
- package/dist/index.js +5 -2
- package/dist/index.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 +119 -3
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +119 -3
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +3 -3
- package/src/acp-extensions.test.ts +72 -0
- package/src/acp-extensions.ts +37 -6
- package/src/adapters/claude/claude-agent.refresh.test.ts +292 -0
- package/src/adapters/claude/claude-agent.ts +121 -1
- package/src/adapters/codex/codex-agent.test.ts +67 -6
- package/src/adapters/codex/codex-agent.ts +20 -0
|
@@ -369,6 +369,12 @@ export class CodexAcpAgent extends BaseAcpAgent {
|
|
|
369
369
|
this.session.interruptReason = undefined;
|
|
370
370
|
resetUsage(this.sessionState);
|
|
371
371
|
|
|
372
|
+
// codex-acp does not echo the user prompt back on the agent→client
|
|
373
|
+
// channel, so without this broadcast the tapped stream (persisted to S3
|
|
374
|
+
// and rendered by the PostHog web UI) never sees a user turn and only
|
|
375
|
+
// the assistant reply shows up. Mirrors ClaudeAcpAgent.broadcastUserMessage.
|
|
376
|
+
await this.broadcastUserMessage(params);
|
|
377
|
+
|
|
372
378
|
const response = await this.codexConnection.prompt(params);
|
|
373
379
|
|
|
374
380
|
// Usage is already accumulated via sessionUpdate notifications in
|
|
@@ -417,6 +423,20 @@ export class CodexAcpAgent extends BaseAcpAgent {
|
|
|
417
423
|
});
|
|
418
424
|
}
|
|
419
425
|
|
|
426
|
+
private async broadcastUserMessage(params: PromptRequest): Promise<void> {
|
|
427
|
+
for (const chunk of params.prompt) {
|
|
428
|
+
const notification = {
|
|
429
|
+
sessionId: params.sessionId,
|
|
430
|
+
update: {
|
|
431
|
+
sessionUpdate: "user_message_chunk" as const,
|
|
432
|
+
content: chunk,
|
|
433
|
+
},
|
|
434
|
+
};
|
|
435
|
+
await this.client.sessionUpdate(notification);
|
|
436
|
+
this.appendNotification(params.sessionId, notification);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
420
440
|
async setSessionMode(
|
|
421
441
|
params: SetSessionModeRequest,
|
|
422
442
|
): Promise<SetSessionModeResponse> {
|