@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
package/dist/sync.js CHANGED
@@ -1 +1 @@
1
- "use strict";import{z as e}from"zod";import{SessionMessageSchema as t}from"./messages.js";import{PlatformSchema as o}from"./machine.js";export const VersionedEncryptedValueSchema=e.object({version:e.number(),value:e.string()}).passthrough(),VersionedNullableEncryptedValueSchema=e.object({version:e.number(),value:e.string().nullable()}).passthrough(),VersionedMachineEncryptedValueSchema=e.object({version:e.number(),value:e.string()}).passthrough(),UpdateNewMessageBodySchema=e.object({t:e.literal("new-message"),sid:e.string(),message:t}).passthrough(),UpdateSessionBodySchema=e.object({t:e.literal("update-session"),id:e.string(),tag:e.string().optional(),displayName:e.string().nullish(),machineId:e.string().optional(),metadata:VersionedEncryptedValueSchema.nullish(),agentState:VersionedNullableEncryptedValueSchema.nullish(),active:e.boolean().optional(),source:e.enum(["managed","history","scheduled"]).optional(),contextUsage:e.record(e.unknown()).nullish(),dataEncryptionKey:e.string().nullish()}).passthrough(),UpdateMachineBodySchema=e.object({t:e.literal("update-machine"),machineId:e.string(),metadata:VersionedMachineEncryptedValueSchema.nullish(),daemonState:VersionedMachineEncryptedValueSchema.nullish(),active:e.boolean().optional(),activeAt:e.number().optional(),hostname:e.string().optional(),platform:o.optional(),arch:e.string().optional(),daemonVersion:e.string().optional(),displayName:e.string().optional(),availableAgents:e.array(e.string()).optional(),supportedMethods:e.array(e.string()).optional(),disconnectReason:e.enum(["normal","upgrade-required"]).optional(),upgradeStatus:e.enum(["idle","preflight","downloading","ready","switching","failed"]).optional(),upgradeError:e.string().optional(),superseded:e.boolean().optional(),derivationVersion:e.number().int().min(0).optional(),autoUpgradeDaemon:e.boolean().optional(),agentModels:e.record(e.string(),e.array(e.object({id:e.string(),displayName:e.string(),isDefault:e.boolean(),hidden:e.boolean(),source:e.enum(["builtin","acp","env","custom"]).optional().default("acp")}))).optional(),agentModes:e.record(e.string(),e.array(e.object({id:e.string(),label:e.string()}))).optional()}).passthrough(),UpdateSessionResetBodySchema=e.object({t:e.literal("session-reset"),sessionId:e.string()}).passthrough(),UpdateDeleteSessionBodySchema=e.object({t:e.literal("delete-session"),id:e.string()}).passthrough(),CoreUpdateBodySchema=e.discriminatedUnion("t",[UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema,UpdateDeleteSessionBodySchema]),CoreUpdateContainerSchema=e.object({id:e.string(),seq:e.number(),body:CoreUpdateBodySchema,createdAt:e.number()}).passthrough();
1
+ "use strict";import{z as e}from"zod";import{SessionMessageSchema as o}from"./messages.js";import{PlatformSchema as t}from"./machine.js";export const VersionedEncryptedValueSchema=e.object({version:e.number(),value:e.string()}).passthrough(),VersionedNullableEncryptedValueSchema=e.object({version:e.number(),value:e.string().nullable()}).passthrough(),VersionedMachineEncryptedValueSchema=e.object({version:e.number(),value:e.string()}).passthrough(),UpdateNewMessageBodySchema=e.object({t:e.literal("new-message"),sid:e.string(),message:o}).passthrough(),UpdateSessionBodySchema=e.object({t:e.literal("update-session"),id:e.string(),tag:e.string().optional(),displayName:e.string().nullish(),machineId:e.string().optional(),metadata:VersionedEncryptedValueSchema.nullish(),agentState:VersionedNullableEncryptedValueSchema.nullish(),active:e.boolean().optional(),source:e.enum(["managed","history","scheduled"]).optional(),contextUsage:e.record(e.unknown()).nullish(),dataEncryptionKey:e.string().nullish(),handoffEnabled:e.boolean().optional(),inheritedFrom:e.array(e.string().uuid()).max(5).optional()}).passthrough(),UpdateMachineBodySchema=e.object({t:e.literal("update-machine"),machineId:e.string(),metadata:VersionedMachineEncryptedValueSchema.nullish(),daemonState:VersionedMachineEncryptedValueSchema.nullish(),active:e.boolean().optional(),activeAt:e.number().optional(),hostname:e.string().optional(),platform:t.optional(),arch:e.string().optional(),daemonVersion:e.string().optional(),displayName:e.string().optional(),availableAgents:e.array(e.string()).optional(),supportedMethods:e.array(e.string()).optional(),disconnectReason:e.enum(["normal","upgrade-required"]).optional(),upgradeStatus:e.enum(["idle","preflight","downloading","ready","switching","failed"]).optional(),upgradeError:e.string().optional(),superseded:e.boolean().optional(),derivationVersion:e.number().int().min(0).optional(),autoUpgradeDaemon:e.boolean().optional(),agentModels:e.record(e.string(),e.array(e.object({id:e.string(),displayName:e.string(),isDefault:e.boolean(),hidden:e.boolean(),source:e.enum(["builtin","acp","env","custom"]).optional().default("acp")}))).optional(),agentModes:e.record(e.string(),e.array(e.object({id:e.string(),label:e.string()}))).optional()}).passthrough(),UpdateSessionResetBodySchema=e.object({t:e.literal("session-reset"),sessionId:e.string()}).passthrough(),UpdateDeleteSessionBodySchema=e.object({t:e.literal("delete-session"),id:e.string()}).passthrough(),CoreUpdateBodySchema=e.discriminatedUnion("t",[UpdateNewMessageBodySchema,UpdateSessionBodySchema,UpdateMachineBodySchema,UpdateSessionResetBodySchema,UpdateDeleteSessionBodySchema]),CoreUpdateContainerSchema=e.object({id:e.string(),seq:e.number(),body:CoreUpdateBodySchema,createdAt:e.number()}).passthrough();
@@ -1,28 +1,11 @@
1
- /**
2
- * Task delivery protocol — serialize/parse the structured <task-result>
3
- * agents emit at the end of a scheduled task.
4
- *
5
- * Transport reuses the existing summary string channel (sendSessionSummary),
6
- * so this module is deliberately string-in/string-out with graceful
7
- * degradation for legacy daemons and malformed agent output.
8
- */
9
1
  import { type TaskResult } from './scheduledTasks.js';
