Skip to content

Commit eaf8f3e

Browse files
feat: support native artifact downloads on Windows (#346)
1 parent a8e5ee4 commit eaf8f3e

10 files changed

Lines changed: 505 additions & 28 deletions

docs/artifact-exchange.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ file-object shape, trusted OpenAI download hosts, and redirects before streaming
3737
Malformed references, unknown fields, absolute paths, traversal, and symlinked
3838
parents are rejected.
3939

40-
Downloads are streamed under `artifacts.maxFileBytes` and published as
41-
owner-only files without overwriting an existing destination. The tool is
42-
currently available on Linux. It is not registered on macOS, Windows, or BSD
43-
because Node.js does not expose the required descriptor-relative filesystem
44-
operations there.
40+
Downloads are streamed under `artifacts.maxFileBytes` and published without
41+
overwriting an existing destination. The tool is available on Linux and
42+
Windows. Linux uses descriptor-anchored directory operations. Windows pins
43+
each destination directory with native handles that reject reparse points and
44+
prevent rename/replacement while the transfer is in progress. macOS and BSD
45+
remain unsupported.
46+
47+
On POSIX filesystems the partial is created with mode `0600`. Windows file
48+
permissions follow the destination directory's ACL inheritance rather than
49+
POSIX mode bits.

docs/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ them.
192192

193193
Set `artifacts.enabled` to `true` when a host needs to save a native attached or
194194
generated file into an open workspace. `artifacts.maxFileBytes` limits one
195-
streamed file. The secure publication path is currently available only on
196-
Linux; the tool is not registered on macOS, Windows, or BSD.
195+
streamed file. The secure publication path is available on Linux and Windows;
196+
the tool is not registered on macOS or BSD.
197197

198198
## Environment boundary
199199

docs/security.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ credentials, malformed references, and unknown object fields are rejected.
106106

107107
Absolute paths, traversal, symlinked parents, and existing destinations also
108108
fail closed. Downloads stream under the configured per-file limit and are
109-
published without overwrite as owner-only files. DevSpace does not extract or
110-
execute transferred content.
109+
published without overwrite. On Linux, destination traversal stays anchored to
110+
opened directory descriptors. On Windows, DevSpace holds native directory
111+
handles without delete sharing, rejects reparse points, and keeps those handles
112+
open while Node performs the path-based write and publication operations. On
113+
POSIX systems the partial is created with mode `0600`; Windows permissions
114+
follow inherited ACLs. DevSpace does not extract or execute transferred
115+
content.
111116

112117
## Logs
113118

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"drizzle-orm": "^0.45.2",
6767
"express": "^5.2.1",
6868
"jsonc-parser": "^3.3.1",
69+
"koffi": "^3.1.2",
6970
"lucide": "^1.24.0",
7071
"react": "^19.2.6",
7172
"react-dom": "^19.2.6",

pnpm-lock.yaml

Lines changed: 171 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ allowBuilds:
22
'@google/genai': false
33
better-sqlite3: true
44
esbuild: true
5+
koffi: true
56
node-pty: true
67
protobufjs: false

0 commit comments

Comments
 (0)