@agentdock/wire 0.0.93 → 0.0.95

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 (75) hide show
  1. package/dist/accountLanguage.d.ts +26 -0
  2. package/dist/accountLanguage.js +1 -0
  3. package/dist/activityPreferences.d.ts +0 -2
  4. package/dist/agentCapabilities.d.ts +20 -24
  5. package/dist/agentCapabilities.js +1 -1
  6. package/dist/agentCommonEnv.d.ts +0 -9
  7. package/dist/agentInstallGuide.d.ts +0 -7
  8. package/dist/agentRuntimeSettings.d.ts +139 -0
  9. package/dist/agentRuntimeSettings.js +1 -0
  10. package/dist/bgTask.d.ts +13 -24
  11. package/dist/checkpointSchemas.d.ts +1 -2
  12. package/dist/controlLevel.d.ts +1 -9
  13. package/dist/edition.d.ts +0 -1
  14. package/dist/enterpriseGateway.d.ts +214 -0
  15. package/dist/enterpriseGateway.js +1 -0
  16. package/dist/enterprisePolicy.d.ts +1599 -0
  17. package/dist/enterprisePolicy.js +1 -0
  18. package/dist/enterprisePolicyExports.d.ts +2 -0
  19. package/dist/enterprisePolicyExports.js +1 -0
  20. package/dist/enterpriseRuntime.d.ts +317 -0
  21. package/dist/enterpriseRuntime.js +1 -0
  22. package/dist/envelope.d.ts +63 -60
  23. package/dist/errorMessage.d.ts +0 -1
  24. package/dist/events.d.ts +73 -77
  25. package/dist/events.js +1 -1
  26. package/dist/features.d.ts +19 -30
  27. package/dist/features.js +1 -1
  28. package/dist/feedback.d.ts +21 -22
  29. package/dist/fileWhitelist.d.ts +7 -39
  30. package/dist/gateway.d.ts +1184 -0
  31. package/dist/gateway.js +1 -0
  32. package/dist/goals.d.ts +0 -1
  33. package/dist/handoffBrief.d.ts +13 -0
  34. package/dist/handoffBrief.js +52 -0
  35. package/dist/inboundEvents.d.ts +83 -56
  36. package/dist/inboundEvents.js +1 -1
  37. package/dist/index.d.ts +25 -16
  38. package/dist/index.js +1 -1
  39. package/dist/interactionEvents.d.ts +51 -59
  40. package/dist/legacyProtocol.d.ts +36 -42
  41. package/dist/license.d.ts +36 -37
  42. package/dist/machine.d.ts +54 -53
  43. package/dist/machine.js +1 -1
  44. package/dist/messageMeta.d.ts +20 -20
  45. package/dist/messageMeta.js +1 -1
  46. package/dist/messages.d.ts +338 -223
  47. package/dist/messages.js +1 -1
  48. package/dist/notification.d.ts +2 -3
  49. package/dist/ops.d.ts +9 -27
  50. package/dist/pairing.d.ts +9 -49
  51. package/dist/permissionSubject.d.ts +3 -26
  52. package/dist/protocol.d.ts +0 -6
  53. package/dist/rpc.d.ts +957 -196
  54. package/dist/rpc.js +1 -1
  55. package/dist/scheduledTasks.d.ts +59 -60
  56. package/dist/semver.d.ts +3 -22
  57. package/dist/sessionBtw.d.ts +152 -0
  58. package/dist/sessionBtw.js +1 -0
  59. package/dist/sessionResult.d.ts +21 -27
  60. package/dist/sessionTitle.d.ts +9 -0
  61. package/dist/sessionTitle.js +1 -0
  62. package/dist/socketEvents.d.ts +12 -4
  63. package/dist/socketEvents.js +1 -1
  64. package/dist/sourceMetadata.d.ts +3 -16
  65. package/dist/spawnError.d.ts +7 -14
  66. package/dist/stats.d.ts +99 -68
  67. package/dist/stats.js +1 -1
  68. package/dist/sync.d.ts +285 -51
  69. package/dist/sync.js +1 -1
  70. package/dist/taskResult.d.ts +3 -20
  71. package/dist/telemetry.d.ts +1 -11
  72. package/dist/utils.d.ts +0 -1
  73. package/dist/workItems.d.ts +321 -0
  74. package/dist/workItems.js +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";const r=e.string().min(1).max(32),t=e.string().min(1).max(128);export const EnterprisePolicyBindingInputSchema=e.object({agent:r,model:t,connectionId:e.string().min(1),isDefault:e.boolean().default(!1)}).strict(),EnterprisePolicyGroupCreateSchema=e.object({name:e.string().trim().min(1).max(64),priority:e.number().int().min(0).max(2147483647),status:e.enum(["active","disabled"]).default("active"),bindings:e.array(EnterprisePolicyBindingInputSchema).max(200),memberUserIds:e.array(e.string().min(1)).max(1e4).default([])}).strict(),EnterprisePolicyGroupUpdateSchema=EnterprisePolicyGroupCreateSchema.partial().strict(),EnterprisePolicyGroupReorderSchema=e.object({orderedGroupIds:e.array(e.string().min(1)).min(1).max(1e4)}).strict().refine(i=>new Set(i.orderedGroupIds).size===i.orderedGroupIds.length,{message:"orderedGroupIds must be unique"}),EnterprisePolicyGroupIdParamsSchema=e.object({id:e.string().min(1)}).strict(),EnterprisePolicyBindingViewSchema=e.object({id:e.string().min(1),agent:r,model:t,connectionId:e.string().min(1),isDefault:e.boolean(),enabled:e.boolean(),routeId:e.string().min(1),requestProtocol:e.string().min(1),upstreamProtocol:e.string().min(1),provider:e.string().min(1),routeAlias:e.string().min(1).nullable(),routeStatus:e.string().min(1),connectionStatus:e.string().min(1)}).strict(),EnterprisePolicyGroupViewSchema=e.object({id:e.string().min(1),name:e.string().min(1),priority:e.number().int(),status:e.enum(["active","disabled"]),version:e.number().int().positive(),bindings:e.array(EnterprisePolicyBindingViewSchema),members:e.array(e.object({id:e.string().min(1),username:e.string().min(1),displayName:e.string().min(1)}).strict()),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),EnterpriseEffectiveModelSchema=e.object({model:t,routeId:e.string().min(1),routeAlias:e.string().min(1).nullable(),sourceGroupId:e.string().min(1),sourceGroupName:e.string().min(1),sourceGroupPriority:e.number().int(),status:e.enum(["active","blocked"]),availability:e.enum(["ready","unknown","unavailable"]),availabilityReason:e.enum(["route-not-active","connection-not-active"]).optional(),blockedReason:e.enum(["route-not-found","route-not-active","connection-not-active","binding-route-mismatch"]).optional()}).strict(),EnterpriseEffectiveAgentSchema=e.object({authorizedModels:e.array(EnterpriseEffectiveModelSchema),defaultModel:t.nullable()}).strict(),EnterpriseEffectiveConfigSchema=e.object({configVersion:e.string().min(1),status:e.enum(["ready","partially_ready","blocked"]),blockedReason:e.enum(["user-disabled","no-authorized-model"]).optional(),agents:e.record(EnterpriseEffectiveAgentSchema)}).strict(),EnterpriseEffectiveUserConfigSchema=e.object({user:e.object({id:e.string().min(1),username:e.string().min(1),displayName:e.string().min(1),enabled:e.boolean()}).strict(),config:EnterpriseEffectiveConfigSchema}).strict(),EnterpriseEffectiveConfigsSchema=e.object({users:e.array(EnterpriseEffectiveUserConfigSchema).max(1e4)}).strict(),EnterprisePolicyGroupViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(EnterprisePolicyGroupViewSchema)}).strict(),EnterprisePolicyGroupResponseSchema=e.object({ok:e.literal(!0),data:EnterprisePolicyGroupViewSchema}).strict(),EnterpriseEffectiveConfigsResponseSchema=e.object({ok:e.literal(!0),data:EnterpriseEffectiveConfigsSchema}).strict();
