@posthog/agent 2.3.466 → 2.3.478
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 +3 -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 +21 -1
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +21 -1
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +1 -1
- package/src/adapters/claude/session/instructions.ts +2 -0
- package/src/server/agent-server.test.ts +29 -0
- package/src/server/agent-server.ts +23 -0
package/dist/server/bin.cjs
CHANGED
|
@@ -8755,7 +8755,7 @@ var import_zod3 = require("zod");
|
|
|
8755
8755
|
// package.json
|
|
8756
8756
|
var package_default = {
|
|
8757
8757
|
name: "@posthog/agent",
|
|
8758
|
-
version: "2.3.
|
|
8758
|
+
version: "2.3.478",
|
|
8759
8759
|
repository: "https://github.com/PostHog/code",
|
|
8760
8760
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
8761
8761
|
exports: {
|
|
@@ -15817,6 +15817,8 @@ var BRANCH_NAMING = `
|
|
|
15817
15817
|
# Branch Naming
|
|
15818
15818
|
|
|
15819
15819
|
When working in a detached HEAD state, create a descriptive branch name based on the work being done before committing. Do this automatically without asking the user.
|
|
15820
|
+
|
|
15821
|
+
When creating a new branch, prefix it with \`posthog-code/\` (e.g. \`posthog-code/fix-login-redirect\`).
|
|
15820
15822
|
`;
|
|
15821
15823
|
var PLAN_MODE = `
|
|
15822
15824
|
# Plan Mode
|
|
@@ -21271,6 +21273,24 @@ var AgentServer = class {
|
|
|
21271
21273
|
);
|
|
21272
21274
|
await logAgentshRuntimeInfo(this.logger);
|
|
21273
21275
|
this.logger.debug(`Initial permission mode: ${initialPermissionMode}`);
|
|
21276
|
+
const runStartedNotification = {
|
|
21277
|
+
jsonrpc: "2.0",
|
|
21278
|
+
method: POSTHOG_NOTIFICATIONS.RUN_STARTED,
|
|
21279
|
+
params: {
|
|
21280
|
+
sessionId: acpSessionId,
|
|
21281
|
+
runId: payload.run_id,
|
|
21282
|
+
taskId: payload.task_id
|
|
21283
|
+
}
|
|
21284
|
+
};
|
|
21285
|
+
this.broadcastEvent({
|
|
21286
|
+
type: "notification",
|
|
21287
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21288
|
+
notification: runStartedNotification
|
|
21289
|
+
});
|
|
21290
|
+
this.session.logWriter.appendRawLine(
|
|
21291
|
+
payload.run_id,
|
|
21292
|
+
JSON.stringify(runStartedNotification)
|
|
21293
|
+
);
|
|
21274
21294
|
this.posthogAPI.updateTaskRun(payload.task_id, payload.run_id, {
|
|
21275
21295
|
status: "in_progress"
|
|
21276
21296
|
}).catch(
|