@anthusai/papyrus 1.0.0-next.4 → 1.0.0-next.41
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 +28 -70
- package/amplify/data/resource.ts +29 -70
- package/amplify/data/schema.js +33 -58
- package/amplify/data/schema.ts +34 -58
- 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 +45 -3
- 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/rebuild-trigger-settings.js +22 -0
- package/amplify/rebuild-trigger-settings.ts +42 -0
- package/amplify/resolver-waves.js +26 -0
- package/amplify/resolver-waves.ts +34 -0
- package/amplify/site-backend-config.ts +36 -1
- package/amplify/site-backend-names.js +103 -0
- package/amplify/site-backend-names.ts +166 -0
- package/amplify/site-backend.js +93 -170
- package/amplify/site-backend.ts +126 -196
- package/amplify/storage/resource.js +3 -0
- package/amplify/storage/resource.ts +3 -0
- package/amplify/storage-backups/construct.js +31 -0
- package/amplify/storage-backups/construct.ts +47 -0
- package/app/%5F_preview/[[...path]]/route.ts +8 -0
- package/app/[year]/[month]/[day]/[articleSlug]/page.tsx +2 -0
- package/app/[year]/[month]/[day]/edition-route-page.tsx +2 -0
- package/app/api/media/[...path]/route.ts +5 -16
- package/app/api/revalidate/route.ts +8 -7
- package/app/articles/[slug]/page.tsx +6 -4
- package/app/blog-rhythm.css +278 -0
- package/app/globals.css +21 -0
- package/app/layout.tsx +16 -0
- package/app/newsroom/[section]/[...selection]/page.tsx +6 -5
- package/app/newsroom/[section]/page.tsx +4 -3
- package/app/newsroom/articles/[id]/page.tsx +15 -0
- package/app/newsroom/articles/page.tsx +13 -0
- package/app/newsroom/layout.tsx +4 -9
- package/app/page.tsx +18 -5
- package/app/robots.ts +2 -5
- package/bin/papyrus-app.mjs +12 -2
- package/bin/papyrus-infra.mjs +29 -3
- package/components/amplify-client-provider.tsx +4 -22
- package/components/archive-shell.tsx +2 -22
- package/components/article-video.tsx +247 -3
- package/components/blog-page-background.tsx +23 -6
- package/components/markus-ir-preview.tsx +300 -0
- package/components/news-desk-taxonomy-client.ts +51 -0
- package/components/newspaper.tsx +6 -2
- package/components/newsroom-access-gate.tsx +67 -0
- package/components/newsroom-article-editor.tsx +741 -0
- package/components/newsroom-articles-view.tsx +129 -0
- package/components/newsroom-client-shell.tsx +12 -0
- package/components/newsroom-ops-overview.tsx +28 -11
- package/components/newsroom-ops-shell.tsx +3 -1
- 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/reference-cyclotron-status.tsx +109 -0
- package/components/reference-relevance-review.tsx +75 -0
- package/components/settings-page.tsx +2 -1
- package/components/topic-steering-workspace.tsx +54 -64
- package/components/use-blog-header-obstacles.ts +81 -0
- package/components/use-brand-fonts-ready.ts +28 -0
- package/components/use-rhythm-overlay.ts +29 -0
- package/infra/amplify-app-shell.js +228 -50
- package/infra/amplify-app-shell.ts +256 -53
- package/infra/build-specs.js +15 -5
- package/infra/build-specs.ts +18 -7
- package/infra/github-oidc-provider.js +24 -0
- package/infra/github-oidc-provider.ts +30 -0
- package/infra/index.js +1 -0
- package/infra/site-config.js +236 -11
- package/infra/site-config.ts +276 -15
- package/lib/amplify-outputs-path.ts +5 -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 +190 -0
- 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 +61 -9
- package/lib/media-route-response.ts +45 -0
- package/lib/newspaper-layout.ts +3 -2
- package/lib/newsroom-articles.ts +325 -0
- package/lib/newsroom-base-path.ts +12 -3
- package/lib/newsroom-category-drilldown.ts +3 -2
- package/lib/newsroom-demo-articles.ts +90 -0
- 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 +3 -0
- package/lib/oauth-redirect-priority.ts +40 -0
- package/lib/papyrus-web-locations.ts +7 -6
- package/lib/presentation-footer.ts +3 -2
- package/lib/pretext-layout.ts +12 -3
- package/lib/reader-base-path.ts +24 -0
- package/lib/reader-static-params.ts +13 -0
- 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-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/site-brand.ts +51 -0
- package/lib/staging-gated-path.ts +23 -0
- package/lib/staging-preview-object.ts +114 -0
- package/lib/video-mode.ts +42 -0
- package/lib/video-script.ts +77 -0
- package/middleware.ts +23 -18
- package/package.json +45 -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 +45 -2
- package/scripts/videoml/build-browser-bundle.mjs +22 -0
- package/scripts/videoml/build-preview-bundle.mjs +50 -0
- package/scripts/videoml/bundle-common.mjs +129 -0
- package/scripts/videoml/preview/preview-entry.tsx +381 -0
- package/scripts/videoml/preview/preview-stage-fit.ts +28 -0
- package/scripts/videoml/preview/preview-timing.ts +42 -0
- package/scripts/videoml/preview.html +77 -0
- package/scripts/videoml/standard-entry.tsx +46 -0
- package/src/sync.mjs +30 -6
- package/src/with-papyrus.mjs +19 -2
- 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
|
@@ -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
|
|
@@ -431,13 +431,20 @@ export const schema = a.schema({
|
|
|
431
431
|
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
432
432
|
.handler(a.handler.function(contentActions)),
|
|
433
433
|
|
|
434
|
+
requestStagingBuild: a
|
|
435
|
+
.mutation()
|
|
436
|
+
.arguments({ input: a.json().required() })
|
|
437
|
+
.returns(a.json())
|
|
438
|
+
.authorization((allow) => [allow.groups(contentWriteGroups)])
|
|
439
|
+
.handler(a.handler.function(contentActions)),
|
|
440
|
+
|
|
434
441
|
knowledgeQuery: a
|
|
435
442
|
.query()
|
|
436
443
|
.arguments({
|
|
437
444
|
input: a.json().required(),
|
|
438
445
|
})
|
|
439
446
|
.returns(a.json())
|
|
440
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
447
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
441
448
|
.handler(a.handler.function(knowledgeQuery)),
|
|
442
449
|
|
|
443
450
|
updateNewsroomSummary: a
|
|
@@ -448,7 +455,7 @@ export const schema = a.schema({
|
|
|
448
455
|
reason: a.string(),
|
|
449
456
|
})
|
|
450
457
|
.returns(a.ref("NewsroomSummary"))
|
|
451
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
458
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
452
459
|
.handler(a.handler.function(newsroomSummary)),
|
|
453
460
|
|
|
454
461
|
ModelAttachmentUploadSlot: a.customType({
|
|
@@ -508,7 +515,7 @@ export const schema = a.schema({
|
|
|
508
515
|
status: a.string(),
|
|
509
516
|
})
|
|
510
517
|
.returns(a.ref("ModelAttachmentUploadSlot"))
|
|
511
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
518
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
512
519
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
513
520
|
|
|
514
521
|
completeModelAttachmentUpload: a
|
|
@@ -530,7 +537,7 @@ export const schema = a.schema({
|
|
|
530
537
|
status: a.string(),
|
|
531
538
|
})
|
|
532
539
|
.returns(a.ref("ModelAttachment"))
|
|
533
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
540
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
534
541
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
535
542
|
|
|
536
543
|
abortModelAttachmentUpload: a
|
|
@@ -552,7 +559,7 @@ export const schema = a.schema({
|
|
|
552
559
|
status: a.string(),
|
|
553
560
|
})
|
|
554
561
|
.returns(a.ref("ModelAttachmentUploadAbortResult"))
|
|
555
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
562
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
556
563
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
557
564
|
|
|
558
565
|
createModelAttachmentDownload: a
|
|
@@ -561,7 +568,7 @@ export const schema = a.schema({
|
|
|
561
568
|
attachmentId: a.id().required(),
|
|
562
569
|
})
|
|
563
570
|
.returns(a.ref("ModelAttachmentDownloadSlot"))
|
|
564
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
571
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
565
572
|
.handler(a.handler.function(modelAttachmentUpload)),
|
|
566
573
|
|
|
567
574
|
AssignmentActionResult: a.customType({
|
|
@@ -655,7 +662,7 @@ export const schema = a.schema({
|
|
|
655
662
|
limit: a.integer(),
|
|
656
663
|
})
|
|
657
664
|
.returns(a.ref("AssignmentContext").array().required())
|
|
658
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
665
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
659
666
|
.handler(a.handler.function(assignmentAction)),
|
|
660
667
|
|
|
661
668
|
listAssignmentQueue: a
|
|
@@ -666,7 +673,7 @@ export const schema = a.schema({
|
|
|
666
673
|
limit: a.integer(),
|
|
667
674
|
})
|
|
668
675
|
.returns(a.ref("AssignmentContext").array().required())
|
|
669
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
676
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
670
677
|
.handler(a.handler.function(assignmentAction)),
|
|
671
678
|
|
|
672
679
|
getAssignmentContext: a
|
|
@@ -675,7 +682,7 @@ export const schema = a.schema({
|
|
|
675
682
|
assignmentId: a.id().required(),
|
|
676
683
|
})
|
|
677
684
|
.returns(a.ref("AssignmentContext"))
|
|
678
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
685
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
679
686
|
.handler(a.handler.function(assignmentAction)),
|
|
680
687
|
|
|
681
688
|
claimAssignment: a
|
|
@@ -692,7 +699,7 @@ export const schema = a.schema({
|
|
|
692
699
|
note: a.string(),
|
|
693
700
|
})
|
|
694
701
|
.returns(a.ref("AssignmentActionResult"))
|
|
695
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
702
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
696
703
|
.handler(a.handler.function(assignmentAction)),
|
|
697
704
|
|
|
698
705
|
releaseAssignment: a
|
|
@@ -704,7 +711,7 @@ export const schema = a.schema({
|
|
|
704
711
|
note: a.string(),
|
|
705
712
|
})
|
|
706
713
|
.returns(a.ref("AssignmentActionResult"))
|
|
707
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
714
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
708
715
|
.handler(a.handler.function(assignmentAction)),
|
|
709
716
|
|
|
710
717
|
completeAssignment: a
|
|
@@ -716,7 +723,7 @@ export const schema = a.schema({
|
|
|
716
723
|
note: a.string(),
|
|
717
724
|
})
|
|
718
725
|
.returns(a.ref("AssignmentActionResult"))
|
|
719
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
726
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
720
727
|
.handler(a.handler.function(assignmentAction)),
|
|
721
728
|
|
|
722
729
|
cancelAssignment: a
|
|
@@ -728,7 +735,7 @@ export const schema = a.schema({
|
|
|
728
735
|
note: a.string(),
|
|
729
736
|
})
|
|
730
737
|
.returns(a.ref("AssignmentActionResult"))
|
|
731
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
738
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
732
739
|
.handler(a.handler.function(assignmentAction)),
|
|
733
740
|
|
|
734
741
|
reopenAssignment: a
|
|
@@ -740,7 +747,7 @@ export const schema = a.schema({
|
|
|
740
747
|
note: a.string(),
|
|
741
748
|
})
|
|
742
749
|
.returns(a.ref("AssignmentActionResult"))
|
|
743
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
750
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
744
751
|
.handler(a.handler.function(assignmentAction)),
|
|
745
752
|
|
|
746
753
|
retryImmediateAssignment: a
|
|
@@ -752,7 +759,7 @@ export const schema = a.schema({
|
|
|
752
759
|
note: a.string(),
|
|
753
760
|
})
|
|
754
761
|
.returns(a.ref("AssignmentActionResult"))
|
|
755
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
762
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
756
763
|
.handler(a.handler.function(assignmentAction)),
|
|
757
764
|
|
|
758
765
|
listNewsroomProcedureDefinitions: a
|
|
@@ -768,7 +775,7 @@ export const schema = a.schema({
|
|
|
768
775
|
procedureKey: a.string(),
|
|
769
776
|
})
|
|
770
777
|
.returns(a.json())
|
|
771
|
-
.authorization((allow) => [allow.group(adminGroup)
|
|
778
|
+
.authorization((allow) => [allow.group(adminGroup)])
|
|
772
779
|
.handler(a.handler.function(procedureAction)),
|
|
773
780
|
|
|
774
781
|
saveNewsroomProcedureDefinition: a
|
|
@@ -810,7 +817,7 @@ export const schema = a.schema({
|
|
|
810
817
|
actorLabel: a.string(),
|
|
811
818
|
})
|
|
812
819
|
.returns(a.json())
|
|
813
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
820
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
814
821
|
.handler(a.handler.function(procedureAction)),
|
|
815
822
|
|
|
816
823
|
getNewsroomProcedureRun: a
|
|
@@ -819,7 +826,7 @@ export const schema = a.schema({
|
|
|
819
826
|
id: a.id().required(),
|
|
820
827
|
})
|
|
821
828
|
.returns(a.json())
|
|
822
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
829
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
823
830
|
.handler(a.handler.function(procedureAction)),
|
|
824
831
|
|
|
825
832
|
listNewsroomProcedureRunsByProcedure: a
|
|
@@ -828,7 +835,7 @@ export const schema = a.schema({
|
|
|
828
835
|
procedureId: a.id().required(),
|
|
829
836
|
})
|
|
830
837
|
.returns(a.json())
|
|
831
|
-
.authorization((allow) => [allow.groups(categoryWriteGroups)
|
|
838
|
+
.authorization((allow) => [allow.groups(categoryWriteGroups)])
|
|
832
839
|
.handler(a.handler.function(procedureAction)),
|
|
833
840
|
|
|
834
841
|
Assignment: modelWithoutSubscriptions({
|
|
@@ -878,7 +885,6 @@ export const schema = a.schema({
|
|
|
878
885
|
.authorization((allow) => [
|
|
879
886
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
880
887
|
allow.authenticated("identityPool").to(authoringOperations),
|
|
881
|
-
allow.custom().to(authoringOperations),
|
|
882
888
|
]),
|
|
883
889
|
|
|
884
890
|
AssignmentEvent: modelWithoutSubscriptions({
|
|
@@ -901,7 +907,6 @@ export const schema = a.schema({
|
|
|
901
907
|
])
|
|
902
908
|
.authorization((allow) => [
|
|
903
909
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
904
|
-
allow.custom().to(authoringOperations),
|
|
905
910
|
]),
|
|
906
911
|
|
|
907
912
|
ProcedureDefinition: modelWithoutSubscriptions({
|
|
@@ -926,7 +931,6 @@ export const schema = a.schema({
|
|
|
926
931
|
])
|
|
927
932
|
.authorization((allow) => [
|
|
928
933
|
allow.group(adminGroup),
|
|
929
|
-
allow.custom().to(authoringOperations),
|
|
930
934
|
]),
|
|
931
935
|
|
|
932
936
|
ProcedureVersion: modelWithoutSubscriptions({
|
|
@@ -953,7 +957,6 @@ export const schema = a.schema({
|
|
|
953
957
|
])
|
|
954
958
|
.authorization((allow) => [
|
|
955
959
|
allow.group(adminGroup),
|
|
956
|
-
allow.custom().to(authoringOperations),
|
|
957
960
|
]),
|
|
958
961
|
|
|
959
962
|
ProcedureRun: modelWithoutSubscriptions({
|
|
@@ -986,7 +989,6 @@ export const schema = a.schema({
|
|
|
986
989
|
.authorization((allow) => [
|
|
987
990
|
allow.group("editor").to(["read"]),
|
|
988
991
|
allow.group(adminGroup).to(authoringOperations),
|
|
989
|
-
allow.custom().to(authoringOperations),
|
|
990
992
|
]),
|
|
991
993
|
|
|
992
994
|
NewsroomSection: modelWithoutSubscriptions({
|
|
@@ -1014,7 +1016,6 @@ export const schema = a.schema({
|
|
|
1014
1016
|
])
|
|
1015
1017
|
.authorization((allow) => [
|
|
1016
1018
|
allow.groups(categoryWriteGroups),
|
|
1017
|
-
allow.custom().to(authoringOperations),
|
|
1018
1019
|
]),
|
|
1019
1020
|
|
|
1020
1021
|
KnowledgeCorpus: modelWithoutSubscriptions({
|
|
@@ -1032,7 +1033,6 @@ export const schema = a.schema({
|
|
|
1032
1033
|
])
|
|
1033
1034
|
.authorization((allow) => [
|
|
1034
1035
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1035
|
-
allow.custom().to(authoringOperations),
|
|
1036
1036
|
]),
|
|
1037
1037
|
|
|
1038
1038
|
KnowledgeImportRun: modelWithoutSubscriptions({
|
|
@@ -1060,7 +1060,6 @@ export const schema = a.schema({
|
|
|
1060
1060
|
])
|
|
1061
1061
|
.authorization((allow) => [
|
|
1062
1062
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1063
|
-
allow.custom().to(authoringOperations),
|
|
1064
1063
|
]),
|
|
1065
1064
|
|
|
1066
1065
|
KnowledgeRawPayload: modelWithoutSubscriptions({
|
|
@@ -1078,7 +1077,6 @@ export const schema = a.schema({
|
|
|
1078
1077
|
])
|
|
1079
1078
|
.authorization((allow) => [
|
|
1080
1079
|
allow.groups(categoryWriteGroups),
|
|
1081
|
-
allow.custom().to(authoringOperations),
|
|
1082
1080
|
]),
|
|
1083
1081
|
|
|
1084
1082
|
KnowledgeArtifact: modelWithoutSubscriptions({
|
|
@@ -1098,7 +1096,6 @@ export const schema = a.schema({
|
|
|
1098
1096
|
])
|
|
1099
1097
|
.authorization((allow) => [
|
|
1100
1098
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1101
|
-
allow.custom().to(authoringOperations),
|
|
1102
1099
|
]),
|
|
1103
1100
|
|
|
1104
1101
|
CategorySet: modelWithoutSubscriptions({
|
|
@@ -1128,7 +1125,6 @@ export const schema = a.schema({
|
|
|
1128
1125
|
])
|
|
1129
1126
|
.authorization((allow) => [
|
|
1130
1127
|
allow.groups(categoryWriteGroups),
|
|
1131
|
-
allow.custom().to(authoringOperations),
|
|
1132
1128
|
]),
|
|
1133
1129
|
|
|
1134
1130
|
Category: modelWithoutSubscriptions({
|
|
@@ -1170,7 +1166,6 @@ export const schema = a.schema({
|
|
|
1170
1166
|
])
|
|
1171
1167
|
.authorization((allow) => [
|
|
1172
1168
|
allow.groups(categoryWriteGroups),
|
|
1173
|
-
allow.custom().to(authoringOperations),
|
|
1174
1169
|
]),
|
|
1175
1170
|
|
|
1176
1171
|
CategoryKeyword: modelWithoutSubscriptions({
|
|
@@ -1199,7 +1194,6 @@ export const schema = a.schema({
|
|
|
1199
1194
|
])
|
|
1200
1195
|
.authorization((allow) => [
|
|
1201
1196
|
allow.groups(categoryWriteGroups),
|
|
1202
|
-
allow.custom().to(authoringOperations),
|
|
1203
1197
|
]),
|
|
1204
1198
|
|
|
1205
1199
|
LexicalSteeringRule: modelWithoutSubscriptions({
|
|
@@ -1228,7 +1222,6 @@ export const schema = a.schema({
|
|
|
1228
1222
|
])
|
|
1229
1223
|
.authorization((allow) => [
|
|
1230
1224
|
allow.groups(categoryWriteGroups),
|
|
1231
|
-
allow.custom().to(authoringOperations),
|
|
1232
1225
|
]),
|
|
1233
1226
|
|
|
1234
1227
|
SteeringProposal: modelWithoutSubscriptions({
|
|
@@ -1266,7 +1259,6 @@ export const schema = a.schema({
|
|
|
1266
1259
|
])
|
|
1267
1260
|
.authorization((allow) => [
|
|
1268
1261
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1269
|
-
allow.custom().to(authoringOperations),
|
|
1270
1262
|
]),
|
|
1271
1263
|
|
|
1272
1264
|
SteeringDecision: modelWithoutSubscriptions({
|
|
@@ -1286,7 +1278,6 @@ export const schema = a.schema({
|
|
|
1286
1278
|
])
|
|
1287
1279
|
.authorization((allow) => [
|
|
1288
1280
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1289
|
-
allow.custom().to(authoringOperations),
|
|
1290
1281
|
]),
|
|
1291
1282
|
|
|
1292
1283
|
Reference: realtimeModel({
|
|
@@ -1338,7 +1329,6 @@ export const schema = a.schema({
|
|
|
1338
1329
|
])
|
|
1339
1330
|
.authorization((allow) => [
|
|
1340
1331
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1341
|
-
allow.custom().to(authoringOperations),
|
|
1342
1332
|
]),
|
|
1343
1333
|
|
|
1344
1334
|
ReferenceAttachment: modelWithoutSubscriptions({
|
|
@@ -1368,7 +1358,6 @@ export const schema = a.schema({
|
|
|
1368
1358
|
])
|
|
1369
1359
|
.authorization((allow) => [
|
|
1370
1360
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1371
|
-
allow.custom().to(authoringOperations),
|
|
1372
1361
|
]),
|
|
1373
1362
|
|
|
1374
1363
|
SemanticNode: modelWithoutSubscriptions({
|
|
@@ -1390,6 +1379,11 @@ export const schema = a.schema({
|
|
|
1390
1379
|
displayName: a.string(),
|
|
1391
1380
|
description: a.string(),
|
|
1392
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(),
|
|
1393
1387
|
status: a.string().required(),
|
|
1394
1388
|
importRunId: a.id(),
|
|
1395
1389
|
createdAt: a.datetime(),
|
|
@@ -1406,7 +1400,6 @@ export const schema = a.schema({
|
|
|
1406
1400
|
])
|
|
1407
1401
|
.authorization((allow) => [
|
|
1408
1402
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1409
|
-
allow.custom().to(authoringOperations),
|
|
1410
1403
|
]),
|
|
1411
1404
|
|
|
1412
1405
|
Message: realtimeModel({
|
|
@@ -1455,7 +1448,6 @@ export const schema = a.schema({
|
|
|
1455
1448
|
])
|
|
1456
1449
|
.authorization((allow) => [
|
|
1457
1450
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1458
|
-
allow.custom().to(authoringOperations),
|
|
1459
1451
|
]),
|
|
1460
1452
|
|
|
1461
1453
|
MessageThread: realtimeModel({
|
|
@@ -1493,7 +1485,6 @@ export const schema = a.schema({
|
|
|
1493
1485
|
.authorization((allow) => [
|
|
1494
1486
|
allow.groups(categoryWriteGroups).to(["read", "create", "update"]),
|
|
1495
1487
|
allow.authenticated("identityPool").to(authoringOperations),
|
|
1496
|
-
allow.custom().to(authoringOperations),
|
|
1497
1488
|
]),
|
|
1498
1489
|
|
|
1499
1490
|
ModelAttachment: modelWithoutSubscriptions({
|
|
@@ -1525,7 +1516,6 @@ export const schema = a.schema({
|
|
|
1525
1516
|
])
|
|
1526
1517
|
.authorization((allow) => [
|
|
1527
1518
|
allow.groups(categoryWriteGroups).to(["read"]),
|
|
1528
|
-
allow.custom().to(authoringOperations),
|
|
1529
1519
|
]),
|
|
1530
1520
|
|
|
1531
1521
|
SemanticRelationType: modelWithoutSubscriptions({
|
|
@@ -1553,7 +1543,6 @@ export const schema = a.schema({
|
|
|
1553
1543
|
])
|
|
1554
1544
|
.authorization((allow) => [
|
|
1555
1545
|
allow.groups(categoryWriteGroups),
|
|
1556
|
-
allow.custom().to(authoringOperations),
|
|
1557
1546
|
]),
|
|
1558
1547
|
|
|
1559
1548
|
SemanticRelation: modelWithoutSubscriptions({
|
|
@@ -1604,7 +1593,6 @@ export const schema = a.schema({
|
|
|
1604
1593
|
])
|
|
1605
1594
|
.authorization((allow) => [
|
|
1606
1595
|
allow.groups(categoryWriteGroups).to(categoryAppendOnlyOperations),
|
|
1607
|
-
allow.custom().to(authoringOperations),
|
|
1608
1596
|
]),
|
|
1609
1597
|
|
|
1610
1598
|
Item: modelWithoutSubscriptions({
|
|
@@ -1654,7 +1642,6 @@ export const schema = a.schema({
|
|
|
1654
1642
|
])
|
|
1655
1643
|
.authorization((allow) => [
|
|
1656
1644
|
allow.groups(contentWriteGroups),
|
|
1657
|
-
allow.custom().to(authoringOperations),
|
|
1658
1645
|
]),
|
|
1659
1646
|
|
|
1660
1647
|
Tag: modelWithoutSubscriptions({
|
|
@@ -1671,7 +1658,6 @@ export const schema = a.schema({
|
|
|
1671
1658
|
])
|
|
1672
1659
|
.authorization((allow) => [
|
|
1673
1660
|
allow.groups(contentWriteGroups),
|
|
1674
|
-
allow.custom().to(authoringOperations),
|
|
1675
1661
|
]),
|
|
1676
1662
|
|
|
1677
1663
|
ItemTag: modelWithoutSubscriptions({
|
|
@@ -1691,7 +1677,6 @@ export const schema = a.schema({
|
|
|
1691
1677
|
])
|
|
1692
1678
|
.authorization((allow) => [
|
|
1693
1679
|
allow.groups(contentWriteGroups),
|
|
1694
|
-
allow.custom().to(authoringOperations),
|
|
1695
1680
|
]),
|
|
1696
1681
|
|
|
1697
1682
|
MediaAsset: modelWithoutSubscriptions({
|
|
@@ -1724,7 +1709,6 @@ export const schema = a.schema({
|
|
|
1724
1709
|
])
|
|
1725
1710
|
.authorization((allow) => [
|
|
1726
1711
|
allow.groups(contentWriteGroups),
|
|
1727
|
-
allow.custom().to(authoringOperations),
|
|
1728
1712
|
]),
|
|
1729
1713
|
|
|
1730
1714
|
Edition: modelWithoutSubscriptions({
|
|
@@ -1756,7 +1740,6 @@ export const schema = a.schema({
|
|
|
1756
1740
|
])
|
|
1757
1741
|
.authorization((allow) => [
|
|
1758
1742
|
allow.groups(contentWriteGroups),
|
|
1759
|
-
allow.custom().to(authoringOperations),
|
|
1760
1743
|
]),
|
|
1761
1744
|
|
|
1762
1745
|
EditionItem: modelWithoutSubscriptions({
|
|
@@ -1779,7 +1762,6 @@ export const schema = a.schema({
|
|
|
1779
1762
|
])
|
|
1780
1763
|
.authorization((allow) => [
|
|
1781
1764
|
allow.groups(contentWriteGroups),
|
|
1782
|
-
allow.custom().to(authoringOperations),
|
|
1783
1765
|
]),
|
|
1784
1766
|
|
|
1785
1767
|
PublishedItem: modelWithoutSubscriptions({
|
|
@@ -1820,7 +1802,6 @@ export const schema = a.schema({
|
|
|
1820
1802
|
.authorization((allow) => [
|
|
1821
1803
|
allow.guest().to(["read"]),
|
|
1822
1804
|
allow.groups(contentWriteGroups),
|
|
1823
|
-
allow.custom().to(authoringOperations),
|
|
1824
1805
|
]),
|
|
1825
1806
|
|
|
1826
1807
|
PublishedMediaAsset: modelWithoutSubscriptions({
|
|
@@ -1856,7 +1837,6 @@ export const schema = a.schema({
|
|
|
1856
1837
|
.authorization((allow) => [
|
|
1857
1838
|
allow.guest().to(["read"]),
|
|
1858
1839
|
allow.groups(contentWriteGroups),
|
|
1859
|
-
allow.custom().to(authoringOperations),
|
|
1860
1840
|
]),
|
|
1861
1841
|
|
|
1862
1842
|
PublishedEdition: modelWithoutSubscriptions({
|
|
@@ -1882,7 +1862,6 @@ export const schema = a.schema({
|
|
|
1882
1862
|
.authorization((allow) => [
|
|
1883
1863
|
allow.guest().to(["read"]),
|
|
1884
1864
|
allow.groups(contentWriteGroups),
|
|
1885
|
-
allow.custom().to(authoringOperations),
|
|
1886
1865
|
]),
|
|
1887
1866
|
|
|
1888
1867
|
PublishedEditionItem: modelWithoutSubscriptions({
|
|
@@ -1907,7 +1886,6 @@ export const schema = a.schema({
|
|
|
1907
1886
|
.authorization((allow) => [
|
|
1908
1887
|
allow.guest().to(["read"]),
|
|
1909
1888
|
allow.groups(contentWriteGroups),
|
|
1910
|
-
allow.custom().to(authoringOperations),
|
|
1911
1889
|
]),
|
|
1912
1890
|
|
|
1913
1891
|
PublishedCategorySet: modelWithoutSubscriptions({
|
|
@@ -1933,7 +1911,6 @@ export const schema = a.schema({
|
|
|
1933
1911
|
.authorization((allow) => [
|
|
1934
1912
|
allow.guest().to(["read"]),
|
|
1935
1913
|
allow.groups(contentWriteGroups),
|
|
1936
|
-
allow.custom().to(authoringOperations),
|
|
1937
1914
|
]),
|
|
1938
1915
|
|
|
1939
1916
|
PublishedCategory: modelWithoutSubscriptions({
|
|
@@ -1969,7 +1946,6 @@ export const schema = a.schema({
|
|
|
1969
1946
|
.authorization((allow) => [
|
|
1970
1947
|
allow.guest().to(["read"]),
|
|
1971
1948
|
allow.groups(contentWriteGroups),
|
|
1972
|
-
allow.custom().to(authoringOperations),
|
|
1973
1949
|
]),
|
|
1974
1950
|
}).authorization((allow) => [
|
|
1975
1951
|
allow.resource(categoryAction),
|
|
@@ -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()
|