@tickernelz/wardmote-db 0.0.0 → 2026.1108.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 (1478) hide show
  1. package/dist/adapter-auth-sessions-schema.test.d.ts +2 -0
  2. package/dist/adapter-auth-sessions-schema.test.d.ts.map +1 -0
  3. package/dist/adapter-auth-sessions-schema.test.js +112 -0
  4. package/dist/adapter-auth-sessions-schema.test.js.map +1 -0
  5. package/dist/agent-chat-migration.test.d.ts +2 -0
  6. package/dist/agent-chat-migration.test.d.ts.map +1 -0
  7. package/dist/agent-chat-migration.test.js +111 -0
  8. package/dist/agent-chat-migration.test.js.map +1 -0
  9. package/dist/agent-instruction-migration.test.d.ts +2 -0
  10. package/dist/agent-instruction-migration.test.d.ts.map +1 -0
  11. package/dist/agent-instruction-migration.test.js +141 -0
  12. package/dist/agent-instruction-migration.test.js.map +1 -0
  13. package/dist/agent-wakeup-requests-schema.test.d.ts +2 -0
  14. package/dist/agent-wakeup-requests-schema.test.d.ts.map +1 -0
  15. package/dist/agent-wakeup-requests-schema.test.js +24 -0
  16. package/dist/agent-wakeup-requests-schema.test.js.map +1 -0
  17. package/dist/backup-lib.d.ts +44 -0
  18. package/dist/backup-lib.d.ts.map +1 -0
  19. package/dist/backup-lib.js +958 -0
  20. package/dist/backup-lib.js.map +1 -0
  21. package/dist/backup-lib.test.d.ts +2 -0
  22. package/dist/backup-lib.test.d.ts.map +1 -0
  23. package/dist/backup-lib.test.js +564 -0
  24. package/dist/backup-lib.test.js.map +1 -0
  25. package/dist/backup.d.ts +2 -0
  26. package/dist/backup.d.ts.map +1 -0
  27. package/dist/backup.js +77 -0
  28. package/dist/backup.js.map +1 -0
  29. package/dist/better-auth-account-issuer-migration.test.d.ts +9 -0
  30. package/dist/better-auth-account-issuer-migration.test.d.ts.map +1 -0
  31. package/dist/better-auth-account-issuer-migration.test.js +113 -0
  32. package/dist/better-auth-account-issuer-migration.test.js.map +1 -0
  33. package/dist/built-in-agent-unique-marker-migration.test.d.ts +2 -0
  34. package/dist/built-in-agent-unique-marker-migration.test.d.ts.map +1 -0
  35. package/dist/built-in-agent-unique-marker-migration.test.js +102 -0
  36. package/dist/built-in-agent-unique-marker-migration.test.js.map +1 -0
  37. package/dist/chat-github-migration.test.d.ts +2 -0
  38. package/dist/chat-github-migration.test.d.ts.map +1 -0
  39. package/dist/chat-github-migration.test.js +34 -0
  40. package/dist/chat-github-migration.test.js.map +1 -0
  41. package/dist/chat-identity-migration-reconciliation.test.d.ts +2 -0
  42. package/dist/chat-identity-migration-reconciliation.test.d.ts.map +1 -0
  43. package/dist/chat-identity-migration-reconciliation.test.js +531 -0
  44. package/dist/chat-identity-migration-reconciliation.test.js.map +1 -0
  45. package/dist/chat-openwa-migration.test.d.ts +2 -0
  46. package/dist/chat-openwa-migration.test.d.ts.map +1 -0
  47. package/dist/chat-openwa-migration.test.js +126 -0
  48. package/dist/chat-openwa-migration.test.js.map +1 -0
  49. package/dist/chat-telegram-draft-ids-migration.test.d.ts +2 -0
  50. package/dist/chat-telegram-draft-ids-migration.test.d.ts.map +1 -0
  51. package/dist/chat-telegram-draft-ids-migration.test.js +71 -0
  52. package/dist/chat-telegram-draft-ids-migration.test.js.map +1 -0
  53. package/dist/chat-tenant-foreign-keys.test.d.ts +2 -0
  54. package/dist/chat-tenant-foreign-keys.test.d.ts.map +1 -0
  55. package/dist/chat-tenant-foreign-keys.test.js +140 -0
  56. package/dist/chat-tenant-foreign-keys.test.js.map +1 -0
  57. package/dist/check-migration-numbering.d.ts +2 -0
  58. package/dist/check-migration-numbering.d.ts.map +1 -0
  59. package/dist/check-migration-numbering.js +64 -0
  60. package/dist/check-migration-numbering.js.map +1 -0
  61. package/dist/check-migration-safety.d.ts +27 -0
  62. package/dist/check-migration-safety.d.ts.map +1 -0
  63. package/dist/check-migration-safety.js +811 -0
  64. package/dist/check-migration-safety.js.map +1 -0
  65. package/dist/check-migration-safety.test.d.ts +2 -0
  66. package/dist/check-migration-safety.test.d.ts.map +1 -0
  67. package/dist/check-migration-safety.test.js +391 -0
  68. package/dist/check-migration-safety.test.js.map +1 -0
  69. package/dist/client-disconnect-replay.test.d.ts +2 -0
  70. package/dist/client-disconnect-replay.test.d.ts.map +1 -0
  71. package/dist/client-disconnect-replay.test.js +182 -0
  72. package/dist/client-disconnect-replay.test.js.map +1 -0
  73. package/dist/client-options.test.d.ts +2 -0
  74. package/dist/client-options.test.d.ts.map +1 -0
  75. package/dist/client-options.test.js +88 -0
  76. package/dist/client-options.test.js.map +1 -0
  77. package/dist/client-teardown-registry.test.d.ts +2 -0
  78. package/dist/client-teardown-registry.test.d.ts.map +1 -0
  79. package/dist/client-teardown-registry.test.js +100 -0
  80. package/dist/client-teardown-registry.test.js.map +1 -0
  81. package/dist/client.d.ts +112 -0
  82. package/dist/client.d.ts.map +1 -0
  83. package/dist/client.js +942 -0
  84. package/dist/client.js.map +1 -0
  85. package/dist/client.test.d.ts +2 -0
  86. package/dist/client.test.d.ts.map +1 -0
  87. package/dist/client.test.js +1792 -0
  88. package/dist/client.test.js.map +1 -0
  89. package/dist/company-secret-proposals-migration.test.d.ts +2 -0
  90. package/dist/company-secret-proposals-migration.test.d.ts.map +1 -0
  91. package/dist/company-secret-proposals-migration.test.js +40 -0
  92. package/dist/company-secret-proposals-migration.test.js.map +1 -0
  93. package/dist/connection-grants-phase2-migration.test.d.ts +2 -0
  94. package/dist/connection-grants-phase2-migration.test.d.ts.map +1 -0
  95. package/dist/connection-grants-phase2-migration.test.js +30 -0
  96. package/dist/connection-grants-phase2-migration.test.js.map +1 -0
  97. package/dist/connection-grants-phase4-migration.test.d.ts +2 -0
  98. package/dist/connection-grants-phase4-migration.test.d.ts.map +1 -0
  99. package/dist/connection-grants-phase4-migration.test.js +300 -0
  100. package/dist/connection-grants-phase4-migration.test.js.map +1 -0
  101. package/dist/connections-v3-schema-core-migration.test.d.ts +2 -0
  102. package/dist/connections-v3-schema-core-migration.test.d.ts.map +1 -0
  103. package/dist/connections-v3-schema-core-migration.test.js +114 -0
  104. package/dist/connections-v3-schema-core-migration.test.js.map +1 -0
  105. package/dist/decision-queue-migrations.test.d.ts +2 -0
  106. package/dist/decision-queue-migrations.test.d.ts.map +1 -0
  107. package/dist/decision-queue-migrations.test.js +78 -0
  108. package/dist/decision-queue-migrations.test.js.map +1 -0
  109. package/dist/embedded-postgres-error.d.ts +9 -0
  110. package/dist/embedded-postgres-error.d.ts.map +1 -0
  111. package/dist/embedded-postgres-error.js +73 -0
  112. package/dist/embedded-postgres-error.js.map +1 -0
  113. package/dist/embedded-postgres-error.test.d.ts +2 -0
  114. package/dist/embedded-postgres-error.test.d.ts.map +1 -0
  115. package/dist/embedded-postgres-error.test.js +25 -0
  116. package/dist/embedded-postgres-error.test.js.map +1 -0
  117. package/dist/embedded-postgres-lifecycle.d.ts +16 -0
  118. package/dist/embedded-postgres-lifecycle.d.ts.map +1 -0
  119. package/dist/embedded-postgres-lifecycle.js +43 -0
  120. package/dist/embedded-postgres-lifecycle.js.map +1 -0
  121. package/dist/embedded-postgres-lifecycle.test.d.ts +2 -0
  122. package/dist/embedded-postgres-lifecycle.test.d.ts.map +1 -0
  123. package/dist/embedded-postgres-lifecycle.test.js +64 -0
  124. package/dist/embedded-postgres-lifecycle.test.js.map +1 -0
  125. package/dist/embedded-postgres-native.d.ts +3 -0
  126. package/dist/embedded-postgres-native.d.ts.map +1 -0
  127. package/dist/embedded-postgres-native.js +83 -0
  128. package/dist/embedded-postgres-native.js.map +1 -0
  129. package/dist/embedded-postgres-native.test.d.ts +2 -0
  130. package/dist/embedded-postgres-native.test.d.ts.map +1 -0
  131. package/dist/embedded-postgres-native.test.js +49 -0
  132. package/dist/embedded-postgres-native.test.js.map +1 -0
  133. package/dist/environment-custom-images-schema.test.d.ts +2 -0
  134. package/dist/environment-custom-images-schema.test.d.ts.map +1 -0
  135. package/dist/environment-custom-images-schema.test.js +26 -0
  136. package/dist/environment-custom-images-schema.test.js.map +1 -0
  137. package/dist/external-objects-schema.test.d.ts +2 -0
  138. package/dist/external-objects-schema.test.d.ts.map +1 -0
  139. package/dist/external-objects-schema.test.js +46 -0
  140. package/dist/external-objects-schema.test.js.map +1 -0
  141. package/dist/heartbeat-context-snapshot-index-migration.test.d.ts +2 -0
  142. package/dist/heartbeat-context-snapshot-index-migration.test.d.ts.map +1 -0
  143. package/dist/heartbeat-context-snapshot-index-migration.test.js +60 -0
  144. package/dist/heartbeat-context-snapshot-index-migration.test.js.map +1 -0
  145. package/dist/heartbeat-run-issue-privacy-migration.test.d.ts +2 -0
  146. package/dist/heartbeat-run-issue-privacy-migration.test.d.ts.map +1 -0
  147. package/dist/heartbeat-run-issue-privacy-migration.test.js +265 -0
  148. package/dist/heartbeat-run-issue-privacy-migration.test.js.map +1 -0
  149. package/dist/inbox-archive-agent-policies-migration.test.d.ts +2 -0
  150. package/dist/inbox-archive-agent-policies-migration.test.d.ts.map +1 -0
  151. package/dist/inbox-archive-agent-policies-migration.test.js +155 -0
  152. package/dist/inbox-archive-agent-policies-migration.test.js.map +1 -0
  153. package/dist/index.d.ts +11 -0
  154. package/dist/index.d.ts.map +1 -0
  155. package/dist/index.js +11 -0
  156. package/dist/index.js.map +1 -0
  157. package/dist/issue-comment-derived-attribution-migration.test.d.ts +2 -0
  158. package/dist/issue-comment-derived-attribution-migration.test.d.ts.map +1 -0
  159. package/dist/issue-comment-derived-attribution-migration.test.js +287 -0
  160. package/dist/issue-comment-derived-attribution-migration.test.js.map +1 -0
  161. package/dist/issue-comment-on-behalf-migration.test.d.ts +2 -0
  162. package/dist/issue-comment-on-behalf-migration.test.d.ts.map +1 -0
  163. package/dist/issue-comment-on-behalf-migration.test.js +146 -0
  164. package/dist/issue-comment-on-behalf-migration.test.js.map +1 -0
  165. package/dist/issue-thread-interaction-resolver-policy-migration.test.d.ts +2 -0
  166. package/dist/issue-thread-interaction-resolver-policy-migration.test.d.ts.map +1 -0
  167. package/dist/issue-thread-interaction-resolver-policy-migration.test.js +146 -0
  168. package/dist/issue-thread-interaction-resolver-policy-migration.test.js.map +1 -0
  169. package/dist/migrate.d.ts +2 -0
  170. package/dist/migrate.d.ts.map +1 -0
  171. package/dist/migrate.js +25 -0
  172. package/dist/migrate.js.map +1 -0
  173. package/dist/migration-runtime.d.ts +7 -0
  174. package/dist/migration-runtime.d.ts.map +1 -0
  175. package/dist/migration-runtime.js +159 -0
  176. package/dist/migration-runtime.js.map +1 -0
  177. package/dist/migration-safety-baseline.d.ts +135 -0
  178. package/dist/migration-safety-baseline.d.ts.map +1 -0
  179. package/dist/migration-safety-baseline.js +150 -0
  180. package/dist/migration-safety-baseline.js.map +1 -0
  181. package/dist/migration-snapshot-drift.test.d.ts +2 -0
  182. package/dist/migration-snapshot-drift.test.d.ts.map +1 -0
  183. package/dist/migration-snapshot-drift.test.js +55 -0
  184. package/dist/migration-snapshot-drift.test.js.map +1 -0
  185. package/dist/migration-status.d.ts +2 -0
  186. package/dist/migration-status.d.ts.map +1 -0
  187. package/dist/migration-status.js +55 -0
  188. package/dist/migration-status.js.map +1 -0
  189. package/dist/migrations/0000_mature_masked_marvel.sql +208 -0
  190. package/dist/migrations/0001_fast_northstar.sql +87 -0
  191. package/dist/migrations/0002_big_zaladane.sql +1 -0
  192. package/dist/migrations/0003_shallow_quentin_quire.sql +5 -0
  193. package/dist/migrations/0004_issue_identifiers.sql +28 -0
  194. package/dist/migrations/0005_chief_luke_cage.sql +19 -0
  195. package/dist/migrations/0006_overjoyed_mister_sinister.sql +36 -0
  196. package/dist/migrations/0007_new_quentin_quire.sql +20 -0
  197. package/dist/migrations/0008_amused_zzzax.sql +1 -0
  198. package/dist/migrations/0009_fast_jackal.sql +36 -0
  199. package/dist/migrations/0010_stale_justin_hammer.sql +37 -0
  200. package/dist/migrations/0011_windy_corsair.sql +18 -0
  201. package/dist/migrations/0012_perpetual_ser_duncan.sql +2 -0
  202. package/dist/migrations/0013_dashing_wasp.sql +4 -0
  203. package/dist/migrations/0014_many_mikhail_rasputin.sql +135 -0
  204. package/dist/migrations/0015_project_color_archived.sql +2 -0
  205. package/dist/migrations/0016_agent_icon.sql +1 -0
  206. package/dist/migrations/0017_tiresome_gabe_jones.sql +51 -0
  207. package/dist/migrations/0018_flat_sleepwalker.sql +26 -0
  208. package/dist/migrations/0019_public_victor_mancha.sql +18 -0
  209. package/dist/migrations/0020_white_anita_blake.sql +1 -0
  210. package/dist/migrations/0021_chief_vindicator.sql +1 -0
  211. package/dist/migrations/0022_company_brand_color.sql +1 -0
  212. package/dist/migrations/0023_fair_lethal_legion.sql +3 -0
  213. package/dist/migrations/0024_far_beast.sql +2 -0
  214. package/dist/migrations/0025_nasty_salo.sql +15 -0
  215. package/dist/migrations/0026_lying_pete_wisdom.sql +39 -0
  216. package/dist/migrations/0027_tranquil_tenebrous.sql +2 -0
  217. package/dist/migrations/0028_harsh_goliath.sql +54 -0
  218. package/dist/migrations/0029_plugin_tables.sql +177 -0
  219. package/dist/migrations/0030_rich_magneto.sql +12 -0
  220. package/dist/migrations/0031_zippy_magma.sql +51 -0
  221. package/dist/migrations/0032_pretty_doctor_octopus.sql +102 -0
  222. package/dist/migrations/0033_shiny_black_tarantula.sql +2 -0
  223. package/dist/migrations/0034_fat_dormammu.sql +2 -0
  224. package/dist/migrations/0035_marvelous_satana.sql +91 -0
  225. package/dist/migrations/0036_cheerful_nitro.sql +9 -0
  226. package/dist/migrations/0037_friendly_eddie_brock.sql +29 -0
  227. package/dist/migrations/0038_careless_iron_monger.sql +5 -0
  228. package/dist/migrations/0039_fat_magneto.sql +161 -0
  229. package/dist/migrations/0040_eager_shotgun.sql +5 -0
  230. package/dist/migrations/0041_curly_maria_hill.sql +1 -0
  231. package/dist/migrations/0042_spotty_the_renegades.sql +26 -0
  232. package/dist/migrations/0043_reflective_captain_universe.sql +6 -0
  233. package/dist/migrations/0044_illegal_toad.sql +56 -0
  234. package/dist/migrations/0045_workable_shockwave.sql +17 -0
  235. package/dist/migrations/0046_smooth_sentinels.sql +11 -0
  236. package/dist/migrations/0047_overjoyed_groot.sql +102 -0
  237. package/dist/migrations/0048_flashy_marrow.sql +1 -0
  238. package/dist/migrations/0049_flawless_abomination.sql +21 -0
  239. package/dist/migrations/0050_stiff_luckman.sql +1 -0
  240. package/dist/migrations/0051_young_korg.sql +5 -0
  241. package/dist/migrations/0052_mushy_trauma.sql +26 -0
  242. package/dist/migrations/0053_sharp_wild_child.sql +18 -0
  243. package/dist/migrations/0054_draft_routines.sql +2 -0
  244. package/dist/migrations/0055_kind_weapon_omega.sql +1 -0
  245. package/dist/migrations/0056_spooky_ultragirl.sql +22 -0
  246. package/dist/migrations/0057_tidy_join_requests.sql +57 -0
  247. package/dist/migrations/0058_wealthy_starbolt.sql +6 -0
  248. package/dist/migrations/0059_plugin_database_namespaces.sql +41 -0
  249. package/dist/migrations/0060_orange_annihilus.sql +50 -0
  250. package/dist/migrations/0061_lively_thor_girl.sql +3 -0
  251. package/dist/migrations/0062_routine_run_dispatch_fingerprint.sql +9 -0
  252. package/dist/migrations/0063_issue_thread_interactions.sql +65 -0
  253. package/dist/migrations/0064_issue_thread_interaction_idempotency.sql +4 -0
  254. package/dist/migrations/0065_environments.sql +50 -0
  255. package/dist/migrations/0066_issue_tree_holds.sql +107 -0
  256. package/dist/migrations/0067_agent_default_environment.sql +3 -0
  257. package/dist/migrations/0068_environment_local_driver_unique.sql +2 -0
  258. package/dist/migrations/0069_liveness_recovery_dedupe.sql +13 -0
  259. package/dist/migrations/0070_active_run_output_watchdog.sql +70 -0
  260. package/dist/migrations/0071_default_hire_approval_off.sql +1 -0
  261. package/dist/migrations/0072_large_sandman.sql +6 -0
  262. package/dist/migrations/0073_shiny_salo.sql +1 -0
  263. package/dist/migrations/0074_striped_genesis.sql +4 -0
  264. package/dist/migrations/0075_cultured_sebastian_shaw.sql +7 -0
  265. package/dist/migrations/0076_useful_elektra.sql +29 -0
  266. package/dist/migrations/0077_unusual_karnak.sql +140 -0
  267. package/dist/migrations/0078_white_darwin.sql +3 -0
  268. package/dist/migrations/0079_company_search_document_indexes.sql +2 -0
  269. package/dist/migrations/0080_company_search_fuzzystrmatch.sql +1 -0
  270. package/dist/migrations/0081_optimal_dormammu.sql +1 -0
  271. package/dist/migrations/0082_dry_vision.sql +124 -0
  272. package/dist/migrations/0083_company_secret_provider_configs.sql +51 -0
  273. package/dist/migrations/0084_issue_recovery_actions.sql +64 -0
  274. package/dist/migrations/0085_tranquil_the_executioner.sql +8 -0
  275. package/dist/migrations/0086_routine_env_runtime_contract.sql +8 -0
  276. package/dist/migrations/0087_backfill_environment_manage_human_defaults.sql +29 -0
  277. package/dist/migrations/0088_backfill_principal_access_compatibility.sql +75 -0
  278. package/dist/migrations/0089_cloud_upstreams.sql +71 -0
  279. package/dist/migrations/0090_resource_memberships.sql +55 -0
  280. package/dist/migrations/0091_old_swarm.sql +189 -0
  281. package/dist/migrations/0092_mighty_puma.sql +28 -0
  282. package/dist/migrations/0093_giant_green_goblin.sql +6 -0
  283. package/dist/migrations/0094_backfill_archived_company_agent_pauses.sql +10 -0
  284. package/dist/migrations/0095_issue_comment_tombstones.sql +15 -0
  285. package/dist/migrations/0096_document_annotation_issue_comment_links.sql +7 -0
  286. package/dist/migrations/0097_low_trust_source_trust.sql +4 -0
  287. package/dist/migrations/0098_project_icon.sql +1 -0
  288. package/dist/migrations/0099_skills_store_foundation.sql +121 -0
  289. package/dist/migrations/0100_skill_install_count_backfill.sql +3 -0
  290. package/dist/migrations/0101_plugin_company_id_tenant_isolation.sql +14 -0
  291. package/dist/migrations/0102_managed_sandbox_dedup_index.sql +33 -0
  292. package/dist/migrations/0103_agent_error_reason.sql +1 -0
  293. package/dist/migrations/0104_issue_watchdogs.sql +90 -0
  294. package/dist/migrations/0105_instance_scoped_environments.sql +170 -0
  295. package/dist/migrations/0106_external_object_references.sql +106 -0
  296. package/dist/migrations/0107_external_object_display_metadata.sql +5 -0
  297. package/dist/migrations/0108_workspace_operations_issue_id.sql +41 -0
  298. package/dist/migrations/0109_routine_description_annotations.sql +170 -0
  299. package/dist/migrations/0110_document_company_cascade.sql +31 -0
  300. package/dist/migrations/0111_backfill_skill_create_human_defaults.sql +29 -0
  301. package/dist/migrations/0112_rename_skill_create_permission_key.sql +30 -0
  302. package/dist/migrations/0113_pipeline_foundation.sql +335 -0
  303. package/dist/migrations/0114_pipeline_case_issue_unlinked_event.sql +3 -0
  304. package/dist/migrations/0115_pipeline_routine_origin.sql +3 -0
  305. package/dist/migrations/0116_pipeline_upstream_drift_event.sql +3 -0
  306. package/dist/migrations/0117_pipeline_transition_forced_event.sql +3 -0
  307. package/dist/migrations/0118_pipeline_case_agent_fanout.sql +3 -0
  308. package/dist/migrations/0119_pipeline_drift_acknowledged_event.sql +3 -0
  309. package/dist/migrations/0120_pipeline_stage_working_primitives.sql +19 -0
  310. package/dist/migrations/0121_pipeline_automation_retry_effects.sql +43 -0
  311. package/dist/migrations/0122_pipeline_case_documents.sql +28 -0
  312. package/dist/migrations/0123_document_annotation_source_trust.sql +1 -0
  313. package/dist/migrations/0124_agent_api_key_scope_config.sql +1 -0
  314. package/dist/migrations/0125_environment_custom_image_templates.sql +147 -0
  315. package/dist/migrations/0127_environment_custom_images_instance_scoped.sql +106 -0
  316. package/dist/migrations/0128_user_specific_secrets.sql +178 -0
  317. package/dist/migrations/0129_agent_api_key_responsible_user.sql +41 -0
  318. package/dist/migrations/0131_repair_run_responsible_user_context_refs.sql +67 -0
  319. package/dist/migrations/0132_issue_comment_derived_attribution_fast.sql +82 -0
  320. package/dist/migrations/0133_resource_membership_stars.sql +7 -0
  321. package/dist/migrations/0134_run_responsible_user_invariant.sql +211 -0
  322. package/dist/migrations/0135_repair_run_responsible_user_updated_at_sweep.sql +84 -0
  323. package/dist/migrations/0136_acpx_default_engine_migration.sql +97 -0
  324. package/dist/migrations/0137_skill_studio_server_foundation.sql +76 -0
  325. package/dist/migrations/0138_skill_studio_run_retention.sql +5 -0
  326. package/dist/migrations/0139_skill_studio_run_templates.sql +44 -0
  327. package/dist/migrations/0140_built_in_managed_resources.sql +43 -0
  328. package/dist/migrations/0141_heartbeat_runs_company_created_at_index.sql +2 -0
  329. package/dist/migrations/0142_company_search_sort_indexes.sql +3 -0
  330. package/dist/migrations/0143_cases_foundation.sql +248 -0
  331. package/dist/migrations/0144_case_document_annotations.sql +31 -0
  332. package/dist/migrations/0145_inbox_dismissal_snooze_kind.sql +15 -0
  333. package/dist/migrations/0146_routine_activity_gate.sql +3 -0
  334. package/dist/migrations/0147_cost_event_status.sql +1 -0
  335. package/dist/migrations/0148_tool_access_mcp_connections.sql +126 -0
  336. package/dist/migrations/0149_agent_access_phase2_contracts.sql +612 -0
  337. package/dist/migrations/0150_tool_invocation_catalog_snapshots.sql +2 -0
  338. package/dist/migrations/0151_tool_gateway_sessions.sql +38 -0
  339. package/dist/migrations/0152_tool_connection_application_no_cascade.sql +18 -0
  340. package/dist/migrations/0153_tool_stdio_command_templates.sql +32 -0
  341. package/dist/migrations/0154_tool_oauth_states.sql +36 -0
  342. package/dist/migrations/0155_tool_oauth_state_actor_binding.sql +5 -0
  343. package/dist/migrations/0156_tool_oauth_state_session_binding.sql +1 -0
  344. package/dist/migrations/0157_tool_profile_new_tools_review.sql +1 -0
  345. package/dist/migrations/0158_tool_invocation_connected_mcp_metadata.sql +4 -0
  346. package/dist/migrations/0159_named_mcp_gateways.sql +72 -0
  347. package/dist/migrations/0160_mcp_gateway_contract_expansion.sql +176 -0
  348. package/dist/migrations/0161_environment_custom_image_company_scope_repair.sql +8 -0
  349. package/dist/migrations/0162_tool_runtime_metric_counters.sql +27 -0
  350. package/dist/migrations/0163_secret_binding_projection_class.sql +2 -0
  351. package/dist/migrations/0164_plugin_config_company_scope.sql +117 -0
  352. package/dist/migrations/0165_connection_token_issuances.sql +64 -0
  353. package/dist/migrations/0166_smoke_lab_results.sql +51 -0
  354. package/dist/migrations/0167_environment_custom_image_instance_scope_cleanup.sql +32 -0
  355. package/dist/migrations/0168_tool_connection_installs.sql +56 -0
  356. package/dist/migrations/0169_tool_gateway_protocol_rate_limit_counters.sql +43 -0
  357. package/dist/migrations/0170_company_skill_policies.sql +12 -0
  358. package/dist/migrations/0171_issue_create_idempotency_keys.sql +19 -0
  359. package/dist/migrations/0172_inbox_archive_agent_policies.sql +42 -0
  360. package/dist/migrations/0173_inbox_policy_agent_cleanup.sql +22 -0
  361. package/dist/migrations/0174_folders.sql +46 -0
  362. package/dist/migrations/0175_nested_skill_folders.sql +232 -0
  363. package/dist/migrations/0176_issue_create_idempotency_key_expiry.sql +2 -0
  364. package/dist/migrations/0177_activity_log_responsible_user.sql +10 -0
  365. package/dist/migrations/0178_summary_slots.sql +37 -0
  366. package/dist/migrations/0179_summary_slot_failure_reason.sql +1 -0
  367. package/dist/migrations/0180_decision_training_examples.sql +23 -0
  368. package/dist/migrations/0181_decision_training_retention_policy.sql +2 -0
  369. package/dist/migrations/0182_connections_v3_schema_core.sql +74 -0
  370. package/dist/migrations/0183_connection_user_authorization_state.sql +6 -0
  371. package/dist/migrations/0184_routable_blocked.sql +3 -0
  372. package/dist/migrations/0185_status_cards.sql +111 -0
  373. package/dist/migrations/0186_status_card_compile_provenance.sql +3 -0
  374. package/dist/migrations/0187_status_card_pending_change_hash.sql +1 -0
  375. package/dist/migrations/0188_status_card_generation_issue_index.sql +1 -0
  376. package/dist/migrations/0189_status_card_agent.sql +6 -0
  377. package/dist/migrations/0190_status_card_single_prompt.sql +2 -0
  378. package/dist/migrations/0191_status_card_mentioned_issue_ids.sql +1 -0
  379. package/dist/migrations/0192_task_watchdog_stop_snapshots.sql +2 -0
  380. package/dist/migrations/0193_document_memberships.sql +15 -0
  381. package/dist/migrations/0194_company_skill_releases.sql +4 -0
  382. package/dist/migrations/0195_built_in_agent_unique_marker.sql +53 -0
  383. package/dist/migrations/0196_drop_cloud_upstream_tables.sql +9 -0
  384. package/dist/migrations/0197_decisions_v1.sql +106 -0
  385. package/dist/migrations/0198_decision_queues_and_triage.sql +161 -0
  386. package/dist/migrations/0199_decision_queue_composite_key.sql +10 -0
  387. package/dist/migrations/0200_yellow_maria_hill.sql +64 -0
  388. package/dist/migrations/0201_concerned_captain_midlands.sql +1 -0
  389. package/dist/migrations/0202_eminent_marvel_zombies.sql +1 -0
  390. package/dist/migrations/0203_interaction_resolver_governance.sql +8 -0
  391. package/dist/migrations/0204_interaction_addressee.sql +6 -0
  392. package/dist/migrations/0205_narrow_shiva.sql +10 -0
  393. package/dist/migrations/0206_review_path_recovery_idempotency_index.sql +2 -0
  394. package/dist/migrations/0207_moaning_amazoness.sql +94 -0
  395. package/dist/migrations/0208_keen_sharon_carter.sql +1 -0
  396. package/dist/migrations/0209_heartbeat_context_snapshot_indexes.sql +4 -0
  397. package/dist/migrations/0210_heartbeat_context_taskkey_index.sql +1 -0
  398. package/dist/migrations/0211_bright_morg.sql +1 -0
  399. package/dist/migrations/0212_onboarding_first_task_unique.sql +3 -0
  400. package/dist/migrations/0213_complete_mystique.sql +24 -0
  401. package/dist/migrations/0214_lively_lord_tyger.sql +22 -0
  402. package/dist/migrations/0215_flat_daimon_hellstrom.sql +1 -0
  403. package/dist/migrations/0216_company_onboarding_seeds.sql +42 -0
  404. package/dist/migrations/0217_yielding_starbolt.sql +21 -0
  405. package/dist/migrations/0218_mushy_jack_murdock.sql +38 -0
  406. package/dist/migrations/0219_runtime_service_exposure.sql +3 -0
  407. package/dist/migrations/0220_execution_workspace_runtime_leases.sql +26 -0
  408. package/dist/migrations/0221_swift_justin_hammer.sql +20 -0
  409. package/dist/migrations/0222_orphan_cleanup_env_reference_survives_delete.sql +4 -0
  410. package/dist/migrations/0223_robust_zaladane.sql +6 -0
  411. package/dist/migrations/0224_unified_adapter_auth_sessions.sql +18 -0
  412. package/dist/migrations/0225_drop_claude_setup_token_sessions.sql +5 -0
  413. package/dist/migrations/0226_tan_colossus.sql +2 -0
  414. package/dist/migrations/0227_modern_pandemic.sql +410 -0
  415. package/dist/migrations/0228_nasty_grim_reaper.sql +59 -0
  416. package/dist/migrations/0229_drop_company_brand_color_and_attachment_max_bytes.sql +7 -0
  417. package/dist/migrations/0230_better_auth_account_issuer.sql +23 -0
  418. package/dist/migrations/0231_remove_app_connection_wide_includes.sql +10 -0
  419. package/dist/migrations/0232_fixed_hannibal_king.sql +202 -0
  420. package/dist/migrations/0233_living_dreaming_celestial.sql +13 -0
  421. package/dist/migrations/0234_provider_trace_records.sql +31 -0
  422. package/dist/migrations/0235_heartbeat_run_event_sequence_uniqueness.sql +28 -0
  423. package/dist/migrations/0236_remove_cheap_model_profiles.sql +108 -0
  424. package/dist/migrations/0237_clammy_colonel_america.sql +52 -0
  425. package/dist/migrations/0238_graceful_infant_terrible.sql +7 -0
  426. package/dist/migrations/0239_sturdy_santa_claus.sql +38 -0
  427. package/dist/migrations/0240_pink_fantastic_four.sql +25 -0
  428. package/dist/migrations/0241_conscious_adam_destine.sql +1 -0
  429. package/dist/migrations/0242_wide_lightspeed.sql +1 -0
  430. package/dist/migrations/0243_sleepy_metal_master.sql +1 -0
  431. package/dist/migrations/0244_organic_meltdown.sql +1 -0
  432. package/dist/migrations/0245_misty_nightshade.sql +3 -0
  433. package/dist/migrations/0246_nostalgic_medusa.sql +19 -0
  434. package/dist/migrations/0247_even_moon_knight.sql +2 -0
  435. package/dist/migrations/0248_small_manta.sql +36 -0
  436. package/dist/migrations/0249_fast_silverclaw.sql +33 -0
  437. package/dist/migrations/0250_exotic_dakota_north.sql +2 -0
  438. package/dist/migrations/0251_narrow_mastermind.sql +1 -0
  439. package/dist/migrations/0252_friendly_kate_bishop.sql +1 -0
  440. package/dist/migrations/0253_real_firebrand.sql +1 -0
  441. package/dist/migrations/0254_military_calypso.sql +3 -0
  442. package/dist/migrations/0255_previous_captain_america.sql +290 -0
  443. package/dist/migrations/0256_married_king_cobra.sql +3 -0
  444. package/dist/migrations/0257_bizarre_the_hunter.sql +8 -0
  445. package/dist/migrations/0258_typical_sauron.sql +2 -0
  446. package/dist/migrations/0259_tan_chat.sql +1 -0
  447. package/dist/migrations/0260_chat_interaction_wakeup_idempotency.sql +106 -0
  448. package/dist/migrations/0261_faulty_iceman.sql +4 -0
  449. package/dist/migrations/0262_lying_avengers.sql +3 -0
  450. package/dist/migrations/0263_nebulous_iron_lad.sql +3 -0
  451. package/dist/migrations/0264_cynical_hellcat.sql +3 -0
  452. package/dist/migrations/0265_chat_interaction_wakeup_provenance.sql +80 -0
  453. package/dist/migrations/0266_brave_living_mummy.sql +56 -0
  454. package/dist/migrations/0267_warm_wild_child.sql +8 -0
  455. package/dist/migrations/0268_lively_runaways.sql +1 -0
  456. package/dist/migrations/0269_fearless_young_avengers.sql +15 -0
  457. package/dist/migrations/0270_harsh_queen_noir.sql +12 -0
  458. package/dist/migrations/0271_woozy_silver_surfer.sql +1 -0
  459. package/dist/migrations/0272_light_kate_bishop.sql +98 -0
  460. package/dist/migrations/0273_aromatic_moondragon.sql +3 -0
  461. package/dist/migrations/0274_agent_chat.sql +33 -0
  462. package/dist/migrations/0275_easy_dragon_man.sql +5 -0
  463. package/dist/migrations/0276_hard_mandroid.sql +77 -0
  464. package/dist/migrations/0277_uneven_lady_deathstrike.sql +47 -0
  465. package/dist/migrations/0278_nappy_colonel_america.sql +6 -0
  466. package/dist/migrations/0279_tired_deathstrike.sql +3 -0
  467. package/dist/migrations/0280_unique_genesis.sql +11 -0
  468. package/dist/migrations/0281_true_boom_boom.sql +14 -0
  469. package/dist/migrations/0282_colossal_shocker.sql +2 -0
  470. package/dist/migrations/0283_jittery_psynapse.sql +81 -0
  471. package/dist/migrations/0284_fearless_stranger.sql +27 -0
  472. package/dist/migrations/0285_safe_vampiro.sql +14 -0
  473. package/dist/migrations/0286_cheerful_toro.sql +2 -0
  474. package/dist/migrations/0287_slimy_smasher.sql +215 -0
  475. package/dist/migrations/0288_exotic_daimon_hellstrom.sql +1 -0
  476. package/dist/migrations/0289_talented_fabian_cortez.sql +23 -0
  477. package/dist/migrations/0290_dizzy_ultragirl.sql +2 -0
  478. package/dist/migrations/0291_petite_genesis.sql +1 -0
  479. package/dist/migrations/0292_heavy_oracle.sql +1 -0
  480. package/dist/migrations/0293_complete_alice.sql +13 -0
  481. package/dist/migrations/0294_serious_tinkerer.sql +61 -0
  482. package/dist/migrations/0295_glorious_jamie_braddock.sql +36 -0
  483. package/dist/migrations/0296_drop_user_keyboard_shortcuts.sql +5 -0
  484. package/dist/migrations/0297_browser_use_cloud.sql +155 -0
  485. package/dist/migrations/0298_conscious_secret_warriors.sql +119 -0
  486. package/dist/migrations/0299_powerful_devos.sql +1 -0
  487. package/dist/migrations/0300_broad_rattler.sql +1 -0
  488. package/dist/migrations/0301_chilly_marvel_apes.sql +1 -0
  489. package/dist/migrations/0302_public_captain_cross.sql +21 -0
  490. package/dist/migrations/0303_stiff_thaddeus_ross.sql +25 -0
  491. package/dist/migrations/0304_foamy_swordsman.sql +14 -0
  492. package/dist/migrations/0305_connection_agent_instructions.sql +16 -0
  493. package/dist/migrations/0306_absent_ser_duncan.sql +64 -0
  494. package/dist/migrations/0307_fuzzy_wolfpack.sql +23 -0
  495. package/dist/migrations/0308_sparkling_clea.sql +16 -0
  496. package/dist/migrations/0309_nervous_robin_chapel.sql +23 -0
  497. package/dist/migrations/0310_mighty_chameleon.sql +6 -0
  498. package/dist/migrations/0311_milky_timeslip.sql +2 -0
  499. package/dist/migrations/0312_slippery_meteorite.sql +6 -0
  500. package/dist/migrations/0313_jittery_klaw.sql +2 -0
  501. package/dist/migrations/0314_chilly_triton.sql +14 -0
  502. package/dist/migrations/0315_chunky_chamber.sql +3 -0
  503. package/dist/migrations/0316_lumpy_maria_hill.sql +157 -0
  504. package/dist/migrations/0317_colossal_otto_octavius.sql +24 -0
  505. package/dist/migrations/0318_supreme_garia.sql +1 -0
  506. package/dist/migrations/0319_curvy_shadow_king.sql +27 -0
  507. package/dist/migrations/0320_chubby_vin_gonzales.sql +7 -0
  508. package/dist/migrations/0321_familiar_titania.sql +4 -0
  509. package/dist/migrations/0322_cool_naoko.sql +3 -0
  510. package/dist/migrations/0323_whole_steel_serpent.sql +20 -0
  511. package/dist/migrations/0324_loving_the_hood.sql +77 -0
  512. package/dist/migrations/0325_agent_commentary.sql +33 -0
  513. package/dist/migrations/0326_mcp_file_transfers.sql +48 -0
  514. package/dist/migrations/0327_easy_eternity.sql +232 -0
  515. package/dist/migrations/0328_private_task_access.sql +278 -0
  516. package/dist/migrations/0329_private_task_draft_assets.sql +28 -0
  517. package/dist/migrations/0330_rapid_emma_frost.sql +44 -0
  518. package/dist/migrations/0331_premium_slayback.sql +81 -0
  519. package/dist/migrations/0332_messy_famine.sql +189 -0
  520. package/dist/migrations/0333_strong_blacklash.sql +23 -0
  521. package/dist/migrations/0334_heavy_captain_midlands.sql +15 -0
  522. package/dist/migrations/0335_daily_onslaught.sql +16 -0
  523. package/dist/migrations/0336_acoustic_human_fly.sql +1 -0
  524. package/dist/migrations/0337_reflective_kree.sql +98 -0
  525. package/dist/migrations/0338_petite_shockwave.sql +4 -0
  526. package/dist/migrations/0339_long_franklin_storm.sql +153 -0
  527. package/dist/migrations/0340_aberrant_machine_man.sql +6 -0
  528. package/dist/migrations/0341_blushing_screwball.sql +17 -0
  529. package/dist/migrations/0342_sad_proteus.sql +23 -0
  530. package/dist/migrations/0343_chunky_mentallo.sql +52 -0
  531. package/dist/migrations/0344_free_wolf_cub.sql +18 -0
  532. package/dist/migrations/0345_spooky_white_tiger.sql +7 -0
  533. package/dist/migrations/0346_panoramic_spyke.sql +74 -0
  534. package/dist/migrations/0347_little_night_nurse.sql +1 -0
  535. package/dist/migrations/0348_breezy_chat.sql +27 -0
  536. package/dist/migrations/0349_round_matthew_murdock.sql +3 -0
  537. package/dist/migrations/0350_finalize_orphaned_claimed_wakeups.sql +10 -0
  538. package/dist/migrations/0351_local_browser_connections.sql +35 -0
  539. package/dist/migrations/0352_lucky_marvel_apes.sql +12 -0
  540. package/dist/migrations/0353_supreme_whirlwind.sql +1 -0
  541. package/dist/migrations/0354_melodic_romulus.sql +4 -0
  542. package/dist/migrations/0355_overjoyed_ma_gnuci.sql +1 -0
  543. package/dist/migrations/0356_normal_thundra.sql +3 -0
  544. package/dist/migrations/meta/_journal.json +2491 -0
  545. package/dist/native-runner-recovery-migration.test.d.ts +2 -0
  546. package/dist/native-runner-recovery-migration.test.d.ts.map +1 -0
  547. package/dist/native-runner-recovery-migration.test.js +121 -0
  548. package/dist/native-runner-recovery-migration.test.js.map +1 -0
  549. package/dist/nested-skill-folders-migration.test.d.ts +2 -0
  550. package/dist/nested-skill-folders-migration.test.d.ts.map +1 -0
  551. package/dist/nested-skill-folders-migration.test.js +106 -0
  552. package/dist/nested-skill-folders-migration.test.js.map +1 -0
  553. package/dist/orphaned-claimed-wakeups-migration.test.d.ts +2 -0
  554. package/dist/orphaned-claimed-wakeups-migration.test.d.ts.map +1 -0
  555. package/dist/orphaned-claimed-wakeups-migration.test.js +67 -0
  556. package/dist/orphaned-claimed-wakeups-migration.test.js.map +1 -0
  557. package/dist/pipelines-schema.test.d.ts +2 -0
  558. package/dist/pipelines-schema.test.d.ts.map +1 -0
  559. package/dist/pipelines-schema.test.js +205 -0
  560. package/dist/pipelines-schema.test.js.map +1 -0
  561. package/dist/postgres-connection-recovery.test.d.ts +2 -0
  562. package/dist/postgres-connection-recovery.test.d.ts.map +1 -0
  563. package/dist/postgres-connection-recovery.test.js +35 -0
  564. package/dist/postgres-connection-recovery.test.js.map +1 -0
  565. package/dist/private-task-draft-assets-migration.test.d.ts +2 -0
  566. package/dist/private-task-draft-assets-migration.test.d.ts.map +1 -0
  567. package/dist/private-task-draft-assets-migration.test.js +35 -0
  568. package/dist/private-task-draft-assets-migration.test.js.map +1 -0
  569. package/dist/question-response-delivery-migration.test.d.ts +2 -0
  570. package/dist/question-response-delivery-migration.test.d.ts.map +1 -0
  571. package/dist/question-response-delivery-migration.test.js +62 -0
  572. package/dist/question-response-delivery-migration.test.js.map +1 -0
  573. package/dist/question-response-history-migration.test.d.ts +2 -0
  574. package/dist/question-response-history-migration.test.d.ts.map +1 -0
  575. package/dist/question-response-history-migration.test.js +53 -0
  576. package/dist/question-response-history-migration.test.js.map +1 -0
  577. package/dist/run-event-payload.d.ts +30 -0
  578. package/dist/run-event-payload.d.ts.map +1 -0
  579. package/dist/run-event-payload.js +57 -0
  580. package/dist/run-event-payload.js.map +1 -0
  581. package/dist/run-event-payload.test.d.ts +2 -0
  582. package/dist/run-event-payload.test.d.ts.map +1 -0
  583. package/dist/run-event-payload.test.js +46 -0
  584. package/dist/run-event-payload.test.js.map +1 -0
  585. package/dist/run-identity-migration.test.d.ts +2 -0
  586. package/dist/run-identity-migration.test.d.ts.map +1 -0
  587. package/dist/run-identity-migration.test.js +60 -0
  588. package/dist/run-identity-migration.test.js.map +1 -0
  589. package/dist/runtime-config.d.ts +16 -0
  590. package/dist/runtime-config.d.ts.map +1 -0
  591. package/dist/runtime-config.js +168 -0
  592. package/dist/runtime-config.js.map +1 -0
  593. package/dist/runtime-config.test.d.ts +2 -0
  594. package/dist/runtime-config.test.d.ts.map +1 -0
  595. package/dist/runtime-config.test.js +111 -0
  596. package/dist/runtime-config.test.js.map +1 -0
  597. package/dist/schema/accounting.d.ts +1282 -0
  598. package/dist/schema/accounting.d.ts.map +1 -0
  599. package/dist/schema/accounting.js +120 -0
  600. package/dist/schema/accounting.js.map +1 -0
  601. package/dist/schema/activity_log.d.ts +214 -0
  602. package/dist/schema/activity_log.d.ts.map +1 -0
  603. package/dist/schema/activity_log.js +26 -0
  604. package/dist/schema/activity_log.js.map +1 -0
  605. package/dist/schema/adapter_auth_sessions.d.ts +377 -0
  606. package/dist/schema/adapter_auth_sessions.d.ts.map +1 -0
  607. package/dist/schema/adapter_auth_sessions.js +88 -0
  608. package/dist/schema/adapter_auth_sessions.js.map +1 -0
  609. package/dist/schema/agent_api_keys.d.ts +204 -0
  610. package/dist/schema/agent_api_keys.d.ts.map +1 -0
  611. package/dist/schema/agent_api_keys.js +19 -0
  612. package/dist/schema/agent_api_keys.js.map +1 -0
  613. package/dist/schema/agent_commentary.d.ts +181 -0
  614. package/dist/schema/agent_commentary.d.ts.map +1 -0
  615. package/dist/schema/agent_commentary.js +24 -0
  616. package/dist/schema/agent_commentary.js.map +1 -0
  617. package/dist/schema/agent_config_revisions.d.ts +201 -0
  618. package/dist/schema/agent_config_revisions.d.ts.map +1 -0
  619. package/dist/schema/agent_config_revisions.js +20 -0
  620. package/dist/schema/agent_config_revisions.js.map +1 -0
  621. package/dist/schema/agent_identity_keys.d.ts +131 -0
  622. package/dist/schema/agent_identity_keys.d.ts.map +1 -0
  623. package/dist/schema/agent_identity_keys.js +20 -0
  624. package/dist/schema/agent_identity_keys.js.map +1 -0
  625. package/dist/schema/agent_instruction_revisions.d.ts +740 -0
  626. package/dist/schema/agent_instruction_revisions.d.ts.map +1 -0
  627. package/dist/schema/agent_instruction_revisions.js +80 -0
  628. package/dist/schema/agent_instruction_revisions.js.map +1 -0
  629. package/dist/schema/agent_memberships.d.ts +144 -0
  630. package/dist/schema/agent_memberships.d.ts.map +1 -0
  631. package/dist/schema/agent_memberships.js +19 -0
  632. package/dist/schema/agent_memberships.js.map +1 -0
  633. package/dist/schema/agent_runtime_state.d.ts +248 -0
  634. package/dist/schema/agent_runtime_state.d.ts.map +1 -0
  635. package/dist/schema/agent_runtime_state.js +23 -0
  636. package/dist/schema/agent_runtime_state.js.map +1 -0
  637. package/dist/schema/agent_task_sessions.d.ts +569 -0
  638. package/dist/schema/agent_task_sessions.d.ts.map +1 -0
  639. package/dist/schema/agent_task_sessions.js +51 -0
  640. package/dist/schema/agent_task_sessions.js.map +1 -0
  641. package/dist/schema/agent_wakeup_requests.d.ts +333 -0
  642. package/dist/schema/agent_wakeup_requests.d.ts.map +1 -0
  643. package/dist/schema/agent_wakeup_requests.js +65 -0
  644. package/dist/schema/agent_wakeup_requests.js.map +1 -0
  645. package/dist/schema/agents.d.ts +564 -0
  646. package/dist/schema/agents.d.ts.map +1 -0
  647. package/dist/schema/agents.js +43 -0
  648. package/dist/schema/agents.js.map +1 -0
  649. package/dist/schema/ai_connection_defaults.d.ts +132 -0
  650. package/dist/schema/ai_connection_defaults.d.ts.map +1 -0
  651. package/dist/schema/ai_connection_defaults.js +28 -0
  652. package/dist/schema/ai_connection_defaults.js.map +1 -0
  653. package/dist/schema/ai_connection_routing.d.ts +351 -0
  654. package/dist/schema/ai_connection_routing.d.ts.map +1 -0
  655. package/dist/schema/ai_connection_routing.js +37 -0
  656. package/dist/schema/ai_connection_routing.js.map +1 -0
  657. package/dist/schema/ai_provider_defaults.d.ts +114 -0
  658. package/dist/schema/ai_provider_defaults.d.ts.map +1 -0
  659. package/dist/schema/ai_provider_defaults.js +19 -0
  660. package/dist/schema/ai_provider_defaults.js.map +1 -0
  661. package/dist/schema/ai_subscriptions.d.ts +619 -0
  662. package/dist/schema/ai_subscriptions.d.ts.map +1 -0
  663. package/dist/schema/ai_subscriptions.js +61 -0
  664. package/dist/schema/ai_subscriptions.js.map +1 -0
  665. package/dist/schema/announcement_dismissals.d.ts +83 -0
  666. package/dist/schema/announcement_dismissals.d.ts.map +1 -0
  667. package/dist/schema/announcement_dismissals.js +15 -0
  668. package/dist/schema/announcement_dismissals.js.map +1 -0
  669. package/dist/schema/approval_comments.d.ts +144 -0
  670. package/dist/schema/approval_comments.d.ts.map +1 -0
  671. package/dist/schema/approval_comments.js +19 -0
  672. package/dist/schema/approval_comments.js.map +1 -0
  673. package/dist/schema/approvals.d.ts +214 -0
  674. package/dist/schema/approvals.d.ts.map +1 -0
  675. package/dist/schema/approvals.js +24 -0
  676. package/dist/schema/approvals.js.map +1 -0
  677. package/dist/schema/assets.d.ts +229 -0
  678. package/dist/schema/assets.d.ts.map +1 -0
  679. package/dist/schema/assets.js +23 -0
  680. package/dist/schema/assets.js.map +1 -0
  681. package/dist/schema/auth.d.ts +638 -0
  682. package/dist/schema/auth.d.ts.map +1 -0
  683. package/dist/schema/auth.js +61 -0
  684. package/dist/schema/auth.js.map +1 -0
  685. package/dist/schema/board_api_keys.d.ts +144 -0
  686. package/dist/schema/board_api_keys.d.ts.map +1 -0
  687. package/dist/schema/board_api_keys.js +16 -0
  688. package/dist/schema/board_api_keys.js.map +1 -0
  689. package/dist/schema/browser_use.d.ts +745 -0
  690. package/dist/schema/browser_use.d.ts.map +1 -0
  691. package/dist/schema/browser_use.js +104 -0
  692. package/dist/schema/browser_use.js.map +1 -0
  693. package/dist/schema/budget_incidents.d.ts +297 -0
  694. package/dist/schema/budget_incidents.d.ts.map +1 -0
  695. package/dist/schema/budget_incidents.js +29 -0
  696. package/dist/schema/budget_incidents.js.map +1 -0
  697. package/dist/schema/budget_policies.d.ts +331 -0
  698. package/dist/schema/budget_policies.d.ts.map +1 -0
  699. package/dist/schema/budget_policies.js +30 -0
  700. package/dist/schema/budget_policies.js.map +1 -0
  701. package/dist/schema/built_in_managed_resources.d.ts +197 -0
  702. package/dist/schema/built_in_managed_resources.d.ts.map +1 -0
  703. package/dist/schema/built_in_managed_resources.js +22 -0
  704. package/dist/schema/built_in_managed_resources.js.map +1 -0
  705. package/dist/schema/cases.d.ts +982 -0
  706. package/dist/schema/cases.d.ts.map +1 -0
  707. package/dist/schema/cases.js +122 -0
  708. package/dist/schema/cases.js.map +1 -0
  709. package/dist/schema/chat_channels.d.ts +5309 -0
  710. package/dist/schema/chat_channels.d.ts.map +1 -0
  711. package/dist/schema/chat_channels.js +1005 -0
  712. package/dist/schema/chat_channels.js.map +1 -0
  713. package/dist/schema/chat_completion_deliveries.d.ts +361 -0
  714. package/dist/schema/chat_completion_deliveries.d.ts.map +1 -0
  715. package/dist/schema/chat_completion_deliveries.js +36 -0
  716. package/dist/schema/chat_completion_deliveries.js.map +1 -0
  717. package/dist/schema/chat_discord_command_owners.d.ts +93 -0
  718. package/dist/schema/chat_discord_command_owners.d.ts.map +1 -0
  719. package/dist/schema/chat_discord_command_owners.js +19 -0
  720. package/dist/schema/chat_discord_command_owners.js.map +1 -0
  721. package/dist/schema/chat_github.d.ts +838 -0
  722. package/dist/schema/chat_github.d.ts.map +1 -0
  723. package/dist/schema/chat_github.js +117 -0
  724. package/dist/schema/chat_github.js.map +1 -0
  725. package/dist/schema/chat_slack_registrations.d.ts +287 -0
  726. package/dist/schema/chat_slack_registrations.d.ts.map +1 -0
  727. package/dist/schema/chat_slack_registrations.js +26 -0
  728. package/dist/schema/chat_slack_registrations.js.map +1 -0
  729. package/dist/schema/chat_teams_file_transfers.d.ts +639 -0
  730. package/dist/schema/chat_teams_file_transfers.d.ts.map +1 -0
  731. package/dist/schema/chat_teams_file_transfers.js +86 -0
  732. package/dist/schema/chat_teams_file_transfers.js.map +1 -0
  733. package/dist/schema/chat_telegram_draft_ids.d.ts +2 -0
  734. package/dist/schema/chat_telegram_draft_ids.d.ts.map +1 -0
  735. package/dist/schema/chat_telegram_draft_ids.js +14 -0
  736. package/dist/schema/chat_telegram_draft_ids.js.map +1 -0
  737. package/dist/schema/chat_voice_callbacks.d.ts +128 -0
  738. package/dist/schema/chat_voice_callbacks.d.ts.map +1 -0
  739. package/dist/schema/chat_voice_callbacks.js +18 -0
  740. package/dist/schema/chat_voice_callbacks.js.map +1 -0
  741. package/dist/schema/chat_voice_inbound.d.ts +461 -0
  742. package/dist/schema/chat_voice_inbound.d.ts.map +1 -0
  743. package/dist/schema/chat_voice_inbound.js +45 -0
  744. package/dist/schema/chat_voice_inbound.js.map +1 -0
  745. package/dist/schema/chat_voice_reports.d.ts +184 -0
  746. package/dist/schema/chat_voice_reports.d.ts.map +1 -0
  747. package/dist/schema/chat_voice_reports.js +24 -0
  748. package/dist/schema/chat_voice_reports.js.map +1 -0
  749. package/dist/schema/chat_voice_sessions.d.ts +730 -0
  750. package/dist/schema/chat_voice_sessions.d.ts.map +1 -0
  751. package/dist/schema/chat_voice_sessions.js +85 -0
  752. package/dist/schema/chat_voice_sessions.js.map +1 -0
  753. package/dist/schema/cli_auth_challenges.d.ts +263 -0
  754. package/dist/schema/cli_auth_challenges.d.ts.map +1 -0
  755. package/dist/schema/cli_auth_challenges.js +26 -0
  756. package/dist/schema/cli_auth_challenges.js.map +1 -0
  757. package/dist/schema/companies.d.ts +369 -0
  758. package/dist/schema/companies.d.ts.map +1 -0
  759. package/dist/schema/companies.js +34 -0
  760. package/dist/schema/companies.js.map +1 -0
  761. package/dist/schema/company_logos.d.ts +93 -0
  762. package/dist/schema/company_logos.d.ts.map +1 -0
  763. package/dist/schema/company_logos.js +14 -0
  764. package/dist/schema/company_logos.js.map +1 -0
  765. package/dist/schema/company_memberships.d.ts +144 -0
  766. package/dist/schema/company_memberships.d.ts.map +1 -0
  767. package/dist/schema/company_memberships.js +17 -0
  768. package/dist/schema/company_memberships.js.map +1 -0
  769. package/dist/schema/company_onboarding_seeds.d.ts +257 -0
  770. package/dist/schema/company_onboarding_seeds.d.ts.map +1 -0
  771. package/dist/schema/company_onboarding_seeds.js +35 -0
  772. package/dist/schema/company_onboarding_seeds.js.map +1 -0
  773. package/dist/schema/company_secret_bindings.d.ts +229 -0
  774. package/dist/schema/company_secret_bindings.d.ts.map +1 -0
  775. package/dist/schema/company_secret_bindings.js +24 -0
  776. package/dist/schema/company_secret_bindings.js.map +1 -0
  777. package/dist/schema/company_secret_proposals.d.ts +575 -0
  778. package/dist/schema/company_secret_proposals.d.ts.map +1 -0
  779. package/dist/schema/company_secret_proposals.js +69 -0
  780. package/dist/schema/company_secret_proposals.js.map +1 -0
  781. package/dist/schema/company_secret_provider_configs.d.ts +284 -0
  782. package/dist/schema/company_secret_provider_configs.d.ts.map +1 -0
  783. package/dist/schema/company_secret_provider_configs.js +29 -0
  784. package/dist/schema/company_secret_provider_configs.js.map +1 -0
  785. package/dist/schema/company_secret_versions.d.ts +231 -0
  786. package/dist/schema/company_secret_versions.d.ts.map +1 -0
  787. package/dist/schema/company_secret_versions.js +24 -0
  788. package/dist/schema/company_secret_versions.js.map +1 -0
  789. package/dist/schema/company_secrets.d.ts +401 -0
  790. package/dist/schema/company_secrets.d.ts.map +1 -0
  791. package/dist/schema/company_secrets.js +57 -0
  792. package/dist/schema/company_secrets.js.map +1 -0
  793. package/dist/schema/company_skill_policies.d.ts +131 -0
  794. package/dist/schema/company_skill_policies.d.ts.map +1 -0
  795. package/dist/schema/company_skill_policies.js +12 -0
  796. package/dist/schema/company_skill_policies.js.map +1 -0
  797. package/dist/schema/company_skill_sources.d.ts +498 -0
  798. package/dist/schema/company_skill_sources.d.ts.map +1 -0
  799. package/dist/schema/company_skill_sources.js +43 -0
  800. package/dist/schema/company_skill_sources.js.map +1 -0
  801. package/dist/schema/company_skills.d.ts +1860 -0
  802. package/dist/schema/company_skills.d.ts.map +1 -0
  803. package/dist/schema/company_skills.js +157 -0
  804. package/dist/schema/company_skills.js.map +1 -0
  805. package/dist/schema/company_transfer_runs.d.ts +297 -0
  806. package/dist/schema/company_transfer_runs.d.ts.map +1 -0
  807. package/dist/schema/company_transfer_runs.js +42 -0
  808. package/dist/schema/company_transfer_runs.js.map +1 -0
  809. package/dist/schema/company_user_sidebar_preferences.d.ts +112 -0
  810. package/dist/schema/company_user_sidebar_preferences.d.ts.map +1 -0
  811. package/dist/schema/company_user_sidebar_preferences.js +15 -0
  812. package/dist/schema/company_user_sidebar_preferences.js.map +1 -0
  813. package/dist/schema/completion_contracts.d.ts +265 -0
  814. package/dist/schema/completion_contracts.d.ts.map +1 -0
  815. package/dist/schema/completion_contracts.js +35 -0
  816. package/dist/schema/completion_contracts.js.map +1 -0
  817. package/dist/schema/connection_event_deliveries.d.ts +291 -0
  818. package/dist/schema/connection_event_deliveries.d.ts.map +1 -0
  819. package/dist/schema/connection_event_deliveries.js +31 -0
  820. package/dist/schema/connection_event_deliveries.js.map +1 -0
  821. package/dist/schema/connection_intent_deliveries.d.ts +94 -0
  822. package/dist/schema/connection_intent_deliveries.d.ts.map +1 -0
  823. package/dist/schema/connection_intent_deliveries.js +12 -0
  824. package/dist/schema/connection_intent_deliveries.js.map +1 -0
  825. package/dist/schema/cost_events.d.ts +469 -0
  826. package/dist/schema/cost_events.d.ts.map +1 -0
  827. package/dist/schema/cost_events.js +52 -0
  828. package/dist/schema/cost_events.js.map +1 -0
  829. package/dist/schema/decision_models.d.ts +579 -0
  830. package/dist/schema/decision_models.d.ts.map +1 -0
  831. package/dist/schema/decision_models.js +50 -0
  832. package/dist/schema/decision_models.js.map +1 -0
  833. package/dist/schema/decision_queues.d.ts +1510 -0
  834. package/dist/schema/decision_queues.d.ts.map +1 -0
  835. package/dist/schema/decision_queues.js +161 -0
  836. package/dist/schema/decision_queues.js.map +1 -0
  837. package/dist/schema/decision_training_examples.d.ts +255 -0
  838. package/dist/schema/decision_training_examples.d.ts.map +1 -0
  839. package/dist/schema/decision_training_examples.js +27 -0
  840. package/dist/schema/decision_training_examples.js.map +1 -0
  841. package/dist/schema/decisions.d.ts +824 -0
  842. package/dist/schema/decisions.d.ts.map +1 -0
  843. package/dist/schema/decisions.js +81 -0
  844. package/dist/schema/decisions.js.map +1 -0
  845. package/dist/schema/document_annotation_anchor_snapshots.d.ts +255 -0
  846. package/dist/schema/document_annotation_anchor_snapshots.d.ts.map +1 -0
  847. package/dist/schema/document_annotation_anchor_snapshots.js +25 -0
  848. package/dist/schema/document_annotation_anchor_snapshots.js.map +1 -0
  849. package/dist/schema/document_annotation_comments.d.ts +285 -0
  850. package/dist/schema/document_annotation_comments.d.ts.map +1 -0
  851. package/dist/schema/document_annotation_comments.js +39 -0
  852. package/dist/schema/document_annotation_comments.js.map +1 -0
  853. package/dist/schema/document_annotation_threads.d.ts +510 -0
  854. package/dist/schema/document_annotation_threads.d.ts.map +1 -0
  855. package/dist/schema/document_annotation_threads.js +52 -0
  856. package/dist/schema/document_annotation_threads.js.map +1 -0
  857. package/dist/schema/document_memberships.d.ts +127 -0
  858. package/dist/schema/document_memberships.d.ts.map +1 -0
  859. package/dist/schema/document_memberships.js +16 -0
  860. package/dist/schema/document_memberships.js.map +1 -0
  861. package/dist/schema/document_revisions.d.ts +212 -0
  862. package/dist/schema/document_revisions.d.ts.map +1 -0
  863. package/dist/schema/document_revisions.js +23 -0
  864. package/dist/schema/document_revisions.js.map +1 -0
  865. package/dist/schema/documents.d.ts +300 -0
  866. package/dist/schema/documents.d.ts.map +1 -0
  867. package/dist/schema/documents.js +28 -0
  868. package/dist/schema/documents.js.map +1 -0
  869. package/dist/schema/dot_runner.d.ts +980 -0
  870. package/dist/schema/dot_runner.d.ts.map +1 -0
  871. package/dist/schema/dot_runner.js +82 -0
  872. package/dist/schema/dot_runner.js.map +1 -0
  873. package/dist/schema/email.d.ts +550 -0
  874. package/dist/schema/email.d.ts.map +1 -0
  875. package/dist/schema/email.js +80 -0
  876. package/dist/schema/email.js.map +1 -0
  877. package/dist/schema/environment_custom_image_setup_sessions.d.ts +351 -0
  878. package/dist/schema/environment_custom_image_setup_sessions.d.ts.map +1 -0
  879. package/dist/schema/environment_custom_image_setup_sessions.js +39 -0
  880. package/dist/schema/environment_custom_image_setup_sessions.js.map +1 -0
  881. package/dist/schema/environment_custom_image_templates.d.ts +284 -0
  882. package/dist/schema/environment_custom_image_templates.d.ts.map +1 -0
  883. package/dist/schema/environment_custom_image_templates.js +32 -0
  884. package/dist/schema/environment_custom_image_templates.js.map +1 -0
  885. package/dist/schema/environment_leases.d.ts +333 -0
  886. package/dist/schema/environment_leases.d.ts.map +1 -0
  887. package/dist/schema/environment_leases.js +42 -0
  888. package/dist/schema/environment_leases.js.map +1 -0
  889. package/dist/schema/environments.d.ts +184 -0
  890. package/dist/schema/environments.d.ts.map +1 -0
  891. package/dist/schema/environments.js +24 -0
  892. package/dist/schema/environments.js.map +1 -0
  893. package/dist/schema/execution_workspace_runtime_leases.d.ts +248 -0
  894. package/dist/schema/execution_workspace_runtime_leases.d.ts.map +1 -0
  895. package/dist/schema/execution_workspace_runtime_leases.js +35 -0
  896. package/dist/schema/execution_workspace_runtime_leases.js.map +1 -0
  897. package/dist/schema/execution_workspaces.d.ts +418 -0
  898. package/dist/schema/execution_workspaces.d.ts.map +1 -0
  899. package/dist/schema/execution_workspaces.js +39 -0
  900. package/dist/schema/execution_workspaces.js.map +1 -0
  901. package/dist/schema/external_object_mentions.d.ts +337 -0
  902. package/dist/schema/external_object_mentions.d.ts.map +1 -0
  903. package/dist/schema/external_object_mentions.js +34 -0
  904. package/dist/schema/external_object_mentions.js.map +1 -0
  905. package/dist/schema/external_objects.d.ts +543 -0
  906. package/dist/schema/external_objects.d.ts.map +1 -0
  907. package/dist/schema/external_objects.js +43 -0
  908. package/dist/schema/external_objects.js.map +1 -0
  909. package/dist/schema/fast_responses.d.ts +662 -0
  910. package/dist/schema/fast_responses.d.ts.map +1 -0
  911. package/dist/schema/fast_responses.js +65 -0
  912. package/dist/schema/fast_responses.js.map +1 -0
  913. package/dist/schema/feedback_exports.d.ts +450 -0
  914. package/dist/schema/feedback_exports.d.ts.map +1 -0
  915. package/dist/schema/feedback_exports.js +41 -0
  916. package/dist/schema/feedback_exports.js.map +1 -0
  917. package/dist/schema/feedback_votes.d.ts +246 -0
  918. package/dist/schema/feedback_votes.d.ts.map +1 -0
  919. package/dist/schema/feedback_votes.js +25 -0
  920. package/dist/schema/feedback_votes.js.map +1 -0
  921. package/dist/schema/finance_events.d.ts +503 -0
  922. package/dist/schema/finance_events.d.ts.map +1 -0
  923. package/dist/schema/finance_events.js +48 -0
  924. package/dist/schema/finance_events.js.map +1 -0
  925. package/dist/schema/folders.d.ts +198 -0
  926. package/dist/schema/folders.d.ts.map +1 -0
  927. package/dist/schema/folders.js +29 -0
  928. package/dist/schema/folders.js.map +1 -0
  929. package/dist/schema/goals.d.ts +178 -0
  930. package/dist/schema/goals.d.ts.map +1 -0
  931. package/dist/schema/goals.js +18 -0
  932. package/dist/schema/goals.js.map +1 -0
  933. package/dist/schema/heartbeat_run_events.d.ts +299 -0
  934. package/dist/schema/heartbeat_run_events.d.ts.map +1 -0
  935. package/dist/schema/heartbeat_run_events.js +45 -0
  936. package/dist/schema/heartbeat_run_events.js.map +1 -0
  937. package/dist/schema/heartbeat_run_watchdog_decisions.d.ts +195 -0
  938. package/dist/schema/heartbeat_run_watchdog_decisions.d.ts.map +1 -0
  939. package/dist/schema/heartbeat_run_watchdog_decisions.js +22 -0
  940. package/dist/schema/heartbeat_run_watchdog_decisions.js.map +1 -0
  941. package/dist/schema/heartbeat_runs.d.ts +1344 -0
  942. package/dist/schema/heartbeat_runs.d.ts.map +1 -0
  943. package/dist/schema/heartbeat_runs.js +124 -0
  944. package/dist/schema/heartbeat_runs.js.map +1 -0
  945. package/dist/schema/inbox_dismissals.d.ts +163 -0
  946. package/dist/schema/inbox_dismissals.d.ts.map +1 -0
  947. package/dist/schema/inbox_dismissals.js +18 -0
  948. package/dist/schema/inbox_dismissals.js.map +1 -0
  949. package/dist/schema/index.d.ts +172 -0
  950. package/dist/schema/index.d.ts.map +1 -0
  951. package/dist/schema/index.js +172 -0
  952. package/dist/schema/index.js.map +1 -0
  953. package/dist/schema/instance_settings.d.ts +150 -0
  954. package/dist/schema/instance_settings.d.ts.map +1 -0
  955. package/dist/schema/instance_settings.js +15 -0
  956. package/dist/schema/instance_settings.js.map +1 -0
  957. package/dist/schema/instance_user_roles.d.ts +93 -0
  958. package/dist/schema/instance_user_roles.d.ts.map +1 -0
  959. package/dist/schema/instance_user_roles.js +12 -0
  960. package/dist/schema/instance_user_roles.js.map +1 -0
  961. package/dist/schema/invites.d.ts +214 -0
  962. package/dist/schema/invites.d.ts.map +1 -0
  963. package/dist/schema/invites.js +20 -0
  964. package/dist/schema/invites.js.map +1 -0
  965. package/dist/schema/issue_access_grants.d.ts +161 -0
  966. package/dist/schema/issue_access_grants.d.ts.map +1 -0
  967. package/dist/schema/issue_access_grants.js +21 -0
  968. package/dist/schema/issue_access_grants.js.map +1 -0
  969. package/dist/schema/issue_approvals.d.ts +110 -0
  970. package/dist/schema/issue_approvals.d.ts.map +1 -0
  971. package/dist/schema/issue_approvals.js +19 -0
  972. package/dist/schema/issue_approvals.js.map +1 -0
  973. package/dist/schema/issue_attachments.d.ts +144 -0
  974. package/dist/schema/issue_attachments.d.ts.map +1 -0
  975. package/dist/schema/issue_attachments.js +24 -0
  976. package/dist/schema/issue_attachments.js.map +1 -0
  977. package/dist/schema/issue_autonomy_windows.d.ts +250 -0
  978. package/dist/schema/issue_autonomy_windows.d.ts.map +1 -0
  979. package/dist/schema/issue_autonomy_windows.js +30 -0
  980. package/dist/schema/issue_autonomy_windows.js.map +1 -0
  981. package/dist/schema/issue_comments.d.ts +482 -0
  982. package/dist/schema/issue_comments.d.ts.map +1 -0
  983. package/dist/schema/issue_comments.js +48 -0
  984. package/dist/schema/issue_comments.js.map +1 -0
  985. package/dist/schema/issue_create_idempotency_keys.d.ts +93 -0
  986. package/dist/schema/issue_create_idempotency_keys.d.ts.map +1 -0
  987. package/dist/schema/issue_create_idempotency_keys.js +15 -0
  988. package/dist/schema/issue_create_idempotency_keys.js.map +1 -0
  989. package/dist/schema/issue_documents.d.ts +127 -0
  990. package/dist/schema/issue_documents.d.ts.map +1 -0
  991. package/dist/schema/issue_documents.js +18 -0
  992. package/dist/schema/issue_documents.js.map +1 -0
  993. package/dist/schema/issue_execution_decisions.d.ts +212 -0
  994. package/dist/schema/issue_execution_decisions.d.ts.map +1 -0
  995. package/dist/schema/issue_execution_decisions.js +23 -0
  996. package/dist/schema/issue_execution_decisions.js.map +1 -0
  997. package/dist/schema/issue_inbox_archives.d.ts +180 -0
  998. package/dist/schema/issue_inbox_archives.d.ts.map +1 -0
  999. package/dist/schema/issue_inbox_archives.js +25 -0
  1000. package/dist/schema/issue_inbox_archives.js.map +1 -0
  1001. package/dist/schema/issue_labels.d.ts +76 -0
  1002. package/dist/schema/issue_labels.d.ts.map +1 -0
  1003. package/dist/schema/issue_labels.js +16 -0
  1004. package/dist/schema/issue_labels.js.map +1 -0
  1005. package/dist/schema/issue_plan_decompositions.d.ts +284 -0
  1006. package/dist/schema/issue_plan_decompositions.d.ts.map +1 -0
  1007. package/dist/schema/issue_plan_decompositions.js +36 -0
  1008. package/dist/schema/issue_plan_decompositions.js.map +1 -0
  1009. package/dist/schema/issue_question_response_deliveries.d.ts +320 -0
  1010. package/dist/schema/issue_question_response_deliveries.d.ts.map +1 -0
  1011. package/dist/schema/issue_question_response_deliveries.js +42 -0
  1012. package/dist/schema/issue_question_response_deliveries.js.map +1 -0
  1013. package/dist/schema/issue_read_states.d.ts +127 -0
  1014. package/dist/schema/issue_read_states.d.ts.map +1 -0
  1015. package/dist/schema/issue_read_states.js +17 -0
  1016. package/dist/schema/issue_read_states.js.map +1 -0
  1017. package/dist/schema/issue_recovery_actions.d.ts +456 -0
  1018. package/dist/schema/issue_recovery_actions.d.ts.map +1 -0
  1019. package/dist/schema/issue_recovery_actions.js +44 -0
  1020. package/dist/schema/issue_recovery_actions.js.map +1 -0
  1021. package/dist/schema/issue_reference_mentions.d.ts +180 -0
  1022. package/dist/schema/issue_reference_mentions.d.ts.map +1 -0
  1023. package/dist/schema/issue_reference_mentions.js +23 -0
  1024. package/dist/schema/issue_reference_mentions.js.map +1 -0
  1025. package/dist/schema/issue_relations.d.ts +163 -0
  1026. package/dist/schema/issue_relations.d.ts.map +1 -0
  1027. package/dist/schema/issue_relations.js +21 -0
  1028. package/dist/schema/issue_relations.js.map +1 -0
  1029. package/dist/schema/issue_share_links.d.ts +195 -0
  1030. package/dist/schema/issue_share_links.d.ts.map +1 -0
  1031. package/dist/schema/issue_share_links.js +24 -0
  1032. package/dist/schema/issue_share_links.js.map +1 -0
  1033. package/dist/schema/issue_thread_interaction_owner_relays.d.ts +198 -0
  1034. package/dist/schema/issue_thread_interaction_owner_relays.d.ts.map +1 -0
  1035. package/dist/schema/issue_thread_interaction_owner_relays.js +23 -0
  1036. package/dist/schema/issue_thread_interaction_owner_relays.js.map +1 -0
  1037. package/dist/schema/issue_thread_interactions.d.ts +535 -0
  1038. package/dist/schema/issue_thread_interactions.d.ts.map +1 -0
  1039. package/dist/schema/issue_thread_interactions.js +65 -0
  1040. package/dist/schema/issue_thread_interactions.js.map +1 -0
  1041. package/dist/schema/issue_tree_hold_members.d.ts +280 -0
  1042. package/dist/schema/issue_tree_hold_members.d.ts.map +1 -0
  1043. package/dist/schema/issue_tree_hold_members.js +29 -0
  1044. package/dist/schema/issue_tree_hold_members.js.map +1 -0
  1045. package/dist/schema/issue_tree_holds.d.ts +352 -0
  1046. package/dist/schema/issue_tree_holds.d.ts.map +1 -0
  1047. package/dist/schema/issue_tree_holds.js +31 -0
  1048. package/dist/schema/issue_tree_holds.js.map +1 -0
  1049. package/dist/schema/issue_watchdogs.d.ts +382 -0
  1050. package/dist/schema/issue_watchdogs.d.ts.map +1 -0
  1051. package/dist/schema/issue_watchdogs.js +38 -0
  1052. package/dist/schema/issue_watchdogs.js.map +1 -0
  1053. package/dist/schema/issue_work_products.d.ts +370 -0
  1054. package/dist/schema/issue_work_products.d.ts.map +1 -0
  1055. package/dist/schema/issue_work_products.js +38 -0
  1056. package/dist/schema/issue_work_products.js.map +1 -0
  1057. package/dist/schema/issues.d.ts +1130 -0
  1058. package/dist/schema/issues.d.ts.map +1 -0
  1059. package/dist/schema/issues.js +165 -0
  1060. package/dist/schema/issues.js.map +1 -0
  1061. package/dist/schema/join_requests.d.ts +384 -0
  1062. package/dist/schema/join_requests.d.ts.map +1 -0
  1063. package/dist/schema/join_requests.js +39 -0
  1064. package/dist/schema/join_requests.js.map +1 -0
  1065. package/dist/schema/labels.d.ts +110 -0
  1066. package/dist/schema/labels.d.ts.map +1 -0
  1067. package/dist/schema/labels.js +14 -0
  1068. package/dist/schema/labels.js.map +1 -0
  1069. package/dist/schema/local_browser_connections.d.ts +429 -0
  1070. package/dist/schema/local_browser_connections.d.ts.map +1 -0
  1071. package/dist/schema/local_browser_connections.js +35 -0
  1072. package/dist/schema/local_browser_connections.js.map +1 -0
  1073. package/dist/schema/managed_agent_profiles.d.ts +339 -0
  1074. package/dist/schema/managed_agent_profiles.d.ts.map +1 -0
  1075. package/dist/schema/managed_agent_profiles.js +44 -0
  1076. package/dist/schema/managed_agent_profiles.js.map +1 -0
  1077. package/dist/schema/model_cooldowns.d.ts +144 -0
  1078. package/dist/schema/model_cooldowns.d.ts.map +1 -0
  1079. package/dist/schema/model_cooldowns.js +16 -0
  1080. package/dist/schema/model_cooldowns.js.map +1 -0
  1081. package/dist/schema/native_run_finalizations.d.ts +403 -0
  1082. package/dist/schema/native_run_finalizations.d.ts.map +1 -0
  1083. package/dist/schema/native_run_finalizations.js +91 -0
  1084. package/dist/schema/native_run_finalizations.js.map +1 -0
  1085. package/dist/schema/native_run_results.d.ts +248 -0
  1086. package/dist/schema/native_run_results.d.ts.map +1 -0
  1087. package/dist/schema/native_run_results.js +56 -0
  1088. package/dist/schema/native_run_results.js.map +1 -0
  1089. package/dist/schema/pipeline_case_events.d.ts +231 -0
  1090. package/dist/schema/pipeline_case_events.d.ts.map +1 -0
  1091. package/dist/schema/pipeline_case_events.js +53 -0
  1092. package/dist/schema/pipeline_case_events.js.map +1 -0
  1093. package/dist/schema/pipeline_cases.d.ts +1388 -0
  1094. package/dist/schema/pipeline_cases.d.ts.map +1 -0
  1095. package/dist/schema/pipeline_cases.js +138 -0
  1096. package/dist/schema/pipeline_cases.js.map +1 -0
  1097. package/dist/schema/pipelines.d.ts +500 -0
  1098. package/dist/schema/pipelines.d.ts.map +1 -0
  1099. package/dist/schema/pipelines.js +52 -0
  1100. package/dist/schema/pipelines.js.map +1 -0
  1101. package/dist/schema/pixels_office_seats.d.ts +127 -0
  1102. package/dist/schema/pixels_office_seats.d.ts.map +1 -0
  1103. package/dist/schema/pixels_office_seats.js +16 -0
  1104. package/dist/schema/pixels_office_seats.js.map +1 -0
  1105. package/dist/schema/plugin_company_settings.d.ts +159 -0
  1106. package/dist/schema/plugin_company_settings.d.ts.map +1 -0
  1107. package/dist/schema/plugin_company_settings.js +35 -0
  1108. package/dist/schema/plugin_company_settings.js.map +1 -0
  1109. package/dist/schema/plugin_config.d.ts +139 -0
  1110. package/dist/schema/plugin_config.d.ts.map +1 -0
  1111. package/dist/schema/plugin_config.js +29 -0
  1112. package/dist/schema/plugin_config.js.map +1 -0
  1113. package/dist/schema/plugin_database.d.ts +357 -0
  1114. package/dist/schema/plugin_database.d.ts.map +1 -0
  1115. package/dist/schema/plugin_database.js +51 -0
  1116. package/dist/schema/plugin_database.js.map +1 -0
  1117. package/dist/schema/plugin_entities.d.ts +230 -0
  1118. package/dist/schema/plugin_entities.d.ts.map +1 -0
  1119. package/dist/schema/plugin_entities.js +52 -0
  1120. package/dist/schema/plugin_entities.js.map +1 -0
  1121. package/dist/schema/plugin_jobs.d.ts +409 -0
  1122. package/dist/schema/plugin_jobs.d.ts.map +1 -0
  1123. package/dist/schema/plugin_jobs.js +87 -0
  1124. package/dist/schema/plugin_jobs.js.map +1 -0
  1125. package/dist/schema/plugin_lifecycle_acknowledgments.d.ts +59 -0
  1126. package/dist/schema/plugin_lifecycle_acknowledgments.d.ts.map +1 -0
  1127. package/dist/schema/plugin_lifecycle_acknowledgments.js +12 -0
  1128. package/dist/schema/plugin_lifecycle_acknowledgments.js.map +1 -0
  1129. package/dist/schema/plugin_logs.d.ts +142 -0
  1130. package/dist/schema/plugin_logs.d.ts.map +1 -0
  1131. package/dist/schema/plugin_logs.js +33 -0
  1132. package/dist/schema/plugin_logs.js.map +1 -0
  1133. package/dist/schema/plugin_managed_resources.d.ts +180 -0
  1134. package/dist/schema/plugin_managed_resources.d.ts.map +1 -0
  1135. package/dist/schema/plugin_managed_resources.js +25 -0
  1136. package/dist/schema/plugin_managed_resources.js.map +1 -0
  1137. package/dist/schema/plugin_state.d.ts +169 -0
  1138. package/dist/schema/plugin_state.d.ts.map +1 -0
  1139. package/dist/schema/plugin_state.js +68 -0
  1140. package/dist/schema/plugin_state.js.map +1 -0
  1141. package/dist/schema/plugin_webhooks.d.ts +256 -0
  1142. package/dist/schema/plugin_webhooks.d.ts.map +1 -0
  1143. package/dist/schema/plugin_webhooks.js +56 -0
  1144. package/dist/schema/plugin_webhooks.js.map +1 -0
  1145. package/dist/schema/plugins.d.ts +246 -0
  1146. package/dist/schema/plugins.d.ts.map +1 -0
  1147. package/dist/schema/plugins.js +31 -0
  1148. package/dist/schema/plugins.js.map +1 -0
  1149. package/dist/schema/principal_permission_grants.d.ts +163 -0
  1150. package/dist/schema/principal_permission_grants.d.ts.map +1 -0
  1151. package/dist/schema/principal_permission_grants.js +17 -0
  1152. package/dist/schema/principal_permission_grants.js.map +1 -0
  1153. package/dist/schema/project_access_members.d.ts +111 -0
  1154. package/dist/schema/project_access_members.d.ts.map +1 -0
  1155. package/dist/schema/project_access_members.js +18 -0
  1156. package/dist/schema/project_access_members.js.map +1 -0
  1157. package/dist/schema/project_goals.d.ts +93 -0
  1158. package/dist/schema/project_goals.d.ts.map +1 -0
  1159. package/dist/schema/project_goals.js +17 -0
  1160. package/dist/schema/project_goals.js.map +1 -0
  1161. package/dist/schema/project_memberships.d.ts +144 -0
  1162. package/dist/schema/project_memberships.d.ts.map +1 -0
  1163. package/dist/schema/project_memberships.js +19 -0
  1164. package/dist/schema/project_memberships.js.map +1 -0
  1165. package/dist/schema/project_workspaces.d.ts +333 -0
  1166. package/dist/schema/project_workspaces.d.ts.map +1 -0
  1167. package/dist/schema/project_workspaces.js +32 -0
  1168. package/dist/schema/project_workspaces.js.map +1 -0
  1169. package/dist/schema/projects.d.ts +353 -0
  1170. package/dist/schema/projects.d.ts.map +1 -0
  1171. package/dist/schema/projects.js +34 -0
  1172. package/dist/schema/projects.js.map +1 -0
  1173. package/dist/schema/provider_trace_records.d.ts +264 -0
  1174. package/dist/schema/provider_trace_records.d.ts.map +1 -0
  1175. package/dist/schema/provider_trace_records.js +34 -0
  1176. package/dist/schema/provider_trace_records.js.map +1 -0
  1177. package/dist/schema/public_mcp.d.ts +2100 -0
  1178. package/dist/schema/public_mcp.d.ts.map +1 -0
  1179. package/dist/schema/public_mcp.js +191 -0
  1180. package/dist/schema/public_mcp.js.map +1 -0
  1181. package/dist/schema/remote_agent_profiles.d.ts +238 -0
  1182. package/dist/schema/remote_agent_profiles.d.ts.map +1 -0
  1183. package/dist/schema/remote_agent_profiles.js +31 -0
  1184. package/dist/schema/remote_agent_profiles.js.map +1 -0
  1185. package/dist/schema/resource_lifecycle_events.d.ts +115 -0
  1186. package/dist/schema/resource_lifecycle_events.d.ts.map +1 -0
  1187. package/dist/schema/resource_lifecycle_events.js +19 -0
  1188. package/dist/schema/resource_lifecycle_events.js.map +1 -0
  1189. package/dist/schema/routine_documents.d.ts +127 -0
  1190. package/dist/schema/routine_documents.d.ts.map +1 -0
  1191. package/dist/schema/routine_documents.js +18 -0
  1192. package/dist/schema/routine_documents.js.map +1 -0
  1193. package/dist/schema/routines.d.ts +1611 -0
  1194. package/dist/schema/routines.d.ts.map +1 -0
  1195. package/dist/schema/routines.js +140 -0
  1196. package/dist/schema/routines.js.map +1 -0
  1197. package/dist/schema/run_identity_contexts.d.ts +248 -0
  1198. package/dist/schema/run_identity_contexts.d.ts.map +1 -0
  1199. package/dist/schema/run_identity_contexts.js +29 -0
  1200. package/dist/schema/run_identity_contexts.js.map +1 -0
  1201. package/dist/schema/runner_api_response_reservations.d.ts +110 -0
  1202. package/dist/schema/runner_api_response_reservations.d.ts.map +1 -0
  1203. package/dist/schema/runner_api_response_reservations.js +13 -0
  1204. package/dist/schema/runner_api_response_reservations.js.map +1 -0
  1205. package/dist/schema/secret_access_events.d.ts +382 -0
  1206. package/dist/schema/secret_access_events.d.ts.map +1 -0
  1207. package/dist/schema/secret_access_events.js +39 -0
  1208. package/dist/schema/secret_access_events.js.map +1 -0
  1209. package/dist/schema/smoke_lab.d.ts +367 -0
  1210. package/dist/schema/smoke_lab.d.ts.map +1 -0
  1211. package/dist/schema/smoke_lab.js +33 -0
  1212. package/dist/schema/smoke_lab.js.map +1 -0
  1213. package/dist/schema/status_cards.d.ts +949 -0
  1214. package/dist/schema/status_cards.d.ts.map +1 -0
  1215. package/dist/schema/status_cards.js +70 -0
  1216. package/dist/schema/status_cards.js.map +1 -0
  1217. package/dist/schema/status_decision_effects.d.ts +299 -0
  1218. package/dist/schema/status_decision_effects.d.ts.map +1 -0
  1219. package/dist/schema/status_decision_effects.js +37 -0
  1220. package/dist/schema/status_decision_effects.js.map +1 -0
  1221. package/dist/schema/status_decisions.d.ts +282 -0
  1222. package/dist/schema/status_decisions.d.ts.map +1 -0
  1223. package/dist/schema/status_decisions.js +49 -0
  1224. package/dist/schema/status_decisions.js.map +1 -0
  1225. package/dist/schema/summary_slots.d.ts +252 -0
  1226. package/dist/schema/summary_slots.d.ts.map +1 -0
  1227. package/dist/schema/summary_slots.js +32 -0
  1228. package/dist/schema/summary_slots.js.map +1 -0
  1229. package/dist/schema/terminal_ssh_hosts.d.ts +127 -0
  1230. package/dist/schema/terminal_ssh_hosts.d.ts.map +1 -0
  1231. package/dist/schema/terminal_ssh_hosts.js +14 -0
  1232. package/dist/schema/terminal_ssh_hosts.js.map +1 -0
  1233. package/dist/schema/tool_access.d.ts +8433 -0
  1234. package/dist/schema/tool_access.d.ts.map +1 -0
  1235. package/dist/schema/tool_access.js +737 -0
  1236. package/dist/schema/tool_access.js.map +1 -0
  1237. package/dist/schema/tool_action_deliveries.d.ts +111 -0
  1238. package/dist/schema/tool_action_deliveries.d.ts.map +1 -0
  1239. package/dist/schema/tool_action_deliveries.js +27 -0
  1240. package/dist/schema/tool_action_deliveries.js.map +1 -0
  1241. package/dist/schema/tool_connection_app_snapshots.d.ts +184 -0
  1242. package/dist/schema/tool_connection_app_snapshots.d.ts.map +1 -0
  1243. package/dist/schema/tool_connection_app_snapshots.js +20 -0
  1244. package/dist/schema/tool_connection_app_snapshots.js.map +1 -0
  1245. package/dist/schema/tool_connection_app_syncs.d.ts +215 -0
  1246. package/dist/schema/tool_connection_app_syncs.d.ts.map +1 -0
  1247. package/dist/schema/tool_connection_app_syncs.js +22 -0
  1248. package/dist/schema/tool_connection_app_syncs.js.map +1 -0
  1249. package/dist/schema/user_company_preferences.d.ts +127 -0
  1250. package/dist/schema/user_company_preferences.d.ts.map +1 -0
  1251. package/dist/schema/user_company_preferences.js +16 -0
  1252. package/dist/schema/user_company_preferences.js.map +1 -0
  1253. package/dist/schema/user_inbox_agent_policies.d.ts +131 -0
  1254. package/dist/schema/user_inbox_agent_policies.d.ts.map +1 -0
  1255. package/dist/schema/user_inbox_agent_policies.js +17 -0
  1256. package/dist/schema/user_inbox_agent_policies.js.map +1 -0
  1257. package/dist/schema/user_secret_declarations.d.ts +229 -0
  1258. package/dist/schema/user_secret_declarations.d.ts.map +1 -0
  1259. package/dist/schema/user_secret_declarations.js +31 -0
  1260. package/dist/schema/user_secret_declarations.js.map +1 -0
  1261. package/dist/schema/user_secret_definitions.d.ts +316 -0
  1262. package/dist/schema/user_secret_definitions.d.ts.map +1 -0
  1263. package/dist/schema/user_secret_definitions.js +33 -0
  1264. package/dist/schema/user_secret_definitions.js.map +1 -0
  1265. package/dist/schema/user_sidebar_preferences.d.ts +95 -0
  1266. package/dist/schema/user_sidebar_preferences.d.ts.map +1 -0
  1267. package/dist/schema/user_sidebar_preferences.js +11 -0
  1268. package/dist/schema/user_sidebar_preferences.js.map +1 -0
  1269. package/dist/schema/web_push_subscriptions.d.ts +197 -0
  1270. package/dist/schema/web_push_subscriptions.d.ts.map +1 -0
  1271. package/dist/schema/web_push_subscriptions.js +18 -0
  1272. package/dist/schema/web_push_subscriptions.js.map +1 -0
  1273. package/dist/schema/work_assessments.d.ts +333 -0
  1274. package/dist/schema/work_assessments.d.ts.map +1 -0
  1275. package/dist/schema/work_assessments.js +67 -0
  1276. package/dist/schema/work_assessments.js.map +1 -0
  1277. package/dist/schema/workspace_operations.d.ts +384 -0
  1278. package/dist/schema/workspace_operations.d.ts.map +1 -0
  1279. package/dist/schema/workspace_operations.js +40 -0
  1280. package/dist/schema/workspace_operations.js.map +1 -0
  1281. package/dist/schema/workspace_runtime_services.d.ts +523 -0
  1282. package/dist/schema/workspace_runtime_services.d.ts.map +1 -0
  1283. package/dist/schema/workspace_runtime_services.js +53 -0
  1284. package/dist/schema/workspace_runtime_services.js.map +1 -0
  1285. package/dist/session-goal-migration.test.d.ts +2 -0
  1286. package/dist/session-goal-migration.test.d.ts.map +1 -0
  1287. package/dist/session-goal-migration.test.js +47 -0
  1288. package/dist/session-goal-migration.test.js.map +1 -0
  1289. package/dist/speko-voice-migration.test.d.ts +2 -0
  1290. package/dist/speko-voice-migration.test.d.ts.map +1 -0
  1291. package/dist/speko-voice-migration.test.js +88 -0
  1292. package/dist/speko-voice-migration.test.js.map +1 -0
  1293. package/dist/status-card-migrations.test.d.ts +2 -0
  1294. package/dist/status-card-migrations.test.d.ts.map +1 -0
  1295. package/dist/status-card-migrations.test.js +34 -0
  1296. package/dist/status-card-migrations.test.js.map +1 -0
  1297. package/dist/summary-slots-schema.test.d.ts +2 -0
  1298. package/dist/summary-slots-schema.test.d.ts.map +1 -0
  1299. package/dist/summary-slots-schema.test.js +62 -0
  1300. package/dist/summary-slots-schema.test.js.map +1 -0
  1301. package/dist/table-size-estimates.d.ts +366 -0
  1302. package/dist/table-size-estimates.d.ts.map +1 -0
  1303. package/dist/table-size-estimates.js +153 -0
  1304. package/dist/table-size-estimates.js.map +1 -0
  1305. package/dist/test-embedded-postgres.d.ts +37 -0
  1306. package/dist/test-embedded-postgres.d.ts.map +1 -0
  1307. package/dist/test-embedded-postgres.js +240 -0
  1308. package/dist/test-embedded-postgres.js.map +1 -0
  1309. package/dist/test-embedded-postgres.test.d.ts +2 -0
  1310. package/dist/test-embedded-postgres.test.d.ts.map +1 -0
  1311. package/dist/test-embedded-postgres.test.js +76 -0
  1312. package/dist/test-embedded-postgres.test.js.map +1 -0
  1313. package/dist/vercel-connect-credential-source-migration.test.d.ts +2 -0
  1314. package/dist/vercel-connect-credential-source-migration.test.d.ts.map +1 -0
  1315. package/dist/vercel-connect-credential-source-migration.test.js +71 -0
  1316. package/dist/vercel-connect-credential-source-migration.test.js.map +1 -0
  1317. package/dist/work-signals.d.ts +20 -0
  1318. package/dist/work-signals.d.ts.map +1 -0
  1319. package/dist/work-signals.js +123 -0
  1320. package/dist/work-signals.js.map +1 -0
  1321. package/dist/work-signals.test.d.ts +2 -0
  1322. package/dist/work-signals.test.d.ts.map +1 -0
  1323. package/dist/work-signals.test.js +177 -0
  1324. package/dist/work-signals.test.js.map +1 -0
  1325. package/node_modules/async-exit-hook/index.js +171 -0
  1326. package/node_modules/async-exit-hook/license +21 -0
  1327. package/node_modules/async-exit-hook/package.json +66 -0
  1328. package/node_modules/async-exit-hook/readme.md +118 -0
  1329. package/node_modules/embedded-postgres/LICENSE.md +9 -0
  1330. package/node_modules/embedded-postgres/README.md +191 -0
  1331. package/node_modules/embedded-postgres/dist/binary.d.ts +7 -0
  1332. package/node_modules/embedded-postgres/dist/binary.js +41 -0
  1333. package/node_modules/embedded-postgres/dist/index.d.ts +58 -0
  1334. package/node_modules/embedded-postgres/dist/index.js +366 -0
  1335. package/node_modules/embedded-postgres/dist/types.d.ts +54 -0
  1336. package/node_modules/embedded-postgres/dist/types.js +1 -0
  1337. package/node_modules/embedded-postgres/package.json +59 -0
  1338. package/node_modules/pg/LICENSE +21 -0
  1339. package/node_modules/pg/README.md +96 -0
  1340. package/node_modules/pg/esm/index.mjs +20 -0
  1341. package/node_modules/pg/lib/client.js +846 -0
  1342. package/node_modules/pg/lib/connection-parameters.js +184 -0
  1343. package/node_modules/pg/lib/connection.js +250 -0
  1344. package/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
  1345. package/node_modules/pg/lib/crypto/sasl.js +262 -0
  1346. package/node_modules/pg/lib/crypto/utils.js +89 -0
  1347. package/node_modules/pg/lib/defaults.js +94 -0
  1348. package/node_modules/pg/lib/index.js +73 -0
  1349. package/node_modules/pg/lib/native/client.js +428 -0
  1350. package/node_modules/pg/lib/native/index.js +2 -0
  1351. package/node_modules/pg/lib/native/query.js +167 -0
  1352. package/node_modules/pg/lib/query.js +263 -0
  1353. package/node_modules/pg/lib/result.js +109 -0
  1354. package/node_modules/pg/lib/stream.js +83 -0
  1355. package/node_modules/pg/lib/type-overrides.js +35 -0
  1356. package/node_modules/pg/lib/utils.js +225 -0
  1357. package/node_modules/pg/package.json +76 -0
  1358. package/node_modules/pg-cloudflare/LICENSE +21 -0
  1359. package/node_modules/pg-cloudflare/README.md +112 -0
  1360. package/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
  1361. package/node_modules/pg-cloudflare/dist/empty.js +6 -0
  1362. package/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
  1363. package/node_modules/pg-cloudflare/dist/index.d.ts +29 -0
  1364. package/node_modules/pg-cloudflare/dist/index.js +171 -0
  1365. package/node_modules/pg-cloudflare/dist/index.js.map +1 -0
  1366. package/node_modules/pg-cloudflare/esm/index.mjs +3 -0
  1367. package/node_modules/pg-cloudflare/package.json +39 -0
  1368. package/node_modules/pg-cloudflare/src/empty.ts +3 -0
  1369. package/node_modules/pg-cloudflare/src/index.ts +187 -0
  1370. package/node_modules/pg-cloudflare/src/types.d.ts +25 -0
  1371. package/node_modules/pg-connection-string/LICENSE +21 -0
  1372. package/node_modules/pg-connection-string/README.md +105 -0
  1373. package/node_modules/pg-connection-string/esm/index.mjs +8 -0
  1374. package/node_modules/pg-connection-string/index.d.ts +37 -0
  1375. package/node_modules/pg-connection-string/index.js +237 -0
  1376. package/node_modules/pg-connection-string/package.json +51 -0
  1377. package/node_modules/pg-int8/LICENSE +13 -0
  1378. package/node_modules/pg-int8/README.md +16 -0
  1379. package/node_modules/pg-int8/index.js +100 -0
  1380. package/node_modules/pg-int8/package.json +24 -0
  1381. package/node_modules/pg-pool/LICENSE +21 -0
  1382. package/node_modules/pg-pool/README.md +357 -0
  1383. package/node_modules/pg-pool/esm/index.mjs +5 -0
  1384. package/node_modules/pg-pool/index.js +517 -0
  1385. package/node_modules/pg-pool/package.json +51 -0
  1386. package/node_modules/pg-protocol/LICENSE +21 -0
  1387. package/node_modules/pg-protocol/README.md +3 -0
  1388. package/node_modules/pg-protocol/dist/b.d.ts +1 -0
  1389. package/node_modules/pg-protocol/dist/b.js +23 -0
  1390. package/node_modules/pg-protocol/dist/b.js.map +1 -0
  1391. package/node_modules/pg-protocol/dist/buffer-reader.d.ts +14 -0
  1392. package/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
  1393. package/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
  1394. package/node_modules/pg-protocol/dist/buffer-writer.d.ts +21 -0
  1395. package/node_modules/pg-protocol/dist/buffer-writer.js +113 -0
  1396. package/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
  1397. package/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
  1398. package/node_modules/pg-protocol/dist/inbound-parser.test.js +538 -0
  1399. package/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
  1400. package/node_modules/pg-protocol/dist/index.d.ts +5 -0
  1401. package/node_modules/pg-protocol/dist/index.js +15 -0
  1402. package/node_modules/pg-protocol/dist/index.js.map +1 -0
  1403. package/node_modules/pg-protocol/dist/messages.d.ts +161 -0
  1404. package/node_modules/pg-protocol/dist/messages.js +160 -0
  1405. package/node_modules/pg-protocol/dist/messages.js.map +1 -0
  1406. package/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
  1407. package/node_modules/pg-protocol/dist/outbound-serializer.test.js +325 -0
  1408. package/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
  1409. package/node_modules/pg-protocol/dist/parser.d.ts +22 -0
  1410. package/node_modules/pg-protocol/dist/parser.js +325 -0
  1411. package/node_modules/pg-protocol/dist/parser.js.map +1 -0
  1412. package/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
  1413. package/node_modules/pg-protocol/dist/serializer.js +198 -0
  1414. package/node_modules/pg-protocol/dist/serializer.js.map +1 -0
  1415. package/node_modules/pg-protocol/esm/index.js +11 -0
  1416. package/node_modules/pg-protocol/package.json +44 -0
  1417. package/node_modules/pg-protocol/src/b.ts +25 -0
  1418. package/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
  1419. package/node_modules/pg-protocol/src/buffer-writer.ts +120 -0
  1420. package/node_modules/pg-protocol/src/inbound-parser.test.ts +585 -0
  1421. package/node_modules/pg-protocol/src/index.ts +11 -0
  1422. package/node_modules/pg-protocol/src/messages.ts +262 -0
  1423. package/node_modules/pg-protocol/src/outbound-serializer.test.ts +356 -0
  1424. package/node_modules/pg-protocol/src/parser.ts +414 -0
  1425. package/node_modules/pg-protocol/src/serializer.ts +286 -0
  1426. package/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
  1427. package/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
  1428. package/node_modules/pg-types/.travis.yml +7 -0
  1429. package/node_modules/pg-types/Makefile +14 -0
  1430. package/node_modules/pg-types/README.md +75 -0
  1431. package/node_modules/pg-types/index.d.ts +137 -0
  1432. package/node_modules/pg-types/index.js +47 -0
  1433. package/node_modules/pg-types/index.test-d.ts +21 -0
  1434. package/node_modules/pg-types/lib/arrayParser.js +11 -0
  1435. package/node_modules/pg-types/lib/binaryParsers.js +257 -0
  1436. package/node_modules/pg-types/lib/builtins.js +73 -0
  1437. package/node_modules/pg-types/lib/textParsers.js +215 -0
  1438. package/node_modules/pg-types/package.json +42 -0
  1439. package/node_modules/pg-types/test/index.js +24 -0
  1440. package/node_modules/pg-types/test/types.js +597 -0
  1441. package/node_modules/pgpass/README.md +74 -0
  1442. package/node_modules/pgpass/lib/helper.js +233 -0
  1443. package/node_modules/pgpass/lib/index.js +23 -0
  1444. package/node_modules/pgpass/package.json +41 -0
  1445. package/node_modules/postgres-array/index.d.ts +4 -0
  1446. package/node_modules/postgres-array/index.js +97 -0
  1447. package/node_modules/postgres-array/license +21 -0
  1448. package/node_modules/postgres-array/package.json +35 -0
  1449. package/node_modules/postgres-array/readme.md +43 -0
  1450. package/node_modules/postgres-bytea/index.js +33 -0
  1451. package/node_modules/postgres-bytea/license +21 -0
  1452. package/node_modules/postgres-bytea/package.json +34 -0
  1453. package/node_modules/postgres-bytea/readme.md +34 -0
  1454. package/node_modules/postgres-date/index.js +116 -0
  1455. package/node_modules/postgres-date/license +21 -0
  1456. package/node_modules/postgres-date/package.json +33 -0
  1457. package/node_modules/postgres-date/readme.md +49 -0
  1458. package/node_modules/postgres-interval/index.d.ts +20 -0
  1459. package/node_modules/postgres-interval/index.js +125 -0
  1460. package/node_modules/postgres-interval/license +21 -0
  1461. package/node_modules/postgres-interval/package.json +36 -0
  1462. package/node_modules/postgres-interval/readme.md +48 -0
  1463. package/node_modules/split2/LICENSE +13 -0
  1464. package/node_modules/split2/README.md +85 -0
  1465. package/node_modules/split2/bench.js +27 -0
  1466. package/node_modules/split2/index.js +141 -0
  1467. package/node_modules/split2/package.json +39 -0
  1468. package/node_modules/split2/test.js +409 -0
  1469. package/node_modules/xtend/.jshintrc +30 -0
  1470. package/node_modules/xtend/LICENSE +20 -0
  1471. package/node_modules/xtend/README.md +32 -0
  1472. package/node_modules/xtend/immutable.js +19 -0
  1473. package/node_modules/xtend/mutable.js +17 -0
  1474. package/node_modules/xtend/package.json +55 -0
  1475. package/node_modules/xtend/test.js +103 -0
  1476. package/package.json +61 -10
  1477. package/README.md +0 -8
  1478. package/index.js +0 -1
