@ducci/jarvis 1.0.53 → 1.0.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ducci/jarvis",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "A fully automated agent system that lives on a server.",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -38,7 +38,7 @@ const SEED_TOOLS = {
38
38
  },
39
39
  },
40
40
  code: `
41
- const targetPath = path.resolve(args.path);
41
+ const targetPath = path.resolve(args.path.replace(/^~(?=\/|$)/, require('os').homedir()));
42
42
  const raw = await fs.promises.readFile(targetPath, 'utf8');
43
43
  const lines = raw.split('\\n');
44
44
  const offset = args.offset ? args.offset - 1 : 0;
@@ -308,7 +308,7 @@ const SEED_TOOLS = {
308
308
  },
309
309
  },
310
310
  code: `
311
- const targetPath = path.resolve(args.path);
311
+ const targetPath = path.resolve(args.path.replace(/^~(?=\/|$)/, require('os').homedir()));
312
312
  await fs.promises.mkdir(path.dirname(targetPath), { recursive: true });
313
313
  await fs.promises.writeFile(targetPath, args.content, 'utf8');
314
314
  if (args.mode) {
@@ -345,7 +345,7 @@ const SEED_TOOLS = {
345
345
  },
346
346
  },
347
347
  code: `
348
- const targetPath = path.resolve(args.path);
348
+ const targetPath = path.resolve(args.path.replace(/^~(?=\/|$)/, require('os').homedir()));
349
349
  const content = await fs.promises.readFile(targetPath, 'utf8');
350
350
  const count = content.split(args.old_string).length - 1;
351
351
  if (count === 0) {