opencode-swarm 7.56.0 → 7.56.2

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.
@@ -2,9 +2,17 @@
2
2
  export declare function isSafeCachePath(p: string): boolean;
3
3
  /**
4
4
  * Safety guard for lock file deletion. Lock files have different basenames
5
- * than cache directories so they need a separate check. Mirrors
6
- * isSafeCachePath()'s defense-in-depth: minimum segment depth, recognized
7
- * basename, and parent directory must be 'opencode'.
5
+ * and directory structure than cache directories, requiring separate validation
6
+ * logic. While both functions share defense-in-depth principles, they are kept
7
+ * separate rather than extracted to a parameterized helper because the
8
+ * validation rules differ significantly:
9
+ * - Cache paths verify: parent ∈ {packages, node_modules}, grandparent === 'opencode'
10
+ * - Lock file paths verify: parent === 'opencode', grandparent !== 'opencode'
11
+ * This separation maintains clarity and avoids over-parameterization.
12
+ *
13
+ * This function mirrors isSafeCachePath()'s defense-in-depth: minimum segment
14
+ * depth, recognized basename, parent directory must be 'opencode', and
15
+ * grandparent structure validation to prevent misconfigured nested paths.
8
16
  */
9
17
  export declare function isSafeLockFilePath(p: string): boolean;
10
18
  /**