@opengeni/db 0.31.1 → 0.36.1

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.
Files changed (125) hide show
  1. package/dist/browser-auth.d.ts +209 -1
  2. package/dist/browser-downloads.d.ts +51 -0
  3. package/dist/browser-identities.d.ts +11 -2
  4. package/dist/browser-sessions.d.ts +83 -1
  5. package/dist/browser-state-artifacts.d.ts +75 -1
  6. package/dist/canonical-human-identities.d.ts +48 -0
  7. package/dist/canonical-human-identities.js +28 -0
  8. package/dist/canonical-human-identities.js.map +1 -0
  9. package/dist/capability-integrations.d.ts +8 -6
  10. package/dist/{chunk-MWDVXQOL.js → chunk-5KTIEDX7.js} +5773 -4212
  11. package/dist/chunk-5KTIEDX7.js.map +1 -0
  12. package/dist/chunk-FPVAD4CO.js +117 -0
  13. package/dist/chunk-FPVAD4CO.js.map +1 -0
  14. package/dist/chunk-GYO7ED2Q.js +259 -0
  15. package/dist/chunk-GYO7ED2Q.js.map +1 -0
  16. package/dist/{chunk-F5FT7BEZ.js → chunk-HSOWSYOX.js} +2 -2
  17. package/dist/{chunk-YHZXQ7HP.js → chunk-VKLB2ZGI.js} +446 -19
  18. package/dist/chunk-VKLB2ZGI.js.map +1 -0
  19. package/dist/{chunk-NBE6CHRI.js → chunk-VTPRIXKG.js} +49 -9
  20. package/dist/chunk-VTPRIXKG.js.map +1 -0
  21. package/dist/{chunk-ISI2TIUG.js → chunk-Z7VYMNPZ.js} +76 -4
  22. package/dist/chunk-Z7VYMNPZ.js.map +1 -0
  23. package/dist/database.d.ts +5 -0
  24. package/dist/editable-artifact-durable-export.js +2 -2
  25. package/dist/editable-artifacts.js +3 -3
  26. package/dist/index.d.ts +467 -29
  27. package/dist/index.js +23247 -16232
  28. package/dist/index.js.map +1 -1
  29. package/dist/insights.d.ts +23 -7
  30. package/dist/integration-bindings.d.ts +24 -24
  31. package/dist/integration-facets.d.ts +99 -0
  32. package/dist/interaction-revisions.d.ts +11 -0
  33. package/dist/interaction-schema.d.ts +698 -34
  34. package/dist/persistence-errors.d.ts +8 -0
  35. package/dist/provision-roles.js +1 -1
  36. package/dist/runtime-posture.d.ts +8 -7
  37. package/dist/schema.d.ts +9464 -5412
  38. package/dist/schema.js +51 -9
  39. package/dist/session-control.d.ts +29 -3
  40. package/dist/session-tenancy.d.ts +44 -0
  41. package/dist/session-tenancy.js +16 -0
  42. package/dist/session-tenancy.js.map +1 -0
  43. package/dist/slack-task-policy-schema.d.ts +847 -0
  44. package/dist/slack-task-policy.d.ts +65 -0
  45. package/dist/task-notes-schema.d.ts +924 -0
  46. package/dist/task-notes.d.ts +85 -0
  47. package/dist/video-generation.d.ts +9 -0
  48. package/dist/video-generation.js +5 -3
  49. package/dist/xai-subscription.d.ts +326 -0
  50. package/drizzle/0212_browser_state_transfer_hardening.sql +560 -0
  51. package/drizzle/0213_browser_interaction_authority.sql +67 -0
  52. package/drizzle/0214_browser_download_saves.sql +34 -0
  53. package/drizzle/0215_browser_controller_host.sql +385 -0
  54. package/drizzle/0216_browser_auth_health_evidence.sql +137 -0
  55. package/drizzle/0217_external_browser_auth_operations.sql +22 -0
  56. package/drizzle/0218_organization_tenancy_foundation.sql +299 -0
  57. package/drizzle/0219_organization_tenancy_managed_human_provisioning.sql +317 -0
  58. package/drizzle/0219_site_auth_maintenance_sessions.sql +234 -0
  59. package/drizzle/0220_memory_slack_append_only_cascade.sql +38 -0
  60. package/drizzle/0220_session_channels.sql +54 -0
  61. package/drizzle/0221_sessions_channel_index.sql +5 -0
  62. package/drizzle/0222_session_visibility_authority_epochs.sql +158 -0
  63. package/drizzle/0222_sessions_channel_fk.sql +89 -0
  64. package/drizzle/0223_pending_tool_event_output.sql +55 -0
  65. package/drizzle/0223_sessions_channel_fk_validate.sql +118 -0
  66. package/drizzle/0224_slack_post_outcome_reconciliation.sql +123 -0
  67. package/drizzle/0225_session_visibility_fork_activation.sql +1363 -0
  68. package/drizzle/0226_personal_codex_authority_foundation.sql +365 -0
  69. package/drizzle/0227_slack_native_actions.sql +145 -0
  70. package/drizzle/0228_interaction_controller_data_plane.sql +14 -0
  71. package/drizzle/0228_slack_task_policy.sql +400 -0
  72. package/drizzle/0229_slack_inbox_file_fact.sql +10 -0
  73. package/drizzle/0230_user_scoped_variable_sets_rigs.sql +84 -0
  74. package/drizzle/0231_integration_definition_identity_cutover.sql +271 -0
  75. package/drizzle/0232_integration_facet_authority_cutover.sql +610 -0
  76. package/drizzle/0233_skill_and_integration_authority_cutover.sql +1162 -0
  77. package/drizzle/0234_xai_subscription_authority.sql +1139 -0
  78. package/drizzle/0235_canonical_human_login_bindings.sql +920 -0
  79. package/drizzle/0236_browser_identity_lifecycle.sql +39 -0
  80. package/drizzle/0236_session_visibility_slack_policy.sql +72 -0
  81. package/drizzle/0237_interaction_transition_reaper.sql +263 -0
  82. package/drizzle/0238_goal_persistence_policy.sql +471 -0
  83. package/drizzle/0238_recover_unclaimed_session_turns.sql +307 -0
  84. package/drizzle/0238_supergrok_realtime_model.sql +29 -0
  85. package/drizzle/0239_supergrok_video_funding.sql +50 -0
  86. package/drizzle/0239_task_tree_notes.sql +990 -0
  87. package/package.json +13 -5
  88. package/src/browser-auth.ts +2600 -123
  89. package/src/browser-downloads.ts +517 -0
  90. package/src/browser-identities.ts +220 -3
  91. package/src/browser-sessions.ts +334 -45
  92. package/src/browser-state-artifacts.ts +402 -12
  93. package/src/canonical-human-identities.ts +317 -0
  94. package/src/capability-integrations.ts +121 -213
  95. package/src/database.ts +41 -1
  96. package/src/index.ts +4625 -411
  97. package/src/insights.ts +109 -28
  98. package/src/integration-bindings.ts +101 -101
  99. package/src/{integration-features.ts → integration-facets.ts} +187 -184
  100. package/src/interaction-revisions.ts +33 -3
  101. package/src/interaction-schema.ts +311 -8
  102. package/src/pack-components.ts +43 -43
  103. package/src/pack-installations.ts +0 -43
  104. package/src/persistence-errors.ts +60 -1
  105. package/src/plugin-packages.ts +9 -9
  106. package/src/provision-roles.ts +232 -0
  107. package/src/runtime-posture.ts +227 -14
  108. package/src/schema.ts +1188 -75
  109. package/src/session-control.ts +122 -37
  110. package/src/session-queue-commands.ts +78 -1
  111. package/src/session-tenancy.ts +188 -0
  112. package/src/session-tool-call-settlement.ts +9 -3
  113. package/src/slack-task-policy-schema.ts +130 -0
  114. package/src/slack-task-policy.ts +341 -0
  115. package/src/task-notes-schema.ts +135 -0
  116. package/src/task-notes.ts +178 -0
  117. package/src/video-generation.ts +90 -12
  118. package/src/workspace-artifacts.ts +1 -1
  119. package/src/xai-subscription.ts +1887 -0
  120. package/dist/chunk-ISI2TIUG.js.map +0 -1
  121. package/dist/chunk-MWDVXQOL.js.map +0 -1
  122. package/dist/chunk-NBE6CHRI.js.map +0 -1
  123. package/dist/chunk-YHZXQ7HP.js.map +0 -1
  124. package/dist/integration-features.d.ts +0 -99
  125. /package/dist/{chunk-F5FT7BEZ.js.map → chunk-HSOWSYOX.js.map} +0 -0
