@zoowork-ai/sdk 0.7.0 → 0.8.0

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 CHANGED
@@ -3,6 +3,19 @@
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.8.0 — 2026-09-20
7
+
8
+ ### Added
9
+
10
+ - Model catalog lifecycle metadata, including `selectable` and replacement hints.
11
+ - Deleted Session tombstones in filtered cursor pages through `includeDeleted`.
12
+ - Agent declaration fields for global-Skill opt-out and named user timezones.
13
+
14
+ ### Changed
15
+
16
+ - Model-selection examples now reject non-selectable catalog rows; selecting one can return
17
+ `409 model_not_selectable`.
18
+
6
19
  ## 0.7.0 — 2026-09-14
7
20
 
8
21
  ### Added
package/README.md CHANGED
@@ -29,8 +29,10 @@ The base URL has a working default, so you do not configure an endpoint. Overrid
29
29
  // send. Select a model returned by this deployment instead of relying on a
30
30
  // remembered id or on a server default that can rotate.
31
31
  const models = await zc.listModels()
32
- const primary = models.find((model) => model.model === 'litellm/gpt-5.6-terra')?.model
33
- if (!primary) throw new Error('Choose a model returned by listModels()')
32
+ const primary = models.find(
33
+ (model) => model.selectable !== false && model.model === 'litellm/gpt-5.6-terra',
34
+ )?.model
35
+ if (!primary) throw new Error('Choose a selectable model returned by listModels()')
34
36
 
35
37
  const agent = await zc.createAgent({
36
38
  resource: { name: 'research-agent', model: { primary } },
@@ -45,6 +47,15 @@ const session = await zc.createSession(agent.agent_id, {
45
47
  })
46
48
  ```
47
49
 
50
+ `listModels()` can include a model whose retirement has started. Check `selectable !== false`
51
+ before using a catalog row in a new Agent or config. A non-selectable choice returns
52
+ `409 model_not_selectable`; `expired_fallback_to` names the reviewed replacement when present.
53
+
54
+ Agent resources also accept `userTimezone`, a named IANA timezone used for prompt and message
55
+ time context, and `include_global_skills: false` to disable automatic global Skills while keeping
56
+ explicitly listed Skills. An explicit `skills: []` also opts out. Schedule timezones are configured
57
+ separately.
58
+
48
59
  ## Configuration
49
60
 
50
61
  | Option | Environment variable | Default |
@@ -204,6 +215,9 @@ const { exit_code, stdout } = await zc.exec(agent.agent_id, ['bash', '-lc', 'pwd
204
215
  `listSessions` keeps the legacy numeric-page contract. Use `listSessionPage` for the filtered
205
216
  cursor lane: it starts with `sls1:0`, accepts channel/surface/runtime/archive filters, and returns
206
217
  `next_cursor` plus a `list_cursor` on each row. Cursors are opaque and bound to the same filters.
218
+ Pass `{ includeDeleted: true }` to include deletion tombstones for reconciliation; returned rows
219
+ then carry `deleted` and the page carries `includes_deleted: true`. This flag is part of the cursor
220
+ scope, so do not reuse a cursor created without it.
207
221
  `archiveSession` and `deleteSession` round out the session surface. There is no
208
222
  `patchSession`: the gateway does not proxy `PATCH` at all (405), so session `metadata` is fixed at
209
223
  creation time.
package/dist/client.d.ts CHANGED
@@ -121,6 +121,15 @@ export interface ModelInfo {
121
121
  display_name?: string;
122
122
  family?: string;
123
123
  api?: string;
124
+ expired_at?: string | null;
125
+ expired_fallback_to?: string | null;
126
+ retired_at?: string | null;
127
+ revision?: number;
128
+ lifecycle_status?: 'active' | 'scheduled' | 'draining' | 'retired' | string;
129
+ /** `false` means this catalog row cannot be selected for a new Agent or config. */
130
+ selectable?: boolean;
131
+ retire_not_before?: string | null;
132
+ default_for?: string[];
124
133
  [k: string]: unknown;
125
134
  }
126
135
  /** Approval behavior for one MCP server or one of its tools. */
@@ -269,6 +278,8 @@ export interface OutcomeConfig {
269
278
  }
270
279
  export interface AgentResource {
271
280
  name: string;
281
+ /** Named IANA timezone used in prompt context and message timestamps, e.g. `Asia/Shanghai`. */
282
+ userTimezone?: string;
272
283
  /**
273
284
  * Omit this section to pin the platform's current model defaults at create time. Those
274
285
  * defaults can rotate; call `listModels()` and set `primary` explicitly for deterministic
@@ -291,6 +302,11 @@ export interface AgentResource {
291
302
  skill_id: string;
292
303
  version?: number | 'latest';
293
304
  }[];
305
+ /**
306
+ * Defaults to true. False disables automatic global Skills without removing explicitly
307
+ * listed Skills. An explicit empty `skills` array also opts out.
308
+ */
309
+ include_global_skills?: boolean;
294
310
  labels?: Record<string, string>;
295
311
  /**
296
312
  * Tool-surface and approval policy. Name selectors in `allow`, `deny`, `rules[].match.tool`,
@@ -717,6 +733,8 @@ export interface SessionRecord {
717
733
  status?: string | null;
718
734
  metadata?: Record<string, unknown>;
719
735
  archived?: boolean;
736
+ /** Present on filtered pages only when `includeDeleted` was requested. */
737
+ deleted?: boolean;
720
738
  runtime_mode?: 'active' | 'preview' | 'authoring' | 'evaluation' | string;
721
739
  config_version?: number;
722
740
  updated_at?: string;
@@ -789,11 +807,15 @@ export interface SessionListPageOptions {
789
807
  includeSurfaces?: string[];
790
808
  runtimeModes?: Array<'active' | 'preview' | 'authoring' | 'evaluation'>;
791
809
  includeArchived?: boolean;
810
+ /** Include deleted Session tombstones for history reconciliation. Changes the cursor scope. */
811
+ includeDeleted?: boolean;
792
812
  }
793
813
  /** One filtered session page. `next_cursor` is null at the end. */
794
814
  export interface SessionListPage {
795
815
  sessions: SessionRecord[];
796
816
  next_cursor: string | null;
817
+ /** Present and true only when deleted tombstones were requested. */
818
+ includes_deleted?: true;
797
819
  }
798
820
  /** One `postEvents` receipt. An accepted event carries the full event object's fields too. */
799
821
  export interface PostEventReceipt {
package/dist/client.js CHANGED
@@ -551,8 +551,13 @@ export function createZooworkClient(cfg = {}) {
551
551
  include_surfaces: opts.includeSurfaces?.join(','),
552
552
  runtime_modes: opts.runtimeModes?.join(','),
553
553
  include_archived: opts.includeArchived === undefined ? undefined : String(opts.includeArchived),
554
+ include_deleted: opts.includeDeleted === undefined ? undefined : String(opts.includeDeleted),
554
555
  })}`);
555
- return { sessions: data.sessions ?? [], next_cursor: data.next_cursor ?? null };
556
+ return {
557
+ sessions: data.sessions ?? [],
558
+ next_cursor: data.next_cursor ?? null,
559
+ ...(data.includes_deleted === true ? { includes_deleted: true } : {}),
560
+ };
556
561
  },
557
562
  archiveSession: async (agentId, sessionId) => {
558
563
  const data = await json(`${sessions(agentId)}/${encodeURIComponent(sessionId)}/archive`, { method: 'POST' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoowork-ai/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "TypeScript SDK for the ZooWork Managed Agents API (Developer Preview)",
5
5
  "keywords": [
6
6
  "zoowork",