@@ -0,0 +1,737 @@
1
+ import { sql, } from "drizzle-orm";
2
+ import { boolean, check, foreignKey, index, integer, jsonb, pgTable, text, timestamp, unique, uniqueIndex, uuid, } from "drizzle-orm/pg-core";
3
+ import { agents } from "./agents.js";
4
+ import { approvals } from "./approvals.js";
5
+ import { companies } from "./companies.js";
6
+ import { executionWorkspaces } from "./execution_workspaces.js";
7
+ import { heartbeatRuns } from "./heartbeat_runs.js";
8
+ import { issueThreadInteractions } from "./issue_thread_interactions.js";
9
+ import { issues } from "./issues.js";
10
+ import { plugins } from "./plugins.js";
11
+ import { projects } from "./projects.js";
12
+ import { projectWorkspaces } from "./project_workspaces.js";
13
+ export const toolApplications = pgTable("tool_applications", {
14
+ id: uuid("id").primaryKey().defaultRandom(),
15
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
16
+ applicationKey: text("application_key"),
17
+ name: text("name").notNull(),
18
+ description: text("description"),
19
+ type: text("type").$type().notNull(),
20
+ status: text("status").$type().notNull().default("active"),
21
+ pluginId: uuid("plugin_id").references(() => plugins.id, { onDelete: "set null" }),
22
+ ownerAgentId: uuid("owner_agent_id").references(() => agents.id, { onDelete: "set null" }),
23
+ ownerUserId: text("owner_user_id"),
24
+ metadata: jsonb("metadata").$type().notNull().default({}),
25
+ archivedAt: timestamp("archived_at", { withTimezone: true }),
26
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
27
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
28
+ }, (table) => [
29
+ index("tool_applications_company_idx").on(table.companyId),
30
+ index("tool_applications_company_status_idx").on(table.companyId, table.status),
31
+ uniqueIndex("tool_applications_company_name_uq").on(table.companyId, table.name),
32
+ uniqueIndex("tool_applications_company_key_uq").on(table.companyId, table.applicationKey),
33
+ ]);
34
+ export const toolConnections = pgTable("tool_connections", {
35
+ id: uuid("id").primaryKey().defaultRandom(),
36
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
37
+ // NO ACTION (not CASCADE) so the database itself refuses to delete an application that still
38
+ // has connections. This closes the delete-vs-create race in DELETE
39
+ // /tool-applications/:applicationId: a connection inserted concurrently takes a FOR KEY SHARE
40
+ // lock on the parent row, so the delete fails closed with a foreign-key violation instead of
41
+ // silently cascading the new connection away. NO ACTION (checked at end-of-statement) rather
42
+ // than RESTRICT (checked immediately) is deliberate: it lets a company delete still cascade —
43
+ // companies → tool_applications and companies → tool_connections both fire in one statement,
44
+ // and the connections are gone by the time this constraint is checked.
45
+ applicationId: uuid("application_id").notNull().references(() => toolApplications.id, { onDelete: "no action" }),
46
+ name: text("name").notNull(),
47
+ uid: text("uid").notNull(),
48
+ connectionKind: text("connection_kind").$type().notNull().default("managed"),
49
+ connectionPurpose: text("connection_purpose").$type().notNull().default("tool"),
50
+ ownership: text("ownership").$type().notNull().default("customer"),
51
+ transport: text("transport").$type().notNull(),
52
+ authKind: text("auth_kind").$type().notNull().default("none"),
53
+ credentialSource: text("credential_source").$type().notNull().default("paperclip_vault"),
54
+ externalCredential: jsonb("external_credential").$type(),
55
+ credentialPolicy: text("credential_policy").$type().notNull().default("shared"),
56
+ status: text("status").$type().notNull().default("draft"),
57
+ enabled: boolean("enabled").notNull().default(false),
58
+ agentInstructions: jsonb("agent_instructions").$type(),
59
+ config: jsonb("config").$type().notNull().default({}),
60
+ transportConfig: jsonb("transport_config").$type().notNull().default({}),
61
+ credentialRefs: jsonb("credential_refs").$type().notNull().default([]),
62
+ credentialSecretRefs: jsonb("credential_secret_refs").$type().notNull().default([]),
63
+ healthStatus: text("health_status").$type().notNull().default("unchecked"),
64
+ healthMessage: text("health_message"),
65
+ healthCheckedAt: timestamp("health_checked_at", { withTimezone: true }),
66
+ lastHealthAt: timestamp("last_health_at", { withTimezone: true }),
67
+ lastCatalogRefreshAt: timestamp("last_catalog_refresh_at", { withTimezone: true }),
68
+ lastError: text("last_error"),
69
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
70
+ createdByUserId: text("created_by_user_id"),
71
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
72
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
73
+ }, (table) => [
74
+ check("tool_connections_ownership_check", sql `${table.ownership} in ('platform_shared', 'platform_provisioned', 'customer', 'dcr')`),
75
+ check("tool_connections_transport_check", sql `${table.transport} in ('mcp_remote', 'rest_api', 'local_stdio', 'chat_sdk', 'voice', 'runtime_auth')`),
76
+ check("tool_connections_purpose_check", sql `${table.connectionPurpose} in ('tool', 'channel', 'ai')`),
77
+ check("tool_connections_channel_transport_check", sql `(
78
+ (${table.connectionPurpose} = 'tool' and ${table.transport} not in ('chat_sdk', 'voice', 'runtime_auth'))
79
+ or
80
+ (${table.connectionPurpose} = 'channel' and (${table.transport} in ('chat_sdk', 'voice') or (${table.transport} = 'rest_api' and ${table.config}->>'provider' = 'agentmail')))
81
+ or
82
+ (${table.connectionPurpose} = 'ai' and ${table.transport} = 'runtime_auth')
83
+ )`),
84
+ check("tool_connections_auth_kind_check", sql `${table.authKind} in ('oauth', 'api_key', 'none')`),
85
+ check("tool_connections_credential_source_check", sql `${table.credentialSource} in ('paperclip_vault', 'vercel_connect')`),
86
+ check("tool_connections_credential_source_one_of_check", sql `(
87
+ (${table.credentialSource} = 'paperclip_vault' and ${table.externalCredential} is null)
88
+ or
89
+ (${table.credentialSource} = 'vercel_connect' and ${table.externalCredential} is not null and jsonb_array_length(${table.credentialRefs}) = 0 and jsonb_array_length(${table.credentialSecretRefs}) = 0)
90
+ )`),
91
+ check("tool_connections_credential_policy_check", sql `${table.credentialPolicy} in ('shared', 'per_user', 'per_user_with_fallback', 'per_agent')`),
92
+ index("tool_connections_company_idx").on(table.companyId),
93
+ index("tool_connections_application_idx").on(table.applicationId),
94
+ index("tool_connections_company_enabled_idx").on(table.companyId, table.enabled),
95
+ uniqueIndex("tool_connections_company_uid_uq").on(table.companyId, table.uid),
96
+ unique("tool_connections_company_id_uq").on(table.companyId, table.id),
97
+ ]);
98
+ export const connectionGrants = pgTable("connection_grants", {
99
+ id: uuid("id").primaryKey().defaultRandom(),
100
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
101
+ connectionId: uuid("connection_id").notNull(),
102
+ kind: text("kind").$type().notNull(),
103
+ subjectUserId: text("subject_user_id"),
104
+ subjectAgentId: uuid("subject_agent_id").references(() => agents.id, { onDelete: "cascade" }),
105
+ providerTenant: jsonb("provider_tenant").$type(),
106
+ credentialSecretRefs: jsonb("credential_secret_refs").$type().notNull().default([]),
107
+ externalCredential: jsonb("external_credential").$type(),
108
+ status: text("status").$type().notNull().default("active"),
109
+ isDefault: boolean("is_default").notNull().default(false),
110
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
111
+ createdByUserId: text("created_by_user_id"),
112
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
113
+ revokedByAgentId: uuid("revoked_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
114
+ revokedByUserId: text("revoked_by_user_id"),
115
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }),
116
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
117
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
118
+ }, (table) => [
119
+ check("connection_grants_kind_check", sql `${table.kind} in ('organization', 'user', 'agent')`),
120
+ check("connection_grants_status_check", sql `${table.status} in ('active', 'revoked', 'expired', 'needs_reauthorization')`),
121
+ check("connection_grants_credential_source_one_of_check", sql `${table.externalCredential} is null or jsonb_array_length(${table.credentialSecretRefs}) = 0`),
122
+ check("connection_grants_subject_check", sql `(${table.kind} = 'user' and ${table.subjectUserId} is not null and ${table.subjectAgentId} is null) or (${table.kind} = 'agent' and ${table.subjectAgentId} is not null and ${table.subjectUserId} is null) or (${table.kind} = 'organization' and ${table.subjectUserId} is null and ${table.subjectAgentId} is null)`),
123
+ check("connection_grants_default_check", sql `${table.isDefault} = false or ${table.kind} = 'organization'`),
124
+ foreignKey({
125
+ columns: [table.companyId, table.connectionId],
126
+ foreignColumns: [toolConnections.companyId, toolConnections.id],
127
+ name: "connection_grants_company_connection_fk",
128
+ }).onDelete("cascade"),
129
+ index("connection_grants_company_connection_idx").on(table.companyId, table.connectionId),
130
+ index("connection_grants_subject_user_idx").on(table.companyId, table.subjectUserId),
131
+ index("connection_grants_subject_agent_idx").on(table.companyId, table.subjectAgentId),
132
+ unique("connection_grants_company_id_uq").on(table.companyId, table.id),
133
+ uniqueIndex("connection_grants_user_uq").on(table.connectionId, table.subjectUserId),
134
+ uniqueIndex("connection_grants_agent_uq").on(table.connectionId, table.subjectAgentId),
135
+ uniqueIndex("connection_grants_default_uq").on(table.connectionId).where(sql `${table.isDefault} = true and ${table.kind} = 'organization'`),
136
+ ]);
137
+ export const connectionGrantMembers = pgTable("connection_grant_members", {
138
+ id: uuid("id").primaryKey().defaultRandom(),
139
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
140
+ grantId: uuid("grant_id").notNull(),
141
+ subjectType: text("subject_type").$type().notNull(),
142
+ subjectId: text("subject_id").notNull(),
143
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
144
+ }, (table) => [
145
+ check("connection_grant_members_subject_type_check", sql `${table.subjectType} in ('user')`),
146
+ foreignKey({
147
+ columns: [table.companyId, table.grantId],
148
+ foreignColumns: [connectionGrants.companyId, connectionGrants.id],
149
+ name: "connection_grant_members_company_grant_fk",
150
+ }).onDelete("cascade"),
151
+ index("connection_grant_members_company_subject_idx").on(table.companyId, table.subjectType, table.subjectId),
152
+ uniqueIndex("connection_grant_members_grant_subject_uq").on(table.grantId, table.subjectType, table.subjectId),
153
+ ]);
154
+ export const connectionGrantDelegations = pgTable("connection_grant_delegations", {
155
+ id: uuid("id").primaryKey().defaultRandom(),
156
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
157
+ grantId: uuid("grant_id").notNull(),
158
+ agentId: uuid("agent_id").notNull().references(() => agents.id, { onDelete: "cascade" }),
159
+ createdByUserId: text("created_by_user_id").notNull(),
160
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
161
+ }, (table) => [
162
+ foreignKey({
163
+ columns: [table.companyId, table.grantId],
164
+ foreignColumns: [connectionGrants.companyId, connectionGrants.id],
165
+ name: "connection_grant_delegations_company_grant_fk",
166
+ }).onDelete("cascade"),
167
+ index("connection_grant_delegations_company_agent_idx").on(table.companyId, table.agentId),
168
+ uniqueIndex("connection_grant_delegations_grant_agent_uq").on(table.grantId, table.agentId),
169
+ ]);
170
+ export const toolConnectionInstalls = pgTable("tool_connection_installs", {
171
+ id: uuid("id").primaryKey().defaultRandom(),
172
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
173
+ connectionId: uuid("connection_id").notNull().references(() => toolConnections.id, { onDelete: "cascade" }),
174
+ targetType: text("target_type").$type().notNull(),
175
+ targetId: text("target_id").notNull(),
176
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
177
+ createdByUserId: text("created_by_user_id"),
178
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
179
+ }, (table) => [
180
+ check("tool_connection_installs_target_type_check", sql `${table.targetType} in ('company', 'agent')`),
181
+ index("tool_connection_installs_company_target_idx").on(table.companyId, table.targetType, table.targetId),
182
+ index("tool_connection_installs_connection_idx").on(table.companyId, table.connectionId),
183
+ uniqueIndex("tool_connection_installs_target_uq").on(table.companyId, table.connectionId, table.targetType, table.targetId),
184
+ ]);
185
+ export const toolOauthStates = pgTable("tool_oauth_states", {
186
+ state: text("state").primaryKey(),
187
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
188
+ connectionId: uuid("connection_id").notNull().references(() => toolConnections.id, { onDelete: "cascade" }),
189
+ codeVerifier: text("code_verifier").notNull(),
190
+ createdByActorType: text("created_by_actor_type"),
191
+ createdByActorId: text("created_by_actor_id"),
192
+ createdBySessionId: text("created_by_session_id"),
193
+ subjectUserId: text("subject_user_id"),
194
+ subjectAgentId: uuid("subject_agent_id").references(() => agents.id, { onDelete: "cascade" }),
195
+ requestedScopes: jsonb("requested_scopes").$type(),
196
+ returnTo: text("return_to"),
197
+ issueId: uuid("issue_id"),
198
+ interactionId: uuid("interaction_id"),
199
+ expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
200
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
201
+ }, (table) => [
202
+ index("tool_oauth_states_company_idx").on(table.companyId),
203
+ index("tool_oauth_states_connection_idx").on(table.connectionId),
204
+ index("tool_oauth_states_actor_idx").on(table.createdByActorType, table.createdByActorId),
205
+ index("tool_oauth_states_subject_agent_idx").on(table.companyId, table.subjectAgentId),
206
+ index("tool_oauth_states_expires_at_idx").on(table.expiresAt),
207
+ ]);
208
+ export const toolCatalogEntries = pgTable("tool_catalog_entries", {
209
+ id: uuid("id").primaryKey().defaultRandom(),
210
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
211
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "cascade" }),
212
+ connectionId: uuid("connection_id").notNull().references(() => toolConnections.id, { onDelete: "cascade" }),
213
+ entryKind: text("entry_kind").$type().notNull().default("tool"),
214
+ name: text("name").notNull(),
215
+ toolName: text("tool_name").notNull(),
216
+ title: text("title"),
217
+ description: text("description"),
218
+ inputSchema: jsonb("input_schema").$type().notNull().default({}),
219
+ outputSchema: jsonb("output_schema").$type(),
220
+ annotations: jsonb("annotations").$type().notNull().default({}),
221
+ riskLevel: text("risk_level").$type().notNull().default("read"),
222
+ isReadOnly: boolean("is_read_only").notNull().default(true),
223
+ isWrite: boolean("is_write").notNull().default(false),
224
+ isDestructive: boolean("is_destructive").notNull().default(false),
225
+ status: text("status").$type().notNull().default("active"),
226
+ version: text("version"),
227
+ versionHash: text("version_hash").notNull(),
228
+ schemaHash: text("schema_hash"),
229
+ firstSeenAt: timestamp("first_seen_at", { withTimezone: true }).notNull().defaultNow(),
230
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }).notNull().defaultNow(),
231
+ reviewedAt: timestamp("reviewed_at", { withTimezone: true }),
232
+ reviewedByAgentId: uuid("reviewed_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
233
+ reviewedByUserId: text("reviewed_by_user_id"),
234
+ quarantinedAt: timestamp("quarantined_at", { withTimezone: true }),
235
+ quarantineReason: text("quarantine_reason"),
236
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
237
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
238
+ }, (table) => [
239
+ index("tool_catalog_entries_company_idx").on(table.companyId),
240
+ index("tool_catalog_entries_application_idx").on(table.applicationId),
241
+ index("tool_catalog_entries_connection_idx").on(table.connectionId),
242
+ index("tool_catalog_entries_company_status_idx").on(table.companyId, table.status),
243
+ uniqueIndex("tool_catalog_entries_connection_name_uq").on(table.connectionId, table.name),
244
+ ]);
245
+ export const toolProfiles = pgTable("tool_profiles", {
246
+ id: uuid("id").primaryKey().defaultRandom(),
247
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
248
+ profileKey: text("profile_key").notNull(),
249
+ name: text("name").notNull(),
250
+ description: text("description"),
251
+ status: text("status").$type().notNull().default("active"),
252
+ defaultAction: text("default_action").$type().notNull().default("deny"),
253
+ newToolsReviewedAt: timestamp("new_tools_reviewed_at", { withTimezone: true }),
254
+ metadata: jsonb("metadata").$type().notNull().default({}),
255
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
256
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
257
+ }, (table) => [
258
+ index("tool_profiles_company_status_idx").on(table.companyId, table.status),
259
+ uniqueIndex("tool_profiles_company_key_uq").on(table.companyId, table.profileKey),
260
+ uniqueIndex("tool_profiles_company_name_uq").on(table.companyId, table.name),
261
+ ]);
262
+ export const toolProfileEntries = pgTable("tool_profile_entries", {
263
+ id: uuid("id").primaryKey().defaultRandom(),
264
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
265
+ profileId: uuid("profile_id").notNull().references(() => toolProfiles.id, { onDelete: "cascade" }),
266
+ selectorType: text("selector_type").$type().notNull(),
267
+ effect: text("effect").$type().notNull().default("include"),
268
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "cascade" }),
269
+ connectionId: uuid("connection_id").references(() => toolConnections.id, { onDelete: "cascade" }),
270
+ catalogEntryId: uuid("catalog_entry_id").references(() => toolCatalogEntries.id, { onDelete: "cascade" }),
271
+ toolName: text("tool_name"),
272
+ riskLevel: text("risk_level").$type(),
273
+ conditions: jsonb("conditions").$type(),
274
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
275
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
276
+ }, (table) => [
277
+ index("tool_profile_entries_company_profile_idx").on(table.companyId, table.profileId),
278
+ index("tool_profile_entries_application_idx").on(table.companyId, table.applicationId),
279
+ index("tool_profile_entries_connection_idx").on(table.companyId, table.connectionId),
280
+ index("tool_profile_entries_catalog_entry_idx").on(table.companyId, table.catalogEntryId),
281
+ ]);
282
+ export const toolProfileBindings = pgTable("tool_profile_bindings", {
283
+ id: uuid("id").primaryKey().defaultRandom(),
284
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
285
+ profileId: uuid("profile_id").notNull().references(() => toolProfiles.id, { onDelete: "cascade" }),
286
+ targetType: text("target_type").$type().notNull(),
287
+ targetId: text("target_id").notNull(),
288
+ priority: integer("priority").notNull().default(100),
289
+ metadata: jsonb("metadata").$type().notNull().default({}),
290
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
291
+ createdByUserId: text("created_by_user_id"),
292
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
293
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
294
+ }, (table) => [
295
+ index("tool_profile_bindings_company_target_idx").on(table.companyId, table.targetType, table.targetId),
296
+ uniqueIndex("tool_profile_bindings_target_profile_uq").on(table.companyId, table.targetType, table.targetId, table.profileId),
297
+ ]);
298
+ export const toolMcpGateways = pgTable("tool_mcp_gateways", {
299
+ id: uuid("id").primaryKey().defaultRandom(),
300
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
301
+ gatewayPublicId: text("gateway_public_id").notNull().default(sql `'gw_' || replace(gen_random_uuid()::text, '-', '')`),
302
+ name: text("name").notNull(),
303
+ slug: text("slug").notNull(),
304
+ displaySlug: text("display_slug").notNull().default(""),
305
+ description: text("description"),
306
+ status: text("status").$type().notNull().default("active"),
307
+ profileId: uuid("profile_id").notNull().references(() => toolProfiles.id, { onDelete: "restrict" }),
308
+ defaultProfileMode: text("default_profile_mode").$type().notNull().default("gateway_only"),
309
+ contextScopeType: text("context_scope_type").$type().notNull().default("none"),
310
+ contextScopeId: text("context_scope_id"),
311
+ agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
312
+ projectId: uuid("project_id").references(() => projects.id, { onDelete: "set null" }),
313
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
314
+ approvalIssueId: uuid("approval_issue_id").references(() => issues.id, { onDelete: "set null" }),
315
+ authConfig: jsonb("auth_config").$type().notNull().default({
316
+ version: 1,
317
+ bearer: {
318
+ enabled: true,
319
+ tokenPrefix: "pcgw",
320
+ defaultTtlSeconds: 7_776_000,
321
+ requireFiniteExpiry: true,
322
+ longLivedTokenRequiresOverride: true,
323
+ },
324
+ oauth: {
325
+ enabled: false,
326
+ reservedFor: "v1_5",
327
+ dynamicClientRegistration: false,
328
+ authorizationCodePkce: false,
329
+ },
330
+ }),
331
+ headerPolicy: jsonb("header_policy").$type().notNull().default({
332
+ version: 1,
333
+ callerPassthrough: { enabled: false, allowedHeaders: [] },
334
+ staticHeaders: [],
335
+ generatedMetadata: { enabled: false, allowedHeaders: [] },
336
+ responseHeaders: { forwardMcpRequiredHeaders: true, forwardSafeCacheHeaders: true },
337
+ }),
338
+ metadataPolicy: jsonb("metadata_policy").$type().notNull().default({
339
+ version: 1,
340
+ forwardCompanyId: false,
341
+ forwardGatewayId: false,
342
+ forwardProjectId: false,
343
+ forwardIssueId: false,
344
+ forwardAgentId: false,
345
+ forwardRunId: false,
346
+ forwardCorrelationId: true,
347
+ }),
348
+ onDemandToolsConfig: jsonb("on_demand_tools_config").$type().notNull().default({
349
+ enabled: false,
350
+ searchToolName: "search_tools",
351
+ runToolName: "run_tool",
352
+ }),
353
+ metadata: jsonb("metadata").$type().notNull().default({}),
354
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
355
+ createdByUserId: text("created_by_user_id"),
356
+ archivedAt: timestamp("archived_at", { withTimezone: true }),
357
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
358
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
359
+ }, (table) => [
360
+ index("tool_mcp_gateways_company_idx").on(table.companyId),
361
+ index("tool_mcp_gateways_company_status_idx").on(table.companyId, table.status),
362
+ index("tool_mcp_gateways_profile_idx").on(table.companyId, table.profileId),
363
+ uniqueIndex("tool_mcp_gateways_public_id_uq").on(table.gatewayPublicId),
364
+ uniqueIndex("tool_mcp_gateways_company_slug_uq").on(table.companyId, table.slug),
365
+ uniqueIndex("tool_mcp_gateways_company_name_uq").on(table.companyId, table.name),
366
+ ]);
367
+ export const toolMcpGatewayTokens = pgTable("tool_mcp_gateway_tokens", {
368
+ id: uuid("id").primaryKey().defaultRandom(),
369
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
370
+ gatewayId: uuid("gateway_id").notNull().references(() => toolMcpGateways.id, { onDelete: "cascade" }),
371
+ name: text("name").notNull(),
372
+ tokenHash: text("token_hash").notNull(),
373
+ tokenPrefix: text("token_prefix").notNull().default(""),
374
+ subjectType: text("subject_type").$type().notNull().default("gateway_client"),
375
+ subjectId: text("subject_id"),
376
+ clientLabel: text("client_label").notNull().default(""),
377
+ ownerNote: text("owner_note").notNull().default(""),
378
+ allowedActions: jsonb("allowed_actions").$type().notNull().default(["tools/list", "tools/call"]),
379
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
380
+ expiryOverrideReason: text("expiry_override_reason"),
381
+ expiryOverrideByUserId: text("expiry_override_by_user_id"),
382
+ expiryOverrideByAgentId: uuid("expiry_override_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
383
+ expiryOverrideAt: timestamp("expiry_override_at", { withTimezone: true }),
384
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }),
385
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
386
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
387
+ createdByUserId: text("created_by_user_id"),
388
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
389
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
390
+ }, (table) => [
391
+ uniqueIndex("tool_mcp_gateway_tokens_token_hash_uq").on(table.tokenHash),
392
+ index("tool_mcp_gateway_tokens_expiry_idx").on(table.expiresAt, table.id),
393
+ index("tool_mcp_gateway_tokens_gateway_idx").on(table.companyId, table.gatewayId),
394
+ index("tool_mcp_gateway_tokens_subject_idx").on(table.companyId, table.subjectType, table.subjectId),
395
+ index("tool_mcp_gateway_tokens_company_expires_idx").on(table.companyId, table.expiresAt),
396
+ ]);
397
+ export const toolPolicies = pgTable("tool_policies", {
398
+ id: uuid("id").primaryKey().defaultRandom(),
399
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
400
+ name: text("name").notNull(),
401
+ description: text("description"),
402
+ policyType: text("policy_type").$type().notNull(),
403
+ priority: integer("priority").notNull().default(100),
404
+ enabled: boolean("enabled").notNull().default(true),
405
+ selectors: jsonb("selectors").$type().notNull().default({}),
406
+ conditions: jsonb("conditions").$type(),
407
+ config: jsonb("config").$type(),
408
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
409
+ createdByUserId: text("created_by_user_id"),
410
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
411
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
412
+ }, (table) => [
413
+ index("tool_policies_company_enabled_idx").on(table.companyId, table.enabled),
414
+ index("tool_policies_company_type_idx").on(table.companyId, table.policyType),
415
+ uniqueIndex("tool_policies_company_name_uq").on(table.companyId, table.name),
416
+ ]);
417
+ export const toolRuntimeSlots = pgTable("tool_runtime_slots", {
418
+ id: uuid("id").primaryKey().defaultRandom(),
419
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
420
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "set null" }),
421
+ connectionId: uuid("connection_id").references(() => toolConnections.id, { onDelete: "cascade" }),
422
+ projectWorkspaceId: uuid("project_workspace_id").references(() => projectWorkspaces.id, { onDelete: "set null" }),
423
+ executionWorkspaceId: uuid("execution_workspace_id").references(() => executionWorkspaces.id, { onDelete: "set null" }),
424
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
425
+ ownerScopeType: text("owner_scope_type").notNull().default("connection"),
426
+ ownerScopeId: text("owner_scope_id"),
427
+ runtimeKind: text("runtime_kind").$type().notNull().default("local_stdio"),
428
+ slotKey: text("slot_key").notNull(),
429
+ status: text("status").$type().notNull().default("stopped"),
430
+ reuseKey: text("reuse_key"),
431
+ workspaceScope: text("workspace_scope"),
432
+ credentialScopeHash: text("credential_scope_hash"),
433
+ provider: text("provider"),
434
+ providerRef: text("provider_ref"),
435
+ processId: integer("process_id"),
436
+ commandTemplateKey: text("command_template_key"),
437
+ healthStatus: text("health_status").$type().notNull().default("unchecked"),
438
+ healthMessage: text("health_message"),
439
+ lastHealthCheckAt: timestamp("last_health_check_at", { withTimezone: true }),
440
+ lastStartedAt: timestamp("last_started_at", { withTimezone: true }),
441
+ startedAt: timestamp("started_at", { withTimezone: true }),
442
+ stoppedAt: timestamp("stopped_at", { withTimezone: true }),
443
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }),
444
+ idleExpiresAt: timestamp("idle_expires_at", { withTimezone: true }),
445
+ idleDeadlineAt: timestamp("idle_deadline_at", { withTimezone: true }),
446
+ lastError: text("last_error"),
447
+ metadata: jsonb("metadata").$type().notNull().default({}),
448
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
449
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
450
+ }, (table) => [
451
+ index("tool_runtime_slots_company_idx").on(table.companyId),
452
+ index("tool_runtime_slots_connection_idx").on(table.connectionId),
453
+ index("tool_runtime_slots_execution_workspace_idx").on(table.companyId, table.executionWorkspaceId),
454
+ uniqueIndex("tool_runtime_slots_slot_key_uq").on(table.companyId, table.slotKey),
455
+ ]);
456
+ export const toolStdioCommandTemplates = pgTable("tool_stdio_command_templates", {
457
+ id: uuid("id").primaryKey().defaultRandom(),
458
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
459
+ templateKey: text("template_key").notNull(),
460
+ name: text("name").notNull(),
461
+ description: text("description"),
462
+ status: text("status").$type().notNull().default("active"),
463
+ command: text("command").notNull(),
464
+ args: jsonb("args").$type().notNull().default([]),
465
+ envKeys: jsonb("env_keys").$type().notNull().default([]),
466
+ tools: jsonb("tools").$type().notNull().default([]),
467
+ createdByAgentId: uuid("created_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
468
+ createdByUserId: text("created_by_user_id"),
469
+ disabledAt: timestamp("disabled_at", { withTimezone: true }),
470
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
471
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
472
+ }, (table) => [
473
+ index("tool_stdio_command_templates_company_idx").on(table.companyId),
474
+ index("tool_stdio_command_templates_company_status_idx").on(table.companyId, table.status),
475
+ uniqueIndex("tool_stdio_command_templates_company_key_uq").on(table.companyId, table.templateKey),
476
+ ]);
477
+ export const toolGatewaySessions = pgTable("tool_gateway_sessions", {
478
+ id: uuid("id").primaryKey().defaultRandom(),
479
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
480
+ agentId: uuid("agent_id").notNull().references(() => agents.id, { onDelete: "cascade" }),
481
+ runId: uuid("run_id").notNull().references(() => heartbeatRuns.id, { onDelete: "cascade" }),
482
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
483
+ projectId: uuid("project_id").references(() => projects.id, { onDelete: "set null" }),
484
+ gatewayId: uuid("gateway_id").references(() => toolMcpGateways.id, { onDelete: "set null" }),
485
+ gatewayTokenId: uuid("gateway_token_id").references(() => toolMcpGatewayTokens.id, { onDelete: "set null" }),
486
+ gatewayPublicId: text("gateway_public_id"),
487
+ clientSubjectType: text("client_subject_type").$type(),
488
+ clientSubjectId: text("client_subject_id"),
489
+ clientName: text("client_name"),
490
+ mcpSessionId: text("mcp_session_id"),
491
+ correlationId: text("correlation_id"),
492
+ tokenHash: text("token_hash").notNull(),
493
+ expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
494
+ lastUsedAt: timestamp("last_used_at", { withTimezone: true }),
495
+ revokedAt: timestamp("revoked_at", { withTimezone: true }),
496
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
497
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
498
+ }, (table) => [
499
+ uniqueIndex("tool_gateway_sessions_token_hash_uq").on(table.tokenHash),
500
+ index("tool_gateway_sessions_company_agent_idx").on(table.companyId, table.agentId),
501
+ index("tool_gateway_sessions_company_expires_idx").on(table.companyId, table.expiresAt),
502
+ index("tool_gateway_sessions_run_idx").on(table.companyId, table.runId),
503
+ index("tool_gateway_sessions_issue_idx").on(table.companyId, table.issueId),
504
+ index("tool_gateway_sessions_gateway_idx").on(table.companyId, table.gatewayId),
505
+ ]);
506
+ export const toolGatewayRateLimitCounters = pgTable("tool_gateway_rate_limit_counters", {
507
+ id: uuid("id").primaryKey().defaultRandom(),
508
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
509
+ counterKey: text("counter_key").notNull(),
510
+ windowStartAt: timestamp("window_start_at", { withTimezone: true }).notNull(),
511
+ windowMs: integer("window_ms").notNull(),
512
+ limit: integer("limit").notNull(),
513
+ count: integer("count").notNull().default(0),
514
+ resetAt: timestamp("reset_at", { withTimezone: true }).notNull(),
515
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
516
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
517
+ }, (table) => [
518
+ index("tool_gateway_rate_limit_counters_company_idx").on(table.companyId),
519
+ uniqueIndex("tool_gateway_rate_limit_counters_window_uq").on(table.companyId, table.counterKey, table.windowStartAt),
520
+ ]);
521
+ export const toolInvocations = pgTable("tool_invocations", {
522
+ id: uuid("id").primaryKey().defaultRandom(),
523
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
524
+ idempotencyKey: text("idempotency_key"),
525
+ actorType: text("actor_type").notNull().default("system"),
526
+ actorId: text("actor_id"),
527
+ agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
528
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
529
+ runId: uuid("run_id").references(() => heartbeatRuns.id, { onDelete: "set null" }),
530
+ gatewayId: uuid("gateway_id").references(() => toolMcpGateways.id, { onDelete: "set null" }),
531
+ gatewayTokenId: uuid("gateway_token_id").references(() => toolMcpGatewayTokens.id, { onDelete: "set null" }),
532
+ gatewayPublicId: text("gateway_public_id"),
533
+ clientSubjectType: text("client_subject_type").$type(),
534
+ clientSubjectId: text("client_subject_id"),
535
+ clientName: text("client_name"),
536
+ mcpSessionId: text("mcp_session_id"),
537
+ correlationId: text("correlation_id"),
538
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "set null" }),
539
+ connectionId: uuid("connection_id").references(() => toolConnections.id, { onDelete: "set null" }),
540
+ catalogEntryId: uuid("catalog_entry_id").references(() => toolCatalogEntries.id, { onDelete: "set null" }),
541
+ catalogVersionHash: text("catalog_version_hash"),
542
+ catalogSchemaHash: text("catalog_schema_hash"),
543
+ providerType: text("provider_type"),
544
+ applicationKey: text("application_key"),
545
+ upstreamToolName: text("upstream_tool_name"),
546
+ riskLevel: text("risk_level").$type(),
547
+ toolName: text("tool_name").notNull(),
548
+ argumentsHash: text("arguments_hash"),
549
+ argumentsSummary: jsonb("arguments_summary").$type(),
550
+ policyDecision: text("policy_decision").$type(),
551
+ matchedPolicyIds: jsonb("matched_policy_ids").$type().notNull().default([]),
552
+ policyExplanation: jsonb("policy_explanation").$type(),
553
+ credentialScopeSummary: jsonb("credential_scope_summary").$type(),
554
+ headerPolicySummary: jsonb("header_policy_summary").$type(),
555
+ approvalState: text("approval_state").$type().notNull().default("not_required"),
556
+ status: text("status").$type().notNull().default("pending"),
557
+ upstreamRequestId: text("upstream_request_id"),
558
+ resultHash: text("result_hash"),
559
+ resultSummary: jsonb("result_summary").$type(),
560
+ resultSizeBytes: integer("result_size_bytes"),
561
+ resultArtifactId: uuid("result_artifact_id"),
562
+ errorCode: text("error_code"),
563
+ errorMessage: text("error_message"),
564
+ startedAt: timestamp("started_at", { withTimezone: true }),
565
+ completedAt: timestamp("completed_at", { withTimezone: true }),
566
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
567
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
568
+ }, (table) => [
569
+ index("tool_invocations_company_created_idx").on(table.companyId, table.createdAt),
570
+ index("tool_invocations_run_idx").on(table.companyId, table.runId),
571
+ index("tool_invocations_issue_idx").on(table.companyId, table.issueId),
572
+ index("tool_invocations_gateway_idx").on(table.companyId, table.gatewayId),
573
+ uniqueIndex("tool_invocations_company_idempotency_uq").on(table.companyId, table.idempotencyKey),
574
+ ]);
575
+ export const toolActionRequests = pgTable("tool_action_requests", {
576
+ id: uuid("id").primaryKey().defaultRandom(),
577
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
578
+ invocationId: uuid("invocation_id").notNull().references(() => toolInvocations.id, { onDelete: "cascade" }),
579
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
580
+ interactionId: uuid("interaction_id").references(() => issueThreadInteractions.id, { onDelete: "set null" }),
581
+ approvalId: uuid("approval_id").references(() => approvals.id, { onDelete: "set null" }),
582
+ status: text("status").$type().notNull().default("pending"),
583
+ canonicalArgumentsHash: text("canonical_arguments_hash").notNull(),
584
+ canonicalArgumentsSummary: jsonb("canonical_arguments_summary").$type().notNull(),
585
+ signedArguments: text("signed_arguments"),
586
+ previewMarkdown: text("preview_markdown"),
587
+ requestedByAgentId: uuid("requested_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
588
+ requestedByUserId: text("requested_by_user_id"),
589
+ resolvedByAgentId: uuid("resolved_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
590
+ resolvedByUserId: text("resolved_by_user_id"),
591
+ decidedByAgentId: uuid("decided_by_agent_id").references(() => agents.id, { onDelete: "set null" }),
592
+ decidedByUserId: text("decided_by_user_id"),
593
+ decidedAt: timestamp("decided_at", { withTimezone: true }),
594
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
595
+ resolvedAt: timestamp("resolved_at", { withTimezone: true }),
596
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
597
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
598
+ }, (table) => [
599
+ index("tool_action_requests_company_status_idx").on(table.companyId, table.status),
600
+ index("tool_action_requests_invocation_idx").on(table.invocationId),
601
+ index("tool_action_requests_issue_idx").on(table.companyId, table.issueId),
602
+ ]);
603
+ export const toolCallEvents = pgTable("tool_call_events", {
604
+ id: uuid("id").primaryKey().defaultRandom(),
605
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
606
+ eventType: text("event_type").$type().notNull(),
607
+ actorType: text("actor_type").notNull().default("system"),
608
+ actorId: text("actor_id"),
609
+ agentId: uuid("agent_id").references(() => agents.id, { onDelete: "set null" }),
610
+ runId: uuid("run_id").references(() => heartbeatRuns.id, { onDelete: "set null" }),
611
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
612
+ gatewayId: uuid("gateway_id").references(() => toolMcpGateways.id, { onDelete: "set null" }),
613
+ gatewayTokenId: uuid("gateway_token_id").references(() => toolMcpGatewayTokens.id, { onDelete: "set null" }),
614
+ gatewayPublicId: text("gateway_public_id"),
615
+ clientSubjectType: text("client_subject_type").$type(),
616
+ clientSubjectId: text("client_subject_id"),
617
+ clientName: text("client_name"),
618
+ mcpSessionId: text("mcp_session_id"),
619
+ correlationId: text("correlation_id"),
620
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "set null" }),
621
+ connectionId: uuid("connection_id").references(() => toolConnections.id, { onDelete: "set null" }),
622
+ catalogEntryId: uuid("catalog_entry_id").references(() => toolCatalogEntries.id, { onDelete: "set null" }),
623
+ invocationId: uuid("invocation_id").references(() => toolInvocations.id, { onDelete: "set null" }),
624
+ actionRequestId: uuid("action_request_id").references(() => toolActionRequests.id, { onDelete: "set null" }),
625
+ runtimeSlotId: uuid("runtime_slot_id").references(() => toolRuntimeSlots.id, { onDelete: "set null" }),
626
+ toolName: text("tool_name"),
627
+ decision: text("decision").$type(),
628
+ matchedPolicyIds: jsonb("matched_policy_ids").$type().notNull().default([]),
629
+ reasonCode: text("reason_code"),
630
+ policyExplanation: jsonb("policy_explanation").$type(),
631
+ credentialScopeSummary: jsonb("credential_scope_summary").$type(),
632
+ headerPolicySummary: jsonb("header_policy_summary").$type(),
633
+ outcome: text("outcome").$type().notNull().default("pending"),
634
+ latencyMs: integer("latency_ms"),
635
+ argumentsSummary: jsonb("arguments_summary").$type(),
636
+ requestHash: text("request_hash"),
637
+ requestSummary: jsonb("request_summary").$type(),
638
+ resultHash: text("result_hash"),
639
+ resultSummary: jsonb("result_summary").$type(),
640
+ resultSizeBytes: integer("result_size_bytes"),
641
+ redactionPlan: jsonb("redaction_plan").$type(),
642
+ rateLimitState: jsonb("rate_limit_state").$type(),
643
+ metadata: jsonb("metadata").$type(),
644
+ errorCode: text("error_code"),
645
+ errorMessage: text("error_message"),
646
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
647
+ }, (table) => [
648
+ index("tool_call_events_company_created_idx").on(table.companyId, table.createdAt),
649
+ index("tool_call_events_run_idx").on(table.companyId, table.runId),
650
+ index("tool_call_events_issue_idx").on(table.companyId, table.issueId),
651
+ index("tool_call_events_invocation_idx").on(table.invocationId),
652
+ index("tool_call_events_gateway_idx").on(table.companyId, table.gatewayId),
653
+ ]);
654
+ export const connectionTokenIssuances = pgTable("connection_token_issuances", {
655
+ id: uuid("id").primaryKey().defaultRandom(),
656
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
657
+ applicationId: uuid("application_id").references(() => toolApplications.id, { onDelete: "set null" }),
658
+ connectionId: uuid("connection_id").notNull().references(() => toolConnections.id, { onDelete: "cascade" }),
659
+ agentId: uuid("agent_id").notNull().references(() => agents.id, { onDelete: "cascade" }),
660
+ runId: uuid("run_id").references(() => heartbeatRuns.id, { onDelete: "set null" }),
661
+ issueId: uuid("issue_id").references(() => issues.id, { onDelete: "set null" }),
662
+ projectId: uuid("project_id").references(() => projects.id, { onDelete: "set null" }),
663
+ responsibleUserId: text("responsible_user_id"),
664
+ path: text("path").$type().notNull(),
665
+ requestedScope: jsonb("requested_scope").$type().notNull().default([]),
666
+ issuedScope: jsonb("issued_scope").$type().notNull().default([]),
667
+ ttlSeconds: integer("ttl_seconds"),
668
+ expiresAt: timestamp("expires_at", { withTimezone: true }),
669
+ tokenHash: text("token_hash"),
670
+ outcome: text("outcome").$type().notNull(),
671
+ errorCode: text("error_code"),
672
+ metadata: jsonb("metadata").$type().notNull().default({}),
673
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
674
+ }, (table) => [
675
+ index("connection_token_issuances_company_created_idx").on(table.companyId, table.createdAt),
676
+ index("connection_token_issuances_connection_created_idx").on(table.companyId, table.connectionId, table.createdAt),
677
+ index("connection_token_issuances_agent_connection_idx").on(table.companyId, table.agentId, table.connectionId, table.createdAt),
678
+ index("connection_token_issuances_run_idx").on(table.companyId, table.runId),
679
+ sql `CONSTRAINT connection_token_issuances_path_check CHECK (${table.path} IN ('exchange', 'oauth_access', 'static'))`,
680
+ sql `CONSTRAINT connection_token_issuances_outcome_check CHECK (${table.outcome} IN ('success', 'denied', 'rate_limited', 'use_env_lease', 'upstream_error', 'failure'))`,
681
+ sql `CONSTRAINT connection_token_issuances_ttl_bounds CHECK (${table.ttlSeconds} IS NULL OR (${table.ttlSeconds} >= 1 AND ${table.ttlSeconds} <= 900))`,
682
+ sql `CONSTRAINT connection_token_issuances_token_hash_format CHECK (${table.tokenHash} IS NULL OR ${table.tokenHash} ~ '^[a-f0-9]{64}$')`,
683
+ ]);
684
+ export const toolRateLimitCounters = pgTable("tool_rate_limit_counters", {
685
+ id: uuid("id").primaryKey().defaultRandom(),
686
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
687
+ policyId: uuid("policy_id").notNull().references(() => toolPolicies.id, { onDelete: "cascade" }),
688
+ counterKey: text("counter_key").notNull(),
689
+ scopeType: text("scope_type").notNull(),
690
+ scopeId: text("scope_id").notNull(),
691
+ windowKind: text("window_kind").$type().notNull(),
692
+ windowStartAt: timestamp("window_start_at", { withTimezone: true }).notNull(),
693
+ limit: integer("limit").notNull(),
694
+ remaining: integer("remaining").notNull(),
695
+ resetAt: timestamp("reset_at", { withTimezone: true }).notNull(),
696
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
697
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
698
+ }, (table) => [
699
+ index("tool_rate_limit_counters_company_idx").on(table.companyId),
700
+ uniqueIndex("tool_rate_limit_counters_window_uq").on(table.companyId, table.policyId, table.counterKey, table.windowKind, table.windowStartAt),
701
+ ]);
702
+ export const toolRuntimeMetricCounters = pgTable("tool_runtime_metric_counters", {
703
+ id: uuid("id").primaryKey().defaultRandom(),
704
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
705
+ metric: text("metric").notNull(),
706
+ bucketStartAt: timestamp("bucket_start_at", { withTimezone: true }).notNull(),
707
+ count: integer("count").notNull().default(0),
708
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
709
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
710
+ }, (table) => [
711
+ index("tool_runtime_metric_counters_company_metric_idx").on(table.companyId, table.metric, table.bucketStartAt),
712
+ uniqueIndex("tool_runtime_metric_counters_bucket_uq").on(table.companyId, table.metric, table.bucketStartAt),
713
+ sql `CONSTRAINT tool_runtime_metric_counters_count_nonnegative CHECK (${table.count} >= 0)`,
714
+ ]);
715
+ export const toolAccessAuditEvents = pgTable("tool_access_audit_events", {
716
+ id: uuid("id").primaryKey().defaultRandom(),
717
+ companyId: uuid("company_id").notNull().references(() => companies.id, { onDelete: "cascade" }),
718
+ gatewayId: uuid("gateway_id").references(() => toolMcpGateways.id, { onDelete: "set null" }),
719
+ gatewayTokenId: uuid("gateway_token_id").references(() => toolMcpGatewayTokens.id, { onDelete: "set null" }),
720
+ gatewayPublicId: text("gateway_public_id"),
721
+ clientName: text("client_name"),
722
+ correlationId: text("correlation_id"),
723
+ connectionId: uuid("connection_id").references(() => toolConnections.id, { onDelete: "set null" }),
724
+ catalogEntryId: uuid("catalog_entry_id").references(() => toolCatalogEntries.id, { onDelete: "set null" }),
725
+ actorType: text("actor_type").notNull().default("system"),
726
+ actorId: text("actor_id"),
727
+ action: text("action").notNull(),
728
+ outcome: text("outcome").notNull(),
729
+ reasonCode: text("reason_code"),
730
+ details: jsonb("details").$type().notNull().default({}),
731
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
732
+ }, (table) => [
733
+ index("tool_access_audit_company_created_idx").on(table.companyId, table.createdAt),
734
+ index("tool_access_audit_connection_idx").on(table.connectionId),
735
+ index("tool_access_audit_gateway_idx").on(table.companyId, table.gatewayId),
736
+ ]);
737
+ //# sourceMappingURL=tool_access.js.map