@zoowork-ai/sdk 0.11.0 → 0.11.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.
- package/CHANGELOG.md +6 -0
- package/dist/client.d.ts +1 -3
- package/dist/client.js +1 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to `@zoowork-ai/sdk` (formerly `@zooclaw-agents/sdk`). Dates are the
|
|
4
4
|
day the behaviour was verified, not the day it was written.
|
|
5
5
|
|
|
6
|
+
## 0.11.1 — 2026-10-04
|
|
7
|
+
|
|
8
|
+
- `uploadFile` no longer runs `chown` on the uploaded file or on directories it creates. The
|
|
9
|
+
sandbox workspace mount does not enforce ownership, and a staging check showed the Agent's
|
|
10
|
+
edit and write tools modify uploaded files without it. Existing calls remain compatible.
|
|
11
|
+
|
|
6
12
|
## 0.11.0 — 2026-10-04
|
|
7
13
|
|
|
8
14
|
- Add `uploadFile(agentId, path, content)`, which copies a file into an Agent's sandbox through
|
package/dist/client.d.ts
CHANGED
|
@@ -1870,9 +1870,7 @@ export interface ZooworkClient extends DeveloperApi {
|
|
|
1870
1870
|
* `path` is absolute, or relative to `/workspace`; parent directories are created. A string is
|
|
1871
1871
|
* written as UTF-8. The content travels through {@link ZooworkClient.exec} in base64 chunks,
|
|
1872
1872
|
* lands in a temporary file beside the target, is checked against its SHA-256 inside the
|
|
1873
|
-
* sandbox, and only then moves into place, so a failed upload leaves nothing at `path`.
|
|
1874
|
-
* file and any directory created for it take the owner of the nearest existing ancestor, so
|
|
1875
|
-
* the Agent's own tools can modify them.
|
|
1873
|
+
* sandbox, and only then moves into place, so a failed upload leaves nothing at `path`.
|
|
1876
1874
|
*
|
|
1877
1875
|
* Each chunk is one `exec` call carrying about 72 KB, so this suits files up to a few
|
|
1878
1876
|
* megabytes. It has exec's requirements: an agent-scope sandbox and a rendered config.
|
package/dist/client.js
CHANGED
|
@@ -319,12 +319,7 @@ export function createZooworkClient(cfg = {}) {
|
|
|
319
319
|
};
|
|
320
320
|
const partial = `${path}.upload-${crypto.randomUUID()}`;
|
|
321
321
|
try {
|
|
322
|
-
|
|
323
|
-
// created for it, the owner of the nearest existing ancestor so the Agent can edit them.
|
|
324
|
-
await sh('dir=$(dirname "$1"); top=; probe=$dir; '
|
|
325
|
-
+ 'while [ ! -e "$probe" ]; do top=$probe; probe=$(dirname "$probe"); done; '
|
|
326
|
-
+ 'owner=$(stat -c %u:%g "$probe"); mkdir -p "$dir" && : > "$1" || exit 1; '
|
|
327
|
-
+ 'chown "$owner" "$1" 2>/dev/null; [ -z "$top" ] || chown -R "$owner" "$top" 2>/dev/null; true', partial);
|
|
322
|
+
await sh('mkdir -p "$(dirname "$1")" && : > "$1"', partial);
|
|
328
323
|
for (let offset = 0; offset < data.length; offset += UPLOAD_CHUNK_BYTES) {
|
|
329
324
|
let binary = '';
|
|
330
325
|
for (const byte of data.subarray(offset, offset + UPLOAD_CHUNK_BYTES))
|