@@ -0,0 +1,2 @@
1
+ export { EnterprisePolicyBindingInputSchema, EnterprisePolicyGroupCreateSchema, EnterprisePolicyGroupUpdateSchema, EnterprisePolicyGroupReorderSchema, EnterprisePolicyGroupIdParamsSchema, EnterprisePolicyBindingViewSchema, EnterprisePolicyGroupViewSchema, EnterprisePolicyGroupViewResponseSchema, EnterprisePolicyGroupResponseSchema, EnterpriseEffectiveModelSchema, EnterpriseEffectiveAgentSchema, EnterpriseEffectiveConfigSchema, EnterpriseEffectiveUserConfigSchema, EnterpriseEffectiveConfigsSchema, EnterpriseEffectiveConfigsResponseSchema, } from './enterprisePolicy.js';
2
+ export type { EnterprisePolicyBindingInput, EnterprisePolicyGroupCreate, EnterprisePolicyGroupUpdate, EnterpriseEffectiveConfig, EnterpriseEffectiveConfigs, EnterprisePolicyGroupView, } from './enterprisePolicy.js';
@@ -0,0 +1 @@
1
+ "use strict";export{EnterprisePolicyBindingInputSchema,EnterprisePolicyGroupCreateSchema,EnterprisePolicyGroupUpdateSchema,EnterprisePolicyGroupReorderSchema,EnterprisePolicyGroupIdParamsSchema,EnterprisePolicyBindingViewSchema,EnterprisePolicyGroupViewSchema,EnterprisePolicyGroupViewResponseSchema,EnterprisePolicyGroupResponseSchema,EnterpriseEffectiveModelSchema,EnterpriseEffectiveAgentSchema,EnterpriseEffectiveConfigSchema,EnterpriseEffectiveUserConfigSchema,EnterpriseEffectiveConfigsSchema,EnterpriseEffectiveConfigsResponseSchema}from"./enterprisePolicy.js";
@@ -0,0 +1,317 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const EnterpriseAgentRuntimeSettingsSchema: z.ZodObject<{
4
+ edition: z.ZodLiteral<"enterprise">;
5
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
6
+ configVersion: z.ZodString;
7
+ issuedAt: z.ZodString;
8
+ expiresAt: z.ZodString;
9
+ gatewayUrl: z.ZodString;
10
+ platformGatewayToken: z.ZodString;
11
+ allowedModels: z.ZodArray<z.ZodString, "many">;
12
+ defaultModel: z.ZodNullable<z.ZodString>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ agent: "codex" | "claude" | "opencode";
15
+ defaultModel: string | null;
16
+ configVersion: string;
17
+ edition: "enterprise";
18
+ issuedAt: string;
19
+ expiresAt: string;
20
+ gatewayUrl: string;
21
+ platformGatewayToken: string;
22
+ allowedModels: string[];
23
+ }, {
24
+ agent: "codex" | "claude" | "opencode";
25
+ defaultModel: string | null;
26
+ configVersion: string;
27
+ edition: "enterprise";
28
+ issuedAt: string;
29
+ expiresAt: string;
30
+ gatewayUrl: string;
31
+ platformGatewayToken: string;
32
+ allowedModels: string[];
33
+ }>;
34
+ export type EnterpriseAgentRuntimeSettings = z.infer<typeof EnterpriseAgentRuntimeSettingsSchema>;
35
+
36
+ export declare const EnterpriseAgentRuntimeConfigSchema: z.ZodObject<{
37
+ username: z.ZodString;
38
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
39
+ routeId: z.ZodOptional<z.ZodString>;
40
+ machineId: z.ZodOptional<z.ZodString>;
41
+ configVersion: z.ZodOptional<z.ZodString>;
42
+ issuedAt: z.ZodOptional<z.ZodString>;
43
+ expiresAt: z.ZodOptional<z.ZodString>;
44
+ gatewayUrl: z.ZodOptional<z.ZodString>;
45
+ platformGatewayToken: z.ZodOptional<z.ZodString>;
46
+ allowedModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ clearGatewayCredentials: z.ZodOptional<z.ZodBoolean>;
49
+ claudeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ codexConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
51
+ opencodeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
52
+ }, "strict", z.ZodTypeAny, {
53
+ agent: "codex" | "claude" | "opencode";
54
+ username: string;
55
+ machineId?: string | undefined;
56
+ routeId?: string | undefined;
57
+ defaultModel?: string | null | undefined;
58
+ configVersion?: string | undefined;
59
+ issuedAt?: string | undefined;
60
+ expiresAt?: string | undefined;
61
+ gatewayUrl?: string | undefined;
62
+ platformGatewayToken?: string | undefined;
63
+ allowedModels?: string[] | undefined;
64
+ clearGatewayCredentials?: boolean | undefined;
65
+ claudeConfig?: Record<string, unknown> | undefined;
66
+ codexConfig?: Record<string, unknown> | undefined;
67
+ opencodeConfig?: Record<string, unknown> | undefined;
68
+ }, {
69
+ agent: "codex" | "claude" | "opencode";
70
+ username: string;
71
+ machineId?: string | undefined;
72
+ routeId?: string | undefined;
73
+ defaultModel?: string | null | undefined;
74
+ configVersion?: string | undefined;
75
+ issuedAt?: string | undefined;
76
+ expiresAt?: string | undefined;
77
+ gatewayUrl?: string | undefined;
78
+ platformGatewayToken?: string | undefined;
79
+ allowedModels?: string[] | undefined;
80
+ clearGatewayCredentials?: boolean | undefined;
81
+ claudeConfig?: Record<string, unknown> | undefined;
82
+ codexConfig?: Record<string, unknown> | undefined;
83
+ opencodeConfig?: Record<string, unknown> | undefined;
84
+ }>;
85
+ export declare const EnterpriseAgentRuntimeConfigBatchSchema: z.ZodObject<{
86
+ configs: z.ZodArray<z.ZodObject<{
87
+ username: z.ZodString;
88
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
89
+ routeId: z.ZodOptional<z.ZodString>;
90
+ machineId: z.ZodOptional<z.ZodString>;
91
+ configVersion: z.ZodOptional<z.ZodString>;
92
+ issuedAt: z.ZodOptional<z.ZodString>;
93
+ expiresAt: z.ZodOptional<z.ZodString>;
94
+ gatewayUrl: z.ZodOptional<z.ZodString>;
95
+ platformGatewayToken: z.ZodOptional<z.ZodString>;
96
+ allowedModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
97
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ clearGatewayCredentials: z.ZodOptional<z.ZodBoolean>;
99
+ claudeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
+ codexConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
+ opencodeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ }, "strict", z.ZodTypeAny, {
103
+ agent: "codex" | "claude" | "opencode";
104
+ username: string;
105
+ machineId?: string | undefined;
106
+ routeId?: string | undefined;
107
+ defaultModel?: string | null | undefined;
108
+ configVersion?: string | undefined;
109
+ issuedAt?: string | undefined;
110
+ expiresAt?: string | undefined;
111
+ gatewayUrl?: string | undefined;
112
+ platformGatewayToken?: string | undefined;
113
+ allowedModels?: string[] | undefined;
114
+ clearGatewayCredentials?: boolean | undefined;
115
+ claudeConfig?: Record<string, unknown> | undefined;
116
+ codexConfig?: Record<string, unknown> | undefined;
117
+ opencodeConfig?: Record<string, unknown> | undefined;
118
+ }, {
119
+ agent: "codex" | "claude" | "opencode";
120
+ username: string;
121
+ machineId?: string | undefined;
122
+ routeId?: string | undefined;
123
+ defaultModel?: string | null | undefined;
124
+ configVersion?: string | undefined;
125
+ issuedAt?: string | undefined;
126
+ expiresAt?: string | undefined;
127
+ gatewayUrl?: string | undefined;
128
+ platformGatewayToken?: string | undefined;
129
+ allowedModels?: string[] | undefined;
130
+ clearGatewayCredentials?: boolean | undefined;
131
+ claudeConfig?: Record<string, unknown> | undefined;
132
+ codexConfig?: Record<string, unknown> | undefined;
133
+ opencodeConfig?: Record<string, unknown> | undefined;
134
+ }>, "many">;
135
+ }, "strict", z.ZodTypeAny, {
136
+ configs: {
137
+ agent: "codex" | "claude" | "opencode";
138
+ username: string;
139
+ machineId?: string | undefined;
140
+ routeId?: string | undefined;
141
+ defaultModel?: string | null | undefined;
142
+ configVersion?: string | undefined;
143
+ issuedAt?: string | undefined;
144
+ expiresAt?: string | undefined;
145
+ gatewayUrl?: string | undefined;
146
+ platformGatewayToken?: string | undefined;
147
+ allowedModels?: string[] | undefined;
148
+ clearGatewayCredentials?: boolean | undefined;
149
+ claudeConfig?: Record<string, unknown> | undefined;
150
+ codexConfig?: Record<string, unknown> | undefined;
151
+ opencodeConfig?: Record<string, unknown> | undefined;
152
+ }[];
153
+ }, {
154
+ configs: {
155
+ agent: "codex" | "claude" | "opencode";
156
+ username: string;
157
+ machineId?: string | undefined;
158
+ routeId?: string | undefined;
159
+ defaultModel?: string | null | undefined;
160
+ configVersion?: string | undefined;
161
+ issuedAt?: string | undefined;
162
+ expiresAt?: string | undefined;
163
+ gatewayUrl?: string | undefined;
164
+ platformGatewayToken?: string | undefined;
165
+ allowedModels?: string[] | undefined;
166
+ clearGatewayCredentials?: boolean | undefined;
167
+ claudeConfig?: Record<string, unknown> | undefined;
168
+ codexConfig?: Record<string, unknown> | undefined;
169
+ opencodeConfig?: Record<string, unknown> | undefined;
170
+ }[];
171
+ }>;
172
+ export type EnterpriseAgentRuntimeConfig = z.infer<typeof EnterpriseAgentRuntimeConfigSchema>;
173
+ export declare const EnterpriseRuntimeBindingDiagnosticSchema: z.ZodObject<{
174
+ id: z.ZodString;
175
+ routeId: z.ZodString;
176
+ model: z.ZodString;
177
+ username: z.ZodString;
178
+ machineId: z.ZodString;
179
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
180
+ status: z.ZodEnum<["active", "revoked", "expired", "failed"]>;
181
+ configVersion: z.ZodString;
182
+ issuedAt: z.ZodString;
183
+ expiresAt: z.ZodString;
184
+ revokedAt: z.ZodNullable<z.ZodString>;
185
+ lastErrorCode: z.ZodNullable<z.ZodString>;
186
+ cleanupPending: z.ZodOptional<z.ZodBoolean>;
187
+ cleanupAttempts: z.ZodOptional<z.ZodNumber>;
188
+ cleanupAvailableAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ cleanupLastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
+ }, "strict", z.ZodTypeAny, {
191
+ status: "failed" | "active" | "revoked" | "expired";
192
+ model: string;
193
+ agent: "codex" | "claude" | "opencode";
194
+ id: string;
195
+ machineId: string;
196
+ routeId: string;
197
+ username: string;
198
+ configVersion: string;
199
+ issuedAt: string;
200
+ expiresAt: string;
201
+ revokedAt: string | null;
202
+ lastErrorCode: string | null;
203
+ cleanupPending?: boolean | undefined;
204
+ cleanupAttempts?: number | undefined;
205
+ cleanupAvailableAt?: string | null | undefined;
206
+ cleanupLastError?: string | null | undefined;
207
+ }, {
208
+ status: "failed" | "active" | "revoked" | "expired";
209
+ model: string;
210
+ agent: "codex" | "claude" | "opencode";
211
+ id: string;
212
+ machineId: string;
213
+ routeId: string;
214
+ username: string;
215
+ configVersion: string;
216
+ issuedAt: string;
217
+ expiresAt: string;
218
+ revokedAt: string | null;
219
+ lastErrorCode: string | null;
220
+ cleanupPending?: boolean | undefined;
221
+ cleanupAttempts?: number | undefined;
222
+ cleanupAvailableAt?: string | null | undefined;
223
+ cleanupLastError?: string | null | undefined;
224
+ }>;
225
+ export declare const EnterpriseRuntimeBindingDiagnosticsSchema: z.ZodObject<{
226
+ bindings: z.ZodArray<z.ZodObject<{
227
+ id: z.ZodString;
228
+ routeId: z.ZodString;
229
+ model: z.ZodString;
230
+ username: z.ZodString;
231
+ machineId: z.ZodString;
232
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
233
+ status: z.ZodEnum<["active", "revoked", "expired", "failed"]>;
234
+ configVersion: z.ZodString;
235
+ issuedAt: z.ZodString;
236
+ expiresAt: z.ZodString;
237
+ revokedAt: z.ZodNullable<z.ZodString>;
238
+ lastErrorCode: z.ZodNullable<z.ZodString>;
239
+ cleanupPending: z.ZodOptional<z.ZodBoolean>;
240
+ cleanupAttempts: z.ZodOptional<z.ZodNumber>;
241
+ cleanupAvailableAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ cleanupLastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
+ }, "strict", z.ZodTypeAny, {
244
+ status: "failed" | "active" | "revoked" | "expired";
245
+ model: string;
246
+ agent: "codex" | "claude" | "opencode";
247
+ id: string;
248
+ machineId: string;
249
+ routeId: string;
250
+ username: string;
251
+ configVersion: string;
252
+ issuedAt: string;
253
+ expiresAt: string;
254
+ revokedAt: string | null;
255
+ lastErrorCode: string | null;
256
+ cleanupPending?: boolean | undefined;
257
+ cleanupAttempts?: number | undefined;
258
+ cleanupAvailableAt?: string | null | undefined;
259
+ cleanupLastError?: string | null | undefined;
260
+ }, {
261
+ status: "failed" | "active" | "revoked" | "expired";
262
+ model: string;
263
+ agent: "codex" | "claude" | "opencode";
264
+ id: string;
265
+ machineId: string;
266
+ routeId: string;
267
+ username: string;
268
+ configVersion: string;
269
+ issuedAt: string;
270
+ expiresAt: string;
271
+ revokedAt: string | null;
272
+ lastErrorCode: string | null;
273
+ cleanupPending?: boolean | undefined;
274
+ cleanupAttempts?: number | undefined;
275
+ cleanupAvailableAt?: string | null | undefined;
276
+ cleanupLastError?: string | null | undefined;
277
+ }>, "many">;
278
+ }, "strict", z.ZodTypeAny, {
279
+ bindings: {
280
+ status: "failed" | "active" | "revoked" | "expired";
281
+ model: string;
282
+ agent: "codex" | "claude" | "opencode";
283
+ id: string;
284
+ machineId: string;
285
+ routeId: string;
286
+ username: string;
287
+ configVersion: string;
288
+ issuedAt: string;
289
+ expiresAt: string;
290
+ revokedAt: string | null;
291
+ lastErrorCode: string | null;
292
+ cleanupPending?: boolean | undefined;
293
+ cleanupAttempts?: number | undefined;
294
+ cleanupAvailableAt?: string | null | undefined;
295
+ cleanupLastError?: string | null | undefined;
296
+ }[];
297
+ }, {
298
+ bindings: {
299
+ status: "failed" | "active" | "revoked" | "expired";
300
+ model: string;
301
+ agent: "codex" | "claude" | "opencode";
302
+ id: string;
303
+ machineId: string;
304
+ routeId: string;
305
+ username: string;
306
+ configVersion: string;
307
+ issuedAt: string;
308
+ expiresAt: string;
309
+ revokedAt: string | null;
310
+ lastErrorCode: string | null;
311
+ cleanupPending?: boolean | undefined;
312
+ cleanupAttempts?: number | undefined;
313
+ cleanupAvailableAt?: string | null | undefined;
314
+ cleanupLastError?: string | null | undefined;
315
+ }[];
316
+ }>;
317
+ export type EnterpriseRuntimeBindingDiagnostic = z.infer<typeof EnterpriseRuntimeBindingDiagnosticSchema>;
@@ -0,0 +1 @@
1
+ "use strict";import{z as n}from"zod";const t=n.enum(["claude","codex","opencode"]);export const EnterpriseAgentRuntimeSettingsSchema=n.object({edition:n.literal("enterprise"),agent:t,configVersion:n.string().min(1),issuedAt:n.string().datetime(),expiresAt:n.string().datetime(),gatewayUrl:n.string().url(),platformGatewayToken:n.string().min(1),allowedModels:n.array(n.string().min(1)).max(200),defaultModel:n.string().min(1).nullable()}).strict(),EnterpriseAgentRuntimeConfigSchema=n.object({username:n.string().min(1),agent:t,routeId:n.string().min(1).optional(),machineId:n.string().min(1).optional(),configVersion:n.string().min(1).optional(),issuedAt:n.string().datetime().optional(),expiresAt:n.string().datetime().optional(),gatewayUrl:n.string().url().optional(),platformGatewayToken:n.string().min(1).optional(),allowedModels:n.array(n.string().min(1)).max(200).optional(),defaultModel:n.string().min(1).nullable().optional(),clearGatewayCredentials:n.boolean().optional(),claudeConfig:n.record(n.unknown()).optional(),codexConfig:n.record(n.unknown()).optional(),opencodeConfig:n.record(n.unknown()).optional()}).strict(),EnterpriseAgentRuntimeConfigBatchSchema=n.object({configs:n.array(EnterpriseAgentRuntimeConfigSchema).max(1e4)}).strict(),EnterpriseRuntimeBindingDiagnosticSchema=n.object({id:n.string().min(1),routeId:n.string().min(1),model:n.string().min(1),username:n.string().min(1),machineId:n.string().min(1),agent:t,status:n.enum(["active","revoked","expired","failed"]),configVersion:n.string().min(1),issuedAt:n.string().datetime(),expiresAt:n.string().datetime(),revokedAt:n.string().datetime().nullable(),lastErrorCode:n.string().min(1).max(200).nullable(),cleanupPending:n.boolean().optional(),cleanupAttempts:n.number().int().nonnegative().optional(),cleanupAvailableAt:n.string().datetime().nullable().optional(),cleanupLastError:n.string().max(200).nullable().optional()}).strict(),EnterpriseRuntimeBindingDiagnosticsSchema=n.object({bindings:n.array(EnterpriseRuntimeBindingDiagnosticSchema).max(1e4)}).strict();
@@ -1,8 +1,3 @@
1
- /**
2
- * Session envelope schema.
3
- *
4
- * Wraps a SessionEvent with metadata (id, time, role, turn, subagent).
5
- */
6
1
  import { z } from 'zod';
