@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/index.js
CHANGED
|
@@ -1174,7 +1174,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
1174
1174
|
// package.json
|
|
1175
1175
|
var package_default = {
|
|
1176
1176
|
name: "@posthog/agent",
|
|
1177
|
-
version: "2.1.
|
|
1177
|
+
version: "2.1.17",
|
|
1178
1178
|
repository: "https://github.com/PostHog/twig",
|
|
1179
1179
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
1180
1180
|
exports: {
|
|
@@ -3210,7 +3210,19 @@ function buildSpawnWrapper(sessionId, onProcessSpawned, onProcessExited) {
|
|
|
3210
3210
|
};
|
|
3211
3211
|
};
|
|
3212
3212
|
}
|
|
3213
|
+
function ensureLocalSettings(cwd) {
|
|
3214
|
+
const claudeDir = path2.join(cwd, ".claude");
|
|
3215
|
+
const localSettingsPath = path2.join(claudeDir, "settings.local.json");
|
|
3216
|
+
try {
|
|
3217
|
+
if (!fs.existsSync(localSettingsPath)) {
|
|
3218
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
3219
|
+
fs.writeFileSync(localSettingsPath, "{}\n", { flag: "wx" });
|
|
3220
|
+
}
|
|
3221
|
+
} catch {
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3213
3224
|
function buildSessionOptions(params) {
|
|
3225
|
+
ensureLocalSettings(params.cwd);
|
|
3214
3226
|
const options = {
|
|
3215
3227
|
...params.userProvidedOptions,
|
|
3216
3228
|
systemPrompt: params.systemPrompt ?? buildSystemPrompt(),
|