@atlaswork/atlascode 0.1.124 → 0.1.126

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 (76) hide show
  1. package/dist/atlasweb-carrier.json +6 -0
  2. package/dist/cli.js +514 -18
  3. package/dist/web-session-runtime/atlascode/web/entry.d.ts +2 -0
  4. package/dist/web-session-runtime/atlascode/web/executionOutlet.d.ts +60 -0
  5. package/dist/web-session-runtime/atlascode/web/limits.d.ts +5 -0
  6. package/dist/web-session-runtime/atlascode/web/runtimeEntry.d.ts +16 -0
  7. package/dist/web-session-runtime/atlascode/web/sessionStoreAdapter.d.ts +12 -0
  8. package/dist/web-session-runtime/index.d.ts +1 -1
  9. package/dist/web-session-runtime/index.js +104 -3
  10. package/dist/web-session-runtime/kernel/execution/executionOutlet.d.ts +60 -0
  11. package/dist/web-session-runtime/kernel/protocol/webExecutionV0.d.ts +542 -0
  12. package/dist/web-session-runtime/kernel/state/injection.d.ts +28 -0
  13. package/dist/web-session-runtime/kernel/state/ports.d.ts +67 -0
  14. package/dist/web-session-runtime-execution/atlascode/web/contract.d.ts +10 -0
  15. package/dist/web-session-runtime-execution/atlascode/web/cursorLedger.d.ts +63 -0
  16. package/dist/web-session-runtime-execution/atlascode/web/entry.d.ts +24 -0
  17. package/dist/web-session-runtime-execution/atlascode/web/errors.d.ts +16 -0
  18. package/dist/web-session-runtime-execution/atlascode/web/follow.d.ts +82 -0
  19. package/dist/web-session-runtime-execution/atlascode/web/limits.d.ts +63 -0
  20. package/dist/web-session-runtime-execution/atlascode/web/projection.d.ts +69 -0
  21. package/dist/web-session-runtime-execution/atlascode/web/readonlyRuntime.d.ts +156 -0
  22. package/dist/web-session-runtime-execution/atlascode/web/runtimeDefault.d.ts +26 -0
  23. package/dist/web-session-runtime-execution/atlascode/web/sessionStoreAdapter.d.ts +70 -0
  24. package/dist/web-session-runtime-execution/engine/session/env.d.ts +32 -0
  25. package/dist/web-session-runtime-execution/engine/session/firstPrompt.d.ts +21 -0
  26. package/dist/web-session-runtime-execution/engine/session/json.d.ts +27 -0
  27. package/dist/web-session-runtime-execution/engine/session/load.d.ts +88 -0
  28. package/dist/web-session-runtime-execution/engine/session/paths.d.ts +25 -0
  29. package/dist/web-session-runtime-execution/engine/session/predicates.d.ts +55 -0
  30. package/dist/web-session-runtime-execution/engine/session/readonly.d.ts +29 -0
  31. package/dist/web-session-runtime-execution/engine/session/scanner.d.ts +26 -0
  32. package/dist/web-session-runtime-execution/engine/session/search.d.ts +44 -0
  33. package/dist/web-session-runtime-execution/engine/session/types.d.ts +379 -0
  34. package/dist/web-session-runtime-execution/index.d.ts +1 -0
  35. package/dist/web-session-runtime-execution/index.js +8396 -0
  36. package/dist/web-session-runtime-execution/kernel/execution/executionOutlet.d.ts +60 -0
  37. package/dist/web-session-runtime-execution/kernel/protocol/webExecutionV0.d.ts +547 -0
  38. package/dist/web-session-runtime-execution/kernel/protocol/webSessionV0.d.ts +727 -0
  39. package/dist/web-session-runtime-execution/kernel/state/injection.d.ts +28 -0
  40. package/dist/web-session-runtime-execution/kernel/state/ports.d.ts +67 -0
  41. package/dist/web-session-runtime-execution/shared/ProductDefinition.d.ts +47 -0
  42. package/dist/web-session-runtime-execution/shared/agentRoleTemplates.d.ts +44 -0
  43. package/dist/web-session-runtime-execution/shared/agentSwarmsEnabled.d.ts +5 -0
  44. package/dist/web-session-runtime-execution/shared/boundedImageRead.d.ts +31 -0
  45. package/dist/web-session-runtime-execution/shared/circular-buffer.d.ts +42 -0
  46. package/dist/web-session-runtime-execution/shared/configDir.d.ts +57 -0
  47. package/dist/web-session-runtime-execution/shared/constants.d.ts +19 -0
  48. package/dist/web-session-runtime-execution/shared/debug.d.ts +32 -0
  49. package/dist/web-session-runtime-execution/shared/env.d.ts +38 -0
  50. package/dist/web-session-runtime-execution/shared/errors.d.ts +56 -0
  51. package/dist/web-session-runtime-execution/shared/feature.d.ts +25 -0
  52. package/dist/web-session-runtime-execution/shared/format.d.ts +11 -0
  53. package/dist/web-session-runtime-execution/shared/fs-operations.d.ts +116 -0
  54. package/dist/web-session-runtime-execution/shared/hash.d.ts +13 -0
  55. package/dist/web-session-runtime-execution/shared/identity.d.ts +23 -0
  56. package/dist/web-session-runtime-execution/shared/index.d.ts +46 -0
  57. package/dist/web-session-runtime-execution/shared/lazySchema.d.ts +12 -0
  58. package/dist/web-session-runtime-execution/shared/log.d.ts +1 -0
  59. package/dist/web-session-runtime-execution/shared/path.d.ts +22 -0
  60. package/dist/web-session-runtime-execution/shared/pdfPageImages.d.ts +19 -0
  61. package/dist/web-session-runtime-execution/shared/pdfReference.d.ts +70 -0
  62. package/dist/web-session-runtime-execution/shared/permissionDeadline.d.ts +24 -0
  63. package/dist/web-session-runtime-execution/shared/platform.d.ts +8 -0
  64. package/dist/web-session-runtime-execution/shared/stringUtils.d.ts +110 -0
  65. package/dist/web-session-runtime-execution/shared/swarmSchemaFilter.d.ts +23 -0
  66. package/dist/web-session-runtime-execution/shared/teamFileSchema.d.ts +151 -0
  67. package/dist/web-session-runtime-execution/shared/teamInboxSchema.d.ts +112 -0
  68. package/dist/web-session-runtime-execution/shared/teammateContext.d.ts +89 -0
  69. package/dist/web-session-runtime-execution/shared/tempDir.d.ts +1 -0
  70. package/dist/web-session-runtime-execution/shared/textEncoding.d.ts +41 -0
  71. package/dist/web-session-runtime-execution/shared/tokenEstimation.d.ts +36 -0
  72. package/dist/web-session-runtime-execution/shared/types-session.d.ts +266 -0
  73. package/dist/web-session-runtime-execution/shared/types.d.ts +190 -0
  74. package/dist/web-session-runtime-execution/shared/unc.d.ts +5 -0
  75. package/dist/web-session-runtime-execution/shared/windowsPaths.d.ts +24 -0
  76. package/package.json +11 -4
