@papercraneai/sandbox-agent 0.1.4 → 0.1.6

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/index.js +17 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -403,18 +403,26 @@ async function buildFileTree(dirPath) {
403
403
  if (entry.name === "node_modules" || entry.name.startsWith(".")) {
404
404
  continue;
405
405
  }
406
+ const entryPath = join(dirPath, entry.name);
407
+ const entryStat = await stat(entryPath);
408
+ const mtime = entryStat.mtimeMs;
406
409
  if (entry.isDirectory()) {
407
- const children = await buildFileTree(join(dirPath, entry.name));
410
+ const children = await buildFileTree(entryPath);
411
+ // For folders, use the most recent mtime of any child (or folder's own mtime)
412
+ const childMtimes = children.map(c => c.mtime || 0);
413
+ const maxChildMtime = childMtimes.length > 0 ? Math.max(...childMtimes) : 0;
408
414
  nodes.push({
409
415
  name: entry.name,
410
416
  type: "folder",
417
+ mtime: Math.max(mtime, maxChildMtime),
411
418
  children
412
419
  });
413
420
  }
414
421
  else {
415
422
  nodes.push({
416
423
  name: entry.name,
417
- type: "file"
424
+ type: "file",
425
+ mtime
418
426
  });
419
427
  }
420
428
  }
@@ -566,8 +574,12 @@ app.get("/files/read", async (req, res) => {
566
574
  gif: "image/gif",
567
575
  webp: "image/webp"
568
576
  };
577
+ // Return relative path (strip PROJECT_DIR prefix) so CLI users see usable paths
578
+ const relativePath = fullPath.startsWith(PROJECT_DIR)
579
+ ? fullPath.slice(PROJECT_DIR.length).replace(/^\/+/, "")
580
+ : fullPath;
569
581
  res.json({
570
- path: fullPath,
582
+ path: relativePath,
571
583
  name: fullPath.split("/").pop(),
572
584
  content,
573
585
  size: stats.size,
@@ -1164,6 +1176,7 @@ app.post("/chat", async (req, res) => {
1164
1176
  "client-tools": clientToolsServer
1165
1177
  },
1166
1178
  allowedTools: allowedTools || defaultTools,
1179
+ settingSources: ["project"],
1167
1180
  hooks,
1168
1181
  abortController,
1169
1182
  includePartialMessages: true
@@ -1190,7 +1203,7 @@ app.post("/chat", async (req, res) => {
1190
1203
  let gotResult = false;
1191
1204
  log.debug({ ...ctx, elapsed: Date.now() - requestStartTime }, "Starting Claude SDK query");
1192
1205
  // Determine which model is being used (either provided or SDK default)
1193
- const usedModel = model || options.model || "claude-sonnet-4-5-20250929";
1206
+ const usedModel = model || options.model || "claude-sonnet-4-6";
1194
1207
  for await (const msg of query({
1195
1208
  prompt: createPrompt(),
1196
1209
  options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papercraneai/sandbox-agent",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Claude Agent SDK server for sandbox environments",
5
5
  "license": "MIT",
6
6
  "type": "module",