@posthog/agent 1.17.0 → 1.18.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/README.md +6 -2
- package/dist/claude-cli/cli.js +3617 -0
- package/dist/claude-cli/package.json +3 -0
- package/dist/src/posthog-api.d.ts +6 -1
- package/dist/src/posthog-api.d.ts.map +1 -1
- package/dist/src/posthog-api.js +28 -0
- package/dist/src/posthog-api.js.map +1 -1
- package/dist/src/task-progress-reporter.d.ts.map +1 -1
- package/dist/src/task-progress-reporter.js +0 -1
- package/dist/src/task-progress-reporter.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/package.json +1 -1
- package/src/posthog-api.ts +33 -1
- package/src/task-progress-reporter.ts +0 -1
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -93,12 +93,16 @@ const agent = new Agent({
|
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
const poller = setInterval(async () => {
|
|
96
|
-
const
|
|
96
|
+
const client = agent.getPostHogClient();
|
|
97
|
+
const runs = await client?.listTaskRuns(taskId);
|
|
97
98
|
const latestRun = runs?.sort((a, b) =>
|
|
98
99
|
new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
|
|
99
100
|
)[0];
|
|
101
|
+
|
|
100
102
|
if (latestRun) {
|
|
101
|
-
|
|
103
|
+
// Fetch logs from S3 using presigned URL
|
|
104
|
+
const logs = await client?.fetchTaskRunLogs(latestRun);
|
|
105
|
+
renderProgress(latestRun.status, logs || []);
|
|
102
106
|
}
|
|
103
107
|
}, 3000);
|
|
104
108
|
|