7
2
  import type { SessionEvent } from './events.js';
8
3
  export declare const SessionRoleSchema: z.ZodEnum<["user", "agent"]>;
@@ -13,11 +8,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
13
8
  role: z.ZodEnum<["user", "agent"]>;
14
9
  turn: z.ZodOptional<z.ZodString>;
15
10
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
16
- /** Claude CLI message UUID — used for precise conversation rollback. */
11
+
17
12
  messageUuid: z.ZodOptional<z.ZodString>;
18
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
13
+
19
14
  toolCallId: z.ZodOptional<z.ZodString>;
20
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
15
+
21
16
  sourceAgent: z.ZodOptional<z.ZodObject<{
22
17
  threadId: z.ZodString;
23
18
  label: z.ZodString;
@@ -1143,22 +1138,25 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
1143
1138
  }, z.ZodTypeAny, "passthrough">>>;
1144
1139
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
1145
1140
  t: z.ZodLiteral<"compact-boundary">;
1146
- trigger: z.ZodEnum<["manual", "auto"]>;
1147
- preTokens: z.ZodNumber;
1141
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1142
+ preTokens: z.ZodOptional<z.ZodNumber>;
1148
1143
  postTokens: z.ZodOptional<z.ZodNumber>;
1149
1144
  durationMs: z.ZodOptional<z.ZodNumber>;
