@deskwork/core 0.13.0 → 0.14.0

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.
@@ -21,84 +21,84 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
21
21
  createdAt: z.ZodString;
22
22
  updatedAt: z.ZodString;
23
23
  }, "strip", z.ZodTypeAny, {
24
- source: string;
24
+ uuid: string;
25
25
  slug: string;
26
26
  title: string;
27
- uuid: string;
28
27
  keywords: string[];
28
+ source: string;
29
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
30
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
29
31
  createdAt: string;
30
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
31
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
32
32
  updatedAt: string;
33
33
  description?: string | undefined;
34
- datePublished?: string | undefined;
35
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
34
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
36
35
  reviewState?: "in-review" | "iterating" | "approved" | undefined;
37
36
  targetVersion?: string | undefined;
37
+ datePublished?: string | undefined;
38
38
  artifactPath?: string | undefined;
39
39
  shortformWorkflows?: Record<string, string> | undefined;
40
40
  }, {
41
- source: string;
41
+ uuid: string;
42
42
  slug: string;
43
43
  title: string;
44
- uuid: string;
45
44
  keywords: string[];
45
+ source: string;
46
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
47
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
46
48
  createdAt: string;
47
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
48
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
49
49
  updatedAt: string;
50
50
  description?: string | undefined;
51
- datePublished?: string | undefined;
52
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
51
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
53
52
  reviewState?: "in-review" | "iterating" | "approved" | undefined;
54
53
  targetVersion?: string | undefined;
54
+ datePublished?: string | undefined;
55
55
  artifactPath?: string | undefined;
56
56
  shortformWorkflows?: Record<string, string> | undefined;
57
57
  }>;
58
58
  }, "strip", z.ZodTypeAny, {
59
+ kind: "entry-created";
59
60
  at: string;
61
+ entryId: string;
60
62
  entry: {
61
- source: string;
63
+ uuid: string;
62
64
  slug: string;
63
65
  title: string;
64
- uuid: string;
65
66
  keywords: string[];
67
+ source: string;
68
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
69
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
66
70
  createdAt: string;
67
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
68
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
69
71
  updatedAt: string;
70
72
  description?: string | undefined;
71
- datePublished?: string | undefined;
72
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
73
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
73
74
  reviewState?: "in-review" | "iterating" | "approved" | undefined;
74
75
  targetVersion?: string | undefined;
76
+ datePublished?: string | undefined;
75
77
  artifactPath?: string | undefined;
76
78
  shortformWorkflows?: Record<string, string> | undefined;
77
79
  };
78
- kind: "entry-created";
79
- entryId: string;
80
80
  }, {
81
+ kind: "entry-created";
81
82
  at: string;
83
+ entryId: string;
82
84
  entry: {
83
- source: string;
85
+ uuid: string;
84
86
  slug: string;
85
87
  title: string;
86
- uuid: string;
87
88
  keywords: string[];
89
+ source: string;
90
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
91
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
88
92
  createdAt: string;
89
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
90
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
91
93
  updatedAt: string;
92
94
  description?: string | undefined;
93
- datePublished?: string | undefined;
94
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
95
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
95
96
  reviewState?: "in-review" | "iterating" | "approved" | undefined;
96
97
  targetVersion?: string | undefined;
98
+ datePublished?: string | undefined;
97
99
  artifactPath?: string | undefined;
98
100
  shortformWorkflows?: Record<string, string> | undefined;
99
101
  };
100
- kind: "entry-created";
101
- entryId: string;
102
102
  }>, z.ZodObject<{
103
103
  kind: z.ZodLiteral<"entry-ingested">;
104
104
  at: z.ZodString;
@@ -106,17 +106,17 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
106
106
  sourcePath: z.ZodString;
107
107
  targetStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
108
108
  }, "strip", z.ZodTypeAny, {
109
- at: string;
110
109
  kind: "entry-ingested";
110
+ at: string;
111
111
  entryId: string;
112
112
  sourcePath: string;
113
- targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
113
+ targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
114
114
  }, {
115
- at: string;
116
115
  kind: "entry-ingested";
116
+ at: string;
117
117
  entryId: string;
118
118
  sourcePath: string;
119
- targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
119
+ targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
120
120
  }>, z.ZodObject<{
121
121
  kind: z.ZodLiteral<"iteration">;
122
122
  at: z.ZodString;
@@ -125,18 +125,18 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
125
125
  version: z.ZodNumber;
126
126
  markdown: z.ZodString;
127
127
  }, "strip", z.ZodTypeAny, {
128
- at: string;
129
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
130
- version: number;
131
128
  kind: "iteration";
129
+ at: string;
132
130
  entryId: string;
131
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
132
+ version: number;
133
133
  markdown: string;
134
134
  }, {
135
- at: string;
136
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
137
- version: number;
138
135
  kind: "iteration";
136
+ at: string;
139
137
  entryId: string;
138
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
139
+ version: number;
140
140
  markdown: string;
141
141
  }>, z.ZodObject<{
142
142
  kind: z.ZodLiteral<"annotation">;
@@ -164,72 +164,72 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
164
164
  dispositionReason: z.ZodOptional<z.ZodString>;
165
165
  createdAt: z.ZodString;
166
166
  }, "strip", z.ZodTypeAny, {
167
- id: string;
168
167
  type: "comment";
169
168
  createdAt: string;
169
+ id: string;
170
170
  range: {
171
171
  start: number;
172
172
  end: number;
173
173
  };
174
174
  text: string;
175
- anchor?: string | undefined;
176
175
  category?: string | undefined;
176
+ anchor?: string | undefined;
177
177
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
178
178
  dispositionReason?: string | undefined;
179
179
  }, {
180
- id: string;
181
180
  type: "comment";
182
181
  createdAt: string;
182
+ id: string;
183
183
  range: {
184
184
  start: number;
185
185
  end: number;
186
186
  };
187
187
  text: string;
188
- anchor?: string | undefined;
189
188
  category?: string | undefined;
189
+ anchor?: string | undefined;
190
190
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
191
191
  dispositionReason?: string | undefined;
192
192
  }>;
