@getpaseo/server 0.1.90 → 0.1.91-beta.1

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.
@@ -15,6 +15,7 @@ import { renderPromptAttachmentAsText } from "../../prompt-attachments.js";
15
15
  import { claudeQuery } from "./query.js";
16
16
  import { realClaudeRewindSdk, revertClaudeConversation, revertClaudeFiles } from "./rewind.js";
17
17
  import { normalizeProviderReplayTimestamp } from "../../provider-history-timestamps.js";
18
+ import { claudeProjectDirSync } from "./project-dir.js";
18
19
  import { getAgentStreamEventTurnId, } from "../../agent-sdk-types.js";
19
20
  import { checkProviderLaunchAvailable, createProviderEnv, createProviderEnvSpec, resolveProviderLaunch, } from "../../provider-launch-config.js";
20
21
  import { withTimeout } from "../../../../utils/promise-timeout.js";
@@ -171,9 +172,6 @@ function isClaudeThinkingEffort(value) {
171
172
  value === "xhigh" ||
172
173
  value === "max");
173
174
  }
174
- function sanitizeClaudeProjectPath(cwd) {
175
- return cwd.replace(/[\\/._:]/g, "-");
176
- }
177
175
  const MAX_RECENT_STDERR_CHARS = 4000;
178
176
  const STDERR_FLUSH_WAIT_MS = 150;
179
177
  const STDERR_FLUSH_POLL_INTERVAL_MS = 10;
@@ -3188,14 +3186,12 @@ class ClaudeAgentSession {
3188
3186
  // Fall back to the configured cwd when the path has already disappeared.
3189
3187
  }
3190
3188
  for (const candidate of candidates) {
3191
- const sanitized = sanitizeClaudeProjectPath(candidate);
3192
- const historyPath = path.join(configDir, "projects", sanitized, `${sessionId}.jsonl`);
3189
+ const historyPath = path.join(claudeProjectDirSync(candidate, { configDir }), `${sessionId}.jsonl`);
3193
3190
  if (fs.existsSync(historyPath)) {
3194
3191
  return historyPath;
3195
3192
  }
3196
3193
  }
3197
- const sanitized = sanitizeClaudeProjectPath(cwd);
3198
- return path.join(configDir, "projects", sanitized, `${sessionId}.jsonl`);
3194
+ return path.join(claudeProjectDirSync(cwd, { configDir }), `${sessionId}.jsonl`);
3199
3195
  }
3200
3196
  convertHistoryEntry(entry) {
3201
3197
  return convertClaudeHistoryEntry(entry, (content) => this.mapBlocksToTimeline(content));
@@ -2,4 +2,5 @@ export interface ClaudeProjectDirOptions {
2
2
  configDir?: string;
3
3
  }
4
4
  export declare function claudeProjectDir(cwd: string, options?: ClaudeProjectDirOptions): Promise<string>;
5
+ export declare function claudeProjectDirSync(cwd: string, options?: ClaudeProjectDirOptions): string;
5
6
  //# sourceMappingURL=project-dir.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { realpathSync } from "node:fs";
1
2
  import { realpath } from "node:fs/promises";
2
3
  import { homedir } from "node:os";
3
4
  import { join } from "node:path";
@@ -12,6 +13,11 @@ export async function claudeProjectDir(cwd, options) {
12
13
  const projectsRoot = join(resolveConfigDir(options), "projects");
13
14
  return join(projectsRoot, encode(canonical));
14
15
  }
16
+ export function claudeProjectDirSync(cwd, options) {
17
+ const canonical = canonicalizeSync(cwd);
18
+ const projectsRoot = join(resolveConfigDir(options), "projects");
19
+ return join(projectsRoot, encode(canonical));
20
+ }
15
21
  async function canonicalize(input) {
16
22
  try {
17
23
  return (await realpath(input)).normalize("NFC");
@@ -20,6 +26,14 @@ async function canonicalize(input) {
20
26
  return input.normalize("NFC");
21
27
  }
22
28
  }
29
+ function canonicalizeSync(input) {
30
+ try {
31
+ return realpathSync.native(input).normalize("NFC");
32
+ }
33
+ catch {
34
+ return input.normalize("NFC");
35
+ }
36
+ }
23
37
  function encode(input) {
24
38
  const replaced = input.replace(/[^a-zA-Z0-9]/g, "-");
25
39
  if (replaced.length <= PROJECT_DIR_LENGTH_CAP) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpaseo/server",
3
- "version": "0.1.90",
3
+ "version": "0.1.91-beta.1",
4
4
  "description": "Paseo backend server",
5
5
  "files": [
6
6
  "dist/server",
@@ -59,10 +59,10 @@
59
59
  "dependencies": {
60
60
  "@agentclientprotocol/sdk": "^0.17.1",
61
61
  "@anthropic-ai/claude-agent-sdk": "^0.2.133",
62
- "@getpaseo/client": "0.1.90",
63
- "@getpaseo/highlight": "0.1.90",
64
- "@getpaseo/protocol": "0.1.90",
65
- "@getpaseo/relay": "0.1.90",
62
+ "@getpaseo/client": "0.1.91-beta.1",
63
+ "@getpaseo/highlight": "0.1.91-beta.1",
64
+ "@getpaseo/protocol": "0.1.91-beta.1",
65
+ "@getpaseo/relay": "0.1.91-beta.1",
66
66
  "@isaacs/ttlcache": "^2.1.4",
67
67
  "@modelcontextprotocol/sdk": "^1.20.1",
68
68
  "@opencode-ai/sdk": "1.14.46",