@anthusai/papyrus 5.131.0 → 5.132.0-next.2

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.
@@ -0,0 +1,97 @@
1
+ import { Duration, Stack } from "aws-cdk-lib";
2
+ import * as dynamodb from "aws-cdk-lib/aws-dynamodb";
3
+ import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
4
+ import { Architecture, CfnEventSourceMapping, Function as LambdaFunction, Runtime } from "aws-cdk-lib/aws-lambda";
5
+ import { pythonLambdaCode } from "../functions/shared/python-bundle.js";
6
+ import { connectToSiteApi } from "../site-api-access.js";
7
+ import { allowWakeSending } from "./wake-queue.js";
8
+ /**
9
+ * The Item change feed (docs/design/always-on-agents-architecture.md, slice B2, PPY-8a374e): a DynamoDB stream consumer on the Item table that turns each
10
+ * change to a Story or its checklist into one wake per listening agent on the site's wake queue. All the logic is src/papyrus_content/item_change_feed.py;
11
+ * the handler is amplify/functions/item-change-feed/handler.py.
12
+ *
13
+ * This piece holds four resources: the function, its role and its policy, and the mapping from the stream. It creates no queue and no alarm: the queue is the
14
+ * wake-queue piece, and the alarm on feed lag is the observability slice's (PPY-45ef76). The stream itself is a property of the Item table, switched on by
15
+ * `enableItemStream` (the Item table had no stream and no reader before this; it holds one reader now, the feed).
16
+ *
17
+ * What the function may do, and nothing else: read the Item stream; read the site's `SiteDocument` rows through its own site's API (`getSiteDocument`: the live
18
+ * version of the listener index) and that one document's objects in the site's bucket (`tenants/<tenant>/site/listeners/`); look up and send to its own
19
+ * site's wake queue. It reads no table, receives and deletes no wake, and calls no model.
20
+ */
21
+ export const ITEM_STREAM_VIEW = dynamodb.StreamViewType.NEW_AND_OLD_IMAGES;
22
+ export const ITEM_FEED_API_FIELDS = ["Query/fields/getSiteDocument"];
23
+ export const LISTENER_INDEX_KIND = "listeners";
24
+ const STREAM_READ_ACTIONS = ["dynamodb:DescribeStream", "dynamodb:GetRecords", "dynamodb:GetShardIterator", "dynamodb:ListStreams"];
25
+ /**
26
+ * Switches on the Item table's stream, with both images (the feed compares them to tell a board move from any other update), and returns its ARN.
27
+ * The Item table had no stream before. Returns undefined when the site's schema has no Item table.
28
+ */
29
+ export function enableItemStream(backend) {
30
+ const cfnResources = backend.data.resources.cfnResources;
31
+ const wrapper = cfnResources.amplifyDynamoDbTables?.Item;
32
+ if (wrapper !== undefined) {
33
+ wrapper.streamSpecification = { streamViewType: ITEM_STREAM_VIEW };
34
+ return wrapper.resource.getAtt("TableStreamArn").toString();
35
+ }
36
+ const cfnTables = cfnResources.cfnTables ?? {};
37
+ const found = cfnTables.Item ??
38
+ cfnTables.ItemTable ??
39
+ Object.entries(cfnTables).find(([key]) => key.toLowerCase().replace(/table$/, "") === "item")?.[1];
40
+ if (!found)
41
+ return undefined;
42
+ found.streamSpecification = { streamViewType: ITEM_STREAM_VIEW };
43
+ return found.attrStreamArn;
44
+ }
45
+ export function itemChangeFeedPiece(brandId, source) {
46
+ return {
47
+ id: "item-change-feed",
48
+ add(scope) {
49
+ const stack = Stack.of(scope);
50
+ const feed = new LambdaFunction(scope, "ItemChangeFeed", {
51
+ runtime: Runtime.PYTHON_3_12,
52
+ architecture: Architecture.ARM_64,
53
+ handler: "handler.handler",
54
+ timeout: Duration.seconds(60),
55
+ memorySize: 256,
56
+ description: "Puts a wake on the site's agent wake queue for each agent that listens for a change to a Story or its checklist (PPY-8a374e).",
57
+ code: pythonLambdaCode({ functionDir: "item-change-feed", modules: ["papyrus_content"], noDeps: true }, [
58
+ "bash",
59
+ "-c",
60
+ [
61
+ "set -euo pipefail",
62
+ "mkdir -p /asset-output/papyrus_content",
63
+ "cp amplify/functions/item-change-feed/handler.py /asset-output/handler.py",
64
+ "cp -R src/papyrus_content/. /asset-output/papyrus_content/",
65
+ ].join(" && "),
66
+ ]),
67
+ });
68
+ connectToSiteApi(feed, source.graphqlUrl);
69
+ feed.addEnvironment("PAPYRUS_AGENT_PUBLICATION_ID", brandId);
70
+ feed.addEnvironment("PAPYRUS_TENANT_ID", source.tenantId);
71
+ feed.addEnvironment("PAPYRUS_SITE_BUCKET", source.bucketName);
72
+ feed.addToRolePolicy(new PolicyStatement({
73
+ effect: Effect.ALLOW,
74
+ actions: ["appsync:GraphQL"],
75
+ resources: ITEM_FEED_API_FIELDS.map((field) => `arn:${stack.partition}:appsync:${stack.region}:${stack.account}:apis/${source.apiId}/types/${field}`),
76
+ }));
77
+ feed.addToRolePolicy(new PolicyStatement({
78
+ effect: Effect.ALLOW,
79
+ actions: ["s3:GetObject"],
80
+ resources: [`${source.bucketArn}/tenants/${source.tenantId}/site/${LISTENER_INDEX_KIND}/*`],
81
+ }));
82
+ allowWakeSending(feed, brandId);
83
+ feed.addToRolePolicy(new PolicyStatement({ effect: Effect.ALLOW, actions: STREAM_READ_ACTIONS, resources: [source.streamArn] }));
84
+ new CfnEventSourceMapping(scope, "ItemStreamMapping", {
85
+ eventSourceArn: source.streamArn,
86
+ functionName: feed.functionArn,
87
+ startingPosition: "LATEST",
88
+ batchSize: 10,
89
+ maximumBatchingWindowInSeconds: 2,
90
+ maximumRetryAttempts: 5,
91
+ functionResponseTypes: ["ReportBatchItemFailures"],
92
+ // A removed row is never a change the feed acts on: it does not start the function.
93
+ filterCriteria: { filters: [{ pattern: JSON.stringify({ eventName: ["INSERT", "MODIFY"] }) }] },
94
+ });
95
+ },
96
+ };
97
+ }
@@ -0,0 +1,121 @@
1
+ import { Duration, Stack } from "aws-cdk-lib";
2
+ import * as dynamodb from "aws-cdk-lib/aws-dynamodb";
3
+ import { Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
4
+ import { Architecture, CfnEventSourceMapping, Function as LambdaFunction, Runtime } from "aws-cdk-lib/aws-lambda";
5
+ import type { Construct } from "constructs";
6
+ import { pythonLambdaCode } from "../functions/shared/python-bundle";
7
+ import { connectToSiteApi } from "../site-api-access";
8
+ import { allowWakeSending } from "./wake-queue";
9
+ import type { AgentPiece } from "./stack";
10
+
11
+ /**
12
+ * The Item change feed (docs/design/always-on-agents-architecture.md, slice B2, PPY-8a374e): a DynamoDB stream consumer on the Item table that turns each
13
+ * change to a Story or its checklist into one wake per listening agent on the site's wake queue. All the logic is src/papyrus_content/item_change_feed.py;
14
+ * the handler is amplify/functions/item-change-feed/handler.py.
15
+ *
16
+ * This piece holds four resources: the function, its role and its policy, and the mapping from the stream. It creates no queue and no alarm: the queue is the
17
+ * wake-queue piece, and the alarm on feed lag is the observability slice's (PPY-45ef76). The stream itself is a property of the Item table, switched on by
18
+ * `enableItemStream` (the Item table had no stream and no reader before this; it holds one reader now, the feed).
19
+ *
20
+ * What the function may do, and nothing else: read the Item stream; read the site's `SiteDocument` rows through its own site's API (`getSiteDocument`: the live
21
+ * version of the listener index) and that one document's objects in the site's bucket (`tenants/<tenant>/site/listeners/`); look up and send to its own
22
+ * site's wake queue. It reads no table, receives and deletes no wake, and calls no model.
23
+ */
24
+
25
+ export const ITEM_STREAM_VIEW = dynamodb.StreamViewType.NEW_AND_OLD_IMAGES;
26
+ export const ITEM_FEED_API_FIELDS = ["Query/fields/getSiteDocument"];
27
+ export const LISTENER_INDEX_KIND = "listeners";
28
+ const STREAM_READ_ACTIONS = ["dynamodb:DescribeStream", "dynamodb:GetRecords", "dynamodb:GetShardIterator", "dynamodb:ListStreams"];
29
+
30
+ /** What the feed needs from the rest of the site's backend. Absent for a backend that cannot run it (a shared stack, which acts for no one tenant). */
31
+ export type ItemChangeFeedSource = {
32
+ /** The Item table's stream ARN (`enableItemStream`). */
33
+ streamArn: string;
34
+ graphqlUrl: string;
35
+ apiId: string;
36
+ tenantId: string;
37
+ bucketName: string;
38
+ bucketArn: string;
39
+ };
40
+
41
+ /**
42
+ * Switches on the Item table's stream, with both images (the feed compares them to tell a board move from any other update), and returns its ARN.
43
+ * The Item table had no stream before. Returns undefined when the site's schema has no Item table.
44
+ */
45
+ export function enableItemStream(backend: any): string | undefined {
46
+ const cfnResources = backend.data.resources.cfnResources;
47
+ const wrapper = cfnResources.amplifyDynamoDbTables?.Item;
48
+ if (wrapper !== undefined) {
49
+ wrapper.streamSpecification = { streamViewType: ITEM_STREAM_VIEW };
50
+ return wrapper.resource.getAtt("TableStreamArn").toString();
51
+ }
52
+ const cfnTables = cfnResources.cfnTables ?? {};
53
+ const found =
54
+ cfnTables.Item ??
55
+ cfnTables.ItemTable ??
56
+ Object.entries(cfnTables).find(([key]) => key.toLowerCase().replace(/table$/, "") === "item")?.[1];
57
+ if (!found) return undefined;
58
+ (found as any).streamSpecification = { streamViewType: ITEM_STREAM_VIEW };
59
+ return (found as any).attrStreamArn;
60
+ }
61
+
62
+ export function itemChangeFeedPiece(brandId: string, source: ItemChangeFeedSource): AgentPiece {
63
+ return {
64
+ id: "item-change-feed",
65
+ add(scope: Construct) {
66
+ const stack = Stack.of(scope);
67
+ const feed = new LambdaFunction(scope, "ItemChangeFeed", {
68
+ runtime: Runtime.PYTHON_3_12,
69
+ architecture: Architecture.ARM_64,
70
+ handler: "handler.handler",
71
+ timeout: Duration.seconds(60),
72
+ memorySize: 256,
73
+ description: "Puts a wake on the site's agent wake queue for each agent that listens for a change to a Story or its checklist (PPY-8a374e).",
74
+ code: pythonLambdaCode(
75
+ { functionDir: "item-change-feed", modules: ["papyrus_content"], noDeps: true },
76
+ [
77
+ "bash",
78
+ "-c",
79
+ [
80
+ "set -euo pipefail",
81
+ "mkdir -p /asset-output/papyrus_content",
82
+ "cp amplify/functions/item-change-feed/handler.py /asset-output/handler.py",
83
+ "cp -R src/papyrus_content/. /asset-output/papyrus_content/",
84
+ ].join(" && "),
85
+ ],
86
+ ),
87
+ });
88
+ connectToSiteApi(feed, source.graphqlUrl);
89
+ feed.addEnvironment("PAPYRUS_AGENT_PUBLICATION_ID", brandId);
90
+ feed.addEnvironment("PAPYRUS_TENANT_ID", source.tenantId);
91
+ feed.addEnvironment("PAPYRUS_SITE_BUCKET", source.bucketName);
92
+ feed.addToRolePolicy(
93
+ new PolicyStatement({
94
+ effect: Effect.ALLOW,
95
+ actions: ["appsync:GraphQL"],
96
+ resources: ITEM_FEED_API_FIELDS.map((field) => `arn:${stack.partition}:appsync:${stack.region}:${stack.account}:apis/${source.apiId}/types/${field}`),
97
+ }),
98
+ );
99
+ feed.addToRolePolicy(
100
+ new PolicyStatement({
101
+ effect: Effect.ALLOW,
102
+ actions: ["s3:GetObject"],
103
+ resources: [`${source.bucketArn}/tenants/${source.tenantId}/site/${LISTENER_INDEX_KIND}/*`],
104
+ }),
105
+ );
106
+ allowWakeSending(feed, brandId);
107
+ feed.addToRolePolicy(new PolicyStatement({ effect: Effect.ALLOW, actions: STREAM_READ_ACTIONS, resources: [source.streamArn] }));
108
+ new CfnEventSourceMapping(scope, "ItemStreamMapping", {
109
+ eventSourceArn: source.streamArn,
110
+ functionName: feed.functionArn,
111
+ startingPosition: "LATEST",
112
+ batchSize: 10,
113
+ maximumBatchingWindowInSeconds: 2,
114
+ maximumRetryAttempts: 5,
115
+ functionResponseTypes: ["ReportBatchItemFailures"],
116
+ // A removed row is never a change the feed acts on: it does not start the function.
117
+ filterCriteria: { filters: [{ pattern: JSON.stringify({ eventName: ["INSERT", "MODIFY"] }) }] },
118
+ });
119
+ },
120
+ };
121
+ }
@@ -1,3 +1,4 @@
1
+ import { itemChangeFeedPiece } from "./item-change-feed.js";
1
2
  import { scheduleGroupPiece } from "./schedule-group.js";
2
3
  import { wakeQueuePiece } from "./wake-queue.js";
3
4
  /**
@@ -6,6 +7,6 @@ import { wakeQueuePiece } from "./wake-queue.js";
6
7
  * `scripts/test-agents-stack.ts` prints what each costs against the first-deploy budget. The pieces are named after the
7
8
  * site, so they are built for one site's brand id.
8
9
  */
9
- export function agentPieces(brandId) {
10
- return [wakeQueuePiece(brandId), scheduleGroupPiece(brandId)];
10
+ export function agentPieces(brandId, sources = {}) {
11
+ return [wakeQueuePiece(brandId), scheduleGroupPiece(brandId), ...(sources.itemChangeFeed ? [itemChangeFeedPiece(brandId, sources.itemChangeFeed)] : [])];
11
12
  }
@@ -1,13 +1,17 @@
1
+ import { itemChangeFeedPiece, type ItemChangeFeedSource } from "./item-change-feed";
1
2
  import type { AgentPiece } from "./stack";
2
3
  import { scheduleGroupPiece } from "./schedule-group";
3
4
  import { wakeQueuePiece } from "./wake-queue";
4
5
 
6
+ /** What a site's backend gives the pieces that read its own resources. A piece whose source is absent is not added (a shared stack acts for no one tenant). */
7
+ export type AgentPieceSources = { itemChangeFeed?: ItemChangeFeedSource };
8
+
5
9
  /**
6
10
  * The agent pieces a site's `agents` stack holds. Each slice of docs/design/always-on-agents-architecture.md adds its
7
11
  * piece here (the wake queue, the schedule group and reconciler, the change feeds, the alarms) and nothing else:
8
12
  * `scripts/test-agents-stack.ts` prints what each costs against the first-deploy budget. The pieces are named after the
9
13
  * site, so they are built for one site's brand id.
10
14
  */
11
- export function agentPieces(brandId: string): readonly AgentPiece[] {
12
- return [wakeQueuePiece(brandId), scheduleGroupPiece(brandId)];
15
+ export function agentPieces(brandId: string, sources: AgentPieceSources = {}): readonly AgentPiece[] {
16
+ return [wakeQueuePiece(brandId), scheduleGroupPiece(brandId), ...(sources.itemChangeFeed ? [itemChangeFeedPiece(brandId, sources.itemChangeFeed)] : [])];
13
17
  }
@@ -31,6 +31,32 @@ export function scheduleNames(brandId) {
31
31
  role: assertLiteralResourceName("Scheduler role name", `${SCHEDULE_GROUP_NAME_PREFIX}${siteId}${SCHEDULER_ROLE_NAME_SUFFIX}`),
32
32
  };
33
33
  }
34
+ /**
35
+ * The follow-up timers' entries (slice C2, src/papyrus_content/follow_up_timers.py) are named `follow-up-` and a digest of the record. The reconciler's own
36
+ * entries are `agent-...`, so the two never meet.
37
+ */
38
+ export const FOLLOW_UP_ENTRY_PREFIX = "follow-up-";
39
+ /**
40
+ * Lets a site function set and clear follow-up timers: it may create, update and delete entries named `follow-up-*` in this site's schedule group, and hand the
41
+ * scheduler role to the scheduler service, and nothing else. It may not touch the reconciler's `agent-*` entries, another site's group, the default group
42
+ * (scheduled publishing's), or read an entry. The group and the role are named by the site's brand id, so no reference to the `agents` stack is made and the
43
+ * function's stack does not depend on it. It adds no resource: two statements on the function's own role.
44
+ */
45
+ export function allowFollowUpTimers(lambda, brandId) {
46
+ const stack = Stack.of(lambda);
47
+ const names = scheduleNames(brandId);
48
+ lambda.addToRolePolicy(new PolicyStatement({
49
+ effect: Effect.ALLOW,
50
+ actions: ["scheduler:CreateSchedule", "scheduler:UpdateSchedule", "scheduler:DeleteSchedule"],
51
+ resources: [`arn:${stack.partition}:scheduler:${stack.region}:${stack.account}:schedule/${names.group}/${FOLLOW_UP_ENTRY_PREFIX}*`],
52
+ }));
53
+ lambda.addToRolePolicy(new PolicyStatement({
54
+ effect: Effect.ALLOW,
55
+ actions: ["iam:PassRole"],
56
+ resources: [`arn:${stack.partition}:iam::${stack.account}:role/${names.role}`],
57
+ conditions: { StringEquals: { "iam:PassedToService": "scheduler.amazonaws.com" } },
58
+ }));
59
+ }
34
60
  /** The group, the role the scheduler assumes and the alarm on a tick that could not be delivered. */
35
61
  export function scheduleGroupPiece(brandId) {
36
62
  const names = scheduleNames(brandId);
@@ -1,6 +1,7 @@
1
1
  import { Duration, Stack } from "aws-cdk-lib";
2
2
  import { Alarm, ComparisonOperator, Metric, TreatMissingData } from "aws-cdk-lib/aws-cloudwatch";
3
3
  import { Effect, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from "aws-cdk-lib/aws-iam";
4
+ import type { Function as LambdaFunction } from "aws-cdk-lib/aws-lambda";
4
5
  import { CfnScheduleGroup } from "aws-cdk-lib/aws-scheduler";
5
6
  import type { Construct } from "constructs";
6
7
  import { assertLiteralResourceName, sanitizeAwsName } from "../site-backend-names";
@@ -38,6 +39,38 @@ export function scheduleNames(brandId: string): ScheduleNames {
38
39
  };
39
40
  }
40
41
 
42
+ /**
43
+ * The follow-up timers' entries (slice C2, src/papyrus_content/follow_up_timers.py) are named `follow-up-` and a digest of the record. The reconciler's own
44
+ * entries are `agent-...`, so the two never meet.
45
+ */
46
+ export const FOLLOW_UP_ENTRY_PREFIX = "follow-up-";
47
+
48
+ /**
49
+ * Lets a site function set and clear follow-up timers: it may create, update and delete entries named `follow-up-*` in this site's schedule group, and hand the
50
+ * scheduler role to the scheduler service, and nothing else. It may not touch the reconciler's `agent-*` entries, another site's group, the default group
51
+ * (scheduled publishing's), or read an entry. The group and the role are named by the site's brand id, so no reference to the `agents` stack is made and the
52
+ * function's stack does not depend on it. It adds no resource: two statements on the function's own role.
53
+ */
54
+ export function allowFollowUpTimers(lambda: LambdaFunction, brandId: string): void {
55
+ const stack = Stack.of(lambda);
56
+ const names = scheduleNames(brandId);
57
+ lambda.addToRolePolicy(
58
+ new PolicyStatement({
59
+ effect: Effect.ALLOW,
60
+ actions: ["scheduler:CreateSchedule", "scheduler:UpdateSchedule", "scheduler:DeleteSchedule"],
61
+ resources: [`arn:${stack.partition}:scheduler:${stack.region}:${stack.account}:schedule/${names.group}/${FOLLOW_UP_ENTRY_PREFIX}*`],
62
+ }),
63
+ );
64
+ lambda.addToRolePolicy(
65
+ new PolicyStatement({
66
+ effect: Effect.ALLOW,
67
+ actions: ["iam:PassRole"],
68
+ resources: [`arn:${stack.partition}:iam::${stack.account}:role/${names.role}`],
69
+ conditions: { StringEquals: { "iam:PassedToService": "scheduler.amazonaws.com" } },
70
+ }),
71
+ );
72
+ }
73
+
41
74
  /** The group, the role the scheduler assumes and the alarm on a tick that could not be delivered. */
42
75
  export function scheduleGroupPiece(brandId: string): AgentPiece {
43
76
  const names = scheduleNames(brandId);
@@ -0,0 +1,46 @@
1
+ """The Item change feed: a DynamoDB stream consumer on the Item table that puts wakes on the site's agent wake queue (PPY-8a374e).
2
+
3
+ All the logic is ``papyrus_content.item_change_feed``. This file decodes nothing itself: it builds the collaborators with the function's own role: the
4
+ site's listener index (``agent_listeners.ListenerIndex`` over the site store: one point read of the live version, the body from S3 only when the version
5
+ moved) and the site's wake queue (``agent_wakes.wake_sender``). Nothing here lists a table.
6
+
7
+ A batch is processed in order. A record whose wakes cannot all be put on the queue is reported as failed, and Lambda retries from it; every wake key is the same on
8
+ the retry, so what was already sent starts nothing twice. Records that are no change (a version marked superseded, a card's counts refreshed) cost nothing.
9
+ """
10
+ from __future__ import annotations
11
+
12
+ import json
13
+ import os
14
+ from typing import Any
15
+
16
+ _INDEX: Any = None # held across invocations of one container: the listener index re-reads the body only when the live version moves
17
+
18
+
19
+ def listener_index(site) -> Any:
20
+ global _INDEX
21
+ if _INDEX is None:
22
+ import boto3
23
+
24
+ from papyrus_content.agent_listeners import ListenerIndex
25
+ from papyrus_content.agent_policy.run_gate import SiteCatalogue
26
+ from papyrus_content.graphql_authoring import PapyrusGraphQLAuthoringClient
27
+ from papyrus_content.site_store import SiteStore
28
+
29
+ if not (site.tenant_id and site.site_bucket):
30
+ raise RuntimeError("the change feed needs the site's tenant id and bucket (PAPYRUS_TENANT_ID, PAPYRUS_SITE_BUCKET) to find who listens")
31
+ os.environ.setdefault("PAPYRUS_GRAPHQL_AUTH", "iam") # the function's own role signs the calls
32
+ client = PapyrusGraphQLAuthoringClient(endpoint=site.appsync_endpoint)
33
+ _INDEX = ListenerIndex(SiteStore(boto3.client("s3"), site.site_bucket, SiteCatalogue(client)), site.tenant_id)
34
+ return _INDEX
35
+
36
+
37
+ def handler(event: dict[str, Any], context: Any = None, *, index=None, send=None, environment=None) -> dict[str, Any]:
38
+ from papyrus_content import item_change_feed
39
+ from papyrus_content.agent_wakes import wake_sender
40
+ from papyrus_content.localize.dispatch import decode_image
41
+
42
+ site = item_change_feed.Site.from_environment(environment if environment is not None else os.environ)
43
+ result = item_change_feed.handle(event.get("Records", []), decode=decode_image, listeners=lambda: (index or listener_index(site)).document(),
44
+ send=send or wake_sender(), site=site)
45
+ print(json.dumps({"event": "papyrus_item_change_feed", "records": len(event.get("Records", [])), "wakesSent": result["wakesSent"], "failed": len(result["batchItemFailures"])}))
46
+ return {"batchItemFailures": result["batchItemFailures"]}
@@ -4,7 +4,9 @@ const KNOWN_KEYS = [
4
4
  "name", "siteId", "siteOrigin", "basePath", "computeRoleArn", "sendingDomain", "fromAddress", "fromName", "theme", "lists",
5
5
  "itemUrlStyle", "configurationSet", "consent", "confirmWindowHours",
6
6
  ];
7
- const LIST_KEYS = ["id", "name", "description", "rule", "approval"];
7
+ const LIST_KEYS = ["id", "name", "description", "rule", "approval", "family", "cadence", "sendAt", "timeZone"];
8
+ const CADENCES = ["each", "daily", "weekly"];
9
+ const WEEKDAYS = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
8
10
  /** The helpers shared with the newsletter word their errors for it; this plugin says its own name. */
9
11
  function inThisPlugin(run) {
10
12
  try {
@@ -25,12 +27,32 @@ function resolveList(raw, index) {
25
27
  const approval = list.approval === undefined ? "admin" : list.approval;
26
28
  if (approval !== "admin" && approval !== "none")
27
29
  fail(`${label}.approval must be "admin" or "none"`);
30
+ const family = list.family === undefined ? undefined : matching(list.family, `${label}.family`, NEWSLETTER_LIST_ID, "lowercase letters, digits and hyphens, starting with a letter");
31
+ const cadence = list.cadence === undefined ? undefined : list.cadence;
32
+ if (cadence !== undefined && !CADENCES.includes(cadence))
33
+ fail(`${label}.cadence must be one of: ${CADENCES.join(", ")}`);
34
+ const periodic = cadence === "daily" || cadence === "weekly";
35
+ if (periodic) {
36
+ const sendAt = record(list.sendAt, `${label}.sendAt`, ["time", "day"]);
37
+ matching(sendAt.time, `${label}.sendAt.time`, /^([01]\d|2[0-3]):[0-5]\d$/, "a local time of day such as 06:00");
38
+ if (cadence === "weekly" && !WEEKDAYS.includes(sendAt.day))
39
+ fail(`${label}.sendAt.day must be a weekday name: ${WEEKDAYS.join(", ")}`);
40
+ if (cadence === "daily" && sendAt.day !== undefined)
41
+ fail(`${label}.sendAt.day is for a weekly list`);
42
+ text(list.timeZone, `${label}.timeZone`, 64);
43
+ }
44
+ else if (list.sendAt !== undefined || list.timeZone !== undefined) {
45
+ fail(`${label} is not a periodic list, so it names no sendAt or timeZone`);
46
+ }
28
47
  return {
29
48
  id: matching(list.id, `${label}.id`, NEWSLETTER_LIST_ID, "lowercase letters, digits and hyphens, starting with a letter (at most 40 characters)"),
30
49
  name: text(list.name, `${label}.name`, 80),
31
50
  description: text(list.description, `${label}.description`, 300, { optional: true, fallback: "" }),
32
51
  rule: resolveRule(list.rule, `${label}.rule`),
33
52
  approval,
53
+ ...(family === undefined ? {} : { family }),
54
+ ...(cadence === undefined ? {} : { cadence: cadence }),
55
+ ...(periodic ? { sendAt: list.sendAt, timeZone: list.timeZone } : {}),
34
56
  };
35
57
  }
36
58
  /** A whole, positive number of hours. 72 by default: how long the newsletter has always told readers a link works. */
@@ -29,6 +29,13 @@ export type NotificationsList = {
29
29
  description: string;
30
30
  rule: NewsletterRule;
31
31
  approval: "admin" | "none";
32
+ /** The cadence family: lists that carry the same items at different cadences share one, and a reader holds one list of a family. None: its own family. */
33
+ family?: string;
34
+ /** `each`, `daily` or `weekly`, as in the site's `lists` document. A reader's switch between lists of a family waits for the next period start of its periodic list. */
35
+ cadence?: "each" | "daily" | "weekly";
36
+ /** A periodic list's local send time (`time`, and `day` for a weekly list) and IANA time zone. */
37
+ sendAt?: { time: string; day?: string };
38
+ timeZone?: string;
32
39
  };
33
40
 
34
41
  export type NotificationsConfig = {
@@ -58,7 +65,9 @@ const KNOWN_KEYS = [
58
65
  "name", "siteId", "siteOrigin", "basePath", "computeRoleArn", "sendingDomain", "fromAddress", "fromName", "theme", "lists",
59
66
  "itemUrlStyle", "configurationSet", "consent", "confirmWindowHours",
60
67
  ];
61
- const LIST_KEYS = ["id", "name", "description", "rule", "approval"];
68
+ const LIST_KEYS = ["id", "name", "description", "rule", "approval", "family", "cadence", "sendAt", "timeZone"];
69
+ const CADENCES = ["each", "daily", "weekly"];
70
+ const WEEKDAYS = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
62
71
 
63
72
  /** The helpers shared with the newsletter word their errors for it; this plugin says its own name. */
64
73
  function inThisPlugin<T>(run: () => T): T {
@@ -79,12 +88,28 @@ function resolveList(raw: unknown, index: number): NotificationsList {
79
88
  const list = record(raw, label, LIST_KEYS);
80
89
  const approval = list.approval === undefined ? "admin" : list.approval;
81
90
  if (approval !== "admin" && approval !== "none") fail(`${label}.approval must be "admin" or "none"`);
91
+ const family = list.family === undefined ? undefined : matching(list.family, `${label}.family`, NEWSLETTER_LIST_ID, "lowercase letters, digits and hyphens, starting with a letter");
92
+ const cadence = list.cadence === undefined ? undefined : list.cadence;
93
+ if (cadence !== undefined && !CADENCES.includes(cadence as string)) fail(`${label}.cadence must be one of: ${CADENCES.join(", ")}`);
94
+ const periodic = cadence === "daily" || cadence === "weekly";
95
+ if (periodic) {
96
+ const sendAt = record(list.sendAt, `${label}.sendAt`, ["time", "day"]);
97
+ matching(sendAt.time, `${label}.sendAt.time`, /^([01]\d|2[0-3]):[0-5]\d$/, "a local time of day such as 06:00");
98
+ if (cadence === "weekly" && !WEEKDAYS.includes(sendAt.day as string)) fail(`${label}.sendAt.day must be a weekday name: ${WEEKDAYS.join(", ")}`);
99
+ if (cadence === "daily" && sendAt.day !== undefined) fail(`${label}.sendAt.day is for a weekly list`);
100
+ text(list.timeZone, `${label}.timeZone`, 64);
101
+ } else if (list.sendAt !== undefined || list.timeZone !== undefined) {
102
+ fail(`${label} is not a periodic list, so it names no sendAt or timeZone`);
103
+ }
82
104
  return {
83
105
  id: matching(list.id, `${label}.id`, NEWSLETTER_LIST_ID, "lowercase letters, digits and hyphens, starting with a letter (at most 40 characters)"),
84
106
  name: text(list.name, `${label}.name`, 80),
85
107
  description: text(list.description, `${label}.description`, 300, { optional: true, fallback: "" }),
86
108
  rule: resolveRule(list.rule, `${label}.rule`),
87
109
  approval,
110
+ ...(family === undefined ? {} : { family }),
111
+ ...(cadence === undefined ? {} : { cadence: cadence as NotificationsList["cadence"] }),
112
+ ...(periodic ? { sendAt: list.sendAt as NotificationsList["sendAt"], timeZone: list.timeZone as string } : {}),
88
113
  };
89
114
  }
90
115
 
@@ -1,4 +1,4 @@
1
- caducus[notify]==0.3.0
1
+ caducus[notify]==0.4.0
2
2
  PyYAML>=6.0.2,<7
3
3
  citeproc-py>=0.8.2,<1
4
4
  anthus-markus==0.7.0
@@ -29,7 +29,7 @@ export const HANDLERS = {
29
29
  pause: "papyrus_content.notifications.handler.pause",
30
30
  };
31
31
  /** Caducus is pinned exactly, beside `papyrus_content`: a package change is a Caducus release, then a Papyrus release. */
32
- export const CADUCUS_REQUIREMENT = "caducus[notify]==0.3.0";
32
+ export const CADUCUS_REQUIREMENT = "caducus[notify]==0.4.0";
33
33
  export const NOTIFICATIONS_REQUIREMENTS = [CADUCUS_REQUIREMENT, "PyYAML>=6.0.2,<7", "citeproc-py>=0.8.2,<1", "anthus-markus==0.7.0", "Pillow>=11.3,<12"];
34
34
  /** Relative to `amplify/functions/`, which is where the shared bundler looks for a function's `handler.py`. */
35
35
  const FUNCTION_DIRECTORY = "../plugins/notifications/function";
@@ -89,7 +89,7 @@ export function notificationsEnvironment(config, names) {
89
89
  FROM_NAME: config.fromName,
90
90
  CONFIGURATION_SET: config.configurationSet,
91
91
  ITEM_URL_STYLE: config.itemUrlStyle,
92
- LISTS_JSON: JSON.stringify(config.lists.map((list) => ({ id: list.id, name: list.name, description: list.description, rule: list.rule, approval: list.approval }))),
92
+ LISTS_JSON: JSON.stringify(config.lists.map((list) => ({ id: list.id, name: list.name, description: list.description, rule: list.rule, approval: list.approval, family: list.family, cadence: list.cadence, sendAt: list.sendAt, timeZone: list.timeZone }))),
93
93
  THEME_JSON: JSON.stringify(config.theme),
94
94
  CONSENT: config.consent,
95
95
  CONFIRM_WINDOW_SECONDS: String(config.confirmWindowHours * 3600),
@@ -33,7 +33,7 @@ export const HANDLERS = {
33
33
  pause: "papyrus_content.notifications.handler.pause",
34
34
  } as const;
35
35
  /** Caducus is pinned exactly, beside `papyrus_content`: a package change is a Caducus release, then a Papyrus release. */
36
- export const CADUCUS_REQUIREMENT = "caducus[notify]==0.3.0";
36
+ export const CADUCUS_REQUIREMENT = "caducus[notify]==0.4.0";
37
37
  export const NOTIFICATIONS_REQUIREMENTS = [CADUCUS_REQUIREMENT, "PyYAML>=6.0.2,<7", "citeproc-py>=0.8.2,<1", "anthus-markus==0.7.0", "Pillow>=11.3,<12"];
38
38
  /** Relative to `amplify/functions/`, which is where the shared bundler looks for a function's `handler.py`. */
39
39
  const FUNCTION_DIRECTORY = "../plugins/notifications/function";
@@ -100,7 +100,7 @@ export function notificationsEnvironment(config: NotificationsConfig, names: { t
100
100
  FROM_NAME: config.fromName,
101
101
  CONFIGURATION_SET: config.configurationSet,
102
102
  ITEM_URL_STYLE: config.itemUrlStyle,
103
- LISTS_JSON: JSON.stringify(config.lists.map((list) => ({ id: list.id, name: list.name, description: list.description, rule: list.rule, approval: list.approval }))),
103
+ LISTS_JSON: JSON.stringify(config.lists.map((list) => ({ id: list.id, name: list.name, description: list.description, rule: list.rule, approval: list.approval, family: list.family, cadence: list.cadence, sendAt: list.sendAt, timeZone: list.timeZone }))),
104
104
  THEME_JSON: JSON.stringify(config.theme),
105
105
  CONSENT: config.consent,
106
106
  CONFIRM_WINDOW_SECONDS: String(config.confirmWindowHours * 3600),
@@ -34,6 +34,7 @@ import { addCliRemoteLogin, planCliEnrollment, planCliRemoteLogin } from "./cli-
34
34
  import { cognitoAuthorizeEndpoint } from "./cli-login/cognito-endpoint.js";
35
35
  import { defineSiteData } from "./data/resource.js";
36
36
  import { agentPieces } from "./agents/pieces.js";
37
+ import { enableItemStream } from "./agents/item-change-feed.js";
37
38
  import { ADMIN_AGENT_POLICY_GRANT_STACK_NAME, ADMIN_AGENT_POLICY_GROUP, addAdminAgentPolicyGrant } from "./agents/admin-policy-grant.js";
38
39
  import { addAgentsStack } from "./agents/stack.js";
39
40
  import { isBootstrapStage, resolveExcludedModelGroups } from "./data/schema.js";
@@ -785,7 +786,22 @@ export function defineSiteBackend(papyrusSite, options = {}) {
785
786
  // Announcements are off until the owner turns them on; the parameters and the lease are per site (the brand id names the site).
786
787
  wireAnnouncements(backend, siteBackendIdentity.brandId);
787
788
  // Every always-on agent resource is in the one `agents` stack, which the first deploy of a new site leaves out (amplify/agents/stack.ts).
788
- addAgentsStack((name) => backend.createStack(name), agentPieces(siteBackendIdentity.brandId), isBootstrapStage(process.env));
789
+ // The Item change feed (slice B2) reads the Item table's stream, so the stream is switched on with the stack that reads it, never in the first deploy. A dedicated site
790
+ // with a tenant id only: a shared stack's rows carry tenants it does not act for, and the listener index is one site's document.
791
+ const bootstrapStage = isBootstrapStage(process.env);
792
+ const itemStreamArn = tenancyMode !== "shared" && backendTenantId !== "" && !bootstrapStage ? enableItemStream(backend) : undefined;
793
+ addAgentsStack((name) => backend.createStack(name), agentPieces(siteBackendIdentity.brandId, {
794
+ itemChangeFeed: itemStreamArn === undefined
795
+ ? undefined
796
+ : {
797
+ streamArn: itemStreamArn,
798
+ graphqlUrl: backend.data.resources.cfnResources.cfnGraphqlApi.attrGraphQlUrl,
799
+ apiId: backend.data.resources.graphqlApi.apiId,
800
+ tenantId: backendTenantId,
801
+ bucketName: storageBucket.bucketName,
802
+ bucketArn: storageBucket.bucketArn,
803
+ },
804
+ }), bootstrapStage);
789
805
  // The signed-in admin may put and get the agent policy document's versions (`papyrus agents set-rung --apply`). A dedicated site only: the grant names every
790
806
  // tenant's prefix, which a shared stack's admin must not hold.
791
807
  if (tenancyMode !== "shared") {
@@ -41,6 +41,7 @@ import { addCliRemoteLogin, planCliEnrollment, planCliRemoteLogin } from "./cli-
41
41
  import { cognitoAuthorizeEndpoint } from "./cli-login/cognito-endpoint";
42
42
  import { defineSiteData } from "./data/resource";
43
43
  import { agentPieces } from "./agents/pieces";
44
+ import { enableItemStream } from "./agents/item-change-feed";
44
45
  import { ADMIN_AGENT_POLICY_GRANT_STACK_NAME, ADMIN_AGENT_POLICY_GROUP, addAdminAgentPolicyGrant } from "./agents/admin-policy-grant";
45
46
  import { addAgentsStack } from "./agents/stack";
46
47
  import { isBootstrapStage, resolveExcludedModelGroups } from "./data/schema";
@@ -943,7 +944,27 @@ export function defineSiteBackend(papyrusSite: PapyrusSite, options: DefineSiteB
943
944
  // Announcements are off until the owner turns them on; the parameters and the lease are per site (the brand id names the site).
944
945
  wireAnnouncements(backend, siteBackendIdentity.brandId);
945
946
  // Every always-on agent resource is in the one `agents` stack, which the first deploy of a new site leaves out (amplify/agents/stack.ts).
946
- addAgentsStack((name) => backend.createStack(name), agentPieces(siteBackendIdentity.brandId), isBootstrapStage(process.env));
947
+ // The Item change feed (slice B2) reads the Item table's stream, so the stream is switched on with the stack that reads it, never in the first deploy. A dedicated site
948
+ // with a tenant id only: a shared stack's rows carry tenants it does not act for, and the listener index is one site's document.
949
+ const bootstrapStage = isBootstrapStage(process.env);
950
+ const itemStreamArn = tenancyMode !== "shared" && backendTenantId !== "" && !bootstrapStage ? enableItemStream(backend) : undefined;
951
+ addAgentsStack(
952
+ (name) => backend.createStack(name),
953
+ agentPieces(siteBackendIdentity.brandId, {
954
+ itemChangeFeed:
955
+ itemStreamArn === undefined
956
+ ? undefined
957
+ : {
958
+ streamArn: itemStreamArn,
959
+ graphqlUrl: backend.data.resources.cfnResources.cfnGraphqlApi.attrGraphQlUrl as string,
960
+ apiId: backend.data.resources.graphqlApi.apiId as string,
961
+ tenantId: backendTenantId,
962
+ bucketName: storageBucket.bucketName,
963
+ bucketArn: storageBucket.bucketArn,
964
+ },
965
+ }),
966
+ bootstrapStage,
967
+ );
947
968
  // The signed-in admin may put and get the agent policy document's versions (`papyrus agents set-rung --apply`). A dedicated site only: the grant names every
948
969
  // tenant's prefix, which a shared stack's admin must not hold.
949
970
  if (tenancyMode !== "shared") {
@@ -27,8 +27,14 @@ for (const name of siteNames) {
27
27
  assert.equal(commands[schedules], `PAPYRUS_ROOT="$PWD" PAPYRUS_GRAPHQL_AUTH=iam papyrus agents schedules --site ${config.brand.toLowerCase()}`, `${name}: build role, operator lane, the site's brand id`);
28
28
  assert.ok(!commands[schedules].includes("||"), `${name}: a failing schedule step fails the build`);
29
29
  assert.ok(!/dry-run|--check/.test(commands[schedules]), `${name}: the build reconciles`);
30
+ const listeners = commands.findIndex((line) => line.includes("papyrus agents listeners"));
31
+ assert.ok(listeners === schedules + 1, `${name}: the listener index is written right after the schedule group is reconciled`);
32
+ assert.equal(commands[listeners], 'PAPYRUS_ROOT="$PWD" PAPYRUS_GRAPHQL_AUTH=iam papyrus agents listeners', `${name}: build role, operator lane, the site's checkout`);
33
+ assert.ok(!commands[listeners].includes("||"), `${name}: a failing listener step fails the build`);
34
+ assert.ok(!/dry-run|--check/.test(commands[listeners]), `${name}: the build writes the index`);
30
35
  const alexa = commands.findIndex((line) => line.includes("alexa-sync"));
31
- assert.ok(alexa > schedules, `${name}: the Alexa sync, which may fail quietly, stays last`);
36
+ assert.ok(alexa > listeners, `${name}: the Alexa sync, which may fail quietly, stays last`);
32
37
  assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents apply"), `${name}: the staging build does not apply agent definitions`);
33
38
  assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents schedules"), `${name}: the staging build does not touch the schedule group`);
39
+ assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents listeners"), `${name}: the staging build does not write the listener index`);
34
40
  }
@@ -28,8 +28,14 @@ for (const name of siteNames) {
28
28
  assert.equal(commands[schedules], `PAPYRUS_ROOT="$PWD" PAPYRUS_GRAPHQL_AUTH=iam papyrus agents schedules --site ${config.brand.toLowerCase()}`, `${name}: build role, operator lane, the site's brand id`);
29
29
  assert.ok(!commands[schedules].includes("||"), `${name}: a failing schedule step fails the build`);
30
30
  assert.ok(!/dry-run|--check/.test(commands[schedules]), `${name}: the build reconciles`);
31
+ const listeners = commands.findIndex((line) => line.includes("papyrus agents listeners"));
32
+ assert.ok(listeners === schedules + 1, `${name}: the listener index is written right after the schedule group is reconciled`);
33
+ assert.equal(commands[listeners], 'PAPYRUS_ROOT="$PWD" PAPYRUS_GRAPHQL_AUTH=iam papyrus agents listeners', `${name}: build role, operator lane, the site's checkout`);
34
+ assert.ok(!commands[listeners].includes("||"), `${name}: a failing listener step fails the build`);
35
+ assert.ok(!/dry-run|--check/.test(commands[listeners]), `${name}: the build writes the index`);
31
36
  const alexa = commands.findIndex((line) => line.includes("alexa-sync"));
32
- assert.ok(alexa > schedules, `${name}: the Alexa sync, which may fail quietly, stays last`);
37
+ assert.ok(alexa > listeners, `${name}: the Alexa sync, which may fail quietly, stays last`);
33
38
  assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents apply"), `${name}: the staging build does not apply agent definitions`);
34
39
  assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents schedules"), `${name}: the staging build does not touch the schedule group`);
40
+ assert.ok(!cmsStagingBuildSpec(config).includes("papyrus agents listeners"), `${name}: the staging build does not write the listener index`);
35
41
  }
@@ -67,8 +67,12 @@ const AGENT_SYNC = `${CHECKOUT_AS_PAPYRUS_ROOT} ${BUILD_ROLE_LANE} papyrus agent
67
67
  function scheduleSync(config) {
68
68
  return `${CHECKOUT_AS_PAPYRUS_ROOT} ${BUILD_ROLE_LANE} papyrus agents schedules --site ${config.brand.toLowerCase()}`;
69
69
  }
70
+ // Right after the schedule group: write the site's listener index (slice B2, PPY-8a374e), the one small document the Item change feed reads to find the agents
71
+ // that listen for a change, so a change never lists the Automation table. It is derived from the same definitions, writes nothing when they have not changed,
72
+ // and holds no rung or pause. Never allowed to fail quietly either (features/agent-sync.feature).
73
+ const LISTENER_SYNC = `${CHECKOUT_AS_PAPYRUS_ROOT} ${BUILD_ROLE_LANE} papyrus agents listeners`;
70
74
  function procedureSyncCommands(config) {
71
- return [...pythonProvisioningCommands(config), PROCEDURE_SYNC, AGENT_SYNC, scheduleSync(config)];
75
+ return [...pythonProvisioningCommands(config), PROCEDURE_SYNC, AGENT_SYNC, scheduleSync(config), LISTENER_SYNC];
72
76
  }
73
77
  const GATE_FAILURE_MESSAGE_PREFIX = "No LeftBlock CI receipt for";
74
78
  /**
@@ -96,8 +96,13 @@ function scheduleSync(config: AmplifyAppShellSiteConfig): string {
96
96
  return `${CHECKOUT_AS_PAPYRUS_ROOT} ${BUILD_ROLE_LANE} papyrus agents schedules --site ${config.brand.toLowerCase()}`;
97
97
  }
98
98
 
99
+ // Right after the schedule group: write the site's listener index (slice B2, PPY-8a374e), the one small document the Item change feed reads to find the agents
100
+ // that listen for a change, so a change never lists the Automation table. It is derived from the same definitions, writes nothing when they have not changed,
101
+ // and holds no rung or pause. Never allowed to fail quietly either (features/agent-sync.feature).
102
+ const LISTENER_SYNC = `${CHECKOUT_AS_PAPYRUS_ROOT} ${BUILD_ROLE_LANE} papyrus agents listeners`;
103
+
99
104
  function procedureSyncCommands(config: AmplifyAppShellSiteConfig): string[] {
100
- return [...pythonProvisioningCommands(config), PROCEDURE_SYNC, AGENT_SYNC, scheduleSync(config)];
105
+ return [...pythonProvisioningCommands(config), PROCEDURE_SYNC, AGENT_SYNC, scheduleSync(config), LISTENER_SYNC];
101
106
  }
102
107
 
103
108
  const GATE_FAILURE_MESSAGE_PREFIX = "No LeftBlock CI receipt for";
@@ -1287,14 +1287,30 @@ export type AnnouncementsUnlockResult = {
1287
1287
  id: string;
1288
1288
  };
1289
1289
 
1290
- /** Correct a Delivery with a new public text: the next generation, which supersedes the one that went. */
1290
+ /** Correct a Delivery that went with a new public text: the next generation, which supersedes the one that went. */
1291
1291
  export type AnnouncementsCorrectInput = {
1292
- /** The Delivery's id. */
1292
+ /** The id of the Delivery that went and is to be corrected. */
1293
1293
  delivery: string;
1294
+ /** The corrected public text. It is checked like the text of a new Delivery. */
1295
+ text: string;
1294
1296
  };
1295
1297
 
1296
1298
  export type AnnouncementsCorrectResult = {
1299
+ /** The new Delivery's id. */
1297
1300
  id: string;
1301
+ /** The new Delivery's generation. */
1302
+ generation: number;
1303
+ /** The id of the Delivery it replaces. */
1304
+ supersedes: string;
1305
+ /** The new Delivery's state. */
1306
+ state: string;
1307
+ /** The review the new Delivery goes under: the one the old Delivery had. */
1308
+ approval: string;
1309
+ /** The checks the new text passed. */
1310
+ checks: {
1311
+ name: string;
1312
+ passed: boolean;
1313
+ }[];
1298
1314
  };
1299
1315
 
1300
1316
  /** Record the address of a post a person made by hand for a manual Delivery: the Delivery becomes sent and its attempt names that person. */
package/package.json CHANGED
@@ -650,7 +650,7 @@
650
650
  "optional": true
651
651
  }
652
652
  },
653
- "version": "5.131.0",
653
+ "version": "5.132.0-next.2",
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.131.0",
2
+ "version": "5.132.0-next.2",
3
3
  "routes": [
4
4
  {
5
5
  "file": "app/%5F_preview/[[...path]]/route.ts",