193
193
  }, "strip", z.ZodTypeAny, {
194
+ kind: "annotation";
194
195
  at: string;
195
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
196
+ entryId: string;
197
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
196
198
  version: number;
197
199
  annotation: {
198
- id: string;
199
200
  type: "comment";
200
201
  createdAt: string;
202
+ id: string;
201
203
  range: {
202
204
  start: number;
203
205
  end: number;
204
206
  };
205
207
  text: string;
206
- anchor?: string | undefined;
207
208
  category?: string | undefined;
209
+ anchor?: string | undefined;
208
210
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
209
211
  dispositionReason?: string | undefined;
210
212
  };
211
- kind: "annotation";
212
- entryId: string;
213
213
  }, {
214
+ kind: "annotation";
214
215
  at: string;
215
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
216
+ entryId: string;
217
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
216
218
  version: number;
217
219
  annotation: {
218
- id: string;
219
220
  type: "comment";
220
221
  createdAt: string;
222
+ id: string;
221
223
  range: {
222
224
  start: number;
223
225
  end: number;
224
226
  };
225
227
  text: string;
226
- anchor?: string | undefined;
227
228
  category?: string | undefined;
229
+ anchor?: string | undefined;
228
230
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
229
231
  dispositionReason?: string | undefined;
230
232
  };
231
- kind: "annotation";
232
- entryId: string;
233
233
  }>, z.ZodObject<{
234
234
  kind: z.ZodLiteral<"review-state-change">;
235
235
  at: z.ZodString;
@@ -238,19 +238,19 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
238
238
  from: z.ZodNullable<z.ZodEnum<["in-review", "iterating", "approved"]>>;
239
239
  to: z.ZodNullable<z.ZodEnum<["in-review", "iterating", "approved"]>>;
240
240
  }, "strip", z.ZodTypeAny, {
241
- at: string;
242
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
243
241
  kind: "review-state-change";
242
+ at: string;
243
+ entryId: string;
244
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
244
245
  from: "in-review" | "iterating" | "approved" | null;
245
246
  to: "in-review" | "iterating" | "approved" | null;
246
- entryId: string;
247
247
  }, {
248
- at: string;
249
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
250
248
  kind: "review-state-change";
249
+ at: string;
250
+ entryId: string;
251
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
251
252
  from: "in-review" | "iterating" | "approved" | null;
252
253
  to: "in-review" | "iterating" | "approved" | null;
253
- entryId: string;
254
254
  }>, z.ZodObject<{
255
255
  kind: z.ZodLiteral<"stage-transition">;
256
256
  at: z.ZodString;
@@ -260,21 +260,292 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
260
260
  reason: z.ZodOptional<z.ZodString>;
261
261
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
262
  }, "strip", z.ZodTypeAny, {
263
- at: string;
264
263
  kind: "stage-transition";
265
- from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
266
- to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
264
+ at: string;
267
265
  entryId: string;
266
+ from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
267
+ to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
268
268
  reason?: string | undefined;
269
269
  metadata?: Record<string, unknown> | undefined;
270
270
  }, {
271
- at: string;
272
271
  kind: "stage-transition";
273
- from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
274
- to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
272
+ at: string;
275
273
  entryId: string;
274
+ from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
275
+ to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
276
276
  reason?: string | undefined;
277
277
  metadata?: Record<string, unknown> | undefined;
278
+ }>, z.ZodObject<{
279
+ kind: z.ZodLiteral<"entry-annotation">;
280
+ at: z.ZodString;
281
+ entryId: z.ZodString;
282
+ annotation: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
283
+ type: z.ZodLiteral<"comment">;
284
+ version: z.ZodNumber;
285
+ range: z.ZodObject<{
286
+ start: z.ZodNumber;
287
+ end: z.ZodNumber;
288
+ }, "strip", z.ZodTypeAny, {
289
+ start: number;
290
+ end: number;
291
+ }, {
292
+ start: number;
293
+ end: number;
294
+ }>;
295
+ text: z.ZodString;
296
+ category: z.ZodOptional<z.ZodEnum<["voice-drift", "missing-receipt", "tutorial-framing", "saas-vocabulary", "fake-authority", "structural", "other"]>>;
297
+ anchor: z.ZodOptional<z.ZodString>;
298
+ createdAt: z.ZodString;
299
+ workflowId: z.ZodString;
300
+ id: z.ZodString;
301
+ }, "strip", z.ZodTypeAny, {
302
+ type: "comment";
303
+ createdAt: string;
304
+ version: number;
305
+ id: string;
306
+ range: {
307
+ start: number;
308
+ end: number;
309
+ };
310
+ text: string;
311
+ workflowId: string;
312
+ category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
313
+ anchor?: string | undefined;
314
+ }, {
315
+ type: "comment";
316
+ createdAt: string;
317
+ version: number;
318
+ id: string;
319
+ range: {
320
+ start: number;
321
+ end: number;
322
+ };
323
+ text: string;
324
+ workflowId: string;
325
+ category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
326
+ anchor?: string | undefined;
327
+ }>, z.ZodObject<{
328
+ type: z.ZodLiteral<"edit">;
329
+ beforeVersion: z.ZodNumber;
330
+ afterMarkdown: z.ZodString;
331
+ diff: z.ZodString;
332
+ createdAt: z.ZodString;
333
+ workflowId: z.ZodString;
334
+ id: z.ZodString;
335
+ }, "strip", z.ZodTypeAny, {
336
+ type: "edit";
337
+ createdAt: string;
338
+ id: string;
339
+ workflowId: string;
340
+ beforeVersion: number;
341
+ afterMarkdown: string;
342
+ diff: string;
343
+ }, {
344
+ type: "edit";
345
+ createdAt: string;
346
+ id: string;
347
+ workflowId: string;
348
+ beforeVersion: number;
349
+ afterMarkdown: string;
350
+ diff: string;
351
+ }>, z.ZodObject<{
352
+ type: z.ZodLiteral<"approve">;
353
+ version: z.ZodNumber;
354
+ createdAt: z.ZodString;
355
+ workflowId: z.ZodString;
356
+ id: z.ZodString;
357
+ }, "strip", z.ZodTypeAny, {
358
+ type: "approve";
359
+ createdAt: string;
360
+ version: number;
361
+ id: string;
362
+ workflowId: string;
363
+ }, {
364
+ type: "approve";
365
+ createdAt: string;
366
+ version: number;
367
+ id: string;
368
+ workflowId: string;
369
+ }>, z.ZodObject<{
370
+ type: z.ZodLiteral<"reject">;
371
+ version: z.ZodNumber;
372
+ reason: z.ZodOptional<z.ZodString>;
373
+ createdAt: z.ZodString;
374
+ workflowId: z.ZodString;
375
+ id: z.ZodString;
376
+ }, "strip", z.ZodTypeAny, {
377
+ type: "reject";
378
+ createdAt: string;
379
+ version: number;
380
+ id: string;
381
+ workflowId: string;
382
+ reason?: string | undefined;
383
+ }, {
384
+ type: "reject";
385
+ createdAt: string;
386
+ version: number;
387
+ id: string;
388
+ workflowId: string;
389
+ reason?: string | undefined;
390
+ }>, z.ZodObject<{
391
+ type: z.ZodLiteral<"resolve">;
392
+ commentId: z.ZodString;
393
+ resolved: z.ZodBoolean;
394
+ createdAt: z.ZodString;
395
+ workflowId: z.ZodString;
396
+ id: z.ZodString;
397
+ }, "strip", z.ZodTypeAny, {
398
+ type: "resolve";
399
+ createdAt: string;
400
+ id: string;
401
+ workflowId: string;
402
+ commentId: string;
403
+ resolved: boolean;
404
+ }, {
405
+ type: "resolve";
406
+ createdAt: string;
407
+ id: string;
408
+ workflowId: string;
409
+ commentId: string;
410
+ resolved: boolean;
411
+ }>, z.ZodObject<{
412
+ type: z.ZodLiteral<"address">;
413
+ commentId: z.ZodString;
414
+ version: z.ZodNumber;
415
+ disposition: z.ZodEnum<["addressed", "deferred", "wontfix"]>;
416
+ reason: z.ZodOptional<z.ZodString>;
417
+ createdAt: z.ZodString;
418
+ workflowId: z.ZodString;
419
+ id: z.ZodString;
420
+ }, "strip", z.ZodTypeAny, {
421
+ type: "address";
422
+ createdAt: string;
423
+ version: number;
424
+ id: string;
425
+ disposition: "addressed" | "deferred" | "wontfix";
426
+ workflowId: string;
427
+ commentId: string;
428
+ reason?: string | undefined;
429
+ }, {
430
+ type: "address";
431
+ createdAt: string;
432
+ version: number;
433
+ id: string;
434
+ disposition: "addressed" | "deferred" | "wontfix";
435
+ workflowId: string;
436
+ commentId: string;
437
+ reason?: string | undefined;
438
+ }>]>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ kind: "entry-annotation";
441
+ at: string;
442
+ entryId: string;
443
+ annotation: {
444
+ type: "comment";
445
+ createdAt: string;
446
+ version: number;
447
+ id: string;
448
+ range: {
449
+ start: number;
450
+ end: number;
451
+ };
452
+ text: string;
453
+ workflowId: string;
454
+ category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
455
+ anchor?: string | undefined;
456
+ } | {
457
+ type: "edit";
458
+ createdAt: string;
459
+ id: string;
460
+ workflowId: string;
461
+ beforeVersion: number;
462
+ afterMarkdown: string;
463
+ diff: string;
464
+ } | {
465
+ type: "approve";
466
+ createdAt: string;
467
+ version: number;
468
+ id: string;
469
+ workflowId: string;
470
+ } | {
471
+ type: "reject";
472
+ createdAt: string;
473
+ version: number;
474
+ id: string;
475
+ workflowId: string;
476
+ reason?: string | undefined;
477
+ } | {
478
+ type: "resolve";
479
+ createdAt: string;
480
+ id: string;
481
+ workflowId: string;
482
+ commentId: string;
483
+ resolved: boolean;
484
+ } | {
485
+ type: "address";
486
+ createdAt: string;
487
+ version: number;
488
+ id: string;
489
+ disposition: "addressed" | "deferred" | "wontfix";
490
+ workflowId: string;
491
+ commentId: string;
492
+ reason?: string | undefined;
493
+ };
494
+ }, {
495
+ kind: "entry-annotation";
496
+ at: string;
497
+ entryId: string;
498
+ annotation: {
499
+ type: "comment";
500
+ createdAt: string;
501
+ version: number;
502
+ id: string;
503
+ range: {
504
+ start: number;
505
+ end: number;
506
+ };
507
+ text: string;
508
+ workflowId: string;
509
+ category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
510
+ anchor?: string | undefined;
511
+ } | {
512
+ type: "edit";
513
+ createdAt: string;
514
+ id: string;
515
+ workflowId: string;
516
+ beforeVersion: number;
517
+ afterMarkdown: string;
518
+ diff: string;
519
+ } | {
520
+ type: "approve";
521
+ createdAt: string;
522
+ version: number;
523
+ id: string;
524
+ workflowId: string;
525
+ } | {
526
+ type: "reject";
527
+ createdAt: string;
528
+ version: number;
529
+ id: string;
530
+ workflowId: string;
531
+ reason?: string | undefined;
532
+ } | {
533
+ type: "resolve";
534
+ createdAt: string;
535
+ id: string;
536
+ workflowId: string;
537
+ commentId: string;
538
+ resolved: boolean;
539
+ } | {
540
+ type: "address";
541
+ createdAt: string;
542
+ version: number;
543
+ id: string;
544
+ disposition: "addressed" | "deferred" | "wontfix";
545
+ workflowId: string;
546
+ commentId: string;
547
+ reason?: string | undefined;
548
+ };
278
549
  }>]>;
