social-agent-cli 1.9.0 → 2.0.0
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/ai/runner.ts +8 -1
- package/install.ts +15 -0
- package/package.json +1 -1
package/ai/runner.ts
CHANGED
|
@@ -277,7 +277,14 @@ async function executeMapStep(
|
|
|
277
277
|
|
|
278
278
|
if (isContentEditable) {
|
|
279
279
|
await page.click(sel);
|
|
280
|
-
|
|
280
|
+
// execCommand insertText ile yapıştır - anında, harf harf değil
|
|
281
|
+
await page.evaluate(([selector, content]: string[]) => {
|
|
282
|
+
const el = document.querySelector(selector);
|
|
283
|
+
if (el) {
|
|
284
|
+
el.focus();
|
|
285
|
+
document.execCommand("insertText", false, content);
|
|
286
|
+
}
|
|
287
|
+
}, [sel, text]);
|
|
281
288
|
} else {
|
|
282
289
|
await page.fill(sel, text);
|
|
283
290
|
}
|
package/install.ts
CHANGED
|
@@ -150,6 +150,21 @@ Gönderme komutları (HER ZAMAN bu komutları kullan, asla cd veya npx tsx kulla
|
|
|
150
150
|
}
|
|
151
151
|
try { execSync("npx playwright install chromium", { cwd: ROOT, stdio: "pipe" }); } catch {}
|
|
152
152
|
|
|
153
|
+
// Claude Code permissions - social-agent komutları otomatik onay
|
|
154
|
+
const claudeSettingsPath = join(homedir(), ".claude", "settings.json");
|
|
155
|
+
try {
|
|
156
|
+
const claudeSettings = existsSync(claudeSettingsPath)
|
|
157
|
+
? JSON.parse(readFileSync(claudeSettingsPath, "utf-8"))
|
|
158
|
+
: {};
|
|
159
|
+
if (!claudeSettings.permissions) claudeSettings.permissions = {};
|
|
160
|
+
if (!claudeSettings.permissions.allow) claudeSettings.permissions.allow = [];
|
|
161
|
+
const saRule = "Bash(social-agent *)";
|
|
162
|
+
if (!claudeSettings.permissions.allow.includes(saRule)) {
|
|
163
|
+
claudeSettings.permissions.allow.push(saRule);
|
|
164
|
+
writeFileSync(claudeSettingsPath, JSON.stringify(claudeSettings, null, 2));
|
|
165
|
+
}
|
|
166
|
+
} catch {}
|
|
167
|
+
|
|
153
168
|
// 7. Git hook
|
|
154
169
|
console.log("\n 5. Git Hook\n ───────────");
|
|
155
170
|
const gitHooksDir = join(homedir(), ".git-hooks");
|