@anthusai/papyrus 1.19.1 → 2.0.0-next.10
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/amplify/data/resource.js +7 -0
- package/amplify/data/resource.ts +8 -0
- package/amplify/data/schema.js +8 -0
- package/amplify/data/schema.ts +9 -0
- package/amplify/functions/assignment-action/data-access.js +88 -0
- package/amplify/functions/assignment-action/data-access.ts +87 -0
- package/amplify/functions/content-actions/handler.py +7 -0
- package/amplify/functions/model-attachment-upload/handler.ts +1 -0
- package/amplify/plugins/editorial-checks/function/handler.py +14 -0
- package/amplify/plugins/editorial-checks/function/requirements.txt +1 -0
- package/amplify/plugins/editorial-checks/function/resource.js +43 -0
- package/amplify/plugins/editorial-checks/function/resource.ts +60 -0
- package/amplify/plugins/editorial-checks/papyrus.plugin.js +71 -0
- package/amplify/plugins/editorial-checks/papyrus.plugin.ts +87 -0
- package/amplify/plugins/editorial-checks/schema.js +94 -0
- package/amplify/plugins/editorial-checks/schema.ts +96 -0
- package/amplify/plugins/registry.js +2 -0
- package/amplify/plugins/registry.ts +2 -0
- package/amplify/site-backend.js +5 -0
- package/amplify/site-backend.ts +11 -0
- package/app/globals.css +0 -175
- package/app/newsroom/[section]/[...selection]/page.tsx +0 -6
- package/app/newsroom/[section]/page.tsx +2 -4
- package/app/newsroom/articles/page.tsx +1 -2
- package/app/newsroom/sections/[sectionId]/page.tsx +2 -6
- package/bin/papyrus-infra.mjs +11 -2
- package/components/editorial-checks-admin-panel.tsx +337 -0
- package/components/editorial-finding-card.tsx +162 -0
- package/components/editorial-findings-panel.tsx +91 -0
- package/components/editorial-preview-popover.tsx +103 -0
- package/components/markus-body-editor.tsx +213 -0
- package/components/markus-ir-preview.tsx +147 -6
- package/components/news-desk-page.tsx +3 -4
- package/components/newsroom-article-editor.tsx +138 -11
- package/components/newsroom-board-view.tsx +6 -7
- package/components/newsroom-ops-shell.tsx +146 -234
- package/components/newsroom-organizer.css +57 -61
- package/components/newsroom-theme-fonts/broadsheet-green.css +10 -0
- package/components/newsroom-theme-fonts/broadsheet-green.tsx +6 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.css +9 -0
- package/components/newsroom-theme-fonts/newspaper-gothic.tsx +6 -0
- package/components/newsroom-theme-fonts/night-desk.css +10 -0
- package/components/newsroom-theme-fonts/night-desk.tsx +6 -0
- package/components/newsroom-theme-fonts/refined-newsprint.css +11 -0
- package/components/newsroom-theme-fonts/refined-newsprint.tsx +6 -0
- package/components/newsroom-theme.css +39 -0
- package/components/newsroom-theme.tsx +33 -0
- package/components/reference-cyclotron-priming.tsx +12 -13
- package/components/reference-cyclotron-status.tsx +4 -4
- package/components/reference-cyclotron-suggestion.tsx +6 -6
- package/components/reference-live-agreement.tsx +10 -10
- package/components/reference-priming.tsx +1 -1
- package/components/reference-relevance-review.tsx +1 -1
- package/components/reference-section-suggestion.tsx +1 -1
- package/components/topic-steering-workspace.tsx +36 -511
- package/components/use-editorial-checks.ts +131 -0
- package/lib/cyclotron-suggestions.ts +9 -9
- package/lib/editorial-checks-backend.ts +16 -0
- package/lib/editorial-checks-client.ts +194 -0
- package/lib/editorial-checks-demo.ts +147 -0
- package/lib/editorial-checks-settings.ts +24 -0
- package/lib/editorial-checks.ts +178 -0
- package/lib/editorial-preview.ts +228 -0
- package/lib/newsroom-board.ts +27 -2
- package/lib/newsroom-list-selection.ts +0 -3
- package/lib/newsroom-nav.ts +5 -8
- package/lib/newsroom-section-routing.ts +2 -4
- package/lib/relevance-status.ts +4 -4
- package/lib/site-brand.ts +18 -8
- package/package.json +34 -3
- package/routes.manifest.json +1 -1
- package/src/cdk-environment.mjs +44 -0
- package/components/newsroom-fonts/playfair-display-700.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-900.ttf +0 -0
- package/components/newsroom-fonts/playfair-display-OFL.txt +0 -93
- package/components/newsroom-fonts/plus-jakarta-sans-400.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-600.ttf +0 -0
- package/components/newsroom-fonts/plus-jakarta-sans-OFL.txt +0 -93
- package/components/newsroom-newsprint-board.css +0 -7
- package/components/newsroom-organizer-shell.tsx +0 -153
|
@@ -12,10 +12,10 @@ import { formatSuggestionTime } from "./reference-cyclotron-suggestion";
|
|
|
12
12
|
|
|
13
13
|
function MeasurementFigures({ measurement }: { measurement: AgreementStripMeasurement }) {
|
|
14
14
|
const figures: Array<[string, string]> = [
|
|
15
|
-
["
|
|
16
|
-
["
|
|
17
|
-
["
|
|
18
|
-
["
|
|
15
|
+
["Matches editors", formatPercentage(measurement.agreement)],
|
|
16
|
+
["Suggested includes editors kept", formatPercentage(measurement.precision)],
|
|
17
|
+
["Editor includes suggested", formatPercentage(measurement.recall)],
|
|
18
|
+
["Decisions compared", String(measurement.comparisons)],
|
|
19
19
|
];
|
|
20
20
|
return (
|
|
21
21
|
<dl className="flex flex-wrap gap-x-6 gap-y-1">
|
|
@@ -30,19 +30,19 @@ function MeasurementFigures({ measurement }: { measurement: AgreementStripMeasur
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Live agreement at the top of References: how often the
|
|
33
|
+
* Live agreement at the top of References: how often the
|
|
34
34
|
* suggestions matched what editors then decided. Hidden without a payload.
|
|
35
35
|
*/
|
|
36
36
|
export function ReferenceLiveAgreement({ agreement }: { agreement: ShadowAgreement | null }) {
|
|
37
37
|
const state = agreementStripState(agreement);
|
|
38
38
|
if (state.kind === "hidden") return null;
|
|
39
39
|
return (
|
|
40
|
-
<section aria-label="
|
|
41
|
-
<h3 className="text-xs font-semibold uppercase tracking-wide text-foreground">
|
|
40
|
+
<section aria-label="Suggestion accuracy" className="shrink-0 space-y-2 border-y border-foreground py-3" data-reference-live-agreement={state.kind}>
|
|
41
|
+
<h3 className="text-xs font-semibold uppercase tracking-wide text-foreground">Suggestion accuracy</h3>
|
|
42
42
|
{state.loop ? (
|
|
43
43
|
<p className="text-sm text-foreground" data-reference-live-agreement-loop>
|
|
44
44
|
<span className="font-semibold">{loopStateWords(state.loop)}</span>
|
|
45
|
-
{" · "}Last
|
|
45
|
+
{" · "}Last checked {formatSuggestionTime(state.loop.lastSweepAt)}
|
|
46
46
|
{" · "}{dailyCapWords(state.loop)}
|
|
47
47
|
</p>
|
|
48
48
|
) : null}
|
|
@@ -51,11 +51,11 @@ export function ReferenceLiveAgreement({ agreement }: { agreement: ShadowAgreeme
|
|
|
51
51
|
) : null}
|
|
52
52
|
{state.kind === "not_enough" ? (
|
|
53
53
|
<p className="text-sm text-foreground" data-reference-live-agreement-not-enough>
|
|
54
|
-
Not enough
|
|
54
|
+
Not enough decisions yet: {state.measurement.comparisons} of {state.needed} editor decisions have followed a suggestion. Figures appear at {state.needed}.
|
|
55
55
|
</p>
|
|
56
56
|
) : <MeasurementFigures measurement={state.measurement} />}
|
|
57
57
|
<p className="text-xs text-foreground">
|
|
58
|
-
Suggestions compared with the decisions editors made afterwards.
|
|
58
|
+
Suggestions compared with the decisions editors made afterwards. Updated {formatSuggestionTime(agreement?.computedAt ?? null)}.
|
|
59
59
|
</p>
|
|
60
60
|
</section>
|
|
61
61
|
);
|
|
@@ -10,7 +10,7 @@ export function ReferencePriming(props: PrimingPanelProps) {
|
|
|
10
10
|
return (
|
|
11
11
|
<section className="shrink-0 space-y-3" aria-label="Representative reference examples">
|
|
12
12
|
<Button aria-expanded={open} onClick={() => setOpen((value) => !value)} variant="outline">
|
|
13
|
-
{open ? "Hide example
|
|
13
|
+
{open ? "Hide example references" : "Add example references (optional)"}
|
|
14
14
|
</Button>
|
|
15
15
|
{open ? <div className="max-h-[55dvh] space-y-3 overflow-y-auto pr-1"><p className="text-sm text-muted-foreground">Corrections to extracted content: describe what needs fixing, then enter the corrected title and abstract or summary. The note is saved with your correction; it does not automatically regenerate the content. Choose Publish / Not publish separately. An explanation of that judgment is optional.</p><PrimingPanel {...props} renderItem={props.renderItem ?? ((item) => <div className="space-y-2"><p className="whitespace-pre-wrap text-sm">{String(item.values.abstract ?? item.values.text ?? "")}</p><p className="break-all text-xs text-muted-foreground">{String(item.values.source_uri ?? "")}</p></div>)} /></div> : null}
|
|
16
16
|
</section>
|
|
@@ -67,7 +67,7 @@ export function ReferenceRelevanceReview({
|
|
|
67
67
|
onChange={(event) => setShareable(event.target.checked)}
|
|
68
68
|
type="checkbox"
|
|
69
69
|
/>
|
|
70
|
-
My explanation may be quoted publicly (
|
|
70
|
+
My explanation may be quoted publicly (on a public example page)
|
|
71
71
|
</label>
|
|
72
72
|
{error ? <p className="text-xs text-destructive" role="alert">{error}</p> : null}
|
|
73
73
|
</section>
|
|
@@ -98,7 +98,7 @@ export function SectionPicker({
|
|
|
98
98
|
</label>
|
|
99
99
|
);
|
|
100
100
|
})}
|
|
101
|
-
<p className="text-xs text-foreground">The Section you choose is
|
|
101
|
+
<p className="text-xs text-foreground">The Section you choose is saved with your decision.</p>
|
|
102
102
|
</fieldset>
|
|
103
103
|
);
|
|
104
104
|
}
|