@anthusai/papyrus 1.0.0-next.6 → 1.0.0-next.60
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/auth/redirect-urls.js +54 -0
- package/amplify/auth/redirect-urls.ts +66 -0
- package/amplify/auth/resource.js +20 -5
- package/amplify/auth/resource.ts +27 -5
- package/amplify/data/resource.js +38 -80
- package/amplify/data/resource.ts +38 -80
- package/amplify/data/schema.js +41 -60
- package/amplify/data/schema.ts +43 -60
- package/amplify/functions/category-action/handler.ts +5 -3
- package/amplify/functions/console-chat-responder/py/execute_tactus_runner.py +0 -10
- package/amplify/functions/console-chat-responder/resource.js +0 -7
- package/amplify/functions/console-chat-responder/resource.ts +0 -8
- package/amplify/functions/console-chat-responder/src/main.rs +0 -9
- package/amplify/functions/content-actions/handler.py +144 -2
- package/amplify/functions/content-actions/requirements.txt +2 -1
- package/amplify/functions/content-actions/resource.js +6 -1
- package/amplify/functions/content-actions/resource.ts +9 -2
- package/amplify/functions/renditions/handler.py +120 -0
- package/amplify/functions/renditions/requirements.txt +4 -0
- package/amplify/functions/shared/python-bundle.js +42 -2
- package/amplify/functions/shared/python-bundle.ts +47 -2
- package/amplify/functions/shared/reference-curation-metadata.ts +29 -0
- package/amplify/inbound-email/ses-intake.js +86 -0
- package/amplify/inbound-email/ses-intake.ts +110 -0
- package/amplify/plugins/registry.js +19 -0
- package/amplify/plugins/registry.ts +23 -0
- package/amplify/plugins/signup/function/handler.py +200 -0
- package/amplify/plugins/signup/function/resource.js +27 -0
- package/amplify/plugins/signup/function/resource.ts +35 -0
- package/amplify/plugins/signup/papyrus.plugin.js +59 -0
- package/amplify/plugins/signup/papyrus.plugin.ts +74 -0
- package/amplify/plugins/signup/schema.js +40 -0
- package/amplify/plugins/signup/schema.ts +41 -0
- package/amplify/plugins/signup/waf.js +48 -0
- package/amplify/plugins/signup/waf.ts +51 -0
- package/amplify/plugins/types.js +1 -0
- package/amplify/plugins/types.ts +39 -0
- package/amplify/plugins/wire.js +24 -0
- package/amplify/plugins/wire.ts +26 -0
- package/amplify/publication/default-publication.js +18 -0
- package/amplify/publication/default-publication.ts +20 -0
- package/amplify/publication/invalidation-alarm.js +26 -0
- package/amplify/publication/invalidation-alarm.ts +30 -0
- package/amplify/publication/redirect-and-index.js +37 -0
- package/amplify/publication/renditions-function.js +74 -0
- package/amplify/publication/renditions-function.ts +112 -0
- package/amplify/publication/renditions-settings.js +51 -0
- package/amplify/publication/renditions-settings.ts +58 -0
- package/amplify/publication/reproject-on-deploy.js +73 -0
- package/amplify/publication/reproject-on-deploy.ts +78 -0
- package/amplify/publication/s3-projection-settings.js +67 -0
- package/amplify/publication/s3-projection-settings.ts +101 -0
- package/amplify/publication/s3-projection.js +151 -0
- package/amplify/publication/s3-projection.ts +201 -0
- package/amplify/resolver-waves.js +26 -0
- package/amplify/resolver-waves.ts +34 -0
- package/amplify/revalidate-invalidation-settings.js +30 -0
- package/amplify/revalidate-invalidation-settings.ts +35 -0
- package/amplify/revalidate-secret-policy.js +13 -0
- package/amplify/revalidate-secret-policy.ts +19 -0
- package/amplify/site-backend-config.js +65 -1
- package/amplify/site-backend-config.ts +153 -2
- package/amplify/site-backend-names.js +103 -0
- package/amplify/site-backend-names.ts +166 -0
- package/amplify/site-backend.js +143 -176
- package/amplify/site-backend.ts +181 -201
- package/amplify/storage-backups/construct.js +31 -0
- package/amplify/storage-backups/construct.ts +47 -0
- package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +8 -1
- package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -0
- package/app/[year]/[month]/[day]/page/[pageNumber]/page.tsx +6 -1
- package/app/[year]/[month]/[day]/page.tsx +1 -1
- package/app/[year]/[month]/[day]/section/[sectionKey]/page.tsx +6 -1
- package/app/api/archive/editions/route.ts +1 -1
- package/app/api/media/[...path]/route.ts +5 -16
- package/app/api/revalidate/route.ts +15 -7
- package/app/archive/page.tsx +1 -1
- package/app/articles/[slug]/page.tsx +7 -5
- package/app/blog-rhythm.css +278 -0
- package/app/globals.css +2 -0
- package/app/layout.tsx +16 -0
- package/app/newsroom/[section]/[...selection]/page.tsx +9 -6
- package/app/newsroom/[section]/page.tsx +6 -3
- package/app/newsroom/layout.tsx +4 -9
- package/app/newsroom/settings/page.tsx +6 -0
- package/app/newsroom/work/page.tsx +10 -0
- package/app/page.tsx +22 -8
- package/app/robots.ts +2 -5
- package/bin/papyrus-infra.mjs +3 -3
- package/components/amplify-client-provider.tsx +5 -22
- package/components/archive-shell.tsx +2 -22
- package/components/article-video.tsx +152 -5
- package/components/blog-page-background.tsx +23 -6
- package/components/markus-ir-preview.tsx +22 -1
- package/components/news-desk-page.tsx +4 -15
- package/components/news-desk-taxonomy-client.ts +53 -2
- package/components/newspaper.tsx +6 -2
- package/components/newsroom-access-gate.tsx +2 -1
- package/components/newsroom-article-editor.tsx +109 -5
- package/components/newsroom-board-view.tsx +100 -0
- package/components/newsroom-client-shell.tsx +12 -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 +93 -0
- 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 +93 -0
- package/components/newsroom-newsprint-board.css +48 -0
- package/components/newsroom-ops-overview.tsx +28 -11
- package/components/newsroom-ops-shell.tsx +7 -1
- package/components/newsroom-organizer-shell.tsx +130 -0
- package/components/newsroom-organizer.css +63 -0
- package/components/newsroom-references-view.tsx +83 -8
- package/components/papyrus-console-shell.tsx +4 -2
- package/components/pictogram-figure.tsx +9 -2
- package/components/presentation-header.tsx +135 -0
- package/components/presentation-rhythm-hrule.tsx +17 -0
- package/components/reader-auth-control.tsx +8 -5
- package/components/reference-cyclotron-status.tsx +109 -0
- package/components/reference-relevance-review.tsx +75 -0
- package/components/settings-page.tsx +2 -1
- package/components/signup-entries-panel.tsx +94 -0
- package/components/topic-steering-workspace.tsx +74 -6
- package/components/use-blog-header-obstacles.ts +81 -0
- package/components/use-brand-fonts-ready.ts +28 -0
- package/components/use-near-viewport.ts +30 -0
- package/components/use-rhythm-overlay.ts +29 -0
- package/infra/amplify-app-shell.js +202 -71
- package/infra/amplify-app-shell.ts +211 -77
- package/infra/build-specs.js +23 -8
- package/infra/build-specs.ts +27 -11
- package/infra/site-config.js +259 -34
- package/infra/site-config.ts +314 -43
- package/lib/amplify-outputs-path.ts +5 -1
- package/lib/amplify-server-runtime.ts +36 -1
- package/lib/blog-feature-solver.ts +459 -0
- package/lib/blog-rhythm.ts +134 -0
- package/lib/brand-fonts-watch.ts +43 -0
- package/lib/brand-fonts.ts +112 -0
- package/lib/cached-content-repository.ts +12 -0
- package/lib/category-repository.ts +42 -93
- package/lib/content-actions-demo.ts +19 -1
- package/lib/content-repository.ts +3 -0
- package/lib/content-source-context.ts +12 -2
- package/lib/content-types.ts +4 -0
- package/lib/edition-routes.ts +31 -29
- package/lib/graphql-content-repository.ts +67 -24
- package/lib/media-route-response.ts +45 -0
- package/lib/newspaper-layout.ts +3 -2
- package/lib/newsroom-base-path.ts +12 -3
- package/lib/newsroom-board.ts +60 -0
- package/lib/newsroom-category-drilldown.ts +3 -2
- package/lib/newsroom-forum-routes.ts +6 -4
- package/lib/newsroom-index-filters.ts +14 -10
- package/lib/newsroom-media-backend.ts +142 -0
- package/lib/newsroom-media.ts +182 -0
- package/lib/newsroom-nav.ts +1 -0
- package/lib/newsroom-organizer-nav.ts +34 -0
- package/lib/newsroom-section-routing.ts +20 -0
- package/lib/oauth-redirect-priority.ts +40 -0
- package/lib/papyrus-web-locations.ts +7 -6
- package/lib/plugin-settings.ts +11 -0
- package/lib/presentation-footer.ts +3 -2
- package/lib/pretext-layout.ts +12 -3
- package/lib/rate-limit-retry.ts +55 -0
- package/lib/reader-base-path.ts +24 -0
- package/lib/reader-cache-lifetime.ts +5 -0
- package/lib/reader-static-params.ts +85 -4
- package/lib/reader-storage-url.ts +9 -12
- package/lib/reference-policy.ts +5 -0
- package/lib/relevance-decisions.ts +103 -0
- package/lib/relevance-status.ts +63 -0
- package/lib/renderer.ts +7 -0
- package/lib/revalidate-prewarm.ts +53 -0
- package/lib/revalidate-secret.ts +59 -0
- package/lib/robots-policy.ts +14 -0
- package/lib/root-route-redirect.ts +16 -0
- package/lib/semantic-graph.ts +7 -0
- package/lib/shared-credentials-provider.ts +61 -0
- package/lib/signup-csv.ts +24 -0
- package/lib/site-brand.ts +40 -0
- package/lib/staging-gated-path.ts +23 -0
- package/lib/staging-preview-object.ts +21 -5
- package/lib/test-editor-override.ts +4 -0
- package/lib/video-loading.ts +22 -0
- package/lib/video-script.ts +14 -0
- package/middleware.ts +11 -19
- package/package.json +48 -1
- package/renderers/pretext/article-page.tsx +39 -3
- package/renderers/pretext/presentation-shared.tsx +113 -0
- package/renderers/pretext/presentation-shell.tsx +15 -102
- package/renderers/pretext/rhythm-article-page.tsx +165 -0
- package/renderers/pretext/rhythm-blog-presentation.tsx +279 -0
- package/renderers/pretext/rhythm-shell-style.ts +35 -0
- package/routes.manifest.json +52 -12
- package/src/sync.mjs +30 -6
- package/src/with-papyrus.d.mts +9 -0
- package/src/with-papyrus.mjs +48 -3
- package/amplify/functions/graphql-jwt-authorizer/handler.ts +0 -193
- package/amplify/functions/graphql-jwt-authorizer/resource.js +0 -14
- package/amplify/functions/graphql-jwt-authorizer/resource.ts +0 -15
package/amplify/data/schema.ts
CHANGED
|
@@ -23,7 +23,7 @@ const modelWithoutSubscriptions = <Fields extends Parameters<typeof a.model>[0]>
|
|
|
23
23
|
a.model(fields).disableOperations(["subscriptions"]);
|
|
24
24
|
const realtimeModel = <Fields extends Parameters<typeof a.model>[0]>(fields: Fields) => a.model(fields);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const baseDefinitions = {
|
|
27
27
|
UserProfile: modelWithoutSubscriptions({
|
|
28
28
|
id: a.id().required(),
|
|
29
29
|
email: a.email(),
|
|
@@ -268,11 +268,12 @@ export const schema = a.schema({
|
|
|
268
268
|
actorLabel: a.string(),
|
|
269
269
|
note: a.string(),
|
|
270
270
|
reasonCode: a.string(),
|
|
271
|
+
decisionRelationId: a.id(),
|
|
272
|
+
shareable: a.boolean(),
|
|
271
273
|
})
|
|
272
274
|
.returns(a.ref("ReferenceCurationActionResult"))
|
|
273
275
|
.authorization((allow) => [
|
|
274
276
|
allow.groups(categoryWriteGroups),
|
|
275
|
-
allow.custom(),
|
|
276
277
|
])
|
|
277
278
|
.handler(a.handler.function(categoryAction)),
|
|
278
279
|
|
|
@@ -288,7 +289,6 @@ export const schema = a.schema({
|
|
|
288
289
|
.returns(a.ref("ReferenceQualityActionResult"))
|
|
289
290
|
.authorization((allow) => [
|
|
290
291
|
allow.groups(categoryWriteGroups),
|
|
291
|
-
allow.custom(),
|
|
292
292
|
])
|
|
293
293
|
.handler(a.handler.function(categoryAction)),
|
|
294
294
|
|
|
@@ -400,7 +400,7 @@ export const schema = a.schema({
|
|
|
400
400
|
getNewsroomSummary: a
|
|
401
401
|
.query()
|
|
402
402
|
.returns(a.ref("NewsroomSummary"))
|
|
403
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
403
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
404
404
|
.handler(a.handler.function(newsroomSummary)),
|
|
405
405
|
|
|
406
406
|
deriveMarkus: a
|
|
@@ -444,7 +444,7 @@ export const schema = a.schema({
|
|
|
444
444
|
input: a.json().required(),
|
|
445
445
|
})
|
|
446
446
|
.returns(a.json())
|
|
447
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
447
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
448
448
|
.handler(a.handler.function(knowledgeQuery)),
|
|
449
449
|
|
|
450
450
|
updateNewsroomSummary: a
|
|
@@ -455,7 +455,7 @@ export const schema = a.schema({
|
|
|
455
455
|
reason: a.string(),
|
|
456
456
|
})
|
|
457
457
|
.returns(a.ref("NewsroomSummary"))
|
|
458
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
458
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
459
459
|
.handler(a.handler.function(newsroomSummary)),
|
|
460
460
|
|
|
461
461
|
ModelAttachmentUploadSlot: a.customType({
|
|
@@ -515,7 +515,7 @@ export const schema = a.schema({
|
|
|
515
515
|
status: a.string(),
|
|
516
516
|
})
|
|
517
517
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
518
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
518
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
519
519
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
520
520
|
|
|
521
521
|
completeModelAttachmentUpload: a
|
|
@@ -537,7 +537,7 @@ export const schema = a.schema({
|
|
|
537
537
|
status: a.string(),
|
|
538
538
|
})
|
|
539
539
|
.returns(a.ref("ModelAttachment"))
|
|
540
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
540
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
541
541
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
542
542
|
|
|
543
543
|
abortModelAttachmentUpload: a
|
|
@@ -559,7 +559,7 @@ export const schema = a.schema({
|
|
|
559
559
|
status: a.string(),
|
|
560
560
|
})
|
|
561
561
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
562
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
562
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
563
563
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
564
564
|
|
|
565
565
|
createModelAttachmentDownload: a
|
|
@@ -568,7 +568,7 @@ export const schema = a.schema({
|
|
|
568
568
|
attachmentId: a.id().required(),
|
|
569
569
|
})
|
|
570
570
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
571
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
571
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
572
572
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
573
573
|
|
|
574
574
|
AssignmentActionResult: a.customType({
|
|
@@ -662,7 +662,7 @@ export const schema = a.schema({
|
|
|
662
662
|
limit: a.integer(),
|
|
663
663
|
})
|
|
664
664
|
.returns(a.ref("AssignmentContext").array().required())
|
|
665
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
665
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
666
666
|
.handler(a.handler.function(assignmentAction)),
|
|
667
667
|
|
|
668
668
|
listAssignmentQueue: a
|
|
@@ -673,7 +673,7 @@ export const schema = a.schema({
|
|
|
673
673
|
limit: a.integer(),
|
|
674
674
|
})
|
|
675
675
|
.returns(a.ref("AssignmentContext").array().required())
|
|
676
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
676
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
677
677
|
.handler(a.handler.function(assignmentAction)),
|
|
678
678
|
|
|
679
679
|
getAssignmentContext: a
|
|
@@ -682,7 +682,7 @@ export const schema = a.schema({
|
|
|
682
682
|
assignmentId: a.id().required(),
|
|
683
683
|
})
|
|
684
684
|
.returns(a.ref("AssignmentContext"))
|
|
685
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
685
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
686
686
|
.handler(a.handler.function(assignmentAction)),
|
|
687
687
|
|
|
688
688
|
claimAssignment: a
|
|
@@ -699,7 +699,7 @@ export const schema = a.schema({
|
|
|
699
699
|
note: a.string(),
|
|
700
700
|
})
|
|
701
701
|
.returns(a.ref("AssignmentActionResult"))
|
|
702
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
702
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
703
703
|
.handler(a.handler.function(assignmentAction)),
|
|
704
704
|
|
|
705
705
|
releaseAssignment: a
|
|
@@ -711,7 +711,7 @@ export const schema = a.schema({
|
|
|
711
711
|
note: a.string(),
|
|
712
712
|
})
|
|
713
713
|
.returns(a.ref("AssignmentActionResult"))
|
|
714
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
714
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
715
715
|
.handler(a.handler.function(assignmentAction)),
|
|
716
716
|
|
|
717
717
|
completeAssignment: a
|
|
@@ -723,7 +723,7 @@ export const schema = a.schema({
|
|
|
723
723
|
note: a.string(),
|
|
724
724
|
})
|
|
725
725
|
.returns(a.ref("AssignmentActionResult"))
|
|
726
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
726
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
727
727
|
.handler(a.handler.function(assignmentAction)),
|
|
728
728
|
|
|
729
729
|
cancelAssignment: a
|
|
@@ -735,7 +735,7 @@ export const schema = a.schema({
|
|
|
735
735
|
note: a.string(),
|
|
736
736
|
})
|
|
737
737
|
.returns(a.ref("AssignmentActionResult"))
|
|
738
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
738
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
739
739
|
.handler(a.handler.function(assignmentAction)),
|
|
740
740
|
|
|
741
741
|
reopenAssignment: a
|
|
@@ -747,7 +747,7 @@ export const schema = a.schema({
|
|
|
747
747
|
note: a.string(),
|
|
748
748
|
})
|
|
749
749
|
.returns(a.ref("AssignmentActionResult"))
|
|
750
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
750
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
751
751
|
.handler(a.handler.function(assignmentAction)),
|
|
752
752
|
|
|
753
753
|
retryImmediateAssignment: a
|
|
@@ -759,7 +759,7 @@ export const schema = a.schema({
|
|
|
759
759
|
note: a.string(),
|
|
760
760
|
})
|
|
761
761
|
.returns(a.ref("AssignmentActionResult"))
|
|
762
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
762
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
763
763
|
.handler(a.handler.function(assignmentAction)),
|
|
764
764
|
|
|
765
765
|
listNewsroomProcedureDefinitions: a
|
|
@@ -775,7 +775,7 @@ export const schema = a.schema({
|
|
|
775
775
|
procedureKey: a.string(),
|
|
776
776
|
})
|
|
777
777
|
.returns(a.json())
|
|
778
|
-
.authorization((allow) => [allow.group(adminGroup)
|
|
778
|
+
.authorization((allow) => [allow.group(adminGroup)])
|
|
779
779
|
.handler(a.handler.function(procedureAction)),
|
|
780
780
|
|
|
781
781
|
saveNewsroomProcedureDefinition: a
|
|
@@ -817,7 +817,7 @@ export const schema = a.schema({
|
|
|
817
817
|
actorLabel: a.string(),
|
|
818
818
|
})
|
|
819
819
|
.returns(a.json())
|
|
820
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
820
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
821
821
|
.handler(a.handler.function(procedureAction)),
|
|
822
822
|
|
|
823
823
|
getNewsroomProcedureRun: a
|
|
@@ -826,7 +826,7 @@ export const schema = a.schema({
|
|
|
826
826
|
id: a.id().required(),
|
|
827
827
|
})
|
|
828
828
|
.returns(a.json())
|
|
829
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
829
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
830
830
|
.handler(a.handler.function(procedureAction)),
|
|
831
831
|
|
|
832
832
|
listNewsroomProcedureRunsByProcedure: a
|
|
@@ -835,7 +835,7 @@ export const schema = a.schema({
|
|
|
835
835
|
procedureId: a.id().required(),
|
|
836
836
|
})
|
|
837
837
|
.returns(a.json())
|
|
838
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
838
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
839
839
|
.handler(a.handler.function(procedureAction)),
|
|
840
840
|
|
|
841
841
|
Assignment: modelWithoutSubscriptions({
|
|
@@ -885,7 +885,6 @@ export const schema = a.schema({
|
|
|
885
885
|
.authorization((allow) => [
|
|
886
886
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
887
887
|
allow.authenticated("identityPool").to(authoringOperations),
|
|
888
|
-
allow.custom().to(authoringOperations),
|
|
889
888
|
]),
|
|
890
889
|
|
|
891
890
|
AssignmentEvent: modelWithoutSubscriptions({
|
|
@@ -908,7 +907,6 @@ export const schema = a.schema({
|
|
|
908
907
|
])
|
|
909
908
|
.authorization((allow) => [
|
|
910
909
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
911
|
-
allow.custom().to(authoringOperations),
|
|
912
910
|
]),
|
|
913
911
|
|
|
914
912
|
ProcedureDefinition: modelWithoutSubscriptions({
|
|
@@ -933,7 +931,6 @@ export const schema = a.schema({
|
|
|
933
931
|
])
|
|
934
932
|
.authorization((allow) => [
|
|
935
933
|
allow.group(adminGroup),
|
|
936
|
-
allow.custom().to(authoringOperations),
|
|
937
934
|
]),
|
|
938
935
|
|
|
939
936
|
ProcedureVersion: modelWithoutSubscriptions({
|
|
@@ -960,7 +957,6 @@ export const schema = a.schema({
|
|
|
960
957
|
])
|
|
961
958
|
.authorization((allow) => [
|
|
962
959
|
allow.group(adminGroup),
|
|
963
|
-
allow.custom().to(authoringOperations),
|
|
964
960
|
]),
|
|
965
961
|
|
|
966
962
|
ProcedureRun: modelWithoutSubscriptions({
|
|
@@ -993,7 +989,6 @@ export const schema = a.schema({
|
|
|
993
989
|
.authorization((allow) => [
|
|
994
990
|
allow.group("editor").to(["read"]),
|
|
995
991
|
allow.group(adminGroup).to(authoringOperations),
|
|
996
|
-
allow.custom().to(authoringOperations),
|
|
997
992
|
]),
|
|
998
993
|
|
|
999
994
|
NewsroomSection: modelWithoutSubscriptions({
|
|
@@ -1021,7 +1016,6 @@ export const schema = a.schema({
|
|
|
1021
1016
|
])
|
|
1022
1017
|
.authorization((allow) => [
|
|
1023
1018
|
allow.groups(categoryWriteGroups),
|
|
1024
|
-
allow.custom().to(authoringOperations),
|
|
1025
1019
|
]),
|
|
1026
1020
|
|
|
1027
1021
|
KnowledgeCorpus: modelWithoutSubscriptions({
|
|
@@ -1039,7 +1033,6 @@ export const schema = a.schema({
|
|
|
1039
1033
|
])
|
|
1040
1034
|
.authorization((allow) => [
|
|
1041
1035
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1042
|
-
allow.custom().to(authoringOperations),
|
|
1043
1036
|
]),
|
|
1044
1037
|
|
|
1045
1038
|
KnowledgeImportRun: modelWithoutSubscriptions({
|
|
@@ -1067,7 +1060,6 @@ export const schema = a.schema({
|
|
|
1067
1060
|
])
|
|
1068
1061
|
.authorization((allow) => [
|
|
1069
1062
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1070
|
-
allow.custom().to(authoringOperations),
|
|
1071
1063
|
]),
|
|
1072
1064
|
|
|
1073
1065
|
KnowledgeRawPayload: modelWithoutSubscriptions({
|
|
@@ -1085,7 +1077,6 @@ export const schema = a.schema({
|
|
|
1085
1077
|
])
|
|
1086
1078
|
.authorization((allow) => [
|
|
1087
1079
|
allow.groups(categoryWriteGroups),
|
|
1088
|
-
allow.custom().to(authoringOperations),
|
|
1089
1080
|
]),
|
|
1090
1081
|
|
|
1091
1082
|
KnowledgeArtifact: modelWithoutSubscriptions({
|
|
@@ -1105,7 +1096,6 @@ export const schema = a.schema({
|
|
|
1105
1096
|
])
|
|
1106
1097
|
.authorization((allow) => [
|
|
1107
1098
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1108
|
-
allow.custom().to(authoringOperations),
|
|
1109
1099
|
]),
|
|
1110
1100
|
|
|
1111
1101
|
CategorySet: modelWithoutSubscriptions({
|
|
@@ -1135,7 +1125,6 @@ export const schema = a.schema({
|
|
|
1135
1125
|
])
|
|
1136
1126
|
.authorization((allow) => [
|
|
1137
1127
|
allow.groups(categoryWriteGroups),
|
|
1138
|
-
allow.custom().to(authoringOperations),
|
|
1139
1128
|
]),
|
|
1140
1129
|
|
|
1141
1130
|
Category: modelWithoutSubscriptions({
|
|
@@ -1177,7 +1166,6 @@ export const schema = a.schema({
|
|
|
1177
1166
|
])
|
|
1178
1167
|
.authorization((allow) => [
|
|
1179
1168
|
allow.groups(categoryWriteGroups),
|
|
1180
|
-
allow.custom().to(authoringOperations),
|
|
1181
1169
|
]),
|
|
1182
1170
|
|
|
1183
1171
|
CategoryKeyword: modelWithoutSubscriptions({
|
|
@@ -1206,7 +1194,6 @@ export const schema = a.schema({
|
|
|
1206
1194
|
])
|
|
1207
1195
|
.authorization((allow) => [
|
|
1208
1196
|
allow.groups(categoryWriteGroups),
|
|
1209
|
-
allow.custom().to(authoringOperations),
|
|
1210
1197
|
]),
|
|
1211
1198
|
|
|
1212
1199
|
LexicalSteeringRule: modelWithoutSubscriptions({
|
|
@@ -1235,7 +1222,6 @@ export const schema = a.schema({
|
|
|
1235
1222
|
])
|
|
1236
1223
|
.authorization((allow) => [
|
|
1237
1224
|
allow.groups(categoryWriteGroups),
|
|
1238
|
-
allow.custom().to(authoringOperations),
|
|
1239
1225
|
]),
|
|
1240
1226
|
|
|
1241
1227
|
SteeringProposal: modelWithoutSubscriptions({
|
|
@@ -1273,7 +1259,6 @@ export const schema = a.schema({
|
|
|
1273
1259
|
])
|
|
1274
1260
|
.authorization((allow) => [
|
|
1275
1261
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1276
|
-
allow.custom().to(authoringOperations),
|
|
1277
1262
|
]),
|
|
1278
1263
|
|
|
1279
1264
|
SteeringDecision: modelWithoutSubscriptions({
|
|
@@ -1293,7 +1278,6 @@ export const schema = a.schema({
|
|
|
1293
1278
|
])
|
|
1294
1279
|
.authorization((allow) => [
|
|
1295
1280
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1296
|
-
allow.custom().to(authoringOperations),
|
|
1297
1281
|
]),
|
|
1298
1282
|
|
|
1299
1283
|
Reference: realtimeModel({
|
|
@@ -1345,7 +1329,6 @@ export const schema = a.schema({
|
|
|
1345
1329
|
])
|
|
1346
1330
|
.authorization((allow) => [
|
|
1347
1331
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1348
|
-
allow.custom().to(authoringOperations),
|
|
1349
1332
|
]),
|
|
1350
1333
|
|
|
1351
1334
|
ReferenceAttachment: modelWithoutSubscriptions({
|
|
@@ -1375,7 +1358,6 @@ export const schema = a.schema({
|
|
|
1375
1358
|
])
|
|
1376
1359
|
.authorization((allow) => [
|
|
1377
1360
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1378
|
-
allow.custom().to(authoringOperations),
|
|
1379
1361
|
]),
|
|
1380
1362
|
|
|
1381
1363
|
SemanticNode: modelWithoutSubscriptions({
|
|
@@ -1397,6 +1379,11 @@ export const schema = a.schema({
|
|
|
1397
1379
|
displayName: a.string(),
|
|
1398
1380
|
description: a.string(),
|
|
1399
1381
|
aliases: a.string().array(),
|
|
1382
|
+
authorityScore: a.float(),
|
|
1383
|
+
authorityRank: a.integer(),
|
|
1384
|
+
acceptedReferenceMentionCount: a.integer(),
|
|
1385
|
+
distinctSourceKindCount: a.integer(),
|
|
1386
|
+
relationCount: a.integer(),
|
|
1400
1387
|
status: a.string().required(),
|
|
1401
1388
|
importRunId: a.id(),
|
|
1402
1389
|
createdAt: a.datetime(),
|
|
@@ -1413,7 +1400,6 @@ export const schema = a.schema({
|
|
|
1413
1400
|
])
|
|
1414
1401
|
.authorization((allow) => [
|
|
1415
1402
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1416
|
-
allow.custom().to(authoringOperations),
|
|
1417
1403
|
]),
|
|
1418
1404
|
|
|
1419
1405
|
Message: realtimeModel({
|
|
@@ -1462,7 +1448,6 @@ export const schema = a.schema({
|
|
|
1462
1448
|
])
|
|
1463
1449
|
.authorization((allow) => [
|
|
1464
1450
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1465
|
-
allow.custom().to(authoringOperations),
|
|
1466
1451
|
]),
|
|
1467
1452
|
|
|
1468
1453
|
MessageThread: realtimeModel({
|
|
@@ -1500,7 +1485,6 @@ export const schema = a.schema({
|
|
|
1500
1485
|
.authorization((allow) => [
|
|
1501
1486
|
allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
|
|
1502
1487
|
allow.authenticated("identityPool").to(authoringOperations),
|
|
1503
|
-
allow.custom().to(authoringOperations),
|
|
1504
1488
|
]),
|
|
1505
1489
|
|
|
1506
1490
|
ModelAttachment: modelWithoutSubscriptions({
|
|
@@ -1532,7 +1516,6 @@ export const schema = a.schema({
|
|
|
1532
1516
|
])
|
|
1533
1517
|
.authorization((allow) => [
|
|
1534
1518
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1535
|
-
allow.custom().to(authoringOperations),
|
|
1536
1519
|
]),
|
|
1537
1520
|
|
|
1538
1521
|
SemanticRelationType: modelWithoutSubscriptions({
|
|
@@ -1560,7 +1543,6 @@ export const schema = a.schema({
|
|
|
1560
1543
|
])
|
|
1561
1544
|
.authorization((allow) => [
|
|
1562
1545
|
allow.groups(categoryWriteGroups),
|
|
1563
|
-
allow.custom().to(authoringOperations),
|
|
1564
1546
|
]),
|
|
1565
1547
|
|
|
1566
1548
|
SemanticRelation: modelWithoutSubscriptions({
|
|
@@ -1611,7 +1593,6 @@ export const schema = a.schema({
|
|
|
1611
1593
|
])
|
|
1612
1594
|
.authorization((allow) => [
|
|
1613
1595
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1614
|
-
allow.custom().to(authoringOperations),
|
|
1615
1596
|
]),
|
|
1616
1597
|
|
|
1617
1598
|
Item: modelWithoutSubscriptions({
|
|
@@ -1661,7 +1642,6 @@ export const schema = a.schema({
|
|
|
1661
1642
|
])
|
|
1662
1643
|
.authorization((allow) => [
|
|
1663
1644
|
allow.groups(contentWriteGroups),
|
|
1664
|
-
allow.custom().to(authoringOperations),
|
|
1665
1645
|
]),
|
|
1666
1646
|
|
|
1667
1647
|
Tag: modelWithoutSubscriptions({
|
|
@@ -1678,7 +1658,6 @@ export const schema = a.schema({
|
|
|
1678
1658
|
])
|
|
1679
1659
|
.authorization((allow) => [
|
|
1680
1660
|
allow.groups(contentWriteGroups),
|
|
1681
|
-
allow.custom().to(authoringOperations),
|
|
1682
1661
|
]),
|
|
1683
1662
|
|
|
1684
1663
|
ItemTag: modelWithoutSubscriptions({
|
|
@@ -1698,7 +1677,6 @@ export const schema = a.schema({
|
|
|
1698
1677
|
])
|
|
1699
1678
|
.authorization((allow) => [
|
|
1700
1679
|
allow.groups(contentWriteGroups),
|
|
1701
|
-
allow.custom().to(authoringOperations),
|
|
1702
1680
|
]),
|
|
1703
1681
|
|
|
1704
1682
|
MediaAsset: modelWithoutSubscriptions({
|
|
@@ -1731,7 +1709,6 @@ export const schema = a.schema({
|
|
|
1731
1709
|
])
|
|
1732
1710
|
.authorization((allow) => [
|
|
1733
1711
|
allow.groups(contentWriteGroups),
|
|
1734
|
-
allow.custom().to(authoringOperations),
|
|
1735
1712
|
]),
|
|
1736
1713
|
|
|
1737
1714
|
Edition: modelWithoutSubscriptions({
|
|
@@ -1763,7 +1740,6 @@ export const schema = a.schema({
|
|
|
1763
1740
|
])
|
|
1764
1741
|
.authorization((allow) => [
|
|
1765
1742
|
allow.groups(contentWriteGroups),
|
|
1766
|
-
allow.custom().to(authoringOperations),
|
|
1767
1743
|
]),
|
|
1768
1744
|
|
|
1769
1745
|
EditionItem: modelWithoutSubscriptions({
|
|
@@ -1786,7 +1762,6 @@ export const schema = a.schema({
|
|
|
1786
1762
|
])
|
|
1787
1763
|
.authorization((allow) => [
|
|
1788
1764
|
allow.groups(contentWriteGroups),
|
|
1789
|
-
allow.custom().to(authoringOperations),
|
|
1790
1765
|
]),
|
|
1791
1766
|
|
|
1792
1767
|
PublishedItem: modelWithoutSubscriptions({
|
|
@@ -1827,7 +1802,6 @@ export const schema = a.schema({
|
|
|
1827
1802
|
.authorization((allow) => [
|
|
1828
1803
|
allow.guest().to(["read"]),
|
|
1829
1804
|
allow.groups(contentWriteGroups),
|
|
1830
|
-
allow.custom().to(authoringOperations),
|
|
1831
1805
|
]),
|
|
1832
1806
|
|
|
1833
1807
|
PublishedMediaAsset: modelWithoutSubscriptions({
|
|
@@ -1863,7 +1837,6 @@ export const schema = a.schema({
|
|
|
1863
1837
|
.authorization((allow) => [
|
|
1864
1838
|
allow.guest().to(["read"]),
|
|
1865
1839
|
allow.groups(contentWriteGroups),
|
|
1866
|
-
allow.custom().to(authoringOperations),
|
|
1867
1840
|
]),
|
|
1868
1841
|
|
|
1869
1842
|
PublishedEdition: modelWithoutSubscriptions({
|
|
@@ -1889,7 +1862,6 @@ export const schema = a.schema({
|
|
|
1889
1862
|
.authorization((allow) => [
|
|
1890
1863
|
allow.guest().to(["read"]),
|
|
1891
1864
|
allow.groups(contentWriteGroups),
|
|
1892
|
-
allow.custom().to(authoringOperations),
|
|
1893
1865
|
]),
|
|
1894
1866
|
|
|
1895
1867
|
PublishedEditionItem: modelWithoutSubscriptions({
|
|
@@ -1914,7 +1886,6 @@ export const schema = a.schema({
|
|
|
1914
1886
|
.authorization((allow) => [
|
|
1915
1887
|
allow.guest().to(["read"]),
|
|
1916
1888
|
allow.groups(contentWriteGroups),
|
|
1917
|
-
allow.custom().to(authoringOperations),
|
|
1918
1889
|
]),
|
|
1919
1890
|
|
|
1920
1891
|
PublishedCategorySet: modelWithoutSubscriptions({
|
|
@@ -1940,7 +1911,6 @@ export const schema = a.schema({
|
|
|
1940
1911
|
.authorization((allow) => [
|
|
1941
1912
|
allow.guest().to(["read"]),
|
|
1942
1913
|
allow.groups(contentWriteGroups),
|
|
1943
|
-
allow.custom().to(authoringOperations),
|
|
1944
1914
|
]),
|
|
1945
1915
|
|
|
1946
1916
|
PublishedCategory: modelWithoutSubscriptions({
|
|
@@ -1976,9 +1946,10 @@ export const schema = a.schema({
|
|
|
1976
1946
|
.authorization((allow) => [
|
|
1977
1947
|
allow.guest().to(["read"]),
|
|
1978
1948
|
allow.groups(contentWriteGroups),
|
|
1979
|
-
allow.custom().to(authoringOperations),
|
|
1980
1949
|
]),
|
|
1981
|
-
}
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1952
|
+
export const schema = a.schema(baseDefinitions).authorization((allow) => [
|
|
1982
1953
|
allow.resource(categoryAction),
|
|
1983
1954
|
allow.resource(contentActions),
|
|
1984
1955
|
allow.resource(manageUserRole),
|
|
@@ -1987,4 +1958,16 @@ export const schema = a.schema({
|
|
|
1987
1958
|
allow.resource(procedureAction),
|
|
1988
1959
|
]);
|
|
1989
1960
|
|
|
1961
|
+
/** The deployed schema of a site that enables plugins: the base definitions plus what each plugin contributes (docs/plugins.md). */
|
|
1962
|
+
export function schemaWithPlugins(pluginDefinitions: Record<string, any>) {
|
|
1963
|
+
return a.schema({ ...baseDefinitions, ...pluginDefinitions } as typeof baseDefinitions).authorization((allow) => [
|
|
1964
|
+
allow.resource(categoryAction),
|
|
1965
|
+
allow.resource(contentActions),
|
|
1966
|
+
allow.resource(manageUserRole),
|
|
1967
|
+
allow.resource(modelAttachmentUpload),
|
|
1968
|
+
allow.resource(newsroomSummary),
|
|
1969
|
+
allow.resource(procedureAction),
|
|
1970
|
+
]);
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1990
1973
|
export type Schema = ClientSchema<typeof schema>;
|
|
@@ -4,6 +4,7 @@ import { Amplify } from "aws-amplify";
|
|
|
4
4
|
import { generateClient } from "aws-amplify/data";
|
|
5
5
|
import type { Schema } from "../../data/resource";
|
|
6
6
|
import { putJsonModelPayload, putTextModelPayload, readJsonModelPayload } from "../shared/model-payloads";
|
|
7
|
+
import { referenceCurationMetadata } from "../shared/reference-curation-metadata";
|
|
7
8
|
|
|
8
9
|
type ReviewHandler = Schema["reviewSteeringProposal"]["functionHandler"];
|
|
9
10
|
type ReferenceCurationHandler = Schema["reviewReferenceCuration"]["functionHandler"];
|
|
@@ -225,14 +226,15 @@ async function reviewReferenceCuration(event: Parameters<ReferenceCurationHandle
|
|
|
225
226
|
{ ownerKind: "message", ownerId: messageId, ownerLineageId: messageId },
|
|
226
227
|
"metadata",
|
|
227
228
|
"metadata",
|
|
228
|
-
{
|
|
229
|
+
referenceCurationMetadata({
|
|
229
230
|
action,
|
|
230
231
|
curationStatus: nextStatus,
|
|
231
232
|
reasonCode,
|
|
232
|
-
curationReasonCode: reasonCode,
|
|
233
233
|
referenceId,
|
|
234
234
|
referenceLineageId,
|
|
235
|
-
|
|
235
|
+
decisionRelationId: normalizeOptionalString(event.arguments.decisionRelationId),
|
|
236
|
+
shareable: event.arguments.shareable ?? null,
|
|
237
|
+
}),
|
|
236
238
|
{ filename: "metadata.json", now },
|
|
237
239
|
);
|
|
238
240
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
4
|
import json
|
|
5
|
-
import os
|
|
6
5
|
import sys
|
|
7
6
|
from pathlib import Path
|
|
8
7
|
from typing import Any
|
|
@@ -16,14 +15,6 @@ for root in SEARCH_PATHS:
|
|
|
16
15
|
sys.path.insert(0, str(root))
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
def _ensure_graphql_authoring_jwt() -> None:
|
|
20
|
-
if not os.environ.get("AWS_LAMBDA_FUNCTION_NAME", "").strip():
|
|
21
|
-
return
|
|
22
|
-
from papyrus_content.env import ensure_graphql_authoring_jwt # type: ignore
|
|
23
|
-
|
|
24
|
-
ensure_graphql_authoring_jwt()
|
|
25
|
-
|
|
26
|
-
|
|
27
18
|
def _error(code: str, message: str, *, retryable: bool = False) -> dict[str, Any]:
|
|
28
19
|
return {
|
|
29
20
|
"ok": False,
|
|
@@ -94,7 +85,6 @@ def _execute_tactus(arguments: dict[str, Any], web_ui_context: dict[str, Any] |
|
|
|
94
85
|
|
|
95
86
|
|
|
96
87
|
def main() -> None:
|
|
97
|
-
_ensure_graphql_authoring_jwt()
|
|
98
88
|
raw = sys.stdin.read()
|
|
99
89
|
payload = json.loads(raw or "{}")
|
|
100
90
|
mode = str(payload.get("mode") or "").strip()
|
|
@@ -19,11 +19,6 @@ export class ConsoleChatResponderStack extends NestedStack {
|
|
|
19
19
|
PAPYRUS_CONSOLE_STATIC_CONTEXT_TTL_SECONDS: process.env.PAPYRUS_CONSOLE_STATIC_CONTEXT_TTL_SECONDS || "900",
|
|
20
20
|
PAPYRUS_EXECUTE_TACTUS_RUNNER: process.env.PAPYRUS_EXECUTE_TACTUS_RUNNER || "/opt/papyrus/execute_tactus_runner.py",
|
|
21
21
|
PAPYRUS_EXECUTE_TACTUS_TIMEOUT_SECONDS: process.env.PAPYRUS_EXECUTE_TACTUS_TIMEOUT_SECONDS || "30",
|
|
22
|
-
PAPYRUS_JWT_ISSUER: process.env.PAPYRUS_JWT_ISSUER || "papyrus-cli",
|
|
23
|
-
PAPYRUS_JWT_SUBJECT: process.env.PAPYRUS_JWT_SUBJECT || "papyrus-cli",
|
|
24
|
-
PAPYRUS_JWT_AUDIENCE: process.env.PAPYRUS_JWT_AUDIENCE || "papyrus-authoring",
|
|
25
|
-
PAPYRUS_JWT_GROUPS: process.env.PAPYRUS_JWT_GROUPS || "editor",
|
|
26
|
-
...(props.amplifySsmEnvConfig ? { AMPLIFY_SSM_ENV_CONFIG: props.amplifySsmEnvConfig } : {}),
|
|
27
22
|
};
|
|
28
23
|
const imageUri = props.prebuiltImageUri?.trim() || process.env.PAPYRUS_CONSOLE_RESPONDER_IMAGE_URI?.trim() || "";
|
|
29
24
|
const allowLocalImageBuild = parseBooleanEnv(process.env.PAPYRUS_CONSOLE_RESPONDER_ALLOW_LOCAL_BUILD);
|
|
@@ -87,8 +82,6 @@ export class ConsoleChatResponderStack extends NestedStack {
|
|
|
87
82
|
],
|
|
88
83
|
}));
|
|
89
84
|
const stack = Stack.of(this);
|
|
90
|
-
// execute_tactus_runner mints PAPYRUS_GRAPHQL_JWT via boto3 get_parameters; branch policies
|
|
91
|
-
// often grant GetParameters on path prefixes, not GetParameter per secret name.
|
|
92
85
|
this.responderFunction.addToRolePolicy(new PolicyStatement({
|
|
93
86
|
effect: Effect.ALLOW,
|
|
94
87
|
actions: ["ssm:GetParameter", "ssm:GetParameters"],
|
|
@@ -12,7 +12,6 @@ export type ConsoleChatResponderStackProps = NestedStackProps & {
|
|
|
12
12
|
threadTable: ITable;
|
|
13
13
|
projectRoot: string;
|
|
14
14
|
graphqlEndpoint: string;
|
|
15
|
-
amplifySsmEnvConfig?: string;
|
|
16
15
|
responseTarget?: string;
|
|
17
16
|
model?: string;
|
|
18
17
|
prebuiltImageUri?: string;
|
|
@@ -36,11 +35,6 @@ export class ConsoleChatResponderStack extends NestedStack {
|
|
|
36
35
|
PAPYRUS_CONSOLE_STATIC_CONTEXT_TTL_SECONDS: process.env.PAPYRUS_CONSOLE_STATIC_CONTEXT_TTL_SECONDS || "900",
|
|
37
36
|
PAPYRUS_EXECUTE_TACTUS_RUNNER: process.env.PAPYRUS_EXECUTE_TACTUS_RUNNER || "/opt/papyrus/execute_tactus_runner.py",
|
|
38
37
|
PAPYRUS_EXECUTE_TACTUS_TIMEOUT_SECONDS: process.env.PAPYRUS_EXECUTE_TACTUS_TIMEOUT_SECONDS || "30",
|
|
39
|
-
PAPYRUS_JWT_ISSUER: process.env.PAPYRUS_JWT_ISSUER || "papyrus-cli",
|
|
40
|
-
PAPYRUS_JWT_SUBJECT: process.env.PAPYRUS_JWT_SUBJECT || "papyrus-cli",
|
|
41
|
-
PAPYRUS_JWT_AUDIENCE: process.env.PAPYRUS_JWT_AUDIENCE || "papyrus-authoring",
|
|
42
|
-
PAPYRUS_JWT_GROUPS: process.env.PAPYRUS_JWT_GROUPS || "editor",
|
|
43
|
-
...(props.amplifySsmEnvConfig ? { AMPLIFY_SSM_ENV_CONFIG: props.amplifySsmEnvConfig } : {}),
|
|
44
38
|
};
|
|
45
39
|
|
|
46
40
|
const imageUri = props.prebuiltImageUri?.trim() || process.env.PAPYRUS_CONSOLE_RESPONDER_IMAGE_URI?.trim() || "";
|
|
@@ -109,8 +103,6 @@ export class ConsoleChatResponderStack extends NestedStack {
|
|
|
109
103
|
],
|
|
110
104
|
}));
|
|
111
105
|
const stack = Stack.of(this);
|
|
112
|
-
// execute_tactus_runner mints PAPYRUS_GRAPHQL_JWT via boto3 get_parameters; branch policies
|
|
113
|
-
// often grant GetParameters on path prefixes, not GetParameter per secret name.
|
|
114
106
|
this.responderFunction.addToRolePolicy(new PolicyStatement({
|
|
115
107
|
effect: Effect.ALLOW,
|
|
116
108
|
actions: ["ssm:GetParameter", "ssm:GetParameters"],
|
|
@@ -3017,15 +3017,6 @@ fn optional_env(name: &str) -> Option<String> {
|
|
|
3017
3017
|
.filter(|value| !value.is_empty())
|
|
3018
3018
|
}
|
|
3019
3019
|
|
|
3020
|
-
fn normalize_jwt(token: String) -> String {
|
|
3021
|
-
token
|
|
3022
|
-
.trim()
|
|
3023
|
-
.trim_start_matches("Bearer ")
|
|
3024
|
-
.trim_start_matches("bearer ")
|
|
3025
|
-
.trim()
|
|
3026
|
-
.to_string()
|
|
3027
|
-
}
|
|
3028
|
-
|
|
3029
3020
|
fn format_error_chain(error: &anyhow::Error) -> String {
|
|
3030
3021
|
error
|
|
3031
3022
|
.chain()
|