@sandagent/runner-cli 0.2.8 → 0.2.9

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.
Files changed (2) hide show
  1. package/dist/bundle.mjs +4 -7
  2. package/package.json +1 -1
package/dist/bundle.mjs CHANGED
@@ -260,23 +260,20 @@ function createCanUseToolCallback(claudeOptions) {
260
260
  }
261
261
  const cwd = claudeOptions.cwd || process.cwd();
262
262
  try {
263
- const { execSync } = await import("node:child_process");
263
+ const fs = await import("node:fs");
264
264
  const path = await import("node:path");
265
265
  const approvalDir = path.join(cwd, ".sandagent", "approvals");
266
266
  const approvalFile = path.join(approvalDir, `${toolUseID}.json`);
267
- execSync(`mkdir -p "${approvalDir}"`);
268
267
  const timeout = Date.now() + 6e4;
269
268
  let lastApproval = null;
270
269
  while (Date.now() < timeout) {
271
270
  try {
272
- const data = execSync(`cat "${approvalFile}" 2>/dev/null`, {
273
- encoding: "utf-8"
274
- });
271
+ const data = fs.readFileSync(approvalFile, "utf-8");
275
272
  const approval = JSON.parse(data);
276
273
  lastApproval = approval;
277
274
  if (approval.status === "completed") {
278
275
  try {
279
- execSync(`rm "${approvalFile}" 2>/dev/null`);
276
+ fs.unlinkSync(approvalFile);
280
277
  } catch {
281
278
  }
282
279
  return {
@@ -292,7 +289,7 @@ function createCanUseToolCallback(claudeOptions) {
292
289
  await new Promise((resolve) => setTimeout(resolve, 500));
293
290
  }
294
291
  try {
295
- execSync(`rm "${approvalFile}" 2>/dev/null`);
292
+ fs.unlinkSync(approvalFile);
296
293
  } catch {
297
294
  }
298
295
  if (lastApproval && Object.keys(lastApproval.answers).length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sandagent/runner-cli",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "SandAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming",
5
5
  "type": "module",
6
6
  "bin": {