279
550
  export type JournalEvent = z.infer<typeof JournalEventSchema>;
280
551
  //# sourceMappingURL=journal-events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"journal-events.d.ts","sourceRoot":"","sources":["../../src/schema/journal-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2DxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"journal-events.d.ts","sourceRoot":"","sources":["../../src/schema/journal-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4ExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { EntrySchema } from "./entry.js";
3
3
  import { AnnotationSchema } from "./annotation.js";
4
+ import { DraftAnnotationSchema } from "./draft-annotation.js";
4
5
  const StageEnum = z.enum(['Ideas', 'Planned', 'Outlining', 'Drafting', 'Final', 'Published', 'Blocked', 'Cancelled']);
5
6
  const ReviewStateEnum = z.enum(['in-review', 'iterating', 'approved']);
6
7
  const EntryCreatedEvent = z.object({
@@ -49,6 +50,21 @@ const StageTransitionEvent = z.object({
49
50
  reason: z.string().optional(),
50
51
  metadata: z.record(z.string(), z.unknown()).optional(),
51
52
  });
53
+ /**
54
+ * Phase 34a: entry-keyed annotation event. Distinct from `AnnotationEvent`
55
+ * (which uses the lighter `AnnotationSchema` and is keyed on
56
+ * `(entryId, stage, version)`), this event carries the full
57
+ * `DraftAnnotation` shape used by the longform review surface, keyed
58
+ * on `entryId` only. The two stores intentionally do not interoperate
59
+ * — see `entry/annotations.ts` and the api.ts header for the split
60
+ * contract.
61
+ */
62
+ const EntryAnnotationEvent = z.object({
63
+ kind: z.literal('entry-annotation'),
64
+ at: z.string().datetime(),
65
+ entryId: z.string().uuid(),
66
+ annotation: DraftAnnotationSchema,
67
+ });
52
68
  export const JournalEventSchema = z.discriminatedUnion('kind', [
53
69
  EntryCreatedEvent,
54
70
  EntryIngestedEvent,
@@ -56,5 +72,6 @@ export const JournalEventSchema = z.discriminatedUnion('kind', [
56
72
  AnnotationEvent,
57
73
  ReviewStateChangeEvent,
58
74
  StageTransitionEvent,
75
+ EntryAnnotationEvent,
59
76
  ]);
60
77
  //# sourceMappingURL=journal-events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journal-events.js","sourceRoot":"","sources":["../../src/schema/journal-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,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AC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,IAAI,EAAE,SAAS;IACf,EAAE,EAAE,SAAS;IACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,UAAU,EAAE,qBAAqB;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC7D,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,sBAAsB;IACtB,oBAAoB;IACpB,oBAAoB;CACrB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deskwork/core",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "description": "Editorial calendar + review pipeline library — shared by @deskwork/cli and @deskwork/studio",
6
6
  "homepage": "https://github.com/audiocontrol-org/deskwork#readme",
@@ -92,10 +92,18 @@
92
92
  "types": "./dist/iterate/iterate.d.ts",
93
93
  "default": "./dist/iterate/iterate.js"
94
94
  },
95
+ "./iterate/history": {
96
+ "types": "./dist/iterate/history.d.ts",
97
+ "default": "./dist/iterate/history.js"
98
+ },
95
99
  "./calendar/regenerate": {
96
100
  "types": "./dist/calendar/regenerate.d.ts",
97
101
  "default": "./dist/calendar/regenerate.js"
98
102
  },
103
+ "./entry/annotations": {
104
+ "types": "./dist/entry/annotations.d.ts",
105
+ "default": "./dist/entry/annotations.js"
106
+ },
99
107
  "./entry/approve": {
100
108
  "types": "./dist/entry/approve.d.ts",
101
109
  "default": "./dist/entry/approve.js"