@posthog/agent 2.1.16 → 2.1.17
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 +13 -1
- package/dist/agent.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/server/agent-server.js +13 -1
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +13 -1
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +1 -1
- package/src/adapters/claude/session/options.ts +15 -0
package/dist/agent.js
CHANGED
|
@@ -276,7 +276,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
276
276
|
// package.json
|
|
277
277
|
var package_default = {
|
|
278
278
|
name: "@posthog/agent",
|
|
279
|
-
version: "2.1.
|
|
279
|
+
version: "2.1.17",
|
|
280
280
|
repository: "https://github.com/PostHog/twig",
|
|
281
281
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
282
282
|
exports: {
|
|
@@ -2304,7 +2304,19 @@ function buildSpawnWrapper(sessionId, onProcessSpawned, onProcessExited) {
|
|
|
2304
2304
|
};
|
|
2305
2305
|
};
|
|
2306
2306
|
}
|
|
2307
|
+
function ensureLocalSettings(cwd) {
|
|
2308
|
+
const claudeDir = path2.join(cwd, ".claude");
|
|
2309
|
+
const localSettingsPath = path2.join(claudeDir, "settings.local.json");
|
|
2310
|
+
try {
|
|
2311
|
+
if (!fs.existsSync(localSettingsPath)) {
|
|
2312
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
2313
|
+
fs.writeFileSync(localSettingsPath, "{}\n", { flag: "wx" });
|
|
2314
|
+
}
|
|
2315
|
+
} catch {
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2307
2318
|
function buildSessionOptions(params) {
|
|
2319
|
+
ensureLocalSettings(params.cwd);
|
|
2308
2320
|
const options = {
|
|
2309
2321
|
...params.userProvidedOptions,
|
|
2310
2322
|
systemPrompt: params.systemPrompt ?? buildSystemPrompt(),
|