@posthog/agent 1.29.0 → 2.0.0
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/index.d.ts +57 -87
- package/dist/index.js +916 -2203
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/acp-extensions.ts +0 -37
- package/src/adapters/claude/claude.ts +515 -107
- package/src/adapters/claude/tools.ts +178 -101
- package/src/adapters/connection.ts +95 -0
- package/src/agent.ts +50 -184
- package/src/file-manager.ts +1 -34
- package/src/git-manager.ts +2 -20
- package/src/posthog-api.ts +4 -4
- package/src/tools/registry.ts +5 -0
- package/src/tools/types.ts +6 -0
- package/src/types.ts +5 -25
- package/src/utils/gateway.ts +15 -0
- package/src/worktree-manager.ts +92 -46
- package/dist/templates/plan-template.md +0 -41
- package/src/agents/execution.ts +0 -37
- package/src/agents/planning.ts +0 -60
- package/src/agents/research.ts +0 -160
- package/src/prompt-builder.ts +0 -497
- package/src/template-manager.ts +0 -240
- package/src/templates/plan-template.md +0 -41
- package/src/workflow/config.ts +0 -53
- package/src/workflow/steps/build.ts +0 -135
- package/src/workflow/steps/finalize.ts +0 -241
- package/src/workflow/steps/plan.ts +0 -167
- package/src/workflow/steps/research.ts +0 -223
- package/src/workflow/types.ts +0 -62
- package/src/workflow/utils.ts +0 -53
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/agent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"repository": "https://github.com/PostHog/array",
|
|
5
5
|
"description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/acp-extensions.ts
CHANGED
|
@@ -13,16 +13,8 @@
|
|
|
13
13
|
* Used with AgentSideConnection.extNotification() or Client.extNotification()
|
|
14
14
|
*/
|
|
15
15
|
export const POSTHOG_NOTIFICATIONS = {
|
|
16
|
-
/** Artifact produced during task execution (research, plan, etc.) */
|
|
17
|
-
ARTIFACT: "_posthog/artifact",
|
|
18
|
-
/** Phase has started (research, plan, build, etc.) */
|
|
19
|
-
PHASE_START: "_posthog/phase_start",
|
|
20
|
-
/** Phase has completed */
|
|
21
|
-
PHASE_COMPLETE: "_posthog/phase_complete",
|
|
22
16
|
/** Git branch was created */
|
|
23
17
|
BRANCH_CREATED: "_posthog/branch_created",
|
|
24
|
-
/** Pull request was created */
|
|
25
|
-
PR_CREATED: "_posthog/pr_created",
|
|
26
18
|
/** Task run has started */
|
|
27
19
|
RUN_STARTED: "_posthog/run_started",
|
|
28
20
|
/** Task has completed */
|
|
@@ -38,36 +30,10 @@ export const POSTHOG_NOTIFICATIONS = {
|
|
|
38
30
|
export type PostHogNotificationType =
|
|
39
31
|
(typeof POSTHOG_NOTIFICATIONS)[keyof typeof POSTHOG_NOTIFICATIONS];
|
|
40
32
|
|
|
41
|
-
export interface ArtifactNotificationPayload {
|
|
42
|
-
sessionId: string;
|
|
43
|
-
kind:
|
|
44
|
-
| "research_evaluation"
|
|
45
|
-
| "research_questions"
|
|
46
|
-
| "plan"
|
|
47
|
-
| "pr_body"
|
|
48
|
-
| string;
|
|
49
|
-
content: unknown;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface PhaseNotificationPayload {
|
|
53
|
-
sessionId: string;
|
|
54
|
-
phase: "research" | "plan" | "build" | "finalize" | string;
|
|
55
|
-
[key: string]: unknown;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
33
|
export interface BranchCreatedPayload {
|
|
59
|
-
sessionId: string;
|
|
60
34
|
branch: string;
|
|
61
35
|
}
|
|
62
36
|
|
|
63
|
-
/**
|
|
64
|
-
* Payload for PR created notification
|
|
65
|
-
*/
|
|
66
|
-
export interface PrCreatedPayload {
|
|
67
|
-
sessionId: string;
|
|
68
|
-
prUrl: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
37
|
export interface RunStartedPayload {
|
|
72
38
|
sessionId: string;
|
|
73
39
|
runId: string;
|
|
@@ -106,10 +72,7 @@ export interface SdkSessionPayload {
|
|
|
106
72
|
}
|
|
107
73
|
|
|
108
74
|
export type PostHogNotificationPayload =
|
|
109
|
-
| ArtifactNotificationPayload
|
|
110
|
-
| PhaseNotificationPayload
|
|
111
75
|
| BranchCreatedPayload
|
|
112
|
-
| PrCreatedPayload
|
|
113
76
|
| RunStartedPayload
|
|
114
77
|
| TaskCompletePayload
|
|
115
78
|
| ErrorNotificationPayload
|