1145
+ summary: z.ZodOptional<z.ZodString>;
1150
1146
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1151
1147
  t: z.ZodLiteral<"compact-boundary">;
1152
- trigger: z.ZodEnum<["manual", "auto"]>;
1153
- preTokens: z.ZodNumber;
1148
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1149
+ preTokens: z.ZodOptional<z.ZodNumber>;
1154
1150
  postTokens: z.ZodOptional<z.ZodNumber>;
1155
1151
  durationMs: z.ZodOptional<z.ZodNumber>;
1152
+ summary: z.ZodOptional<z.ZodString>;
1156
1153
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1157
1154
  t: z.ZodLiteral<"compact-boundary">;
1158
- trigger: z.ZodEnum<["manual", "auto"]>;
1159
- preTokens: z.ZodNumber;
1155
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
1156
+ preTokens: z.ZodOptional<z.ZodNumber>;
1160
1157
  postTokens: z.ZodOptional<z.ZodNumber>;
1161
1158
  durationMs: z.ZodOptional<z.ZodNumber>;
1159
+ summary: z.ZodOptional<z.ZodString>;
1162
1160
  }, z.ZodTypeAny, "passthrough">>]>;
1163
1161
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1164
1162
  id: z.ZodString;
@@ -1166,11 +1164,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
1166
1164
  role: z.ZodEnum<["user", "agent"]>;