@@ -0,0 +1,307 @@
1
+ -- deployment-mode: rolling
2
+ -- A turn activity could previously exhaust a transient attempt-claim failure,
3
+ -- leave durable work with no active attempt, and then let its Temporal workflow
4
+ -- complete. This includes queued/recovering turns, a resumed approval, a
5
+ -- released capacity wait, manual compaction, and pending internal updates. Seed
6
+ -- one delayed durable wake for those exact admitted rows; current workflows may
7
+ -- consume it as an idempotent hint, while closed workflows are restarted by the
8
+ -- ordinary outbox dispatcher. A normal queued turn with an undelivered wake is
9
+ -- healthy and must remain untouched.
10
+
11
+ SET LOCAL lock_timeout = '5s';
12
+ SET LOCAL statement_timeout = '10min';
13
+
14
+ WITH RECURSIVE candidates AS MATERIALIZED (
15
+ SELECT
16
+ session_row.id AS session_id,
17
+ session_row.account_id,
18
+ session_row.workspace_id,
19
+ coalesce(
20
+ session_row.temporal_workflow_id,
21
+ 'session-' || session_row.id::text
22
+ ) AS temporal_workflow_id
23
+ FROM sessions session_row
24
+ WHERE session_row.status NOT IN ('failed', 'cancelled')
25
+ AND NOT EXISTS (
26
+ SELECT 1
27
+ FROM session_turn_attempts live_attempt
28
+ WHERE live_attempt.workspace_id = session_row.workspace_id
29
+ AND live_attempt.session_id = session_row.id
30
+ AND live_attempt.state IN ('claimed', 'running')
31
+ )
32
+ AND (
33
+ (
34
+ session_row.status = 'recovering'
35
+ AND EXISTS (
36
+ SELECT 1
37
+ FROM session_turns turn_row
38
+ WHERE turn_row.workspace_id = session_row.workspace_id
39
+ AND turn_row.session_id = session_row.id
40
+ AND turn_row.id = session_row.active_turn_id
41
+ AND turn_row.status = 'recovering'
42
+ AND turn_row.active_attempt_id IS NULL
43
+ )
44
+ )
45
+ OR (
46
+ EXISTS (
47
+ SELECT 1
48
+ FROM session_workflow_wake_outbox wake_row
49
+ WHERE wake_row.session_id = session_row.id
50
+ AND wake_row.wake_revision > 0
51
+ AND wake_row.wake_revision = wake_row.delivered_revision
52
+ )
53
+ AND (
54
+ (
55
+ session_row.status = 'queued'
56
+ AND session_row.active_turn_id IS NULL
57
+ AND EXISTS (
58
+ SELECT 1
59
+ FROM session_turns turn_row
60
+ WHERE turn_row.workspace_id = session_row.workspace_id
61
+ AND turn_row.session_id = session_row.id
62
+ AND turn_row.status = 'queued'
63
+ AND turn_row.source IN ('user', 'api')
64
+ AND turn_row.active_attempt_id IS NULL
65
+ )
66
+ )
67
+ OR (
68
+ session_row.status = 'waiting_capacity'
69
+ AND EXISTS (
70
+ SELECT 1
71
+ FROM session_turns turn_row
72
+ WHERE turn_row.workspace_id = session_row.workspace_id
73
+ AND turn_row.session_id = session_row.id
74
+ AND turn_row.id = session_row.active_turn_id
75
+ AND turn_row.status = 'waiting_capacity'
76
+ AND turn_row.active_attempt_id IS NULL
77
+ )
78
+ AND NOT EXISTS (
79
+ SELECT 1
80
+ FROM codex_capacity_waiters waiter
81
+ WHERE waiter.workspace_id = session_row.workspace_id
82
+ AND waiter.session_id = session_row.id
83
+ AND waiter.status = 'waiting'
84
+ )
85
+ AND NOT EXISTS (
86
+ SELECT 1
87
+ FROM xai_capacity_waiters waiter
88
+ WHERE waiter.workspace_id = session_row.workspace_id
89
+ AND waiter.session_id = session_row.id
90
+ AND waiter.status = 'waiting'
91
+ )
92
+ )
93
+ OR (
94
+ session_row.status = 'requires_action'
95
+ AND EXISTS (
96
+ SELECT 1
97
+ FROM session_turns turn_row
98
+ JOIN session_events trigger_event
99
+ ON trigger_event.workspace_id = turn_row.workspace_id
100
+ AND trigger_event.session_id = turn_row.session_id
101
+ AND trigger_event.id = turn_row.trigger_event_id
102
+ WHERE turn_row.workspace_id = session_row.workspace_id
103
+ AND turn_row.session_id = session_row.id
104
+ AND turn_row.id = session_row.active_turn_id
105
+ AND turn_row.status = 'requires_action'
106
+ AND turn_row.active_attempt_id IS NULL
107
+ AND EXISTS (
108
+ SELECT 1
109
+ FROM session_events response_event
110
+ WHERE response_event.workspace_id = session_row.workspace_id
111
+ AND response_event.session_id = session_row.id
112
+ AND response_event.type IN (
113
+ 'user.approvalDecision',
114
+ 'user.humanInputResponse'
115
+ )
116
+ AND response_event.sequence > trigger_event.sequence
117
+ )
118
+ )
119
+ )
120
+ OR (
121
+ session_row.active_turn_id IS NULL
122
+ AND session_row.status IN ('queued', 'idle')
123
+ AND session_row.compact_requested
124
+ )
125
+ OR (
126
+ session_row.active_turn_id IS NULL
127
+ AND session_row.status IN ('queued', 'idle')
128
+ AND EXISTS (
129
+ SELECT 1
130
+ FROM session_system_updates update_row
131
+ WHERE update_row.workspace_id = session_row.workspace_id
132
+ AND update_row.session_id = session_row.id
133
+ AND update_row.state = 'pending'
134
+ )
135
+ AND (
136
+ EXISTS (
137
+ SELECT 1
138
+ FROM session_system_updates update_row
139
+ WHERE update_row.workspace_id = session_row.workspace_id
140
+ AND update_row.session_id = session_row.id
141
+ AND update_row.state = 'pending'
142
+ AND update_row.kind = 'agent_steer_instruction'
143
+ )
144
+ OR NOT EXISTS (
145
+ SELECT 1
146
+ FROM session_turns failed_turn
147
+ JOIN session_events failure_event
148
+ ON failure_event.workspace_id = failed_turn.workspace_id
149
+ AND failure_event.session_id = failed_turn.session_id
150
+ AND failure_event.turn_id = failed_turn.id
151
+ AND failure_event.type = 'turn.failed'
152
+ AND failure_event.payload ->> 'code' = 'context_compaction_failed'
153
+ WHERE failed_turn.workspace_id = session_row.workspace_id
154
+ AND failed_turn.session_id = session_row.id
155
+ AND failed_turn.finished_at IS NOT NULL
156
+ AND failed_turn.id = (
157
+ SELECT latest_turn.id
158
+ FROM session_turns latest_turn
159
+ WHERE latest_turn.workspace_id = session_row.workspace_id
160
+ AND latest_turn.session_id = session_row.id
161
+ AND latest_turn.finished_at IS NOT NULL
162
+ ORDER BY
163
+ latest_turn.position DESC,
164
+ latest_turn.created_at DESC
165
+ LIMIT 1
166
+ )
167
+ )
168
+ )
169
+ )
170
+ )
171
+ )
172
+ )
173
+ ), ancestry AS (
174
+ SELECT
175
+ candidate.session_id AS candidate_session_id,
176
+ session_row.workspace_id,
177
+ session_row.id AS session_id,
178
+ session_row.parent_session_id,
179
+ session_row.direct_control_state,
180
+ session_row.direct_pause_revision,
181
+ session_row.subtree_run_override_revision,
182
+ 0::integer AS depth,
183
+ ARRAY[session_row.id]::uuid[] AS path,
184
+ false AS cycle
185
+ FROM candidates candidate
186
+ JOIN sessions session_row
187
+ ON session_row.workspace_id = candidate.workspace_id
188
+ AND session_row.id = candidate.session_id
189
+ UNION ALL
190
+ SELECT
191
+ child.candidate_session_id,
192
+ parent.workspace_id,
193
+ parent.id,
194
+ parent.parent_session_id,
195
+ parent.direct_control_state,
196
+ parent.direct_pause_revision,
197
+ parent.subtree_run_override_revision,
198
+ child.depth + 1,
199
+ child.path || parent.id,
200
+ parent.id = ANY(child.path)
201
+ FROM ancestry child
202
+ JOIN sessions parent
203
+ ON parent.workspace_id = child.workspace_id
204
+ AND parent.id = child.parent_session_id
205
+ WHERE child.parent_session_id IS NOT NULL
206
+ AND NOT child.cycle
207
+ AND child.depth < 10000
208
+ ), orphaned AS (
209
+ SELECT candidate.*
210
+ FROM candidates candidate
211
+ JOIN workspace_inference_controls control_row
212
+ ON control_row.workspace_id = candidate.workspace_id
213
+ WHERE EXISTS (
214
+ SELECT 1
215
+ FROM ancestry root
216
+ WHERE root.candidate_session_id = candidate.session_id
217
+ AND root.parent_session_id IS NULL
218
+ AND NOT root.cycle
219
+ )
220
+ AND NOT EXISTS (
221
+ SELECT 1
222
+ FROM ancestry invalid
223
+ WHERE invalid.candidate_session_id = candidate.session_id
224
+ AND invalid.cycle
225
+ )
226
+ AND NOT EXISTS (
227
+ SELECT 1
228
+ FROM ancestry pause
229
+ WHERE pause.candidate_session_id = candidate.session_id
230
+ AND pause.direct_control_state = 'paused'
231
+ AND NOT EXISTS (
232
+ SELECT 1
233
+ FROM ancestry override_row
234
+ WHERE override_row.candidate_session_id = candidate.session_id
235
+ AND override_row.depth < pause.depth
236
+ AND override_row.subtree_run_override_revision > pause.direct_pause_revision
237
+ )
238
+ )
239
+ AND (
240
+ control_row.workspace_state = 'active'
241
+ OR (
242
+ control_row.workspace_state = 'paused'
243
+ AND EXISTS (
244
+ SELECT 1
245
+ FROM ancestry override_row
246
+ WHERE override_row.candidate_session_id = candidate.session_id
247
+ AND override_row.subtree_run_override_revision
248
+ > control_row.workspace_pause_revision
249
+ )
250
+ )
251
+ )
252
+ ), seeded AS (
253
+ INSERT INTO session_workflow_wake_outbox (
254
+ session_id,
255
+ account_id,
256
+ workspace_id,
257
+ temporal_workflow_id,
258
+ reason,
259
+ next_attempt_at
260
+ )
261
+ SELECT
262
+ orphaned.session_id,
263
+ orphaned.account_id,
264
+ orphaned.workspace_id,
265
+ orphaned.temporal_workflow_id,
266
+ 'unclaimed_attempt_recovery_cutover',
267
+ now() + interval '60 seconds'
268
+ FROM orphaned
269
+ ON CONFLICT (session_id) DO UPDATE SET
270
+ wake_revision = session_workflow_wake_outbox.wake_revision + 1,
271
+ temporal_workflow_id = excluded.temporal_workflow_id,
272
+ reason = excluded.reason,
273
+ attempts = 0,
274
+ next_attempt_at = CASE
275
+ WHEN session_workflow_wake_outbox.wake_revision
276
+ > session_workflow_wake_outbox.delivered_revision
277
+ THEN least(
278
+ session_workflow_wake_outbox.next_attempt_at,
279
+ excluded.next_attempt_at
280
+ )
281
+ ELSE excluded.next_attempt_at
282
+ END,
283
+ last_error = NULL,
284
+ updated_at = now()
285
+ RETURNING account_id, workspace_id, session_id, wake_revision, reason
286
+ )
287
+ INSERT INTO audit_events (
288
+ account_id,
289
+ workspace_id,
290
+ subject_id,
291
+ action,
292
+ target_type,
293
+ target_id,
294
+ metadata
295
+ )
296
+ SELECT
297
+ seeded.account_id,
298
+ seeded.workspace_id,
299
+ 'session-recovery-migration',
300
+ 'session.workflow.unclaimed_attempt_wake_seeded',
301
+ 'session',
302
+ seeded.session_id::text,
303
+ jsonb_build_object(
304
+ 'wakeRevision', seeded.wake_revision,
305
+ 'reason', seeded.reason
306
+ )
307
+ FROM seeded;
@@ -0,0 +1,29 @@
1
+ -- deployment-mode: rolling
2
+ -- Admit direct connected-SuperGrok voice alongside Gateway and Codex Live.
3
+
4
+ SET lock_timeout = '5s';
5
+ SET statement_timeout = '10min';
6
+
7
+ ALTER TABLE "session_realtime_modes"
8
+ DROP CONSTRAINT "session_realtime_modes_model_check";
9
+
10
+ ALTER TABLE "session_realtime_modes"
11
+ ADD CONSTRAINT "session_realtime_modes_model_check"
12
+ CHECK (
13
+ "model" IN (
14
+ 'gpt-live-1-boulder-alpha',
15
+ 'supergrok/grok-voice-think-fast-2.0',
16
+ 'opengeni-gateway/openai/gpt-realtime-2.1',
17
+ 'opengeni-gateway/openai/gpt-realtime-mini',
18
+ 'opengeni-gateway/xai/grok-voice-think-fast-2.0',
19
+ 'workspace-gateway/openai/gpt-realtime-2.1',
20
+ 'workspace-gateway/openai/gpt-realtime-mini',
21
+ 'workspace-gateway/xai/grok-voice-think-fast-2.0'
22
+ )
23
+ ) NOT VALID;
24
+
25
+ ALTER TABLE "session_realtime_modes"
26
+ VALIDATE CONSTRAINT "session_realtime_modes_model_check";
27
+
28
+ RESET statement_timeout;
29
+ RESET lock_timeout;
@@ -0,0 +1,50 @@
1
+ -- deployment-mode: rolling
2
+ -- Add connected SuperGrok as a zero-credit, credential-frozen video route.
3
+
4
+ SET lock_timeout = '5s';
5
+ SET statement_timeout = '10min';
6
+
7
+ ALTER TABLE "workspace_video_generation_policies"
8
+ DROP CONSTRAINT "workspace_video_generation_policies_funding_source_chk";
9
+ ALTER TABLE "workspace_video_generation_policies"
10
+ ADD CONSTRAINT "workspace_video_generation_policies_funding_source_chk"
11
+ CHECK ("funding_source" IN ('opengeni_credits', 'workspace_gateway', 'supergrok_subscription'))
12
+ NOT VALID;
13
+
14
+ ALTER TABLE "video_generation_operations"
15
+ DROP CONSTRAINT "video_generation_operations_funding_state_chk",
16
+ DROP CONSTRAINT "video_generation_operations_funding_values_chk";
17
+ ALTER TABLE "video_generation_operations"
18
+ ADD CONSTRAINT "video_generation_operations_funding_state_chk" CHECK (
19
+ ("funding_source" = 'workspace_gateway'
20
+ AND "connection_id" IS NOT NULL
21
+ AND "priced_cost_micros" = 0
22
+ AND "credit_state" = 'not_applicable')
23
+ OR ("funding_source" = 'opengeni_credits'
24
+ AND "connection_id" IS NULL
25
+ AND (("priced_cost_micros" = 0 AND "credit_state" = 'not_applicable')
26
+ OR ("priced_cost_micros" > 0
27
+ AND ((("status" IN ('provider_failed','cancelled_before_submit','outcome_unknown','retention_failed'))
28
+ AND "credit_state" = 'refunded')
29
+ OR (("status" NOT IN ('provider_failed','cancelled_before_submit','outcome_unknown','retention_failed'))
30
+ AND "credit_state" = 'debited')))))
31
+ OR ("funding_source" = 'supergrok_subscription'
32
+ AND "connection_id" IS NULL
33
+ AND "priced_cost_micros" = 0
34
+ AND "credit_state" = 'not_applicable')
35
+ ) NOT VALID,
36
+ ADD CONSTRAINT "video_generation_operations_funding_values_chk" CHECK (
37
+ "funding_source" IN ('opengeni_credits', 'workspace_gateway', 'supergrok_subscription')
38
+ AND "priced_cost_micros" BETWEEN 0 AND 1000000000
39
+ AND "credit_state" IN ('not_applicable', 'debited', 'refunded')
40
+ ) NOT VALID;
41
+
42
+ ALTER TABLE "workspace_video_generation_policies"
43
+ VALIDATE CONSTRAINT "workspace_video_generation_policies_funding_source_chk";
44
+ ALTER TABLE "video_generation_operations"
45
+ VALIDATE CONSTRAINT "video_generation_operations_funding_state_chk";
46
+ ALTER TABLE "video_generation_operations"
47
+ VALIDATE CONSTRAINT "video_generation_operations_funding_values_chk";
48
+
49
+ RESET statement_timeout;
50
+ RESET lock_timeout;