@posthog/agent 2.3.657 → 2.3.663
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 +7 -2
- 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.d.ts +4 -0
- package/dist/server/agent-server.js +712 -4
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +720 -7
- package/dist/server/bin.cjs.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/codex/spawn.ts +9 -0
- package/src/agent.ts +1 -0
- package/src/server/agent-server.test.ts +241 -0
- package/src/server/agent-server.ts +55 -3
- package/src/server/bin.ts +12 -0
- package/src/server/event-stream-sender.test.ts +74 -0
- package/src/server/event-stream-sender.ts +101 -52
- package/src/server/streaming-upload.ts +160 -0
- package/src/server/types.ts +2 -0
- package/src/types.ts +2 -0
package/dist/agent.js
CHANGED
|
@@ -4674,7 +4674,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
4674
4674
|
// package.json
|
|
4675
4675
|
var package_default = {
|
|
4676
4676
|
name: "@posthog/agent",
|
|
4677
|
-
version: "2.3.
|
|
4677
|
+
version: "2.3.663",
|
|
4678
4678
|
repository: "https://github.com/PostHog/code",
|
|
4679
4679
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
4680
4680
|
exports: {
|
|
@@ -19473,6 +19473,10 @@ function buildConfigArgs(options) {
|
|
|
19473
19473
|
if (options.reasoningEffort) {
|
|
19474
19474
|
args2.push("-c", `model_reasoning_effort="${options.reasoningEffort}"`);
|
|
19475
19475
|
}
|
|
19476
|
+
if (options.additionalDirectories?.length) {
|
|
19477
|
+
const escaped = options.additionalDirectories.map((p) => `"${p.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`).join(",");
|
|
19478
|
+
args2.push("-c", `sandbox_workspace_write.writable_roots=[${escaped}]`);
|
|
19479
|
+
}
|
|
19476
19480
|
if (options.instructions) {
|
|
19477
19481
|
const escaped = options.instructions.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/"/g, '\\"');
|
|
19478
19482
|
args2.push("-c", `instructions="${escaped}"`);
|
|
@@ -20955,7 +20959,8 @@ var Agent = class {
|
|
|
20955
20959
|
apiKey: gatewayConfig.apiKey,
|
|
20956
20960
|
binaryPath: options.codexBinaryPath,
|
|
20957
20961
|
model: sanitizedModel,
|
|
20958
|
-
instructions: options.instructions
|
|
20962
|
+
instructions: options.instructions,
|
|
20963
|
+
additionalDirectories: options.additionalDirectories
|
|
20959
20964
|
} : void 0
|
|
20960
20965
|
});
|
|
20961
20966
|
return this.acpConnection;
|