@papercraneai/sandbox-agent 0.1.9 → 0.1.10
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/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createServer } from "http";
|
|
|
4
4
|
import { WebSocketServer, WebSocket } from "ws";
|
|
5
5
|
import { Tail } from "tail";
|
|
6
6
|
import { query, tool, createSdkMcpServer } from "@anthropic-ai/claude-agent-sdk";
|
|
7
|
+
import { realpathSync } from "fs";
|
|
7
8
|
import { readdir, stat, mkdir, readFile, writeFile, access, unlink, rm } from "fs/promises";
|
|
8
9
|
import { join, dirname, resolve } from "path";
|
|
9
10
|
import { fileURLToPath } from "url";
|
|
@@ -895,7 +896,8 @@ function encodeSessionPath(path) {
|
|
|
895
896
|
// Get the directory where Claude stores sessions for this project
|
|
896
897
|
function getSessionsDir() {
|
|
897
898
|
const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude");
|
|
898
|
-
const
|
|
899
|
+
const resolvedDir = realpathSync(PROJECT_DIR);
|
|
900
|
+
const encodedPath = encodeSessionPath(resolvedDir);
|
|
899
901
|
return join(claudeConfigDir, "projects", encodedPath);
|
|
900
902
|
}
|
|
901
903
|
// Parse a JSONL file to extract session metadata
|