1167
1165
  turn: z.ZodOptional<z.ZodString>;
1168
1166
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1169
- /** Claude CLI message UUID — used for precise conversation rollback. */
1167
+
1170
1168
  messageUuid: z.ZodOptional<z.ZodString>;
1171
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
1169
+
1172
1170
  toolCallId: z.ZodOptional<z.ZodString>;
1173
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
1171
+
1174
1172
  sourceAgent: z.ZodOptional<z.ZodObject<{
1175
1173
  threadId: z.ZodString;
1176
1174
  label: z.ZodString;
@@ -2296,22 +2294,25 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
2296
2294
  }, z.ZodTypeAny, "passthrough">>>;
2297
2295
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
2298
2296
  t: z.ZodLiteral<"compact-boundary">;
2299
- trigger: z.ZodEnum<["manual", "auto"]>;
2300
- preTokens: z.ZodNumber;
2297
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2298
+ preTokens: z.ZodOptional<z.ZodNumber>;
2301
2299
  postTokens: z.ZodOptional<z.ZodNumber>;
2302
2300
  durationMs: z.ZodOptional<z.ZodNumber>;
2301
+ summary: z.ZodOptional<z.ZodString>;
2303
2302
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2304
2303
  t: z.ZodLiteral<"compact-boundary">;
