@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/server/bin.cjs
CHANGED
|
@@ -1175,7 +1175,7 @@ var import_uuid = require("uuid");
|
|
|
1175
1175
|
// package.json
|
|
1176
1176
|
var package_default = {
|
|
1177
1177
|
name: "@posthog/agent",
|
|
1178
|
-
version: "2.1.
|
|
1178
|
+
version: "2.1.17",
|
|
1179
1179
|
repository: "https://github.com/PostHog/twig",
|
|
1180
1180
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
1181
1181
|
exports: {
|
|
@@ -3176,7 +3176,19 @@ function buildSpawnWrapper(sessionId, onProcessSpawned, onProcessExited) {
|
|
|
3176
3176
|
};
|
|
3177
3177
|
};
|
|
3178
3178
|
}
|
|
3179
|
+
function ensureLocalSettings(cwd) {
|
|
3180
|
+
const claudeDir = path2.join(cwd, ".claude");
|
|
3181
|
+
const localSettingsPath = path2.join(claudeDir, "settings.local.json");
|
|
3182
|
+
try {
|
|
3183
|
+
if (!fs.existsSync(localSettingsPath)) {
|
|
3184
|
+
fs.mkdirSync(claudeDir, { recursive: true });
|
|
3185
|
+
fs.writeFileSync(localSettingsPath, "{}\n", { flag: "wx" });
|
|
3186
|
+
}
|
|
3187
|
+
} catch {
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3179
3190
|
function buildSessionOptions(params) {
|
|
3191
|
+
ensureLocalSettings(params.cwd);
|
|
3180
3192
|
const options = {
|
|
3181
3193
|
...params.userProvidedOptions,
|
|
3182
3194
|
systemPrompt: params.systemPrompt ?? buildSystemPrompt(),
|