@anthusai/papyrus 2.0.0-next.10 → 2.0.0-next.100

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 (230) hide show
  1. package/amplify/auth/resource.js +16 -1
  2. package/amplify/auth/resource.ts +19 -1
  3. package/amplify/data/function-handler.js +20 -0
  4. package/amplify/data/function-handler.ts +40 -0
  5. package/amplify/data/resource.js +152 -62
  6. package/amplify/data/resource.ts +158 -62
  7. package/amplify/data/schema.js +2102 -1986
  8. package/amplify/data/schema.ts +199 -70
  9. package/amplify/functions/assignment-action/data-access.js +2 -0
  10. package/amplify/functions/assignment-action/data-access.ts +2 -0
  11. package/amplify/functions/assignment-action/handler.ts +1 -1
  12. package/amplify/functions/automation-view/handler.py +17 -0
  13. package/amplify/functions/automation-view/resource.js +24 -0
  14. package/amplify/functions/automation-view/resource.ts +34 -0
  15. package/amplify/functions/automation-view/schema.js +26 -0
  16. package/amplify/functions/automation-view/schema.ts +28 -0
  17. package/amplify/functions/automation-view/wire.js +56 -0
  18. package/amplify/functions/automation-view/wire.ts +76 -0
  19. package/amplify/functions/content-actions/handler.py +64 -3
  20. package/amplify/functions/content-actions/requirements.txt +1 -0
  21. package/amplify/functions/content-actions/resource.js +1 -1
  22. package/amplify/functions/content-actions/resource.ts +1 -1
  23. package/amplify/{plugins/editorial-checks/function → functions/editorial-checks}/handler.py +3 -3
  24. package/amplify/functions/editorial-checks/requirements.txt +1 -0
  25. package/amplify/{plugins/editorial-checks/function → functions/editorial-checks}/resource.js +7 -7
  26. package/amplify/{plugins/editorial-checks/function → functions/editorial-checks}/resource.ts +7 -7
  27. package/amplify/functions/editorial-checks/schema.js +122 -0
  28. package/amplify/{plugins → functions}/editorial-checks/schema.ts +40 -12
  29. package/amplify/functions/editorial-checks/wire.js +53 -0
  30. package/amplify/functions/editorial-checks/wire.ts +61 -0
  31. package/amplify/functions/monitoring-view/handler.py +11 -0
  32. package/amplify/functions/monitoring-view/resource.js +24 -0
  33. package/amplify/functions/monitoring-view/resource.ts +34 -0
  34. package/amplify/functions/monitoring-view/schema.js +29 -0
  35. package/amplify/functions/monitoring-view/schema.ts +31 -0
  36. package/amplify/functions/monitoring-view/wire.js +64 -0
  37. package/amplify/functions/monitoring-view/wire.ts +81 -0
  38. package/amplify/functions/public-forms/core.js +247 -0
  39. package/amplify/functions/public-forms/core.ts +310 -0
  40. package/amplify/functions/public-forms/handler.ts +41 -0
  41. package/amplify/functions/public-forms/origins.js +35 -0
  42. package/amplify/functions/public-forms/origins.ts +43 -0
  43. package/amplify/functions/public-forms/resource.js +9 -0
  44. package/amplify/functions/public-forms/resource.ts +10 -0
  45. package/amplify/functions/public-forms/wire.js +25 -0
  46. package/amplify/functions/public-forms/wire.ts +32 -0
  47. package/amplify/functions/shared/editorial-context.ts +63 -4
  48. package/amplify/functions/shared/python-bundle.js +20 -14
  49. package/amplify/functions/shared/python-bundle.ts +25 -18
  50. package/amplify/plugins/newsletter/config.js +245 -0
  51. package/amplify/plugins/newsletter/config.ts +305 -0
  52. package/amplify/plugins/newsletter/function/handler.py +6 -0
  53. package/amplify/plugins/newsletter/function/requirements.txt +5 -0
  54. package/amplify/plugins/newsletter/ops/handler.py +12 -0
  55. package/amplify/plugins/newsletter/ops/resource.js +27 -0
  56. package/amplify/plugins/newsletter/ops/resource.ts +37 -0
  57. package/amplify/plugins/newsletter/papyrus.plugin.js +263 -0
  58. package/amplify/plugins/newsletter/papyrus.plugin.ts +311 -0
  59. package/amplify/plugins/newsletter/schema.js +57 -0
  60. package/amplify/plugins/newsletter/schema.ts +62 -0
  61. package/amplify/plugins/newsletter/secure-string-parameter.js +107 -0
  62. package/amplify/plugins/newsletter/secure-string-parameter.ts +120 -0
  63. package/amplify/plugins/newsletter/sending.js +140 -0
  64. package/amplify/plugins/newsletter/sending.ts +186 -0
  65. package/amplify/plugins/reader-steering/config.js +182 -0
  66. package/amplify/plugins/reader-steering/config.ts +290 -0
  67. package/amplify/plugins/reader-steering/function/ai_moderation.py +246 -0
  68. package/amplify/plugins/reader-steering/function/handler.py +1567 -0
  69. package/amplify/plugins/reader-steering/function/moderation-prompt.md +27 -0
  70. package/amplify/plugins/reader-steering/function/moderation.py +316 -0
  71. package/amplify/plugins/reader-steering/function/proposals.py +458 -0
  72. package/amplify/plugins/reader-steering/function/resource.js +27 -0
  73. package/amplify/plugins/reader-steering/function/resource.ts +35 -0
  74. package/amplify/plugins/reader-steering/papyrus.plugin.js +186 -0
  75. package/amplify/plugins/reader-steering/papyrus.plugin.ts +212 -0
  76. package/amplify/plugins/reader-steering/schema.js +229 -0
  77. package/amplify/plugins/reader-steering/schema.ts +231 -0
  78. package/amplify/plugins/registry.js +4 -2
  79. package/amplify/plugins/registry.ts +4 -2
  80. package/amplify/plugins/signup/schema.js +2 -1
  81. package/amplify/plugins/signup/schema.ts +2 -1
  82. package/amplify/plugins/types.ts +5 -0
  83. package/amplify/plugins/wire.js +1 -0
  84. package/amplify/plugins/wire.ts +1 -0
  85. package/amplify/publication/projection-lease.js +30 -0
  86. package/amplify/publication/projection-lease.ts +39 -0
  87. package/amplify/publication/redirect-and-index.js +105 -0
  88. package/amplify/publication/redirect-rules.js +73 -0
  89. package/amplify/publication/redirect-rules.ts +93 -0
  90. package/amplify/publication/s3-projection.js +7 -1
  91. package/amplify/publication/s3-projection.ts +9 -1
  92. package/amplify/site-backend-config.js +19 -0
  93. package/amplify/site-backend-config.ts +45 -1
  94. package/amplify/site-backend-names.js +4 -2
  95. package/amplify/site-backend-names.ts +4 -2
  96. package/amplify/site-backend.js +46 -4
  97. package/amplify/site-backend.ts +49 -4
  98. package/app/api/auth/prospectus/sign-in/route.ts +4 -0
  99. package/app/api/newsletter/confirm/route.ts +13 -0
  100. package/app/api/newsletter/preferences/route.ts +13 -0
  101. package/app/api/newsletter/state/route.ts +9 -0
  102. package/app/api/newsletter/subscribe/route.ts +9 -0
  103. package/app/api/newsletter/unsubscribe/route.ts +13 -0
  104. package/app/api/newsroom/chat/[...path]/route.ts +17 -0
  105. package/app/api/newsroom/curation/context/route.ts +9 -0
  106. package/app/api/newsroom/curation/priming/route.ts +9 -0
  107. package/app/api/newsroom/curation/publication/route.ts +9 -0
  108. package/app/api/reader/comment/delete/route.ts +9 -0
  109. package/app/api/reader/comment/edit/route.ts +9 -0
  110. package/app/api/reader/comment/route.ts +9 -0
  111. package/app/api/reader/flag/route.ts +9 -0
  112. package/app/api/reader/handle/route.ts +9 -0
  113. package/app/api/reader/me/route.ts +9 -0
  114. package/app/api/reader/rating/route.ts +9 -0
  115. package/app/api/reader/report/route.ts +9 -0
  116. package/app/api/reader/retired/route.ts +9 -0
  117. package/app/api/reader/submit/route.ts +9 -0
  118. package/app/api/reader/vote/route.ts +9 -0
  119. package/app/layout.tsx +5 -1
  120. package/bin/papyrus-infra.mjs +20 -1
  121. package/components/automation-panel.tsx +49 -0
  122. package/components/automation-run-now.tsx +97 -0
  123. package/components/automation-view.tsx +195 -0
  124. package/components/editorial-checks-admin-panel.tsx +38 -13
  125. package/components/moderation-panel.tsx +248 -0
  126. package/components/monitoring-overview-view.tsx +414 -0
  127. package/components/monitoring-panel.tsx +60 -0
  128. package/components/news-desk-client-provider.tsx +18 -18
  129. package/components/news-desk-taxonomy-client.ts +28 -8
  130. package/components/newsletter-panel.tsx +474 -0
  131. package/components/newsletter-sections.tsx +163 -0
  132. package/components/newsroom-access-gate.tsx +16 -2
  133. package/components/newsroom-article-editor.tsx +11 -11
  134. package/components/newsroom-articles-view.tsx +6 -6
  135. package/components/newsroom-assignment-detail.tsx +6 -6
  136. package/components/newsroom-board-view.tsx +8 -3
  137. package/components/newsroom-curation-bootstrap.tsx +45 -0
  138. package/components/newsroom-ops-overview.tsx +26 -96
  139. package/components/newsroom-ops-shell.tsx +2 -2
  140. package/components/newsroom-organizer.css +33 -0
  141. package/components/newsroom-overview-skeleton.tsx +25 -0
  142. package/components/newsroom-references-view.tsx +192 -49
  143. package/components/notification-center.tsx +281 -0
  144. package/components/papyrus-console-conversation.css +14 -0
  145. package/components/papyrus-console-conversation.tsx +55 -0
  146. package/components/papyrus-console-shell.tsx +62 -420
  147. package/components/papyrus-private-chat-panel.tsx +134 -0
  148. package/components/publication-cyclotron-panel.tsx +15 -10
  149. package/components/reader-auth-state.ts +1 -1
  150. package/components/reference-add-entry.tsx +75 -0
  151. package/components/reference-curation-controls.tsx +31 -22
  152. package/components/reference-cyclotron-priming.tsx +58 -19
  153. package/components/reference-cyclotron-suggestion.tsx +10 -6
  154. package/components/reference-priming.tsx +14 -10
  155. package/components/reference-relevance-review.tsx +3 -3
  156. package/components/reference-section-suggestion.tsx +1 -1
  157. package/components/topic-steering-workspace.tsx +237 -158
  158. package/components/use-editorial-checks.ts +12 -10
  159. package/infra/amplify-app-shell.js +96 -16
  160. package/infra/amplify-app-shell.ts +108 -18
  161. package/infra/cloud-email-config.js +32 -0
  162. package/infra/cloud-email-config.ts +39 -0
  163. package/infra/cloud-email.js +57 -0
  164. package/infra/cloud-email.test.js +69 -0
  165. package/infra/cloud-email.test.ts +66 -0
  166. package/infra/cloud-email.ts +60 -0
  167. package/infra/index.js +1 -0
  168. package/infra/secure-string-parameter-handler.js +41 -0
  169. package/infra/secure-string-parameter-handler.ts +41 -0
  170. package/infra/secure-string-parameter.js +79 -0
  171. package/infra/secure-string-parameter.ts +91 -0
  172. package/infra/site-config.js +92 -6
  173. package/infra/site-config.ts +138 -6
  174. package/lib/automation-client.ts +54 -0
  175. package/lib/automation-fixture.ts +93 -0
  176. package/lib/automation-overview.ts +252 -0
  177. package/lib/category-repository.ts +14 -12
  178. package/lib/console-web-context.ts +1 -1
  179. package/lib/curation-routes.ts +345 -0
  180. package/lib/cyclotron-suggestions.ts +4 -4
  181. package/lib/editorial-checks-backend.ts +1 -1
  182. package/lib/editorial-checks-client.ts +19 -1
  183. package/lib/editorial-checks-demo.ts +2 -2
  184. package/lib/editorial-checks-settings.ts +3 -0
  185. package/lib/editorial-checks.ts +8 -11
  186. package/lib/editorial-preview.ts +5 -5
  187. package/lib/monitoring-client.ts +83 -0
  188. package/lib/monitoring-overview-fixture.ts +51 -0
  189. package/lib/monitoring-overview.ts +188 -0
  190. package/lib/news-desk-session.ts +12 -21
  191. package/lib/newsletter-api.ts +418 -0
  192. package/lib/newsletter-client.ts +46 -0
  193. package/lib/newsletter-fixture.ts +184 -0
  194. package/lib/newsletter-model.ts +202 -0
  195. package/lib/newsroom-demo-dashboard.ts +1 -1
  196. package/lib/newsroom-nav.ts +1 -1
  197. package/lib/newsroom-organizer-nav.ts +2 -1
  198. package/lib/papyrus-chat-admission.ts +65 -0
  199. package/lib/papyrus-hosted-chat.ts +217 -0
  200. package/lib/papyrus-private-chat-client.ts +81 -0
  201. package/lib/prospectus-session.ts +30 -14
  202. package/lib/prospectus-sign-in-routes.ts +106 -31
  203. package/lib/prospectus-site-identity.ts +46 -6
  204. package/lib/reader-api.ts +145 -0
  205. package/lib/reader-moderation.ts +220 -0
  206. package/lib/reader-retirement-route.ts +89 -0
  207. package/lib/reader-subject.md +29 -0
  208. package/lib/reader-subject.ts +53 -0
  209. package/lib/reference-review-details.ts +71 -0
  210. package/lib/reference-review-request.ts +14 -0
  211. package/lib/relevance-decisions.ts +42 -10
  212. package/lib/relevance-status.ts +2 -2
  213. package/lib/review-client.ts +120 -0
  214. package/lib/review-fixture.ts +45 -0
  215. package/lib/review-requests.ts +246 -0
  216. package/lib/semantic-graph.ts +2 -0
  217. package/lib/shared-chat-admission.ts +182 -0
  218. package/lib/site-brand-tenant.ts +11 -6
  219. package/lib/site-brand.ts +6 -3
  220. package/lib/site-origin-value.ts +50 -0
  221. package/lib/site-origin.ts +8 -0
  222. package/lib/use-reference-review-data.ts +44 -0
  223. package/middleware.ts +14 -3
  224. package/package.json +65 -3
  225. package/routes.manifest.json +227 -2
  226. package/src/with-papyrus.mjs +1 -1
  227. package/amplify/plugins/editorial-checks/function/requirements.txt +0 -1
  228. package/amplify/plugins/editorial-checks/papyrus.plugin.js +0 -71
  229. package/amplify/plugins/editorial-checks/papyrus.plugin.ts +0 -87
  230. package/amplify/plugins/editorial-checks/schema.js +0 -94
