@deskwork/core 0.14.0 → 0.15.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.
- package/dist/entry/create.d.ts +56 -0
- package/dist/entry/create.d.ts.map +1 -0
- package/dist/entry/create.js +42 -0
- package/dist/entry/create.js.map +1 -0
- package/dist/iterate/iterate.d.ts.map +1 -1
- package/dist/iterate/iterate.js +10 -12
- package/dist/iterate/iterate.js.map +1 -1
- package/dist/rehype-rewrite-scrapbook-images.mjs +78 -0
- package/dist/review/render.d.ts +11 -1
- package/dist/review/render.d.ts.map +1 -1
- package/dist/review/render.js +27 -5
- package/dist/review/render.js.map +1 -1
- package/dist/schema/draft-annotation.d.ts +18 -18
- package/dist/schema/journal-events.d.ts +120 -120
- package/dist/scrapbook.d.ts +60 -0
- package/dist/scrapbook.d.ts.map +1 -1
- package/dist/scrapbook.js +54 -7
- package/dist/scrapbook.js.map +1 -1
- package/package.json +6 -1
|
@@ -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
|
-
|
|
24
|
+
source: string;
|
|
25
25
|
slug: string;
|
|
26
26
|
title: string;
|
|
27
|
+
uuid: string;
|
|
27
28
|
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>>;
|
|
31
29
|
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
|
-
|
|
34
|
+
datePublished?: string | undefined;
|
|
35
|
+
priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
|
|
35
36
|
reviewState?: "in-review" | "iterating" | "approved" | undefined;
|
|
36
37
|
targetVersion?: string | undefined;
|
|
37
|
-
datePublished?: string | undefined;
|
|
38
38
|
artifactPath?: string | undefined;
|
|
39
39
|
shortformWorkflows?: Record<string, string> | undefined;
|
|
40
40
|
}, {
|
|
41
|
-
|
|
41
|
+
source: string;
|
|
42
42
|
slug: string;
|
|
43
43
|
title: string;
|
|
44
|
+
uuid: string;
|
|
44
45
|
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>>;
|
|
48
46
|
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
|
-
|
|
51
|
+
datePublished?: string | undefined;
|
|
52
|
+
priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
|
|
52
53
|
reviewState?: "in-review" | "iterating" | "approved" | undefined;
|
|
53
54
|
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";
|
|
60
59
|
at: string;
|
|
61
|
-
entryId: string;
|
|
62
60
|
entry: {
|
|
63
|
-
|
|
61
|
+
source: string;
|
|
64
62
|
slug: string;
|
|
65
63
|
title: string;
|
|
64
|
+
uuid: string;
|
|
66
65
|
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>>;
|
|
70
66
|
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>>;
|
|
71
69
|
updatedAt: string;
|
|
72
70
|
description?: string | undefined;
|
|
73
|
-
|
|
71
|
+
datePublished?: string | undefined;
|
|
72
|
+
priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
|
|
74
73
|
reviewState?: "in-review" | "iterating" | "approved" | undefined;
|
|
75
74
|
targetVersion?: string | undefined;
|
|
76
|
-
datePublished?: string | undefined;
|
|
77
75
|
artifactPath?: string | undefined;
|
|
78
76
|
shortformWorkflows?: Record<string, string> | undefined;
|
|
79
77
|
};
|
|
80
|
-
}, {
|
|
81
78
|
kind: "entry-created";
|
|
82
|
-
at: string;
|
|
83
79
|
entryId: string;
|
|
80
|
+
}, {
|
|
81
|
+
at: string;
|
|
84
82
|
entry: {
|
|
85
|
-
|
|
83
|
+
source: string;
|
|
86
84
|
slug: string;
|
|
87
85
|
title: string;
|
|
86
|
+
uuid: string;
|
|
88
87
|
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>>;
|
|
92
88
|
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>>;
|
|
93
91
|
updatedAt: string;
|
|
94
92
|
description?: string | undefined;
|
|
95
|
-
|
|
93
|
+
datePublished?: string | undefined;
|
|
94
|
+
priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
|
|
96
95
|
reviewState?: "in-review" | "iterating" | "approved" | undefined;
|
|
97
96
|
targetVersion?: string | undefined;
|
|
98
|
-
datePublished?: string | undefined;
|
|
99
97
|
artifactPath?: string | undefined;
|
|
100
98
|
shortformWorkflows?: Record<string, string> | undefined;
|
|
101
99
|
};
|
|
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
|
-
kind: "entry-ingested";
|
|
110
109
|
at: string;
|
|
110
|
+
kind: "entry-ingested";
|
|
111
111
|
entryId: string;
|
|
112
112
|
sourcePath: string;
|
|
113
|
-
targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "
|
|
113
|
+
targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
114
114
|
}, {
|
|
115
|
-
kind: "entry-ingested";
|
|
116
115
|
at: string;
|
|
116
|
+
kind: "entry-ingested";
|
|
117
117
|
entryId: string;
|
|
118
118
|
sourcePath: string;
|
|
119
|
-
targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "
|
|
119
|
+
targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "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
|
-
kind: "iteration";
|
|
129
128
|
at: string;
|
|
130
|
-
|
|
131
|
-
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
|
|
129
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
132
130
|
version: number;
|
|
131
|
+
kind: "iteration";
|
|
132
|
+
entryId: string;
|
|
133
133
|
markdown: string;
|
|
134
134
|
}, {
|
|
135
|
-
kind: "iteration";
|
|
136
135
|
at: string;
|
|
137
|
-
|
|
138
|
-
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
|
|
136
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
139
137
|
version: number;
|
|
138
|
+
kind: "iteration";
|
|
139
|
+
entryId: string;
|
|
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;
|
|
167
168
|
type: "comment";
|
|
168
169
|
createdAt: string;
|
|
169
|
-
id: string;
|
|
170
170
|
range: {
|
|
171
171
|
start: number;
|
|
172
172
|
end: number;
|
|
173
173
|
};
|
|
174
174
|
text: string;
|
|
175
|
-
category?: string | undefined;
|
|
176
175
|
anchor?: string | undefined;
|
|
176
|
+
category?: string | undefined;
|
|
177
177
|
disposition?: "addressed" | "deferred" | "wontfix" | undefined;
|
|
178
178
|
dispositionReason?: string | undefined;
|
|
179
179
|
}, {
|
|
180
|
+
id: string;
|
|
180
181
|
type: "comment";
|
|
181
182
|
createdAt: string;
|
|
182
|
-
id: string;
|
|
183
183
|
range: {
|
|
184
184
|
start: number;
|
|
185
185
|
end: number;
|
|
186
186
|
};
|
|
187
187
|
text: string;
|
|
188
|
-
category?: string | undefined;
|
|
189
188
|
anchor?: string | undefined;
|
|
189
|
+
category?: string | undefined;
|
|
190
190
|
disposition?: "addressed" | "deferred" | "wontfix" | undefined;
|
|
191
191
|
dispositionReason?: string | undefined;
|
|
192
192
|
}>;
|
|
193
193
|
}, "strip", z.ZodTypeAny, {
|
|
194
|
-
kind: "annotation";
|
|
195
194
|
at: string;
|
|
196
|
-
|
|
197
|
-
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Final" | "Published" | "Blocked" | "Cancelled";
|
|
195
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
198
196
|
version: number;
|
|
199
197
|
annotation: {
|
|
198
|
+
id: string;
|
|
200
199
|
type: "comment";
|
|
201
200
|
createdAt: string;
|
|
202
|
-
id: string;
|
|
203
201
|
range: {
|
|
204
202
|
start: number;
|
|
205
203
|
end: number;
|
|
206
204
|
};
|
|
207
205
|
text: string;
|
|
208
|
-
category?: string | undefined;
|
|
209
206
|
anchor?: string | undefined;
|
|
207
|
+
category?: string | undefined;
|
|
210
208
|
disposition?: "addressed" | "deferred" | "wontfix" | undefined;
|
|
211
209
|
dispositionReason?: string | undefined;
|
|
212
210
|
};
|
|
213
|
-
}, {
|
|
214
211
|
kind: "annotation";
|
|
215
|
-
at: string;
|
|
216
212
|
entryId: string;
|
|
217
|
-
|
|
213
|
+
}, {
|
|
214
|
+
at: string;
|
|
215
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
218
216
|
version: number;
|
|
219
217
|
annotation: {
|
|
218
|
+
id: string;
|
|
220
219
|
type: "comment";
|
|
221
220
|
createdAt: string;
|
|
222
|
-
id: string;
|
|
223
221
|
range: {
|
|
224
222
|
start: number;
|
|
225
223
|
end: number;
|
|
226
224
|
};
|
|
227
225
|
text: string;
|
|
228
|
-
category?: string | undefined;
|
|
229
226
|
anchor?: string | undefined;
|
|
227
|
+
category?: string | undefined;
|
|
230
228
|
disposition?: "addressed" | "deferred" | "wontfix" | undefined;
|
|
231
229
|
dispositionReason?: string | undefined;
|
|
232
230
|
};
|
|
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
|
-
kind: "review-state-change";
|
|
242
241
|
at: string;
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
243
|
+
kind: "review-state-change";
|
|
245
244
|
from: "in-review" | "iterating" | "approved" | null;
|
|
246
245
|
to: "in-review" | "iterating" | "approved" | null;
|
|
246
|
+
entryId: string;
|
|
247
247
|
}, {
|
|
248
|
-
kind: "review-state-change";
|
|
249
248
|
at: string;
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
250
|
+
kind: "review-state-change";
|
|
252
251
|
from: "in-review" | "iterating" | "approved" | null;
|
|
253
252
|
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,19 +260,19 @@ 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
|
-
kind: "stage-transition";
|
|
264
263
|
at: string;
|
|
264
|
+
kind: "stage-transition";
|
|
265
|
+
from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
266
|
+
to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
265
267
|
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
|
-
kind: "stage-transition";
|
|
272
271
|
at: string;
|
|
272
|
+
kind: "stage-transition";
|
|
273
|
+
from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
274
|
+
to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
|
|
273
275
|
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
278
|
}>, z.ZodObject<{
|
|
@@ -299,31 +299,31 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
299
299
|
workflowId: z.ZodString;
|
|
300
300
|
id: z.ZodString;
|
|
301
301
|
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
id: string;
|
|
302
303
|
type: "comment";
|
|
303
|
-
createdAt: string;
|
|
304
304
|
version: number;
|
|
305
|
-
|
|
305
|
+
createdAt: string;
|
|
306
|
+
workflowId: string;
|
|
306
307
|
range: {
|
|
307
308
|
start: number;
|
|
308
309
|
end: number;
|
|
309
310
|
};
|
|
310
311
|
text: string;
|
|
311
|
-
workflowId: string;
|
|
312
|
-
category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
|
|
313
312
|
anchor?: string | undefined;
|
|
313
|
+
category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
|
|
314
314
|
}, {
|
|
315
|
+
id: string;
|
|
315
316
|
type: "comment";
|
|
316
|
-
createdAt: string;
|
|
317
317
|
version: number;
|
|
318
|
-
|
|
318
|
+
createdAt: string;
|
|
319
|
+
workflowId: string;
|
|
319
320
|
range: {
|
|
320
321
|
start: number;
|
|
321
322
|
end: number;
|
|
322
323
|
};
|
|
323
324
|
text: string;
|
|
324
|
-
workflowId: string;
|
|
325
|
-
category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
|
|
326
325
|
anchor?: string | undefined;
|
|
326
|
+
category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
|
|
327
327
|
}>, z.ZodObject<{
|
|
328
328
|
type: z.ZodLiteral<"edit">;
|
|
329
329
|
beforeVersion: z.ZodNumber;
|
|
@@ -333,17 +333,17 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
333
333
|
workflowId: z.ZodString;
|
|
334
334
|
id: z.ZodString;
|
|
335
335
|
}, "strip", z.ZodTypeAny, {
|
|
336
|
+
id: string;
|
|
336
337
|
type: "edit";
|
|
337
338
|
createdAt: string;
|
|
338
|
-
id: string;
|
|
339
339
|
workflowId: string;
|
|
340
340
|
beforeVersion: number;
|
|
341
341
|
afterMarkdown: string;
|
|
342
342
|
diff: string;
|
|
343
343
|
}, {
|
|
344
|
+
id: string;
|
|
344
345
|
type: "edit";
|
|
345
346
|
createdAt: string;
|
|
346
|
-
id: string;
|
|
347
347
|
workflowId: string;
|
|
348
348
|
beforeVersion: number;
|
|
349
349
|
afterMarkdown: string;
|
|
@@ -355,16 +355,16 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
355
355
|
workflowId: z.ZodString;
|
|
356
356
|
id: z.ZodString;
|
|
357
357
|
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
id: string;
|
|
358
359
|
type: "approve";
|
|
359
|
-
createdAt: string;
|
|
360
360
|
version: number;
|
|
361
|
-
|
|
361
|
+
createdAt: string;
|
|
362
362
|
workflowId: string;
|
|
363
363
|
}, {
|
|
364
|
+
id: string;
|
|
364
365
|
type: "approve";
|
|
365
|
-
createdAt: string;
|
|
366
366
|
version: number;
|
|
367
|
-
|
|
367
|
+
createdAt: string;
|
|
368
368
|
workflowId: string;
|
|
369
369
|
}>, z.ZodObject<{
|
|
370
370
|
type: z.ZodLiteral<"reject">;
|
|
@@ -374,17 +374,17 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
374
374
|
workflowId: z.ZodString;
|
|
375
375
|
id: z.ZodString;
|
|
376
376
|
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
id: string;
|
|
377
378
|
type: "reject";
|
|
378
|
-
createdAt: string;
|
|
379
379
|
version: number;
|
|
380
|
-
|
|
380
|
+
createdAt: string;
|
|
381
381
|
workflowId: string;
|
|
382
382
|
reason?: string | undefined;
|
|
383
383
|
}, {
|
|
384
|
+
id: string;
|
|
384
385
|
type: "reject";
|
|
385
|
-
createdAt: string;
|
|
386
386
|
version: number;
|
|
387
|
-
|
|
387
|
+
createdAt: string;
|
|
388
388
|
workflowId: string;
|
|
389
389
|
reason?: string | undefined;
|
|
390
390
|
}>, z.ZodObject<{
|
|
@@ -395,16 +395,16 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
395
395
|
workflowId: z.ZodString;
|
|
396
396
|
id: z.ZodString;
|
|
397
397
|
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
id: string;
|
|
398
399
|
type: "resolve";
|
|
399
400
|
createdAt: string;
|
|
400
|
-
id: string;
|
|
401
401
|
workflowId: string;
|
|
402
402
|
commentId: string;
|
|
403
403
|
resolved: boolean;
|
|
404
404
|
}, {
|
|
405
|
+
id: string;
|
|
405
406
|
type: "resolve";
|
|
406
407
|
createdAt: string;
|
|
407
|
-
id: string;
|
|
408
408
|
workflowId: string;
|
|
409
409
|
commentId: string;
|
|
410
410
|
resolved: boolean;
|
|
@@ -418,134 +418,134 @@ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
418
418
|
workflowId: z.ZodString;
|
|
419
419
|
id: z.ZodString;
|
|
420
420
|
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
id: string;
|
|
421
422
|
type: "address";
|
|
422
|
-
createdAt: string;
|
|
423
423
|
version: number;
|
|
424
|
-
|
|
425
|
-
disposition: "addressed" | "deferred" | "wontfix";
|
|
424
|
+
createdAt: string;
|
|
426
425
|
workflowId: string;
|
|
427
426
|
commentId: string;
|
|
427
|
+
disposition: "addressed" | "deferred" | "wontfix";
|
|
428
428
|
reason?: string | undefined;
|
|
429
429
|
}, {
|
|
430
|
+
id: string;
|
|
430
431
|
type: "address";
|
|
431
|
-
createdAt: string;
|
|
432
432
|
version: number;
|
|
433
|
-
|
|
434
|
-
disposition: "addressed" | "deferred" | "wontfix";
|
|
433
|
+
createdAt: string;
|
|
435
434
|
workflowId: string;
|
|
436
435
|
commentId: string;
|
|
436
|
+
disposition: "addressed" | "deferred" | "wontfix";
|
|
437
437
|
reason?: string | undefined;
|
|
438
438
|
}>]>;
|
|
439
439
|
}, "strip", z.ZodTypeAny, {
|
|
440
|
-
kind: "entry-annotation";
|
|
441
440
|
at: string;
|
|
442
|
-
entryId: string;
|
|
443
441
|
annotation: {
|
|
442
|
+
id: string;
|
|
444
443
|
type: "comment";
|
|
445
|
-
createdAt: string;
|
|
446
444
|
version: number;
|
|
447
|
-
|
|
445
|
+
createdAt: string;
|
|
446
|
+
workflowId: string;
|
|
448
447
|
range: {
|
|
449
448
|
start: number;
|
|
450
449
|
end: number;
|
|
451
450
|
};
|
|
452
451
|
text: string;
|
|
453
|
-
workflowId: string;
|
|
454
|
-
category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
|
|
455
452
|
anchor?: string | undefined;
|
|
453
|
+
category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
|
|
456
454
|
} | {
|
|
455
|
+
id: string;
|
|
457
456
|
type: "edit";
|
|
458
457
|
createdAt: string;
|
|
459
|
-
id: string;
|
|
460
458
|
workflowId: string;
|
|
461
459
|
beforeVersion: number;
|
|
462
460
|
afterMarkdown: string;
|
|
463
461
|
diff: string;
|
|
464
462
|
} | {
|
|
463
|
+
id: string;
|
|
465
464
|
type: "approve";
|
|
466
|
-
createdAt: string;
|
|
467
465
|
version: number;
|
|
468
|
-
|
|
466
|
+
createdAt: string;
|
|
469
467
|
workflowId: string;
|
|
470
468
|
} | {
|
|
469
|
+
id: string;
|
|
471
470
|
type: "reject";
|
|
472
|
-
createdAt: string;
|
|
473
471
|
version: number;
|
|
474
|
-
|
|
472
|
+
createdAt: string;
|
|
475
473
|
workflowId: string;
|
|
476
474
|
reason?: string | undefined;
|
|
477
475
|
} | {
|
|
476
|
+
id: string;
|
|
478
477
|
type: "resolve";
|
|
479
478
|
createdAt: string;
|
|
480
|
-
id: string;
|
|
481
479
|
workflowId: string;
|
|
482
480
|
commentId: string;
|
|
483
481
|
resolved: boolean;
|
|
484
482
|
} | {
|
|
483
|
+
id: string;
|
|
485
484
|
type: "address";
|
|
486
|
-
createdAt: string;
|
|
487
485
|
version: number;
|
|
488
|
-
|
|
489
|
-
disposition: "addressed" | "deferred" | "wontfix";
|
|
486
|
+
createdAt: string;
|
|
490
487
|
workflowId: string;
|
|
491
488
|
commentId: string;
|
|
489
|
+
disposition: "addressed" | "deferred" | "wontfix";
|
|
492
490
|
reason?: string | undefined;
|
|
493
491
|
};
|
|
494
|
-
}, {
|
|
495
492
|
kind: "entry-annotation";
|
|
496
|
-
at: string;
|
|
497
493
|
entryId: string;
|
|
494
|
+
}, {
|
|
495
|
+
at: string;
|
|
498
496
|
annotation: {
|
|
497
|
+
id: string;
|
|
499
498
|
type: "comment";
|
|
500
|
-
createdAt: string;
|
|
501
499
|
version: number;
|
|
502
|
-
|
|
500
|
+
createdAt: string;
|
|
501
|
+
workflowId: string;
|
|
503
502
|
range: {
|
|
504
503
|
start: number;
|
|
505
504
|
end: number;
|
|
506
505
|
};
|
|
507
506
|
text: string;
|
|
508
|
-
workflowId: string;
|
|
509
|
-
category?: "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | "other" | undefined;
|
|
510
507
|
anchor?: string | undefined;
|
|
508
|
+
category?: "other" | "voice-drift" | "missing-receipt" | "tutorial-framing" | "saas-vocabulary" | "fake-authority" | "structural" | undefined;
|
|
511
509
|
} | {
|
|
510
|
+
id: string;
|
|
512
511
|
type: "edit";
|
|
513
512
|
createdAt: string;
|
|
514
|
-
id: string;
|
|
515
513
|
workflowId: string;
|
|
516
514
|
beforeVersion: number;
|
|
517
515
|
afterMarkdown: string;
|
|
518
516
|
diff: string;
|
|
519
517
|
} | {
|
|
518
|
+
id: string;
|
|
520
519
|
type: "approve";
|
|
521
|
-
createdAt: string;
|
|
522
520
|
version: number;
|
|
523
|
-
|
|
521
|
+
createdAt: string;
|
|
524
522
|
workflowId: string;
|
|
525
523
|
} | {
|
|
524
|
+
id: string;
|
|
526
525
|
type: "reject";
|
|
527
|
-
createdAt: string;
|
|
528
526
|
version: number;
|
|
529
|
-
|
|
527
|
+
createdAt: string;
|
|
530
528
|
workflowId: string;
|
|
531
529
|
reason?: string | undefined;
|
|
532
530
|
} | {
|
|
531
|
+
id: string;
|
|
533
532
|
type: "resolve";
|
|
534
533
|
createdAt: string;
|
|
535
|
-
id: string;
|
|
536
534
|
workflowId: string;
|
|
537
535
|
commentId: string;
|
|
538
536
|
resolved: boolean;
|
|
539
537
|
} | {
|
|
538
|
+
id: string;
|
|
540
539
|
type: "address";
|
|
541
|
-
createdAt: string;
|
|
542
540
|
version: number;
|
|
543
|
-
|
|
544
|
-
disposition: "addressed" | "deferred" | "wontfix";
|
|
541
|
+
createdAt: string;
|
|
545
542
|
workflowId: string;
|
|
546
543
|
commentId: string;
|
|
544
|
+
disposition: "addressed" | "deferred" | "wontfix";
|
|
547
545
|
reason?: string | undefined;
|
|
548
546
|
};
|
|
547
|
+
kind: "entry-annotation";
|
|
548
|
+
entryId: string;
|
|
549
549
|
}>]>;
|
|
550
550
|
export type JournalEvent = z.infer<typeof JournalEventSchema>;
|
|
551
551
|
//# sourceMappingURL=journal-events.d.ts.map
|
package/dist/scrapbook.d.ts
CHANGED
|
@@ -119,6 +119,23 @@ export interface ScrapbookLocation {
|
|
|
119
119
|
* `<scrapbook>/secret/<filename>` instead of `<scrapbook>/<filename>`.
|
|
120
120
|
*/
|
|
121
121
|
export declare function scrapbookFilePath(projectRoot: string, config: DeskworkConfig, site: string, slug: string, filename: string, opts?: ScrapbookLocation): string;
|
|
122
|
+
/**
|
|
123
|
+
* Resolve a filename inside an already-resolved scrapbook directory.
|
|
124
|
+
* Mirrors `listScrapbookAtDir` — used by callers that have already
|
|
125
|
+
* resolved the on-disk dir via `scrapbookDirForEntry` (id-driven) or
|
|
126
|
+
* `scrapbookDirAtPath` (fs-path-driven) and don't want to re-derive
|
|
127
|
+
* through the slug template.
|
|
128
|
+
*
|
|
129
|
+
* Same security guards as `scrapbookFilePath`:
|
|
130
|
+
* - `assertFilename` blocks dotfiles / `..` / absolute paths in the filename
|
|
131
|
+
* - the `startsWith(dir + '/')` containment check blocks any traversal
|
|
132
|
+
* that slipped through (so `secret/` always sits inside the top-level
|
|
133
|
+
* scrapbook dir)
|
|
134
|
+
*
|
|
135
|
+
* The slug-shape validator is bypassed because the caller has already
|
|
136
|
+
* proven the directory exists in the content tree by other means.
|
|
137
|
+
*/
|
|
138
|
+
export declare function scrapbookFilePathAtDir(scrapbookDirAbs: string, filename: string, opts?: ScrapbookLocation): string;
|
|
122
139
|
export declare function classify(filename: string): ScrapbookItemKind;
|
|
123
140
|
/**
|
|
124
141
|
* List the items in a scrapbook, sorted newest-mtime first. Returns
|
|
@@ -202,6 +219,49 @@ export declare function readScrapbookFile(projectRoot: string, config: DeskworkC
|
|
|
202
219
|
mtime: string;
|
|
203
220
|
content: Buffer;
|
|
204
221
|
};
|
|
222
|
+
/**
|
|
223
|
+
* Read a scrapbook file given the absolute scrapbook directory. Used
|
|
224
|
+
* by callers that have already resolved the on-disk dir via
|
|
225
|
+
* `scrapbookDirForEntry` (id-driven) or `scrapbookDirAtPath`
|
|
226
|
+
* (fs-path-driven) and don't want to re-derive through the slug
|
|
227
|
+
* template. Mirrors the listing-side primitive `listScrapbookAtDir`.
|
|
228
|
+
*
|
|
229
|
+
* Same security guards as `readScrapbookFile` (filename validation +
|
|
230
|
+
* path-traversal containment) via `scrapbookFilePathAtDir`.
|
|
231
|
+
*/
|
|
232
|
+
export declare function readScrapbookFileAtDir(scrapbookDirAbs: string, filename: string, opts?: ScrapbookLocation): {
|
|
233
|
+
name: string;
|
|
234
|
+
kind: ScrapbookItemKind;
|
|
235
|
+
size: number;
|
|
236
|
+
mtime: string;
|
|
237
|
+
content: Buffer;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Read a scrapbook file for a tracked calendar entry. Mirrors
|
|
241
|
+
* `listScrapbookForEntry` / `countScrapbookForEntry` — id-driven
|
|
242
|
+
* resolution via `scrapbookDirForEntry`, slug fallback for pre-bound
|
|
243
|
+
* entries. Used by the studio's `/api/dev/scrapbook-file?entryId=...`
|
|
244
|
+
* variant so projects whose feature-doc layout doesn't match the
|
|
245
|
+
* kebab-case slug template (e.g. `docs/<version>/<status>/<feature>/`)
|
|
246
|
+
* can still serve scrapbook assets — `scrapbookDirAtPath`'s slug
|
|
247
|
+
* validator would otherwise reject any path with dots or uppercase
|
|
248
|
+
* segments.
|
|
249
|
+
*
|
|
250
|
+
* Same security guards as the slug-shape variant: `assertFilename`
|
|
251
|
+
* blocks dotfiles / `..` / absolute paths in the filename; the
|
|
252
|
+
* `startsWith(dir + '/')` containment check blocks any traversal that
|
|
253
|
+
* slipped through.
|
|
254
|
+
*/
|
|
255
|
+
export declare function readScrapbookFileForEntry(projectRoot: string, config: DeskworkConfig, site: string, entry: {
|
|
256
|
+
id?: string;
|
|
257
|
+
slug: string;
|
|
258
|
+
}, filename: string, opts?: ScrapbookLocation, index?: ContentIndex): {
|
|
259
|
+
name: string;
|
|
260
|
+
kind: ScrapbookItemKind;
|
|
261
|
+
size: number;
|
|
262
|
+
mtime: string;
|
|
263
|
+
content: Buffer;
|
|
264
|
+
};
|
|
205
265
|
/**
|
|
206
266
|
* Create a new markdown note in the scrapbook. Creates the scrapbook
|
|
207
267
|
* dir (and `secret/` subdir, if needed) if it doesn't exist. Refuses
|