@agentdock/wire 0.0.94 → 0.0.96

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 (73) hide show
  1. package/dist/accountLanguage.d.ts +2 -8
  2. package/dist/activityPreferences.d.ts +0 -2
  3. package/dist/agentCapabilities.d.ts +16 -46
  4. package/dist/agentCommonEnv.d.ts +0 -9
  5. package/dist/agentInstallGuide.d.ts +0 -7
  6. package/dist/agentRuntimeSettings.d.ts +1 -2
  7. package/dist/bgTask.d.ts +13 -24
  8. package/dist/checkpointSchemas.d.ts +1 -2
  9. package/dist/controlLevel.d.ts +1 -9
  10. package/dist/edition.d.ts +0 -1
  11. package/dist/enterpriseCurrency.d.ts +120 -0
  12. package/dist/enterpriseCurrency.js +1 -0
  13. package/dist/enterpriseDirectory.d.ts +636 -0
  14. package/dist/enterpriseDirectory.js +1 -0
  15. package/dist/enterpriseGateway.d.ts +1 -2
  16. package/dist/enterpriseGatewayExports.d.ts +4 -0
  17. package/dist/enterpriseGatewayExports.js +1 -0
  18. package/dist/enterpriseOverview.d.ts +423 -0
  19. package/dist/enterpriseOverview.js +1 -0
  20. package/dist/enterprisePolicy.d.ts +1393 -0
  21. package/dist/enterprisePolicy.js +1 -0
  22. package/dist/enterprisePolicyExports.d.ts +2 -0
  23. package/dist/enterprisePolicyExports.js +1 -0
  24. package/dist/enterpriseRange.d.ts +19 -0
  25. package/dist/enterpriseRange.js +1 -0
  26. package/dist/enterpriseRuntime.d.ts +420 -0
  27. package/dist/enterpriseRuntime.js +1 -0
  28. package/dist/envelope.d.ts +18 -30
  29. package/dist/errorMessage.d.ts +0 -1
  30. package/dist/events.d.ts +55 -71
  31. package/dist/features.d.ts +14 -29
  32. package/dist/feedback.d.ts +3 -4
  33. package/dist/fileWhitelist.d.ts +7 -39
  34. package/dist/gateway.d.ts +1643 -328
  35. package/dist/gateway.js +1 -1
  36. package/dist/gatewayBodyRetention.d.ts +149 -0
  37. package/dist/gatewayBodyRetention.js +2 -0
  38. package/dist/gatewayUsage.d.ts +3232 -0
  39. package/dist/gatewayUsage.js +1 -0
  40. package/dist/goals.d.ts +0 -1
  41. package/dist/handoffBrief.d.ts +1 -2
  42. package/dist/inboundEvents.d.ts +32 -75
  43. package/dist/index.d.ts +11 -7
  44. package/dist/index.js +1 -1
  45. package/dist/interactionEvents.d.ts +49 -57
  46. package/dist/legacyProtocol.d.ts +0 -6
  47. package/dist/license.d.ts +36 -37
  48. package/dist/machine.d.ts +48 -56
  49. package/dist/messageMeta.d.ts +15 -17
  50. package/dist/messages.d.ts +13 -20
  51. package/dist/notification.d.ts +2 -3
  52. package/dist/ops.d.ts +9 -27
  53. package/dist/pairing.d.ts +9 -49
  54. package/dist/permissionSubject.d.ts +3 -26
  55. package/dist/protocol.d.ts +0 -6
  56. package/dist/rpc.d.ts +118 -162
  57. package/dist/rpc.js +1 -1
  58. package/dist/scheduledTasks.d.ts +9 -10
  59. package/dist/semver.d.ts +3 -22
  60. package/dist/sessionBtw.d.ts +6 -7
  61. package/dist/sessionBtw.js +1 -1
  62. package/dist/sessionResult.d.ts +21 -27
  63. package/dist/sessionTitle.d.ts +2 -9
  64. package/dist/socketEvents.d.ts +4 -5
  65. package/dist/sourceMetadata.d.ts +1 -14
  66. package/dist/spawnError.d.ts +7 -14
  67. package/dist/stats.d.ts +13 -20
  68. package/dist/sync.d.ts +75 -156
  69. package/dist/taskResult.d.ts +3 -20
  70. package/dist/telemetry.d.ts +1 -11
  71. package/dist/utils.d.ts +0 -1
  72. package/dist/workItems.d.ts +6 -30
  73. 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 EnterpriseBuildAgentViewSchema=e.object({agent:r,source:e.literal("deployment_manifest"),enabled:e.boolean()}).strict(),EnterpriseBuildAgentListResponseSchema=e.object({ok:e.literal(!0),data:e.array(EnterpriseBuildAgentViewSchema).max(64)}).strict(),EnterprisePolicyBindingInputSchema=e.object({agent:r,model:t,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).optional(),status:e.enum(["active","disabled"]).default("disabled"),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,isDefault:e.boolean(),enabled:e.boolean()}).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,sourceGroupId:e.string().min(1),sourceGroupName:e.string().min(1),sourceGroupPriority:e.number().int(),status:e.literal("active"),availability:e.enum(["ready","unknown","unavailable"]),availabilityReason:e.enum(["connection-not-active","no-key","models-unconfirmed","model-not-available","protocol-not-supported"]).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(),EnterpriseEffectiveConfigResponseSchema=e.object({ok:e.literal(!0),data:EnterpriseEffectiveConfigSchema}).strict();
