@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.
@@ -1183,7 +1183,7 @@ import { v7 as uuidv7 } from "uuid";
1183
1183
  // package.json
1184
1184
  var package_default = {
1185
1185
  name: "@posthog/agent",
1186
- version: "2.1.16",
1186
+ version: "2.1.17",
1187
1187
  repository: "https://github.com/PostHog/twig",
1188
1188
  description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
1189
1189
  exports: {
@@ -3184,7 +3184,19 @@ function buildSpawnWrapper(sessionId, onProcessSpawned, onProcessExited) {
3184
3184
  };
3185
3185
  };
3186
3186
  }
3187
+ function ensureLocalSettings(cwd) {
3188
+ const claudeDir = path2.join(cwd, ".claude");
3189
+ const localSettingsPath = path2.join(claudeDir, "settings.local.json");
3190
+ try {
3191
+ if (!fs.existsSync(localSettingsPath)) {
3192
+ fs.mkdirSync(claudeDir, { recursive: true });
3193
+ fs.writeFileSync(localSettingsPath, "{}\n", { flag: "wx" });
3194
+ }
3195
+ } catch {
3196
+ }
3197
+ }
3187
3198
  function buildSessionOptions(params) {
3199
+ ensureLocalSettings(params.cwd);
3188
3200
  const options = {
3189
3201
  ...params.userProvidedOptions,
3190
3202
  systemPrompt: params.systemPrompt ?? buildSystemPrompt(),