2305
- trigger: z.ZodEnum<["manual", "auto"]>;
2306
- preTokens: z.ZodNumber;
2304
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2305
+ preTokens: z.ZodOptional<z.ZodNumber>;
2307
2306
  postTokens: z.ZodOptional<z.ZodNumber>;
2308
2307
  durationMs: z.ZodOptional<z.ZodNumber>;
2308
+ summary: z.ZodOptional<z.ZodString>;
2309
2309
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2310
2310
  t: z.ZodLiteral<"compact-boundary">;
2311
- trigger: z.ZodEnum<["manual", "auto"]>;
2312
- preTokens: z.ZodNumber;
2311
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
2312
+ preTokens: z.ZodOptional<z.ZodNumber>;
2313
2313
  postTokens: z.ZodOptional<z.ZodNumber>;
2314
2314
  durationMs: z.ZodOptional<z.ZodNumber>;
2315
+ summary: z.ZodOptional<z.ZodString>;
2315
2316
  }, z.ZodTypeAny, "passthrough">>]>;
2316
2317
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2317
2318
  id: z.ZodString;
@@ -2319,11 +2320,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
2319
2320
  role: z.ZodEnum<["user", "agent"]>;
2320
2321
  turn: z.ZodOptional<z.ZodString>;
2321
2322
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2322
- /** Claude CLI message UUID — used for precise conversation rollback. */
2323
+
2323
2324
  messageUuid: z.ZodOptional<z.ZodString>;