@@ -0,0 +1,50 @@
1
+ import type { NextRequest } from "next/server";
2
+ import { getSiteEnv } from "./site-env";
3
+
4
+ type EnvironmentVariables = Record<string, string | undefined>;
5
+
6
+ export const SITE_ORIGIN_ENV = "PAPYRUS_SITE_ORIGIN";
7
+
8
+ export class SiteOriginNotConfiguredError extends Error {
9
+ readonly status = 503;
10
+ readonly code = "site_origin_not_configured";
11
+ }
12
+
13
+ function isLoopbackHostname(hostname: string): boolean {
14
+ return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "[::1]";
15
+ }
16
+
17
+ function configuredOrigin(value: string): string {
18
+ const invalid = () => new SiteOriginNotConfiguredError(`${SITE_ORIGIN_ENV} must be an https origin such as https://example.com with no path.`);
19
+ let parsed: URL;
20
+ try {
21
+ parsed = new URL(value);
22
+ } catch {
23
+ throw invalid();
24
+ }
25
+ if (parsed.protocol !== "https:" || parsed.origin !== value) throw invalid();
26
+ return parsed.origin;
27
+ }
28
+
29
+ function siteEnvOrNull(environment: EnvironmentVariables): string | null {
30
+ try {
31
+ return getSiteEnv(environment);
32
+ } catch {
33
+ return null;
34
+ }
35
+ }
36
+
37
+ /** The site's public origin from trusted configuration, never Host or forwarded headers. */
38
+ export function publicSiteOrigin(request: Pick<NextRequest, "nextUrl">, environment: EnvironmentVariables = process.env): string {
39
+ const configured = (environment[SITE_ORIGIN_ENV] ?? "").trim();
40
+ if (configured) return configuredOrigin(configured);
41
+ const { hostname, origin } = request.nextUrl;
42
+ const developing = siteEnvOrNull(environment) === "development" && environment.NODE_ENV !== "production";
43
+ if (isLoopbackHostname(hostname) && developing) return origin;
44
+ throw new SiteOriginNotConfiguredError(`${SITE_ORIGIN_ENV} is not set; this site cannot tell its public origin.`);
45
+ }
46
+
47
+ /** An absolute URL on the site's trusted public origin. */
48
+ export function publicSiteUrl(path: string, request: Pick<NextRequest, "nextUrl">, environment: EnvironmentVariables = process.env): URL {
49
+ return new URL(path, publicSiteOrigin(request, environment));
50
+ }
@@ -0,0 +1,8 @@
1
+ import { NextResponse } from "next/server";
2
+ import { SiteOriginNotConfiguredError } from "./site-origin-value";
3
+
4
+ export { SITE_ORIGIN_ENV, SiteOriginNotConfiguredError, publicSiteOrigin, publicSiteUrl } from "./site-origin-value";
5
+
6
+ export function siteOriginNotConfiguredResponse(error: SiteOriginNotConfiguredError): NextResponse {
7
+ return NextResponse.json({ error: error.code, message: error.message }, { status: error.status, headers: { "cache-control": "no-store" } });
8
+ }
@@ -0,0 +1,44 @@
1
+ "use client";
2
+
3
+ import { useCallback, useEffect, useState } from "react";
4
+
5
+ /** Load persisted predictions and attributed review history without cancelling on a loading rerender. */
6
+ export function useReferenceReviewData<Relation, Message>({
7
+ enabled,
8
+ loadRelations,
9
+ loadMessages,
10
+ onRelations,
11
+ onMessages,
12
+ }: {
13
+ enabled: boolean;
14
+ loadRelations: () => Promise<Relation[]>;
15
+ loadMessages: () => Promise<Message[]>;
16
+ onRelations: (relations: Relation[]) => void;
17
+ onMessages: (messages: Message[]) => void;
18
+ }) {
19
+ const [state, setState] = useState<"loading" | "ready" | "error">(enabled ? "loading" : "ready");
20
+ const [error, setError] = useState<string | null>(null);
21
+ const [attempt, setAttempt] = useState(0);
22
+ const retry = useCallback(() => setAttempt((current) => current + 1), []);
23
+ useEffect(() => {
24
+ if (!enabled) return;
25
+ let active = true;
26
+ setState("loading");
27
+ setError(null);
28
+ void Promise.allSettled([loadRelations(), loadMessages()]).then(([relations, history]) => {
29
+ if (!active) return;
30
+ if (relations.status === "fulfilled") onRelations(relations.value);
31
+ if (history.status === "fulfilled") onMessages(history.value);
32
+ const failure = relations.status === "rejected" ? relations.reason : history.status === "rejected" ? history.reason : null;
33
+ if (failure) {
34
+ const subject = relations.status === "rejected" ? "Predictions" : "Review history";
35
+ setError(`${subject} could not be loaded. ${failure instanceof Error ? failure.message : "Try again."}`);
36
+ setState("error");
37
+ } else {
38
+ setState("ready");
39
+ }
40
+ });
41
+ return () => { active = false; };
42
+ }, [enabled, loadRelations, loadMessages, onRelations, onMessages, attempt]);
43
+ return { state, error, retry };
44
+ }
package/middleware.ts CHANGED
@@ -5,6 +5,7 @@ import { newsroomHref } from "./lib/newsroom-base-path";
5
5
  import { getReaderBasePath } from "./lib/reader-base-path";
