@hunterzhu/pulse-adapters 0.1.11 → 0.2.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.
@@ -0,0 +1,28 @@
1
+ import { readdir } from 'node:fs/promises';
2
+ import { join, relative, isAbsolute, sep } from 'node:path';
3
+ function within(path, root) {
4
+ const rel = relative(root, path);
5
+ return rel === '' || (rel !== '..' && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
6
+ }
7
+ /** Keep denied subtrees off the ancestors Git must stat to reach an allowed workspace. */
8
+ export async function carveWindowsReadDenies(denied, allowed) {
9
+ const result = new Set();
10
+ const visited = new Set();
11
+ const visit = async (path) => {
12
+ if (visited.has(path) || allowed.some(root => within(path, root)))
13
+ return;
14
+ visited.add(path);
15
+ if (!allowed.some(root => within(root, path))) {
16
+ result.add(path);
17
+ return;
18
+ }
19
+ // Windows inherited DENY ACEs are not POSIX allow-within-deny rules.
20
+ // Deny siblings along the allowed path, keeping only ancestor metadata
21
+ // accessible. An enumeration failure aborts setup rather than dropping a deny.
22
+ for (const entry of await readdir(path))
23
+ await visit(join(path, entry));
24
+ };
25
+ for (const path of denied)
26
+ await visit(path);
27
+ return [...result];
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hunterzhu/pulse-adapters",
3
- "version": "0.1.11",
3
+ "version": "0.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/zhuhengtan/Pulse"
@@ -16,7 +16,10 @@
16
16
  "registry": "https://registry.npmjs.org"
17
17
  },
18
18
  "dependencies": {
19
- "@hunterzhu/pulse-runtime": "0.1.11",
20
- "@hunterzhu/pulse-tool-sdk": "0.1.11"
19
+ "@anthropic-ai/sandbox-runtime": "0.0.77",
20
+ "@hunterzhu/pulse-runtime": "0.2.1",
21
+ "@hunterzhu/pulse-tool-sdk": "0.2.1",
22
+ "exceljs": "4.4.0",
23
+ "pdfjs-dist": "4.10.38"
21
24
  }
22
25
  }