@@ -0,0 +1,2 @@
1
+ export { EnterpriseBuildAgentViewSchema, EnterpriseBuildAgentListResponseSchema, EnterprisePolicyBindingInputSchema, EnterprisePolicyGroupCreateSchema, EnterprisePolicyGroupUpdateSchema, EnterprisePolicyGroupReorderSchema, EnterprisePolicyGroupIdParamsSchema, EnterprisePolicyBindingViewSchema, EnterprisePolicyGroupViewSchema, EnterprisePolicyGroupViewResponseSchema, EnterprisePolicyGroupResponseSchema, EnterpriseEffectiveModelSchema, EnterpriseEffectiveAgentSchema, EnterpriseEffectiveConfigSchema, EnterpriseEffectiveUserConfigSchema, EnterpriseEffectiveConfigsSchema, EnterpriseEffectiveConfigsResponseSchema, EnterpriseEffectiveConfigResponseSchema, } from './enterprisePolicy.js';
2
+ export type { EnterpriseBuildAgentView, EnterprisePolicyBindingInput, EnterprisePolicyGroupCreate, EnterprisePolicyGroupUpdate, EnterpriseEffectiveConfig, EnterpriseEffectiveConfigs, EnterprisePolicyGroupView, } from './enterprisePolicy.js';
@@ -0,0 +1 @@
1
+ "use strict";export{EnterpriseBuildAgentViewSchema,EnterpriseBuildAgentListResponseSchema,EnterprisePolicyBindingInputSchema,EnterprisePolicyGroupCreateSchema,EnterprisePolicyGroupUpdateSchema,EnterprisePolicyGroupReorderSchema,EnterprisePolicyGroupIdParamsSchema,EnterprisePolicyBindingViewSchema,EnterprisePolicyGroupViewSchema,EnterprisePolicyGroupViewResponseSchema,EnterprisePolicyGroupResponseSchema,EnterpriseEffectiveModelSchema,EnterpriseEffectiveAgentSchema,EnterpriseEffectiveConfigSchema,EnterpriseEffectiveUserConfigSchema,EnterpriseEffectiveConfigsSchema,EnterpriseEffectiveConfigsResponseSchema,EnterpriseEffectiveConfigResponseSchema}from"./enterprisePolicy.js";
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const EnterpriseRangePresetSchema: z.ZodEnum<["today", "thisWeek", "thisMonth", "lastMonth"]>;
4
+ export type EnterpriseRangePreset = z.infer<typeof EnterpriseRangePresetSchema>;
5
+
6
+ export declare const EnterpriseRangeQuerySchema: z.ZodObject<{
7
+ range: z.ZodOptional<z.ZodEnum<["today", "thisWeek", "thisMonth", "lastMonth"]>>;
8
+ from: z.ZodOptional<z.ZodString>;
9
+ to: z.ZodOptional<z.ZodString>;
10
+ }, "strict", z.ZodTypeAny, {
11
+ range?: "today" | "thisWeek" | "thisMonth" | "lastMonth" | undefined;
12
+ from?: string | undefined;
13
+ to?: string | undefined;
14
+ }, {
15
+ range?: "today" | "thisWeek" | "thisMonth" | "lastMonth" | undefined;
16
+ from?: string | undefined;
17
+ to?: string | undefined;
18
+ }>;
19
+ export type EnterpriseRangeQuery = z.infer<typeof EnterpriseRangeQuerySchema>;
@@ -0,0 +1 @@
1
+ "use strict";import{z as t}from"zod";export const EnterpriseRangePresetSchema=t.enum(["today","thisWeek","thisMonth","lastMonth"]),EnterpriseRangeQuerySchema=t.object({range:EnterpriseRangePresetSchema.optional(),from:t.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional(),to:t.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional()}).strict();
@@ -0,0 +1,420 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const ENTERPRISE_RUNTIME_AGENTS: readonly ["claude", "codex", "opencode"];
4
+ export type EnterpriseRuntimeAgent = (typeof ENTERPRISE_RUNTIME_AGENTS)[number];
5
+ export declare function isEnterpriseRuntimeAgent(value: string): value is EnterpriseRuntimeAgent;
6
+ export declare const EnterpriseRuntimeAgentSchema: z.ZodEnum<["claude", "codex", "opencode"]>;
7
+
8
+ export declare const EnterpriseRuntimeProjectionSchema: z.ZodObject<{
9
+ edition: z.ZodLiteral<"enterprise">;
10
+ enterpriseId: z.ZodString;
11
+ userId: z.ZodString;
12
+ machineId: z.ZodString;
13
+ configVersion: z.ZodString;
14
+ issuedAt: z.ZodString;
15
+ expiresAt: z.ZodString;
16
+ gateway: z.ZodObject<{
17
+ url: z.ZodString;
18
+ platformToken: z.ZodString;
19
+ }, "strict", z.ZodTypeAny, {
20
+ url: string;
21
+ platformToken: string;
22
+ }, {
23
+ url: string;
24
+ platformToken: string;
25
+ }>;
26
+ agents: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
27
+ authorizedModels: z.ZodArray<z.ZodObject<{
28
+ modelId: z.ZodString;
29
+ displayName: z.ZodString;
30
+ status: z.ZodEnum<["authorized", "blocked"]>;
31
+ reason: z.ZodOptional<z.ZodEnum<["policy-blocked", "projection-stale"]>>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ status: "authorized" | "blocked";
34
+ modelId: string;
35
+ displayName: string;
36
+ reason?: "policy-blocked" | "projection-stale" | undefined;
37
+ }, {
38
+ status: "authorized" | "blocked";
39
+ modelId: string;
40
+ displayName: string;
41
+ reason?: "policy-blocked" | "projection-stale" | undefined;
42
+ }>, "many">;
43
+ defaultModel: z.ZodNullable<z.ZodString>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ authorizedModels: {
46
+ status: "authorized" | "blocked";
47
+ modelId: string;
48
+ displayName: string;
49
+ reason?: "policy-blocked" | "projection-stale" | undefined;
50
+ }[];
51
+ defaultModel: string | null;
52
+ }, {
53
+ authorizedModels: {
54
+ status: "authorized" | "blocked";
55
+ modelId: string;
56
+ displayName: string;
57
+ reason?: "policy-blocked" | "projection-stale" | undefined;
58
+ }[];
59
+ defaultModel: string | null;
60
+ }>, {
61
+ authorizedModels: {
62
+ status: "authorized" | "blocked";
63
+ modelId: string;
64
+ displayName: string;
65
+ reason?: "policy-blocked" | "projection-stale" | undefined;
66
+ }[];
67
+ defaultModel: string | null;
68
+ }, {
69
+ authorizedModels: {
70
+ status: "authorized" | "blocked";
71
+ modelId: string;
72
+ displayName: string;
73
+ reason?: "policy-blocked" | "projection-stale" | undefined;
74
+ }[];
75
+ defaultModel: string | null;
76
+ }>>;
77
+ }, "strict", z.ZodTypeAny, {
78
+ agents: Record<string, {
79
+ authorizedModels: {
80
+ status: "authorized" | "blocked";
81
+ modelId: string;
82
+ displayName: string;
83
+ reason?: "policy-blocked" | "projection-stale" | undefined;
84
+ }[];
85
+ defaultModel: string | null;
86
+ }>;
87
+ machineId: string;
88
+ edition: "enterprise";
89
+ enterpriseId: string;
90
+ userId: string;
91
+ configVersion: string;
92
+ issuedAt: string;
93
+ expiresAt: string;
94
+ gateway: {
95
+ url: string;
96
+ platformToken: string;
97
+ };
98
+ }, {
99
+ agents: Record<string, {
100
+ authorizedModels: {
101
+ status: "authorized" | "blocked";
102
+ modelId: string;
103
+ displayName: string;
104
+ reason?: "policy-blocked" | "projection-stale" | undefined;
105
+ }[];
106
+ defaultModel: string | null;
107
+ }>;
108
+ machineId: string;
109
+ edition: "enterprise";
110
+ enterpriseId: string;
111
+ userId: string;
112
+ configVersion: string;
113
+ issuedAt: string;
114
+ expiresAt: string;
115
+ gateway: {
116
+ url: string;
117
+ platformToken: string;
118
+ };
119
+ }>;
120
+ export type EnterpriseRuntimeProjection = z.infer<typeof EnterpriseRuntimeProjectionSchema>;
121
+
122
+ export declare const EnterpriseAgentRuntimeSettingsSchema: z.ZodObject<{
123
+ edition: z.ZodLiteral<"enterprise">;
124
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
125
+ configVersion: z.ZodString;
126
+ issuedAt: z.ZodString;
127
+ expiresAt: z.ZodString;
128
+ gatewayUrl: z.ZodString;
129
+ platformGatewayToken: z.ZodString;
130
+ allowedModels: z.ZodArray<z.ZodString, "many">;
131
+ defaultModel: z.ZodNullable<z.ZodString>;
132
+ }, "strict", z.ZodTypeAny, {
133
+ agent: "codex" | "claude" | "opencode";
134
+ defaultModel: string | null;
135
+ edition: "enterprise";
136
+ configVersion: string;
137
+ issuedAt: string;
138
+ expiresAt: string;
139
+ gatewayUrl: string;
140
+ platformGatewayToken: string;
141
+ allowedModels: string[];
142
+ }, {
143
+ agent: "codex" | "claude" | "opencode";
144
+ defaultModel: string | null;
145
+ edition: "enterprise";
146
+ configVersion: string;
147
+ issuedAt: string;
148
+ expiresAt: string;
149
+ gatewayUrl: string;
150
+ platformGatewayToken: string;
151
+ allowedModels: string[];
152
+ }>;
153
+ export type EnterpriseAgentRuntimeSettings = z.infer<typeof EnterpriseAgentRuntimeSettingsSchema>;
154
+
155
+ export declare const EnterpriseAgentRuntimeConfigSchema: z.ZodObject<{
156
+ username: z.ZodString;
157
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
158
+ machineId: z.ZodOptional<z.ZodString>;
159
+ configVersion: z.ZodOptional<z.ZodString>;
160
+ issuedAt: z.ZodOptional<z.ZodString>;
161
+ expiresAt: z.ZodOptional<z.ZodString>;
162
+ gatewayUrl: z.ZodOptional<z.ZodString>;
163
+ platformGatewayToken: z.ZodOptional<z.ZodString>;
164
+ allowedModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
165
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
166
+ clearGatewayCredentials: z.ZodOptional<z.ZodBoolean>;
167
+ claudeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
168
+ codexConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
169
+ opencodeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
170
+ }, "strict", z.ZodTypeAny, {
171
+ agent: "codex" | "claude" | "opencode";
172
+ username: string;
173
+ machineId?: string | undefined;
174
+ defaultModel?: string | null | undefined;
175
+ configVersion?: string | undefined;
176
+ issuedAt?: string | undefined;
177
+ expiresAt?: string | undefined;
178
+ gatewayUrl?: string | undefined;
179
+ platformGatewayToken?: string | undefined;
180
+ allowedModels?: string[] | undefined;
181
+ clearGatewayCredentials?: boolean | undefined;
182
+ claudeConfig?: Record<string, unknown> | undefined;
183
+ codexConfig?: Record<string, unknown> | undefined;
184
+ opencodeConfig?: Record<string, unknown> | undefined;
185
+ }, {
186
+ agent: "codex" | "claude" | "opencode";
187
+ username: string;
188
+ machineId?: string | undefined;
189
+ defaultModel?: string | null | undefined;
190
+ configVersion?: string | undefined;
191
+ issuedAt?: string | undefined;
192
+ expiresAt?: string | undefined;
193
+ gatewayUrl?: string | undefined;
194
+ platformGatewayToken?: string | undefined;
195
+ allowedModels?: string[] | undefined;
196
+ clearGatewayCredentials?: boolean | undefined;
197
+ claudeConfig?: Record<string, unknown> | undefined;
198
+ codexConfig?: Record<string, unknown> | undefined;
199
+ opencodeConfig?: Record<string, unknown> | undefined;
200
+ }>;
201
+ export declare const EnterpriseAgentRuntimeConfigBatchSchema: z.ZodObject<{
202
+ configs: z.ZodArray<z.ZodObject<{
203
+ username: z.ZodString;
204
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
205
+ machineId: z.ZodOptional<z.ZodString>;
206
+ configVersion: z.ZodOptional<z.ZodString>;
207
+ issuedAt: z.ZodOptional<z.ZodString>;
208
+ expiresAt: z.ZodOptional<z.ZodString>;
209
+ gatewayUrl: z.ZodOptional<z.ZodString>;
210
+ platformGatewayToken: z.ZodOptional<z.ZodString>;
211
+ allowedModels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
212
+ defaultModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ clearGatewayCredentials: z.ZodOptional<z.ZodBoolean>;
214
+ claudeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
215
+ codexConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
216
+ opencodeConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
217
+ }, "strict", z.ZodTypeAny, {
218
+ agent: "codex" | "claude" | "opencode";
219
+ username: string;
220
+ machineId?: string | undefined;
221
+ defaultModel?: string | null | undefined;
222
+ configVersion?: string | undefined;
223
+ issuedAt?: string | undefined;
224
+ expiresAt?: string | undefined;
225
+ gatewayUrl?: string | undefined;
226
+ platformGatewayToken?: string | undefined;
227
+ allowedModels?: string[] | undefined;
228
+ clearGatewayCredentials?: boolean | undefined;
229
+ claudeConfig?: Record<string, unknown> | undefined;
230
+ codexConfig?: Record<string, unknown> | undefined;
231
+ opencodeConfig?: Record<string, unknown> | undefined;
232
+ }, {
233
+ agent: "codex" | "claude" | "opencode";
234
+ username: string;
235
+ machineId?: string | undefined;
236
+ defaultModel?: string | null | undefined;
237
+ configVersion?: string | undefined;
238
+ issuedAt?: string | undefined;
239
+ expiresAt?: string | undefined;
240
+ gatewayUrl?: string | undefined;
241
+ platformGatewayToken?: string | undefined;
242
+ allowedModels?: string[] | undefined;
243
+ clearGatewayCredentials?: boolean | undefined;
244
+ claudeConfig?: Record<string, unknown> | undefined;
245
+ codexConfig?: Record<string, unknown> | undefined;
246
+ opencodeConfig?: Record<string, unknown> | undefined;
247
+ }>, "many">;
248
+ }, "strict", z.ZodTypeAny, {
249
+ configs: {
250
+ agent: "codex" | "claude" | "opencode";
251
+ username: string;
252
+ machineId?: string | undefined;
253
+ defaultModel?: string | null | undefined;
254
+ configVersion?: string | undefined;
255
+ issuedAt?: string | undefined;
256
+ expiresAt?: string | undefined;
257
+ gatewayUrl?: string | undefined;
258
+ platformGatewayToken?: string | undefined;
259
+ allowedModels?: string[] | undefined;
260
+ clearGatewayCredentials?: boolean | undefined;
261
+ claudeConfig?: Record<string, unknown> | undefined;
262
+ codexConfig?: Record<string, unknown> | undefined;
263
+ opencodeConfig?: Record<string, unknown> | undefined;
264
+ }[];
265
+ }, {
266
+ configs: {
267
+ agent: "codex" | "claude" | "opencode";
268
+ username: string;
269
+ machineId?: string | undefined;
270
+ defaultModel?: string | null | undefined;
271
+ configVersion?: string | undefined;
272
+ issuedAt?: string | undefined;
273
+ expiresAt?: string | undefined;
274
+ gatewayUrl?: string | undefined;
275
+ platformGatewayToken?: string | undefined;
276
+ allowedModels?: string[] | undefined;
277
+ clearGatewayCredentials?: boolean | undefined;
278
+ claudeConfig?: Record<string, unknown> | undefined;
279
+ codexConfig?: Record<string, unknown> | undefined;
280
+ opencodeConfig?: Record<string, unknown> | undefined;
281
+ }[];
282
+ }>;
283
+ export type EnterpriseAgentRuntimeConfig = z.infer<typeof EnterpriseAgentRuntimeConfigSchema>;
284
+ export declare const EnterpriseRuntimeBindingDiagnosticSchema: z.ZodObject<{
285
+ id: z.ZodString;
286
+ username: z.ZodString;
287
+ machineId: z.ZodString;
288
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
289
+ allowedModels: z.ZodArray<z.ZodString, "many">;
290
+ status: z.ZodEnum<["active", "revoked", "expired", "failed"]>;
291
+ configVersion: z.ZodString;
292
+ issuedAt: z.ZodString;
293
+ expiresAt: z.ZodString;
294
+ revokedAt: z.ZodNullable<z.ZodString>;
295
+ lastErrorCode: z.ZodNullable<z.ZodString>;
296
+ cleanupPending: z.ZodOptional<z.ZodBoolean>;
297
+ cleanupAttempts: z.ZodOptional<z.ZodNumber>;
298
+ cleanupAvailableAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
299
+ cleanupLastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
300
+ }, "strict", z.ZodTypeAny, {
301
+ status: "failed" | "active" | "revoked" | "expired";
302
+ agent: "codex" | "claude" | "opencode";
303
+ id: string;
304
+ machineId: string;
305
+ configVersion: string;
306
+ issuedAt: string;
307
+ expiresAt: string;
308
+ allowedModels: string[];
309
+ username: string;
310
+ revokedAt: string | null;
311
+ lastErrorCode: string | null;
312
+ cleanupPending?: boolean | undefined;
313
+ cleanupAttempts?: number | undefined;
314
+ cleanupAvailableAt?: string | null | undefined;
315
+ cleanupLastError?: string | null | undefined;
316
+ }, {
317
+ status: "failed" | "active" | "revoked" | "expired";
318
+ agent: "codex" | "claude" | "opencode";
319
+ id: string;
320
+ machineId: string;
321
+ configVersion: string;
322
+ issuedAt: string;
323
+ expiresAt: string;
324
+ allowedModels: string[];
325
+ username: string;
326
+ revokedAt: string | null;
327
+ lastErrorCode: string | null;
328
+ cleanupPending?: boolean | undefined;
329
+ cleanupAttempts?: number | undefined;
330
+ cleanupAvailableAt?: string | null | undefined;
331
+ cleanupLastError?: string | null | undefined;
332
+ }>;
333
+ export declare const EnterpriseRuntimeBindingDiagnosticsSchema: z.ZodObject<{
334
+ bindings: z.ZodArray<z.ZodObject<{
335
+ id: z.ZodString;
336
+ username: z.ZodString;
337
+ machineId: z.ZodString;
338
+ agent: z.ZodEnum<["claude", "codex", "opencode"]>;
339
+ allowedModels: z.ZodArray<z.ZodString, "many">;
340
+ status: z.ZodEnum<["active", "revoked", "expired", "failed"]>;
341
+ configVersion: z.ZodString;
342
+ issuedAt: z.ZodString;
343
+ expiresAt: z.ZodString;
344
+ revokedAt: z.ZodNullable<z.ZodString>;
345
+ lastErrorCode: z.ZodNullable<z.ZodString>;
346
+ cleanupPending: z.ZodOptional<z.ZodBoolean>;
347
+ cleanupAttempts: z.ZodOptional<z.ZodNumber>;
348
+ cleanupAvailableAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
+ cleanupLastError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ }, "strict", z.ZodTypeAny, {
351
+ status: "failed" | "active" | "revoked" | "expired";
352
+ agent: "codex" | "claude" | "opencode";
353
+ id: string;
354
+ machineId: string;
355
+ configVersion: string;
356
+ issuedAt: string;
357
+ expiresAt: string;
358
+ allowedModels: string[];
359
+ username: string;
360
+ revokedAt: string | null;
361
+ lastErrorCode: string | null;
362
+ cleanupPending?: boolean | undefined;
363
+ cleanupAttempts?: number | undefined;
364
+ cleanupAvailableAt?: string | null | undefined;
365
+ cleanupLastError?: string | null | undefined;
366
+ }, {
367
+ status: "failed" | "active" | "revoked" | "expired";
368
+ agent: "codex" | "claude" | "opencode";
369
+ id: string;
370
+ machineId: string;
371
+ configVersion: string;
372
+ issuedAt: string;
373
+ expiresAt: string;
374
+ allowedModels: string[];
375
+ username: string;
376
+ revokedAt: string | null;
377
+ lastErrorCode: string | null;
378
+ cleanupPending?: boolean | undefined;
379
+ cleanupAttempts?: number | undefined;
380
+ cleanupAvailableAt?: string | null | undefined;
381
+ cleanupLastError?: string | null | undefined;
382
+ }>, "many">;
383
+ }, "strict", z.ZodTypeAny, {
384
+ bindings: {
385
+ status: "failed" | "active" | "revoked" | "expired";
386
+ agent: "codex" | "claude" | "opencode";
387
+ id: string;
388
+ machineId: string;
389
+ configVersion: string;
390
+ issuedAt: string;
391
+ expiresAt: string;
392
+ allowedModels: string[];
393
+ username: string;
394
+ revokedAt: string | null;
395
+ lastErrorCode: string | null;
396
+ cleanupPending?: boolean | undefined;
397
+ cleanupAttempts?: number | undefined;
398
+ cleanupAvailableAt?: string | null | undefined;
399
+ cleanupLastError?: string | null | undefined;
400
+ }[];
401
+ }, {
402
+ bindings: {
403
+ status: "failed" | "active" | "revoked" | "expired";
404
+ agent: "codex" | "claude" | "opencode";
405
+ id: string;
406
+ machineId: string;
407
+ configVersion: string;
408
+ issuedAt: string;
409
+ expiresAt: string;
410
+ allowedModels: string[];
411
+ username: string;
412
+ revokedAt: string | null;
413
+ lastErrorCode: string | null;
414
+ cleanupPending?: boolean | undefined;
415
+ cleanupAttempts?: number | undefined;
416
+ cleanupAvailableAt?: string | null | undefined;
417
+ cleanupLastError?: string | null | undefined;
418
+ }[];
419
+ }>;
420
+ export type EnterpriseRuntimeBindingDiagnostic = z.infer<typeof EnterpriseRuntimeBindingDiagnosticSchema>;
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";export const ENTERPRISE_RUNTIME_AGENTS=["claude","codex","opencode"];export function isEnterpriseRuntimeAgent(t){return ENTERPRISE_RUNTIME_AGENTS.includes(t)}export const EnterpriseRuntimeAgentSchema=e.enum(ENTERPRISE_RUNTIME_AGENTS);const o=e.object({modelId:e.string().min(1),displayName:e.string().min(1),status:e.enum(["authorized","blocked"]),reason:e.enum(["policy-blocked","projection-stale"]).optional()}).strict(),r=e.object({authorizedModels:e.array(o).max(200),defaultModel:e.string().min(1).nullable()}).strict().superRefine((t,i)=>{t.defaultModel!==null&&!t.authorizedModels.some(n=>n.modelId===t.defaultModel&&n.status==="authorized")&&i.addIssue({code:e.ZodIssueCode.custom,path:["defaultModel"],message:"default-model-not-authorized"})});export const EnterpriseRuntimeProjectionSchema=e.object({edition:e.literal("enterprise"),enterpriseId:e.string().min(1),userId:e.string().min(1),machineId:e.string().min(1),configVersion:e.string().min(1),issuedAt:e.string().datetime(),expiresAt:e.string().datetime(),gateway:e.object({url:e.string().url(),platformToken:e.string().min(1)}).strict(),agents:e.record(r)}).strict(),EnterpriseAgentRuntimeSettingsSchema=e.object({edition:e.literal("enterprise"),agent:EnterpriseRuntimeAgentSchema,configVersion:e.string().min(1),issuedAt:e.string().datetime(),expiresAt:e.string().datetime(),gatewayUrl:e.string().url(),platformGatewayToken:e.string().min(1),allowedModels:e.array(e.string().min(1)).max(200),defaultModel:e.string().min(1).nullable()}).strict(),EnterpriseAgentRuntimeConfigSchema=e.object({username:e.string().min(1),agent:EnterpriseRuntimeAgentSchema,machineId:e.string().min(1).optional(),configVersion:e.string().min(1).optional(),issuedAt:e.string().datetime().optional(),expiresAt:e.string().datetime().optional(),gatewayUrl:e.string().url().optional(),platformGatewayToken:e.string().min(1).optional(),allowedModels:e.array(e.string().min(1)).max(200).optional(),defaultModel:e.string().min(1).nullable().optional(),clearGatewayCredentials:e.boolean().optional(),claudeConfig:e.record(e.unknown()).optional(),codexConfig:e.record(e.unknown()).optional(),opencodeConfig:e.record(e.unknown()).optional()}).strict(),EnterpriseAgentRuntimeConfigBatchSchema=e.object({configs:e.array(EnterpriseAgentRuntimeConfigSchema).max(1e4)}).strict(),EnterpriseRuntimeBindingDiagnosticSchema=e.object({id:e.string().min(1),username:e.string().min(1),machineId:e.string().min(1),agent:EnterpriseRuntimeAgentSchema,allowedModels:e.array(e.string().min(1)).max(200),status:e.enum(["active","revoked","expired","failed"]),configVersion:e.string().min(1),issuedAt:e.string().datetime(),expiresAt:e.string().datetime(),revokedAt:e.string().datetime().nullable(),lastErrorCode:e.string().min(1).max(200).nullable(),cleanupPending:e.boolean().optional(),cleanupAttempts:e.number().int().nonnegative().optional(),cleanupAvailableAt:e.string().datetime().nullable().optional(),cleanupLastError:e.string().max(200).nullable().optional()}).strict(),EnterpriseRuntimeBindingDiagnosticsSchema=e.object({bindings:e.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;
@@ -1169,11 +1164,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
1169
1164
  role: z.ZodEnum<["user", "agent"]>;
