@happyvertical/smrt-content 0.57.35 → 0.57.37

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 (32) hide show
  1. package/AGENTS.md +1 -0
  2. package/dist/chunks/{content-corrections-BYT3Qdw5.js → content-corrections-QyinPkfN.js} +10 -3
  3. package/dist/chunks/content-corrections-QyinPkfN.js.map +1 -0
  4. package/dist/chunks/{content-query-jQhfFnhO.js → content-query-DxZAmAPW.js} +36 -37
  5. package/dist/chunks/content-query-DxZAmAPW.js.map +1 -0
  6. package/dist/chunks/{content-reviews-B6h2aJ9m.js → content-reviews-H9ANWEi7.js} +9 -3
  7. package/dist/chunks/content-reviews-H9ANWEi7.js.map +1 -0
  8. package/dist/chunks/{content-versions-BKAWUCzE.js → content-versions-D0VjHrvd.js} +10 -4
  9. package/dist/chunks/content-versions-D0VjHrvd.js.map +1 -0
  10. package/dist/chunks/{contents-DYBgt7rZ.js → contents-C9eZRig7.js} +2 -2
  11. package/dist/chunks/{contents-DYBgt7rZ.js.map → contents-C9eZRig7.js.map} +1 -1
  12. package/dist/content-contribution.d.ts.map +1 -1
  13. package/dist/content-contributor.d.ts.map +1 -1
  14. package/dist/content-correction.d.ts.map +1 -1
  15. package/dist/content-query.d.ts.map +1 -1
  16. package/dist/content-review.d.ts.map +1 -1
  17. package/dist/content-version.d.ts.map +1 -1
  18. package/dist/content.d.ts.map +1 -1
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +315 -11
  22. package/dist/index.js.map +1 -1
  23. package/dist/manifest.json +795 -59
  24. package/dist/recipes.d.ts +423 -0
  25. package/dist/recipes.d.ts.map +1 -0
  26. package/dist/server.js +1 -1
  27. package/dist/smrt-knowledge.json +613 -79
  28. package/package.json +24 -24
  29. package/dist/chunks/content-corrections-BYT3Qdw5.js.map +0 -1
  30. package/dist/chunks/content-query-jQhfFnhO.js.map +0 -1
  31. package/dist/chunks/content-reviews-B6h2aJ9m.js.map +0 -1
  32. package/dist/chunks/content-versions-BKAWUCzE.js.map +0 -1
