@hachej/boring-agent 0.1.18 → 0.1.20

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.
@@ -2033,7 +2033,7 @@ function fileRoutes(app, opts, done) {
2033
2033
  // src/server/workspace/provisionRuntime.ts
2034
2034
  import { createHash as createHash3 } from "crypto";
2035
2035
  import { constants as constants2 } from "fs";
2036
- import { access as access2, chmod as chmod3, cp, mkdir as mkdir4, readdir as readdir2, readFile as readFile4, stat as stat3, writeFile as writeFile4 } from "fs/promises";
2036
+ import { access as access2, chmod as chmod3, cp, mkdir as mkdir4, readdir as readdir2, readFile as readFile4, realpath as realpath2, stat as stat3, writeFile as writeFile4 } from "fs/promises";
2037
2037
  import { dirname as dirname5, isAbsolute as isAbsolute4, join as join3, relative as relative5, resolve as resolve3 } from "path";
2038
2038
  import { fileURLToPath } from "url";
2039
2039
  import { execFile } from "child_process";
@@ -2171,6 +2171,8 @@ function nodePackageTarget(workspaceRoot, packageName) {
2171
2171
  }
2172
2172
  async function copyIfExists(source, target) {
2173
2173
  if (!await exists(source)) return false;
2174
+ if (resolve3(source) === resolve3(target)) return true;
2175
+ if (await exists(target) && await realpath2(source) === await realpath2(target)) return true;
2174
2176
  await cp(source, target, {
2175
2177
  recursive: true,
2176
2178
  force: true,
@@ -5230,7 +5232,7 @@ import {
5230
5232
 
5231
5233
  // src/server/tools/operations/bound.ts
5232
5234
  import { constants as constants3 } from "fs";
5233
- import { access as access3, lstat as lstat3, mkdir as mkdir10, readFile as readFile8, readdir as readdir6, readlink, realpath as realpath2, stat as stat6, writeFile as writeFile8 } from "fs/promises";
5235
+ import { access as access3, lstat as lstat3, mkdir as mkdir10, readFile as readFile8, readdir as readdir6, readlink, realpath as realpath3, stat as stat6, writeFile as writeFile8 } from "fs/promises";
5234
5236
  import { dirname as dirname7, isAbsolute as isAbsolute5, relative as relative7, resolve as resolve5 } from "path";
5235
5237
  function toPosixPath(value) {
5236
5238
  return value.split("\\").join("/");
@@ -5312,14 +5314,14 @@ async function findNearestExistingAncestor(absPath) {
5312
5314
  }
5313
5315
  }
5314
5316
  async function assertWithinWorkspace(workspaceRoot, absPath) {
5315
- const realRoot = await realpath2(resolve5(workspaceRoot));
5317
+ const realRoot = await realpath3(resolve5(workspaceRoot));
5316
5318
  try {
5317
5319
  const s = await lstat3(absPath);
5318
5320
  if (s.isSymbolicLink()) {
5319
5321
  const target = await readlink(absPath);
5320
5322
  const resolvedTarget = resolve5(dirname7(absPath), target);
5321
5323
  const nearestAncestor = await findNearestExistingAncestor(resolvedTarget);
5322
- const realAncestor = await realpath2(nearestAncestor);
5324
+ const realAncestor = await realpath3(nearestAncestor);
5323
5325
  const rel2 = relative7(realRoot, realAncestor);
5324
5326
  if (rel2.startsWith("..") || isAbsolute5(rel2)) {
5325
5327
  throw new Error(`path "${absPath}" is outside workspace`);
@@ -5335,12 +5337,12 @@ async function assertWithinWorkspace(workspaceRoot, absPath) {
5335
5337
  }
5336
5338
  let realCandidate;
5337
5339
  try {
5338
- realCandidate = await realpath2(absPath);
5340
+ realCandidate = await realpath3(absPath);
5339
5341
  } catch (err) {
5340
5342
  const code = err.code;
5341
5343
  if (code === "ENOENT") {
5342
5344
  const nearestAncestor = await findNearestExistingAncestor(dirname7(absPath));
5343
- const realAncestor = await realpath2(nearestAncestor);
5345
+ const realAncestor = await realpath3(nearestAncestor);
5344
5346
  const rel2 = relative7(realRoot, realAncestor);
5345
5347
  if (rel2.startsWith("..") || isAbsolute5(rel2)) {
5346
5348
  throw new Error(`path "${absPath}" is outside workspace`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-agent",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Pane-embeddable coding agent. Ships direct/local/vercel-sandbox execution modes behind one interface.",
@@ -75,7 +75,7 @@
75
75
  "use-stick-to-bottom": "^1.1.3",
76
76
  "yaml": "^2.8.3",
77
77
  "zod": "^3.25.76",
78
- "@hachej/boring-ui-kit": "0.1.18"
78
+ "@hachej/boring-ui-kit": "0.1.20"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@opentelemetry/api": "^1.9.1",