@deskwork/core 0.17.1 → 0.19.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.
@@ -31,31 +31,31 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
31
31
  workflowId: z.ZodString;
32
32
  id: z.ZodString;
33
33
  }, "strip", z.ZodTypeAny, {
34
- version: number;
34
+ id: string;
35
35
  type: "comment";
36
+ version: number;
36
37
  createdAt: string;
37
- id: string;
38
+ workflowId: string;
38
39
  range: {
39
40
  start: number;
40
41
  end: number;
41
42
  };
42
43
  text: string;
43
- workflowId: string;
44
- category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
45
44
  anchor?: string | undefined;
45
+ category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
46
46
  }, {
47
- version: number;
47
+ id: string;
48
48
  type: "comment";
49
+ version: number;
49
50
  createdAt: string;
50
- id: string;
51
+ workflowId: string;
51
52
  range: {
52
53
  start: number;
53
54
  end: number;
54
55
  };
55
56
  text: string;
56
- workflowId: string;
57
- category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
58
57
  anchor?: string | undefined;
58
+ category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
59
59
  }>, z.ZodObject<{
60
60
  type: z.ZodLiteral<"edit">;
61
61
  beforeVersion: z.ZodNumber;
@@ -65,17 +65,17 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
65
65
  workflowId: z.ZodString;
66
66
  id: z.ZodString;
67
67
  }, "strip", z.ZodTypeAny, {
68
+ id: string;
68
69
  type: "edit";
69
70
  createdAt: string;
70
- id: string;
71
71
  workflowId: string;
72
72
  beforeVersion: number;
73
73
  afterMarkdown: string;
74
74
  diff: string;
75
75
  }, {
76
+ id: string;
76
77
  type: "edit";
77
78
  createdAt: string;
78
- id: string;
79
79
  workflowId: string;
80
80
  beforeVersion: number;
81
81
  afterMarkdown: string;
@@ -87,16 +87,16 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
87
87
  workflowId: z.ZodString;
88
88
  id: z.ZodString;
89
89
  }, "strip", z.ZodTypeAny, {
90
- version: number;
90
+ id: string;
91
91
  type: "approve";
92
+ version: number;
92
93
  createdAt: string;
93
- id: string;
94
94
  workflowId: string;
95
95
  }, {
96
- version: number;
96
+ id: string;
97
97
  type: "approve";
98
+ version: number;
98
99
  createdAt: string;
99
- id: string;
100
100
  workflowId: string;
101
101
  }>, z.ZodObject<{
102
102
  type: z.ZodLiteral<"reject">;
@@ -106,17 +106,17 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
106
106
  workflowId: z.ZodString;
107
107
  id: z.ZodString;
108
108
  }, "strip", z.ZodTypeAny, {
109
- version: number;
109
+ id: string;
110
110
  type: "reject";
111
+ version: number;
111
112
  createdAt: string;
112
- id: string;
113
113
  workflowId: string;
114
114
  reason?: string | undefined;
115
115
  }, {
116
- version: number;
116
+ id: string;
117
117
  type: "reject";
118
+ version: number;
118
119
  createdAt: string;
119
- id: string;
120
120
  workflowId: string;
121
121
  reason?: string | undefined;
122
122
  }>, z.ZodObject<{
@@ -127,16 +127,16 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
127
127
  workflowId: z.ZodString;
128
128
  id: z.ZodString;
129
129
  }, "strip", z.ZodTypeAny, {
130
+ id: string;
130
131
  type: "resolve";
131
132
  createdAt: string;
132
- id: string;
133
133
  workflowId: string;
134
134
  commentId: string;
135
135
  resolved: boolean;
136
136
  }, {
137
+ id: string;
137
138
  type: "resolve";
138
139
  createdAt: string;
139
- id: string;
140
140
  workflowId: string;
141
141
  commentId: string;
142
142
  resolved: boolean;
@@ -150,19 +150,19 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
150
150
  workflowId: z.ZodString;
151
151
  id: z.ZodString;
152
152
  }, "strip", z.ZodTypeAny, {
153
- version: number;
153
+ id: string;
154
154
  type: "address";
155
+ version: number;
155
156
  createdAt: string;
156
- id: string;
157
157
  workflowId: string;
158
158
  commentId: string;
159
159
  disposition: "addressed" | "deferred" | "wontfix";
160
160
  reason?: string | undefined;
161
161
  }, {
162
- version: number;
162
+ id: string;
163
163
  type: "address";
164
+ version: number;
164
165
  createdAt: string;
165
- id: string;
166
166
  workflowId: string;
167
167
  commentId: string;
168
168
  disposition: "addressed" | "deferred" | "wontfix";
@@ -187,31 +187,31 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
187
187
  workflowId: z.ZodString;
188
188
  id: z.ZodString;
189
189
  }, "strip", z.ZodTypeAny, {
190
+ id: string;
190
191
  type: "edit-comment";
191
192
  createdAt: string;
192
- id: string;
193
193
  workflowId: string;
194
194
  commentId: string;
195
+ anchor?: string | undefined;
195
196
  range?: {
196
197
  start: number;
197
198
  end: number;
198
199
  } | undefined;
199
200
  text?: string | undefined;
200
- category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
201
- anchor?: string | undefined;
201
+ category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
202
202
  }, {
203
+ id: string;
203
204
  type: "edit-comment";
204
205
  createdAt: string;
205
- id: string;
206
206
  workflowId: string;
207
207
  commentId: string;
208
+ anchor?: string | undefined;
208
209
  range?: {
209
210
  start: number;
210
211
  end: number;
211
212
  } | undefined;
212
213
  text?: string | undefined;
213
- category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
214
- anchor?: string | undefined;
214
+ category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
215
215
  }>, z.ZodObject<{
216
216
  type: z.ZodLiteral<"delete-comment">;
217
217
  commentId: z.ZodString;
@@ -219,15 +219,15 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
219
219
  workflowId: z.ZodString;
220
220
  id: z.ZodString;
221
221
  }, "strip", z.ZodTypeAny, {
222
+ id: string;
222
223
  type: "delete-comment";
223
224
  createdAt: string;
224
- id: string;
225
225
  workflowId: string;
226
226
  commentId: string;
227
227
  }, {
228
+ id: string;
228
229
  type: "delete-comment";
229
230
  createdAt: string;
230
- id: string;
231
231
  workflowId: string;
232
232
  commentId: string;
233
233
  }>, z.ZodObject<{
@@ -238,16 +238,16 @@ export declare const DraftAnnotationSchema: z.ZodDiscriminatedUnion<"type", [z.Z
238
238
  workflowId: z.ZodString;
239
239
  id: z.ZodString;
240
240
  }, "strip", z.ZodTypeAny, {
241
+ id: string;
241
242
  type: "archive-comment";
242
243
  createdAt: string;
243
- id: string;
244
244
  workflowId: string;
245
245
  commentId: string;
246
246
  priorStage?: string | undefined;
247
247
  }, {
248
+ id: string;
248
249
  type: "archive-comment";
249
250
  createdAt: string;
250
- id: string;
251
251
  workflowId: string;
252
252
  commentId: string;
253
253
  priorStage?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  export type Stage = 'Ideas' | 'Planned' | 'Outlining' | 'Drafting' | 'Final' | 'Published' | 'Blocked' | 'Cancelled';
2
- export type ReviewState = 'in-review' | 'iterating' | 'approved';
3
2
  export declare function isLinearPipelineStage(s: Stage): boolean;
4
3
  export declare function isOffPipelineStage(s: Stage): boolean;
5
4
  export declare function nextStage(s: Stage): Stage | null;
@@ -14,7 +13,6 @@ export declare const EntrySchema: z.ZodObject<{
14
13
  currentStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
15
14
  priorStage: z.ZodOptional<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>>;
16
15
  iterationByStage: z.ZodRecord<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>, z.ZodNumber>;
17
- reviewState: z.ZodOptional<z.ZodEnum<["in-review", "iterating", "approved"]>>;
18
16
  targetVersion: z.ZodOptional<z.ZodString>;
19
17
  datePublished: z.ZodOptional<z.ZodString>;
20
18
  artifactPath: z.ZodOptional<z.ZodString>;
@@ -22,37 +20,35 @@ export declare const EntrySchema: z.ZodObject<{
22
20
  createdAt: z.ZodString;
23
21
  updatedAt: z.ZodString;
24
22
  }, "strip", z.ZodTypeAny, {
25
- source: string;
23
+ uuid: string;
26
24
  slug: string;
27
25
  title: string;
28
- uuid: string;
29
26
  keywords: string[];
27
+ source: string;
28
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
29
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
30
30
  createdAt: string;
31
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
32
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
33
31
  updatedAt: string;
34
32
  description?: string | undefined;
35
- datePublished?: string | undefined;
36
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
37
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
33
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
38
34
  targetVersion?: string | undefined;
35
+ datePublished?: string | undefined;
39
36
  artifactPath?: string | undefined;
40
37
  shortformWorkflows?: Record<string, string> | undefined;
41
38
  }, {
42
- source: string;
39
+ uuid: string;
43
40
  slug: string;
44
41
  title: string;
45
- uuid: string;
46
42
  keywords: string[];
43
+ source: string;
44
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
45
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled", number>>;
47
46
  createdAt: string;
48
- currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
49
- iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
50
47
  updatedAt: string;
51
48
  description?: string | undefined;
52
- datePublished?: string | undefined;
53
- priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
54
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
49
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
55
50
  targetVersion?: string | undefined;
51
+ datePublished?: string | undefined;
56
52
  artifactPath?: string | undefined;
57
53
  shortformWorkflows?: Record<string, string> | undefined;
58
54
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/schema/entry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GACb,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GACtE,SAAS,GAAG,WAAW,CAAC;AAE5B,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;AAKjE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEpD;AAaD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAEhD;AAED,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"entry.d.ts","sourceRoot":"","sources":["../../src/schema/entry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GACb,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GACtE,SAAS,GAAG,WAAW,CAAC;AAK5B,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAEpD;AAaD,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAEhD;AAED,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -21,7 +21,6 @@ export function nextStage(s) {
21
21
  }
22
22
  import { z } from 'zod';
23
23
  const StageEnum = z.enum(['Ideas', 'Planned', 'Outlining', 'Drafting', 'Final', 'Published', 'Blocked', 'Cancelled']);
24
- const ReviewStateEnum = z.enum(['in-review', 'iterating', 'approved']);
25
24
  export const EntrySchema = z.object({
26
25
  // Identity
27
26
  uuid: z.string().uuid(),
@@ -31,10 +30,14 @@ export const EntrySchema = z.object({
31
30
  keywords: z.array(z.string()),
32
31
  source: z.string(),
33
32
  // Pipeline state
33
+ // Per DESKWORK-STATE-MACHINE.md (Commandment III), reviewState is
34
+ // RETIRED — no `reviewState` field exists on Entry. zod's default
35
+ // is non-strict, so existing on-disk sidecars carrying a vestigial
36
+ // `reviewState` key parse cleanly (the field is silently dropped on
37
+ // read; absent on next write).
34
38
  currentStage: StageEnum,
35
39
  priorStage: StageEnum.optional(),
36
40
  iterationByStage: z.record(StageEnum, z.number().int().nonnegative()),
37
- reviewState: ReviewStateEnum.optional(),
38
41
  // Editorial
39
42
  targetVersion: z.string().optional(),
40
43
  datePublished: z.string().datetime().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/schema/entry.ts"],"names":[],"mappings":"AAMA,MAAM,eAAe,GAAqB,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,CAAU,CAAC;AACvH,MAAM,YAAY,GAAqB,CAAC,SAAS,EAAE,WAAW,CAAU,CAAC;AAEzE,MAAM,UAAU,qBAAqB,CAAC,CAAQ;IAC5C,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,CAAQ;IACzC,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,SAAS,GAAgC;IAC7C,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,WAAW;IACpB,SAAS,EAAE,UAAU;IACrB,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,IAAI,EAAS,uBAAuB;IAC3C,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,CAAQ;IAChC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC;AAED,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,SAAS,GAAG,CAAC,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b,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
@@ -13,7 +13,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
13
13
  currentStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
14
14
  priorStage: z.ZodOptional<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>>;
15
15
  iterationByStage: z.ZodRecord<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>, z.ZodNumber>;
16
- reviewState: z.ZodOptional<z.ZodEnum<["in-review", "iterating", "approved"]>>;
17
16
  targetVersion: z.ZodOptional<z.ZodString>;
18
17
  datePublished: z.ZodOptional<z.ZodString>;
19
18
  artifactPath: z.ZodOptional<z.ZodString>;
@@ -32,7 +31,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
32
31
  updatedAt: string;
33
32
  description?: string | undefined;
34
33
  priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
35
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
36
34
  targetVersion?: string | undefined;
37
35
  datePublished?: string | undefined;
38
36
  artifactPath?: string | undefined;
@@ -49,7 +47,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
49
47
  updatedAt: string;
50
48
  description?: string | undefined;
51
49
  priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
52
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
53
50
  targetVersion?: string | undefined;
54
51
  datePublished?: string | undefined;
55
52
  artifactPath?: string | undefined;
@@ -71,7 +68,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
71
68
  updatedAt: string;
72
69
  description?: string | undefined;
73
70
  priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
74
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
75
71
  targetVersion?: string | undefined;
76
72
  datePublished?: string | undefined;
77
73
  artifactPath?: string | undefined;
@@ -93,7 +89,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
93
89
  updatedAt: string;
94
90
  description?: string | undefined;
95
91
  priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled" | undefined;
96
- reviewState?: "in-review" | "iterating" | "approved" | undefined;
97
92
  targetVersion?: string | undefined;
98
93
  datePublished?: string | undefined;
99
94
  artifactPath?: string | undefined;
@@ -125,18 +120,18 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
125
120
  version: z.ZodNumber;
126
121
  markdown: z.ZodString;
127
122
  }, "strip", z.ZodTypeAny, {
128
- version: number;
129
123
  at: string;
130
124
  kind: "iteration";
131
125
  entryId: string;
132
126
  stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
127
+ version: number;
133
128
  markdown: string;
134
129
  }, {
135
- version: number;
136
130
  at: string;
137
131
  kind: "iteration";
138
132
  entryId: string;
139
133
  stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
134
+ version: number;
140
135
  markdown: string;
141
136
  }>, z.ZodObject<{
142
137
  kind: z.ZodLiteral<"annotation">;
@@ -191,6 +186,10 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
191
186
  dispositionReason?: string | undefined;
192
187
  }>;
193
188
  }, "strip", z.ZodTypeAny, {
189
+ at: string;
190
+ kind: "annotation";
191
+ entryId: string;
192
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
194
193
  version: number;
195
194
  annotation: {
196
195
  type: "comment";
@@ -206,11 +205,11 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
206
205
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
207
206
  dispositionReason?: string | undefined;
208
207
  };
208
+ }, {
209
209
  at: string;
210
210
  kind: "annotation";
211
211
  entryId: string;
212
212
  stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
213
- }, {
214
213
  version: number;
215
214
  annotation: {
216
215
  type: "comment";
@@ -226,10 +225,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
226
225
  disposition?: "addressed" | "deferred" | "wontfix" | undefined;
227
226
  dispositionReason?: string | undefined;
228
227
  };
229
- at: string;
230
- kind: "annotation";
231
- entryId: string;
232
- stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
233
228
  }>, z.ZodObject<{
234
229
  kind: z.ZodLiteral<"review-state-change">;
235
230
  at: z.ZodString;
@@ -299,9 +294,9 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
299
294
  workflowId: z.ZodString;
300
295
  id: z.ZodString;
301
296
  }, "strip", z.ZodTypeAny, {
302
- version: number;
303
297
  type: "comment";
304
298
  createdAt: string;
299
+ version: number;
305
300
  id: string;
306
301
  range: {
307
302
  start: number;
@@ -312,9 +307,9 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
312
307
  category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
313
308
  anchor?: string | undefined;
314
309
  }, {
315
- version: number;
316
310
  type: "comment";
317
311
  createdAt: string;
312
+ version: number;
318
313
  id: string;
319
314
  range: {
320
315
  start: number;
@@ -355,15 +350,15 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
355
350
  workflowId: z.ZodString;
356
351
  id: z.ZodString;
357
352
  }, "strip", z.ZodTypeAny, {
358
- version: number;
359
353
  type: "approve";
360
354
  createdAt: string;
355
+ version: number;
361
356
  id: string;
362
357
  workflowId: string;
363
358
  }, {
364
- version: number;
365
359
  type: "approve";
366
360
  createdAt: string;
361
+ version: number;
367
362
  id: string;
368
363
  workflowId: string;
369
364
  }>, z.ZodObject<{
@@ -374,16 +369,16 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
374
369
  workflowId: z.ZodString;
375
370
  id: z.ZodString;
376
371
  }, "strip", z.ZodTypeAny, {
377
- version: number;
378
372
  type: "reject";
379
373
  createdAt: string;
374
+ version: number;
380
375
  id: string;
381
376
  workflowId: string;
382
377
  reason?: string | undefined;
383
378
  }, {
384
- version: number;
385
379
  type: "reject";
386
380
  createdAt: string;
381
+ version: number;
387
382
  id: string;
388
383
  workflowId: string;
389
384
  reason?: string | undefined;
@@ -418,22 +413,22 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
418
413
  workflowId: z.ZodString;
419
414
  id: z.ZodString;
420
415
  }, "strip", z.ZodTypeAny, {
421
- version: number;
422
416
  type: "address";
423
417
  createdAt: string;
418
+ version: number;
424
419
  id: string;
420
+ disposition: "addressed" | "deferred" | "wontfix";
425
421
  workflowId: string;
426
422
  commentId: string;
427
- disposition: "addressed" | "deferred" | "wontfix";
428
423
  reason?: string | undefined;
429
424
  }, {
430
- version: number;
431
425
  type: "address";
432
426
  createdAt: string;
427
+ version: number;
433
428
  id: string;
429
+ disposition: "addressed" | "deferred" | "wontfix";
434
430
  workflowId: string;
435
431
  commentId: string;
436
- disposition: "addressed" | "deferred" | "wontfix";
437
432
  reason?: string | undefined;
438
433
  }>, z.ZodObject<{
439
434
  type: z.ZodLiteral<"edit-comment">;
@@ -521,10 +516,13 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
521
516
  priorStage?: string | undefined;
522
517
  }>]>;
523
518
  }, "strip", z.ZodTypeAny, {
519
+ at: string;
520
+ kind: "entry-annotation";
521
+ entryId: string;
524
522
  annotation: {
525
- version: number;
526
523
  type: "comment";
527
524
  createdAt: string;
525
+ version: number;
528
526
  id: string;
529
527
  range: {
530
528
  start: number;
@@ -543,15 +541,15 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
543
541
  afterMarkdown: string;
544
542
  diff: string;
545
543
  } | {
546
- version: number;
547
544
  type: "approve";
548
545
  createdAt: string;
546
+ version: number;
549
547
  id: string;
550
548
  workflowId: string;
551
549
  } | {
552
- version: number;
553
550
  type: "reject";
554
551
  createdAt: string;
552
+ version: number;
555
553
  id: string;
556
554
  workflowId: string;
557
555
  reason?: string | undefined;
@@ -563,13 +561,13 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
563
561
  commentId: string;
564
562
  resolved: boolean;
565
563
  } | {
566
- version: number;
567
564
  type: "address";
568
565
  createdAt: string;
566
+ version: number;
569
567
  id: string;
568
+ disposition: "addressed" | "deferred" | "wontfix";
570
569
  workflowId: string;
571
570
  commentId: string;
572
- disposition: "addressed" | "deferred" | "wontfix";
573
571
  reason?: string | undefined;
574
572
  } | {
575
573
  type: "edit-comment";
@@ -598,14 +596,14 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
598
596
  commentId: string;
599
597
  priorStage?: string | undefined;
600
598
  };
599
+ }, {
601
600
  at: string;
602
601
  kind: "entry-annotation";
603
602
  entryId: string;
604
- }, {
605
603
  annotation: {
606
- version: number;
607
604
  type: "comment";
608
605
  createdAt: string;
606
+ version: number;
609
607
  id: string;
610
608
  range: {
611
609
  start: number;
@@ -624,15 +622,15 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
624
622
  afterMarkdown: string;
625
623
  diff: string;
626
624
  } | {
627
- version: number;
628
625
  type: "approve";
629
626
  createdAt: string;
627
+ version: number;
630
628
  id: string;
631
629
  workflowId: string;
632
630
  } | {
633
- version: number;
634
631
  type: "reject";
635
632
  createdAt: string;
633
+ version: number;
636
634
  id: string;
637
635
  workflowId: string;
638
636
  reason?: string | undefined;
@@ -644,13 +642,13 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
644
642
  commentId: string;
645
643
  resolved: boolean;
646
644
  } | {
647
- version: number;
648
645
  type: "address";
649
646
  createdAt: string;
647
+ version: number;
650
648
  id: string;
649
+ disposition: "addressed" | "deferred" | "wontfix";
651
650
  workflowId: string;
652
651
  commentId: string;
653
- disposition: "addressed" | "deferred" | "wontfix";
654
652
  reason?: string | undefined;
655
653
  } | {
656
654
  type: "edit-comment";
@@ -679,9 +677,6 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
679
677
  commentId: string;
680
678
  priorStage?: string | undefined;
681
679
  };
682
- at: string;
683
- kind: "entry-annotation";
684
- entryId: string;
685
680
  }>]>;
686
681
  export type JournalEvent = z.infer<typeof JournalEventSchema>;
687
682
  //# 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;AA4ExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deskwork/core",
3
- "version": "0.17.1",
3
+ "version": "0.19.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",
@@ -176,6 +176,10 @@
176
176
  "types": "./dist/review/start-handlers.d.ts",
177
177
  "default": "./dist/review/start-handlers.js"
178
178
  },
179
+ "./review/toc": {
180
+ "types": "./dist/review/toc.d.ts",
181
+ "default": "./dist/review/toc.js"
182
+ },
179
183
  "./review/types": {
180
184
  "types": "./dist/review/types.d.ts",
181
185
  "default": "./dist/review/types.js"
@@ -210,6 +214,8 @@
210
214
  "typecheck": "tsc --noEmit"
211
215
  },
212
216
  "dependencies": {
217
+ "github-slugger": "^2.0.0",
218
+ "rehype-slug": "^6.0.0",
213
219
  "rehype-stringify": "^10.0.0",
214
220
  "remark-gfm": "^4.0.1",
215
221
  "remark-parse": "^11.0.0",