@anthusai/papyrus 5.136.0-next.5 → 5.136.0-next.6

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.
@@ -112,6 +112,8 @@ export const announcementsSchemaDefinitions = {
112
112
  index("announcementId").sortKeys(["createdAt"]).queryField("listDeliveriesByAnnouncementAndCreatedAt"),
113
113
  index("accountKey").sortKeys(["createdAt"]).queryField("listDeliveriesByAccountKeyAndCreatedAt"),
114
114
  index("dueKey").sortKeys(["dueAt"]).queryField("listDeliveriesByDueKeyAndDueAt"),
115
+ // Sparse: only a Delivery that is an active example carries exampleKey, so the drafter reads a scope's examples newest first and never scans.
116
+ index("exampleKey").sortKeys(["exampleAt"]).queryField("listDeliveriesByExampleKeyAndExampleAt"),
115
117
  ])
116
118
  .disableOperations(["subscriptions"])
117
119
  .authorization((allow) => [allow.groups(editors).to(["read"])]),
@@ -115,6 +115,8 @@ export const announcementsSchemaDefinitions = {
115
115
  index("announcementId").sortKeys(["createdAt"]).queryField("listDeliveriesByAnnouncementAndCreatedAt"),
116
116
  index("accountKey").sortKeys(["createdAt"]).queryField("listDeliveriesByAccountKeyAndCreatedAt"),
117
117
  index("dueKey").sortKeys(["dueAt"]).queryField("listDeliveriesByDueKeyAndDueAt"),
118
+ // Sparse: only a Delivery that is an active example carries exampleKey, so the drafter reads a scope's examples newest first and never scans.
119
+ index("exampleKey").sortKeys(["exampleAt"]).queryField("listDeliveriesByExampleKeyAndExampleAt"),
118
120
  ])
119
121
  .disableOperations(["subscriptions"])
120
122
  .authorization((allow) => [allow.groups(editors).to(["read"])]),
@@ -1655,17 +1655,19 @@ export type AnnouncementsRecentResult = {
1655
1655
  next: string | null;
1656
1656
  };
1657
1657
 
1658
- /** Why a Story was or was not announced, for each channel, naming the rule. Reads the rules; writes nothing. */
1658
+ /** Why a Story was or was not announced, for each channel, naming the rule; or what a Delivery's draft read. Reads the rules; writes nothing. */
1659
1659
  export type AnnouncementsExplainInput = {
1660
1660
  /** The lineage id of the Story. */
1661
- story: string;
1661
+ story?: string;
1662
+ /** Ask instead about a Delivery: the guideline layers (scope, item, version, hash) and the examples its draft read. */
1663
+ delivery?: string;
1662
1664
  };
1663
1665
 
1664
1666
  export type AnnouncementsExplainResult = {
1665
- story: string;
1667
+ story?: string;
1666
1668
  title?: string;
1667
1669
  stars?: number;
1668
- channels: {
1670
+ channels?: {
1669
1671
  channel: string;
1670
1672
  announced: boolean;
1671
1673
  /** The rule: announced, off, not_published, type_not_announced, section_not_announced, below_bar, below_floor, machine_five, story_not_reviewed, no_delivery or would_announce. */
@@ -1673,6 +1675,20 @@ export type AnnouncementsExplainResult = {
1673
1675
  words: string;
1674
1676
  delivery?: string;
1675
1677
  }[];
1678
+ /** The Delivery asked about. */
1679
+ delivery?: string;
1680
+ recorded?: boolean;
1681
+ words?: string;
1682
+ storyVersion?: number | null;
1683
+ model?: string | null;
1684
+ /** Each guideline layer the draft read: scope, itemId, versionNumber, contentHash. */
1685
+ guidelineLayers?: Record<string, unknown>[];
1686
+ /** The examples the draft read, and whether each is still on. */
1687
+ examples?: ({
1688
+ delivery: string;
1689
+ state: string;
1690
+ scope?: string | null;
1691
+ })[];
1676
1692
  };
1677
1693
 
1678
1694
  /** Give a Story a star rating, 1 to 5. An agent may give only three or four stars, and only to a Story nobody has rated. */
package/package.json CHANGED
@@ -650,7 +650,7 @@
650
650
  "optional": true
651
651
  }
652
652
  },
653
- "version": "5.136.0-next.5",
653
+ "version": "5.136.0-next.6",
654
654
  "dependencies": {
655
655
  "@aws-amplify/adapter-nextjs": "^1.7.3",
656
656
  "@aws-crypto/sha256-js": "5.2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.136.0-next.5",
2
+ "version": "5.136.0-next.6",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",