@zenadmin-ai/sdk 0.3.1 → 0.3.2

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/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Operation, type ReadResult, type Tool, type WhoAmI } from "./types.js";
2
- export declare const SDK_VERSION = "0.3.1";
2
+ export declare const SDK_VERSION = "0.3.2";
3
3
  export interface ZenAdminOptions {
4
4
  token: string;
5
5
  apiUrl?: string;
package/dist/index.js CHANGED
@@ -282,7 +282,7 @@ var isReusable = (operation) => !isSettled(operation) || operation.status === "u
282
282
  var ReadResultSchema = z.record(z.string(), z.unknown());
283
283
 
284
284
  // packages/sdk/src/client.ts
285
- var SDK_VERSION = "0.3.1";
285
+ var SDK_VERSION = "0.3.2";
286
286
  var REQUEST_ID = /^[A-Za-z0-9_-]{8,64}$/;
287
287
  var RETRY_STATUSES = new Set([429, 502, 503, 504]);
288
288
  var defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
package/dist/types.d.ts CHANGED
@@ -4,29 +4,29 @@
4
4
  */
5
5
  import { z } from "zod";
6
6
  export declare const ChannelSchema: z.ZodEnum<{
7
+ cli: "cli";
7
8
  console: "console";
8
9
  mcp: "mcp";
9
- cli: "cli";
10
10
  }>;
11
11
  export declare const WhoAmISchema: z.ZodObject<{
12
12
  company_id: z.ZodString;
13
13
  company_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
14
  user_id: z.ZodString;
15
15
  channel: z.ZodEnum<{
16
+ cli: "cli";
16
17
  console: "console";
17
18
  mcp: "mcp";
18
- cli: "cli";
19
19
  }>;
20
20
  token: z.ZodNullable<z.ZodObject<{
21
21
  id: z.ZodString;
22
22
  kind: z.ZodEnum<{
23
- personal: "personal";
24
23
  automation: "automation";
25
24
  connection: "connection";
25
+ personal: "personal";
26
26
  }>;
27
27
  scopes: z.ZodArray<z.ZodEnum<{
28
- read: "read";
29
28
  propose: "propose";
29
+ read: "read";
30
30
  }>>;
31
31
  expires_at: z.ZodString;
32
32
  }, z.core.$strip>>;
@@ -34,10 +34,10 @@ export declare const WhoAmISchema: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  export type WhoAmI = z.infer<typeof WhoAmISchema>;
36
36
  export declare const ImpactSchema: z.ZodEnum<{
37
- none: "none";
37
+ high: "high";
38
38
  low: "low";
39
39
  medium: "medium";
40
- high: "high";
40
+ none: "none";
41
41
  }>;
42
42
  /** One tool the caller can use now. Every tool is classified: read or write, impact, scope. */
43
43
  export declare const ToolSchema: z.ZodObject<{
@@ -51,14 +51,14 @@ export declare const ToolSchema: z.ZodObject<{
51
51
  module: z.ZodString;
52
52
  requires_approval: z.ZodBoolean;
53
53
  impact: z.ZodEnum<{
54
- none: "none";
54
+ high: "high";
55
55
  low: "low";
56
56
  medium: "medium";
57
- high: "high";
57
+ none: "none";
58
58
  }>;
59
59
  scope: z.ZodEnum<{
60
- read: "read";
61
60
  propose: "propose";
61
+ read: "read";
62
62
  }>;
63
63
  input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
64
64
  }, z.core.$strip>;
@@ -75,39 +75,39 @@ export declare const ToolListSchema: z.ZodObject<{
75
75
  module: z.ZodString;
76
76
  requires_approval: z.ZodBoolean;
77
77
  impact: z.ZodEnum<{
78
- none: "none";
78
+ high: "high";
79
79
  low: "low";
80
80
  medium: "medium";
81
- high: "high";
81
+ none: "none";
82
82
  }>;
83
83
  scope: z.ZodEnum<{
84
- read: "read";
85
84
  propose: "propose";
85
+ read: "read";
86
86
  }>;
87
87
  input_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
88
88
  }, z.core.$strip>>;
89
89
  }, z.core.$strip>;
90
90
  export declare const OperationStatusSchema: z.ZodEnum<{
91
- unknown: "unknown";
91
+ cancelled: "cancelled";
92
+ expired: "expired";
93
+ failed: "failed";
92
94
  pending_approval: "pending_approval";
93
95
  running: "running";
94
96
  succeeded: "succeeded";
95
- failed: "failed";
96
- cancelled: "cancelled";
97
- expired: "expired";
97
+ unknown: "unknown";
98
98
  }>;
99
99
  export type OperationStatus = z.infer<typeof OperationStatusSchema>;
100
100
  export declare const OperationSchema: z.ZodObject<{
101
101
  id: z.ZodString;
102
102
  action: z.ZodString;
103
103
  status: z.ZodEnum<{
104
- unknown: "unknown";
104
+ cancelled: "cancelled";
105
+ expired: "expired";
106
+ failed: "failed";
105
107
  pending_approval: "pending_approval";
106
108
  running: "running";
107
109
  succeeded: "succeeded";
108
- failed: "failed";
109
- cancelled: "cancelled";
110
- expired: "expired";
110
+ unknown: "unknown";
111
111
  }>;
112
112
  payload_hash: z.ZodString;
113
113
  title: z.ZodString;
@@ -122,9 +122,9 @@ export declare const OperationSchema: z.ZodObject<{
122
122
  href: z.ZodString;
123
123
  }, z.core.$strip>>;
124
124
  impact: z.ZodEnum<{
125
+ high: "high";
125
126
  low: "low";
126
127
  medium: "medium";
127
- high: "high";
128
128
  }>;
129
129
  expires_at: z.ZodString;
130
130
  result: z.ZodNullable<z.ZodObject<{
@@ -143,9 +143,9 @@ export declare const OperationSchema: z.ZodObject<{
143
143
  message: z.ZodString;
144
144
  }, z.core.$strip>>;
145
145
  channel: z.ZodOptional<z.ZodEnum<{
146
+ cli: "cli";
146
147
  console: "console";
147
148
  mcp: "mcp";
148
- cli: "cli";
149
149
  }>>;
150
150
  approval_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
151
  }, z.core.$strip>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenadmin-ai/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript client for the ZenAdmin agent API: read tools and approval-bound changes.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",