@opengeni/db 3.7.4 → 4.0.0-canary.0
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/dist/automations.d.ts +4 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/capability-integrations.d.ts +2 -0
- package/dist/{chunk-6DPJA36C.js → chunk-2XEZK4LF.js} +7 -1
- package/dist/chunk-2XEZK4LF.js.map +1 -0
- package/dist/{chunk-4NAR7FBA.js → chunk-3RI33YQN.js} +67 -1
- package/dist/chunk-3RI33YQN.js.map +1 -0
- package/dist/{chunk-SZAWDXQC.js → chunk-CJROYHSC.js} +3 -3
- package/dist/{chunk-DZCYW2WT.js → chunk-MX6V5F65.js} +2 -2
- package/dist/{chunk-S3TDDCS2.js → chunk-N5VXJ4I2.js} +151 -78
- package/dist/chunk-N5VXJ4I2.js.map +1 -0
- package/dist/{chunk-U4WPPEBH.js → chunk-NLFHMPUB.js} +2 -2
- package/dist/{chunk-5NNCGFQY.js → chunk-P6NSEG2S.js} +2 -2
- package/dist/{chunk-O56DM5GZ.js → chunk-QM6YOWHZ.js} +624 -57
- package/dist/chunk-QM6YOWHZ.js.map +1 -0
- package/dist/{chunk-US4IS6IV.js → chunk-RZNOSEMC.js} +2 -2
- package/dist/{chunk-F6PBS6WE.js → chunk-UFAMOUWL.js} +2 -2
- package/dist/codemode-operations.d.ts +5 -0
- package/dist/codex-token-resolver.d.ts +6 -2
- package/dist/connection-token-resolver.d.ts +8 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/generated-images.d.ts +15 -0
- package/dist/index.d.ts +393 -91
- package/dist/index.js +9992 -6069
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +9 -0
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/managed-user-setup.d.ts +3 -0
- package/dist/mcp-oauth.d.ts +80 -0
- package/dist/migrate.d.ts +1 -0
- package/dist/migrate.js +3 -1
- package/dist/model-catalog.d.ts +153 -0
- package/dist/model-context-snapshots.d.ts +20 -0
- package/dist/new-session-drafts.d.ts +12 -0
- package/dist/organization-membership-lifecycle.d.ts +8 -1
- package/dist/organization-model-providers.d.ts +101 -0
- package/dist/pack-components.d.ts +1 -0
- package/dist/pr-review.d.ts +9 -0
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +8 -8
- package/dist/schema.d.ts +7708 -5050
- package/dist/schema.js +25 -1
- package/dist/session-background-commands.d.ts +18 -6
- package/dist/session-background-commands.js +15 -9
- package/dist/session-control.d.ts +37 -2
- package/dist/session-goal-pacing.d.ts +3 -6
- package/dist/session-queue-commands.d.ts +17 -0
- package/dist/session-tenancy.js +3 -3
- package/dist/tool-gateway-approvals.d.ts +31 -0
- package/dist/video-generation.js +3 -3
- package/dist/workspace-artifacts.d.ts +17 -3
- package/dist/xai-subscription.d.ts +8 -0
- package/drizzle/0387_bound_host_export_session_payloads.sql +165 -0
- package/drizzle/0388_sandbox_provider_deadline_interactions.sql +491 -0
- package/drizzle/0389_model_catalog_and_gateway_custom_models.sql +241 -0
- package/drizzle/0390_organization_model_provider_connections.sql +197 -0
- package/drizzle/0391_sandbox_provider_deadline_interaction_followup.sql +295 -0
- package/drizzle/0392_context_compaction_pending_observability.sql +198 -0
- package/drizzle/0393_workspace_memory_and_learning_defaults.sql +102 -0
- package/drizzle/0394_session_selected_skill_activation.sql +20 -0
- package/drizzle/0395_scheduled_task_unclaimed_occurrence_invalidation.sql +154 -0
- package/drizzle/0396_model_call_equivalent_credit_cost.sql +28 -0
- package/drizzle/0397_sandbox_deadline_rotation_preemption.sql +113 -0
- package/drizzle/0398_organization_workspace_management_entry.sql +206 -0
- package/drizzle/0399_additional_managed_organization_creation.sql +691 -0
- package/drizzle/0400_session_attempt_model_context_snapshots.sql +65 -0
- package/drizzle/0401_organization_user_setup_token_transport.sql +178 -0
- package/drizzle/0402_session_input_wait_and_background_command_results.sql +1023 -0
- package/drizzle/0403_codex_unconditional_credential_leasing.sql +181 -0
- package/drizzle/0404_mcp_oauth_authorization_server.sql +471 -0
- package/drizzle/0405_tool_gateway_approval_capabilities.sql +184 -0
- package/drizzle/0406_workspace_html_site_sources.sql +71 -0
- package/package.json +6 -6
- package/src/automations.ts +9 -1
- package/src/capability-integrations.ts +8 -0
- package/src/codemode-operations.ts +31 -21
- package/src/codex-token-resolver.ts +16 -6
- package/src/connection-token-resolver.ts +52 -3
- package/src/generated-images.ts +70 -6
- package/src/index.ts +3894 -994
- package/src/insights-model-bundle.ts +54 -5
- package/src/insights.ts +53 -7
- package/src/managed-user-setup.ts +14 -3
- package/src/mcp-oauth.ts +488 -0
- package/src/migrate.ts +9 -1
- package/src/model-catalog.ts +682 -0
- package/src/model-context-snapshots.ts +151 -0
- package/src/new-session-drafts.ts +66 -21
- package/src/organization-membership-lifecycle.ts +47 -5
- package/src/organization-model-providers.ts +614 -0
- package/src/pack-components.ts +15 -2
- package/src/pr-review.ts +19 -0
- package/src/provision-roles.ts +4 -0
- package/src/runtime-posture.ts +64 -0
- package/src/schema.ts +666 -61
- package/src/session-background-commands.ts +180 -78
- package/src/session-control.ts +181 -12
- package/src/session-goal-pacing.ts +4 -8
- package/src/session-queue-commands.ts +157 -82
- package/src/tool-gateway-approvals.ts +168 -0
- package/src/workspace-artifacts.ts +633 -178
- package/src/xai-subscription.ts +66 -14
- package/dist/chunk-4NAR7FBA.js.map +0 -1
- package/dist/chunk-6DPJA36C.js.map +0 -1
- package/dist/chunk-O56DM5GZ.js.map +0 -1
- package/dist/chunk-S3TDDCS2.js.map +0 -1
- /package/dist/{chunk-SZAWDXQC.js.map → chunk-CJROYHSC.js.map} +0 -0
- /package/dist/{chunk-DZCYW2WT.js.map → chunk-MX6V5F65.js.map} +0 -0
- /package/dist/{chunk-U4WPPEBH.js.map → chunk-NLFHMPUB.js.map} +0 -0
- /package/dist/{chunk-5NNCGFQY.js.map → chunk-P6NSEG2S.js.map} +0 -0
- /package/dist/{chunk-US4IS6IV.js.map → chunk-RZNOSEMC.js.map} +0 -0
- /package/dist/{chunk-F6PBS6WE.js.map → chunk-UFAMOUWL.js.map} +0 -0
package/src/provision-roles.ts
CHANGED
|
@@ -536,9 +536,11 @@ async function grantAppRoleIfSchemaExists(
|
|
|
536
536
|
"resolve_workspace_codex_subscription_source(uuid,uuid)",
|
|
537
537
|
"list_organization_workspace_ids(uuid)",
|
|
538
538
|
"organization_workspace_command(jsonb)",
|
|
539
|
+
"authorize_organization_shared_workspace_administration(uuid,uuid,text)",
|
|
539
540
|
"resolve_organization_workspace_removal_subject(uuid,text,uuid)",
|
|
540
541
|
"prepare_organization_workspace_member_removal(jsonb)",
|
|
541
542
|
"record_organization_workspace_member_removal(jsonb,uuid,uuid)",
|
|
543
|
+
"create_additional_managed_organization(text,text,text,text,uuid)",
|
|
542
544
|
"create_managed_organization(text,text,text,uuid)",
|
|
543
545
|
"assert_organization_shared_workspace_administrator(uuid,uuid,text)",
|
|
544
546
|
"open_organization_shared_workspace_administration_capability(uuid,uuid,text)",
|
|
@@ -553,7 +555,9 @@ async function grantAppRoleIfSchemaExists(
|
|
|
553
555
|
"complete_self_service_organization_setup(jsonb)",
|
|
554
556
|
"ensure_organization_user_setup_intent(jsonb)",
|
|
555
557
|
"claim_organization_user_setup_delivery(jsonb)",
|
|
558
|
+
"claim_organization_user_setup_delivery_v2(jsonb)",
|
|
556
559
|
"prepare_organization_user_setup_delivery(jsonb)",
|
|
560
|
+
"prepare_organization_user_setup_delivery_v2(jsonb)",
|
|
557
561
|
"settle_organization_user_setup_delivery(jsonb)",
|
|
558
562
|
"preview_organization_user_setup(text)",
|
|
559
563
|
"get_organization_invitation_for_administration(uuid,text,uuid)",
|
package/src/runtime-posture.ts
CHANGED
|
@@ -81,6 +81,8 @@ const KNOWLEDGE_SOURCE_SYNC_LOCK_AUTHORITY_TABLES = [
|
|
|
81
81
|
] as const;
|
|
82
82
|
const MANAGED_HUMAN_PERSONAL_WORKSPACE_ROUTINE =
|
|
83
83
|
"ensure_managed_human_personal_workspace(uuid, text, uuid)";
|
|
84
|
+
const ADDITIONAL_ORGANIZATION_CREATION_ROUTINE =
|
|
85
|
+
"create_additional_managed_organization(text, text, text, text, uuid)";
|
|
84
86
|
const ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
85
87
|
"list_self_organization_memberships(text)",
|
|
86
88
|
"list_self_organization_invitations(text)",
|
|
@@ -94,9 +96,11 @@ const ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
|
94
96
|
"resolve_workspace_codex_subscription_source(uuid, uuid)",
|
|
95
97
|
"list_organization_workspace_ids(uuid)",
|
|
96
98
|
"organization_workspace_command(jsonb)",
|
|
99
|
+
"authorize_organization_shared_workspace_administration(uuid, uuid, text)",
|
|
97
100
|
"resolve_organization_workspace_removal_subject(uuid, text, uuid)",
|
|
98
101
|
"prepare_organization_workspace_member_removal(jsonb)",
|
|
99
102
|
"record_organization_workspace_member_removal(jsonb, uuid, uuid)",
|
|
103
|
+
ADDITIONAL_ORGANIZATION_CREATION_ROUTINE,
|
|
100
104
|
"create_managed_organization(text, text, text, uuid)",
|
|
101
105
|
"assert_organization_shared_workspace_administrator(uuid, uuid, text)",
|
|
102
106
|
"open_organization_shared_workspace_administration_capability(uuid, uuid, text)",
|
|
@@ -111,7 +115,9 @@ const ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
|
111
115
|
"complete_self_service_organization_setup(jsonb)",
|
|
112
116
|
"ensure_organization_user_setup_intent(jsonb)",
|
|
113
117
|
"claim_organization_user_setup_delivery(jsonb)",
|
|
118
|
+
"claim_organization_user_setup_delivery_v2(jsonb)",
|
|
114
119
|
"prepare_organization_user_setup_delivery(jsonb)",
|
|
120
|
+
"prepare_organization_user_setup_delivery_v2(jsonb)",
|
|
115
121
|
"settle_organization_user_setup_delivery(jsonb)",
|
|
116
122
|
"preview_organization_user_setup(text)",
|
|
117
123
|
"get_organization_invitation_for_administration(uuid, text, uuid)",
|
|
@@ -154,6 +160,10 @@ const ORGANIZATION_MEMBERSHIP_LIFECYCLE_AUTHORITY_TABLES = [
|
|
|
154
160
|
"organization_workspace_operation_receipts",
|
|
155
161
|
"self_service_organization_setup_receipts",
|
|
156
162
|
] as const;
|
|
163
|
+
const ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES = [
|
|
164
|
+
...ORGANIZATION_MEMBERSHIP_LIFECYCLE_AUTHORITY_TABLES,
|
|
165
|
+
"additional_organization_creation_receipts",
|
|
166
|
+
] as const;
|
|
157
167
|
const PRIVATE_SESSION_CREATE_POLICY_ROUTINE = "get_private_session_create_policy(uuid, uuid, text)";
|
|
158
168
|
const ORGANIZATION_PRIVATE_SESSION_SETTINGS_READ_ROUTINE =
|
|
159
169
|
"get_organization_private_session_settings(uuid, text)";
|
|
@@ -489,6 +499,8 @@ const TENANCY_BACKFILL_ACTIVATION_EVIDENCE_ROUTINE =
|
|
|
489
499
|
"check_tenancy_backfill_activation_evidence(uuid)";
|
|
490
500
|
const GREENFIELD_SESSION_TENANCY_ACTIVATION_ROUTINE =
|
|
491
501
|
"activate_greenfield_session_tenancy_from_setup(text)";
|
|
502
|
+
const ADDITIONAL_ORGANIZATION_SESSION_TENANCY_ACTIVATION_ROUTINE =
|
|
503
|
+
"activate_session_tenancy_from_additional_organization(uuid)";
|
|
492
504
|
const SESSION_VISIBILITY_LIFECYCLE_CAPABILITY_ROUTINE =
|
|
493
505
|
"session_visibility_lifecycle_capability_held()";
|
|
494
506
|
const PRIVATE_SESSION_CREATE_CAPABILITY_ROUTINES = [
|
|
@@ -597,6 +609,7 @@ const RUNTIME_TARGET_SCHEMA_PUBLIC_POLICY_PREDICATE_ROUTINE_SET = new Set<string
|
|
|
597
609
|
|
|
598
610
|
/** Owner-internal helpers that must exist but must never be callable by the runtime role. */
|
|
599
611
|
export const RUNTIME_TARGET_SCHEMA_FORBIDDEN_ROUTINES = [
|
|
612
|
+
ADDITIONAL_ORGANIZATION_SESSION_TENANCY_ACTIVATION_ROUTINE,
|
|
600
613
|
AUTOMATIC_SESSION_TITLE_QUARANTINE_FENCE_ROUTINE,
|
|
601
614
|
ORGANIZATION_PRIVATE_SESSIONS_ENABLED_ROUTINE,
|
|
602
615
|
GREENFIELD_SESSION_TENANCY_ACTIVATION_ROUTINE,
|
|
@@ -620,6 +633,7 @@ const RUNTIME_TARGET_SCHEMA_INVOKER_ROUTINE_SET = new Set<string>(
|
|
|
620
633
|
* commit as the migration so startup cannot silently accept an unreviewed gap.
|
|
621
634
|
*/
|
|
622
635
|
export const FORCE_RLS_TABLES = [
|
|
636
|
+
"additional_organization_creation_receipts",
|
|
623
637
|
"agent_run_states",
|
|
624
638
|
"api_keys",
|
|
625
639
|
"attached_browser_devices",
|
|
@@ -786,6 +800,9 @@ export const FORCE_RLS_TABLES = [
|
|
|
786
800
|
"organization_membership_lifecycle_events",
|
|
787
801
|
"organization_membership_operation_receipts",
|
|
788
802
|
"organization_memberships",
|
|
803
|
+
"organization_model_provider_connection_operations",
|
|
804
|
+
"organization_model_provider_connections",
|
|
805
|
+
"organization_model_provider_custom_models",
|
|
789
806
|
"organization_private_session_setting_events",
|
|
790
807
|
"organization_private_session_settings",
|
|
791
808
|
"organization_profile_events",
|
|
@@ -856,6 +873,7 @@ export const FORCE_RLS_TABLES = [
|
|
|
856
873
|
"session_attempt_codemode_calls",
|
|
857
874
|
"session_attempt_connected_machine_authorizations",
|
|
858
875
|
"session_attempt_interruptions",
|
|
876
|
+
"session_attempt_model_context_snapshots",
|
|
859
877
|
"session_attempt_personal_document_admissions",
|
|
860
878
|
"session_attempt_personal_document_snapshots",
|
|
861
879
|
"session_attempt_personal_resource_admissions",
|
|
@@ -883,6 +901,7 @@ export const FORCE_RLS_TABLES = [
|
|
|
883
901
|
"session_system_update_outbox",
|
|
884
902
|
"session_system_updates",
|
|
885
903
|
"session_tenancy_activations",
|
|
904
|
+
"session_tenancy_additional_organization_activation_evidence",
|
|
886
905
|
"session_tenancy_greenfield_activation_evidence",
|
|
887
906
|
"session_turn_attempts",
|
|
888
907
|
"session_turn_startup_milestones",
|
|
@@ -925,6 +944,7 @@ export const FORCE_RLS_TABLES = [
|
|
|
925
944
|
"temporal_schedule_cleanup_outbox",
|
|
926
945
|
"tenancy_backfill_receipts",
|
|
927
946
|
"tenancy_backfill_unresolved_rows",
|
|
947
|
+
"tool_gateway_approval_capabilities",
|
|
928
948
|
"transcription_recording_chunks",
|
|
929
949
|
"transcription_recording_objects",
|
|
930
950
|
"transcription_recording_segments",
|
|
@@ -942,6 +962,7 @@ export const FORCE_RLS_TABLES = [
|
|
|
942
962
|
"workspace_captures",
|
|
943
963
|
"workspace_codex_subscription_preferences",
|
|
944
964
|
"workspace_control_events",
|
|
965
|
+
"workspace_gateway_custom_models",
|
|
945
966
|
"workspace_inference_controls",
|
|
946
967
|
"workspace_instruction_policy_activation_events",
|
|
947
968
|
"workspace_instruction_policy_deactivation_events",
|
|
@@ -981,8 +1002,14 @@ export const NON_RLS_RUNTIME_TABLES = [
|
|
|
981
1002
|
"auth_users",
|
|
982
1003
|
"auth_verifications",
|
|
983
1004
|
"automation_webhook_endpoints",
|
|
1005
|
+
"deployment_model_catalog",
|
|
984
1006
|
"integration_oauth_clients",
|
|
985
1007
|
"managed_accounts",
|
|
1008
|
+
"mcp_oauth_access_tokens",
|
|
1009
|
+
"mcp_oauth_authorization_codes",
|
|
1010
|
+
"mcp_oauth_authorization_requests",
|
|
1011
|
+
"mcp_oauth_clients",
|
|
1012
|
+
"mcp_oauth_refresh_tokens",
|
|
986
1013
|
"nested_agent_depth_configuration",
|
|
987
1014
|
"pr_review_managed_github_routes",
|
|
988
1015
|
"stripe_webhook_events",
|
|
@@ -1061,12 +1088,20 @@ export const RUNTIME_FULL_DML_TABLES = [
|
|
|
1061
1088
|
"machine_metrics_series",
|
|
1062
1089
|
"machine_removal_operations",
|
|
1063
1090
|
"managed_accounts",
|
|
1091
|
+
"mcp_oauth_access_tokens",
|
|
1092
|
+
"mcp_oauth_authorization_codes",
|
|
1093
|
+
"mcp_oauth_authorization_requests",
|
|
1094
|
+
"mcp_oauth_clients",
|
|
1095
|
+
"mcp_oauth_refresh_tokens",
|
|
1064
1096
|
"memory_slack_publication_configurations",
|
|
1065
1097
|
"memory_slack_publication_receipts",
|
|
1066
1098
|
"memory_slack_publications",
|
|
1067
1099
|
"model_call_facts",
|
|
1068
1100
|
"new_session_drafts",
|
|
1069
1101
|
"organization_codex_rotation_settings",
|
|
1102
|
+
"organization_model_provider_connection_operations",
|
|
1103
|
+
"organization_model_provider_connections",
|
|
1104
|
+
"organization_model_provider_custom_models",
|
|
1070
1105
|
"pack_installation_components",
|
|
1071
1106
|
"pack_installations",
|
|
1072
1107
|
"pr_review_app_registrations",
|
|
@@ -1124,6 +1159,7 @@ export const RUNTIME_FULL_DML_TABLES = [
|
|
|
1124
1159
|
"social_connections",
|
|
1125
1160
|
"social_posts",
|
|
1126
1161
|
"stripe_webhook_events",
|
|
1162
|
+
"tool_gateway_approval_capabilities",
|
|
1127
1163
|
"transcription_recording_chunks",
|
|
1128
1164
|
"transcription_recording_objects",
|
|
1129
1165
|
"transcription_recording_segments",
|
|
@@ -1135,6 +1171,7 @@ export const RUNTIME_FULL_DML_TABLES = [
|
|
|
1135
1171
|
"workspace_captures",
|
|
1136
1172
|
"workspace_codex_subscription_preferences",
|
|
1137
1173
|
"workspace_control_events",
|
|
1174
|
+
"workspace_gateway_custom_models",
|
|
1138
1175
|
"workspace_inference_controls",
|
|
1139
1176
|
"workspace_instruction_policy_heads",
|
|
1140
1177
|
"workspace_memberships",
|
|
@@ -1156,6 +1193,7 @@ export const RUNTIME_READ_ONLY_TABLES = [
|
|
|
1156
1193
|
"company_profile_activation_events",
|
|
1157
1194
|
"company_profile_heads",
|
|
1158
1195
|
"company_profile_snapshots",
|
|
1196
|
+
"deployment_model_catalog",
|
|
1159
1197
|
"document_authority_reclassifications",
|
|
1160
1198
|
"knowledge_lifecycle_events",
|
|
1161
1199
|
"knowledge_memory_lifecycle_events",
|
|
@@ -1259,6 +1297,7 @@ export const RUNTIME_READ_INSERT_UPDATE_TABLES = [
|
|
|
1259
1297
|
"scheduled_task_runs",
|
|
1260
1298
|
"scheduled_tasks",
|
|
1261
1299
|
"session_attempt_codemode_calls",
|
|
1300
|
+
"session_attempt_model_context_snapshots",
|
|
1262
1301
|
"session_turn_startup_milestones",
|
|
1263
1302
|
"site_auth_connections",
|
|
1264
1303
|
"slack_user_link_access_requests",
|
|
@@ -1270,6 +1309,7 @@ export const RUNTIME_READ_INSERT_UPDATE_TABLES = [
|
|
|
1270
1309
|
* The ordinary application role must have no direct table privileges on them.
|
|
1271
1310
|
*/
|
|
1272
1311
|
export const PROTECTED_NO_DIRECT_DML_TABLES = [
|
|
1312
|
+
"additional_organization_creation_receipts",
|
|
1273
1313
|
"canonical_human_identities",
|
|
1274
1314
|
"canonical_human_identity_operations",
|
|
1275
1315
|
"canonical_human_identity_subjects",
|
|
@@ -1359,6 +1399,7 @@ export const PROTECTED_NO_DIRECT_DML_TABLES = [
|
|
|
1359
1399
|
"session_attempt_personal_document_snapshots",
|
|
1360
1400
|
"session_attempt_personal_resource_admissions",
|
|
1361
1401
|
"session_attempt_personal_resource_snapshots",
|
|
1402
|
+
"session_tenancy_additional_organization_activation_evidence",
|
|
1362
1403
|
"session_tenancy_greenfield_activation_evidence",
|
|
1363
1404
|
"session_variable_set_attachments",
|
|
1364
1405
|
"session_visibility_write_capabilities",
|
|
@@ -2295,6 +2336,29 @@ export function evaluateRuntimeDatabasePosture(
|
|
|
2295
2336
|
);
|
|
2296
2337
|
}
|
|
2297
2338
|
}
|
|
2339
|
+
} else if (routine.name === ADDITIONAL_ORGANIZATION_CREATION_ROUTINE) {
|
|
2340
|
+
const missingAuthorityTables = ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES.filter(
|
|
2341
|
+
(tableName) => !tableByName.has(tableName),
|
|
2342
|
+
);
|
|
2343
|
+
if (missingAuthorityTables.length > 0) {
|
|
2344
|
+
violations.push(
|
|
2345
|
+
`target-schema runtime capability ${routine.name} authority tables are missing: ${missingAuthorityTables.join(", ")}`,
|
|
2346
|
+
);
|
|
2347
|
+
} else {
|
|
2348
|
+
const authorityTables = ADDITIONAL_ORGANIZATION_CREATION_AUTHORITY_TABLES.map(
|
|
2349
|
+
(tableName) => tableByName.get(tableName)!,
|
|
2350
|
+
);
|
|
2351
|
+
const authorityOwners = new Set(authorityTables.map((table) => table.owner));
|
|
2352
|
+
if (authorityOwners.size !== 1) {
|
|
2353
|
+
violations.push(
|
|
2354
|
+
`target-schema runtime capability ${routine.name} authority table owners do not match: ${authorityTables.map((table) => `${table.name}=${table.owner}`).join(", ")}`,
|
|
2355
|
+
);
|
|
2356
|
+
} else if (routine.owner !== authorityTables[0]!.owner) {
|
|
2357
|
+
violations.push(
|
|
2358
|
+
`target-schema runtime capability ${routine.name} owner ${routine.owner} does not match authority table owner ${authorityTables[0]!.owner}`,
|
|
2359
|
+
);
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2298
2362
|
} else if (
|
|
2299
2363
|
(ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES as readonly string[]).includes(routine.name)
|
|
2300
2364
|
) {
|