2324
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
2325
+
2325
2326
  toolCallId: z.ZodOptional<z.ZodString>;
2326
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
2327
+
2327
2328
  sourceAgent: z.ZodOptional<z.ZodObject<{
2328
2329
  threadId: z.ZodString;
2329
2330
  label: z.ZodString;
@@ -3449,22 +3450,25 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3449
3450
  }, z.ZodTypeAny, "passthrough">>>;
3450
3451
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3451
3452
  t: z.ZodLiteral<"compact-boundary">;
3452
- trigger: z.ZodEnum<["manual", "auto"]>;
3453
- preTokens: z.ZodNumber;
3453
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
3454
+ preTokens: z.ZodOptional<z.ZodNumber>;
3454
3455
  postTokens: z.ZodOptional<z.ZodNumber>;
3455
3456
  durationMs: z.ZodOptional<z.ZodNumber>;
3457
+ summary: z.ZodOptional<z.ZodString>;
3456
3458
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3457
3459
  t: z.ZodLiteral<"compact-boundary">;
3458
- trigger: z.ZodEnum<["manual", "auto"]>;
3459
- preTokens: z.ZodNumber;
3460
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
3461
+ preTokens: z.ZodOptional<z.ZodNumber>;
3460
3462
  postTokens: z.ZodOptional<z.ZodNumber>;
3461
3463
  durationMs: z.ZodOptional<z.ZodNumber>;
3464
+ summary: z.ZodOptional<z.ZodString>;
3462
3465
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3463
3466
  t: z.ZodLiteral<"compact-boundary">;
3464
- trigger: z.ZodEnum<["manual", "auto"]>;
3465
- preTokens: z.ZodNumber;
3467
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
3468
+ preTokens: z.ZodOptional<z.ZodNumber>;
3466
3469
  postTokens: z.ZodOptional<z.ZodNumber>;
3467
3470
  durationMs: z.ZodOptional<z.ZodNumber>;
3471
+ summary: z.ZodOptional<z.ZodString>;
3468
3472
  }, z.ZodTypeAny, "passthrough">>]>;
3469
3473
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
3470
3474
  id: z.ZodString;
@@ -3472,11 +3476,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3472
3476
  role: z.ZodEnum<["user", "agent"]>;
3473
3477
  turn: z.ZodOptional<z.ZodString>;
3474
3478
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3475
- /** Claude CLI message UUID — used for precise conversation rollback. */
3479
+
3476
3480
  messageUuid: z.ZodOptional<z.ZodString>;
3477
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
3481
+
3478
3482
  toolCallId: z.ZodOptional<z.ZodString>;
3479
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
3483
+
3480
3484
  sourceAgent: z.ZodOptional<z.ZodObject<{
3481
3485
  threadId: z.ZodString;
3482
3486
  label: z.ZodString;
@@ -4602,22 +4606,25 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
4602
4606
  }, z.ZodTypeAny, "passthrough">>>;
4603
4607
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4604
4608
  t: z.ZodLiteral<"compact-boundary">;
4605
- trigger: z.ZodEnum<["manual", "auto"]>;
4606
- preTokens: z.ZodNumber;
4609
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
4610
+ preTokens: z.ZodOptional<z.ZodNumber>;
4607
4611
  postTokens: z.ZodOptional<z.ZodNumber>;
4608
4612
  durationMs: z.ZodOptional<z.ZodNumber>;
4613
+ summary: z.ZodOptional<z.ZodString>;
4609
4614
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4610
4615
  t: z.ZodLiteral<"compact-boundary">;