1170
1165
  turn: z.ZodOptional<z.ZodString>;
1171
1166
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1172
- /** Claude CLI message UUID — used for precise conversation rollback. */
1167
+
1173
1168
  messageUuid: z.ZodOptional<z.ZodString>;
1174
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
1169
+
1175
1170
  toolCallId: z.ZodOptional<z.ZodString>;
1176
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
1171
+
1177
1172
  sourceAgent: z.ZodOptional<z.ZodObject<{
1178
1173
  threadId: z.ZodString;
1179
1174
  label: z.ZodString;
@@ -2325,11 +2320,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
2325
2320
  role: z.ZodEnum<["user", "agent"]>;
2326
2321
  turn: z.ZodOptional<z.ZodString>;
2327
2322
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
2328
- /** Claude CLI message UUID — used for precise conversation rollback. */
2323
+
2329
2324
  messageUuid: z.ZodOptional<z.ZodString>;
2330
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
2325
+
2331
2326
  toolCallId: z.ZodOptional<z.ZodString>;
2332
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
2327
+
2333
2328
  sourceAgent: z.ZodOptional<z.ZodObject<{
2334
2329
  threadId: z.ZodString;
2335
2330
  label: z.ZodString;
@@ -3481,11 +3476,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
3481
3476
  role: z.ZodEnum<["user", "agent"]>;
3482
3477
  turn: z.ZodOptional<z.ZodString>;
3483
3478
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3484
- /** Claude CLI message UUID — used for precise conversation rollback. */
3479
+
3485
3480
  messageUuid: z.ZodOptional<z.ZodString>;
3486
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
3481
+
3487
3482
  toolCallId: z.ZodOptional<z.ZodString>;
3488
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
3483
+
3489
3484
  sourceAgent: z.ZodOptional<z.ZodObject<{
3490
3485
  threadId: z.ZodString;
3491
3486
  label: z.ZodString;
@@ -4637,11 +4632,11 @@ export declare const SessionEnvelopeSchema: z.ZodEffects<z.ZodObject<{
4637
4632
  role: z.ZodEnum<["user", "agent"]>;
4638
4633
  turn: z.ZodOptional<z.ZodString>;
4639
4634
  subagent: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4640
- /** Claude CLI message UUID — used for precise conversation rollback. */
4635
+
4641
4636
  messageUuid: z.ZodOptional<z.ZodString>;
4642
- /** Tool call ID — routes child events (e.g. bg-task:completed) to the parent card. */
4637
+
4643
4638
  toolCallId: z.ZodOptional<z.ZodString>;
4644
- /** Non-hierarchical origin label for multiplexed provider subagent output. */
4639
+
4645
4640
  sourceAgent: z.ZodOptional<z.ZodObject<{
4646
4641
  threadId: z.ZodString;
4647
4642
  label: z.ZodString;
@@ -5794,9 +5789,9 @@ export interface CreateEnvelopeOptions {
5794
5789
  readonly time?: number;
5795
5790
  readonly turn?: string;
5796
5791
  readonly subagent?: string;
5797
- /** Claude CLI message UUID — used for precise conversation rollback. */
5792
+
5798
5793
  readonly messageUuid?: string;
5799
- /** Tool call ID — used to route child events (e.g. bg-task:completed) to parent card. */
5794
+
5800
5795
  readonly toolCallId?: string;
5801
5796
  readonly sourceAgent?: {
5802
5797
  readonly threadId: string;
@@ -5804,12 +5799,5 @@ export interface CreateEnvelopeOptions {
5804
5799
  readonly parentSpawnCallId?: string;
5805
5800
  };
5806
5801
  }
5807
- /**
5808
- * Create a SessionEnvelope by direct construction (hot path).
5809
- *
5810
- * Skips Zod `.parse()` for performance — the discriminated union with
5811
- * 14 variants + 4 superRefine checks is expensive on every streaming token.
5812
- * Validation still happens at ingress boundaries (server API handlers).
5813
- */
5802
+
5814
5803
  export declare function createEnvelope(role: SessionRole, ev: SessionEvent, opts?: CreateEnvelopeOptions): SessionEnvelope;
5815
- //# sourceMappingURL=envelope.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function errorMessage(err: unknown): string;
2
- //# sourceMappingURL=errorMessage.d.ts.map