@deskwork/core 0.10.1 → 0.11.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.
Files changed (73) hide show
  1. package/dist/calendar/parse.d.ts +24 -0
  2. package/dist/calendar/parse.d.ts.map +1 -0
  3. package/dist/calendar/parse.js +64 -0
  4. package/dist/calendar/parse.js.map +1 -0
  5. package/dist/calendar/render.d.ts +3 -0
  6. package/dist/calendar/render.d.ts.map +1 -0
  7. package/dist/calendar/render.js +46 -0
  8. package/dist/calendar/render.js.map +1 -0
  9. package/dist/doctor/migrate.d.ts +11 -0
  10. package/dist/doctor/migrate.d.ts.map +1 -0
  11. package/dist/doctor/migrate.js +101 -0
  12. package/dist/doctor/migrate.js.map +1 -0
  13. package/dist/doctor/repair.d.ts +9 -0
  14. package/dist/doctor/repair.d.ts.map +1 -0
  15. package/dist/doctor/repair.js +35 -0
  16. package/dist/doctor/repair.js.map +1 -0
  17. package/dist/doctor/validate.d.ts +11 -0
  18. package/dist/doctor/validate.d.ts.map +1 -0
  19. package/dist/doctor/validate.js +405 -0
  20. package/dist/doctor/validate.js.map +1 -0
  21. package/dist/iterate/iterate.d.ts +13 -0
  22. package/dist/iterate/iterate.d.ts.map +1 -0
  23. package/dist/iterate/iterate.js +69 -0
  24. package/dist/iterate/iterate.js.map +1 -0
  25. package/dist/journal/append.d.ts +3 -0
  26. package/dist/journal/append.d.ts.map +1 -0
  27. package/dist/journal/append.js +18 -0
  28. package/dist/journal/append.js.map +1 -0
  29. package/dist/journal/index.d.ts +3 -0
  30. package/dist/journal/index.d.ts.map +1 -0
  31. package/dist/journal/index.js +3 -0
  32. package/dist/journal/index.js.map +1 -0
  33. package/dist/journal/read.d.ts +9 -0
  34. package/dist/journal/read.d.ts.map +1 -0
  35. package/dist/journal/read.js +41 -0
  36. package/dist/journal/read.js.map +1 -0
  37. package/dist/schema/annotation.d.ts +49 -0
  38. package/dist/schema/annotation.d.ts.map +1 -0
  39. package/dist/schema/annotation.js +13 -0
  40. package/dist/schema/annotation.js.map +1 -0
  41. package/dist/schema/entry.d.ts +57 -0
  42. package/dist/schema/entry.d.ts.map +1 -0
  43. package/dist/schema/entry.js +47 -0
  44. package/dist/schema/entry.js.map +1 -0
  45. package/dist/schema/journal-events.d.ts +275 -0
  46. package/dist/schema/journal-events.d.ts.map +1 -0
  47. package/dist/schema/journal-events.js +60 -0
  48. package/dist/schema/journal-events.js.map +1 -0
  49. package/dist/sidecar/index.d.ts +6 -0
  50. package/dist/sidecar/index.d.ts.map +1 -0
  51. package/dist/sidecar/index.js +6 -0
  52. package/dist/sidecar/index.js.map +1 -0
  53. package/dist/sidecar/lookup.d.ts +2 -0
  54. package/dist/sidecar/lookup.d.ts.map +1 -0
  55. package/dist/sidecar/lookup.js +30 -0
  56. package/dist/sidecar/lookup.js.map +1 -0
  57. package/dist/sidecar/paths.d.ts +3 -0
  58. package/dist/sidecar/paths.d.ts.map +1 -0
  59. package/dist/sidecar/paths.js +8 -0
  60. package/dist/sidecar/paths.js.map +1 -0
  61. package/dist/sidecar/read-all.d.ts +14 -0
  62. package/dist/sidecar/read-all.d.ts.map +1 -0
  63. package/dist/sidecar/read-all.js +49 -0
  64. package/dist/sidecar/read-all.js.map +1 -0
  65. package/dist/sidecar/read.d.ts +3 -0
  66. package/dist/sidecar/read.d.ts.map +1 -0
  67. package/dist/sidecar/read.js +30 -0
  68. package/dist/sidecar/read.js.map +1 -0
  69. package/dist/sidecar/write.d.ts +3 -0
  70. package/dist/sidecar/write.d.ts.map +1 -0
  71. package/dist/sidecar/write.js +16 -0
  72. package/dist/sidecar/write.js.map +1 -0
  73. package/package.json +25 -1
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ export declare const AnnotationSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"comment">;
5
+ range: z.ZodObject<{
6
+ start: z.ZodNumber;
7
+ end: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ start: number;
10
+ end: number;
11
+ }, {
12
+ start: number;
13
+ end: number;
14
+ }>;
15
+ text: z.ZodString;
16
+ category: z.ZodOptional<z.ZodString>;
17
+ anchor: z.ZodOptional<z.ZodString>;
18
+ disposition: z.ZodOptional<z.ZodEnum<["addressed", "deferred", "wontfix"]>>;
19
+ dispositionReason: z.ZodOptional<z.ZodString>;
20
+ createdAt: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ id: string;
23
+ type: "comment";
24
+ createdAt: string;
25
+ range: {
26
+ start: number;
27
+ end: number;
28
+ };
29
+ text: string;
30
+ anchor?: string | undefined;
31
+ category?: string | undefined;
32
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
33
+ dispositionReason?: string | undefined;
34
+ }, {
35
+ id: string;
36
+ type: "comment";
37
+ createdAt: string;
38
+ range: {
39
+ start: number;
40
+ end: number;
41
+ };
42
+ text: string;
43
+ anchor?: string | undefined;
44
+ category?: string | undefined;
45
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
46
+ dispositionReason?: string | undefined;
47
+ }>;
48
+ export type Annotation = z.infer<typeof AnnotationSchema>;
49
+ //# sourceMappingURL=annotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/schema/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export const AnnotationSchema = z.object({
3
+ id: z.string().uuid(),
4
+ type: z.literal('comment'),
5
+ range: z.object({ start: z.number().int().nonnegative(), end: z.number().int().nonnegative() }),
6
+ text: z.string(),
7
+ category: z.string().optional(),
8
+ anchor: z.string().optional(),
9
+ disposition: z.enum(['addressed', 'deferred', 'wontfix']).optional(),
10
+ dispositionReason: z.string().optional(),
11
+ createdAt: z.string().datetime(),
12
+ });
13
+ //# sourceMappingURL=annotation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation.js","sourceRoot":"","sources":["../../src/schema/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IAC/F,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpE,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
@@ -0,0 +1,57 @@
1
+ export type Stage = 'Ideas' | 'Planned' | 'Outlining' | 'Drafting' | 'Final' | 'Published' | 'Blocked' | 'Cancelled';
2
+ export type ReviewState = 'in-review' | 'iterating' | 'approved';
3
+ export declare function isLinearPipelineStage(s: Stage): boolean;
4
+ export declare function isOffPipelineStage(s: Stage): boolean;
5
+ export declare function nextStage(s: Stage): Stage | null;
6
+ import { z } from 'zod';
7
+ export declare const EntrySchema: z.ZodObject<{
8
+ uuid: z.ZodString;
9
+ slug: z.ZodString;
10
+ title: z.ZodString;
11
+ description: z.ZodOptional<z.ZodString>;
12
+ keywords: z.ZodArray<z.ZodString, "many">;
13
+ source: z.ZodString;
14
+ currentStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
15
+ priorStage: z.ZodOptional<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>>;
16
+ 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
+ targetVersion: z.ZodOptional<z.ZodString>;
19
+ datePublished: z.ZodOptional<z.ZodString>;
20
+ shortformWorkflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
21
+ createdAt: z.ZodString;
22
+ updatedAt: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ source: string;
25
+ slug: string;
26
+ title: string;
27
+ uuid: string;
28
+ keywords: string[];
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
+ updatedAt: string;
33
+ description?: string | undefined;
34
+ datePublished?: string | undefined;
35
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
36
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
37
+ targetVersion?: string | undefined;
38
+ shortformWorkflows?: Record<string, string> | undefined;
39
+ }, {
40
+ source: string;
41
+ slug: string;
42
+ title: string;
43
+ uuid: string;
44
+ keywords: string[];
45
+ createdAt: string;
46
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
47
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
48
+ updatedAt: string;
49
+ description?: string | undefined;
50
+ datePublished?: string | undefined;
51
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
52
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
53
+ targetVersion?: string | undefined;
54
+ shortformWorkflows?: Record<string, string> | undefined;
55
+ }>;
56
+ export type Entry = z.infer<typeof EntrySchema>;
57
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBtB,CAAC;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ const LINEAR_PIPELINE = ['Ideas', 'Planned', 'Outlining', 'Drafting', 'Final', 'Published'];
2
+ const OFF_PIPELINE = ['Blocked', 'Cancelled'];
3
+ export function isLinearPipelineStage(s) {
4
+ return LINEAR_PIPELINE.includes(s);
5
+ }
6
+ export function isOffPipelineStage(s) {
7
+ return OFF_PIPELINE.includes(s);
8
+ }
9
+ const SUCCESSOR = {
10
+ Ideas: 'Planned',
11
+ Planned: 'Outlining',
12
+ Outlining: 'Drafting',
13
+ Drafting: 'Final',
14
+ Final: null, // publish, not approve
15
+ Published: null,
16
+ Blocked: null,
17
+ Cancelled: null,
18
+ };
19
+ export function nextStage(s) {
20
+ return SUCCESSOR[s];
21
+ }
22
+ import { z } from 'zod';
23
+ const StageEnum = z.enum(['Ideas', 'Planned', 'Outlining', 'Drafting', 'Final', 'Published', 'Blocked', 'Cancelled']);
24
+ const ReviewStateEnum = z.enum(['in-review', 'iterating', 'approved']);
25
+ export const EntrySchema = z.object({
26
+ // Identity
27
+ uuid: z.string().uuid(),
28
+ slug: z.string().min(1),
29
+ title: z.string().min(1),
30
+ description: z.string().optional(),
31
+ keywords: z.array(z.string()),
32
+ source: z.string(),
33
+ // Pipeline state
34
+ currentStage: StageEnum,
35
+ priorStage: StageEnum.optional(),
36
+ iterationByStage: z.record(StageEnum, z.number().int().nonnegative()),
37
+ reviewState: ReviewStateEnum.optional(),
38
+ // Editorial
39
+ targetVersion: z.string().optional(),
40
+ datePublished: z.string().datetime().optional(),
41
+ // Distribution (deferred — shortform model)
42
+ shortformWorkflows: z.record(z.string(), z.string()).optional(),
43
+ // Timestamps
44
+ createdAt: z.string().datetime(),
45
+ updatedAt: z.string().datetime(),
46
+ });
47
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +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,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AACtH,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,WAAW;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAElB,iBAAiB;IACjB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS,CAAC,QAAQ,EAAE;IAChC,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC;IACrE,WAAW,EAAE,eAAe,CAAC,QAAQ,EAAE;IAEvC,YAAY;IACZ,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAE/C,4CAA4C;IAC5C,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAE/D,aAAa;IACb,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
@@ -0,0 +1,275 @@
1
+ import { z } from 'zod';
2
+ export declare const JournalEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3
+ kind: z.ZodLiteral<"entry-created">;
4
+ at: z.ZodString;
5
+ entryId: z.ZodString;
6
+ entry: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ slug: z.ZodString;
9
+ title: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ keywords: z.ZodArray<z.ZodString, "many">;
12
+ source: z.ZodString;
13
+ currentStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
14
+ priorStage: z.ZodOptional<z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>>;
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
+ targetVersion: z.ZodOptional<z.ZodString>;
18
+ datePublished: z.ZodOptional<z.ZodString>;
19
+ shortformWorkflows: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
20
+ createdAt: z.ZodString;
21
+ updatedAt: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ source: string;
24
+ slug: string;
25
+ title: string;
26
+ uuid: string;
27
+ keywords: string[];
28
+ createdAt: string;
29
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
30
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
31
+ updatedAt: string;
32
+ description?: string | undefined;
33
+ datePublished?: string | undefined;
34
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
35
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
36
+ targetVersion?: string | undefined;
37
+ shortformWorkflows?: Record<string, string> | undefined;
38
+ }, {
39
+ source: string;
40
+ slug: string;
41
+ title: string;
42
+ uuid: string;
43
+ keywords: string[];
44
+ createdAt: string;
45
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
46
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
47
+ updatedAt: string;
48
+ description?: string | undefined;
49
+ datePublished?: string | undefined;
50
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
51
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
52
+ targetVersion?: string | undefined;
53
+ shortformWorkflows?: Record<string, string> | undefined;
54
+ }>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ at: string;
57
+ entryId: string;
58
+ entry: {
59
+ source: string;
60
+ slug: string;
61
+ title: string;
62
+ uuid: string;
63
+ keywords: string[];
64
+ createdAt: string;
65
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
66
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
67
+ updatedAt: string;
68
+ description?: string | undefined;
69
+ datePublished?: string | undefined;
70
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
71
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
72
+ targetVersion?: string | undefined;
73
+ shortformWorkflows?: Record<string, string> | undefined;
74
+ };
75
+ kind: "entry-created";
76
+ }, {
77
+ at: string;
78
+ entryId: string;
79
+ entry: {
80
+ source: string;
81
+ slug: string;
82
+ title: string;
83
+ uuid: string;
84
+ keywords: string[];
85
+ createdAt: string;
86
+ currentStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
87
+ iterationByStage: Partial<Record<"Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled", number>>;
88
+ updatedAt: string;
89
+ description?: string | undefined;
90
+ datePublished?: string | undefined;
91
+ priorStage?: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled" | undefined;
92
+ reviewState?: "in-review" | "iterating" | "approved" | undefined;
93
+ targetVersion?: string | undefined;
94
+ shortformWorkflows?: Record<string, string> | undefined;
95
+ };
96
+ kind: "entry-created";
97
+ }>, z.ZodObject<{
98
+ kind: z.ZodLiteral<"entry-ingested">;
99
+ at: z.ZodString;
100
+ entryId: z.ZodString;
101
+ sourcePath: z.ZodString;
102
+ targetStage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ at: string;
105
+ entryId: string;
106
+ kind: "entry-ingested";
107
+ sourcePath: string;
108
+ targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
109
+ }, {
110
+ at: string;
111
+ entryId: string;
112
+ kind: "entry-ingested";
113
+ sourcePath: string;
114
+ targetStage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
115
+ }>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"iteration">;
117
+ at: z.ZodString;
118
+ entryId: z.ZodString;
119
+ stage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
120
+ version: z.ZodNumber;
121
+ markdown: z.ZodString;
122
+ }, "strip", z.ZodTypeAny, {
123
+ at: string;
124
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
125
+ version: number;
126
+ entryId: string;
127
+ markdown: string;
128
+ kind: "iteration";
129
+ }, {
130
+ at: string;
131
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
132
+ version: number;
133
+ entryId: string;
134
+ markdown: string;
135
+ kind: "iteration";
136
+ }>, z.ZodObject<{
137
+ kind: z.ZodLiteral<"annotation">;
138
+ at: z.ZodString;
139
+ entryId: z.ZodString;
140
+ stage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
141
+ version: z.ZodNumber;
142
+ annotation: z.ZodObject<{
143
+ id: z.ZodString;
144
+ type: z.ZodLiteral<"comment">;
145
+ range: z.ZodObject<{
146
+ start: z.ZodNumber;
147
+ end: z.ZodNumber;
148
+ }, "strip", z.ZodTypeAny, {
149
+ start: number;
150
+ end: number;
151
+ }, {
152
+ start: number;
153
+ end: number;
154
+ }>;
155
+ text: z.ZodString;
156
+ category: z.ZodOptional<z.ZodString>;
157
+ anchor: z.ZodOptional<z.ZodString>;
158
+ disposition: z.ZodOptional<z.ZodEnum<["addressed", "deferred", "wontfix"]>>;
159
+ dispositionReason: z.ZodOptional<z.ZodString>;
160
+ createdAt: z.ZodString;
161
+ }, "strip", z.ZodTypeAny, {
162
+ id: string;
163
+ type: "comment";
164
+ createdAt: string;
165
+ range: {
166
+ start: number;
167
+ end: number;
168
+ };
169
+ text: string;
170
+ anchor?: string | undefined;
171
+ category?: string | undefined;
172
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
173
+ dispositionReason?: string | undefined;
174
+ }, {
175
+ id: string;
176
+ type: "comment";
177
+ createdAt: string;
178
+ range: {
179
+ start: number;
180
+ end: number;
181
+ };
182
+ text: string;
183
+ anchor?: string | undefined;
184
+ category?: string | undefined;
185
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
186
+ dispositionReason?: string | undefined;
187
+ }>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ at: string;
190
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
191
+ version: number;
192
+ annotation: {
193
+ id: string;
194
+ type: "comment";
195
+ createdAt: string;
196
+ range: {
197
+ start: number;
198
+ end: number;
199
+ };
200
+ text: string;
201
+ anchor?: string | undefined;
202
+ category?: string | undefined;
203
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
204
+ dispositionReason?: string | undefined;
205
+ };
206
+ entryId: string;
207
+ kind: "annotation";
208
+ }, {
209
+ at: string;
210
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
211
+ version: number;
212
+ annotation: {
213
+ id: string;
214
+ type: "comment";
215
+ createdAt: string;
216
+ range: {
217
+ start: number;
218
+ end: number;
219
+ };
220
+ text: string;
221
+ anchor?: string | undefined;
222
+ category?: string | undefined;
223
+ disposition?: "addressed" | "deferred" | "wontfix" | undefined;
224
+ dispositionReason?: string | undefined;
225
+ };
226
+ entryId: string;
227
+ kind: "annotation";
228
+ }>, z.ZodObject<{
229
+ kind: z.ZodLiteral<"review-state-change">;
230
+ at: z.ZodString;
231
+ entryId: z.ZodString;
232
+ stage: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
233
+ from: z.ZodNullable<z.ZodEnum<["in-review", "iterating", "approved"]>>;
234
+ to: z.ZodNullable<z.ZodEnum<["in-review", "iterating", "approved"]>>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ at: string;
237
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
238
+ from: "in-review" | "iterating" | "approved" | null;
239
+ to: "in-review" | "iterating" | "approved" | null;
240
+ entryId: string;
241
+ kind: "review-state-change";
242
+ }, {
243
+ at: string;
244
+ stage: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
245
+ from: "in-review" | "iterating" | "approved" | null;
246
+ to: "in-review" | "iterating" | "approved" | null;
247
+ entryId: string;
248
+ kind: "review-state-change";
249
+ }>, z.ZodObject<{
250
+ kind: z.ZodLiteral<"stage-transition">;
251
+ at: z.ZodString;
252
+ entryId: z.ZodString;
253
+ from: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
254
+ to: z.ZodEnum<["Ideas", "Planned", "Outlining", "Drafting", "Final", "Published", "Blocked", "Cancelled"]>;
255
+ reason: z.ZodOptional<z.ZodString>;
256
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ at: string;
259
+ from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
260
+ to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
261
+ entryId: string;
262
+ kind: "stage-transition";
263
+ reason?: string | undefined;
264
+ metadata?: Record<string, unknown> | undefined;
265
+ }, {
266
+ at: string;
267
+ from: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
268
+ to: "Ideas" | "Planned" | "Outlining" | "Drafting" | "Published" | "Final" | "Blocked" | "Cancelled";
269
+ entryId: string;
270
+ kind: "stage-transition";
271
+ reason?: string | undefined;
272
+ metadata?: Record<string, unknown> | undefined;
273
+ }>]>;
274
+ export type JournalEvent = z.infer<typeof JournalEventSchema>;
275
+ //# sourceMappingURL=journal-events.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ import { EntrySchema } from "./entry.js";
3
+ import { AnnotationSchema } from "./annotation.js";
4
+ const StageEnum = z.enum(['Ideas', 'Planned', 'Outlining', 'Drafting', 'Final', 'Published', 'Blocked', 'Cancelled']);
5
+ const ReviewStateEnum = z.enum(['in-review', 'iterating', 'approved']);
6
+ const EntryCreatedEvent = z.object({
7
+ kind: z.literal('entry-created'),
8
+ at: z.string().datetime(),
9
+ entryId: z.string().uuid(),
10
+ entry: EntrySchema,
11
+ });
12
+ const EntryIngestedEvent = z.object({
13
+ kind: z.literal('entry-ingested'),
14
+ at: z.string().datetime(),
15
+ entryId: z.string().uuid(),
16
+ sourcePath: z.string(),
17
+ targetStage: StageEnum,
18
+ });
19
+ const IterationEvent = z.object({
20
+ kind: z.literal('iteration'),
21
+ at: z.string().datetime(),
22
+ entryId: z.string().uuid(),
23
+ stage: StageEnum,
24
+ version: z.number().int().positive(),
25
+ markdown: z.string(),
26
+ });
27
+ const AnnotationEvent = z.object({
28
+ kind: z.literal('annotation'),
29
+ at: z.string().datetime(),
30
+ entryId: z.string().uuid(),
31
+ stage: StageEnum,
32
+ version: z.number().int().positive(),
33
+ annotation: AnnotationSchema,
34
+ });
35
+ const ReviewStateChangeEvent = z.object({
36
+ kind: z.literal('review-state-change'),
37
+ at: z.string().datetime(),
38
+ entryId: z.string().uuid(),
39
+ stage: StageEnum,
40
+ from: ReviewStateEnum.nullable(),
41
+ to: ReviewStateEnum.nullable(),
42
+ });
43
+ const StageTransitionEvent = z.object({
44
+ kind: z.literal('stage-transition'),
45
+ at: z.string().datetime(),
46
+ entryId: z.string().uuid(),
47
+ from: StageEnum,
48
+ to: StageEnum,
49
+ reason: z.string().optional(),
50
+ metadata: z.record(z.string(), z.unknown()).optional(),
51
+ });
52
+ export const JournalEventSchema = z.discriminatedUnion('kind', [
53
+ EntryCreatedEvent,
54
+ EntryIngestedEvent,
55
+ IterationEvent,
56
+ AnnotationEvent,
57
+ ReviewStateChangeEvent,
58
+ StageTransitionEvent,
59
+ ]);
60
+ //# sourceMappingURL=journal-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journal-events.js","sourceRoot":"","sources":["../../src/schema/journal-events.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ export * from './paths.ts';
2
+ export * from './read.ts';
3
+ export * from './read-all.ts';
4
+ export * from './write.ts';
5
+ export * from './lookup.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sidecar/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./paths.js";
2
+ export * from "./read.js";
3
+ export * from "./read-all.js";
4
+ export * from "./write.js";
5
+ export * from "./lookup.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sidecar/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function resolveEntryUuid(projectRoot: string, input: string): Promise<string>;
2
+ //# sourceMappingURL=lookup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/sidecar/lookup.ts"],"names":[],"mappings":"AAOA,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAqB1F"}
@@ -0,0 +1,30 @@
1
+ import { readdir, readFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ import { sidecarsDir } from "./paths.js";
4
+ import { EntrySchema } from "../schema/entry.js";
5
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6
+ export async function resolveEntryUuid(projectRoot, input) {
7
+ if (UUID_RE.test(input))
8
+ return input;
9
+ const dir = sidecarsDir(projectRoot);
10
+ let names;
11
+ try {
12
+ names = await readdir(dir);
13
+ }
14
+ catch {
15
+ throw new Error(`slug '${input}' not found (no sidecars)`);
16
+ }
17
+ for (const name of names.filter(n => n.endsWith('.json'))) {
18
+ const raw = await readFile(join(dir, name), 'utf8');
19
+ try {
20
+ const parsed = EntrySchema.safeParse(JSON.parse(raw));
21
+ if (parsed.success && parsed.data.slug === input)
22
+ return parsed.data.uuid;
23
+ }
24
+ catch {
25
+ /* skip malformed sidecars */
26
+ }
27
+ }
28
+ throw new Error(`slug '${input}' not found`);
29
+ }
30
+ //# sourceMappingURL=lookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../src/sidecar/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,OAAO,GAAG,iEAAiE,CAAC;AAElF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,WAAmB,EAAE,KAAa;IACvE,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,KAAe,CAAC;IACpB,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,SAAS,KAAK,2BAA2B,CAAC,CAAC;IAC7D,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAC1D,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YACtD,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK;gBAAE,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5E,CAAC;QAAC,MAAM,CAAC;YACP,6BAA6B;QAC/B,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,SAAS,KAAK,aAAa,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function sidecarPath(projectRoot: string, uuid: string): string;
2
+ export declare function sidecarsDir(projectRoot: string): string;
3
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/sidecar/paths.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,8 @@
1
+ import { join } from 'node:path';
2
+ export function sidecarPath(projectRoot, uuid) {
3
+ return join(projectRoot, '.deskwork', 'entries', `${uuid}.json`);
4
+ }
5
+ export function sidecarsDir(projectRoot) {
6
+ return join(projectRoot, '.deskwork', 'entries');
7
+ }
8
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/sidecar/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,UAAU,WAAW,CAAC,WAAmB,EAAE,IAAY;IAC3D,OAAO,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,OAAO,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Read every sidecar under `<projectRoot>/.deskwork/entries/*.json`.
3
+ *
4
+ * Used by surfaces that need to enumerate all entries (the studio
5
+ * dashboard, doctor cross-entry checks, doctor calendar regeneration).
6
+ * Malformed JSON or schema-invalid sidecars throw — silently skipping
7
+ * would mask the very corruption doctor is meant to catch.
8
+ *
9
+ * Returns entries in undefined order. Callers that care about ordering
10
+ * (the dashboard groups by stage and sorts by slug) sort downstream.
11
+ */
12
+ import { type Entry } from '../schema/entry.ts';
13
+ export declare function readAllSidecars(projectRoot: string): Promise<Entry[]>;
14
+ //# sourceMappingURL=read-all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-all.d.ts","sourceRoot":"","sources":["../../src/sidecar/read-all.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG7D,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CA6B3E"}