10
2
  export declare const TASK_RESULT_PREFIX = "[TASK_RESULT]";
11
- /** daemon → server: structured result to a prefixed JSON payload. */
3
+
12
4
  export declare function serializeTaskResult(result: TaskResult): string;
13
- /**
14
- * server ← daemon: parse a summary-channel payload into a TaskResult plus a
15
- * flag telling the caller whether to treat this as a terminal failure.
16
- * Never throws — always degrades to an unstructured result.
17
- */
5
+
18
6
  export declare function parseTaskResultPayload(payload: string): {
19
7
  result: TaskResult;
20
8
  terminalFailure: boolean;
21
9
  };
22
- /**
23
- * daemon: tolerantly extract a <task-result> block from raw agent text.
24
- * Returns null when no block is present (caller decides how to degrade).
25
- * Handles: single/double quotes, missing closing tag, surrounding markdown.
26
- */
10
+
27
11
  export declare function extractTaskResultFromText(text: string): TaskResult | null;
28
- //# sourceMappingURL=taskResult.d.ts.map
@@ -31,16 +31,7 @@ export declare const TelemetryEventSchema: z.ZodObject<{
31
31
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
32
32
  }, z.ZodTypeAny, "passthrough">>;
33
33
  export type TelemetryEvent = z.infer<typeof TelemetryEventSchema>;
34
- /**
35
- * Strict telemetry-event type for internal construction/consumption.
36
- *
37
- * `TelemetryEventSchema` uses `.passthrough()` for runtime tolerance of extra
38
- * daemon→server fields. But `z.infer` of a passthrough schema carries a
39
- * `[k: string]: unknown` index signature, which erases required-field
40
- * certainty through `Omit<...> + spread` (breaks `emit()` in telemetryCollector).
41
- * This type is the schema's declared shape WITHOUT the passthrough index
42
- * signature — use it when building or narrowing events in TypeScript.
43
- */
34
+
44
35
  export type TelemetryEventStrict = {
45
36
  type: TelemetryEventType;
46
37
  timestamp: string;
@@ -143,4 +134,3 @@ export declare const TelemetryReportPayloadSchema: z.ZodObject<{
143
134
  }, z.ZodTypeAny, "passthrough">>, "many">;
144
135
  }, z.ZodTypeAny, "passthrough">>;
