@clawos-dev/clawd 0.2.69 → 0.2.70-beta.122.93375b1

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/cli.cjs +5 -21
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -27618,25 +27618,15 @@ function buildAttachmentHandlers(deps) {
27618
27618
  }
27619
27619
  const cwdAbs = import_node_path26.default.resolve(sessionFile.cwd);
27620
27620
  const candidateAbs = import_node_path26.default.isAbsolute(args.relPath) ? import_node_path26.default.resolve(args.relPath) : import_node_path26.default.resolve(cwdAbs, args.relPath);
27621
- if (!isContainedIn2(candidateAbs, cwdAbs)) {
27622
- throw new ClawdError(
27623
- ERROR_CODES.VALIDATION_ERROR,
27624
- "relPath escapes session cwd"
27625
- );
27626
- }
27627
- const relPath = import_node_path26.default.relative(cwdAbs, candidateAbs);
27628
- if (relPath === "" || relPath.startsWith("..")) {
27629
- throw new ClawdError(
27630
- ERROR_CODES.VALIDATION_ERROR,
27631
- "relPath escapes session cwd"
27632
- );
27633
- }
27634
27621
  const entries = deps.groupFileStore.list(scope, args.sessionId);
27635
- const entry = entries.find((e) => e.relPath === relPath && !e.stale);
27622
+ const entry = entries.find((e) => {
27623
+ const storedAbs = import_node_path26.default.isAbsolute(e.relPath) ? import_node_path26.default.resolve(e.relPath) : import_node_path26.default.resolve(cwdAbs, e.relPath);
27624
+ return storedAbs === candidateAbs && !e.stale;
27625
+ });
27636
27626
  if (!entry) {
27637
27627
  throw new ClawdError(
27638
27628
  ERROR_CODES.VALIDATION_ERROR,
27639
- `relPath not in session group files or stale: ${relPath}`
27629
+ `relPath not in session group files or stale: ${args.relPath}`
27640
27630
  );
27641
27631
  }
27642
27632
  const ttl = args.ttlSeconds === null ? null : args.ttlSeconds ?? DEFAULT_TTL_SECONDS;
@@ -27726,12 +27716,6 @@ function buildAttachmentHandlers(deps) {
27726
27716
  "attachment.groupListPersona": groupListPersona
27727
27717
  };
27728
27718
  }
27729
- function isContainedIn2(abs, root) {
27730
- const normalized = import_node_path26.default.resolve(abs);
27731
- const normalizedRoot = import_node_path26.default.resolve(root);
27732
- if (normalized === normalizedRoot) return true;
27733
- return normalized.startsWith(normalizedRoot + import_node_path26.default.sep);
27734
- }
27735
27719
 
27736
27720
  // src/handlers/index.ts
27737
27721
  function buildMethodHandlers(deps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.69",
3
+ "version": "0.2.70-beta.122.93375b1",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",