@opengeni/db 5.0.1 → 6.0.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 +0 -2
- package/dist/canonical-human-identities.d.ts +4 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/capability-components.d.ts +5 -13
- package/dist/capability-integrations.d.ts +23 -8
- package/dist/capability-reconciliation.d.ts +5 -0
- package/dist/capability-reconciliation.js +21 -0
- package/dist/capability-reconciliation.js.map +1 -0
- package/dist/{chunk-6T2GGYWE.js → chunk-4UJCXBR2.js} +4 -5800
- package/dist/chunk-4UJCXBR2.js.map +1 -0
- package/dist/{chunk-MWMXWHJD.js → chunk-7JCDSMX2.js} +2 -2
- package/dist/chunk-AJA2ZIUW.js +219 -0
- package/dist/chunk-AJA2ZIUW.js.map +1 -0
- package/dist/chunk-CDAT6EKW.js +247 -0
- package/dist/chunk-CDAT6EKW.js.map +1 -0
- package/dist/{chunk-DPONPYJD.js → chunk-CJI6G254.js} +70 -18
- package/dist/chunk-CJI6G254.js.map +1 -0
- package/dist/chunk-G32NVMRJ.js +276 -0
- package/dist/chunk-G32NVMRJ.js.map +1 -0
- package/dist/chunk-GABXCG3N.js +5811 -0
- package/dist/chunk-GABXCG3N.js.map +1 -0
- package/dist/{chunk-ERKVSPDX.js → chunk-LVY33EWL.js} +3 -3
- package/dist/{chunk-45CP2YKY.js → chunk-MAMBI2HR.js} +9 -3
- package/dist/{chunk-45CP2YKY.js.map → chunk-MAMBI2HR.js.map} +1 -1
- package/dist/{chunk-F73UKJY6.js → chunk-MN5PZMEK.js} +91 -108
- package/dist/chunk-MN5PZMEK.js.map +1 -0
- package/dist/chunk-PJI4MUZ7.js +131 -0
- package/dist/chunk-PJI4MUZ7.js.map +1 -0
- package/dist/{chunk-T6BWIGWJ.js → chunk-RIYHP2WU.js} +2 -2
- package/dist/{chunk-7HMK3B45.js → chunk-RL2MUXM3.js} +16 -7
- package/dist/chunk-RL2MUXM3.js.map +1 -0
- package/dist/{chunk-HQDVI2DB.js → chunk-SYKHLPTK.js} +4 -3
- package/dist/{chunk-HQDVI2DB.js.map → chunk-SYKHLPTK.js.map} +1 -1
- package/dist/{chunk-T6YLHJLS.js → chunk-XIXVVBW2.js} +198 -51
- package/dist/chunk-XIXVVBW2.js.map +1 -0
- package/dist/chunk-ZPJ6V2VG.js +156 -0
- package/dist/chunk-ZPJ6V2VG.js.map +1 -0
- package/dist/codex-capacity-recovery.d.ts +12 -0
- package/dist/codex-failure-eligibility.d.ts +9 -0
- package/dist/company-profile-schema.d.ts +4 -2
- package/dist/connect-attempts.d.ts +15 -0
- package/dist/connect-attempts.js +25 -0
- package/dist/connect-attempts.js.map +1 -0
- package/dist/connection-authority.d.ts +7 -63
- package/dist/connection-refresh-lock.d.ts +4 -0
- package/dist/connection-token-resolver.d.ts +8 -43
- package/dist/database-timing.d.ts +10 -0
- package/dist/database.d.ts +4 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.d.ts +9 -0
- package/dist/editable-artifacts.js +7 -5
- package/dist/index.d.ts +447 -78
- package/dist/index.js +12705 -12872
- package/dist/index.js.map +1 -1
- package/dist/insights-usage-bundle.d.ts +3 -0
- package/dist/integration-bindings.d.ts +1 -1
- package/dist/integration-facets.d.ts +18 -1
- package/dist/knowledge-entries-schema.d.ts +2 -0
- package/dist/knowledge-entries.d.ts +1 -0
- package/dist/knowledge-indexing.d.ts +1 -0
- package/dist/live-session-attempt.d.ts +35 -137
- package/dist/managed-auth-session-sets.js +3 -3
- package/dist/mcp-account-bindings.d.ts +4 -0
- package/dist/mcp-oauth.d.ts +11 -0
- package/dist/mcp-operations.js +2 -2
- package/dist/migrate.js +1 -1
- package/dist/organization-integration-policy.d.ts +51 -0
- package/dist/organization-integration-policy.js +18 -0
- package/dist/organization-integration-policy.js.map +1 -0
- package/dist/organization-usage.d.ts +20 -0
- package/dist/plugin-packages.d.ts +9 -12
- package/dist/pr-review.d.ts +0 -11
- package/dist/preference-registry-schema.d.ts +17 -0
- package/dist/provision-roles.js +1 -1
- package/dist/retained-provider-commands.d.ts +124 -6
- package/dist/retained-provider-commands.js +29 -97
- package/dist/retained-provider-commands.js.map +1 -1
- package/dist/retired-session-create-metadata.d.ts +4 -0
- package/dist/runtime-posture.d.ts +7 -5
- package/dist/schema.d.ts +876 -656
- package/dist/schema.js +5 -7
- package/dist/session-admission-block.d.ts +32 -0
- package/dist/session-attempt-writers.d.ts +4 -0
- package/dist/session-background-commands.js +5 -4
- package/dist/session-command-output.js +8 -126
- package/dist/session-command-output.js.map +1 -1
- package/dist/session-control.d.ts +5 -1
- package/dist/session-event-slices.d.ts +10 -0
- package/dist/session-event-slices.js +8 -222
- package/dist/session-event-slices.js.map +1 -1
- package/dist/session-file-attachments.d.ts +28 -0
- package/dist/session-goal-reports.d.ts +43 -0
- package/dist/session-mcp-approval.d.ts +4 -0
- package/dist/session-mcp-credential-rotation.js +5 -4
- package/dist/session-mcp-credential-rotation.js.map +1 -1
- package/dist/session-message-search.d.ts +22 -0
- package/dist/session-queue-commands.d.ts +2 -6
- package/dist/session-retry.d.ts +36 -0
- package/dist/session-tenancy.js +3 -3
- package/dist/skill-source-release-impact.d.ts +18 -0
- package/dist/skill-source-release.d.ts +9 -0
- package/dist/skills.d.ts +7 -1
- package/dist/user-resource-authority.d.ts +0 -8
- package/dist/video-generation.js +3 -3
- package/dist/workspace-tool-defaults.js +5 -4
- package/dist/workspace-tool-defaults.js.map +1 -1
- package/drizzle/0468_knowledge_relationship_projection.sql +30 -0
- package/drizzle/0469_knowledge_source_discovery.sql +85 -0
- package/drizzle/0470_organization_integration_policy.sql +151 -0
- package/drizzle/0471_usage_events_account_recent_index.sql +4 -0
- package/drizzle/0472_usage_events_workspace_recent_index.sql +4 -0
- package/drizzle/0473_organization_usage_analytical_capability.sql +237 -0
- package/drizzle/0474_goal_report_requirements.sql +156 -0
- package/drizzle/0475_session_event_history_statistics.sql +15 -0
- package/drizzle/0476_session_event_history_policy_planning.sql +29 -0
- package/drizzle/0477_managed_sign_in_methods.sql +303 -0
- package/drizzle/0478_sender_owned_connections.sql +2772 -0
- package/drizzle/0479_connection_create_idempotency.sql +16 -0
- package/drizzle/0480_private_session_organization_key_administration.sql +154 -0
- package/drizzle/0481_personal_connection_visibility_cleanup.sql +45 -0
- package/drizzle/0482_remove_packs.sql +417 -0
- package/drizzle/0483_preclaim_admission_block.sql +85 -0
- package/drizzle/0484_insights_usage_projection.sql +211 -0
- package/drizzle/0485_inherited_mcp_approval_policies.sql +6 -0
- package/drizzle/0486_reasoning_configuration_message_forks.sql +35 -0
- package/drizzle/0487_skill_catalog_message_forks.sql +26 -0
- package/drizzle/0488_permanent_skill_removal.sql +207 -0
- package/drizzle/0489_modal_command_byte_offsets.sql +17 -0
- package/drizzle/0490_periodic_capture_attempt_cadence.sql +6 -0
- package/drizzle/0491_warm_capture_holder_reclamation.sql +57 -0
- package/drizzle/0492_codex_accepted_source_authority.sql +249 -0
- package/drizzle/0493_stopping_command_error_containment.sql +58 -0
- package/drizzle/0494_mcp_account_bindings.sql +334 -0
- package/drizzle/0495_consented_sandbox_recovery.sql +220 -0
- package/drizzle/0496_supervised_command_settlement.sql +386 -0
- package/drizzle/0497_modal_inventory_owner_read_capability.sql +112 -0
- package/drizzle/0498_enrollment_membership_fence.sql +87 -0
- package/drizzle/0499_session_attachment_access.sql +224 -0
- package/drizzle/0500_session_execution_epoch.sql +37 -0
- package/drizzle/0501_session_sharing_execution.sql +591 -0
- package/drizzle/0502_active_message_boundary_forks.sql +30 -0
- package/package.json +17 -5
- package/src/automations.ts +17 -73
- package/src/canonical-human-identities.ts +17 -5
- package/src/capability-components.ts +7 -24
- package/src/capability-integrations.ts +301 -21
- package/src/capability-reconciliation.ts +19 -0
- package/src/codex-capacity-recovery.ts +47 -0
- package/src/codex-failure-eligibility.ts +93 -0
- package/src/connect-attempts.ts +49 -18
- package/src/connection-authority.ts +12 -158
- package/src/connection-refresh-lock.ts +22 -0
- package/src/connection-token-resolver.ts +58 -530
- package/src/database-timing.ts +43 -0
- package/src/database.ts +61 -26
- package/src/editable-artifacts.ts +1 -1
- package/src/index.ts +3578 -1273
- package/src/insights-model-bundle.ts +19 -7
- package/src/insights-usage-bundle.ts +16 -19
- package/src/integration-bindings.ts +2 -7
- package/src/integration-facets.ts +73 -6
- package/src/knowledge-entries.ts +8 -1
- package/src/live-session-attempt.ts +0 -22
- package/src/mcp-account-bindings.ts +12 -0
- package/src/mcp-oauth.ts +26 -0
- package/src/organization-integration-policy.ts +235 -0
- package/src/organization-usage.ts +83 -0
- package/src/plugin-packages.ts +226 -42
- package/src/pr-review.ts +7 -69
- package/src/preference-registry-schema.ts +1 -0
- package/src/provision-roles.ts +50 -37
- package/src/retained-provider-commands.ts +286 -9
- package/src/retired-session-create-metadata.ts +16 -0
- package/src/runtime-posture.ts +217 -13
- package/src/schema.ts +104 -120
- package/src/session-admission-block.ts +29 -0
- package/src/session-attempt-writers.ts +48 -0
- package/src/session-control.ts +21 -5
- package/src/session-event-slices.ts +76 -26
- package/src/session-file-attachments.ts +66 -0
- package/src/session-goal-reports.ts +255 -0
- package/src/session-mcp-approval.ts +30 -0
- package/src/session-message-search.ts +348 -0
- package/src/session-queue-commands.ts +60 -36
- package/src/session-retry.ts +319 -0
- package/src/skill-config-migration.ts +11 -2
- package/src/skill-source-release-impact.ts +33 -0
- package/src/skill-source-release.ts +67 -26
- package/src/skills.ts +44 -6
- package/src/user-resource-authority.ts +0 -56
- package/dist/chunk-6T2GGYWE.js.map +0 -1
- package/dist/chunk-7HMK3B45.js.map +0 -1
- package/dist/chunk-DPONPYJD.js.map +0 -1
- package/dist/chunk-F73UKJY6.js.map +0 -1
- package/dist/chunk-T6YLHJLS.js.map +0 -1
- package/dist/host-mcp-binding-match.d.ts +0 -5
- package/dist/host-mcp-bindings.d.ts +0 -79
- package/dist/host-mcp-resolvers.d.ts +0 -47
- package/dist/host-mcp-task-authority.d.ts +0 -43
- package/dist/host-selection-identity.d.ts +0 -6
- package/dist/pack-components.d.ts +0 -83
- package/dist/pack-installations.d.ts +0 -86
- package/src/host-mcp-binding-match.ts +0 -34
- package/src/host-mcp-bindings.ts +0 -777
- package/src/host-mcp-resolvers.ts +0 -266
- package/src/host-mcp-task-authority.ts +0 -384
- package/src/host-selection-identity.ts +0 -29
- package/src/pack-components.ts +0 -980
- package/src/pack-installations.ts +0 -950
- /package/dist/{chunk-MWMXWHJD.js.map → chunk-7JCDSMX2.js.map} +0 -0
- /package/dist/{chunk-ERKVSPDX.js.map → chunk-LVY33EWL.js.map} +0 -0
- /package/dist/{chunk-T6BWIGWJ.js.map → chunk-RIYHP2WU.js.map} +0 -0
|
@@ -144,6 +144,9 @@ var MCP_OPERATION_AUTHORITY_TABLES = [
|
|
|
144
144
|
"scheduled_task_runs"
|
|
145
145
|
];
|
|
146
146
|
var OWNER_INTERNAL_PRIVATE_ROUTINES = /* @__PURE__ */ new Set([
|
|
147
|
+
"read_sender_connection(uuid, uuid, uuid, text)",
|
|
148
|
+
"validate_mcp_account_bindings(jsonb, jsonb)",
|
|
149
|
+
"fence_mcp_account_bindings()",
|
|
147
150
|
"guard_mcp_operation_immutable()",
|
|
148
151
|
"mcp_operation_command_scoped(jsonb, text, jsonb)",
|
|
149
152
|
"guard_workspace_owned_skill_head_delete()",
|
|
@@ -190,6 +193,7 @@ var ORGANIZATION_MEMBERSHIP_LIFECYCLE_ROUTINES = [
|
|
|
190
193
|
"get_organization_administration_overview(uuid, text)",
|
|
191
194
|
"get_workspace_kind(uuid, uuid)",
|
|
192
195
|
"resolve_workspace_codex_subscription_source(uuid, uuid)",
|
|
196
|
+
"capture_legacy_codex_turn_sources(uuid, uuid)",
|
|
193
197
|
"list_organization_workspace_ids(uuid)",
|
|
194
198
|
"list_organization_codex_workspace_ids(uuid)",
|
|
195
199
|
"organization_workspace_command(jsonb)",
|
|
@@ -314,19 +318,17 @@ var MANAGED_HUMAN_PERSONAL_WORKSPACE_AUTHORITY_TABLES = [
|
|
|
314
318
|
];
|
|
315
319
|
var PERSONAL_RESOURCE_ATTEMPT_RESOLVER_ROUTINE = "resolve_session_attempt_personal_resources(uuid, uuid, uuid)";
|
|
316
320
|
var USER_RESOURCE_LIFECYCLE_ROUTINES = [
|
|
321
|
+
"list_owned_connection_accounts(uuid, uuid)",
|
|
317
322
|
"accept_turn_personal_resource_attachment(uuid, uuid, uuid, uuid, text, integer, boolean, integer)",
|
|
318
323
|
"list_self_user_resource_authorities(uuid, uuid, text, uuid, integer)",
|
|
319
324
|
"issue_self_user_resource_grant(uuid, uuid, uuid, text, text, text, uuid, integer, boolean)",
|
|
320
|
-
"issue_self_local_connection_use_grant(uuid, uuid, uuid, text, boolean)",
|
|
321
325
|
"revoke_self_user_resource_grant(uuid, uuid, uuid)",
|
|
322
326
|
"authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid)"
|
|
323
327
|
];
|
|
324
328
|
var CONNECTION_CONVERGENCE_AUDIT_CAPABILITY_ROUTINE = "connection_authority_convergence_audit_capability_active(uuid)";
|
|
325
329
|
var CONNECTION_AUTHORITY_ROUTINES = [
|
|
326
330
|
CONNECTION_CONVERGENCE_AUDIT_CAPABILITY_ROUTINE,
|
|
327
|
-
"resolve_personal_connection_authority_selection(uuid, uuid, text, uuid, jsonb)",
|
|
328
331
|
"resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text)",
|
|
329
|
-
"resolve_connection_use_authority(uuid, uuid, uuid, jsonb)",
|
|
330
332
|
"inspect_organization_connection_authority_convergence(uuid, integer, uuid)"
|
|
331
333
|
];
|
|
332
334
|
var PERSONAL_GITHUB_REPOSITORY_AUTHORITY_ROUTINES = [
|
|
@@ -341,7 +343,6 @@ var PERSONAL_GITHUB_REPOSITORY_AUTHORITY_TABLES = [
|
|
|
341
343
|
var SCHEDULED_PERSONAL_RESOURCE_ROUTINES = [
|
|
342
344
|
"freeze_scheduled_task_personal_resources(uuid, uuid, uuid, bigint)",
|
|
343
345
|
"clone_scheduled_task_personal_resource_authority(uuid, uuid, uuid, bigint, bigint)",
|
|
344
|
-
"refresh_scheduled_task_personal_resources_clone_connections(uuid, uuid, uuid, bigint, bigint)",
|
|
345
346
|
"create_scheduled_agent_run_with_admission(uuid, uuid, uuid, uuid, bigint, text, text, text, timestamp with time zone, timestamp with time zone, jsonb)",
|
|
346
347
|
"materialize_scheduled_task_reusable_session_from_run(uuid, uuid, uuid, uuid, uuid, bigint, text)",
|
|
347
348
|
"scheduled_task_run_personal_resource_authority(uuid, uuid, uuid)",
|
|
@@ -413,6 +414,11 @@ var SCOPED_COMPUTE_AUTHORITY_ROUTINES = [
|
|
|
413
414
|
"detach_scoped_machine_dependent_sessions(uuid, uuid, uuid)"
|
|
414
415
|
];
|
|
415
416
|
var CANONICAL_HUMAN_IDENTITY_ROUTINES = [
|
|
417
|
+
"mutate_managed_sign_in_method(text, text, jsonb)",
|
|
418
|
+
"assert_managed_sign_in_recovery(text, text, uuid, jsonb)",
|
|
419
|
+
"replay_managed_sign_in_method(text, text, jsonb)",
|
|
420
|
+
"claim_managed_sign_in_notification(uuid, text, text, integer)",
|
|
421
|
+
"settle_managed_sign_in_notification(uuid, uuid, text)",
|
|
416
422
|
"ensure_canonical_human_identity(text, text)",
|
|
417
423
|
"validate_canonical_human_session(text, text, boolean)",
|
|
418
424
|
"get_canonical_human_identity_projection(text)",
|
|
@@ -771,6 +777,7 @@ var FORCE_RLS_TABLES = [
|
|
|
771
777
|
"codex_reset_redemption_attempts",
|
|
772
778
|
"codex_rotation_settings",
|
|
773
779
|
"codex_subscription_credentials",
|
|
780
|
+
"codex_turn_source_bindings",
|
|
774
781
|
"company_brain_context_selection_receipts",
|
|
775
782
|
"company_brain_preference_proposal_receipts",
|
|
776
783
|
"company_brain_turn_context_snapshots",
|
|
@@ -899,6 +906,7 @@ var FORCE_RLS_TABLES = [
|
|
|
899
906
|
"managed_auth_login_transactions",
|
|
900
907
|
"managed_auth_session_set_operations",
|
|
901
908
|
"managed_auth_session_sets",
|
|
909
|
+
"managed_sign_in_method_operations",
|
|
902
910
|
"mcp_operations",
|
|
903
911
|
"memory_slack_publication_configurations",
|
|
904
912
|
"memory_slack_publication_receipts",
|
|
@@ -909,6 +917,8 @@ var FORCE_RLS_TABLES = [
|
|
|
909
917
|
"organization_codex_rotation_settings",
|
|
910
918
|
"organization_company_profile_agent_policies",
|
|
911
919
|
"organization_company_profile_agent_policy_events",
|
|
920
|
+
"organization_integration_policies",
|
|
921
|
+
"organization_integration_policy_operations",
|
|
912
922
|
"organization_invitation_binding_events",
|
|
913
923
|
"organization_membership_invitations",
|
|
914
924
|
"organization_membership_lifecycle_events",
|
|
@@ -943,8 +953,6 @@ var FORCE_RLS_TABLES = [
|
|
|
943
953
|
"organization_user_setup_intents",
|
|
944
954
|
"organization_workspace_lifecycle_events",
|
|
945
955
|
"organization_workspace_operation_receipts",
|
|
946
|
-
"pack_installation_components",
|
|
947
|
-
"pack_installations",
|
|
948
956
|
"personal_document_once_consumption_receipts",
|
|
949
957
|
"personal_github_repository_selection_heads",
|
|
950
958
|
"personal_github_repository_selection_operations",
|
|
@@ -1094,7 +1102,6 @@ var FORCE_RLS_TABLES = [
|
|
|
1094
1102
|
"workspace_learning_policy_revisions",
|
|
1095
1103
|
"workspace_learning_policy_snapshots",
|
|
1096
1104
|
"workspace_model_policies",
|
|
1097
|
-
"workspace_packs",
|
|
1098
1105
|
"workspace_screenshot_quotas",
|
|
1099
1106
|
"workspace_session_activity_revisions",
|
|
1100
1107
|
"workspace_variable_set_variables",
|
|
@@ -1210,8 +1217,6 @@ var RUNTIME_FULL_DML_TABLES = [
|
|
|
1210
1217
|
"organization_model_provider_connection_operations",
|
|
1211
1218
|
"organization_model_provider_connections",
|
|
1212
1219
|
"organization_model_provider_custom_models",
|
|
1213
|
-
"pack_installation_components",
|
|
1214
|
-
"pack_installations",
|
|
1215
1220
|
"pr_review_app_registrations",
|
|
1216
1221
|
"pr_review_managed_github_routes",
|
|
1217
1222
|
"pr_review_repository_bindings",
|
|
@@ -1285,7 +1290,6 @@ var RUNTIME_FULL_DML_TABLES = [
|
|
|
1285
1290
|
"workspace_instruction_policy_heads",
|
|
1286
1291
|
"workspace_memberships",
|
|
1287
1292
|
"workspace_model_policies",
|
|
1288
|
-
"workspace_packs",
|
|
1289
1293
|
"workspace_screenshot_quotas",
|
|
1290
1294
|
"workspace_video_generation_policies",
|
|
1291
1295
|
"workspace_video_generation_quotas",
|
|
@@ -1297,6 +1301,7 @@ var RUNTIME_FULL_DML_TABLES = [
|
|
|
1297
1301
|
"xai_subscription_credentials"
|
|
1298
1302
|
];
|
|
1299
1303
|
var RUNTIME_READ_ONLY_TABLES = [
|
|
1304
|
+
"codex_turn_source_bindings",
|
|
1300
1305
|
"company_profile_activation_events",
|
|
1301
1306
|
"company_profile_heads",
|
|
1302
1307
|
"company_profile_snapshots",
|
|
@@ -1307,6 +1312,8 @@ var RUNTIME_READ_ONLY_TABLES = [
|
|
|
1307
1312
|
"knowledge_memory_lifecycle_events",
|
|
1308
1313
|
"knowledge_memory_relationships",
|
|
1309
1314
|
"nested_agent_depth_configuration",
|
|
1315
|
+
"organization_integration_policies",
|
|
1316
|
+
"organization_integration_policy_operations",
|
|
1310
1317
|
"preference_registry_events",
|
|
1311
1318
|
"preference_registry_snapshots",
|
|
1312
1319
|
"session_tenancy_activations",
|
|
@@ -1463,6 +1470,7 @@ var PROTECTED_NO_DIRECT_DML_TABLES = [
|
|
|
1463
1470
|
"managed_auth_login_transactions",
|
|
1464
1471
|
"managed_auth_session_set_operations",
|
|
1465
1472
|
"managed_auth_session_sets",
|
|
1473
|
+
"managed_sign_in_method_operations",
|
|
1466
1474
|
"mcp_operations",
|
|
1467
1475
|
"organization_company_profile_agent_policies",
|
|
1468
1476
|
"organization_company_profile_agent_policy_events",
|
|
@@ -1569,6 +1577,20 @@ var RuntimeDatabasePostureError = class extends Error {
|
|
|
1569
1577
|
this.violations = violations;
|
|
1570
1578
|
}
|
|
1571
1579
|
};
|
|
1580
|
+
function isRetryableRuntimeDatabaseStartupError(error) {
|
|
1581
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1582
|
+
let current = error;
|
|
1583
|
+
while (current instanceof Error && !seen.has(current)) {
|
|
1584
|
+
seen.add(current);
|
|
1585
|
+
if (current instanceof RuntimeDatabasePostureError) return false;
|
|
1586
|
+
const code = current.code;
|
|
1587
|
+
if (typeof code === "string" && ["28P01", "28000", "3D000", "42501", "42P01", "42703"].includes(code)) {
|
|
1588
|
+
return false;
|
|
1589
|
+
}
|
|
1590
|
+
current = current.cause;
|
|
1591
|
+
}
|
|
1592
|
+
return true;
|
|
1593
|
+
}
|
|
1572
1594
|
function resultRows(result) {
|
|
1573
1595
|
if (Array.isArray(result)) {
|
|
1574
1596
|
return result;
|
|
@@ -1756,9 +1778,17 @@ async function inspectRuntimeDatabasePosture(db, options) {
|
|
|
1756
1778
|
c.relforcerowsecurity as rls_forced,
|
|
1757
1779
|
row_security_active(c.oid) as rls_active,
|
|
1758
1780
|
(select count(*)::int from pg_policy policy where policy.polrelid = c.oid) as policy_count,
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
has_table_privilege(current_user, c.oid, '
|
|
1781
|
+
-- Column-only grants on the inventory stamp are also unsafe; in
|
|
1782
|
+
-- particular INSERT can mint authority without a table grant.
|
|
1783
|
+
(has_table_privilege(current_user, c.oid, 'SELECT') or
|
|
1784
|
+
(c.relname = 'modal_inventory_read_capabilities' and
|
|
1785
|
+
has_any_column_privilege(current_user, c.oid, 'SELECT'))) as can_select,
|
|
1786
|
+
(has_table_privilege(current_user, c.oid, 'INSERT') or
|
|
1787
|
+
(c.relname = 'modal_inventory_read_capabilities' and
|
|
1788
|
+
has_any_column_privilege(current_user, c.oid, 'INSERT'))) as can_insert,
|
|
1789
|
+
(has_table_privilege(current_user, c.oid, 'UPDATE') or
|
|
1790
|
+
(c.relname = 'modal_inventory_read_capabilities' and
|
|
1791
|
+
has_any_column_privilege(current_user, c.oid, 'UPDATE'))) as can_update,
|
|
1762
1792
|
has_table_privilege(current_user, c.oid, 'DELETE') as can_delete
|
|
1763
1793
|
from pg_class c
|
|
1764
1794
|
join pg_namespace n on n.oid = c.relnamespace
|
|
@@ -1773,6 +1803,10 @@ async function inspectRuntimeDatabasePosture(db, options) {
|
|
|
1773
1803
|
${SCOPED_COMPUTE_CAPABILITY_TABLE},
|
|
1774
1804
|
${CONNECTION_TENANCY_BACKFILL_CAPABILITY_TABLE},
|
|
1775
1805
|
${SANDBOX_FILE_PUBLICATIONS_TABLE},
|
|
1806
|
+
'organization_usage_read_capabilities',
|
|
1807
|
+
'session_file_attachments',
|
|
1808
|
+
'session_file_read_capabilities',
|
|
1809
|
+
'modal_inventory_read_capabilities',
|
|
1776
1810
|
${AUTOMATIC_SESSION_TITLE_FANOUT_OUTBOX_TABLE}
|
|
1777
1811
|
)
|
|
1778
1812
|
`)
|
|
@@ -1943,6 +1977,28 @@ function evaluateRuntimeDatabasePosture(posture, options) {
|
|
|
1943
1977
|
if (schema.create) violations.push(`runtime role has CREATE on schema ${schemaName}`);
|
|
1944
1978
|
}
|
|
1945
1979
|
const tableByName = new Map(posture.tables.map((table) => [table.name, table]));
|
|
1980
|
+
if (tableByName.has("organization_integration_policies")) {
|
|
1981
|
+
for (const name of [
|
|
1982
|
+
"update_organization_integration_policy(uuid, text, jsonb)",
|
|
1983
|
+
"assert_organization_integration_policy_administrator(uuid, text)"
|
|
1984
|
+
]) {
|
|
1985
|
+
const routines = posture.privateRoutines.filter((routine2) => routine2.name === name);
|
|
1986
|
+
const quotedSchema = `"${targetSchema.replaceAll('"', '""')}"`;
|
|
1987
|
+
const searchPaths = /* @__PURE__ */ new Set([
|
|
1988
|
+
`search_path=pg_catalog, ${quotedSchema}, pg_temp`,
|
|
1989
|
+
`search_path=pg_catalog, ${targetSchema}, pg_temp`
|
|
1990
|
+
]);
|
|
1991
|
+
const routine = routines[0];
|
|
1992
|
+
if (routines.length !== 1 || !routine?.execute || routine.publicExecute || !routine.securityDefiner || !routine.configuration?.some((configuration) => searchPaths.has(configuration)) || [
|
|
1993
|
+
"organization_integration_policies",
|
|
1994
|
+
"organization_integration_policy_operations",
|
|
1995
|
+
"organization_memberships",
|
|
1996
|
+
"api_keys"
|
|
1997
|
+
].some((table) => tableByName.get(table)?.owner !== routine.owner)) {
|
|
1998
|
+
violations.push("organization integration policy mutation capability is missing or unsafe");
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
1946
2002
|
const actualRlsTables = new Set(
|
|
1947
2003
|
posture.tables.filter((table) => table.rlsEnabled).map((table) => table.name)
|
|
1948
2004
|
);
|
|
@@ -3242,11 +3298,88 @@ function evaluateRuntimeDatabasePosture(posture, options) {
|
|
|
3242
3298
|
}
|
|
3243
3299
|
}
|
|
3244
3300
|
}
|
|
3301
|
+
for (const name of ["session_file_attachments", "session_file_read_capabilities"]) {
|
|
3302
|
+
const table = posture.privateTables.find((candidate) => candidate.name === name);
|
|
3303
|
+
if (!table) {
|
|
3304
|
+
if (!options.protectedTables)
|
|
3305
|
+
violations.push(`session attachment relation ${name} is missing`);
|
|
3306
|
+
continue;
|
|
3307
|
+
}
|
|
3308
|
+
if (table.owner === expectedRole || table.owner !== tableByName.get("files")?.owner || table.select || table.insert || table.update || table.delete)
|
|
3309
|
+
violations.push(`session attachment relation ${name} has unsafe authority`);
|
|
3310
|
+
if (name === "session_file_attachments" && (!table.rlsEnabled || !table.rlsForced || !table.rlsActive || (table.policyCount ?? 0) < 1))
|
|
3311
|
+
violations.push("session attachment grants lack FORCE-RLS isolation");
|
|
3312
|
+
const routines = name === "session_file_attachments" ? [
|
|
3313
|
+
"accept_session_file_attachments(uuid, uuid, uuid, uuid, text, uuid[])",
|
|
3314
|
+
"read_session_file_attachments(uuid, uuid, uuid, integer, uuid[], jsonb)"
|
|
3315
|
+
] : ["session_file_read_allowed(uuid, uuid, uuid)"];
|
|
3316
|
+
for (const signature of routines) {
|
|
3317
|
+
const routine = posture.privateRoutines.find((candidate) => candidate.name === signature);
|
|
3318
|
+
const quotedSchema = `"${targetSchema.replaceAll('"', '""')}"`;
|
|
3319
|
+
const paths = name === "session_file_read_capabilities" ? ["search_path=pg_catalog, pg_temp"] : [
|
|
3320
|
+
`search_path=pg_catalog, ${quotedSchema}, pg_temp`,
|
|
3321
|
+
`search_path=pg_catalog, ${targetSchema}, pg_temp`
|
|
3322
|
+
];
|
|
3323
|
+
if (!routine || !routine.execute || routine.publicExecute || !routine.securityDefiner || routine.owner !== table.owner || !routine.configuration?.some((value) => paths.includes(value)))
|
|
3324
|
+
violations.push(`session attachment capability ${signature} is missing or unsafe`);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
const organizationUsageCapability = posture.privateTables.find(
|
|
3328
|
+
(table) => table.name === "organization_usage_read_capabilities"
|
|
3329
|
+
);
|
|
3330
|
+
const modalInventoryCapability = posture.privateTables.find(
|
|
3331
|
+
(table) => table.name === "modal_inventory_read_capabilities"
|
|
3332
|
+
);
|
|
3333
|
+
if (modalInventoryCapability) {
|
|
3334
|
+
const capability = modalInventoryCapability;
|
|
3335
|
+
const inventory = posture.privateRoutines.find(
|
|
3336
|
+
(routine) => routine.name === "list_live_modal_sandbox_leases()"
|
|
3337
|
+
);
|
|
3338
|
+
if (capability.owner === expectedRole || capability.owner !== tableByName.get("sandbox_leases")?.owner || capability.select || capability.insert || capability.update || capability.delete || !inventory?.execute || !inventory.securityDefiner || inventory.publicExecute || inventory.owner !== capability.owner || !inventory.configuration?.includes("search_path=pg_catalog")) {
|
|
3339
|
+
violations.push("Modal inventory capability has unsafe owner, ACL or runtime privileges");
|
|
3340
|
+
}
|
|
3341
|
+
}
|
|
3342
|
+
if (organizationUsageCapability) {
|
|
3343
|
+
const capability = organizationUsageCapability;
|
|
3344
|
+
if (capability.owner === expectedRole || capability.owner !== tableByName.get("usage_events")?.owner || capability.select || capability.insert || capability.update || capability.delete) {
|
|
3345
|
+
violations.push(
|
|
3346
|
+
"organization usage capability has unsafe owner or direct runtime privileges"
|
|
3347
|
+
);
|
|
3348
|
+
}
|
|
3349
|
+
const aggregateRoutine = posture.privateRoutines.find(
|
|
3350
|
+
(routine) => routine.name === "organization_usage_summary(uuid, timestamp with time zone, timestamp with time zone, text, uuid, boolean)"
|
|
3351
|
+
);
|
|
3352
|
+
if (!aggregateRoutine || !aggregateRoutine.securityDefiner || !aggregateRoutine.execute || aggregateRoutine.publicExecute || aggregateRoutine.owner !== capability.owner) {
|
|
3353
|
+
violations.push("organization usage aggregate capability is missing or unsafe");
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3245
3356
|
for (const routine of posture.privateRoutines) {
|
|
3246
3357
|
if (routine.owner === expectedRole) {
|
|
3247
3358
|
violations.push(`runtime role owns private routine ${routine.name}`);
|
|
3248
3359
|
}
|
|
3249
3360
|
const ownerInternalRoutine = OWNER_INTERNAL_PRIVATE_ROUTINES.has(routine.name);
|
|
3361
|
+
if (["validate_mcp_account_bindings(jsonb, jsonb)", "fence_mcp_account_bindings()"].includes(
|
|
3362
|
+
routine.name
|
|
3363
|
+
)) {
|
|
3364
|
+
if (routine.execute || routine.publicExecute) {
|
|
3365
|
+
violations.push(
|
|
3366
|
+
`runtime or PUBLIC has forbidden EXECUTE on MCP account binding internal routine ${routine.name}`
|
|
3367
|
+
);
|
|
3368
|
+
}
|
|
3369
|
+
if (routine.owner !== tableByName.get("session_turns")?.owner) {
|
|
3370
|
+
violations.push(
|
|
3371
|
+
`MCP account binding internal routine ${routine.name} owner does not match turn owner`
|
|
3372
|
+
);
|
|
3373
|
+
}
|
|
3374
|
+
if (routine.securityDefiner !== (routine.name === "fence_mcp_account_bindings()")) {
|
|
3375
|
+
violations.push(
|
|
3376
|
+
`MCP account binding internal routine ${routine.name} has unsafe execution mode`
|
|
3377
|
+
);
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
if (routine.name === "read_sender_connection(uuid, uuid, uuid, text)" && (routine.execute || routine.publicExecute)) {
|
|
3381
|
+
violations.push("runtime or PUBLIC can call the internal sender connection reader");
|
|
3382
|
+
}
|
|
3250
3383
|
if ([
|
|
3251
3384
|
"guard_mcp_operation_immutable()",
|
|
3252
3385
|
"mcp_operation_command_scoped(jsonb, text, jsonb)"
|
|
@@ -3645,6 +3778,7 @@ async function grantAppRoleIfSchemaExists(sql2, role, schema) {
|
|
|
3645
3778
|
"get_organization_administration_overview(uuid,text)",
|
|
3646
3779
|
"get_workspace_kind(uuid,uuid)",
|
|
3647
3780
|
"resolve_workspace_codex_subscription_source(uuid,uuid)",
|
|
3781
|
+
"capture_legacy_codex_turn_sources(uuid,uuid)",
|
|
3648
3782
|
"list_organization_workspace_ids(uuid)",
|
|
3649
3783
|
"list_organization_codex_workspace_ids(uuid)",
|
|
3650
3784
|
"organization_workspace_command(jsonb)",
|
|
@@ -3691,6 +3825,10 @@ async function grantAppRoleIfSchemaExists(sql2, role, schema) {
|
|
|
3691
3825
|
"complete_organization_retention_deletion(uuid,uuid,uuid,text)"
|
|
3692
3826
|
].map(literal).join(", ")}]`;
|
|
3693
3827
|
const managedAuthSessionSetRoutines = `ARRAY[${[
|
|
3828
|
+
"assert_managed_sign_in_recovery(text,text,uuid,jsonb)",
|
|
3829
|
+
"replay_managed_sign_in_method(text,text,jsonb)",
|
|
3830
|
+
"claim_managed_sign_in_notification(uuid,text,text,integer)",
|
|
3831
|
+
"settle_managed_sign_in_notification(uuid,uuid,text)",
|
|
3694
3832
|
"get_canonical_human_exact_login_binding(text,text)",
|
|
3695
3833
|
"managed_auth_session_set_authority_state(text)",
|
|
3696
3834
|
"managed_auth_session_set_snapshot(text,text,boolean,boolean,boolean)",
|
|
@@ -3725,6 +3863,9 @@ BEGIN
|
|
|
3725
3863
|
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.mcp_operation_command(jsonb,text,jsonb) TO %I', ${literal(schema)}, ${literal(role)});
|
|
3726
3864
|
END IF;
|
|
3727
3865
|
EXECUTE format('GRANT USAGE ON SCHEMA %I TO %I', ${literal(schema)}, ${literal(role)});
|
|
3866
|
+
IF to_regprocedure('opengeni_private.codex_credential_serves_turn(uuid,uuid,uuid,uuid)') IS NOT NULL THEN
|
|
3867
|
+
EXECUTE format('GRANT EXECUTE ON FUNCTION opengeni_private.codex_credential_serves_turn(uuid,uuid,uuid,uuid) TO %I', ${literal(role)});
|
|
3868
|
+
END IF;
|
|
3728
3869
|
EXECUTE format('REVOKE CREATE ON SCHEMA %I FROM %I', ${literal(schema)}, ${literal(role)});
|
|
3729
3870
|
EXECUTE format('REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA %I FROM %I', ${literal(schema)}, ${literal(role)});
|
|
3730
3871
|
FOREACH runtime_table IN ARRAY ${runtimeFullDmlTables} LOOP
|
|
@@ -4424,6 +4565,9 @@ BEGIN
|
|
|
4424
4565
|
${literal(role)}
|
|
4425
4566
|
);
|
|
4426
4567
|
END IF;
|
|
4568
|
+
IF to_regprocedure(format('%I.mutate_managed_sign_in_method(text,text,jsonb)', ${literal(schema)})) IS NOT NULL THEN
|
|
4569
|
+
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.mutate_managed_sign_in_method(text,text,jsonb) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4570
|
+
END IF;
|
|
4427
4571
|
FOREACH routine_signature IN ARRAY ${managedAuthSessionSetRoutines} LOOP
|
|
4428
4572
|
IF to_regprocedure(format('%I.%s', ${literal(schema)}, routine_signature)) IS NOT NULL THEN
|
|
4429
4573
|
EXECUTE format(
|
|
@@ -4815,6 +4959,10 @@ BEGIN
|
|
|
4815
4959
|
${literal(role)}
|
|
4816
4960
|
);
|
|
4817
4961
|
END IF;
|
|
4962
|
+
IF to_regprocedure(format('%I.list_owned_connection_accounts(uuid,uuid)', ${literal(schema)})) IS NOT NULL THEN
|
|
4963
|
+
EXECUTE format('REVOKE ALL ON FUNCTION %I.list_owned_connection_accounts(uuid,uuid) FROM PUBLIC', ${literal(schema)});
|
|
4964
|
+
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.list_owned_connection_accounts(uuid,uuid) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4965
|
+
END IF;
|
|
4818
4966
|
IF to_regprocedure(format('%I.list_self_user_resource_authorities(uuid,uuid,text,uuid,integer)', ${literal(schema)}))
|
|
4819
4967
|
IS NOT NULL THEN
|
|
4820
4968
|
EXECUTE format('REVOKE ALL ON FUNCTION %I.list_self_user_resource_authorities(uuid) FROM PUBLIC', ${literal(schema)});
|
|
@@ -4832,29 +4980,9 @@ BEGIN
|
|
|
4832
4980
|
EXECUTE format('REVOKE ALL ON FUNCTION %I.authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid) FROM PUBLIC', ${literal(schema)});
|
|
4833
4981
|
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.authorize_session_attempt_personal_resource_reads(uuid, uuid, uuid) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4834
4982
|
END IF;
|
|
4835
|
-
IF to_regprocedure(format('%I.
|
|
4836
|
-
|
|
4837
|
-
EXECUTE format('
|
|
4838
|
-
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.issue_self_local_connection_use_grant(uuid, uuid, uuid, text, boolean) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4839
|
-
END IF;
|
|
4840
|
-
IF to_regprocedure(format('%I.resolve_connection_use_authority(uuid,uuid,uuid,jsonb)', ${literal(schema)}))
|
|
4841
|
-
IS NOT NULL THEN
|
|
4842
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.list_self_connection_authorities(uuid) FROM PUBLIC', ${literal(schema)});
|
|
4843
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.list_self_connection_authorities(uuid) FROM %I', ${literal(schema)}, ${literal(role)});
|
|
4844
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.issue_self_connection_use_grant(uuid, uuid, uuid, text, text, uuid, boolean) FROM PUBLIC', ${literal(schema)});
|
|
4845
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.issue_self_connection_use_grant(uuid, uuid, uuid, text, text, uuid, boolean) FROM %I', ${literal(schema)}, ${literal(role)});
|
|
4846
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.revoke_self_connection_use_grant(uuid, uuid) FROM PUBLIC', ${literal(schema)});
|
|
4847
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.revoke_self_connection_use_grant(uuid, uuid) FROM %I', ${literal(schema)}, ${literal(role)});
|
|
4848
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.resolve_connection_use_authority(uuid, uuid, uuid, jsonb) FROM PUBLIC', ${literal(schema)});
|
|
4849
|
-
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.resolve_connection_use_authority(uuid, uuid, uuid, jsonb) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4850
|
-
IF to_regprocedure(format('%I.resolve_personal_connection_authority_selection(uuid,uuid,text,uuid,jsonb)', ${literal(schema)})) IS NOT NULL THEN
|
|
4851
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.resolve_personal_connection_authority_selection(uuid, uuid, text, uuid, jsonb) FROM PUBLIC', ${literal(schema)});
|
|
4852
|
-
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.resolve_personal_connection_authority_selection(uuid, uuid, text, uuid, jsonb) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4853
|
-
END IF;
|
|
4854
|
-
IF to_regprocedure(format('%I.resolve_accepted_connection_use(uuid,uuid,uuid,uuid,uuid,integer,uuid,text,text,uuid,text,text,text,text)', ${literal(schema)})) IS NOT NULL THEN
|
|
4855
|
-
EXECUTE format('REVOKE ALL ON FUNCTION %I.resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text) FROM PUBLIC', ${literal(schema)});
|
|
4856
|
-
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4857
|
-
END IF;
|
|
4983
|
+
IF to_regprocedure(format('%I.resolve_accepted_connection_use(uuid,uuid,uuid,uuid,uuid,integer,uuid,text,text,uuid,text,text,text,text)', ${literal(schema)})) IS NOT NULL THEN
|
|
4984
|
+
EXECUTE format('REVOKE ALL ON FUNCTION %I.resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text) FROM PUBLIC', ${literal(schema)});
|
|
4985
|
+
EXECUTE format('GRANT EXECUTE ON FUNCTION %I.resolve_accepted_connection_use(uuid, uuid, uuid, uuid, uuid, integer, uuid, text, text, uuid, text, text, text, text) TO %I', ${literal(schema)}, ${literal(role)});
|
|
4858
4986
|
END IF;
|
|
4859
4987
|
IF to_regprocedure(
|
|
4860
4988
|
format('%I.get_self_personal_github_repository_selection(uuid,uuid,text,uuid)', ${literal(schema)})
|
|
@@ -4984,20 +5112,7 @@ BEGIN
|
|
|
4984
5112
|
${literal(schema)},
|
|
4985
5113
|
${literal(role)}
|
|
4986
5114
|
);
|
|
4987
|
-
IF to_regprocedure(
|
|
4988
|
-
format(
|
|
4989
|
-
'%I.refresh_scheduled_task_personal_resources_clone_connections(uuid,uuid,uuid,bigint,bigint)',
|
|
4990
|
-
${literal(schema)}
|
|
4991
|
-
)
|
|
4992
|
-
) IS NOT NULL THEN
|
|
4993
|
-
EXECUTE format(
|
|
4994
|
-
'REVOKE ALL ON FUNCTION %I.refresh_scheduled_task_personal_resources_clone_connections(uuid, uuid, uuid, bigint, bigint) FROM PUBLIC',
|
|
4995
|
-
${literal(schema)}
|
|
4996
|
-
);
|
|
4997
|
-
EXECUTE format(
|
|
4998
|
-
'GRANT EXECUTE ON FUNCTION %I.refresh_scheduled_task_personal_resources_clone_connections(uuid, uuid, uuid, bigint, bigint) TO %I',
|
|
4999
|
-
${literal(schema)}, ${literal(role)}
|
|
5000
|
-
);
|
|
5115
|
+
IF to_regprocedure(format('%I.create_scheduled_agent_run_with_admission(uuid,uuid,uuid,uuid,bigint,text,text,text,timestamp with time zone,timestamp with time zone,jsonb)', ${literal(schema)})) IS NOT NULL THEN
|
|
5001
5116
|
EXECUTE format(
|
|
5002
5117
|
'REVOKE ALL ON FUNCTION %I.create_scheduled_agent_run_with_admission(uuid, uuid, uuid, uuid, bigint, text, text, text, timestamp with time zone, timestamp with time zone, jsonb) FROM PUBLIC',
|
|
5003
5118
|
${literal(schema)}
|
|
@@ -5188,6 +5303,34 @@ BEGIN
|
|
|
5188
5303
|
EXECUTE format('GRANT USAGE ON SCHEMA opengeni_private TO %I', ${literal(role)});
|
|
5189
5304
|
EXECUTE format('REVOKE CREATE ON SCHEMA opengeni_private FROM %I', ${literal(role)});
|
|
5190
5305
|
EXECUTE format('GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA opengeni_private TO %I', ${literal(role)});
|
|
5306
|
+
IF to_regclass('opengeni_private.modal_inventory_read_capabilities') IS NOT NULL THEN
|
|
5307
|
+
-- Inventory is the only capability mint. Reprovisioning must repair
|
|
5308
|
+
-- accidental table and column grants, never expose its private ledger.
|
|
5309
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.modal_inventory_read_capabilities FROM %I', ${literal(role)});
|
|
5310
|
+
EXECUTE format('REVOKE ALL (backend_pid, transaction_id, data_schema) ON TABLE opengeni_private.modal_inventory_read_capabilities FROM %I', ${literal(role)});
|
|
5311
|
+
REVOKE ALL ON TABLE opengeni_private.modal_inventory_read_capabilities FROM PUBLIC;
|
|
5312
|
+
REVOKE ALL (backend_pid, transaction_id, data_schema) ON TABLE opengeni_private.modal_inventory_read_capabilities FROM PUBLIC;
|
|
5313
|
+
REVOKE ALL ON FUNCTION opengeni_private.list_live_modal_sandbox_leases() FROM PUBLIC;
|
|
5314
|
+
END IF;
|
|
5315
|
+
IF to_regclass('opengeni_private.sandbox_recovery_rollout') IS NOT NULL THEN
|
|
5316
|
+
-- Migration may precede this role's creation. Converge only read access;
|
|
5317
|
+
-- runtime identities and PUBLIC never receive recovery activation writes.
|
|
5318
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.sandbox_recovery_rollout FROM %I', ${literal(role)});
|
|
5319
|
+
EXECUTE format('REVOKE ALL (singleton, consent_enabled, release_evidence) ON TABLE opengeni_private.sandbox_recovery_rollout FROM %I', ${literal(role)});
|
|
5320
|
+
REVOKE ALL ON TABLE opengeni_private.sandbox_recovery_rollout FROM PUBLIC;
|
|
5321
|
+
REVOKE ALL (singleton, consent_enabled, release_evidence) ON TABLE opengeni_private.sandbox_recovery_rollout FROM PUBLIC;
|
|
5322
|
+
EXECUTE format('GRANT SELECT ON TABLE opengeni_private.sandbox_recovery_rollout TO %I', ${literal(role)});
|
|
5323
|
+
END IF;
|
|
5324
|
+
IF to_regclass('opengeni_private.organization_usage_read_capabilities') IS NOT NULL THEN
|
|
5325
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.organization_usage_read_capabilities FROM %I', ${literal(role)});
|
|
5326
|
+
REVOKE ALL ON TABLE opengeni_private.organization_usage_read_capabilities FROM PUBLIC;
|
|
5327
|
+
REVOKE ALL ON FUNCTION opengeni_private.organization_usage_summary(uuid,timestamptz,timestamptz,text,uuid,boolean) FROM PUBLIC;
|
|
5328
|
+
END IF;
|
|
5329
|
+
IF to_regclass('opengeni_private.session_file_attachments') IS NOT NULL THEN
|
|
5330
|
+
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.session_file_attachments, opengeni_private.session_file_read_capabilities FROM %I', ${literal(role)});
|
|
5331
|
+
REVOKE ALL ON TABLE opengeni_private.session_file_attachments, opengeni_private.session_file_read_capabilities FROM PUBLIC;
|
|
5332
|
+
REVOKE ALL ON FUNCTION opengeni_private.session_file_read_allowed(uuid,uuid,uuid), opengeni_private.accept_session_file_attachments(uuid,uuid,uuid,uuid,text,uuid[]), opengeni_private.read_session_file_attachments(uuid,uuid,uuid,integer,uuid[],jsonb) FROM PUBLIC;
|
|
5333
|
+
END IF;
|
|
5191
5334
|
IF to_regclass('opengeni_private.sandbox_file_publications') IS NOT NULL THEN
|
|
5192
5335
|
EXECUTE format('REVOKE ALL ON TABLE opengeni_private.sandbox_file_publications FROM %I', ${literal(role)});
|
|
5193
5336
|
REVOKE ALL ON TABLE opengeni_private.sandbox_file_publications FROM PUBLIC;
|
|
@@ -5195,6 +5338,9 @@ BEGIN
|
|
|
5195
5338
|
REVOKE ALL ON FUNCTION opengeni_private.list_sandbox_file_publications(uuid,uuid,jsonb) FROM PUBLIC;
|
|
5196
5339
|
END IF;
|
|
5197
5340
|
FOREACH routine_signature IN ARRAY ARRAY[
|
|
5341
|
+
'read_sender_connection(uuid,uuid,uuid,text)',
|
|
5342
|
+
'validate_mcp_account_bindings(jsonb,jsonb)',
|
|
5343
|
+
'fence_mcp_account_bindings()',
|
|
5198
5344
|
'guard_mcp_operation_immutable()',
|
|
5199
5345
|
'mcp_operation_command_scoped(jsonb,text,jsonb)',
|
|
5200
5346
|
'guard_workspace_owned_skill_head_delete()',
|
|
@@ -5427,10 +5573,11 @@ export {
|
|
|
5427
5573
|
RUNTIME_TABLE_PRIVILEGES,
|
|
5428
5574
|
RUNTIME_DML_TABLES,
|
|
5429
5575
|
RuntimeDatabasePostureError,
|
|
5576
|
+
isRetryableRuntimeDatabaseStartupError,
|
|
5430
5577
|
inspectRuntimeDatabasePosture,
|
|
5431
5578
|
evaluateRuntimeDatabasePosture,
|
|
5432
5579
|
assertRuntimeDatabasePosture,
|
|
5433
5580
|
runtimeDatabaseReadyCheck,
|
|
5434
5581
|
provisionRoles
|
|
5435
5582
|
};
|
|
5436
|
-
//# sourceMappingURL=chunk-
|
|
5583
|
+
//# sourceMappingURL=chunk-XIXVVBW2.js.map
|