@@ -0,0 +1,727 @@
1
+ /**
2
+ * Web session contract v0 —— S0-U 单源公共契约(0.1.115 候 U-1)。
3
+ * 呈批书 docs/2026-11-15-s0-ur-lockface-brief.md §7.2(f4 批复 2026-11-15 @f1f1099d);
4
+ * 工单 docs/2026-11-15-atlasweb-s0-upstream-delivery-ticket.md §3.2。
5
+ *
6
+ * 本文件为公开库出口(./web-contract)的唯一源:
7
+ * - import 面 = zod/v4 唯一(格 C 闭包;与内核 schema 主域同版);零仓库内 /
8
+ * Node 内建 / UI 反向导入——浏览器 ESM 与 d.ts 闭包均由该单文件构成。
9
+ * - Code-neutral 词汇审计格锁定本源(tests/unit/web-session-v0-contract.test.ts
10
+ * 格 C):禁品牌串与宿主产品专有词汇;中立活动块 = {kind:'activity',label,status?}。
11
+ * - strict 形:所有对象 schema 用 strictObject(未知字段拒);ID 非空 ≤128 的
12
+ * opaque 串,不作盘路径;requestId 每操作 UUID;generation 为运行方生成的不
13
+ * 透明 UUID epoch。
14
+ * - 协议版本分域:schemaVersion=0(消息形)/ protocolVersion='v0'(配对清单
15
+ * 域,S0-P manifest 绑定面),两者数值不混用。
16
+ * - 时间与计数未知须显式 null(禁止捏造);updatedAt 必填(列表排序键,无时间
17
+ * 戳的会话不可列出)。
18
+ * - 投影 = 完整有效会话语义(truncated 恒 false);超预算走 resourceLimit 错误,
19
+ * 首车零隐式截断(工单 §3.2)。
20
+ */
21
+ import { z } from 'zod/v4';
22
+ export declare const WEB_SESSION_SCHEMA_VERSION = 0;
23
+ export declare const WEB_SESSION_PROTOCOL_VERSION = "v0";
24
+ /** 非空 ≤128 的 opaque 标识;不作盘路径(工单 §3.2)。 */
25
+ export declare const OpaqueIdSchema: z.ZodString;
26
+ /** Opaque 游标/分页 token;运行方账本持有,消费者不可解析。上界 512 为锁面卫生值。 */
27
+ export declare const OpaqueTokenSchema: z.ZodString;
28
+ export declare const ListSessionsRequestSchema: z.ZodObject<{
29
+ pageSize: z.ZodOptional<z.ZodNumber>;
30
+ pageToken: z.ZodOptional<z.ZodString>;
31
+ kind: z.ZodLiteral<"listSessions">;
32
+ schemaVersion: z.ZodLiteral<0>;
33
+ requestId: z.ZodUUID;
34
+ productId: z.ZodString;
35
+ scopeId: z.ZodString;
36
+ }, z.core.$strict>;
37
+ export declare const SearchSessionsRequestSchema: z.ZodObject<{
38
+ pageSize: z.ZodOptional<z.ZodNumber>;
39
+ pageToken: z.ZodOptional<z.ZodString>;
40
+ kind: z.ZodLiteral<"searchSessions">;
41
+ query: z.ZodString;
42
+ schemaVersion: z.ZodLiteral<0>;
43
+ requestId: z.ZodUUID;
44
+ productId: z.ZodString;
45
+ scopeId: z.ZodString;
46
+ }, z.core.$strict>;
47
+ export declare const ReplaySessionRequestSchema: z.ZodObject<{
48
+ kind: z.ZodLiteral<"replaySession">;
49
+ sessionId: z.ZodString;
50
+ schemaVersion: z.ZodLiteral<0>;
51
+ requestId: z.ZodUUID;
52
+ productId: z.ZodString;
53
+ scopeId: z.ZodString;
54
+ }, z.core.$strict>;
55
+ export declare const FollowSessionRequestSchema: z.ZodObject<{
56
+ kind: z.ZodLiteral<"followSession">;
57
+ sessionId: z.ZodString;
58
+ resumeCursor: z.ZodOptional<z.ZodString>;
59
+ schemaVersion: z.ZodLiteral<0>;
60
+ requestId: z.ZodUUID;
61
+ productId: z.ZodString;
62
+ scopeId: z.ZodString;
63
+ }, z.core.$strict>;
64
+ /** 控制面取消:只取消读取/订阅操作本身,不触及宿主产品任何执行面。 */
65
+ export declare const CancelRequestSchema: z.ZodObject<{
66
+ kind: z.ZodLiteral<"cancel">;
67
+ targetRequestId: z.ZodString;
68
+ schemaVersion: z.ZodLiteral<0>;
69
+ requestId: z.ZodUUID;
70
+ productId: z.ZodString;
71
+ scopeId: z.ZodString;
72
+ }, z.core.$strict>;
73
+ export declare const UnsubscribeRequestSchema: z.ZodObject<{
74
+ kind: z.ZodLiteral<"unsubscribe">;
75
+ subscriptionId: z.ZodString;
76
+ schemaVersion: z.ZodLiteral<0>;
77
+ requestId: z.ZodUUID;
78
+ productId: z.ZodString;
79
+ scopeId: z.ZodString;
80
+ }, z.core.$strict>;
81
+ export declare const WebSessionRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
82
+ pageSize: z.ZodOptional<z.ZodNumber>;
83
+ pageToken: z.ZodOptional<z.ZodString>;
84
+ kind: z.ZodLiteral<"listSessions">;
85
+ schemaVersion: z.ZodLiteral<0>;
86
+ requestId: z.ZodUUID;
87
+ productId: z.ZodString;
88
+ scopeId: z.ZodString;
89
+ }, z.core.$strict>, z.ZodObject<{
90
+ pageSize: z.ZodOptional<z.ZodNumber>;
91
+ pageToken: z.ZodOptional<z.ZodString>;
92
+ kind: z.ZodLiteral<"searchSessions">;
93
+ query: z.ZodString;
94
+ schemaVersion: z.ZodLiteral<0>;
95
+ requestId: z.ZodUUID;
96
+ productId: z.ZodString;
97
+ scopeId: z.ZodString;
98
+ }, z.core.$strict>, z.ZodObject<{
99
+ kind: z.ZodLiteral<"replaySession">;
100
+ sessionId: z.ZodString;
101
+ schemaVersion: z.ZodLiteral<0>;
102
+ requestId: z.ZodUUID;
103
+ productId: z.ZodString;
104
+ scopeId: z.ZodString;
105
+ }, z.core.$strict>, z.ZodObject<{
106
+ kind: z.ZodLiteral<"followSession">;
107
+ sessionId: z.ZodString;
108
+ resumeCursor: z.ZodOptional<z.ZodString>;
109
+ schemaVersion: z.ZodLiteral<0>;
110
+ requestId: z.ZodUUID;
111
+ productId: z.ZodString;
112
+ scopeId: z.ZodString;
113
+ }, z.core.$strict>, z.ZodObject<{
114
+ kind: z.ZodLiteral<"cancel">;
115
+ targetRequestId: z.ZodString;
116
+ schemaVersion: z.ZodLiteral<0>;
117
+ requestId: z.ZodUUID;
118
+ productId: z.ZodString;
119
+ scopeId: z.ZodString;
120
+ }, z.core.$strict>, z.ZodObject<{
121
+ kind: z.ZodLiteral<"unsubscribe">;
122
+ subscriptionId: z.ZodString;
123
+ schemaVersion: z.ZodLiteral<0>;
124
+ requestId: z.ZodUUID;
125
+ productId: z.ZodString;
126
+ scopeId: z.ZodString;
127
+ }, z.core.$strict>], "kind">;
128
+ export declare const TextBlockSchema: z.ZodObject<{
129
+ kind: z.ZodLiteral<"text">;
130
+ text: z.ZodString;
131
+ }, z.core.$strict>;
132
+ /** 中立活动块:宿主产品专有结构经适配层映射至此;未知内容 label='unsupported'。 */
133
+ export declare const ActivityBlockSchema: z.ZodObject<{
134
+ kind: z.ZodLiteral<"activity">;
135
+ label: z.ZodString;
136
+ status: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strict>;
138
+ export declare const BlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
139
+ kind: z.ZodLiteral<"text">;
140
+ text: z.ZodString;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ kind: z.ZodLiteral<"activity">;
143
+ label: z.ZodString;
144
+ status: z.ZodOptional<z.ZodString>;
145
+ }, z.core.$strict>], "kind">;
146
+ export declare const ProjectionMessageSchema: z.ZodObject<{
147
+ id: z.ZodString;
148
+ role: z.ZodEnum<{
149
+ user: "user";
150
+ assistant: "assistant";
151
+ system: "system";
152
+ }>;
153
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
154
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
155
+ kind: z.ZodLiteral<"text">;
156
+ text: z.ZodString;
157
+ }, z.core.$strict>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"activity">;
159
+ label: z.ZodString;
160
+ status: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strict>], "kind">>;
162
+ }, z.core.$strict>;
163
+ export declare const ProjectionSchema: z.ZodObject<{
164
+ sessionId: z.ZodString;
165
+ productId: z.ZodString;
166
+ scopeId: z.ZodString;
167
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
168
+ messages: z.ZodArray<z.ZodObject<{
169
+ id: z.ZodString;
170
+ role: z.ZodEnum<{
171
+ user: "user";
172
+ assistant: "assistant";
173
+ system: "system";
174
+ }>;
175
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
176
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
177
+ kind: z.ZodLiteral<"text">;
178
+ text: z.ZodString;
179
+ }, z.core.$strict>, z.ZodObject<{
180
+ kind: z.ZodLiteral<"activity">;
181
+ label: z.ZodString;
182
+ status: z.ZodOptional<z.ZodString>;
183
+ }, z.core.$strict>], "kind">>;
184
+ }, z.core.$strict>>;
185
+ truncated: z.ZodLiteral<false>;
186
+ }, z.core.$strict>;
187
+ export declare const SessionSummarySchema: z.ZodObject<{
188
+ sessionId: z.ZodString;
189
+ title: z.ZodNullable<z.ZodString>;
190
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
191
+ updatedAt: z.ZodISODateTime;
192
+ messageCount: z.ZodNullable<z.ZodNumber>;
193
+ productId: z.ZodString;
194
+ scopeId: z.ZodString;
195
+ }, z.core.$strict>;
196
+ export declare const SearchResultSchema: z.ZodObject<{
197
+ sessionId: z.ZodString;
198
+ messageId: z.ZodString;
199
+ snippet: z.ZodString;
200
+ }, z.core.$strict>;
201
+ export declare const UnsupportedSchemaErrorSchema: z.ZodObject<{
202
+ message: z.ZodString;
203
+ code: z.ZodLiteral<"unsupportedSchema">;
204
+ }, z.core.$strict>;
205
+ export declare const InvalidRequestErrorSchema: z.ZodObject<{
206
+ message: z.ZodString;
207
+ code: z.ZodLiteral<"invalidRequest">;
208
+ }, z.core.$strict>;
209
+ export declare const ScopeDeniedErrorSchema: z.ZodObject<{
210
+ message: z.ZodString;
211
+ code: z.ZodLiteral<"scopeDenied">;
212
+ }, z.core.$strict>;
213
+ export declare const NotFoundErrorSchema: z.ZodObject<{
214
+ message: z.ZodString;
215
+ code: z.ZodLiteral<"notFound">;
216
+ }, z.core.$strict>;
217
+ export declare const CorruptDataErrorSchema: z.ZodObject<{
218
+ message: z.ZodString;
219
+ code: z.ZodLiteral<"corruptData">;
220
+ }, z.core.$strict>;
221
+ export declare const IoUnavailableErrorSchema: z.ZodObject<{
222
+ retryable: z.ZodBoolean;
223
+ message: z.ZodString;
224
+ code: z.ZodLiteral<"ioUnavailable">;
225
+ }, z.core.$strict>;
226
+ export declare const CursorExpiredErrorSchema: z.ZodObject<{
227
+ message: z.ZodString;
228
+ code: z.ZodLiteral<"cursorExpired">;
229
+ }, z.core.$strict>;
230
+ export declare const ResourceLimitErrorSchema: z.ZodObject<{
231
+ message: z.ZodString;
232
+ code: z.ZodLiteral<"resourceLimit">;
233
+ }, z.core.$strict>;
234
+ export declare const CancelledErrorSchema: z.ZodObject<{
235
+ message: z.ZodString;
236
+ code: z.ZodLiteral<"cancelled">;
237
+ }, z.core.$strict>;
238
+ export declare const ClosedErrorSchema: z.ZodObject<{
239
+ message: z.ZodString;
240
+ code: z.ZodLiteral<"closed">;
241
+ }, z.core.$strict>;
242
+ export declare const WebSessionErrorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
243
+ message: z.ZodString;
244
+ code: z.ZodLiteral<"unsupportedSchema">;
245
+ }, z.core.$strict>, z.ZodObject<{
246
+ message: z.ZodString;
247
+ code: z.ZodLiteral<"invalidRequest">;
248
+ }, z.core.$strict>, z.ZodObject<{
249
+ message: z.ZodString;
250
+ code: z.ZodLiteral<"scopeDenied">;
251
+ }, z.core.$strict>, z.ZodObject<{
252
+ message: z.ZodString;
253
+ code: z.ZodLiteral<"notFound">;
254
+ }, z.core.$strict>, z.ZodObject<{
255
+ message: z.ZodString;
256
+ code: z.ZodLiteral<"corruptData">;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ retryable: z.ZodBoolean;
259
+ message: z.ZodString;
260
+ code: z.ZodLiteral<"ioUnavailable">;
261
+ }, z.core.$strict>, z.ZodObject<{
262
+ message: z.ZodString;
263
+ code: z.ZodLiteral<"cursorExpired">;
264
+ }, z.core.$strict>, z.ZodObject<{
265
+ message: z.ZodString;
266
+ code: z.ZodLiteral<"resourceLimit">;
267
+ }, z.core.$strict>, z.ZodObject<{
268
+ message: z.ZodString;
269
+ code: z.ZodLiteral<"cancelled">;
270
+ }, z.core.$strict>, z.ZodObject<{
271
+ message: z.ZodString;
272
+ code: z.ZodLiteral<"closed">;
273
+ }, z.core.$strict>], "code">;
274
+ export declare const ListSessionsSuccessSchema: z.ZodObject<{
275
+ of: z.ZodLiteral<"listSessions">;
276
+ sessions: z.ZodArray<z.ZodObject<{
277
+ sessionId: z.ZodString;
278
+ title: z.ZodNullable<z.ZodString>;
279
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
280
+ updatedAt: z.ZodISODateTime;
281
+ messageCount: z.ZodNullable<z.ZodNumber>;
282
+ productId: z.ZodString;
283
+ scopeId: z.ZodString;
284
+ }, z.core.$strict>>;
285
+ nextPageToken: z.ZodOptional<z.ZodString>;
286
+ schemaVersion: z.ZodLiteral<0>;
287
+ requestId: z.ZodUUID;
288
+ productId: z.ZodString;
289
+ scopeId: z.ZodString;
290
+ kind: z.ZodLiteral<"response">;
291
+ }, z.core.$strict>;
292
+ export declare const SearchSessionsSuccessSchema: z.ZodObject<{
293
+ of: z.ZodLiteral<"searchSessions">;
294
+ results: z.ZodArray<z.ZodObject<{
295
+ sessionId: z.ZodString;
296
+ messageId: z.ZodString;
297
+ snippet: z.ZodString;
298
+ }, z.core.$strict>>;
299
+ nextPageToken: z.ZodOptional<z.ZodString>;
300
+ schemaVersion: z.ZodLiteral<0>;
301
+ requestId: z.ZodUUID;
302
+ productId: z.ZodString;
303
+ scopeId: z.ZodString;
304
+ kind: z.ZodLiteral<"response">;
305
+ }, z.core.$strict>;
306
+ export declare const ReplaySessionSuccessSchema: z.ZodObject<{
307
+ of: z.ZodLiteral<"replaySession">;
308
+ projection: z.ZodObject<{
309
+ sessionId: z.ZodString;
310
+ productId: z.ZodString;
311
+ scopeId: z.ZodString;
312
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
313
+ messages: z.ZodArray<z.ZodObject<{
314
+ id: z.ZodString;
315
+ role: z.ZodEnum<{
316
+ user: "user";
317
+ assistant: "assistant";
318
+ system: "system";
319
+ }>;
320
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
321
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
322
+ kind: z.ZodLiteral<"text">;
323
+ text: z.ZodString;
324
+ }, z.core.$strict>, z.ZodObject<{
325
+ kind: z.ZodLiteral<"activity">;
326
+ label: z.ZodString;
327
+ status: z.ZodOptional<z.ZodString>;
328
+ }, z.core.$strict>], "kind">>;
329
+ }, z.core.$strict>>;
330
+ truncated: z.ZodLiteral<false>;
331
+ }, z.core.$strict>;
332
+ schemaVersion: z.ZodLiteral<0>;
333
+ requestId: z.ZodUUID;
334
+ productId: z.ZodString;
335
+ scopeId: z.ZodString;
336
+ kind: z.ZodLiteral<"response">;
337
+ }, z.core.$strict>;
338
+ export declare const FollowSessionSuccessSchema: z.ZodObject<{
339
+ of: z.ZodLiteral<"followSession">;
340
+ subscriptionId: z.ZodString;
341
+ cursor: z.ZodOptional<z.ZodString>;
342
+ schemaVersion: z.ZodLiteral<0>;
343
+ requestId: z.ZodUUID;
344
+ productId: z.ZodString;
345
+ scopeId: z.ZodString;
346
+ kind: z.ZodLiteral<"response">;
347
+ }, z.core.$strict>;
348
+ export declare const WebSessionSuccessSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
349
+ of: z.ZodLiteral<"listSessions">;
350
+ sessions: z.ZodArray<z.ZodObject<{
351
+ sessionId: z.ZodString;
352
+ title: z.ZodNullable<z.ZodString>;
353
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
354
+ updatedAt: z.ZodISODateTime;
355
+ messageCount: z.ZodNullable<z.ZodNumber>;
356
+ productId: z.ZodString;
357
+ scopeId: z.ZodString;
358
+ }, z.core.$strict>>;
359
+ nextPageToken: z.ZodOptional<z.ZodString>;
360
+ schemaVersion: z.ZodLiteral<0>;
361
+ requestId: z.ZodUUID;
362
+ productId: z.ZodString;
363
+ scopeId: z.ZodString;
364
+ kind: z.ZodLiteral<"response">;
365
+ }, z.core.$strict>, z.ZodObject<{
366
+ of: z.ZodLiteral<"searchSessions">;
367
+ results: z.ZodArray<z.ZodObject<{
368
+ sessionId: z.ZodString;
369
+ messageId: z.ZodString;
370
+ snippet: z.ZodString;
371
+ }, z.core.$strict>>;
372
+ nextPageToken: z.ZodOptional<z.ZodString>;
373
+ schemaVersion: z.ZodLiteral<0>;
374
+ requestId: z.ZodUUID;
375
+ productId: z.ZodString;
376
+ scopeId: z.ZodString;
377
+ kind: z.ZodLiteral<"response">;
378
+ }, z.core.$strict>, z.ZodObject<{
379
+ of: z.ZodLiteral<"replaySession">;
380
+ projection: z.ZodObject<{
381
+ sessionId: z.ZodString;
382
+ productId: z.ZodString;
383
+ scopeId: z.ZodString;
384
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
385
+ messages: z.ZodArray<z.ZodObject<{
386
+ id: z.ZodString;
387
+ role: z.ZodEnum<{
388
+ user: "user";
389
+ assistant: "assistant";
390
+ system: "system";
391
+ }>;
392
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
393
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
394
+ kind: z.ZodLiteral<"text">;
395
+ text: z.ZodString;
396
+ }, z.core.$strict>, z.ZodObject<{
397
+ kind: z.ZodLiteral<"activity">;
398
+ label: z.ZodString;
399
+ status: z.ZodOptional<z.ZodString>;
400
+ }, z.core.$strict>], "kind">>;
401
+ }, z.core.$strict>>;
402
+ truncated: z.ZodLiteral<false>;
403
+ }, z.core.$strict>;
404
+ schemaVersion: z.ZodLiteral<0>;
405
+ requestId: z.ZodUUID;
406
+ productId: z.ZodString;
407
+ scopeId: z.ZodString;
408
+ kind: z.ZodLiteral<"response">;
409
+ }, z.core.$strict>, z.ZodObject<{
410
+ of: z.ZodLiteral<"followSession">;
411
+ subscriptionId: z.ZodString;
412
+ cursor: z.ZodOptional<z.ZodString>;
413
+ schemaVersion: z.ZodLiteral<0>;
414
+ requestId: z.ZodUUID;
415
+ productId: z.ZodString;
416
+ scopeId: z.ZodString;
417
+ kind: z.ZodLiteral<"response">;
418
+ }, z.core.$strict>], "of">;
419
+ export declare const WebSessionErrorResponseSchema: z.ZodObject<{
420
+ schemaVersion: z.ZodLiteral<0>;
421
+ requestId: z.ZodUUID;
422
+ productId: z.ZodString;
423
+ scopeId: z.ZodString;
424
+ kind: z.ZodLiteral<"error">;
425
+ error: z.ZodDiscriminatedUnion<[z.ZodObject<{
426
+ message: z.ZodString;
427
+ code: z.ZodLiteral<"unsupportedSchema">;
428
+ }, z.core.$strict>, z.ZodObject<{
429
+ message: z.ZodString;
430
+ code: z.ZodLiteral<"invalidRequest">;
431
+ }, z.core.$strict>, z.ZodObject<{
432
+ message: z.ZodString;
433
+ code: z.ZodLiteral<"scopeDenied">;
434
+ }, z.core.$strict>, z.ZodObject<{
435
+ message: z.ZodString;
436
+ code: z.ZodLiteral<"notFound">;
437
+ }, z.core.$strict>, z.ZodObject<{
438
+ message: z.ZodString;
439
+ code: z.ZodLiteral<"corruptData">;
440
+ }, z.core.$strict>, z.ZodObject<{
441
+ retryable: z.ZodBoolean;
442
+ message: z.ZodString;
443
+ code: z.ZodLiteral<"ioUnavailable">;
444
+ }, z.core.$strict>, z.ZodObject<{
445
+ message: z.ZodString;
446
+ code: z.ZodLiteral<"cursorExpired">;
447
+ }, z.core.$strict>, z.ZodObject<{
448
+ message: z.ZodString;
449
+ code: z.ZodLiteral<"resourceLimit">;
450
+ }, z.core.$strict>, z.ZodObject<{
451
+ message: z.ZodString;
452
+ code: z.ZodLiteral<"cancelled">;
453
+ }, z.core.$strict>, z.ZodObject<{
454
+ message: z.ZodString;
455
+ code: z.ZodLiteral<"closed">;
456
+ }, z.core.$strict>], "code">;
457
+ }, z.core.$strict>;
458
+ export declare const BaselineEventSchema: z.ZodObject<{
459
+ kind: z.ZodLiteral<"baseline">;
460
+ generation: z.ZodUUID;
461
+ baselineId: z.ZodUUID;
462
+ revision: z.ZodNumber;
463
+ cursor: z.ZodString;
464
+ projection: z.ZodObject<{
465
+ sessionId: z.ZodString;
466
+ productId: z.ZodString;
467
+ scopeId: z.ZodString;
468
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
469
+ messages: z.ZodArray<z.ZodObject<{
470
+ id: z.ZodString;
471
+ role: z.ZodEnum<{
472
+ user: "user";
473
+ assistant: "assistant";
474
+ system: "system";
475
+ }>;
476
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
477
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
478
+ kind: z.ZodLiteral<"text">;
479
+ text: z.ZodString;
480
+ }, z.core.$strict>, z.ZodObject<{
481
+ kind: z.ZodLiteral<"activity">;
482
+ label: z.ZodString;
483
+ status: z.ZodOptional<z.ZodString>;
484
+ }, z.core.$strict>], "kind">>;
485
+ }, z.core.$strict>>;
486
+ truncated: z.ZodLiteral<false>;
487
+ }, z.core.$strict>;
488
+ schemaVersion: z.ZodLiteral<0>;
489
+ productId: z.ZodString;
490
+ scopeId: z.ZodString;
491
+ subscriptionId: z.ZodString;
492
+ requestId: z.ZodOptional<z.ZodString>;
493
+ }, z.core.$strict>;
494
+ export declare const ReplacementEventSchema: z.ZodObject<{
495
+ kind: z.ZodLiteral<"replacement">;
496
+ generation: z.ZodUUID;
497
+ baselineId: z.ZodUUID;
498
+ revision: z.ZodNumber;
499
+ cursor: z.ZodString;
500
+ projection: z.ZodObject<{
501
+ sessionId: z.ZodString;
502
+ productId: z.ZodString;
503
+ scopeId: z.ZodString;
504
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
505
+ messages: z.ZodArray<z.ZodObject<{
506
+ id: z.ZodString;
507
+ role: z.ZodEnum<{
508
+ user: "user";
509
+ assistant: "assistant";
510
+ system: "system";
511
+ }>;
512
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
513
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
514
+ kind: z.ZodLiteral<"text">;
515
+ text: z.ZodString;
516
+ }, z.core.$strict>, z.ZodObject<{
517
+ kind: z.ZodLiteral<"activity">;
518
+ label: z.ZodString;
519
+ status: z.ZodOptional<z.ZodString>;
520
+ }, z.core.$strict>], "kind">>;
521
+ }, z.core.$strict>>;
522
+ truncated: z.ZodLiteral<false>;
523
+ }, z.core.$strict>;
524
+ schemaVersion: z.ZodLiteral<0>;
525
+ productId: z.ZodString;
526
+ scopeId: z.ZodString;
527
+ subscriptionId: z.ZodString;
528
+ requestId: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strict>;
530
+ export declare const ResetRequiredEventSchema: z.ZodObject<{
531
+ kind: z.ZodLiteral<"resetRequired">;
532
+ generation: z.ZodUUID;
533
+ reason: z.ZodString;
534
+ schemaVersion: z.ZodLiteral<0>;
535
+ productId: z.ZodString;
536
+ scopeId: z.ZodString;
537
+ subscriptionId: z.ZodString;
538
+ requestId: z.ZodOptional<z.ZodString>;
539
+ }, z.core.$strict>;
540
+ export declare const ErrorEventSchema: z.ZodObject<{
541
+ kind: z.ZodLiteral<"error">;
542
+ error: z.ZodDiscriminatedUnion<[z.ZodObject<{
543
+ message: z.ZodString;
544
+ code: z.ZodLiteral<"unsupportedSchema">;
545
+ }, z.core.$strict>, z.ZodObject<{
546
+ message: z.ZodString;
547
+ code: z.ZodLiteral<"invalidRequest">;
548
+ }, z.core.$strict>, z.ZodObject<{
549
+ message: z.ZodString;
550
+ code: z.ZodLiteral<"scopeDenied">;
551
+ }, z.core.$strict>, z.ZodObject<{
552
+ message: z.ZodString;
553
+ code: z.ZodLiteral<"notFound">;
554
+ }, z.core.$strict>, z.ZodObject<{
555
+ message: z.ZodString;
556
+ code: z.ZodLiteral<"corruptData">;
557
+ }, z.core.$strict>, z.ZodObject<{
558
+ retryable: z.ZodBoolean;
559
+ message: z.ZodString;
560
+ code: z.ZodLiteral<"ioUnavailable">;
561
+ }, z.core.$strict>, z.ZodObject<{
562
+ message: z.ZodString;
563
+ code: z.ZodLiteral<"cursorExpired">;
564
+ }, z.core.$strict>, z.ZodObject<{
565
+ message: z.ZodString;
566
+ code: z.ZodLiteral<"resourceLimit">;
567
+ }, z.core.$strict>, z.ZodObject<{
568
+ message: z.ZodString;
569
+ code: z.ZodLiteral<"cancelled">;
570
+ }, z.core.$strict>, z.ZodObject<{
571
+ message: z.ZodString;
572
+ code: z.ZodLiteral<"closed">;
573
+ }, z.core.$strict>], "code">;
574
+ schemaVersion: z.ZodLiteral<0>;
575
+ productId: z.ZodString;
576
+ scopeId: z.ZodString;
577
+ subscriptionId: z.ZodString;
578
+ requestId: z.ZodOptional<z.ZodString>;
579
+ }, z.core.$strict>;
580
+ export declare const ClosedEventSchema: z.ZodObject<{
581
+ kind: z.ZodLiteral<"closed">;
582
+ reason: z.ZodOptional<z.ZodString>;
583
+ schemaVersion: z.ZodLiteral<0>;
584
+ productId: z.ZodString;
585
+ scopeId: z.ZodString;
586
+ subscriptionId: z.ZodString;
587
+ requestId: z.ZodOptional<z.ZodString>;
588
+ }, z.core.$strict>;
589
+ export declare const WebSessionEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
590
+ kind: z.ZodLiteral<"baseline">;
591
+ generation: z.ZodUUID;
592
+ baselineId: z.ZodUUID;
593
+ revision: z.ZodNumber;
594
+ cursor: z.ZodString;
595
+ projection: z.ZodObject<{
596
+ sessionId: z.ZodString;
597
+ productId: z.ZodString;
598
+ scopeId: z.ZodString;
599
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
600
+ messages: z.ZodArray<z.ZodObject<{
601
+ id: z.ZodString;
602
+ role: z.ZodEnum<{
603
+ user: "user";
604
+ assistant: "assistant";
605
+ system: "system";
606
+ }>;
607
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
608
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
609
+ kind: z.ZodLiteral<"text">;
610
+ text: z.ZodString;
611
+ }, z.core.$strict>, z.ZodObject<{
612
+ kind: z.ZodLiteral<"activity">;
613
+ label: z.ZodString;
614
+ status: z.ZodOptional<z.ZodString>;
615
+ }, z.core.$strict>], "kind">>;
616
+ }, z.core.$strict>>;
617
+ truncated: z.ZodLiteral<false>;
618
+ }, z.core.$strict>;
619
+ schemaVersion: z.ZodLiteral<0>;
620
+ productId: z.ZodString;
621
+ scopeId: z.ZodString;
622
+ subscriptionId: z.ZodString;
623
+ requestId: z.ZodOptional<z.ZodString>;
624
+ }, z.core.$strict>, z.ZodObject<{
625
+ kind: z.ZodLiteral<"replacement">;
626
+ generation: z.ZodUUID;
627
+ baselineId: z.ZodUUID;
628
+ revision: z.ZodNumber;
629
+ cursor: z.ZodString;
630
+ projection: z.ZodObject<{
631
+ sessionId: z.ZodString;
632
+ productId: z.ZodString;
633
+ scopeId: z.ZodString;
634
+ semantics: z.ZodLiteral<"persisted-effective-conversation">;
635
+ messages: z.ZodArray<z.ZodObject<{
636
+ id: z.ZodString;
637
+ role: z.ZodEnum<{
638
+ user: "user";
639
+ assistant: "assistant";
640
+ system: "system";
641
+ }>;
642
+ createdAt: z.ZodNullable<z.ZodISODateTime>;
643
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
644
+ kind: z.ZodLiteral<"text">;
645
+ text: z.ZodString;
646
+ }, z.core.$strict>, z.ZodObject<{
647
+ kind: z.ZodLiteral<"activity">;
648
+ label: z.ZodString;
649
+ status: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strict>], "kind">>;
651
+ }, z.core.$strict>>;
652
+ truncated: z.ZodLiteral<false>;
653
+ }, z.core.$strict>;
654
+ schemaVersion: z.ZodLiteral<0>;
655
+ productId: z.ZodString;
656
+ scopeId: z.ZodString;
657
+ subscriptionId: z.ZodString;
658
+ requestId: z.ZodOptional<z.ZodString>;
659
+ }, z.core.$strict>, z.ZodObject<{
660
+ kind: z.ZodLiteral<"resetRequired">;
661
+ generation: z.ZodUUID;
662
+ reason: z.ZodString;
663
+ schemaVersion: z.ZodLiteral<0>;
664
+ productId: z.ZodString;
665
+ scopeId: z.ZodString;
666
+ subscriptionId: z.ZodString;
667
+ requestId: z.ZodOptional<z.ZodString>;
668
+ }, z.core.$strict>, z.ZodObject<{
669
+ kind: z.ZodLiteral<"error">;
670
+ error: z.ZodDiscriminatedUnion<[z.ZodObject<{
671
+ message: z.ZodString;
672
+ code: z.ZodLiteral<"unsupportedSchema">;
673
+ }, z.core.$strict>, z.ZodObject<{
674
+ message: z.ZodString;
675
+ code: z.ZodLiteral<"invalidRequest">;
676
+ }, z.core.$strict>, z.ZodObject<{
677
+ message: z.ZodString;
678
+ code: z.ZodLiteral<"scopeDenied">;
679
+ }, z.core.$strict>, z.ZodObject<{
680
+ message: z.ZodString;
681
+ code: z.ZodLiteral<"notFound">;
682
+ }, z.core.$strict>, z.ZodObject<{
683
+ message: z.ZodString;
684
+ code: z.ZodLiteral<"corruptData">;
685
+ }, z.core.$strict>, z.ZodObject<{
686
+ retryable: z.ZodBoolean;
687
+ message: z.ZodString;
688
+ code: z.ZodLiteral<"ioUnavailable">;
689
+ }, z.core.$strict>, z.ZodObject<{
690
+ message: z.ZodString;
691
+ code: z.ZodLiteral<"cursorExpired">;
692
+ }, z.core.$strict>, z.ZodObject<{
693
+ message: z.ZodString;
694
+ code: z.ZodLiteral<"resourceLimit">;
695
+ }, z.core.$strict>, z.ZodObject<{
696
+ message: z.ZodString;
697
+ code: z.ZodLiteral<"cancelled">;
698
+ }, z.core.$strict>, z.ZodObject<{
699
+ message: z.ZodString;
700
+ code: z.ZodLiteral<"closed">;
701
+ }, z.core.$strict>], "code">;
702
+ schemaVersion: z.ZodLiteral<0>;
703
+ productId: z.ZodString;
704
+ scopeId: z.ZodString;
705
+ subscriptionId: z.ZodString;
706
+ requestId: z.ZodOptional<z.ZodString>;
707
+ }, z.core.$strict>, z.ZodObject<{
708
+ kind: z.ZodLiteral<"closed">;
709
+ reason: z.ZodOptional<z.ZodString>;
710
+ schemaVersion: z.ZodLiteral<0>;
711
+ productId: z.ZodString;
712
+ scopeId: z.ZodString;
713
+ subscriptionId: z.ZodString;
714
+ requestId: z.ZodOptional<z.ZodString>;
715
+ }, z.core.$strict>], "kind">;
716
+ export type WebSessionOpaqueId = z.infer<typeof OpaqueIdSchema>;
717
+ export type WebSessionOpaqueToken = z.infer<typeof OpaqueTokenSchema>;
718
+ export type WebSessionRequest = z.infer<typeof WebSessionRequestSchema>;
719
+ export type WebSessionSuccess = z.infer<typeof WebSessionSuccessSchema>;
720
+ export type WebSessionErrorResponse = z.infer<typeof WebSessionErrorResponseSchema>;
721
+ export type WebSessionError = z.infer<typeof WebSessionErrorSchema>;
722
+ export type WebSessionEvent = z.infer<typeof WebSessionEventSchema>;
723
+ export type WebSessionProjection = z.infer<typeof ProjectionSchema>;
724
+ export type WebSessionProjectionMessage = z.infer<typeof ProjectionMessageSchema>;
725
+ export type WebSessionBlock = z.infer<typeof BlockSchema>;
726
+ export type WebSessionSessionSummary = z.infer<typeof SessionSummarySchema>;
727
+ export type WebSessionSearchResult = z.infer<typeof SearchResultSchema>;