@kya-os/checkpoint-shared 1.2.0 → 1.2.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.
Files changed (33) hide show
  1. package/dist/deploy/index.d.mts +380 -0
  2. package/dist/deploy/index.d.ts +380 -0
  3. package/dist/deploy/index.js +221 -0
  4. package/dist/deploy/index.mjs +207 -0
  5. package/dist/gateway/index.d.mts +575 -0
  6. package/dist/gateway/index.d.ts +575 -0
  7. package/dist/gateway/index.js +98 -0
  8. package/dist/gateway/index.mjs +88 -0
  9. package/dist/index.d.mts +1370 -84
  10. package/dist/index.d.ts +1370 -84
  11. package/dist/index.js +2887 -2205
  12. package/dist/index.mjs +2844 -2204
  13. package/dist/mcpi/agentshield-api/index.d.mts +47 -0
  14. package/dist/mcpi/agentshield-api/index.d.ts +47 -0
  15. package/dist/mcpi/agentshield-api/index.js +2 -0
  16. package/dist/mcpi/agentshield-api/index.mjs +1 -0
  17. package/dist/mcpi/approval-grant/index.d.mts +79 -0
  18. package/dist/mcpi/approval-grant/index.d.ts +79 -0
  19. package/dist/mcpi/approval-grant/index.js +157 -0
  20. package/dist/mcpi/approval-grant/index.mjs +150 -0
  21. package/dist/mcpi/dashboard-config/index.d.mts +14075 -0
  22. package/dist/mcpi/dashboard-config/index.d.ts +14075 -0
  23. package/dist/mcpi/dashboard-config/index.js +517 -0
  24. package/dist/mcpi/dashboard-config/index.mjs +492 -0
  25. package/dist/test-fixtures/index.d.mts +17 -8
  26. package/dist/test-fixtures/index.d.ts +17 -8
  27. package/dist/test-fixtures/index.js +73 -7
  28. package/dist/test-fixtures/index.mjs +73 -8
  29. package/dist/tool-protection/index.d.mts +1120 -0
  30. package/dist/tool-protection/index.d.ts +1120 -0
  31. package/dist/tool-protection/index.js +370 -0
  32. package/dist/tool-protection/index.mjs +338 -0
  33. package/package.json +32 -1
