@posthog/agent 2.3.517 → 2.3.520

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/agent",
3
- "version": "2.3.517",
3
+ "version": "2.3.520",
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": {
@@ -90,7 +90,7 @@
90
90
  "typescript"
91
91
  ],
92
92
  "author": "PostHog",
93
- "license": "SEE LICENSE IN LICENSE",
93
+ "license": "MIT",
94
94
  "engines": {
95
95
  "node": ">=20.0.0"
96
96
  },
@@ -463,6 +463,15 @@ describe("AgentServer HTTP Mode", () => {
463
463
  runId: "test-run-id",
464
464
  taskId: "test-task-id",
465
465
  });
466
+ // Agent reports its semver so clients can gate UI features
467
+ // against agent capabilities (e.g. `>=0.40.1`). The exact value
468
+ // is whatever the agent's package.json was at build time.
469
+ expect(typeof runStarted?.notification?.params?.agentVersion).toBe(
470
+ "string",
471
+ );
472
+ expect(
473
+ (runStarted?.notification?.params?.agentVersion as string).length,
474
+ ).toBeGreaterThan(0);
466
475
  },
467
476
  { timeout: 15000, interval: 100 },
468
477
  );
@@ -1003,6 +1003,7 @@ export class AgentServer {
1003
1003
  sessionId: acpSessionId,
1004
1004
  runId: payload.run_id,
1005
1005
  taskId: payload.task_id,
1006
+ agentVersion: this.config.version ?? packageJson.version,
1006
1007
  },
1007
1008
  };
1008
1009
  this.broadcastEvent({