6
6
  import { isStagingGatedPath, isStaticOrApiPath } from "./lib/staging-gated-path";
7
7
  import { getSiteEnv, isIndexable } from "./lib/site-env";
8
+ import { SiteOriginNotConfiguredError, publicSiteUrl, siteOriginNotConfiguredResponse } from "./lib/site-origin";
8
9
  import { getStagingAccess } from "./lib/staging-gate";
9
10
  import {
10
11
  isPreviewGatedPath,
@@ -38,11 +39,11 @@ function routeRequest(request: NextRequest): NextResponse {
38
39
  }
39
40
 
40
41
  if (pathname === "/newsroom" || pathname === "/newsroom/") {
41
- return NextResponse.redirect(new URL(`/${request.nextUrl.search}`, request.url));
42
+ return NextResponse.redirect(publicSiteUrl(`/${request.nextUrl.search}`, request));
42
43
  }
43
44
  if (pathname.startsWith("/newsroom/")) {
44
45
  const target = pathname.slice("/newsroom".length) || "/";
45
- return NextResponse.redirect(new URL(`${target}${request.nextUrl.search}`, request.url));
46
+ return NextResponse.redirect(publicSiteUrl(`${target}${request.nextUrl.search}`, request));
46
47
  }
47
48
 
48
49
  if (pathname === "/" || pathname === "") {
@@ -59,6 +60,16 @@ function routeRequest(request: NextRequest): NextResponse {
59
60
  }
60
61
 
61
62
  export async function middleware(request: NextRequest): Promise<NextResponse> {
63
+ try {
64
+ return await handleRequest(request);
65
+ } catch (error) {
66
+ // Redirects name the site's public origin (request.url is localhost on Amplify); without it, fail closed.
67
+ if (error instanceof SiteOriginNotConfiguredError) return withRobotsHeader(siteOriginNotConfiguredResponse(error));
68
+ throw error;
69
+ }
70
+ }
71
+
72
+ async function handleRequest(request: NextRequest): Promise<NextResponse> {
62
73
  let sessionResponse: NextResponse | null = null;
63
74
  const { pathname } = request.nextUrl;
64
75
  const gated = isStaticPreviewEnabled()
@@ -68,7 +79,7 @@ export async function middleware(request: NextRequest): Promise<NextResponse> {
68
79
  sessionResponse = NextResponse.next();
69
80
  const access = await getStagingAccess(request, sessionResponse);
70
81
  if (access === "anonymous") {
71
- return withRobotsHeader(NextResponse.redirect(new URL(newsroomHref(), request.url)));
82
+ return withRobotsHeader(NextResponse.redirect(publicSiteUrl(newsroomHref(), request)));
72
83
  }
73
84
  if (access === "forbidden") {
74
85
  return withRobotsHeader(new NextResponse("Staging is limited to editors and admins.", { status: 403 }));
package/package.json CHANGED
@@ -75,6 +75,9 @@
75
75
  "./components/archive-grid": "./components/archive-grid.tsx",
76
76
  "./components/archive-shell": "./components/archive-shell.tsx",
77
77
  "./components/article-video": "./components/article-video.tsx",
78
+ "./components/automation-panel": "./components/automation-panel.tsx",
79
+ "./components/automation-run-now": "./components/automation-run-now.tsx",
80
+ "./components/automation-view": "./components/automation-view.tsx",
78
81
  "./components/blog-page-background": "./components/blog-page-background.tsx",
79
82
  "./components/curation-delegation-client": "./components/curation-delegation-client.ts",
80
83
  "./components/dev-sandbox-editor-sign-in": "./components/dev-sandbox-editor-sign-in.tsx",
@@ -85,9 +88,14 @@
85
88
  "./components/item-stream-view": "./components/item-stream-view.tsx",
86
89
  "./components/markus-body-editor": "./components/markus-body-editor.tsx",
87
90
  "./components/markus-ir-preview": "./components/markus-ir-preview.tsx",
91
+ "./components/moderation-panel": "./components/moderation-panel.tsx",
92
+ "./components/monitoring-overview-view": "./components/monitoring-overview-view.tsx",
93
+ "./components/monitoring-panel": "./components/monitoring-panel.tsx",
88
94
  "./components/news-desk-client-provider": "./components/news-desk-client-provider.tsx",
89
95
  "./components/news-desk-page": "./components/news-desk-page.tsx",
90
96
  "./components/news-desk-taxonomy-client": "./components/news-desk-taxonomy-client.ts",
97
+ "./components/newsletter-panel": "./components/newsletter-panel.tsx",
98
+ "./components/newsletter-sections": "./components/newsletter-sections.tsx",
91
99
  "./components/newspaper": "./components/newspaper.tsx",
92
100
  "./components/newsroom-access-gate": "./components/newsroom-access-gate.tsx",
93
101
  "./components/newsroom-article-editor": "./components/newsroom-article-editor.tsx",
@@ -96,9 +104,11 @@
96
104
  "./components/newsroom-assignments-view": "./components/newsroom-assignments-view.tsx",
97
105
  "./components/newsroom-board-view": "./components/newsroom-board-view.tsx",
98
106
  "./components/newsroom-client-shell": "./components/newsroom-client-shell.tsx",
107
+ "./components/newsroom-curation-bootstrap": "./components/newsroom-curation-bootstrap.tsx",
99
108
  "./components/newsroom-curation-provider": "./components/newsroom-curation-provider.tsx",
100
109
  "./components/newsroom-ops-overview": "./components/newsroom-ops-overview.tsx",
101
110
  "./components/newsroom-ops-shell": "./components/newsroom-ops-shell.tsx",
111
+ "./components/newsroom-overview-skeleton": "./components/newsroom-overview-skeleton.tsx",
102
112
  "./components/newsroom-references-view": "./components/newsroom-references-view.tsx",
103
113
  "./components/newsroom-theme-fonts/broadsheet-green": "./components/newsroom-theme-fonts/broadsheet-green.tsx",
104
114
  "./components/newsroom-theme-fonts/newspaper-gothic": "./components/newsroom-theme-fonts/newspaper-gothic.tsx",
@@ -106,7 +116,10 @@
106
116
  "./components/newsroom-theme-fonts/refined-newsprint": "./components/newsroom-theme-fonts/refined-newsprint.tsx",
107
117
  "./components/newsroom-theme": "./components/newsroom-theme.tsx",
108
118
  "./components/newsroom-topics-view": "./components/newsroom-topics-view.tsx",
119
+ "./components/notification-center": "./components/notification-center.tsx",
120
+ "./components/papyrus-console-conversation": "./components/papyrus-console-conversation.tsx",
109
121
  "./components/papyrus-console-shell": "./components/papyrus-console-shell.tsx",
122
+ "./components/papyrus-private-chat-panel": "./components/papyrus-private-chat-panel.tsx",
110
123
  "./components/pictogram-figure": "./components/pictogram-figure.tsx",
111
124
  "./components/presentation-footer": "./components/presentation-footer.tsx",
112
125
  "./components/presentation-header": "./components/presentation-header.tsx",
@@ -118,6 +131,7 @@
118
131
  "./components/reader-auth-state": "./components/reader-auth-state.ts",
119
132
  "./components/reader-settings": "./components/reader-settings.ts",
120
133
  "./components/reader-theme-control": "./components/reader-theme-control.tsx",
134
+ "./components/reference-add-entry": "./components/reference-add-entry.tsx",
121
135
  "./components/reference-curation-controls": "./components/reference-curation-controls.tsx",
122
136
  "./components/reference-cyclotron-priming": "./components/reference-cyclotron-priming.tsx",
123
137
  "./components/reference-cyclotron-status": "./components/reference-cyclotron-status.tsx",
@@ -169,6 +183,9 @@
169
183
  "./lib/article-flow": "./lib/article-flow.ts",
170
184
  "./lib/article-frame-solver": "./lib/article-frame-solver.ts",
171
185
  "./lib/articles": "./lib/articles.ts",
186
+ "./lib/automation-client": "./lib/automation-client.ts",
187
+ "./lib/automation-fixture": "./lib/automation-fixture.ts",
188
+ "./lib/automation-overview": "./lib/automation-overview.ts",
172
189
  "./lib/blog-feature-solver": "./lib/blog-feature-solver.ts",
173
190
  "./lib/blog-rhythm": "./lib/blog-rhythm.ts",
174
191
  "./lib/brand-fonts-watch": "./lib/brand-fonts-watch.ts",
@@ -188,6 +205,7 @@
188
205
  "./lib/content-types": "./lib/content-types.ts",
189
206
  "./lib/curation-client": "./lib/curation-client.ts",
190
207
  "./lib/curation-delegation-helpers": "./lib/curation-delegation-helpers.ts",
208
+ "./lib/curation-routes": "./lib/curation-routes.ts",
191
209
  "./lib/cyclotron-suggestions": "./lib/cyclotron-suggestions.ts",
192
210
  "./lib/define-site": "./lib/define-site.ts",
193
211
  "./lib/demo-amplify-outputs": "./lib/demo-amplify-outputs.ts",
@@ -224,7 +242,14 @@
224
242
  "./lib/markus-projection": "./lib/markus-projection.ts",
225
243
  "./lib/markus-to-article": "./lib/markus-to-article.ts",
226
244
  "./lib/media-route-response": "./lib/media-route-response.ts",
245
+ "./lib/monitoring-client": "./lib/monitoring-client.ts",
246
+ "./lib/monitoring-overview-fixture": "./lib/monitoring-overview-fixture.ts",
247
+ "./lib/monitoring-overview": "./lib/monitoring-overview.ts",
227
248
  "./lib/news-desk-session": "./lib/news-desk-session.ts",
249
+ "./lib/newsletter-api": "./lib/newsletter-api.ts",
250
+ "./lib/newsletter-client": "./lib/newsletter-client.ts",
251
+ "./lib/newsletter-fixture": "./lib/newsletter-fixture.ts",
252
+ "./lib/newsletter-model": "./lib/newsletter-model.ts",
228
253
  "./lib/newspaper-layout": "./lib/newspaper-layout.ts",
229
254
  "./lib/newsroom-articles": "./lib/newsroom-articles.ts",
230
255
  "./lib/newsroom-assignments": "./lib/newsroom-assignments.ts",
@@ -248,7 +273,10 @@
248
273
  "./lib/newsroom-sections": "./lib/newsroom-sections.ts",
249
274
  "./lib/newsroom-topics": "./lib/newsroom-topics.ts",
250
275
  "./lib/oauth-redirect-priority": "./lib/oauth-redirect-priority.ts",
276
+ "./lib/papyrus-chat-admission": "./lib/papyrus-chat-admission.ts",
277
+ "./lib/papyrus-hosted-chat": "./lib/papyrus-hosted-chat.ts",
251
278
  "./lib/papyrus-object-kinds": "./lib/papyrus-object-kinds.ts",
279
+ "./lib/papyrus-private-chat-client": "./lib/papyrus-private-chat-client.ts",
252
280
  "./lib/papyrus-web-locations": "./lib/papyrus-web-locations.ts",
253
281
  "./lib/pilobol-sample": "./lib/pilobol-sample.ts",
254
282
  "./lib/plugin-settings": "./lib/plugin-settings.ts",
@@ -265,13 +293,19 @@
265
293
  "./lib/publication-cyclotron": "./lib/publication-cyclotron.ts",
266
294
  "./lib/publication-items": "./lib/publication-items.ts",
267
295
  "./lib/rate-limit-retry": "./lib/rate-limit-retry.ts",
296
+ "./lib/reader-api": "./lib/reader-api.ts",
268
297
  "./lib/reader-base-path": "./lib/reader-base-path.ts",
269
298
  "./lib/reader-cache-lifetime": "./lib/reader-cache-lifetime.ts",
299
+ "./lib/reader-moderation": "./lib/reader-moderation.ts",
300
+ "./lib/reader-retirement-route": "./lib/reader-retirement-route.ts",
270
301
  "./lib/reader-route-config": "./lib/reader-route-config.ts",
271
302
  "./lib/reader-static-params": "./lib/reader-static-params.ts",
272
303
  "./lib/reader-storage-url": "./lib/reader-storage-url.ts",
304
+ "./lib/reader-subject": "./lib/reader-subject.ts",
273
305
  "./lib/reference-display": "./lib/reference-display.ts",
274
306
  "./lib/reference-policy": "./lib/reference-policy.ts",
307
+ "./lib/reference-review-details": "./lib/reference-review-details.ts",
308
+ "./lib/reference-review-request": "./lib/reference-review-request.ts",
275
309
  "./lib/reference-source-preview": "./lib/reference-source-preview.ts",
276
310
  "./lib/relevance-decisions": "./lib/relevance-decisions.ts",
277
311
  "./lib/relevance-status": "./lib/relevance-status.ts",
@@ -280,14 +314,20 @@
280
314
  "./lib/reporting-story-budget": "./lib/reporting-story-budget.ts",
281
315
  "./lib/revalidate-prewarm": "./lib/revalidate-prewarm.ts",
282
316
  "./lib/revalidate-secret": "./lib/revalidate-secret.ts",
317
+ "./lib/review-client": "./lib/review-client.ts",
318
+ "./lib/review-fixture": "./lib/review-fixture.ts",
319
+ "./lib/review-requests": "./lib/review-requests.ts",
283
320
  "./lib/robots-policy": "./lib/robots-policy.ts",
284
321
  "./lib/root-route-redirect": "./lib/root-route-redirect.ts",
285
322
  "./lib/semantic-graph": "./lib/semantic-graph.ts",
323
+ "./lib/shared-chat-admission": "./lib/shared-chat-admission.ts",
286
324
  "./lib/shared-credentials-provider": "./lib/shared-credentials-provider.ts",
287
325
  "./lib/signup-csv": "./lib/signup-csv.ts",
288
326
  "./lib/site-brand-tenant": "./lib/site-brand-tenant.ts",
289
327
  "./lib/site-brand": "./lib/site-brand.ts",
290
328
  "./lib/site-env": "./lib/site-env.ts",
329
+ "./lib/site-origin-value": "./lib/site-origin-value.ts",
330
+ "./lib/site-origin": "./lib/site-origin.ts",
291
331
  "./lib/site-renderer": "./lib/site-renderer.ts",
292
332
  "./lib/site-section-suggestions": "./lib/site-section-suggestions.ts",
293
333
  "./lib/site-stack": "./lib/site-stack.ts",
@@ -299,6 +339,7 @@
299
339
  "./lib/test-editor-override": "./lib/test-editor-override.ts",
300
340
  "./lib/text-columns": "./lib/text-columns.ts",
301
341
  "./lib/themed-image": "./lib/themed-image.ts",
342
+ "./lib/use-reference-review-data": "./lib/use-reference-review-data.ts",
302
343
  "./lib/utils": "./lib/utils.ts",
303
344
  "./lib/video-loading": "./lib/video-loading.ts",
304
345
  "./lib/video-mode": "./lib/video-mode.ts",
@@ -330,6 +371,26 @@
330
371
  "./app/api/local-preview/derive/route": "./app/api/local-preview/derive/route.ts",
331
372
  "./app/api/local-preview/media/route": "./app/api/local-preview/media/route.ts",
332
373
  "./app/api/media/[...path]/route": "./app/api/media/[...path]/route.ts",
374
+ "./app/api/newsletter/confirm/route": "./app/api/newsletter/confirm/route.ts",
375
+ "./app/api/newsletter/preferences/route": "./app/api/newsletter/preferences/route.ts",
376
+ "./app/api/newsletter/state/route": "./app/api/newsletter/state/route.ts",
377
+ "./app/api/newsletter/subscribe/route": "./app/api/newsletter/subscribe/route.ts",
378
+ "./app/api/newsletter/unsubscribe/route": "./app/api/newsletter/unsubscribe/route.ts",
379
+ "./app/api/newsroom/chat/[...path]/route": "./app/api/newsroom/chat/[...path]/route.ts",
380
+ "./app/api/newsroom/curation/context/route": "./app/api/newsroom/curation/context/route.ts",
381
+ "./app/api/newsroom/curation/priming/route": "./app/api/newsroom/curation/priming/route.ts",
382
+ "./app/api/newsroom/curation/publication/route": "./app/api/newsroom/curation/publication/route.ts",
383
+ "./app/api/reader/comment/delete/route": "./app/api/reader/comment/delete/route.ts",
384
+ "./app/api/reader/comment/edit/route": "./app/api/reader/comment/edit/route.ts",
385
+ "./app/api/reader/comment/route": "./app/api/reader/comment/route.ts",
386
+ "./app/api/reader/flag/route": "./app/api/reader/flag/route.ts",
387
+ "./app/api/reader/handle/route": "./app/api/reader/handle/route.ts",
388
+ "./app/api/reader/me/route": "./app/api/reader/me/route.ts",
389
+ "./app/api/reader/rating/route": "./app/api/reader/rating/route.ts",
390
+ "./app/api/reader/report/route": "./app/api/reader/report/route.ts",
391
+ "./app/api/reader/retired/route": "./app/api/reader/retired/route.ts",
392
+ "./app/api/reader/submit/route": "./app/api/reader/submit/route.ts",
393
+ "./app/api/reader/vote/route": "./app/api/reader/vote/route.ts",
333
394
  "./app/api/revalidate/route": "./app/api/revalidate/route.ts",
334
395
  "./app/archive/page": "./app/archive/page.tsx",
335
396
  "./app/articles/[slug]/page": "./app/articles/[slug]/page.tsx",
@@ -395,14 +456,14 @@
395
456
  "optional": true
396
457
  }
397
458
  },
398
- "version": "2.0.0-next.10",
459
+ "version": "2.0.0-next.100",
399
460
  "dependencies": {
400
461
  "@aws-amplify/adapter-nextjs": "^1.7.3",
401
462
  "@aws-crypto/sha256-js": "5.2.0",
402
463
  "@aws-sdk/client-cognito-identity-provider": "3.1045.0",
464
+ "@aws-sdk/client-dynamodb": "^3.1045.0",
403
465
  "@aws-sdk/client-lambda": "^3.1045.0",
404
466
  "@aws-sdk/client-s3": "^3.1045.0",
405
- "@aws-sdk/client-secrets-manager": "3.1045.0",
406
467
  "@aws-sdk/client-ssm": "^3.1045.0",
407
468
  "@aws-sdk/credential-provider-node": "3.972.84",
408
469
  "@aws-sdk/s3-request-presigner": "^3.1045.0",
@@ -432,10 +493,11 @@
432
493
  "anthus-vultus": "github:AnthusAI/Vultus#af98d57",
433
494
  "aws-amplify": "^6.17.0",
434
495
  "aws-jwt-verify": "4.0.1",
496
+ "chatticus": "https://github.com/AnthusAI/Chatticus/archive/db862e386119f97922cf303fd00ef0505d86a08a.tar.gz",
435
497
  "class-variance-authority": "^0.7.1",
436
498
  "clsx": "^2.1.1",
437
499
  "cmdk": "^1.1.1",
438
- "cyclotron": "https://github.com/AnthusAI/Cyclotron/releases/download/ui-v0.2.2/cyclotron-0.2.2.tgz",
500
+ "cyclotron": "https://github.com/AnthusAI/Cyclotron/releases/download/ui-v0.2.3/cyclotron-0.2.3.tgz",
439
501
  "d3": "^7.9.0",
440
502
  "esbuild": "^0.28.2",
441
503
  "framer-motion": "^14.3.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-next.10",
2
+ "version": "2.0.0-next.100",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",
@@ -114,7 +114,8 @@
114
114
  "file": "app/api/auth/prospectus/sign-in/route.ts",
115
115
  "hasDefault": false,
116
116
  "exports": [
117
- "GET"
117
+ "GET",
118
+ "POST"
118
119
  ],
119
120
  "config": {
120
121
  "dynamic": "\"force-dynamic\"",
@@ -170,6 +171,230 @@
170
171
  "dynamic": "\"force-dynamic\""
171
172
  }
172
173
  },
174
+ {
175
+ "file": "app/api/newsletter/confirm/route.ts",
176
+ "hasDefault": false,
177
+ "exports": [
178
+ "GET",
179
+ "POST"
180
+ ],
181
+ "config": {
182
+ "dynamic": "\"force-dynamic\"",
183
+ "runtime": "\"nodejs\""
184
+ }
185
+ },
186
+ {
187
+ "file": "app/api/newsletter/preferences/route.ts",
188
+ "hasDefault": false,
189
+ "exports": [
190
+ "GET",
191
+ "POST"
192
+ ],
193
+ "config": {
194
+ "dynamic": "\"force-dynamic\"",
195
+ "runtime": "\"nodejs\""
196
+ }
197
+ },
198
+ {
199
+ "file": "app/api/newsletter/state/route.ts",
200
+ "hasDefault": false,
201
+ "exports": [
202
+ "GET"
203
+ ],
204
+ "config": {
205
+ "dynamic": "\"force-dynamic\"",
206
+ "runtime": "\"nodejs\""
207
+ }
208
+ },
209
+ {
210
+ "file": "app/api/newsletter/subscribe/route.ts",
211
+ "hasDefault": false,
212
+ "exports": [
213
+ "POST"
214
+ ],
215
+ "config": {
216
+ "dynamic": "\"force-dynamic\"",
217
+ "runtime": "\"nodejs\""
218
+ }
219
+ },
220
+ {
221
+ "file": "app/api/newsletter/unsubscribe/route.ts",
222
+ "hasDefault": false,
223
+ "exports": [
224
+ "GET",
225
+ "POST"
226
+ ],
227
+ "config": {
228
+ "dynamic": "\"force-dynamic\"",
229
+ "runtime": "\"nodejs\""
230
+ }
231
+ },
232
+ {
233
+ "file": "app/api/newsroom/chat/[...path]/route.ts",
234
+ "hasDefault": false,
235
+ "exports": [
236
+ "GET",
237
+ "POST"
238
+ ],
239
+ "config": {
240
+ "dynamic": "\"force-dynamic\"",
241
+ "runtime": "\"nodejs\""
242
+ }
243
+ },
244
+ {
245
+ "file": "app/api/newsroom/curation/context/route.ts",
246
+ "hasDefault": false,
247
+ "exports": [
248
+ "GET"
249
+ ],
250
+ "config": {
251
+ "dynamic": "\"force-dynamic\"",
252
+ "runtime": "\"nodejs\""
253
+ }
254
+ },
255
+ {
256
+ "file": "app/api/newsroom/curation/priming/route.ts",
257
+ "hasDefault": false,
258
+ "exports": [
259
+ "POST"
260
+ ],
261
+ "config": {
262
+ "dynamic": "\"force-dynamic\"",
263
+ "runtime": "\"nodejs\""
264
+ }
265
+ },
266
+ {
267
+ "file": "app/api/newsroom/curation/publication/route.ts",
268
+ "hasDefault": false,
269
+ "exports": [
270
+ "POST"
271
+ ],
272
+ "config": {
273
+ "dynamic": "\"force-dynamic\"",
274
+ "runtime": "\"nodejs\""
275
+ }
276
+ },
277
+ {
278
+ "file": "app/api/reader/comment/delete/route.ts",
279
+ "hasDefault": false,
280
+ "exports": [
281
+ "POST"
282
+ ],
283
+ "config": {
284
+ "dynamic": "\"force-dynamic\"",
285
+ "runtime": "\"nodejs\""
286
+ }
287
+ },
288
+ {
289
+ "file": "app/api/reader/comment/edit/route.ts",
290
+ "hasDefault": false,
291
+ "exports": [
292
+ "POST"
293
+ ],
294
+ "config": {
295
+ "dynamic": "\"force-dynamic\"",
296
+ "runtime": "\"nodejs\""
297
+ }
298
+ },
299
+ {
300
+ "file": "app/api/reader/comment/route.ts",
301
+ "hasDefault": false,
302
+ "exports": [
303
+ "POST"
304
+ ],
305
+ "config": {
306
+ "dynamic": "\"force-dynamic\"",
307
+ "runtime": "\"nodejs\""
308
+ }
309
+ },
310
+ {
311
+ "file": "app/api/reader/flag/route.ts",
312
+ "hasDefault": false,
313
+ "exports": [
314
+ "POST"
315
+ ],
316
+ "config": {
317
+ "dynamic": "\"force-dynamic\"",
318
+ "runtime": "\"nodejs\""
319
+ }
320
+ },
321
+ {
322
+ "file": "app/api/reader/handle/route.ts",
323
+ "hasDefault": false,
324
+ "exports": [
325
+ "POST"
326
+ ],
327
+ "config": {
328
+ "dynamic": "\"force-dynamic\"",
329
+ "runtime": "\"nodejs\""
330
+ }
331
+ },
332
+ {
333
+ "file": "app/api/reader/me/route.ts",
334
+ "hasDefault": false,
335
+ "exports": [
336
+ "GET"
337
+ ],
338
+ "config": {
339
+ "dynamic": "\"force-dynamic\"",
340
+ "runtime": "\"nodejs\""
341
+ }
342
+ },
343
+ {
344
+ "file": "app/api/reader/rating/route.ts",
345
+ "hasDefault": false,
346
+ "exports": [
347
+ "POST"
348
+ ],
349
+ "config": {
350
+ "dynamic": "\"force-dynamic\"",
351
+ "runtime": "\"nodejs\""
352
+ }
353
+ },
354
+ {
355
+ "file": "app/api/reader/report/route.ts",
356
+ "hasDefault": false,
357
+ "exports": [
358
+ "POST"
359
+ ],
360
+ "config": {
361
+ "dynamic": "\"force-dynamic\"",
362
+ "runtime": "\"nodejs\""
363
+ }
364
+ },
365
+ {
366
+ "file": "app/api/reader/retired/route.ts",
367
+ "hasDefault": false,
368
+ "exports": [
369
+ "GET"
370
+ ],
371
+ "config": {
372
+ "dynamic": "\"force-dynamic\"",
373
+ "runtime": "\"nodejs\""
374
+ }
375
+ },
376
+ {
377
+ "file": "app/api/reader/submit/route.ts",
378
+ "hasDefault": false,
379
+ "exports": [
380
+ "POST"
381
+ ],
382
+ "config": {
383
+ "dynamic": "\"force-dynamic\"",
384
+ "runtime": "\"nodejs\""
385
+ }
386
+ },
387
+ {
388
+ "file": "app/api/reader/vote/route.ts",
389
+ "hasDefault": false,
390
+ "exports": [
391
+ "POST"
392
+ ],
393
+ "config": {
394
+ "dynamic": "\"force-dynamic\"",
395
+ "runtime": "\"nodejs\""
396
+ }
397
+ },
173
398
  {
174
399
  "file": "app/api/revalidate/route.ts",
175
400
  "hasDefault": false,
@@ -50,7 +50,7 @@ export function staticGenerationSettings() {
50
50
  };
51
51
  }
52
52
 
53
- export const DEFAULT_TRANSPILE_PACKAGES = ["@anthusai/papyrus", "cyclotron"];
53
+ export const DEFAULT_TRANSPILE_PACKAGES = ["@anthusai/papyrus", "cyclotron", "chatticus"];
54
54
 
55
55
  export function mergeTranspilePackages(existing = []) {
56
56
  return [...new Set([...existing, ...DEFAULT_TRANSPILE_PACKAGES])];
@@ -1 +0,0 @@
1
- limatus[jev]>=0.31,<0.32