145
136
  export type TelemetryReportPayload = z.infer<typeof TelemetryReportPayloadSchema>;
146
- //# sourceMappingURL=telemetry.d.ts.map
package/dist/utils.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export { createId } from '@paralleldrive/cuid2';
2
- //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,321 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const SESSION_HANDOFF_CAPABILITY = "session-handoff";
4
+
5
+ export declare const HandoffProposalContentSchema: z.ZodObject<{
6
+ format: z.ZodLiteral<4>;
7
+ summary: z.ZodEffects<z.ZodString, string, string>;
8
+ brief: z.ZodEffects<z.ZodString, string, string>;
9
+ sourceReferences: z.ZodArray<z.ZodString, "many">;
10
+ }, "strict", z.ZodTypeAny, {
11
+ summary: string;
12
+ format: 4;
13
+ brief: string;
14
+ sourceReferences: string[];
15
+ }, {
16
+ summary: string;
17
+ format: 4;
18
+ brief: string;
19
+ sourceReferences: string[];
20
+ }>;
21
+ export declare const HandoffProposalStatusSchema: z.ZodEnum<["proposed"]>;
22
+ export declare const HandoffProposalContentEnvelopeSchema: z.ZodObject<{
23
+ c: z.ZodString;
24
+ t: z.ZodEnum<["encrypted", "plaintext"]>;
25
+ }, "strict", z.ZodTypeAny, {
26
+ t: "encrypted" | "plaintext";
27
+ c: string;
28
+ }, {
29
+ t: "encrypted" | "plaintext";
30
+ c: string;
31
+ }>;
32
+ export declare const HandoffProposalCreateSchema: z.ZodObject<{
33
+ proposalId: z.ZodString;
34
+ sessionId: z.ZodString;
35
+
36
+ title: z.ZodOptional<z.ZodString>;
37
+ content: z.ZodObject<{
38
+ c: z.ZodString;
39
+ t: z.ZodEnum<["encrypted", "plaintext"]>;
40
+ }, "strict", z.ZodTypeAny, {
41
+ t: "encrypted" | "plaintext";
42
+ c: string;
43
+ }, {
44
+ t: "encrypted" | "plaintext";
45
+ c: string;
46
+ }>;
47
+ operationId: z.ZodString;
48
+ }, "strict", z.ZodTypeAny, {
49
+ sessionId: string;
50
+ content: {
51
+ t: "encrypted" | "plaintext";
52
+ c: string;
53
+ };
54
+ proposalId: string;
55
+ operationId: string;
56
+ title?: string | undefined;
57
+ }, {
58
+ sessionId: string;
59
+ content: {
60
+ t: "encrypted" | "plaintext";
61
+ c: string;
62
+ };
63
+ proposalId: string;
64
+ operationId: string;
65
+ title?: string | undefined;
66
+ }>;
67
+ export declare const HandoffProposalRecordSchema: z.ZodObject<{
68
+ proposalId: z.ZodString;
69
+ sessionId: z.ZodString;
70
+ content: z.ZodObject<{
71
+ c: z.ZodString;
72
+ t: z.ZodEnum<["encrypted", "plaintext"]>;
73
+ }, "strict", z.ZodTypeAny, {
74
+ t: "encrypted" | "plaintext";
75
+ c: string;
76
+ }, {
77
+ t: "encrypted" | "plaintext";
78
+ c: string;
79
+ }>;
80
+ status: z.ZodEnum<["proposed"]>;
81
+
82
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
83
+ createdAt: z.ZodString;
84
+ discardedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
85
+ }, "strict", z.ZodTypeAny, {
86
+ status: "proposed";
87
+ sessionId: string;
88
+ title: string | null;
89
+ content: {
90
+ t: "encrypted" | "plaintext";
91
+ c: string;
92
+ };
93
+ createdAt: string;
94
+ proposalId: string;
95
+ discardedAt: string | null;
96
+ }, {
97
+ status: "proposed";
98
+ sessionId: string;
99
+ content: {
100
+ t: "encrypted" | "plaintext";
101
+ c: string;
102
+ };
103
+ createdAt: string;
104
+ proposalId: string;
105
+ title?: string | null | undefined;
106
+ discardedAt?: string | null | undefined;
107
+ }>;
108
+
109
+ export declare const InheritedDeliverySummarySchema: z.ZodObject<{
110
+ deliveryId: z.ZodString;
111
+ sourceSessionId: z.ZodString;
112
+ sourceSessionTitle: z.ZodString;
113
+ createdAt: z.ZodString;
114
+ summary: z.ZodString;
115
+ brief: z.ZodOptional<z.ZodString>;
116
+ sourceReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
117
+ }, "strict", z.ZodTypeAny, {
118
+ summary: string;
119
+ createdAt: string;
120
+ deliveryId: string;
121
+ sourceSessionId: string;
122
+ sourceSessionTitle: string;
123
+ brief?: string | undefined;
124
+ sourceReferences?: string[] | undefined;
125
+ }, {
126
+ summary: string;
127
+ createdAt: string;
128
+ deliveryId: string;
129
+ sourceSessionId: string;
130
+ sourceSessionTitle: string;
131
+ brief?: string | undefined;
132
+ sourceReferences?: string[] | undefined;
133
+ }>;
134
+
135
+ export declare const SessionHandoffContextSchema: z.ZodObject<{
136
+ enabled: z.ZodBoolean;
137
+ inheritedDeliveries: z.ZodDefault<z.ZodArray<z.ZodObject<{
138
+ deliveryId: z.ZodString;
139
+ sourceSessionId: z.ZodString;
140
+ sourceSessionTitle: z.ZodString;
141
+ createdAt: z.ZodString;
142
+ summary: z.ZodString;
143
+ brief: z.ZodOptional<z.ZodString>;
144
+ sourceReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
145
+ }, "strict", z.ZodTypeAny, {
146
+ summary: string;
147
+ createdAt: string;
148
+ deliveryId: string;
149
+ sourceSessionId: string;
150
+ sourceSessionTitle: string;
151
+ brief?: string | undefined;
152
+ sourceReferences?: string[] | undefined;
153
+ }, {
154
+ summary: string;
155
+ createdAt: string;
156
+ deliveryId: string;
157
+ sourceSessionId: string;
158
+ sourceSessionTitle: string;
159
+ brief?: string | undefined;
160
+ sourceReferences?: string[] | undefined;
161
+ }>, "many">>;
162
+ }, "strict", z.ZodTypeAny, {
163
+ enabled: boolean;
164
+ inheritedDeliveries: {
165
+ summary: string;
166
+ createdAt: string;
167
+ deliveryId: string;
168
+ sourceSessionId: string;
169
+ sourceSessionTitle: string;
170
+ brief?: string | undefined;
171
+ sourceReferences?: string[] | undefined;
172
+ }[];
173
+ }, {
174
+ enabled: boolean;
175
+ inheritedDeliveries?: {
176
+ summary: string;
177
+ createdAt: string;
178
+ deliveryId: string;
179
+ sourceSessionId: string;
180
+ sourceSessionTitle: string;
181
+ brief?: string | undefined;
182
+ sourceReferences?: string[] | undefined;
183
+ }[] | undefined;
184
+ }>;
185
+ export type HandoffProposalContent = z.infer<typeof HandoffProposalContentSchema>;
186
+ export type HandoffProposalCreate = z.infer<typeof HandoffProposalCreateSchema>;
187
+ export type HandoffProposalRecord = z.infer<typeof HandoffProposalRecordSchema>;
188
+ export type HandoffProposalStatus = z.infer<typeof HandoffProposalStatusSchema>;
189
+ export type HandoffProposalContentEnvelope = z.infer<typeof HandoffProposalContentEnvelopeSchema>;
190
+ export type InheritedDeliverySummary = z.infer<typeof InheritedDeliverySummarySchema>;
191
+ export type SessionHandoffContext = z.infer<typeof SessionHandoffContextSchema>;
192
+ export declare const AccountDeliveryRowSchema: z.ZodObject<{
193
+ proposalId: z.ZodString;
194
+ sessionId: z.ZodString;
195
+ title: z.ZodString;
196
+ sourceSessionTitle: z.ZodString;
197
+ createdAt: z.ZodString;
198
+ discardedAt: z.ZodNullable<z.ZodString>;
199
+ content: z.ZodObject<{
200
+ c: z.ZodString;
201
+ t: z.ZodEnum<["encrypted", "plaintext"]>;
202
+ }, "strict", z.ZodTypeAny, {
203
+ t: "encrypted" | "plaintext";
204
+ c: string;
205
+ }, {
206
+ t: "encrypted" | "plaintext";
207
+ c: string;
208
+ }>;
209
+ }, "strict", z.ZodTypeAny, {
210
+ sessionId: string;
211
+ title: string;
212
+ content: {
213
+ t: "encrypted" | "plaintext";
214
+ c: string;
215
+ };
216
+ createdAt: string;
217
+ proposalId: string;
218
+ discardedAt: string | null;
219
+ sourceSessionTitle: string;
220
+ }, {
221
+ sessionId: string;
222
+ title: string;
223
+ content: {
224
+ t: "encrypted" | "plaintext";
225
+ c: string;
226
+ };
227
+ createdAt: string;
228
+ proposalId: string;
229
+ discardedAt: string | null;
230
+ sourceSessionTitle: string;
231
+ }>;
232
+ export declare const AccountDeliveryPageSchema: z.ZodObject<{
233
+ data: z.ZodArray<z.ZodObject<{
234
+ proposalId: z.ZodString;
235
+ sessionId: z.ZodString;
236
+ title: z.ZodString;
237
+ sourceSessionTitle: z.ZodString;
238
+ createdAt: z.ZodString;
239
+ discardedAt: z.ZodNullable<z.ZodString>;
240
+ content: z.ZodObject<{
241
+ c: z.ZodString;
242
+ t: z.ZodEnum<["encrypted", "plaintext"]>;
243
+ }, "strict", z.ZodTypeAny, {
244
+ t: "encrypted" | "plaintext";
245
+ c: string;
246
+ }, {
247
+ t: "encrypted" | "plaintext";
248
+ c: string;
249
+ }>;
250
+ }, "strict", z.ZodTypeAny, {
251
+ sessionId: string;
252
+ title: string;
253
+ content: {
254
+ t: "encrypted" | "plaintext";
255
+ c: string;
256
+ };
257
+ createdAt: string;
258
+ proposalId: string;
259
+ discardedAt: string | null;
260
+ sourceSessionTitle: string;
261
+ }, {
262
+ sessionId: string;
263
+ title: string;
264
+ content: {
265
+ t: "encrypted" | "plaintext";
266
+ c: string;
267
+ };
268
+ createdAt: string;
269
+ proposalId: string;
270
+ discardedAt: string | null;
271
+ sourceSessionTitle: string;
272
+ }>, "many">;
273
+ hasMore: z.ZodBoolean;
274
+ nextCursor: z.ZodOptional<z.ZodString>;
275
+ }, "strict", z.ZodTypeAny, {
276
+ data: {
277
+ sessionId: string;
278
+ title: string;
279
+ content: {
280
+ t: "encrypted" | "plaintext";
281
+ c: string;
282
+ };
283
+ createdAt: string;
284
+ proposalId: string;
285
+ discardedAt: string | null;
286
+ sourceSessionTitle: string;
287
+ }[];
288
+ hasMore: boolean;
289
+ nextCursor?: string | undefined;
290
+ }, {
291
+ data: {
292
+ sessionId: string;
293
+ title: string;
294
+ content: {
295
+ t: "encrypted" | "plaintext";
296
+ c: string;
297
+ };
298
+ createdAt: string;
299
+ proposalId: string;
300
+ discardedAt: string | null;
301
+ sourceSessionTitle: string;
302
+ }[];
303
+ hasMore: boolean;
304
+ nextCursor?: string | undefined;
305
+ }>;
306
+ export declare const DeliveryConsumerSchema: z.ZodObject<{
307
+ deliveryId: z.ZodString;
308
+ sessionId: z.ZodString;
309
+ sessionTitle: z.ZodString;
310
+ }, "strict", z.ZodTypeAny, {
311
+ sessionId: string;
312
+ deliveryId: string;
313
+ sessionTitle: string;
314
+ }, {
315
+ sessionId: string;
316
+ deliveryId: string;
317
+ sessionTitle: string;
318
+ }>;
319
+ export type AccountDeliveryRow = z.infer<typeof AccountDeliveryRowSchema>;
320
+ export type AccountDeliveryPage = z.infer<typeof AccountDeliveryPageSchema>;
321
+ export type DeliveryConsumer = z.infer<typeof DeliveryConsumerSchema>;
@@ -0,0 +1 @@
1
+ "use strict";import{z as e}from"zod";const n=e.string().trim().min(1).max(512);export const SESSION_HANDOFF_CAPABILITY="session-handoff";const o=e.string().trim().min(1).max(3e3).refine(t=>{const r=(t.match(/^#{1,6}\s+.+$/gm)??[]).map(s=>s.replace(/^#+\s+/,"").trim().toLocaleLowerCase());return[["this session delivered","\u672C\u6B21\u4F1A\u8BDD\u4EA4\u4ED8","\u672C\u6B21\u4F1A\u8BDD\u5DF2\u5B8C\u6210"],["files, outputs and evidence","\u6587\u4EF6\u3001\u4EA7\u51FA\u4E0E\u8BC1\u636E"],["verification performed","\u5DF2\u6267\u884C\u7684\u9A8C\u8BC1","\u9A8C\u8BC1\u7ED3\u679C"],["open questions or risks","\u672A\u51B3\u95EE\u9898\u6216\u98CE\u9669","\u5F85\u89E3\u51B3\u95EE\u9898\u4E0E\u98CE\u9669","\u672A\u5B8C\u6210\u4E0E\u98CE\u9669","\u9057\u7559\u95EE\u9898"],["suggested follow-up","\u5EFA\u8BAE\u540E\u7EED\u52A8\u4F5C","\u5EFA\u8BAE\u7684\u540E\u7EED\u5DE5\u4F5C","\u4E0B\u4E00\u6B65"]].every(s=>s.some(i=>r.includes(i)))},"missing required session delivery sections"),a=e.string().trim().min(1).max(200).refine(t=>!/(^|\s)(?:#{1,6}\s|[-*+]\s|\d+[.)]\s|>\s)/.test(t)&&!/```|[`*_~]|\[[^\]]+\]\([^)]*\)/.test(t),"summary must be plain text without Markdown");export const HandoffProposalContentSchema=e.object({format:e.literal(4),summary:a,brief:o,sourceReferences:e.array(n).min(1).max(100)}).strict(),HandoffProposalStatusSchema=e.enum(["proposed"]),HandoffProposalContentEnvelopeSchema=e.object({c:e.string().min(1).max(2e6),t:e.enum(["encrypted","plaintext"])}).strict(),HandoffProposalCreateSchema=e.object({proposalId:e.string().uuid(),sessionId:e.string().min(1).max(128),title:e.string().trim().min(1).max(80).optional(),content:HandoffProposalContentEnvelopeSchema,operationId:e.string().uuid()}).strict(),HandoffProposalRecordSchema=e.object({proposalId:e.string().uuid(),sessionId:e.string().min(1).max(128),content:HandoffProposalContentEnvelopeSchema,status:HandoffProposalStatusSchema,title:e.string().max(80).nullable().default(null),createdAt:e.string().datetime(),discardedAt:e.string().datetime().nullable().default(null)}).strict(),InheritedDeliverySummarySchema=e.object({deliveryId:e.string().uuid(),sourceSessionId:e.string().min(1).max(128),sourceSessionTitle:e.string().max(200),createdAt:e.string().datetime(),summary:e.string().max(200),brief:e.string().max(3e3).optional(),sourceReferences:e.array(e.string().max(512)).max(100).optional()}).strict(),SessionHandoffContextSchema=e.object({enabled:e.boolean(),inheritedDeliveries:e.array(InheritedDeliverySummarySchema).max(1).default([])}).strict(),AccountDeliveryRowSchema=e.object({proposalId:e.string().uuid(),sessionId:e.string().min(1).max(128),title:e.string().max(80),sourceSessionTitle:e.string().max(200),createdAt:e.string().datetime(),discardedAt:e.string().datetime().nullable(),content:HandoffProposalContentEnvelopeSchema}).strict(),AccountDeliveryPageSchema=e.object({data:e.array(AccountDeliveryRowSchema),hasMore:e.boolean(),nextCursor:e.string().optional()}).strict(),DeliveryConsumerSchema=e.object({deliveryId:e.string().uuid(),sessionId:e.string().min(1).max(128),sessionTitle:e.string().max(200)}).strict();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentdock/wire",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
4
4
  "description": "Protocol definitions for AgentDock — Zod schemas, message formats, RPC types",
5
5
  "license": "UNLICENSED",
6
6
  "author": "CCPark",