4611
- trigger: z.ZodEnum<["manual", "auto"]>;
4612
- preTokens: z.ZodNumber;
4616
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
4617
+ preTokens: z.ZodOptional<z.ZodNumber>;
4613
4618
  postTokens: z.ZodOptional<z.ZodNumber>;
4614
4619
  durationMs: z.ZodOptional<z.ZodNumber>;
4620
+ summary: z.ZodOptional<z.ZodString>;
4615
4621
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4616
4622
  t: z.ZodLiteral<"compact-boundary">;
4617
- trigger: z.ZodEnum<["manual", "auto"]>;
4618
- preTokens: z.ZodNumber;
4623
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
4624
+ preTokens: z.ZodOptional<z.ZodNumber>;
4619
4625
  postTokens: z.ZodOptional<z.ZodNumber>;
4620
4626
  durationMs: z.ZodOptional<z.ZodNumber>;
4627
+ summary: z.ZodOptional<z.ZodString>;
4621
4628
  }, z.ZodTypeAny, "passthrough">>]>;
4622
4629
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4623
4630
  id: z.ZodString;
@@ -4625,11 +4632,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
4625
4632
  role: z.ZodEnum<["user", "agent"]>;
4626
4633
  turn: z.ZodOptional<z.ZodString>;
4627
4634
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4628
- /** Claude CLI message UUID — used for precise conversation rollback. */
4635
+
4629
4636
  messageUuid: z.ZodOptional<z.ZodString>;
4630
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
4637
+
4631
4638
  toolCallId: z.ZodOptional<z.ZodString>;
4632
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
4639
+
4633
4640
  sourceAgent: z.ZodOptional<z.ZodObject<{
4634
4641
  threadId: z.ZodString;
4635
4642
  label: z.ZodString;
@@ -5755,22 +5762,25 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
5755
5762
  }, z.ZodTypeAny, "passthrough">>>;
5756
5763
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
5757
5764
  t: z.ZodLiteral<"compact-boundary">;
5758
- trigger: z.ZodEnum<["manual", "auto"]>;
5759
- preTokens: z.ZodNumber;
5765
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
5766
+ preTokens: z.ZodOptional<z.ZodNumber>;
5760
5767
  postTokens: z.ZodOptional<z.ZodNumber>;
5761
5768
  durationMs: z.ZodOptional<z.ZodNumber>;
5769
+ summary: z.ZodOptional<z.ZodString>;
5762
5770
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5763
5771
  t: z.ZodLiteral<"compact-boundary">;
5764
- trigger: z.ZodEnum<["manual", "auto"]>;
5765
- preTokens: z.ZodNumber;
5772
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
5773
+ preTokens: z.ZodOptional<z.ZodNumber>;
5766
5774
  postTokens: z.ZodOptional<z.ZodNumber>;
5767
5775
  durationMs: z.ZodOptional<z.ZodNumber>;
5776
+ summary: z.ZodOptional<z.ZodString>;
5768
5777
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5769
5778
  t: z.ZodLiteral<"compact-boundary">;
5770
- trigger: z.ZodEnum<["manual", "auto"]>;
5771
- preTokens: z.ZodNumber;
5779
+ trigger: z.ZodEnum<["manual", "auto", "unknown"]>;
5780
+ preTokens: z.ZodOptional<z.ZodNumber>;
5772
5781
  postTokens: z.ZodOptional<z.ZodNumber>;
5773
5782
  durationMs: z.ZodOptional<z.ZodNumber>;
5783
+ summary: z.ZodOptional<z.ZodString>;
5774
5784
  }, z.ZodTypeAny, "passthrough">>]>;
5775
5785
  }, z.ZodTypeAny, "passthrough">>;
5776
5786
  export type SessionEnvelope = z.infer<typeof SessionEnvelopeSchema>;
@@ -5779,9 +5789,9 @@ export interface CreateEnvelopeOptions {
5779
5789
  readonly time?: number;
5780
5790
  readonly turn?: string;
5781
5791
  readonly subagent?: string;
5782
- /** Claude CLI message UUID — used for precise conversation rollback. */
5792
+
5783
5793
  readonly messageUuid?: string;
5784
- /** Tool call ID — used to route child events (e.g. bg-task:completed) to parent card. */
5794
+
5785
5795
  readonly toolCallId?: string;
5786
5796
  readonly sourceAgent?: {
5787
5797
  readonly threadId: string;
@@ -5789,12 +5799,5 @@ export interface CreateEnvelopeOptions {
5789
5799
  readonly parentSpawnCallId?: string;
5790
5800
  };
5791
5801
  }
5792
- /**
5793
- * Create a SessionEnvelope by direct construction (hot path).
5794
- *
5795
- * Skips Zod `.parse()` for performance — the discriminated union with
5796
- * 14 variants + 4 superRefine checks is expensive on every streaming token.
5797
- * Validation still happens at ingress boundaries (server API handlers).
5798
- */
5802
+
5799
5803
  export declare function createEnvelope(role: SessionRole, ev: SessionEvent, opts?: CreateEnvelopeOptions): SessionEnvelope;
5800
- //# sourceMappingURL=envelope.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function errorMessage(err: unknown): string;
2
- //# sourceMappingURL=errorMessage.d.ts.map