@agentdock/wire 0.0.92 → 0.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accountLanguage.d.ts +32 -0
- package/dist/accountLanguage.js +1 -0
- package/dist/agentCapabilities.d.ts +26 -0
- package/dist/agentCapabilities.js +1 -1
- package/dist/agentRuntimeSettings.d.ts +140 -0
- package/dist/agentRuntimeSettings.js +1 -0
- package/dist/enterpriseGateway.d.ts +215 -0
- package/dist/enterpriseGateway.js +1 -0
- package/dist/envelope.d.ts +45 -30
- package/dist/events.d.ts +24 -12
- package/dist/events.js +1 -1
- package/dist/features.d.ts +7 -3
- package/dist/features.js +1 -1
- package/dist/feedback.d.ts +18 -18
- package/dist/gateway.d.ts +386 -0
- package/dist/gateway.js +1 -0
- package/dist/handoffBrief.d.ts +14 -0
- package/dist/handoffBrief.js +52 -0
- package/dist/inboundEvents.d.ts +70 -0
- package/dist/inboundEvents.js +1 -1
- package/dist/index.d.ts +20 -12
- package/dist/index.js +1 -1
- package/dist/interactionEvents.d.ts +2 -2
- package/dist/legacyProtocol.d.ts +36 -36
- package/dist/machine.d.ts +9 -0
- package/dist/machine.js +1 -1
- package/dist/messageMeta.d.ts +6 -4
- package/dist/messageMeta.js +1 -1
- package/dist/messages.d.ts +338 -216
- package/dist/messages.js +1 -1
- package/dist/notification.d.ts +1 -1
- package/dist/notification.js +1 -1
- package/dist/rpc.d.ts +884 -84
- package/dist/rpc.js +1 -1
- package/dist/scheduledTasks.d.ts +50 -50
- package/dist/sessionBtw.d.ts +153 -0
- package/dist/sessionBtw.js +1 -0
- package/dist/sessionTitle.d.ts +16 -0
- package/dist/sessionTitle.js +1 -0
- package/dist/socketEvents.d.ts +9 -0
- package/dist/socketEvents.js +1 -1
- package/dist/sourceMetadata.d.ts +2 -2
- package/dist/stats.d.ts +87 -49
- package/dist/stats.js +1 -1
- package/dist/sync.d.ts +315 -0
- package/dist/sync.js +1 -1
- package/dist/workItems.d.ts +345 -0
- package/dist/workItems.js +1 -0
- package/package.json +1 -1
package/dist/sync.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";import{SessionMessageSchema as
|
|
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();
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Daemon capability flag (RFC-084 rolling-upgrade gate, same pattern as RFC-081
|
|
4
|
+
* `responseLanguage`). The server only forwards `handoffContext` into spawn-session
|
|
5
|
+
* RPC params when the target daemon declared this capability at machine-register.
|
|
6
|
+
* Older daemons whose `SpawnSessionParamsSchema` is `.strict()` reject the unknown
|
|
7
|
+
* field outright, so the field must never reach them; they get a plain session
|
|
8
|
+
* (session handoff degrades to a plain Q&A session) until they upgrade.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SESSION_HANDOFF_CAPABILITY = "session-handoff";
|
|
11
|
+
/**
|
|
12
|
+
* Session delivery content (format 4). A delivery is an immutable E2EE snapshot
|
|
13
|
+
* of a session's state at handoff time (RFC-084 decision 5): it carries no
|
|
14
|
+
* WorkItem base version — the delivery is session-anchored, not WorkItem-versioned.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HandoffProposalContentSchema: z.ZodObject<{
|
|
17
|
+
format: z.ZodLiteral<4>;
|
|
18
|
+
summary: z.ZodEffects<z.ZodString, string, string>;
|
|
19
|
+
brief: z.ZodEffects<z.ZodString, string, string>;
|
|
20
|
+
sourceReferences: z.ZodArray<z.ZodString, "many">;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
summary: string;
|
|
23
|
+
format: 4;
|
|
24
|
+
brief: string;
|
|
25
|
+
sourceReferences: string[];
|
|
26
|
+
}, {
|
|
27
|
+
summary: string;
|
|
28
|
+
format: 4;
|
|
29
|
+
brief: string;
|
|
30
|
+
sourceReferences: string[];
|
|
31
|
+
}>;
|
|
32
|
+
export declare const HandoffProposalStatusSchema: z.ZodEnum<["proposed"]>;
|
|
33
|
+
export declare const HandoffProposalContentEnvelopeSchema: z.ZodObject<{
|
|
34
|
+
c: z.ZodString;
|
|
35
|
+
t: z.ZodEnum<["encrypted", "plaintext"]>;
|
|
36
|
+
}, "strict", z.ZodTypeAny, {
|
|
37
|
+
t: "encrypted" | "plaintext";
|
|
38
|
+
c: string;
|
|
39
|
+
}, {
|
|
40
|
+
t: "encrypted" | "plaintext";
|
|
41
|
+
c: string;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const HandoffProposalCreateSchema: z.ZodObject<{
|
|
44
|
+
proposalId: z.ZodString;
|
|
45
|
+
sessionId: z.ZodString;
|
|
46
|
+
/** Agent-generated snapshot title; server stores it on the delivery (RFC-087). */
|
|
47
|
+
title: z.ZodOptional<z.ZodString>;
|
|
48
|
+
content: z.ZodObject<{
|
|
49
|
+
c: z.ZodString;
|
|
50
|
+
t: z.ZodEnum<["encrypted", "plaintext"]>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
t: "encrypted" | "plaintext";
|
|
53
|
+
c: string;
|
|
54
|
+
}, {
|
|
55
|
+
t: "encrypted" | "plaintext";
|
|
56
|
+
c: string;
|
|
57
|
+
}>;
|
|
58
|
+
operationId: z.ZodString;
|
|
59
|
+
}, "strict", z.ZodTypeAny, {
|
|
60
|
+
sessionId: string;
|
|
61
|
+
content: {
|
|
62
|
+
t: "encrypted" | "plaintext";
|
|
63
|
+
c: string;
|
|
64
|
+
};
|
|
65
|
+
proposalId: string;
|
|
66
|
+
operationId: string;
|
|
67
|
+
title?: string | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
sessionId: string;
|
|
70
|
+
content: {
|
|
71
|
+
t: "encrypted" | "plaintext";
|
|
72
|
+
c: string;
|
|
73
|
+
};
|
|
74
|
+
proposalId: string;
|
|
75
|
+
operationId: string;
|
|
76
|
+
title?: string | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const HandoffProposalRecordSchema: z.ZodObject<{
|
|
79
|
+
proposalId: z.ZodString;
|
|
80
|
+
sessionId: z.ZodString;
|
|
81
|
+
content: z.ZodObject<{
|
|
82
|
+
c: z.ZodString;
|
|
83
|
+
t: z.ZodEnum<["encrypted", "plaintext"]>;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
t: "encrypted" | "plaintext";
|
|
86
|
+
c: string;
|
|
87
|
+
}, {
|
|
88
|
+
t: "encrypted" | "plaintext";
|
|
89
|
+
c: string;
|
|
90
|
+
}>;
|
|
91
|
+
status: z.ZodEnum<["proposed"]>;
|
|
92
|
+
/** RFC-087: snapshot title, stored independently of the session title
|
|
93
|
+
* (displayName is never overwritten by a handoff). Optional on submit. */
|
|
94
|
+
title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
createdAt: z.ZodString;
|
|
96
|
+
discardedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
}, "strict", z.ZodTypeAny, {
|
|
98
|
+
status: "proposed";
|
|
99
|
+
sessionId: string;
|
|
100
|
+
title: string | null;
|
|
101
|
+
content: {
|
|
102
|
+
t: "encrypted" | "plaintext";
|
|
103
|
+
c: string;
|
|
104
|
+
};
|
|
105
|
+
createdAt: string;
|
|
106
|
+
proposalId: string;
|
|
107
|
+
discardedAt: string | null;
|
|
108
|
+
}, {
|
|
109
|
+
status: "proposed";
|
|
110
|
+
sessionId: string;
|
|
111
|
+
content: {
|
|
112
|
+
t: "encrypted" | "plaintext";
|
|
113
|
+
c: string;
|
|
114
|
+
};
|
|
115
|
+
createdAt: string;
|
|
116
|
+
proposalId: string;
|
|
117
|
+
title?: string | null | undefined;
|
|
118
|
+
discardedAt?: string | null | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Inherited delivery carried in the new-session handoff context. The PWA
|
|
122
|
+
* (which holds the master secret) decrypts the delivery and passes its full
|
|
123
|
+
* plaintext content for one-time prompt injection; the daemon never decrypts.
|
|
124
|
+
* RFC-087: openQuestions/nextSteps removed (the brief already contains both
|
|
125
|
+
* sections — the injection no longer re-renders them); `brief` capped at 3000.
|
|
126
|
+
*/
|
|
127
|
+
export declare const InheritedDeliverySummarySchema: z.ZodObject<{
|
|
128
|
+
deliveryId: z.ZodString;
|
|
129
|
+
sourceSessionId: z.ZodString;
|
|
130
|
+
sourceSessionTitle: z.ZodString;
|
|
131
|
+
createdAt: z.ZodString;
|
|
132
|
+
summary: z.ZodString;
|
|
133
|
+
brief: z.ZodOptional<z.ZodString>;
|
|
134
|
+
sourceReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
135
|
+
}, "strict", z.ZodTypeAny, {
|
|
136
|
+
summary: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
deliveryId: string;
|
|
139
|
+
sourceSessionId: string;
|
|
140
|
+
sourceSessionTitle: string;
|
|
141
|
+
brief?: string | undefined;
|
|
142
|
+
sourceReferences?: string[] | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
summary: string;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
deliveryId: string;
|
|
147
|
+
sourceSessionId: string;
|
|
148
|
+
sourceSessionTitle: string;
|
|
149
|
+
brief?: string | undefined;
|
|
150
|
+
sourceReferences?: string[] | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
/**
|
|
153
|
+
* Session-level handoff context for a new session (RFC-084 decision 8).
|
|
154
|
+
* `enabled` is the sole trigger for `submit_handoff` MCP injection and the
|
|
155
|
+
* handoff guidance prompt; `inheritedDeliveries` is the fixed continuity
|
|
156
|
+
* context from the handoff-card entry (at most one in the current UI).
|
|
157
|
+
*/
|
|
158
|
+
export declare const SessionHandoffContextSchema: z.ZodObject<{
|
|
159
|
+
enabled: z.ZodBoolean;
|
|
160
|
+
inheritedDeliveries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
161
|
+
deliveryId: z.ZodString;
|
|
162
|
+
sourceSessionId: z.ZodString;
|
|
163
|
+
sourceSessionTitle: z.ZodString;
|
|
164
|
+
createdAt: z.ZodString;
|
|
165
|
+
summary: z.ZodString;
|
|
166
|
+
brief: z.ZodOptional<z.ZodString>;
|
|
167
|
+
sourceReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
168
|
+
}, "strict", z.ZodTypeAny, {
|
|
169
|
+
summary: string;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
deliveryId: string;
|
|
172
|
+
sourceSessionId: string;
|
|
173
|
+
sourceSessionTitle: string;
|
|
174
|
+
brief?: string | undefined;
|
|
175
|
+
sourceReferences?: string[] | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
summary: string;
|
|
178
|
+
createdAt: string;
|
|
179
|
+
deliveryId: string;
|
|
180
|
+
sourceSessionId: string;
|
|
181
|
+
sourceSessionTitle: string;
|
|
182
|
+
brief?: string | undefined;
|
|
183
|
+
sourceReferences?: string[] | undefined;
|
|
184
|
+
}>, "many">>;
|
|
185
|
+
}, "strict", z.ZodTypeAny, {
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
inheritedDeliveries: {
|
|
188
|
+
summary: string;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
deliveryId: string;
|
|
191
|
+
sourceSessionId: string;
|
|
192
|
+
sourceSessionTitle: string;
|
|
193
|
+
brief?: string | undefined;
|
|
194
|
+
sourceReferences?: string[] | undefined;
|
|
195
|
+
}[];
|
|
196
|
+
}, {
|
|
197
|
+
enabled: boolean;
|
|
198
|
+
inheritedDeliveries?: {
|
|
199
|
+
summary: string;
|
|
200
|
+
createdAt: string;
|
|
201
|
+
deliveryId: string;
|
|
202
|
+
sourceSessionId: string;
|
|
203
|
+
sourceSessionTitle: string;
|
|
204
|
+
brief?: string | undefined;
|
|
205
|
+
sourceReferences?: string[] | undefined;
|
|
206
|
+
}[] | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
export type HandoffProposalContent = z.infer<typeof HandoffProposalContentSchema>;
|
|
209
|
+
export type HandoffProposalCreate = z.infer<typeof HandoffProposalCreateSchema>;
|
|
210
|
+
export type HandoffProposalRecord = z.infer<typeof HandoffProposalRecordSchema>;
|
|
211
|
+
export type HandoffProposalStatus = z.infer<typeof HandoffProposalStatusSchema>;
|
|
212
|
+
export type HandoffProposalContentEnvelope = z.infer<typeof HandoffProposalContentEnvelopeSchema>;
|
|
213
|
+
export type InheritedDeliverySummary = z.infer<typeof InheritedDeliverySummarySchema>;
|
|
214
|
+
export type SessionHandoffContext = z.infer<typeof SessionHandoffContextSchema>;
|
|
215
|
+
export declare const AccountDeliveryRowSchema: z.ZodObject<{
|
|
216
|
+
proposalId: z.ZodString;
|
|
217
|
+
sessionId: z.ZodString;
|
|
218
|
+
title: z.ZodString;
|
|
219
|
+
sourceSessionTitle: z.ZodString;
|
|
220
|
+
createdAt: z.ZodString;
|
|
221
|
+
discardedAt: z.ZodNullable<z.ZodString>;
|
|
222
|
+
content: z.ZodObject<{
|
|
223
|
+
c: z.ZodString;
|
|
224
|
+
t: z.ZodEnum<["encrypted", "plaintext"]>;
|
|
225
|
+
}, "strict", z.ZodTypeAny, {
|
|
226
|
+
t: "encrypted" | "plaintext";
|
|
227
|
+
c: string;
|
|
228
|
+
}, {
|
|
229
|
+
t: "encrypted" | "plaintext";
|
|
230
|
+
c: string;
|
|
231
|
+
}>;
|
|
232
|
+
}, "strict", z.ZodTypeAny, {
|
|
233
|
+
sessionId: string;
|
|
234
|
+
title: string;
|
|
235
|
+
content: {
|
|
236
|
+
t: "encrypted" | "plaintext";
|
|
237
|
+
c: string;
|
|
238
|
+
};
|
|
239
|
+
createdAt: string;
|
|
240
|
+
proposalId: string;
|
|
241
|
+
discardedAt: string | null;
|
|
242
|
+
sourceSessionTitle: string;
|
|
243
|
+
}, {
|
|
244
|
+
sessionId: string;
|
|
245
|
+
title: string;
|
|
246
|
+
content: {
|
|
247
|
+
t: "encrypted" | "plaintext";
|
|
248
|
+
c: string;
|
|
249
|
+
};
|
|
250
|
+
createdAt: string;
|
|
251
|
+
proposalId: string;
|
|
252
|
+
discardedAt: string | null;
|
|
253
|
+
sourceSessionTitle: string;
|
|
254
|
+
}>;
|
|
255
|
+
export declare const AccountDeliveryPageSchema: z.ZodObject<{
|
|
256
|
+
data: z.ZodArray<z.ZodObject<{
|
|
257
|
+
proposalId: z.ZodString;
|
|
258
|
+
sessionId: z.ZodString;
|
|
259
|
+
title: z.ZodString;
|
|
260
|
+
sourceSessionTitle: z.ZodString;
|
|
261
|
+
createdAt: z.ZodString;
|
|
262
|
+
discardedAt: z.ZodNullable<z.ZodString>;
|
|
263
|
+
content: z.ZodObject<{
|
|
264
|
+
c: z.ZodString;
|
|
265
|
+
t: z.ZodEnum<["encrypted", "plaintext"]>;
|
|
266
|
+
}, "strict", z.ZodTypeAny, {
|
|
267
|
+
t: "encrypted" | "plaintext";
|
|
268
|
+
c: string;
|
|
269
|
+
}, {
|
|
270
|
+
t: "encrypted" | "plaintext";
|
|
271
|
+
c: string;
|
|
272
|
+
}>;
|
|
273
|
+
}, "strict", z.ZodTypeAny, {
|
|
274
|
+
sessionId: string;
|
|
275
|
+
title: string;
|
|
276
|
+
content: {
|
|
277
|
+
t: "encrypted" | "plaintext";
|
|
278
|
+
c: string;
|
|
279
|
+
};
|
|
280
|
+
createdAt: string;
|
|
281
|
+
proposalId: string;
|
|
282
|
+
discardedAt: string | null;
|
|
283
|
+
sourceSessionTitle: string;
|
|
284
|
+
}, {
|
|
285
|
+
sessionId: string;
|
|
286
|
+
title: string;
|
|
287
|
+
content: {
|
|
288
|
+
t: "encrypted" | "plaintext";
|
|
289
|
+
c: string;
|
|
290
|
+
};
|
|
291
|
+
createdAt: string;
|
|
292
|
+
proposalId: string;
|
|
293
|
+
discardedAt: string | null;
|
|
294
|
+
sourceSessionTitle: string;
|
|
295
|
+
}>, "many">;
|
|
296
|
+
hasMore: z.ZodBoolean;
|
|
297
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, "strict", z.ZodTypeAny, {
|
|
299
|
+
data: {
|
|
300
|
+
sessionId: string;
|
|
301
|
+
title: string;
|
|
302
|
+
content: {
|
|
303
|
+
t: "encrypted" | "plaintext";
|
|
304
|
+
c: string;
|
|
305
|
+
};
|
|
306
|
+
createdAt: string;
|
|
307
|
+
proposalId: string;
|
|
308
|
+
discardedAt: string | null;
|
|
309
|
+
sourceSessionTitle: string;
|
|
310
|
+
}[];
|
|
311
|
+
hasMore: boolean;
|
|
312
|
+
nextCursor?: string | undefined;
|
|
313
|
+
}, {
|
|
314
|
+
data: {
|
|
315
|
+
sessionId: string;
|
|
316
|
+
title: string;
|
|
317
|
+
content: {
|
|
318
|
+
t: "encrypted" | "plaintext";
|
|
319
|
+
c: string;
|
|
320
|
+
};
|
|
321
|
+
createdAt: string;
|
|
322
|
+
proposalId: string;
|
|
323
|
+
discardedAt: string | null;
|
|
324
|
+
sourceSessionTitle: string;
|
|
325
|
+
}[];
|
|
326
|
+
hasMore: boolean;
|
|
327
|
+
nextCursor?: string | undefined;
|
|
328
|
+
}>;
|
|
329
|
+
export declare const DeliveryConsumerSchema: z.ZodObject<{
|
|
330
|
+
deliveryId: z.ZodString;
|
|
331
|
+
sessionId: z.ZodString;
|
|
332
|
+
sessionTitle: z.ZodString;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
sessionId: string;
|
|
335
|
+
deliveryId: string;
|
|
336
|
+
sessionTitle: string;
|
|
337
|
+
}, {
|
|
338
|
+
sessionId: string;
|
|
339
|
+
deliveryId: string;
|
|
340
|
+
sessionTitle: string;
|
|
341
|
+
}>;
|
|
342
|
+
export type AccountDeliveryRow = z.infer<typeof AccountDeliveryRowSchema>;
|
|
343
|
+
export type AccountDeliveryPage = z.infer<typeof AccountDeliveryPageSchema>;
|
|
344
|
+
export type DeliveryConsumer = z.infer<typeof DeliveryConsumerSchema>;
|
|
345
|
+
//# sourceMappingURL=workItems.d.ts.map
|
|
@@ -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();
|