@posthog/agent 1.30.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 +51 -95
- package/dist/index.js +887 -2187
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/acp-extensions.ts +1 -51
- package/src/adapters/claude/claude.ts +508 -104
- package/src/adapters/claude/tools.ts +178 -101
- package/src/adapters/connection.ts +95 -0
- package/src/agent.ts +30 -176
- package/src/file-manager.ts +1 -34
- package/src/tools/registry.ts +5 -0
- package/src/tools/types.ts +6 -0
- package/src/types.ts +3 -23
- 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 -499
- package/src/template-manager.ts +0 -236
- 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 */
|
|
@@ -33,43 +25,15 @@ export const POSTHOG_NOTIFICATIONS = {
|
|
|
33
25
|
CONSOLE: "_posthog/console",
|
|
34
26
|
/** SDK session ID notification (for resumption) */
|
|
35
27
|
SDK_SESSION: "_posthog/sdk_session",
|
|
36
|
-
/** Sandbox execution output (stdout/stderr from Modal or Docker) */
|
|
37
|
-
SANDBOX_OUTPUT: "_posthog/sandbox_output",
|
|
38
28
|
} as const;
|
|
39
29
|
|
|
40
30
|
export type PostHogNotificationType =
|
|
41
31
|
(typeof POSTHOG_NOTIFICATIONS)[keyof typeof POSTHOG_NOTIFICATIONS];
|
|
42
32
|
|
|
43
|
-
export interface ArtifactNotificationPayload {
|
|
44
|
-
sessionId: string;
|
|
45
|
-
kind:
|
|
46
|
-
| "research_evaluation"
|
|
47
|
-
| "research_questions"
|
|
48
|
-
| "plan"
|
|
49
|
-
| "pr_body"
|
|
50
|
-
| string;
|
|
51
|
-
content: unknown;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface PhaseNotificationPayload {
|
|
55
|
-
sessionId: string;
|
|
56
|
-
phase: "research" | "plan" | "build" | "finalize" | string;
|
|
57
|
-
[key: string]: unknown;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
33
|
export interface BranchCreatedPayload {
|
|
61
|
-
sessionId: string;
|
|
62
34
|
branch: string;
|
|
63
35
|
}
|
|
64
36
|
|
|
65
|
-
/**
|
|
66
|
-
* Payload for PR created notification
|
|
67
|
-
*/
|
|
68
|
-
export interface PrCreatedPayload {
|
|
69
|
-
sessionId: string;
|
|
70
|
-
prUrl: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
37
|
export interface RunStartedPayload {
|
|
74
38
|
sessionId: string;
|
|
75
39
|
runId: string;
|
|
@@ -107,24 +71,10 @@ export interface SdkSessionPayload {
|
|
|
107
71
|
sdkSessionId: string;
|
|
108
72
|
}
|
|
109
73
|
|
|
110
|
-
/**
|
|
111
|
-
* Sandbox execution output
|
|
112
|
-
*/
|
|
113
|
-
export interface SandboxOutputPayload {
|
|
114
|
-
sessionId: string;
|
|
115
|
-
stdout: string;
|
|
116
|
-
stderr: string;
|
|
117
|
-
exitCode: number;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
74
|
export type PostHogNotificationPayload =
|
|
121
|
-
| ArtifactNotificationPayload
|
|
122
|
-
| PhaseNotificationPayload
|
|
123
75
|
| BranchCreatedPayload
|
|
124
|
-
| PrCreatedPayload
|
|
125
76
|
| RunStartedPayload
|
|
126
77
|
| TaskCompletePayload
|
|
127
78
|
| ErrorNotificationPayload
|
|
128
79
|
| ConsoleNotificationPayload
|
|
129
|
-
| SdkSessionPayload
|
|
130
|
-
| SandboxOutputPayload;
|
|
80
|
+
| SdkSessionPayload;
|