@zoowork-ai/sdk 0.10.0 → 0.10.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 +7 -0
- package/README.md +34 -13
- package/dist/client.d.ts +4 -1
- package/dist/events.d.ts +4 -3
- package/dist/events.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.10.1 — 2026-10-03
|
|
7
|
+
|
|
8
|
+
- Correct production availability guidance for Files, Database viewer, Schedules and Agent configuration updates.
|
|
9
|
+
- Clarify approval and blocked tool events, stream cursor recovery, repeated deletion and Usage validation.
|
|
10
|
+
- Link to the public developer documentation.
|
|
11
|
+
- Documentation and comments only; no runtime or public API changes. Existing service limitations remain.
|
|
12
|
+
|
|
6
13
|
## 0.10.0 — 2026-10-03
|
|
7
14
|
|
|
8
15
|
- Add Files, read-only Agent Database, Usage, Run Output, action paging/detail and Agent webhook management helpers.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zoowork-ai/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the [ZooWork Managed Agents](https://
|
|
3
|
+
TypeScript SDK for the [ZooWork Managed Agents](https://zoowork.ai/docs/) API. Developer Preview.
|
|
4
4
|
|
|
5
5
|
Zero runtime dependencies — it uses the platform `fetch`, which you can override for edge runtimes and tests. ESM only, Node 20+.
|
|
6
6
|
|
|
@@ -149,7 +149,7 @@ to use the owner; IM sessions reject it. See the field's SDK comment for input c
|
|
|
149
149
|
|
|
150
150
|
## Agent Skills
|
|
151
151
|
|
|
152
|
-
New Agents receive global Skills by default. Use `listAgentSkills(agentId)` to inspect attached Skills. At create time, `resource.skills` accepts a catalog name or `skill_id`; `include_global_skills: false` or an explicit empty list opts out of automatic Skills. Root Skill uploads are unavailable to Project keys. Keep source changes in your application
|
|
152
|
+
New Agents receive global Skills by default. Use `listAgentSkills(agentId)` to inspect attached Skills. At create time, `resource.skills` accepts a catalog name or `skill_id`; `include_global_skills: false` or an explicit empty list opts out of automatic Skills. Root Skill uploads are unavailable to Project keys. Keep source changes in your application; use persona documents for standing instructions and Session messages for text task data.
|
|
153
153
|
|
|
154
154
|
## Schedules, wake and exec
|
|
155
155
|
|
|
@@ -357,7 +357,7 @@ and `listEvents` truncates at 500 events with nothing in the response to say it
|
|
|
357
357
|
|
|
358
358
|
## Documentation
|
|
359
359
|
|
|
360
|
-
Full guides and the capability matrix: **[zoowork-agents-docs](https://
|
|
360
|
+
Full guides and the capability matrix: **[zoowork-agents-docs](https://zoowork.ai/docs/)**.
|
|
361
361
|
|
|
362
362
|
Runnable examples in [`examples/`](examples):
|
|
363
363
|
|
|
@@ -408,11 +408,6 @@ MIT
|
|
|
408
408
|
These helpers require an SDK release that includes them. Check the installed declarations before using an example; use the documented HTTP endpoint if the installed release lacks the method.
|
|
409
409
|
|
|
410
410
|
```ts
|
|
411
|
-
const files = await zc.getWorkspaceFile(agentId, '/workspace')
|
|
412
|
-
await zc.writeWorkspaceFile(agentId, '/workspace/input.txt', 'hello')
|
|
413
|
-
const bytes = await zc.getWorkspaceFileContent(agentId, '/workspace/result.bin')
|
|
414
|
-
const database = await zc.getAgentDatabase(agentId) // reading never provisions it
|
|
415
|
-
const rows = await zc.getAgentDatabaseRows(agentId, 'results', { limit: 100, offset: 0 })
|
|
416
411
|
const usage = await zc.getUsage({ range: '7d', view: 'both' })
|
|
417
412
|
const endpoint = await zc.createAgentWebhook(agentId, {
|
|
418
413
|
url: 'https://receiver.example/webhook', event_types: ['run.finished'],
|
|
@@ -423,9 +418,10 @@ const output = await zc.getRunOutput(agentId, sessionId, runId)
|
|
|
423
418
|
const approvals = await zc.listApprovalPage(agentId, { sessionId })
|
|
424
419
|
```
|
|
425
420
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
421
|
+
Direct workspace Files and the database viewer are not supported production workflows.
|
|
422
|
+
Supply text in Session messages, ask the Agent to create and publish Artifacts, and download
|
|
423
|
+
those through the Artifact API. The Agent can use `agent_db` and return query results in its
|
|
424
|
+
reply. Method presence is not production availability. Usage stays within the current key scope. Page helpers retain `next_cursor` and `has_more`; replay cursors
|
|
429
425
|
verbatim. `getApproval` and `getCustomToolCall` read terminal as well as pending actions.
|
|
430
426
|
|
|
431
427
|
Agent webhook methods include get/update/delete, `rotateAgentWebhookSecret`, `testAgentWebhook`,
|
|
@@ -436,5 +432,30 @@ records to learn the result. SDK writes do not retry automatically.
|
|
|
436
432
|
`createSession` accepts `runtime_mode: 'active'` to pin the current active configuration at
|
|
437
433
|
creation. Omit it to resolve active configuration on later turns. `idle_compaction` preserves
|
|
438
434
|
false, null and omission. MCP tool overrides accept `requireConfirmation?: boolean`.
|
|
439
|
-
`updateAgent`
|
|
440
|
-
`
|
|
435
|
+
Production `updateAgent` currently rejects `expected_config_version` with
|
|
436
|
+
`400 invalid_declared_key`. Omit it for ordinary last-write-wins updates; serialize competing
|
|
437
|
+
writes in your application. A GET followed by PUT is not atomic. Ownership-only changes do not
|
|
438
|
+
increment the configuration version. The separate `upgradeSystemPrompt` precondition remains supported.
|
|
439
|
+
|
|
440
|
+
## Current production behavior
|
|
441
|
+
|
|
442
|
+
- Manual Schedule execution requires `enabled: true`, which also enables automatic firings.
|
|
443
|
+
A disabled Schedule can return `triggered: true` and still be skipped. The receipt is not a
|
|
444
|
+
run result; run rows can lack status/session linkage.
|
|
445
|
+
- Approval waiting is `agent.approval` / `requested`; `resolved` ends the approval wait.
|
|
446
|
+
`agent.tool` / `blocked` ends a call without execution, with no later `end`. Reasons include
|
|
447
|
+
policy denial, approval denial/timeout/cancellation, or interruption; inspect the event
|
|
448
|
+
payload's `deniedReason`.
|
|
449
|
+
- Save each processed stream cursor with its Session ID. Pass it when reading a subsequent
|
|
450
|
+
turn in that Session. No cursor means replay from the beginning, including old `run.finished`.
|
|
451
|
+
REST events and post-event receipts do not supply a cursor; the last REST page has a null
|
|
452
|
+
continuation token. There is no current-tail helper. Without a saved cursor, replay and
|
|
453
|
+
reconstruct state or deliberately start a new conversation; do not synthesize a cursor from seq.
|
|
454
|
+
- First Agent deletion succeeds with 204; repeated deletion returns 404 through the public API.
|
|
455
|
+
For cleanup retries, interpret 404 as absence only for a known Agent with unchanged key scope.
|
|
456
|
+
Other-tenant or inaccessible resources also return 404.
|
|
457
|
+
- Invalid Usage parameters can return either `400 usage.invalid_query` or 422 with no business
|
|
458
|
+
error type. Correct the parameters rather than retrying unchanged. Match status as well as type.
|
|
459
|
+
|
|
460
|
+
See the [public guides](https://zoowork.ai/docs/) for supported workflows. These notes do not
|
|
461
|
+
change SDK transport behavior or make unavailable endpoints usable.
|
package/dist/client.d.ts
CHANGED
|
@@ -1351,10 +1351,13 @@ export interface ZooworkClient extends DeveloperApi {
|
|
|
1351
1351
|
listAgents(opts?: AgentListParams): AgentPagePromise;
|
|
1352
1352
|
getAgent(agentId: string): Promise<AgentRecord>;
|
|
1353
1353
|
/** PUT declared sections. Ownership-only changes do not bump config_version.
|
|
1354
|
-
*
|
|
1354
|
+
* Production currently rejects expected_config_version with 400 invalid_declared_key.
|
|
1355
|
+
* Omit it for last-write-wins updates and serialize competing writes in the application. */
|
|
1355
1356
|
updateAgent(agentId: string, sections: Record<string, unknown>): Promise<AgentRecord>;
|
|
1356
1357
|
/**
|
|
1357
1358
|
* Soft delete: the agent stops resolving on the API, but this is not a resource purge.
|
|
1359
|
+
* The first public-API deletion returns 204; repeating it returns 404. A 404 can also
|
|
1360
|
+
* hide an inaccessible resource, so cleanup retries must retain the original key scope.
|
|
1358
1361
|
* On gateway releases that carry the channels surface, a successful delete also
|
|
1359
1362
|
* best-effort disables the agent's bound channels — a failure there never turns the
|
|
1360
1363
|
* delete into an error, so a chat binding can in rare cases outlive its agent.
|
package/dist/events.d.ts
CHANGED
|
@@ -95,8 +95,9 @@ export declare function customToolUse(e: SessionEvent): CustomToolUse | undefine
|
|
|
95
95
|
* `phase: 'end'` carries `isError` and `resultPreview`. Pair them by `toolCallId` — they are
|
|
96
96
|
* NOT adjacent in the stream when calls run concurrently.
|
|
97
97
|
*
|
|
98
|
-
* `phase: 'blocked'`
|
|
99
|
-
*
|
|
100
|
-
*
|
|
98
|
+
* `phase: 'blocked'` ends the call without execution; no `end` follows. Reasons include
|
|
99
|
+
* policy denial, approval denial/timeout/cancellation, or interruption. Inspect
|
|
100
|
+
* `e.payload.deniedReason` for the reason. Approval waiting uses `agent.approval` with `phase: 'requested'`,
|
|
101
|
+
* followed by `phase: 'resolved'`. A resolution is not proof of successful execution.
|
|
101
102
|
*/
|
|
102
103
|
export declare function toolCall(e: SessionEvent): ToolCall | undefined;
|
package/dist/events.js
CHANGED
|
@@ -152,9 +152,10 @@ export function customToolUse(e) {
|
|
|
152
152
|
* `phase: 'end'` carries `isError` and `resultPreview`. Pair them by `toolCallId` — they are
|
|
153
153
|
* NOT adjacent in the stream when calls run concurrently.
|
|
154
154
|
*
|
|
155
|
-
* `phase: 'blocked'`
|
|
156
|
-
*
|
|
157
|
-
*
|
|
155
|
+
* `phase: 'blocked'` ends the call without execution; no `end` follows. Reasons include
|
|
156
|
+
* policy denial, approval denial/timeout/cancellation, or interruption. Inspect
|
|
157
|
+
* `e.payload.deniedReason` for the reason. Approval waiting uses `agent.approval` with `phase: 'requested'`,
|
|
158
|
+
* followed by `phase: 'resolved'`. A resolution is not proof of successful execution.
|
|
158
159
|
*/
|
|
159
160
|
export function toolCall(e) {
|
|
160
161
|
if (e.eventType !== 'agent.tool')
|