@posthog/agent 2.3.696 → 2.3.703
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 +19 -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 +19 -1
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +19 -1
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +2 -2
- package/src/adapters/claude/claude-agent.slash-command.test.ts +153 -0
- package/src/adapters/claude/claude-agent.ts +22 -0
package/dist/agent.js
CHANGED
|
@@ -4674,7 +4674,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
4674
4674
|
// package.json
|
|
4675
4675
|
var package_default = {
|
|
4676
4676
|
name: "@posthog/agent",
|
|
4677
|
-
version: "2.3.
|
|
4677
|
+
version: "2.3.703",
|
|
4678
4678
|
repository: "https://github.com/PostHog/code",
|
|
4679
4679
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
4680
4680
|
exports: {
|
|
@@ -18458,6 +18458,24 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
|
|
|
18458
18458
|
}
|
|
18459
18459
|
if (message.subtype === "session_state_changed" && message.state === "idle") {
|
|
18460
18460
|
if (!promptReplayed) {
|
|
18461
|
+
if (commandMatch) {
|
|
18462
|
+
const cmd = commandMatch[1];
|
|
18463
|
+
this.logger.warn(
|
|
18464
|
+
"Slash command produced no output; treating as unsupported",
|
|
18465
|
+
{ sessionId: params.sessionId, command: cmd }
|
|
18466
|
+
);
|
|
18467
|
+
await this.client.sessionUpdate({
|
|
18468
|
+
sessionId: params.sessionId,
|
|
18469
|
+
update: {
|
|
18470
|
+
sessionUpdate: "agent_message_chunk",
|
|
18471
|
+
content: {
|
|
18472
|
+
type: "text",
|
|
18473
|
+
text: `Unsupported slash command: \`${cmd}\`. PostHog Code does not implement this command.`
|
|
18474
|
+
}
|
|
18475
|
+
}
|
|
18476
|
+
});
|
|
18477
|
+
return { stopReason: "end_turn" };
|
|
18478
|
+
}
|
|
18461
18479
|
this.logger.debug("Skipping idle state before prompt replay", {
|
|
18462
18480
|
sessionId: params.sessionId
|
|
18463
18481
|
});
|