@@ -0,0 +1,423 @@
1
+ /**
2
+ * Declared recipes for smrt-content (#4409): user-facing units of
3
+ * functionality an app or agent can pick instead of the whole package.
4
+ * The scanner reads these statics into the `recipes` array of `manifest.json`
5
+ * and `smrt-knowledge.json`; nothing here runs at that point.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import { SmrtRecipe } from '@happyvertical/smrt-core';
10
+ import { Content } from './content.js';
11
+ import { ContentContribution } from './content-contribution.js';
12
+ import { ContentContributor } from './content-contributor.js';
13
+ import { ContentCorrection } from './content-correction.js';
14
+ import { ContentReview } from './content-review.js';
15
+ import { ContentVersion } from './content-version.js';
16
+ /**
17
+ * Articles: Write pieces, publish them, and keep the record straight.
18
+ *
19
+ * The `Article` subclass is closed to the generated surfaces, so the nav
20
+ * entry is the exposed base `Content` narrowed to `type = 'article'`, the
21
+ * value the package's own screens and assistant use for an article.
22
+ */
23
+ export declare class ArticlesRecipe extends SmrtRecipe {
24
+ static id: string;
25
+ static help: string;
26
+ static label: string;
27
+ static summary: string;
28
+ static synonyms: string[];
29
+ static section: {
30
+ id: string;
31
+ label: string;
32
+ icon: string;
33
+ description: string;
34
+ };
35
+ static models: (typeof ContentContributor | typeof ContentReview | typeof ContentVersion | typeof ContentCorrection | typeof Content | typeof ContentContribution)[];
36
+ static nav: ({
37
+ label: string;
38
+ model: typeof Content;
39
+ key: string;
40
+ icon: string;
41
+ description: string;
42
+ noun: string;
43
+ filter: {
44
+ field: string;
45
+ value: string;
46
+ };
47
+ } | {
48
+ label: string;
49
+ model: typeof ContentVersion;
50
+ icon: string;
51
+ description: string;
52
+ noun: string;
53
+ key?: undefined;
54
+ filter?: undefined;
55
+ } | {
56
+ label: string;
57
+ model: typeof ContentCorrection;
58
+ icon: string;
59
+ description: string;
60
+ noun: string;
61
+ key?: undefined;
62
+ filter?: undefined;
63
+ } | {
64
+ label: string;
65
+ model: typeof ContentReview;
66
+ icon: string;
67
+ description: string;
68
+ noun: string;
69
+ key?: undefined;
70
+ filter?: undefined;
71
+ } | {
72
+ label: string;
73
+ model: typeof ContentContribution;
74
+ icon: string;
75
+ description: string;
76
+ noun: string;
77
+ key?: undefined;
78
+ filter?: undefined;
79
+ })[];
80
+ static options: {
81
+ readonly Content: {
82
+ readonly fields: {
83
+ readonly title: {
84
+ readonly order: 1;
85
+ };
86
+ readonly name: {
87
+ readonly label: "Short name";
88
+ readonly order: 2;
89
+ };
90
+ readonly type: {
91
+ readonly label: "Kind";
92
+ readonly order: 3;
93
+ readonly default: "article";
94
+ };
95
+ readonly status: {
96
+ readonly order: 4;
97
+ };
98
+ readonly description: {
99
+ readonly label: "Summary";
100
+ readonly order: 5;
101
+ };
102
+ readonly body: {
103
+ readonly order: 6;
104
+ };
105
+ readonly author: {
106
+ readonly order: 7;
107
+ };
108
+ readonly publish_date: {
109
+ readonly label: "Published on";
110
+ readonly order: 8;
111
+ };
112
+ readonly category: {
113
+ readonly label: "Section";
114
+ readonly order: 9;
115
+ };
116
+ readonly tags: {
117
+ readonly order: 10;
118
+ };
119
+ readonly language: {
120
+ readonly visibility: "advanced";
121
+ };
122
+ readonly state: {
123
+ readonly visibility: "advanced";
124
+ };
125
+ readonly url: {
126
+ readonly label: "Web address";
127
+ readonly visibility: "advanced";
128
+ };
129
+ readonly source: {
130
+ readonly visibility: "advanced";
131
+ };
132
+ readonly original_url: {
133
+ readonly label: "Original web address";
134
+ readonly visibility: "advanced";
135
+ };
136
+ readonly thumbnailAssetId: {
137
+ readonly label: "Picture";
138
+ readonly visibility: "advanced";
139
+ };
140
+ readonly tenantId: {
141
+ readonly visibility: "hidden";
142
+ };
143
+ readonly variant: {
144
+ readonly visibility: "hidden";
145
+ };
146
+ readonly fileKey: {
147
+ readonly visibility: "hidden";
148
+ };
149
+ readonly bodyFormat: {
150
+ readonly visibility: "hidden";
151
+ };
152
+ readonly metadata: {
153
+ readonly visibility: "hidden";
154
+ };
155
+ };
156
+ };
157
+ readonly ContentVersion: {
158
+ readonly fields: {
159
+ readonly contentId: {
160
+ readonly label: "Article";
161
+ readonly order: 1;
162
+ };
163
+ readonly version: {
164
+ readonly label: "Version number";
165
+ readonly order: 2;
166
+ };
167
+ readonly kind: {
168
+ readonly order: 3;
169
+ };
170
+ readonly summary: {
171
+ readonly order: 4;
172
+ };
173
+ readonly title: {
174
+ readonly order: 5;
175
+ };
176
+ readonly status: {
177
+ readonly order: 6;
178
+ };
179
+ readonly createdAt: {
180
+ readonly label: "Saved on";
181
+ readonly order: 7;
182
+ };
183
+ readonly description: {
184
+ readonly label: "Summary at the time";
185
+ readonly visibility: "advanced";
186
+ };
187
+ readonly body: {
188
+ readonly label: "Text at the time";
189
+ readonly visibility: "advanced";
190
+ };
191
+ readonly tenantId: {
192
+ readonly visibility: "hidden";
193
+ };
194
+ readonly snapshot: {
195
+ readonly visibility: "hidden";
196
+ };
197
+ readonly metadata: {
198
+ readonly visibility: "hidden";
199
+ };
200
+ readonly updatedAt: {
201
+ readonly visibility: "hidden";
202
+ };
203
+ };
204
+ };
205
+ readonly ContentCorrection: {
206
+ readonly fields: {
207
+ readonly contentId: {
208
+ readonly label: "Article";
209
+ readonly order: 1;
210
+ };
211
+ readonly correctionType: {
212
+ readonly label: "Kind";
213
+ readonly order: 2;
214
+ };
215
+ readonly status: {
216
+ readonly order: 3;
217
+ };
218
+ readonly summary: {
219
+ readonly order: 4;
220
+ };
221
+ readonly incorrectText: {
222
+ readonly label: "What was wrong";
223
+ readonly order: 5;
224
+ };
225
+ readonly correctedText: {
226
+ readonly label: "What it should say";
227
+ readonly order: 6;
228
+ };
229
+ readonly publicNote: {
230
+ readonly label: "Note to readers";
231
+ readonly order: 7;
232
+ };
233
+ readonly publishedAt: {
234
+ readonly label: "Published on";
235
+ readonly order: 8;
236
+ };
237
+ readonly contentVersionId: {
238
+ readonly label: "Version";
239
+ readonly visibility: "advanced";
240
+ };
241
+ readonly factId: {
242
+ readonly visibility: "hidden";
243
+ };
244
+ readonly replacementFactId: {
245
+ readonly visibility: "hidden";
246
+ };
247
+ readonly tenantId: {
248
+ readonly visibility: "hidden";
249
+ };
250
+ readonly metadata: {
251
+ readonly visibility: "hidden";
252
+ };
253
+ readonly createdAt: {
254
+ readonly visibility: "hidden";
255
+ };
256
+ readonly updatedAt: {
257
+ readonly visibility: "hidden";
258
+ };
259
+ };
260
+ };
261
+ readonly ContentReview: {
262
+ readonly fields: {
263
+ readonly contentId: {
264
+ readonly label: "Article";
265
+ readonly order: 1;
266
+ };
267
+ readonly kind: {
268
+ readonly order: 2;
269
+ };
270
+ readonly policyKey: {
271
+ readonly label: "Policy";
272
+ readonly order: 3;
273
+ };
274
+ readonly status: {
275
+ readonly label: "Outcome";
276
+ readonly order: 4;
277
+ };
278
+ readonly summary: {
279
+ readonly order: 5;
280
+ };
281
+ readonly reviewer: {
282
+ readonly order: 6;
283
+ };
284
+ readonly createdAt: {
285
+ readonly label: "Reviewed on";
286
+ readonly order: 7;
287
+ };
288
+ readonly contentVersionId: {
289
+ readonly label: "Version";
290
+ readonly visibility: "advanced";
291
+ };
292
+ readonly findings: {
293
+ readonly visibility: "hidden";
294
+ };
295
+ readonly tenantId: {
296
+ readonly visibility: "hidden";
297
+ };
298
+ readonly metadata: {
299
+ readonly visibility: "hidden";
300
+ };
301
+ readonly updatedAt: {
302
+ readonly visibility: "hidden";
303
+ };
304
+ };
305
+ };
306
+ readonly ContentContribution: {
307
+ readonly fields: {
308
+ readonly title: {
309
+ readonly order: 1;
310
+ };
311
+ readonly contributorName: {
312
+ readonly label: "From";
313
+ readonly order: 2;
314
+ };
315
+ readonly contributionTypeKey: {
316
+ readonly label: "Kind";
317
+ readonly order: 3;
318
+ };
319
+ readonly status: {
320
+ readonly order: 4;
321
+ };
322
+ readonly channel: {
323
+ readonly label: "Arrived by";
324
+ readonly order: 5;
325
+ };
326
+ readonly description: {
327
+ readonly label: "Summary";
328
+ readonly order: 6;
329
+ };
330
+ readonly body: {
331
+ readonly order: 7;
332
+ };
333
+ readonly editorNotes: {
334
+ readonly label: "Your notes";
335
+ readonly order: 8;
336
+ };
337
+ readonly contributorId: {
338
+ readonly label: "Contributor";
339
+ readonly order: 9;
340
+ };
341
+ readonly contributorEmail: {
342
+ readonly label: "Email";
343
+ readonly visibility: "advanced";
344
+ };
345
+ readonly promotedContentId: {
346
+ readonly label: "Published as";
347
+ readonly visibility: "advanced";
348
+ };
349
+ readonly intakeDecision: {
350
+ readonly visibility: "advanced";
351
+ };
352
+ readonly revisionCount: {
353
+ readonly label: "Times revised";
354
+ readonly visibility: "advanced";
355
+ };
356
+ readonly threadKey: {
357
+ readonly visibility: "hidden";
358
+ };
359
+ readonly sourceMessageId: {
360
+ readonly visibility: "hidden";
361
+ };
362
+ readonly approvedAt: {
363
+ readonly visibility: "hidden";
364
+ };
365
+ readonly promotedAt: {
366
+ readonly visibility: "hidden";
367
+ };
368
+ readonly rejectedAt: {
369
+ readonly visibility: "hidden";
370
+ };
371
+ readonly withdrawnAt: {
372
+ readonly visibility: "hidden";
373
+ };
374
+ readonly requestedChangesAt: {
375
+ readonly visibility: "hidden";
376
+ };
377
+ readonly tenantId: {
378
+ readonly visibility: "hidden";
379
+ };
380
+ readonly metadata: {
381
+ readonly visibility: "hidden";
382
+ };
383
+ readonly createdAt: {
384
+ readonly visibility: "hidden";
385
+ };
386
+ readonly updatedAt: {
387
+ readonly visibility: "hidden";
388
+ };
389
+ };
390
+ };
391
+ readonly ContentContributor: {
392
+ readonly fields: {
393
+ readonly name: {
394
+ readonly order: 1;
395
+ };
396
+ readonly email: {
397
+ readonly order: 2;
398
+ };
399
+ readonly trustLevel: {
400
+ readonly label: "Trust";
401
+ readonly order: 3;
402
+ };
403
+ readonly profileId: {
404
+ readonly label: "Person";
405
+ readonly visibility: "advanced";
406
+ };
407
+ readonly tenantId: {
408
+ readonly visibility: "hidden";
409
+ };
410
+ readonly metadata: {
411
+ readonly visibility: "hidden";
412
+ };
413
+ readonly createdAt: {
414
+ readonly visibility: "hidden";
415
+ };
416
+ readonly updatedAt: {
417
+ readonly visibility: "hidden";
418
+ };
419
+ };
420
+ };
421
+ };
422
+ }
423
+ //# sourceMappingURL=recipes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../src/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAC,EAAE,SAAsB;IAC/B,MAAM,CAAC,IAAI,SAA0B;IACrC,MAAM,CAAC,KAAK,SAAc;IAC1B,MAAM,CAAC,OAAO,SAC8E;IAC5F,MAAM,CAAC,QAAQ,WAQb;IACF,MAAM,CAAC,OAAO;;;;;MAKZ;IACF,MAAM,CAAC,MAAM,wJAOX;IACF,MAAM,CAAC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsCR;IACF,MAAM,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsHH;CACZ"}
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as assertContentQuerySchema, t as CONTENT_QUERY_CLASS_NAME, v as buildContentQuerySchema, w as Content, x as executeContentQuery } from "./chunks/content-query-jQhfFnhO.js";
1
+ import { _ as assertContentQuerySchema, t as CONTENT_QUERY_CLASS_NAME, v as buildContentQuerySchema, w as Content, x as executeContentQuery } from "./chunks/content-query-DxZAmAPW.js";
2
2
  import { MAX_DATA_QUERY_PAGE_LIMIT, createDataQueryFingerprint, normalizeDataQueryRequest, startRestServer } from "@happyvertical/smrt-core";
3
3
  import { createHash } from "node:crypto";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";