@papercraneai/sandbox-agent 0.1.8 → 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.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. 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";
@@ -76,6 +77,10 @@ function parseArgs() {
76
77
  }
77
78
  result.hostMode = mode;
78
79
  }
80
+ else if (arg === "--version" || arg === "-v") {
81
+ console.log(pkg.version);
82
+ process.exit(0);
83
+ }
79
84
  else if (arg === "--help" || arg === "-h") {
80
85
  console.log(`
81
86
  sandbox-agent - Claude Agent SDK server for environments
@@ -891,7 +896,8 @@ function encodeSessionPath(path) {
891
896
  // Get the directory where Claude stores sessions for this project
892
897
  function getSessionsDir() {
893
898
  const claudeConfigDir = process.env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude");
894
- const encodedPath = encodeSessionPath(PROJECT_DIR);
899
+ const resolvedDir = realpathSync(PROJECT_DIR);
900
+ const encodedPath = encodeSessionPath(resolvedDir);
895
901
  return join(claudeConfigDir, "projects", encodedPath);
896
902
  }
897
903
  // Parse a JSONL file to extract session metadata
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papercraneai/sandbox-agent",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Claude Agent SDK server for sandbox environments",
5
5
  "license": "MIT",
6
6
  "type": "module",