@anthusai/papyrus 2.0.0-next.95 → 2.0.0-next.96

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.
@@ -7,7 +7,6 @@ import {
7
7
  formatUtc,
8
8
  referenceHref,
9
9
  routingLabel,
10
- usageText,
11
10
  type MonitoringItem,
12
11
  type MonitoringEmailDetails,
13
12
  type MonitoringEmailSummary,
@@ -129,7 +128,6 @@ function EmailSubmissions({ items, detail, onOpen }: {
129
128
  function Ready({ data, demo, emailDetail, onEmailOpen }: {
130
129
  data: MonitoringOverview; demo: boolean; emailDetail: MonitoringEmailDetails | null; onEmailOpen: (id: string) => void;
131
130
  }) {
132
- const ceilings = data.usage?.ceilings ?? null;
133
131
  const router = data.router;
134
132
  return (
135
133
  <>
@@ -152,15 +150,14 @@ function Ready({ data, demo, emailDetail, onEmailOpen }: {
152
150
  </article>
153
151
 
154
152
  <article className="news-desk-doctrine-card" data-monitoring-section="usage">
155
- <div className="news-desk-doctrine-card__header"><div><h3>Usage</h3><span>Decisions the router recorded, against the shared Cyclotron&apos;s ceilings (UTC days)</span></div></div>
153
+ <div className="news-desk-doctrine-card__header"><div><h3>Usage</h3><span>Observed router decisions, not a Cyclotron quota (UTC days)</span></div></div>
156
154
  {data.usage ? (
157
155
  <>
158
156
  <dl className="news-desk-monitoring__usage">
159
- <div><dt>Decisions today ({data.usage.day})</dt><dd>{usageText(data.usage.decisionsToday, ceilings?.decisionsPerDay)}</dd></div>
160
- <div><dt>Decisions in total</dt><dd>{usageText(data.usage.decisionsTotal, ceilings?.decisionsTotal)}</dd></div>
161
- {ceilings?.items !== undefined ? <div><dt>Items judged (ceiling)</dt><dd>{usageText(data.usage.decisionsTotal, ceilings.items)}</dd></div> : null}
157
+ <div><dt>Decisions today ({data.usage.day})</dt><dd>{data.usage.historyComplete ? data.usage.decisionsToday : `At least ${data.usage.decisionsToday}`}</dd></div>
158
+ <div><dt>Decisions in inspected history</dt><dd>{data.usage.historyComplete ? data.usage.decisionsTotal : `At least ${data.usage.decisionsTotal}`}</dd></div>
162
159
  </dl>
163
- {ceilings === null ? <p className="news-desk-delegation-note">No ceilings are configured here, so only usage is shown.</p> : null}
160
+ {!data.usage.historyComplete ? <p className="news-desk-delegation-note">Counts are lower bounds from a bounded history read.</p> : null}
164
161
  </>
165
162
  ) : <p>No usage recorded yet.</p>}
166
163
  </article>
@@ -15,7 +15,7 @@ export const FIXTURE_MONITORING_OVERVIEW: MonitoringOverview = {
15
15
  routerRuns: [{ runId: "q2", startedAt: "2026-10-21T02:37:00.000000Z", mode: "live", status: "stopped", stoppedBy: "request_ceiling_reached",
16
16
  counts: { examined: 3, decided: 1, delivered: 1, deliveryFailed: 1, routed: 1 }, errorCount: 0 }],
17
17
  router: { mode: "live", feedback: true, enabled: true, maxItemsPerRun: 5 },
18
- usage: { day: "2026-10-21", decisionsToday: 2, decisionsTotal: 3, ceilings: { decisionsTotal: 300, decisionsPerDay: 100, items: 300 } },
18
+ usage: { day: "2026-10-21", decisionsToday: 2, decisionsTotal: 3, historyComplete: true },
19
19
  hiddenNotRelevant: 1,
20
20
  items: [
21
21
  { sourceId: "104", revision: 1, title: "Fresh Show HN", url: "https://example.org/104", discussionUrl: "https://news.ycombinator.com/item?id=104",
@@ -91,7 +91,7 @@ export type MonitoringOverview = {
91
91
  day: string;
92
92
  decisionsToday: number;
93
93
  decisionsTotal: number;
94
- ceilings: { decisionsTotal?: number; decisionsPerDay?: number; items?: number } | null;
94
+ historyComplete: boolean;
95
95
  } | null;
96
96
  items: MonitoringItem[];
97
97
  emailSubmissions?: MonitoringEmailSummary[];
@@ -129,10 +129,6 @@ export function confidenceText(confidence: number | null): string {
129
129
  return confidence === null ? "confidence not reported" : `${Math.round(confidence * 100)}% confidence`;
130
130
  }
131
131
 
132
- export function usageText(used: number, ceiling: number | undefined): string {
133
- return ceiling === undefined ? `${used} used, no ceiling set` : `${used} of ${ceiling}`;
134
- }
135
-
136
132
  export function everyText(seconds: number | null): string {
137
133
  if (!seconds) return "on a schedule";
138
134
  return seconds % 3600 === 0 ? `every ${seconds / 3600} h` : seconds % 60 === 0 ? `every ${seconds / 60} min` : `every ${seconds} s`;
package/package.json CHANGED
@@ -456,7 +456,7 @@
456
456
  "optional": true
457
457
  }
458
458
  },
459
- "version": "2.0.0-next.95",
459
+ "version": "2.0.0-next.96",
460
460
  "dependencies": {
461
461
  "@aws-amplify/adapter-nextjs": "^1.7.3",
462
462
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-next.95",
2
+ "version": "2.0.0-next.96",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",