@@ -0,0 +1,380 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const DidStringSchema: z.ZodString;
4
+ declare const FlyRegionSchema: z.ZodEnum<["ams", "arn", "atl", "bog", "bos", "cdg", "den", "dfw", "ewr", "eze", "fra", "gdl", "gig", "gru", "hkg", "iad", "jnb", "lax", "lhr", "mad", "mia", "nrt", "ord", "otp", "phx", "qro", "scl", "sea", "sin", "sjc", "syd", "waw", "yul", "yyz"]>;
5
+ type FlyRegion = z.infer<typeof FlyRegionSchema>;
6
+ declare const HostingModeSchema: z.ZodEnum<["byok", "managed"]>;
7
+ type HostingMode = z.infer<typeof HostingModeSchema>;
8
+ declare const ManagedDeployStepStatusSchema: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
9
+ type ManagedDeployStepStatus = z.infer<typeof ManagedDeployStepStatusSchema>;
10
+ declare const HeartbeatRequestSchema: z.ZodObject<{
11
+ agentDid: z.ZodString;
12
+ status: z.ZodEnum<["starting", "running", "error", "stopping"]>;
13
+ computeVersion: z.ZodString;
14
+ openclawVersion: z.ZodOptional<z.ZodString>;
15
+ machineId: z.ZodOptional<z.ZodString>;
16
+ uptimeSeconds: z.ZodOptional<z.ZodNumber>;
17
+ memoryMb: z.ZodOptional<z.ZodNumber>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ status: "starting" | "running" | "error" | "stopping";
20
+ agentDid: string;
21
+ computeVersion: string;
22
+ openclawVersion?: string | undefined;
23
+ machineId?: string | undefined;
24
+ uptimeSeconds?: number | undefined;
25
+ memoryMb?: number | undefined;
26
+ }, {
27
+ status: "starting" | "running" | "error" | "stopping";
28
+ agentDid: string;
29
+ computeVersion: string;
30
+ openclawVersion?: string | undefined;
31
+ machineId?: string | undefined;
32
+ uptimeSeconds?: number | undefined;
33
+ memoryMb?: number | undefined;
34
+ }>;
35
+ type HeartbeatRequest = z.infer<typeof HeartbeatRequestSchema>;
36
+ declare const StopCommandSchema: z.ZodObject<{
37
+ type: z.ZodLiteral<"stop">;
38
+ }, "strict", z.ZodTypeAny, {
39
+ type: "stop";
40
+ }, {
41
+ type: "stop";
42
+ }>;
43
+ declare const RestartCommandSchema: z.ZodObject<{
44
+ type: z.ZodLiteral<"restart">;
45
+ }, "strict", z.ZodTypeAny, {
46
+ type: "restart";
47
+ }, {
48
+ type: "restart";
49
+ }>;
50
+ declare const UpdateConfigCommandSchema: z.ZodObject<{
51
+ type: z.ZodLiteral<"update_config">;
52
+ }, "strict", z.ZodTypeAny, {
53
+ type: "update_config";
54
+ }, {
55
+ type: "update_config";
56
+ }>;
57
+ declare const UpdateVersionCommandSchema: z.ZodObject<{
58
+ type: z.ZodLiteral<"update_version">;
59
+ payload: z.ZodObject<{
60
+ version: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ version: string;
63
+ }, {
64
+ version: string;
65
+ }>;
66
+ }, "strict", z.ZodTypeAny, {
67
+ type: "update_version";
68
+ payload: {
69
+ version: string;
70
+ };
71
+ }, {
72
+ type: "update_version";
73
+ payload: {
74
+ version: string;
75
+ };
76
+ }>;
77
+ declare const ComputeCommandSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
78
+ type: z.ZodLiteral<"stop">;
79
+ }, "strict", z.ZodTypeAny, {
80
+ type: "stop";
81
+ }, {
82
+ type: "stop";
83
+ }>, z.ZodObject<{
84
+ type: z.ZodLiteral<"restart">;
85
+ }, "strict", z.ZodTypeAny, {
86
+ type: "restart";
87
+ }, {
88
+ type: "restart";
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"update_config">;
91
+ }, "strict", z.ZodTypeAny, {
92
+ type: "update_config";
93
+ }, {
94
+ type: "update_config";
95
+ }>, z.ZodObject<{
96
+ type: z.ZodLiteral<"update_version">;
97
+ payload: z.ZodObject<{
98
+ version: z.ZodString;
99
+ }, "strip", z.ZodTypeAny, {
100
+ version: string;
101
+ }, {
102
+ version: string;
103
+ }>;
104
+ }, "strict", z.ZodTypeAny, {
105
+ type: "update_version";
106
+ payload: {
107
+ version: string;
108
+ };
109
+ }, {
110
+ type: "update_version";
111
+ payload: {
112
+ version: string;
113
+ };
114
+ }>]>;
115
+ type ComputeCommand = z.infer<typeof ComputeCommandSchema>;
116
+ declare const HeartbeatResponseSchema: z.ZodObject<{
117
+ ack: z.ZodLiteral<true>;
118
+ commands: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
119
+ type: z.ZodLiteral<"stop">;
120
+ }, "strict", z.ZodTypeAny, {
121
+ type: "stop";
122
+ }, {
123
+ type: "stop";
124
+ }>, z.ZodObject<{
125
+ type: z.ZodLiteral<"restart">;
126
+ }, "strict", z.ZodTypeAny, {
127
+ type: "restart";
128
+ }, {
129
+ type: "restart";
130
+ }>, z.ZodObject<{
131
+ type: z.ZodLiteral<"update_config">;
132
+ }, "strict", z.ZodTypeAny, {
133
+ type: "update_config";
134
+ }, {
135
+ type: "update_config";
136
+ }>, z.ZodObject<{
137
+ type: z.ZodLiteral<"update_version">;
138
+ payload: z.ZodObject<{
139
+ version: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ version: string;
142
+ }, {
143
+ version: string;
144
+ }>;
145
+ }, "strict", z.ZodTypeAny, {
146
+ type: "update_version";
147
+ payload: {
148
+ version: string;
149
+ };
150
+ }, {
151
+ type: "update_version";
152
+ payload: {
153
+ version: string;
154
+ };
155
+ }>]>, "many">>;
156
+ configUpdatedAt: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ ack: true;
159
+ commands: ({
160
+ type: "stop";
161
+ } | {
162
+ type: "restart";
163
+ } | {
164
+ type: "update_config";
165
+ } | {
166
+ type: "update_version";
167
+ payload: {
168
+ version: string;
169
+ };
170
+ })[];
171
+ configUpdatedAt?: string | undefined;
172
+ }, {
173
+ ack: true;
174
+ commands?: ({
175
+ type: "stop";
176
+ } | {
177
+ type: "restart";
178
+ } | {
179
+ type: "update_config";
180
+ } | {
181
+ type: "update_version";
182
+ payload: {
183
+ version: string;
184
+ };
185
+ })[] | undefined;
186
+ configUpdatedAt?: string | undefined;
187
+ }>;
188
+ type HeartbeatResponse = z.infer<typeof HeartbeatResponseSchema>;
189
+ declare const ConfigBundleSchema: z.ZodObject<{
190
+ version: z.ZodNumber;
191
+ killed: z.ZodBoolean;
192
+ openclawVersion: z.ZodString;
193
+ soulFile: z.ZodNullable<z.ZodString>;
194
+ gatewayToken: z.ZodString;
195
+ channels: z.ZodObject<{
196
+ telegram: z.ZodOptional<z.ZodObject<{
197
+ enabled: z.ZodBoolean;
198
+ token: z.ZodOptional<z.ZodString>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ enabled: boolean;
201
+ token?: string | undefined;
202
+ }, {
203
+ enabled: boolean;
204
+ token?: string | undefined;
205
+ }>>;
206
+ discord: z.ZodOptional<z.ZodObject<{
207
+ enabled: z.ZodBoolean;
208
+ token: z.ZodOptional<z.ZodString>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ enabled: boolean;
211
+ token?: string | undefined;
212
+ }, {
213
+ enabled: boolean;
214
+ token?: string | undefined;
215
+ }>>;
216
+ slack: z.ZodOptional<z.ZodObject<{
217
+ enabled: z.ZodBoolean;
218
+ token: z.ZodOptional<z.ZodString>;
219
+ appToken: z.ZodOptional<z.ZodString>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ enabled: boolean;
222
+ token?: string | undefined;
223
+ appToken?: string | undefined;
224
+ }, {
225
+ enabled: boolean;
226
+ token?: string | undefined;
227
+ appToken?: string | undefined;
228
+ }>>;
229
+ whatsapp: z.ZodOptional<z.ZodObject<{
230
+ enabled: z.ZodBoolean;
231
+ }, "strict", z.ZodTypeAny, {
232
+ enabled: boolean;
233
+ }, {
234
+ enabled: boolean;
235
+ }>>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ telegram?: {
238
+ enabled: boolean;
239
+ token?: string | undefined;
240
+ } | undefined;
241
+ discord?: {
242
+ enabled: boolean;
243
+ token?: string | undefined;
244
+ } | undefined;
245
+ slack?: {
246
+ enabled: boolean;
247
+ token?: string | undefined;
248
+ appToken?: string | undefined;
249
+ } | undefined;
250
+ whatsapp?: {
251
+ enabled: boolean;
252
+ } | undefined;
253
+ }, {
254
+ telegram?: {
255
+ enabled: boolean;
256
+ token?: string | undefined;
257
+ } | undefined;
258
+ discord?: {
259
+ enabled: boolean;
260
+ token?: string | undefined;
261
+ } | undefined;
262
+ slack?: {
263
+ enabled: boolean;
264
+ token?: string | undefined;
265
+ appToken?: string | undefined;
266
+ } | undefined;
267
+ whatsapp?: {
268
+ enabled: boolean;
269
+ } | undefined;
270
+ }>;
271
+ aiProvider: z.ZodObject<{
272
+ type: z.ZodEnum<["anthropic", "openai"]>;
273
+ apiKey: z.ZodString;
274
+ baseUrl: z.ZodOptional<z.ZodString>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ type: "anthropic" | "openai";
277
+ apiKey: string;
278
+ baseUrl?: string | undefined;
279
+ }, {
280
+ type: "anthropic" | "openai";
281
+ apiKey: string;
282
+ baseUrl?: string | undefined;
283
+ }>;
284
+ heartbeatEvery: z.ZodOptional<z.ZodString>;
285
+ modelOverride: z.ZodOptional<z.ZodString>;
286
+ updatedAt: z.ZodString;
287
+ }, "strip", z.ZodTypeAny, {
288
+ openclawVersion: string;
289
+ version: number;
290
+ killed: boolean;
291
+ soulFile: string | null;
292
+ gatewayToken: string;
293
+ channels: {
294
+ telegram?: {
295
+ enabled: boolean;
296
+ token?: string | undefined;
297
+ } | undefined;
298
+ discord?: {
299
+ enabled: boolean;
300
+ token?: string | undefined;
301
+ } | undefined;
302
+ slack?: {
303
+ enabled: boolean;
304
+ token?: string | undefined;
305
+ appToken?: string | undefined;
306
+ } | undefined;
307
+ whatsapp?: {
308
+ enabled: boolean;
309
+ } | undefined;
310
+ };
311
+ aiProvider: {
312
+ type: "anthropic" | "openai";
313
+ apiKey: string;
314
+ baseUrl?: string | undefined;
315
+ };
316
+ updatedAt: string;
317
+ heartbeatEvery?: string | undefined;
318
+ modelOverride?: string | undefined;
319
+ }, {
320
+ openclawVersion: string;
321
+ version: number;
322
+ killed: boolean;
323
+ soulFile: string | null;
324
+ gatewayToken: string;
325
+ channels: {
326
+ telegram?: {
327
+ enabled: boolean;
328
+ token?: string | undefined;
329
+ } | undefined;
330
+ discord?: {
331
+ enabled: boolean;
332
+ token?: string | undefined;
333
+ } | undefined;
334
+ slack?: {
335
+ enabled: boolean;
336
+ token?: string | undefined;
337
+ appToken?: string | undefined;
338
+ } | undefined;
339
+ whatsapp?: {
340
+ enabled: boolean;
341
+ } | undefined;
342
+ };
343
+ aiProvider: {
344
+ type: "anthropic" | "openai";
345
+ apiKey: string;
346
+ baseUrl?: string | undefined;
347
+ };
348
+ updatedAt: string;
349
+ heartbeatEvery?: string | undefined;
350
+ modelOverride?: string | undefined;
351
+ }>;
352
+ type ConfigBundle = z.infer<typeof ConfigBundleSchema>;
353
+ declare const ControlStatusSchema: z.ZodObject<{
354
+ healthy: z.ZodBoolean;
355
+ uptimeSeconds: z.ZodNumber;
356
+ openclawVersion: z.ZodString;
357
+ computeVersion: z.ZodString;
358
+ activeConnections: z.ZodNumber;
359
+ memoryMb: z.ZodNumber;
360
+ cpuPercent: z.ZodNumber;
361
+ }, "strip", z.ZodTypeAny, {
362
+ computeVersion: string;
363
+ openclawVersion: string;
364
+ uptimeSeconds: number;
365
+ memoryMb: number;
366
+ healthy: boolean;
367
+ activeConnections: number;
368
+ cpuPercent: number;
369
+ }, {
370
+ computeVersion: string;
371
+ openclawVersion: string;
372
+ uptimeSeconds: number;
373
+ memoryMb: number;
374
+ healthy: boolean;
375
+ activeConnections: number;
376
+ cpuPercent: number;
377
+ }>;
378
+ type ControlStatus = z.infer<typeof ControlStatusSchema>;
379
+
380
+ export { type ComputeCommand, ComputeCommandSchema, type ConfigBundle, ConfigBundleSchema, type ControlStatus, ControlStatusSchema, DidStringSchema, type FlyRegion, FlyRegionSchema, type HeartbeatRequest, HeartbeatRequestSchema, type HeartbeatResponse, HeartbeatResponseSchema, type HostingMode, HostingModeSchema, type ManagedDeployStepStatus, ManagedDeployStepStatusSchema, RestartCommandSchema, StopCommandSchema, UpdateConfigCommandSchema, UpdateVersionCommandSchema };
@@ -0,0 +1,221 @@
1
+ 'use strict';
2
+
3
+ var zod = require('zod');
4
+
5
+ // src/deploy/index.ts
6
+ var DidStringSchema = zod.z.string().min(8, "DID must be at least 8 characters").regex(/^did:[a-z0-9]+:\S+$/, "DID must match format did:<method>:<method-specific-id>");
7
+ var FlyRegionSchema = zod.z.enum([
8
+ "ams",
9
+ // Amsterdam, Netherlands
10
+ "arn",
11
+ // Stockholm, Sweden
12
+ "atl",
13
+ // Atlanta, Georgia (US)
14
+ "bog",
15
+ // Bogotá, Colombia
16
+ "bos",
17
+ // Boston, Massachusetts (US)
18
+ "cdg",
19
+ // Paris, France
20
+ "den",
21
+ // Denver, Colorado (US)
22
+ "dfw",
23
+ // Dallas, Texas (US)
24
+ "ewr",
25
+ // Secaucus, NJ (US)
26
+ "eze",
27
+ // Ezeiza, Argentina
28
+ "fra",
29
+ // Frankfurt, Germany
30
+ "gdl",
31
+ // Guadalajara, Mexico
32
+ "gig",
33
+ // Rio de Janeiro, Brazil
34
+ "gru",
35
+ // São Paulo, Brazil
36
+ "hkg",
37
+ // Hong Kong
38
+ "iad",
39
+ // Ashburn, Virginia (US)
40
+ "jnb",
41
+ // Johannesburg, South Africa
42
+ "lax",
43
+ // Los Angeles, California (US)
44
+ "lhr",
45
+ // London, United Kingdom
46
+ "mad",
47
+ // Madrid, Spain
48
+ "mia",
49
+ // Miami, Florida (US)
50
+ "nrt",
51
+ // Tokyo, Japan
52
+ "ord",
53
+ // Chicago, Illinois (US)
54
+ "otp",
55
+ // Bucharest, Romania
56
+ "phx",
57
+ // Phoenix, Arizona (US)
58
+ "qro",
59
+ // Querétaro, Mexico
60
+ "scl",
61
+ // Santiago, Chile
62
+ "sea",
63
+ // Seattle, Washington (US)
64
+ "sin",
65
+ // Singapore
66
+ "sjc",
67
+ // San Jose, California (US)
68
+ "syd",
69
+ // Sydney, Australia
70
+ "waw",
71
+ // Warsaw, Poland
72
+ "yul",
73
+ // Montreal, Canada
74
+ "yyz"
75
+ // Toronto, Canada
76
+ ]);
77
+ var HostingModeSchema = zod.z.enum(["byok", "managed"]);
78
+ var ManagedDeployStepStatusSchema = zod.z.enum([
79
+ "pending",
80
+ "in_progress",
81
+ "completed",
82
+ "failed",
83
+ "skipped"
84
+ ]);
85
+ var HeartbeatRequestSchema = zod.z.object({
86
+ /** Agent DID this heartbeat is for */
87
+ agentDid: DidStringSchema,
88
+ /** Current compute process status */
89
+ status: zod.z.enum(["starting", "running", "error", "stopping"]),
90
+ /** @kya-os/compute package version (from package.json) */
91
+ computeVersion: zod.z.string().min(1).max(50),
92
+ /** Installed OpenClaw version (from npm ls) */
93
+ openclawVersion: zod.z.string().max(50).optional(),
94
+ /** Fly machine ID (from FLY_MACHINE_ID env var) */
95
+ machineId: zod.z.string().max(255).optional(),
96
+ /** Seconds since compute process started */
97
+ uptimeSeconds: zod.z.number().nonnegative().optional(),
98
+ /** Current RSS memory in MB */
99
+ memoryMb: zod.z.number().nonnegative().optional()
100
+ });
101
+ var StopCommandSchema = zod.z.object({
102
+ type: zod.z.literal("stop")
103
+ }).strict();
104
+ var RestartCommandSchema = zod.z.object({
105
+ type: zod.z.literal("restart")
106
+ }).strict();
107
+ var UpdateConfigCommandSchema = zod.z.object({
108
+ type: zod.z.literal("update_config")
109
+ }).strict();
110
+ var UpdateVersionCommandSchema = zod.z.object({
111
+ type: zod.z.literal("update_version"),
112
+ payload: zod.z.object({
113
+ /** Target OpenClaw version to install */
114
+ version: zod.z.string().min(1).max(50)
115
+ })
116
+ }).strict();
117
+ var ComputeCommandSchema = zod.z.discriminatedUnion("type", [
118
+ StopCommandSchema,
119
+ RestartCommandSchema,
120
+ UpdateConfigCommandSchema,
121
+ UpdateVersionCommandSchema
122
+ ]);
123
+ var HeartbeatResponseSchema = zod.z.object({
124
+ /** Always true for successful heartbeats */
125
+ ack: zod.z.literal(true),
126
+ /** Pending commands for the compute process to execute */
127
+ commands: zod.z.array(ComputeCommandSchema).default([]),
128
+ /** ISO timestamp of last config change (compute compares to detect updates) */
129
+ configUpdatedAt: zod.z.string().datetime().optional()
130
+ });
131
+ var ConfigBundleSchema = zod.z.object({
132
+ /** Schema version — 2 for managed bundles */
133
+ version: zod.z.number().int().positive(),
134
+ /** Kill switch — if true, compute must exit immediately */
135
+ killed: zod.z.boolean(),
136
+ /** Target OpenClaw version to install */
137
+ openclawVersion: zod.z.string().min(1).max(50),
138
+ /** Agent personality/system prompt file contents (max 100KB) */
139
+ soulFile: zod.z.string().max(1e5).nullable(),
140
+ /** Gateway auth token for OpenClaw */
141
+ gatewayToken: zod.z.string().min(1).max(500),
142
+ /** Channel configurations */
143
+ channels: zod.z.object({
144
+ telegram: zod.z.object({
145
+ enabled: zod.z.boolean(),
146
+ token: zod.z.string().optional()
147
+ }).optional(),
148
+ discord: zod.z.object({
149
+ enabled: zod.z.boolean(),
150
+ token: zod.z.string().optional()
151
+ }).optional(),
152
+ slack: zod.z.object({
153
+ enabled: zod.z.boolean(),
154
+ token: zod.z.string().optional(),
155
+ appToken: zod.z.string().optional()
156
+ }).optional(),
157
+ whatsapp: zod.z.object({
158
+ enabled: zod.z.boolean()
159
+ }).strict().optional()
160
+ }),
161
+ /** AI provider configuration — key is decrypted, sent over TLS */
162
+ aiProvider: zod.z.object({
163
+ type: zod.z.enum(["anthropic", "openai"]),
164
+ apiKey: zod.z.string().min(1).max(500),
165
+ /**
166
+ * Optional base URL override. When set, OpenClaw routes all provider
167
+ * traffic through this URL instead of the provider's default endpoint.
168
+ * Used by managed deployments where AgentShield issues a per-deployment
169
+ * gateway token and proxies to the upstream provider with budget tracking.
170
+ */
171
+ baseUrl: zod.z.string().url().optional()
172
+ }),
173
+ /**
174
+ * Optional OpenClaw heartbeat interval (`agents.defaults.heartbeat.every`).
175
+ * Drives how often OpenClaw wakes the agent for HEARTBEAT.md processing —
176
+ * the primary token-cost lever. Examples: "30m" (active), "6h" (idle),
177
+ * "off" (dormant — heartbeat disabled entirely). When absent, the patcher
178
+ * preserves whatever value already lives in openclaw.json (OpenClaw's
179
+ * built-in default of "30m").
180
+ */
181
+ heartbeatEvery: zod.z.string().min(1).max(20).optional(),
182
+ /**
183
+ * Optional override for `agents.defaults.model.primary` (e.g.
184
+ * "anthropic/claude-haiku-4-5" for idle agents). When absent, the patcher
185
+ * derives the model from `aiProvider.type` as before. Format must be
186
+ * "<provider>/<model-id>".
187
+ */
188
+ modelOverride: zod.z.string().min(1).max(100).optional(),
189
+ /** ISO timestamp of last config modification */
190
+ updatedAt: zod.z.string().datetime()
191
+ });
192
+ var ControlStatusSchema = zod.z.object({
193
+ /** Whether the agent runtime is healthy */
194
+ healthy: zod.z.boolean(),
195
+ /** Seconds since compute process started */
196
+ uptimeSeconds: zod.z.number().nonnegative(),
197
+ /** Installed OpenClaw version */
198
+ openclawVersion: zod.z.string().min(1).max(50),
199
+ /** @kya-os/compute version */
200
+ computeVersion: zod.z.string().min(1).max(50),
201
+ /** Number of active WS connections to control server */
202
+ activeConnections: zod.z.number().int().nonnegative(),
203
+ /** Current RSS memory in MB */
204
+ memoryMb: zod.z.number().nonnegative(),
205
+ /** CPU usage percentage (0-100) */
206
+ cpuPercent: zod.z.number().nonnegative().max(100)
207
+ });
208
+
209
+ exports.ComputeCommandSchema = ComputeCommandSchema;
210
+ exports.ConfigBundleSchema = ConfigBundleSchema;
211
+ exports.ControlStatusSchema = ControlStatusSchema;
212
+ exports.DidStringSchema = DidStringSchema;
213
+ exports.FlyRegionSchema = FlyRegionSchema;
214
+ exports.HeartbeatRequestSchema = HeartbeatRequestSchema;
215
+ exports.HeartbeatResponseSchema = HeartbeatResponseSchema;
216
+ exports.HostingModeSchema = HostingModeSchema;
217
+ exports.ManagedDeployStepStatusSchema = ManagedDeployStepStatusSchema;
218
+ exports.RestartCommandSchema = RestartCommandSchema;
219
+ exports.StopCommandSchema = StopCommandSchema;
220
+ exports.UpdateConfigCommandSchema = UpdateConfigCommandSchema;
221
+ exports.UpdateVersionCommandSchema = UpdateVersionCommandSchema;