@withgateway/sdk 0.1.20 → 0.2.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 (1222) hide show
  1. package/README.md +165 -2
  2. package/dist/cli.js +14075 -1326
  3. package/dist/cli.js.map +1 -1
  4. package/dist/cli.mjs +14073 -1325
  5. package/dist/cli.mjs.map +1 -1
  6. package/dist/files/index.d.mts +2 -0
  7. package/dist/files/index.d.ts +2 -0
  8. package/dist/files/index.js +446 -0
  9. package/dist/files/index.js.map +1 -0
  10. package/dist/files/index.mjs +395 -0
  11. package/dist/files/index.mjs.map +1 -0
  12. package/dist/index-BgvvQ3BC.d.ts +170 -0
  13. package/dist/index-CLkMr6VG.d.ts +171 -0
  14. package/dist/index-CdbmO4aX.d.mts +171 -0
  15. package/dist/index-CiKWoroJ.d.mts +170 -0
  16. package/dist/index.d.mts +3 -1
  17. package/dist/index.d.ts +3 -1
  18. package/dist/index.js +3341 -241
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +3279 -235
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/traces/index.d.mts +2 -0
  23. package/dist/traces/index.d.ts +2 -0
  24. package/dist/traces/index.js +320 -0
  25. package/dist/traces/index.js.map +1 -0
  26. package/dist/traces/index.mjs +278 -0
  27. package/dist/traces/index.mjs.map +1 -0
  28. package/dist/tracing/index.js +24 -2
  29. package/dist/tracing/index.js.map +1 -1
  30. package/dist/tracing/index.mjs +24 -2
  31. package/dist/tracing/index.mjs.map +1 -1
  32. package/dist/worlds/index.d.mts +1419 -25
  33. package/dist/worlds/index.d.ts +1419 -25
  34. package/dist/worlds/index.js +2829 -87
  35. package/dist/worlds/index.js.map +1 -1
  36. package/dist/worlds/index.mjs +2824 -83
  37. package/dist/worlds/index.mjs.map +1 -1
  38. package/package.json +24 -2
  39. package/runtime/gatewaysdk/__init__.py +0 -0
  40. package/runtime/gatewaysdk/environment/__init__.py +108 -0
  41. package/runtime/gatewaysdk/environment/_bundle.py +281 -0
  42. package/runtime/gatewaysdk/environment/_harbor.py +276 -0
  43. package/runtime/gatewaysdk/environment/_materialize.py +97 -0
  44. package/runtime/gatewaysdk/environment/_tar.py +33 -0
  45. package/runtime/gatewaysdk/environment/_world.py +359 -0
  46. package/runtime/gatewaysdk/environment/core.py +527 -0
  47. package/runtime/gatewaysdk/environment/errors.py +58 -0
  48. package/runtime/gatewaysdk/environment/runtime.py +150 -0
  49. package/runtime/gatewaysdk/environment/schema/__init__.py +43 -0
  50. package/runtime/gatewaysdk/environment/schema/__main__.py +360 -0
  51. package/runtime/gatewaysdk/environment/schema/_slack_fidelity.py +116 -0
  52. package/runtime/gatewaysdk/environment/schema/_slack_scenario.py +183 -0
  53. package/runtime/gatewaysdk/environment/schema/api.py +1824 -0
  54. package/runtime/gatewaysdk/environment/schema/batch.py +785 -0
  55. package/runtime/gatewaysdk/environment/schema/compiler.py +693 -0
  56. package/runtime/gatewaysdk/environment/schema/conform.py +520 -0
  57. package/runtime/gatewaysdk/environment/schema/connector.py +1116 -0
  58. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/api/handlers.py +778 -0
  59. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/connector.toml +671 -0
  60. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/handlers.py +18 -0
  61. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/parity.json +34 -0
  62. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/provenance.json +1768 -0
  63. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/instruction.md +7 -0
  64. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/scenario.toml +2 -0
  65. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_activities.json +24 -0
  66. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_activity_devices.json +12 -0
  67. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_applecare_coverages.json +52 -0
  68. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_apps.json +35 -0
  69. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_audit_events.json +139 -0
  70. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_apps.json +12 -0
  71. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_configurations.json +20 -0
  72. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_devices.json +16 -0
  73. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_packages.json +8 -0
  74. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_user_groups.json +12 -0
  75. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprint_users.json +12 -0
  76. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_blueprints.json +39 -0
  77. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_configurations.json +64 -0
  78. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_device_assignments.json +20 -0
  79. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_mdm_device_details.json +55 -0
  80. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_mdm_devices.json +33 -0
  81. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_mdm_servers.json +56 -0
  82. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_org_devices.json +178 -0
  83. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_organizational_unit_memberships.json +16 -0
  84. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_organizational_units.json +24 -0
  85. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_packages.json +20 -0
  86. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_user_group_memberships.json +16 -0
  87. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_user_groups.json +30 -0
  88. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scenarios/default/seed/abm_users.json +115 -0
  89. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/scope.toml +139 -0
  90. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/tests/tools.json +48 -0
  91. package/runtime/gatewaysdk/environment/schema/connectors/apple-business-manager/world.json +2366 -0
  92. package/runtime/gatewaysdk/environment/schema/connectors/asana/api/handlers.py +1026 -0
  93. package/runtime/gatewaysdk/environment/schema/connectors/asana/connector.toml +511 -0
  94. package/runtime/gatewaysdk/environment/schema/connectors/asana/fidelity.json +89 -0
  95. package/runtime/gatewaysdk/environment/schema/connectors/asana/handlers.py +40 -0
  96. package/runtime/gatewaysdk/environment/schema/connectors/asana/provenance.json +101 -0
  97. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/scenario.toml +2 -0
  98. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/account_settings.json +12 -0
  99. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/custom_field_settings.json +60 -0
  100. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/custom_fields.json +43 -0
  101. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/enum_options.json +52 -0
  102. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/notifications.json +103 -0
  103. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/project_favorites.json +12 -0
  104. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/project_memberships.json +144 -0
  105. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/projects.json +120 -0
  106. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/recent_projects.json +19 -0
  107. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/sections.json +102 -0
  108. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/stories.json +852 -0
  109. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/task_custom_fields.json +508 -0
  110. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/task_followers.json +368 -0
  111. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/task_memberships.json +184 -0
  112. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/tasks.json +1921 -0
  113. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/teams.json +22 -0
  114. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/user_task_list_sections.json +32 -0
  115. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/user_task_lists.json +11 -0
  116. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/users.json +60 -0
  117. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/workspace_memberships.json +76 -0
  118. package/runtime/gatewaysdk/environment/schema/connectors/asana/scenarios/default/seed/workspaces.json +13 -0
  119. package/runtime/gatewaysdk/environment/schema/connectors/asana/scope.toml +156 -0
  120. package/runtime/gatewaysdk/environment/schema/connectors/asana/tests/routes.json +298 -0
  121. package/runtime/gatewaysdk/environment/schema/connectors/asana/tests/tools.json +152 -0
  122. package/runtime/gatewaysdk/environment/schema/connectors/asana/ui/static/assets/index-DTTTJ6a4.css +1 -0
  123. package/runtime/gatewaysdk/environment/schema/connectors/asana/ui/static/assets/index-WS8dLEjv.js +67 -0
  124. package/runtime/gatewaysdk/environment/schema/connectors/asana/ui/static/index.html +40 -0
  125. package/runtime/gatewaysdk/environment/schema/connectors/asana/world.json +1911 -0
  126. package/runtime/gatewaysdk/environment/schema/connectors/base.json +28 -0
  127. package/runtime/gatewaysdk/environment/schema/connectors/confluence/api/handlers.py +847 -0
  128. package/runtime/gatewaysdk/environment/schema/connectors/confluence/connector.toml +457 -0
  129. package/runtime/gatewaysdk/environment/schema/connectors/confluence/handlers.py +176 -0
  130. package/runtime/gatewaysdk/environment/schema/connectors/confluence/provenance.json +187 -0
  131. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/instruction.md +39 -0
  132. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/scenario.toml +3 -0
  133. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_favourites.json +29 -0
  134. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_footer_comments.json +984 -0
  135. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_inline_comments.json +355 -0
  136. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_labels.json +99 -0
  137. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_notifications.json +40 -0
  138. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_page_labels.json +209 -0
  139. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_page_versions.json +828 -0
  140. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_pages.json +949 -0
  141. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_recently_viewed_pages.json +59 -0
  142. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_sites.json +12 -0
  143. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_spaces.json +128 -0
  144. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_users.json +100 -0
  145. package/runtime/gatewaysdk/environment/schema/connectors/confluence/scenarios/default/seed/confluence_watches.json +96 -0
  146. package/runtime/gatewaysdk/environment/schema/connectors/confluence/tests/routes.json +212 -0
  147. package/runtime/gatewaysdk/environment/schema/connectors/confluence/tests/tools.json +140 -0
  148. package/runtime/gatewaysdk/environment/schema/connectors/confluence/tests/writes.json +201 -0
  149. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/assets/index-BWaOVdpn.js +70 -0
  150. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/assets/index-CKyfi3i5.css +1 -0
  151. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-01.svg +1 -0
  152. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-02.svg +1 -0
  153. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-03.svg +1 -0
  154. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-04.svg +1 -0
  155. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-05.svg +1 -0
  156. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/acct-06.svg +1 -0
  157. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/space-DES.svg +1 -0
  158. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/space-ENG.svg +1 -0
  159. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/space-OPS.svg +1 -0
  160. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/space-ORB.svg +1 -0
  161. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/avatars/space-PN.svg +1 -0
  162. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/fonts/AtlassianMono-latin.woff2 +0 -0
  163. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/fonts/AtlassianSans-latin.woff2 +0 -0
  164. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/fonts/AtlassianSansItalic-latin.woff2 +0 -0
  165. package/runtime/gatewaysdk/environment/schema/connectors/confluence/ui/static/index.html +47 -0
  166. package/runtime/gatewaysdk/environment/schema/connectors/confluence/world.json +1346 -0
  167. package/runtime/gatewaysdk/environment/schema/connectors/custom/handlers.py +18 -0
  168. package/runtime/gatewaysdk/environment/schema/connectors/custom/provenance.json +35 -0
  169. package/runtime/gatewaysdk/environment/schema/connectors/custom/tests/tools.json +123 -0
  170. package/runtime/gatewaysdk/environment/schema/connectors/custom/world.json +211 -0
  171. package/runtime/gatewaysdk/environment/schema/connectors/github/api/handlers.py +2923 -0
  172. package/runtime/gatewaysdk/environment/schema/connectors/github/connector.toml +2091 -0
  173. package/runtime/gatewaysdk/environment/schema/connectors/github/handlers.py +81 -0
  174. package/runtime/gatewaysdk/environment/schema/connectors/github/parity.json +37 -0
  175. package/runtime/gatewaysdk/environment/schema/connectors/github/provenance.json +162 -0
  176. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/instruction.md +18 -0
  177. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/scenario.toml +2 -0
  178. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_apps.json +49 -0
  179. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_artifacts.json +26 -0
  180. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_branches.json +443 -0
  181. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_check_runs.json +220 -0
  182. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_check_suites.json +404 -0
  183. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_code_scanning_alerts.json +126 -0
  184. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_collaborators.json +100 -0
  185. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_commit_comments.json +43 -0
  186. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_commit_statuses.json +80 -0
  187. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_commits.json +461 -0
  188. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_dependabot_alerts.json +168 -0
  189. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_deployment_statuses.json +86 -0
  190. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_deployments.json +94 -0
  191. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_environments.json +31 -0
  192. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_gist_comments.json +38 -0
  193. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_gists.json +118 -0
  194. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_git_refs.json +59 -0
  195. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_installations.json +54 -0
  196. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_issue_comments.json +151 -0
  197. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_issue_events.json +606 -0
  198. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_issue_types.json +26 -0
  199. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_issues.json +758 -0
  200. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_labels.json +64 -0
  201. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_licenses.json +54 -0
  202. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_milestones.json +130 -0
  203. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_organization_memberships.json +139 -0
  204. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_organizations.json +38 -0
  205. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_pull_requests.json +874 -0
  206. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_release_assets.json +45 -0
  207. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_releases.json +92 -0
  208. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_repositories.json +797 -0
  209. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_repository_invitations.json +184 -0
  210. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_review_comments.json +66 -0
  211. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_reviews.json +138 -0
  212. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_secret_scanning_alerts.json +50 -0
  213. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_stargazers.json +88 -0
  214. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_tags.json +28 -0
  215. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_team_memberships.json +25 -0
  216. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_team_repositories.json +258 -0
  217. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_teams.json +130 -0
  218. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_users.json +174 -0
  219. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_webhooks.json +31 -0
  220. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_workflow_jobs.json +115 -0
  221. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_workflow_runs.json +1021 -0
  222. package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_workflows.json +30 -0
  223. package/runtime/gatewaysdk/environment/schema/connectors/github/scope.toml +597 -0
  224. package/runtime/gatewaysdk/environment/schema/connectors/github/tests/tools.json +79 -0
  225. package/runtime/gatewaysdk/environment/schema/connectors/github/vendor-openapi.json +1 -0
  226. package/runtime/gatewaysdk/environment/schema/connectors/github/world.json +15762 -0
  227. package/runtime/gatewaysdk/environment/schema/connectors/gmail/api/handlers.py +1413 -0
  228. package/runtime/gatewaysdk/environment/schema/connectors/gmail/connector.toml +630 -0
  229. package/runtime/gatewaysdk/environment/schema/connectors/gmail/handlers.py +136 -0
  230. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/scenario.toml +1 -0
  231. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/10-gmail_profiles.json +10 -0
  232. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/20-gmail_labels.json +205 -0
  233. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/30-gmail_contacts.json +234 -0
  234. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/40-gmail_threads.json +374 -0
  235. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/50-gmail_messages.json +1015 -0
  236. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/60-gmail_message_parts.json +3039 -0
  237. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/70-gmail_attachments.json +28 -0
  238. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/80-gmail_drafts.json +39 -0
  239. package/runtime/gatewaysdk/environment/schema/connectors/gmail/scenarios/default/seed/90-gmail_client_settings.json +103 -0
  240. package/runtime/gatewaysdk/environment/schema/connectors/gmail/world.json +784 -0
  241. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/api/handlers.py +454 -0
  242. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/connector.toml +519 -0
  243. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/handlers.py +23 -0
  244. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/provenance.json +229 -0
  245. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/instruction.md +25 -0
  246. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/scenario.toml +1 -0
  247. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/10-calendar_calendars.json +75 -0
  248. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/20-calendar_calendar_list_entries.json +115 -0
  249. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/30-calendar_acl_rules.json +124 -0
  250. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/40-calendar_events.json +810 -0
  251. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/50-calendar_settings.json +76 -0
  252. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/60-calendar_channels.json +26 -0
  253. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scenarios/default/seed/70-calendar_colors.json +48 -0
  254. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/scope.toml +105 -0
  255. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/tests/tools.json +53 -0
  256. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/vendor-openapi.json +4185 -0
  257. package/runtime/gatewaysdk/environment/schema/connectors/google-calendar/world.json +1384 -0
  258. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/api/handlers.py +782 -0
  259. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/connector.toml +373 -0
  260. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/google-docs-types.json +4939 -0
  261. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/handlers.py +197 -0
  262. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/provenance.json +191 -0
  263. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/instruction.md +29 -0
  264. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/scenario.toml +2 -0
  265. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_comments.json +50 -0
  266. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_documents.json +8096 -0
  267. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_files.json +1187 -0
  268. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_permissions.json +543 -0
  269. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_replies.json +22 -0
  270. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_revisions.json +643 -0
  271. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scenarios/default/seed/gdocs_users.json +32 -0
  272. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/scope.toml +148 -0
  273. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/tests/api.json +319 -0
  274. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/tests/tools.json +262 -0
  275. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/assets/index-BH9fmZSS.css +1 -0
  276. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/assets/index-CU4Fk9dX.js +67 -0
  277. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/fonts/README.md +20 -0
  278. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/fonts/google-sans-variable.woff2 +0 -0
  279. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/fonts/roboto-italic-variable-latin.woff2 +0 -0
  280. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/fonts/roboto-variable-latin-ext.woff2 +0 -0
  281. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/fonts/roboto-variable-latin.woff2 +0 -0
  282. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/icons/material_common_sprite1038_gm3_grey_medium.svg +1 -0
  283. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/ui/static/index.html +13 -0
  284. package/runtime/gatewaysdk/environment/schema/connectors/google-docs/world.json +4489 -0
  285. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/api/handlers.py +466 -0
  286. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/connector.toml +626 -0
  287. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/handlers.py +55 -0
  288. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/provenance.json +342 -0
  289. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/instruction.md +11 -0
  290. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/scenario.toml +2 -0
  291. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_access_proposals.json +31 -0
  292. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_approvals.json +145 -0
  293. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_apps.json +81 -0
  294. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_comments.json +70 -0
  295. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_drives.json +71 -0
  296. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_files.json +700 -0
  297. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_labels.json +75 -0
  298. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_permissions.json +93 -0
  299. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_replies.json +66 -0
  300. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scenarios/default/seed/drive_revisions.json +82 -0
  301. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/scope.toml +126 -0
  302. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/tests/tools.json +101 -0
  303. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/vendor-openapi.json +6193 -0
  304. package/runtime/gatewaysdk/environment/schema/connectors/google-drive/world.json +2150 -0
  305. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/api/handlers.py +1645 -0
  306. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/connector.toml +414 -0
  307. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/handlers.py +200 -0
  308. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/scenario.toml +2 -0
  309. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_cells.json +10252 -0
  310. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_charts.json +103 -0
  311. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_conditional_formats.json +138 -0
  312. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_dimensions.json +256 -0
  313. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_named_ranges.json +16 -0
  314. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_permissions.json +31 -0
  315. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_sheets.json +95 -0
  316. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_spreadsheets.json +14 -0
  317. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/scenarios/default/seed/gsheets_view_states.json +26 -0
  318. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/tests/page.json +311 -0
  319. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/tests/vendor.json +843 -0
  320. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/assets/index-CUpfKgm_.js +40 -0
  321. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/assets/index-D3VhwBIC.css +1 -0
  322. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSans-400.woff2 +0 -0
  323. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSans-500.woff2 +0 -0
  324. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSans-700.woff2 +0 -0
  325. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSansText-400.woff2 +0 -0
  326. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSansText-500.woff2 +0 -0
  327. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/GoogleSansText-700.woff2 +0 -0
  328. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/Roboto-400.woff2 +0 -0
  329. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/Roboto-500.woff2 +0 -0
  330. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/fonts/Roboto-700.woff2 +0 -0
  331. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/ui/static/index.html +26 -0
  332. package/runtime/gatewaysdk/environment/schema/connectors/google-sheets/world.json +4029 -0
  333. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/api/handlers.py +800 -0
  334. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/connector.toml +776 -0
  335. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/handlers.py +226 -0
  336. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/instruction.md +11 -0
  337. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/scenario.toml +2 -0
  338. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_accounts.json +17 -0
  339. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_associations.json +1478 -0
  340. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_calls.json +147 -0
  341. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_companies.json +144 -0
  342. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_contacts.json +284 -0
  343. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_deals.json +204 -0
  344. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_emails.json +160 -0
  345. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_meetings.json +147 -0
  346. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_nav_items.json +204 -0
  347. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_notes.json +160 -0
  348. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_notifications.json +25 -0
  349. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_object_views.json +334 -0
  350. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_owners.json +76 -0
  351. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_pipeline_stages.json +109 -0
  352. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_pipelines.json +13 -0
  353. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_properties.json +1220 -0
  354. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_tasks.json +394 -0
  355. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/scenarios/default/seed/hubspot_tickets.json +34 -0
  356. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/assets/index-hdb5vB78.css +1 -0
  357. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/assets/index-xhg5ASqE.js +68 -0
  358. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-300.ttf +0 -0
  359. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-400.ttf +0 -0
  360. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-500.ttf +0 -0
  361. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-600.ttf +0 -0
  362. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-700.ttf +0 -0
  363. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/fonts/lexend-deca-latin.woff2 +0 -0
  364. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/add.svg +1 -0
  365. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/avatar.svg +1 -0
  366. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/bell.svg +3 -0
  367. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/breeze.svg +4 -0
  368. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/call.svg +1 -0
  369. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/chevron-up.svg +3 -0
  370. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/companies.svg +1 -0
  371. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/contact.svg +1 -0
  372. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/contacts.svg +1 -0
  373. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/date.svg +1 -0
  374. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/deals.svg +1 -0
  375. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/duplicate.svg +1 -0
  376. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/export.svg +3 -0
  377. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/external-link.svg +1 -0
  378. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/filter-lines.svg +3 -0
  379. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/frame-expand.svg +3 -0
  380. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/funnel.svg +3 -0
  381. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/help.svg +1 -0
  382. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/hierarchy.svg +4 -0
  383. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/home.svg +1 -0
  384. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/hubspot-logo.svg +1 -0
  385. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/info.svg +1 -0
  386. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/kanban.svg +1 -0
  387. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/marketing-email.svg +1 -0
  388. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/marketplace.svg +1 -0
  389. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/meetings.svg +1 -0
  390. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/more.svg +1 -0
  391. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/pencil.svg +3 -0
  392. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/pin.svg +3 -0
  393. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/prospecting.svg +1 -0
  394. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/refresh.svg +1 -0
  395. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/search.svg +1 -0
  396. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/settings.svg +1 -0
  397. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/sidebar-collapse.svg +3 -0
  398. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/sort.svg +3 -0
  399. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/table.svg +1 -0
  400. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/tasks.svg +1 -0
  401. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/thumbs-down.svg +1 -0
  402. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/thumbs-up.svg +1 -0
  403. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/undo.svg +3 -0
  404. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/upgrade-arrow.svg +1 -0
  405. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/vertical-dots.svg +5 -0
  406. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/icons/workflows.svg +1 -0
  407. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/ui/static/index.html +37 -0
  408. package/runtime/gatewaysdk/environment/schema/connectors/hubspot/world.json +1347 -0
  409. package/runtime/gatewaysdk/environment/schema/connectors/jamf/api/handlers.py +987 -0
  410. package/runtime/gatewaysdk/environment/schema/connectors/jamf/connector.toml +3057 -0
  411. package/runtime/gatewaysdk/environment/schema/connectors/jamf/handlers.py +34 -0
  412. package/runtime/gatewaysdk/environment/schema/connectors/jamf/parity.json +49 -0
  413. package/runtime/gatewaysdk/environment/schema/connectors/jamf/provenance.json +9495 -0
  414. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/scenario.toml +4 -0
  415. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_account_groups.json +64 -0
  416. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_accounts.json +58 -0
  417. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_advanced_computer_searches.json +139 -0
  418. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_advanced_mobile_device_searches.json +61 -0
  419. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_advanced_user_content_searches.json +61 -0
  420. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_advanced_user_searches.json +124 -0
  421. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_api_integrations.json +37 -0
  422. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_api_roles.json +25 -0
  423. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_app_request_form_input_fields.json +22 -0
  424. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_buildings.json +34 -0
  425. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_byo_profiles.json +46 -0
  426. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_categories.json +19 -0
  427. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_classes.json +217 -0
  428. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_cloud_idps.json +19 -0
  429. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_computer_group_members.json +16 -0
  430. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_computer_groups.json +38 -0
  431. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_computer_invitations.json +82 -0
  432. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_computer_prestages.json +274 -0
  433. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_computers.json +1537 -0
  434. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_configuration_profiles.json +649 -0
  435. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_departments.json +16 -0
  436. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_device_enrollment_devices.json +70 -0
  437. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_device_enrollments.json +46 -0
  438. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_directory_bindings.json +34 -0
  439. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_disk_encryption_configurations.json +22 -0
  440. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_distribution_points.json +91 -0
  441. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_dock_items.json +25 -0
  442. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_ebooks.json +43 -0
  443. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_enrollment_customizations.json +43 -0
  444. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_extension_attributes.json +52 -0
  445. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_ibeacons.json +25 -0
  446. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_inventory_preload_records.json +100 -0
  447. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_ios_branding_configurations.json +31 -0
  448. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_ldap_servers.json +16 -0
  449. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_licensed_software_records.json +244 -0
  450. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mac_applications.json +610 -0
  451. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_macos_branding_configurations.json +34 -0
  452. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_managed_software_update_plans.json +67 -0
  453. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mdm_commands.json +58 -0
  454. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_applications.json +700 -0
  455. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_configuration_profiles.json +652 -0
  456. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_enrollment_profiles.json +160 -0
  457. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_extension_attributes.json +43 -0
  458. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_group_members.json +16 -0
  459. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_groups.json +38 -0
  460. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_prestages.json +280 -0
  461. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_device_provisioning_profiles.json +31 -0
  462. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_mobile_devices.json +1558 -0
  463. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_network_segments.json +46 -0
  464. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_packages.json +118 -0
  465. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_patch_software_title_configurations.json +88 -0
  466. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_policies.json +1054 -0
  467. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_printers.json +52 -0
  468. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_removable_mac_addresses.json +16 -0
  469. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_restricted_software_titles.json +289 -0
  470. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_return_to_service_configurations.json +19 -0
  471. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_scripts.json +61 -0
  472. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_sites.json +19 -0
  473. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_software_update_servers.json +25 -0
  474. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_supervision_identities.json +22 -0
  475. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_user_extension_attributes.json +31 -0
  476. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_user_groups.json +112 -0
  477. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_users.json +37 -0
  478. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_volume_purchasing_locations.json +106 -0
  479. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_volume_purchasing_subscriptions.json +76 -0
  480. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_webhooks.json +70 -0
  481. package/runtime/gatewaysdk/environment/schema/connectors/jamf/scope.toml +900 -0
  482. package/runtime/gatewaysdk/environment/schema/connectors/jamf/tests/tools.json +95 -0
  483. package/runtime/gatewaysdk/environment/schema/connectors/jamf/vendor-openapi.json +1 -0
  484. package/runtime/gatewaysdk/environment/schema/connectors/jamf/world.json +11559 -0
  485. package/runtime/gatewaysdk/environment/schema/connectors/jira/api/handlers.py +1056 -0
  486. package/runtime/gatewaysdk/environment/schema/connectors/jira/connector.toml +955 -0
  487. package/runtime/gatewaysdk/environment/schema/connectors/jira/handlers.py +87 -0
  488. package/runtime/gatewaysdk/environment/schema/connectors/jira/parity.json +27 -0
  489. package/runtime/gatewaysdk/environment/schema/connectors/jira/provenance.json +166 -0
  490. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/instruction.md +22 -0
  491. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/scenario.toml +3 -0
  492. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_boards.json +61 -0
  493. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_changelogs.json +136 -0
  494. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_comments.json +205 -0
  495. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_components.json +78 -0
  496. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_fields.json +498 -0
  497. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_issue_link_types.json +25 -0
  498. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_issue_links.json +190 -0
  499. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_issue_types.json +44 -0
  500. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_issues.json +1448 -0
  501. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_priorities.json +40 -0
  502. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_project_categories.json +16 -0
  503. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_projects.json +111 -0
  504. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_resolutions.json +22 -0
  505. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_sprint_issues.json +20 -0
  506. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_sprints.json +39 -0
  507. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_status_categories.json +25 -0
  508. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_statuses.json +60 -0
  509. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_transitions.json +179 -0
  510. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_users.json +83 -0
  511. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_versions.json +30 -0
  512. package/runtime/gatewaysdk/environment/schema/connectors/jira/scenarios/default/seed/jira_worklogs.json +96 -0
  513. package/runtime/gatewaysdk/environment/schema/connectors/jira/scope.toml +255 -0
  514. package/runtime/gatewaysdk/environment/schema/connectors/jira/tests/tools.json +151 -0
  515. package/runtime/gatewaysdk/environment/schema/connectors/jira/vendor-openapi.json +13562 -0
  516. package/runtime/gatewaysdk/environment/schema/connectors/jira/world.json +3587 -0
  517. package/runtime/gatewaysdk/environment/schema/connectors/kandji/api/handlers.py +406 -0
  518. package/runtime/gatewaysdk/environment/schema/connectors/kandji/connector.toml +531 -0
  519. package/runtime/gatewaysdk/environment/schema/connectors/kandji/handlers.py +38 -0
  520. package/runtime/gatewaysdk/environment/schema/connectors/kandji/parity.json +29 -0
  521. package/runtime/gatewaysdk/environment/schema/connectors/kandji/provenance.json +335 -0
  522. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/scenario.toml +2 -0
  523. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_blueprint_items.json +22 -0
  524. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_blueprint_template_categories.json +14 -0
  525. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_blueprint_templates.json +38 -0
  526. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_blueprints.json +52 -0
  527. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_custom_apps.json +45 -0
  528. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_custom_profiles.json +32 -0
  529. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_custom_scripts.json +27 -0
  530. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_activities.json +43 -0
  531. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_apps.json +52 -0
  532. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_commands.json +41 -0
  533. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_notes.json +20 -0
  534. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_parameters.json +28 -0
  535. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_device_tags.json +16 -0
  536. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_devices.json +122 -0
  537. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_in_house_apps.json +33 -0
  538. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_library_item_activities.json +33 -0
  539. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_library_item_statuses.json +98 -0
  540. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_library_items.json +24 -0
  541. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_self_service_categories.json +12 -0
  542. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_tags.json +16 -0
  543. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scenarios/default/seed/kandji_users.json +61 -0
  544. package/runtime/gatewaysdk/environment/schema/connectors/kandji/scope.toml +199 -0
  545. package/runtime/gatewaysdk/environment/schema/connectors/kandji/tests/tools.json +64 -0
  546. package/runtime/gatewaysdk/environment/schema/connectors/kandji/vendor-openapi.json +5463 -0
  547. package/runtime/gatewaysdk/environment/schema/connectors/kandji/world.json +1817 -0
  548. package/runtime/gatewaysdk/environment/schema/connectors/linear/api/handlers.py +139 -0
  549. package/runtime/gatewaysdk/environment/schema/connectors/linear/connector.toml +1574 -0
  550. package/runtime/gatewaysdk/environment/schema/connectors/linear/handlers.py +23 -0
  551. package/runtime/gatewaysdk/environment/schema/connectors/linear/provenance.json +142 -0
  552. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/scenario.toml +2 -0
  553. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/attachments.json +21 -0
  554. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/comments.json +79 -0
  555. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/customer_needs.json +21 -0
  556. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/customer_statuses.json +26 -0
  557. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/customer_tiers.json +26 -0
  558. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/customers.json +48 -0
  559. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/cycles.json +86 -0
  560. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/documents.json +27 -0
  561. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/initiative_projects.json +13 -0
  562. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/initiative_updates.json +23 -0
  563. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/initiatives.json +41 -0
  564. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/issue_labels.json +16 -0
  565. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/issue_relations.json +13 -0
  566. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/issues.json +264 -0
  567. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/labels.json +52 -0
  568. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/organizations.json +53 -0
  569. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_labels.json +34 -0
  570. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_members.json +16 -0
  571. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_milestones.json +30 -0
  572. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_relations.json +18 -0
  573. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_statuses.json +76 -0
  574. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/project_updates.json +42 -0
  575. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/projects.json +110 -0
  576. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/reactions.json +28 -0
  577. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/roadmap_projects.json +13 -0
  578. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/roadmaps.json +19 -0
  579. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/team_memberships.json +34 -0
  580. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/teams.json +114 -0
  581. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/templates.json +27 -0
  582. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/users.json +106 -0
  583. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/webhooks.json +21 -0
  584. package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/workflow_states.json +108 -0
  585. package/runtime/gatewaysdk/environment/schema/connectors/linear/scope.toml +87 -0
  586. package/runtime/gatewaysdk/environment/schema/connectors/linear/tests/tools.json +52 -0
  587. package/runtime/gatewaysdk/environment/schema/connectors/linear/world.json +6148 -0
  588. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/api/handlers.py +1218 -0
  589. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/connector.toml +1246 -0
  590. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/fidelity.json +75 -0
  591. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/handlers.py +1 -0
  592. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/provenance.json +1632 -0
  593. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/instruction.md +12 -0
  594. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/scenario.toml +2 -0
  595. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_async_operations.json +47 -0
  596. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_channel_hosted_contents.json +12 -0
  597. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_channel_members.json +88 -0
  598. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_channel_messages.json +313 -0
  599. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_channel_replies.json +128 -0
  600. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_channels.json +319 -0
  601. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_chat_hosted_contents.json +18 -0
  602. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_chat_members.json +155 -0
  603. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_chat_messages.json +265 -0
  604. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_chat_views.json +37 -0
  605. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_chats.json +167 -0
  606. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_incoming_channels.json +25 -0
  607. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_pinned_messages.json +9 -0
  608. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_reply_hosted_contents.json +13 -0
  609. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_shared_channel_teams.json +32 -0
  610. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_tag_members.json +31 -0
  611. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_tags.json +32 -0
  612. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_team_members.json +117 -0
  613. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scenarios/default/seed/teams_teams.json +193 -0
  614. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/scope.md +303 -0
  615. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/teams-types.json +1739 -0
  616. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/tests/routes.json +101 -0
  617. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/vendor-openapi.json +11280 -0
  618. package/runtime/gatewaysdk/environment/schema/connectors/microsoft-teams/world.json +926 -0
  619. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/api/handlers.py +571 -0
  620. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/connector.toml +1484 -0
  621. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/handlers.py +32 -0
  622. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/parity.json +77 -0
  623. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/provenance.json +303 -0
  624. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/instruction.md +11 -0
  625. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/scenario.toml +2 -0
  626. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_accounting_periods.json +107 -0
  627. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_accounts.json +514 -0
  628. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_classifications.json +64 -0
  629. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_contacts.json +90 -0
  630. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_credit_memos.json +112 -0
  631. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_currencies.json +37 -0
  632. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_customer_payments.json +108 -0
  633. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_customers.json +232 -0
  634. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_departments.json +80 -0
  635. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_employees.json +124 -0
  636. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_invoices.json +229 -0
  637. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_item_fulfillments.json +85 -0
  638. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_items.json +237 -0
  639. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_journal_entries.json +217 -0
  640. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_locations.json +62 -0
  641. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_price_levels.json +28 -0
  642. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_purchase_orders.json +152 -0
  643. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_sales_order_lines.json +235 -0
  644. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_sales_orders.json +219 -0
  645. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_subsidiaries.json +85 -0
  646. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_terms.json +48 -0
  647. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_vendor_bills.json +170 -0
  648. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scenarios/default/seed/netsuite_vendors.json +140 -0
  649. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/scope.toml +296 -0
  650. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/tests/tools.json +82 -0
  651. package/runtime/gatewaysdk/environment/schema/connectors/netsuite/world.json +39076 -0
  652. package/runtime/gatewaysdk/environment/schema/connectors/notion/api/handlers.py +1330 -0
  653. package/runtime/gatewaysdk/environment/schema/connectors/notion/connector.toml +386 -0
  654. package/runtime/gatewaysdk/environment/schema/connectors/notion/handlers.py +54 -0
  655. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/scenario.toml +2 -0
  656. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/blocks.json +4197 -0
  657. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/calendar_events.json +18 -0
  658. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/collection_views.json +175 -0
  659. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/comments.json +109 -0
  660. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/databases.json +417 -0
  661. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/favorites.json +3 -0
  662. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/notifications.json +49 -0
  663. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/pages.json +3758 -0
  664. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/spaces.json +28 -0
  665. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/teamspaces.json +3 -0
  666. package/runtime/gatewaysdk/environment/schema/connectors/notion/scenarios/default/seed/users.json +92 -0
  667. package/runtime/gatewaysdk/environment/schema/connectors/notion/tests/01-reads.json +165 -0
  668. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/assets/index-DQ36W7RG.css +1 -0
  669. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/assets/index-DythuuUy.js +67 -0
  670. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000002.svg +1 -0
  671. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000003.svg +1 -0
  672. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000004.svg +1 -0
  673. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000005.svg +1 -0
  674. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000006.svg +1 -0
  675. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000007.svg +1 -0
  676. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/avatars/eeee0000000000000000000000000008.svg +1 -0
  677. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/covers/dusk-harbor.png +0 -0
  678. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/covers/ember-coast.png +0 -0
  679. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/covers/green-ridge.png +0 -0
  680. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f30a.svg +1 -0
  681. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f331.svg +1 -0
  682. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f373.svg +1 -0
  683. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3a7.svg +1 -0
  684. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3a8.svg +1 -0
  685. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3ac.svg +1 -0
  686. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3af.svg +1 -0
  687. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3c4.svg +1 -0
  688. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3d6.svg +1 -0
  689. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f3e0.svg +1 -0
  690. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f44b.svg +1 -0
  691. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4a1.svg +1 -0
  692. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4b0.svg +1 -0
  693. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4bc.svg +1 -0
  694. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4c5.svg +1 -0
  695. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4c8.svg +1 -0
  696. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4cb.svg +1 -0
  697. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4ce.svg +1 -0
  698. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4d1.svg +1 -0
  699. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4d3.svg +1 -0
  700. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4d6.svg +1 -0
  701. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4da.svg +1 -0
  702. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4dd.svg +1 -0
  703. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4ec.svg +1 -0
  704. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f4f7.svg +1 -0
  705. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f527.svg +1 -0
  706. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f55b.svg +1 -0
  707. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f5c2.svg +1 -0
  708. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f5d3.svg +1 -0
  709. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f680.svg +1 -0
  710. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f6a2.svg +1 -0
  711. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f9ca.svg +1 -0
  712. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f9e0.svg +1 -0
  713. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f9ea.svg +1 -0
  714. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f9ed.svg +1 -0
  715. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1f9f0.svg +1 -0
  716. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/1fab6.svg +1 -0
  717. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/2600.svg +1 -0
  718. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/2693.svg +1 -0
  719. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/2705.svg +1 -0
  720. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/2708.svg +1 -0
  721. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/270f.svg +1 -0
  722. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/emoji/2b50.svg +1 -0
  723. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/favicon.svg +1 -0
  724. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/fonts/SourceSerif4-latin.woff2 +0 -0
  725. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/index.html +31 -0
  726. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/learn/content-blocks.png +0 -0
  727. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/learn/databases.png +0 -0
  728. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/learn/sharing.png +0 -0
  729. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/learn/style-content.png +0 -0
  730. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/photos/home-icon.png +0 -0
  731. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/photos/viewer.png +0 -0
  732. package/runtime/gatewaysdk/environment/schema/connectors/notion/ui/static/photos/workspace.png +0 -0
  733. package/runtime/gatewaysdk/environment/schema/connectors/notion/world.json +2796 -0
  734. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_admin_role_assignments.json +44 -0
  735. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_app_assignments.json +40 -0
  736. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_app_group_assignments.json +59 -0
  737. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_applications.json +265 -0
  738. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_console_dashboards.json +91 -0
  739. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_device_users.json +32 -0
  740. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_devices.json +89 -0
  741. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_group_memberships.json +156 -0
  742. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_groups.json +100 -0
  743. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_orgs.json +20 -0
  744. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_policies.json +84 -0
  745. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_system_log_events.json +9656 -0
  746. package/runtime/gatewaysdk/environment/schema/connectors/okta/scenarios/default/seed/okta_users.json +744 -0
  747. package/runtime/gatewaysdk/environment/schema/connectors/outlook/api/handlers.py +624 -0
  748. package/runtime/gatewaysdk/environment/schema/connectors/outlook/connector.toml +381 -0
  749. package/runtime/gatewaysdk/environment/schema/connectors/outlook/handlers.py +54 -0
  750. package/runtime/gatewaysdk/environment/schema/connectors/outlook/provenance.json +408 -0
  751. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/instruction.md +22 -0
  752. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/scenario.toml +2 -0
  753. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_attachments.json +44 -0
  754. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_calendars.json +52 -0
  755. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_contacts.json +326 -0
  756. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_events.json +3050 -0
  757. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_mail_folders.json +84 -0
  758. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_mailbox_settings.json +35 -0
  759. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_mailboxes.json +14 -0
  760. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_messages.json +1400 -0
  761. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_system_senders.json +44 -0
  762. package/runtime/gatewaysdk/environment/schema/connectors/outlook/scenarios/default/seed/outlook_users.json +256 -0
  763. package/runtime/gatewaysdk/environment/schema/connectors/outlook/tests/routes.json +333 -0
  764. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/assets/index-DRVA5ahH.js +67 -0
  765. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/assets/index-kOnvVBhA.css +1 -0
  766. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/FluentSystemIcons-Filled.woff2 +0 -0
  767. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/FluentSystemIcons-Regular.woff2 +0 -0
  768. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/FluentSystemIcons-Resizable.woff2 +0 -0
  769. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/controlIcons.woff +0 -0
  770. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/segoeui-bold.woff2 +0 -0
  771. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/segoeui-light.woff2 +0 -0
  772. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/segoeui-regular.woff2 +0 -0
  773. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/segoeui-semibold.woff2 +0 -0
  774. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/fonts/segoeui-semilight.woff2 +0 -0
  775. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/bookings.svg +1 -0
  776. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/calendar.svg +35 -0
  777. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/copilot.png +0 -0
  778. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/excel.svg +1 -0
  779. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/mail.svg +32 -0
  780. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/my-day.svg +1 -0
  781. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/newsletters.svg +37 -0
  782. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/no-mail-selected-dark.svg +1 -0
  783. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/no-mail-selected.svg +1 -0
  784. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/onedrive.svg +1 -0
  785. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/onenote.svg +1 -0
  786. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/org-explorer.png +0 -0
  787. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/outlook.svg +1 -0
  788. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/people.svg +34 -0
  789. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/powerpoint.svg +1 -0
  790. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/ribbon-layout.svg +1 -0
  791. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/sharepoint.svg +1 -0
  792. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/teams-chat.svg +1 -0
  793. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/teams.svg +1 -0
  794. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/to-do.png +0 -0
  795. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/viva.svg +1 -0
  796. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/img/word.svg +1 -0
  797. package/runtime/gatewaysdk/environment/schema/connectors/outlook/ui/static/index.html +34 -0
  798. package/runtime/gatewaysdk/environment/schema/connectors/outlook/world.json +686 -0
  799. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/api/handlers.py +447 -0
  800. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/connector.toml +3478 -0
  801. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/handlers.py +885 -0
  802. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/parity.json +46 -0
  803. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/provenance.json +4286 -0
  804. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/instruction.md +8 -0
  805. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/scenario.toml +2 -0
  806. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_account_contact_relations.json +20 -0
  807. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_account_contact_roles.json +16 -0
  808. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_account_partners.json +18 -0
  809. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_account_team_members.json +16 -0
  810. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_accounts.json +38 -0
  811. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_assets.json +35 -0
  812. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_attachments.json +16 -0
  813. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_business_hours.json +16 -0
  814. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_campaign_member_statuses.json +16 -0
  815. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_campaign_members.json +38 -0
  816. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_campaigns.json +35 -0
  817. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_comments.json +14 -0
  818. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_histories.json +18 -0
  819. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_milestones.json +18 -0
  820. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_statuses.json +16 -0
  821. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_team_members.json +14 -0
  822. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_case_team_roles.json +12 -0
  823. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_cases.json +42 -0
  824. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_collaboration_group_members.json +16 -0
  825. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_collaboration_groups.json +16 -0
  826. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contact_point_addresses.json +14 -0
  827. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contact_point_emails.json +14 -0
  828. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contact_point_phones.json +14 -0
  829. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contacts.json +34 -0
  830. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_document_links.json +14 -0
  831. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_documents.json +18 -0
  832. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_folders.json +13 -0
  833. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_notes.json +12 -0
  834. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_versions.json +24 -0
  835. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_content_workspaces.json +16 -0
  836. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contract_contact_roles.json +16 -0
  837. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contract_line_items.json +32 -0
  838. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_contracts.json +40 -0
  839. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_dashboards.json +20 -0
  840. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_documents.json +22 -0
  841. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_email_message_relations.json +14 -0
  842. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_email_messages.json +21 -0
  843. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_email_templates.json +24 -0
  844. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_entitlements.json +32 -0
  845. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_events.json +26 -0
  846. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_feed_comments.json +19 -0
  847. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_feed_items.json +24 -0
  848. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_fiscal_year_settings.json +20 -0
  849. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_folders.json +18 -0
  850. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_group_members.json +12 -0
  851. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_groups.json +20 -0
  852. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_holidays.json +16 -0
  853. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_individuals.json +21 -0
  854. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_lead_statuses.json +14 -0
  855. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_leads.json +45 -0
  856. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_list_views.json +16 -0
  857. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_login_histories.json +18 -0
  858. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_milestone_types.json +14 -0
  859. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_notes.json +16 -0
  860. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_object_territory_associations.json +14 -0
  861. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunities.json +48 -0
  862. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_competitors.json +12 -0
  863. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_contact_roles.json +16 -0
  864. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_field_histories.json +18 -0
  865. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_histories.json +20 -0
  866. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_line_items.json +32 -0
  867. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_partners.json +16 -0
  868. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_stages.json +22 -0
  869. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_opportunity_team_members.json +18 -0
  870. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_order_items.json +33 -0
  871. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_orders.json +44 -0
  872. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_organizations.json +18 -0
  873. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_partners.json +18 -0
  874. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_periods.json +18 -0
  875. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_permission_set_assignments.json +16 -0
  876. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_permission_sets.json +18 -0
  877. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_pricebook_entries.json +22 -0
  878. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_pricebooks.json +16 -0
  879. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_products.json +20 -0
  880. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_profiles.json +14 -0
  881. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_queue_sobjects.json +12 -0
  882. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_quote_line_items.json +43 -0
  883. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_quotes.json +40 -0
  884. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_record_actions.json +16 -0
  885. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_record_types.json +18 -0
  886. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_reports.json +18 -0
  887. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_service_contracts.json +32 -0
  888. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_sla_processes.json +18 -0
  889. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_solutions.json +18 -0
  890. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_task_priorities.json +14 -0
  891. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_task_relations.json +14 -0
  892. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_task_statuses.json +16 -0
  893. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_tasks.json +26 -0
  894. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_territories.json +20 -0
  895. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_territory_models.json +16 -0
  896. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_territory_types.json +18 -0
  897. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_topic_assignments.json +12 -0
  898. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_topics.json +14 -0
  899. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_user_roles.json +16 -0
  900. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_user_territory_associations.json +16 -0
  901. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_users.json +57 -0
  902. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_web_links.json +26 -0
  903. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_work_order_line_items.json +42 -0
  904. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scenarios/default/seed/sf_work_orders.json +46 -0
  905. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/scope.toml +694 -0
  906. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/tests/tools.json +69 -0
  907. package/runtime/gatewaysdk/environment/schema/connectors/salesforce/world.json +21263 -0
  908. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/api/handlers.py +630 -0
  909. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/connector.toml +266 -0
  910. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/handlers.py +3 -0
  911. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/provenance.json +245 -0
  912. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/instruction.md +15 -0
  913. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/scenario.toml +1 -0
  914. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/10-snow_users.json +268 -0
  915. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/11-snow_user_groups.json +40 -0
  916. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/20-snow_configuration_items.json +684 -0
  917. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/30-snow_catalog_categories.json +52 -0
  918. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/31-snow_catalog_items.json +334 -0
  919. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/40-snow_incidents.json +3086 -0
  920. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/41-snow_incident_tasks.json +54 -0
  921. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/42-snow_task_slas.json +64 -0
  922. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/43-snow_problems.json +148 -0
  923. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/44-snow_change_requests.json +364 -0
  924. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/45-snow_knowledge_articles.json +214 -0
  925. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/46-snow_journal_entries.json +1612 -0
  926. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/60-snow_ui_current_users.json +19 -0
  927. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/61-snow_ui_navigation_applications.json +187 -0
  928. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/62-snow_ui_home_widgets.json +91 -0
  929. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/63-snow_ui_notifications.json +3 -0
  930. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/64-snow_ui_employee_center_pages.json +74 -0
  931. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/65-snow_ui_list_layouts.json +54 -0
  932. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/66-snow_ui_search_facets.json +29 -0
  933. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/67-snow_ui_activity_entries.json +1076 -0
  934. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scenarios/default/seed/68-snow_ui_instances.json +9 -0
  935. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/scope.toml +166 -0
  936. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/tests/routes.json +272 -0
  937. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/assets/index-5QHcQLCI.css +1 -0
  938. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/assets/index-BzeVnzFt.js +67 -0
  939. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/cabin-400-700-italic.woff2 +0 -0
  940. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/cabin-400-700.woff2 +0 -0
  941. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-0-lato-v17-latin-ext_latin-100.woff2 +0 -0
  942. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-1-lato-v17-latin-ext_latin-100.woff +0 -0
  943. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-10-lato-v17-latin-ext_latin-italic.woff2 +0 -0
  944. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-11-lato-v17-latin-ext_latin-italic.woff +0 -0
  945. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-12-lato-v17-latin-ext_latin-700.woff2 +0 -0
  946. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-13-lato-v17-latin-ext_latin-700.woff +0 -0
  947. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-14-lato-v17-latin-ext_latin-700italic.woff2 +0 -0
  948. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-15-lato-v17-latin-ext_latin-700italic.woff +0 -0
  949. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-16-source-sans-pro-v11-latin-300.woff2 +0 -0
  950. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-17-source-sans-pro-v11-latin-300.woff +0 -0
  951. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-18-source-sans-pro-v11-latin-regular.woff2 +0 -0
  952. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-19-source-sans-pro-v11-latin-regular.woff +0 -0
  953. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-2-lato-v17-latin-ext_latin-100italic.woff2 +0 -0
  954. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-20-source-sans-pro-v11-latin-600.woff2 +0 -0
  955. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-21-source-sans-pro-v11-latin-600.woff +0 -0
  956. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-22-source-sans-pro-v11-latin-700.woff2 +0 -0
  957. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-23-source-sans-pro-v11-latin-700.woff +0 -0
  958. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-3-lato-v17-latin-ext_latin-100italic.woff +0 -0
  959. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-4-lato-v17-latin-ext_latin-300.woff2 +0 -0
  960. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-5-lato-v17-latin-ext_latin-300.woff +0 -0
  961. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-6-lato-v17-latin-ext_latin-300italic.woff2 +0 -0
  962. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-7-lato-v17-latin-ext_latin-300italic.woff +0 -0
  963. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-8-lato-v17-latin-ext_latin-regular.woff2 +0 -0
  964. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/font-9-lato-v17-latin-ext_latin-regular.woff +0 -0
  965. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/index.json +122 -0
  966. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-300.woff2 +0 -0
  967. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-600-italic.woff2 +0 -0
  968. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-600.woff2 +0 -0
  969. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-bold-italic.woff2 +0 -0
  970. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-bold.woff2 +0 -0
  971. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-normal-italic.woff2 +0 -0
  972. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/fonts/lato-normal.woff2 +0 -0
  973. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/appsee-outline.svg +1 -0
  974. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/arrow-up-outline.svg +1 -0
  975. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/available.svg +1 -0
  976. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/bell-outline.svg +1 -0
  977. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/caret-down-fill.svg +1 -0
  978. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/check-fill.svg +1 -0
  979. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/chevron-right-outline.svg +1 -0
  980. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/circle-close-outline.svg +1 -0
  981. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/circle-info-outline.svg +1 -0
  982. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/circle-question-outline.svg +1 -0
  983. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/circleinfooutline.svg +1 -0
  984. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/ellipsis-v-outline.svg +1 -0
  985. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/eye-outline.svg +1 -0
  986. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-bell-fill.svg +1 -0
  987. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-caret-down-fill.svg +1 -0
  988. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-check-square.svg +1 -0
  989. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-chevron-right.svg +1 -0
  990. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-clock-outline.svg +1 -0
  991. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-comment-chat.svg +1 -0
  992. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-external-link.svg +1 -0
  993. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-facebook.svg +1 -0
  994. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-heart-fill.svg +1 -0
  995. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-heart-outline.svg +1 -0
  996. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-home-fill-teal.svg +1 -0
  997. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-home-fill.svg +1 -0
  998. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-linkedin.svg +1 -0
  999. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-list-alt-fill.svg +1 -0
  1000. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-pencil-square.svg +1 -0
  1001. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-question-circle-fill.svg +1 -0
  1002. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-times.svg +1 -0
  1003. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/fa-twitter.svg +1 -0
  1004. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/filter-outline.svg +1 -0
  1005. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/gear-outline.svg +1 -0
  1006. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/globe-outline.svg +1 -0
  1007. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/home-outline.svg +1 -0
  1008. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/icon-2.svg +17 -0
  1009. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/icon-3.svg +1 -0
  1010. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/icon-4.svg +1 -0
  1011. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/icon.svg +45 -0
  1012. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/keyboard-outline.svg +1 -0
  1013. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/link-icon-associated-to-view-all-adoption-blueprints.svg +1 -0
  1014. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/link-icon-associated-to-view-all-applications.svg +1 -0
  1015. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/list-fill.svg +1 -0
  1016. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/loading-2.svg +1 -0
  1017. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/loading.svg +1 -0
  1018. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/magnifying-glass-outline.svg +1 -0
  1019. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/ongoing-outline.svg +1 -0
  1020. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/open-link-right-fill.svg +1 -0
  1021. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/open-link-right-outline.svg +1 -0
  1022. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/pencil-page-outline.svg +1 -0
  1023. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/plus-fill.svg +1 -0
  1024. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/serverbox-outline.svg +1 -0
  1025. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/servicenow-wordmark.svg +20 -0
  1026. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/signal-live-outline.svg +1 -0
  1027. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/square-arrow-left-outline.svg +1 -0
  1028. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/star-outline.svg +1 -0
  1029. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/sync-outline.svg +1 -0
  1030. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/task-slas-related-list.svg +24 -0
  1031. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/thumbtack-outline.svg +1 -0
  1032. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/trending-downward.svg +1 -0
  1033. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/trending-neutral.svg +1 -0
  1034. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/unpinned-all-menu.svg +1 -0
  1035. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/unpinned-favorites-menu.svg +1 -0
  1036. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/unpinned-history-menu.svg +1 -0
  1037. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/icons/user-outline.svg +1 -0
  1038. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/adoption-blueprints.svg +40 -0
  1039. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/avatar-admin.jpg +0 -0
  1040. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/now-assist-admin.svg +17 -0
  1041. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/quick-link-desk.jpg +0 -0
  1042. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/quick-link-password.jpg +0 -0
  1043. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/quick-link-status.jpg +0 -0
  1044. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-accessories.svg +1 -0
  1045. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-computers.svg +1 -0
  1046. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-developer.svg +1 -0
  1047. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-email.svg +1 -0
  1048. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-phone.svg +1 -0
  1049. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-software-catalog.svg +1 -0
  1050. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-software.svg +1 -0
  1051. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/img/topic-technology.svg +1 -0
  1052. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/ui/static/index.html +36 -0
  1053. package/runtime/gatewaysdk/environment/schema/connectors/servicenow/world.json +2004 -0
  1054. package/runtime/gatewaysdk/environment/schema/connectors/slack/MODEL.md +264 -0
  1055. package/runtime/gatewaysdk/environment/schema/connectors/slack/api/handlers.py +1880 -0
  1056. package/runtime/gatewaysdk/environment/schema/connectors/slack/capabilities.json +1056 -0
  1057. package/runtime/gatewaysdk/environment/schema/connectors/slack/connector.toml +892 -0
  1058. package/runtime/gatewaysdk/environment/schema/connectors/slack/handlers.py +762 -0
  1059. package/runtime/gatewaysdk/environment/schema/connectors/slack/parity.json +65 -0
  1060. package/runtime/gatewaysdk/environment/schema/connectors/slack/provenance.json +349 -0
  1061. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/scenario.toml +1 -0
  1062. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_apps.json +22 -0
  1063. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_bookmarks.json +22 -0
  1064. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_bots.json +19 -0
  1065. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_channels.json +206 -0
  1066. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_conversation_states.json +50 -0
  1067. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_emojis.json +19 -0
  1068. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_ephemeral_message_files.json +12 -0
  1069. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_ephemeral_message_threads.json +11 -0
  1070. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_ephemeral_messages.json +16 -0
  1071. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_file_channel_observations.json +16 -0
  1072. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_file_reaction_summaries.json +10 -0
  1073. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_file_reaction_users.json +10 -0
  1074. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_file_shares.json +29 -0
  1075. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_file_user_states.json +10 -0
  1076. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_files.json +64 -0
  1077. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_memberships.json +79 -0
  1078. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_message_files.json +18 -0
  1079. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_message_threads.json +10 -0
  1080. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_message_user_states.json +14 -0
  1081. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_messages.json +127 -0
  1082. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_pins.json +11 -0
  1083. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_presence.json +35 -0
  1084. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_reaction_summaries.json +25 -0
  1085. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_reaction_users.json +32 -0
  1086. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_scheduled_message_threads.json +10 -0
  1087. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_scheduled_messages.json +15 -0
  1088. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_unavailable_message_files.json +14 -0
  1089. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_user_profile_fields.json +28 -0
  1090. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_usergroup_channels.json +10 -0
  1091. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_usergroup_memberships.json +14 -0
  1092. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_usergroups.json +33 -0
  1093. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_users.json +228 -0
  1094. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_view_state_entries.json +22 -0
  1095. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_views.json +53 -0
  1096. package/runtime/gatewaysdk/environment/schema/connectors/slack/scenarios/default/seed/slack_workspaces.json +37 -0
  1097. package/runtime/gatewaysdk/environment/schema/connectors/slack/scope.toml +48 -0
  1098. package/runtime/gatewaysdk/environment/schema/connectors/slack/tests/api.json +177 -0
  1099. package/runtime/gatewaysdk/environment/schema/connectors/slack/tests/test_threads.py +49 -0
  1100. package/runtime/gatewaysdk/environment/schema/connectors/slack/tests/tools.json +92 -0
  1101. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/assets/index-BSqGskph.css +1 -0
  1102. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/assets/index-CKQh1igo.js +81 -0
  1103. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/README.md +15 -0
  1104. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-black.woff2 +0 -0
  1105. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-bold.woff2 +0 -0
  1106. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-italic-black.woff2 +0 -0
  1107. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-italic-bold.woff2 +0 -0
  1108. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-italic-light.woff2 +0 -0
  1109. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-italic.woff2 +0 -0
  1110. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-light.woff2 +0 -0
  1111. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/lato-regular.woff2 +0 -0
  1112. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/fonts/slack-icons-v2.woff2 +0 -0
  1113. package/runtime/gatewaysdk/environment/schema/connectors/slack/ui/static/index.html +35 -0
  1114. package/runtime/gatewaysdk/environment/schema/connectors/slack/vendor-openapi.json +12515 -0
  1115. package/runtime/gatewaysdk/environment/schema/connectors/slack/world.json +5381 -0
  1116. package/runtime/gatewaysdk/environment/schema/connectors/workday/api/handlers.py +175 -0
  1117. package/runtime/gatewaysdk/environment/schema/connectors/workday/connector.toml +610 -0
  1118. package/runtime/gatewaysdk/environment/schema/connectors/workday/handlers.py +75 -0
  1119. package/runtime/gatewaysdk/environment/schema/connectors/workday/parity.json +69 -0
  1120. package/runtime/gatewaysdk/environment/schema/connectors/workday/provenance.json +407 -0
  1121. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/instruction.md +10 -0
  1122. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/scenario.toml +2 -0
  1123. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_compensations.json +219 -0
  1124. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_job_profiles.json +76 -0
  1125. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_locations.json +142 -0
  1126. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_organizations.json +124 -0
  1127. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_positions.json +280 -0
  1128. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_absence_leaves.json +66 -0
  1129. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_business_title_changes.json +44 -0
  1130. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_check_in_topics.json +48 -0
  1131. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_check_ins.json +46 -0
  1132. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_countries.json +28 -0
  1133. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_currencies.json +25 -0
  1134. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_job_change_reasons.json +28 -0
  1135. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_job_families.json +40 -0
  1136. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_job_profiles.json +202 -0
  1137. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_jobs.json +120 -0
  1138. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_organization_types.json +19 -0
  1139. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_organizations.json +24 -0
  1140. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_persons.json +100 -0
  1141. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_scorecard_results.json +57 -0
  1142. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_scorecards.json +68 -0
  1143. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_supervisory_organizations.json +64 -0
  1144. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_time_off_details.json +112 -0
  1145. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_time_off_entries.json +91 -0
  1146. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_worker_history_events.json +58 -0
  1147. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_rest_workers.json +90 -0
  1148. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_time_off_requests.json +181 -0
  1149. package/runtime/gatewaysdk/environment/schema/connectors/workday/scenarios/default/seed/workday_workers.json +492 -0
  1150. package/runtime/gatewaysdk/environment/schema/connectors/workday/scope.toml +344 -0
  1151. package/runtime/gatewaysdk/environment/schema/connectors/workday/tests/tools.json +81 -0
  1152. package/runtime/gatewaysdk/environment/schema/connectors/workday/vendor-openapi.json +10646 -0
  1153. package/runtime/gatewaysdk/environment/schema/connectors/workday/world.json +4186 -0
  1154. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/api/handlers.py +1183 -0
  1155. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/connector.toml +645 -0
  1156. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/handlers.py +377 -0
  1157. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/instruction.md +22 -0
  1158. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/scenario.toml +3 -0
  1159. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_brands.json +25 -0
  1160. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_group_memberships.json +49 -0
  1161. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_groups.json +37 -0
  1162. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_macros.json +154 -0
  1163. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_organizations.json +65 -0
  1164. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_ticket_audits.json +3328 -0
  1165. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_ticket_comments.json +2642 -0
  1166. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_tickets.json +1439 -0
  1167. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_users.json +624 -0
  1168. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_views.json +510 -0
  1169. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/scenarios/default/seed/zendesk_workspace_tabs.json +10 -0
  1170. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/ui/static/assets/index-JWq7XNO5.css +1 -0
  1171. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/ui/static/assets/index-bn8ezNTi.js +67 -0
  1172. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/ui/static/index.html +22 -0
  1173. package/runtime/gatewaysdk/environment/schema/connectors/zendesk/world.json +1707 -0
  1174. package/runtime/gatewaysdk/environment/schema/data.py +907 -0
  1175. package/runtime/gatewaysdk/environment/schema/dependencies.py +235 -0
  1176. package/runtime/gatewaysdk/environment/schema/extract.py +263 -0
  1177. package/runtime/gatewaysdk/environment/schema/host.py +2571 -0
  1178. package/runtime/gatewaysdk/environment/schema/host_surfaces.py +320 -0
  1179. package/runtime/gatewaysdk/environment/schema/ingest.py +528 -0
  1180. package/runtime/gatewaysdk/environment/schema/local.py +536 -0
  1181. package/runtime/gatewaysdk/environment/schema/mapping.py +944 -0
  1182. package/runtime/gatewaysdk/environment/schema/platform.py +1748 -0
  1183. package/runtime/gatewaysdk/environment/schema/reconcile.py +202 -0
  1184. package/runtime/gatewaysdk/environment/schema/redaction.py +378 -0
  1185. package/runtime/gatewaysdk/environment/schema/scaffold.py +311 -0
  1186. package/runtime/gatewaysdk/environment/schema/skill.py +119 -0
  1187. package/runtime/gatewaysdk/environment/schema/skills/agents/connector-template-author.md +202 -0
  1188. package/runtime/gatewaysdk/environment/schema/skills/benchmarks-getting-started/SKILL.md +391 -0
  1189. package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONNECTORS.md +364 -0
  1190. package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONVENTIONS.md +100 -0
  1191. package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +363 -0
  1192. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/ROWS.md +243 -0
  1193. package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +460 -0
  1194. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +500 -0
  1195. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +49 -0
  1196. package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/ui-map.md +18 -0
  1197. package/runtime/gatewaysdk/environment/schema/slack.py +757 -0
  1198. package/runtime/gatewaysdk/environment/schema/snapshot.py +479 -0
  1199. package/runtime/gatewaysdk/environment/schema/store.py +1004 -0
  1200. package/runtime/gatewaysdk/environment/schema/tasks.py +530 -0
  1201. package/runtime/gatewaysdk/environment/schema/tools_world.py +689 -0
  1202. package/runtime/gatewaysdk/environment/schema/transform.py +200 -0
  1203. package/runtime/gatewaysdk/environment/schema/transforms.py +103 -0
  1204. package/runtime/gatewaysdk/environment/schema/ui.py +455 -0
  1205. package/runtime/gatewaysdk/environment/schema/ui_static/app.js +581 -0
  1206. package/runtime/gatewaysdk/environment/schema/ui_static/index.html +72 -0
  1207. package/runtime/gatewaysdk/environment/schema/validation.py +624 -0
  1208. package/runtime/gatewaysdk/environment/schema/worker.py +78 -0
  1209. package/runtime/gatewaysdk/environment/schema/workers.py +500 -0
  1210. package/runtime/gatewaysdk/environment/schema/world_tests.py +530 -0
  1211. package/skills/agents/connector-template-author.md +202 -0
  1212. package/skills/benchmarks-getting-started/SKILL.md +391 -0
  1213. package/skills/connector-schema-authoring/CONNECTORS.md +364 -0
  1214. package/skills/connector-schema-authoring/CONVENTIONS.md +100 -0
  1215. package/skills/connector-schema-authoring/SKILL.md +363 -0
  1216. package/skills/connector-schema-authoring/connector-worlds.md +355 -0
  1217. package/skills/connector-schema-authoring/world-schema.md +620 -0
  1218. package/skills/world-data-ingestion/ROWS.md +243 -0
  1219. package/skills/world-data-ingestion/SKILL.md +460 -0
  1220. package/skills/worlds-getting-started/SKILL.md +500 -0
  1221. package/skills/worlds-getting-started/references/cli-mcp-map.md +49 -0
  1222. package/skills/worlds-getting-started/references/ui-map.md +18 -0
@@ -0,0 +1,1824 @@
1
+ """The world's API: the vendor's HTTP surface, served from the world itself.
2
+
3
+ A provider's client speaks the vendor's REST paths, not tool calls. The world
4
+ answers those paths from its store, so the same ``connector.toml`` that
5
+ captured from the real service now describes how the world serves it —
6
+ reads, writes, and whatever logic sits between them:
7
+
8
+ [api]
9
+ envelope = "results" # rows land under this key with hits and cursor; "" = bare array
10
+ hits_key = "hits" # the envelope's count and next-page keys, named the vendor's way;
11
+ cursor_key = "cursor" # hits_key = "" omits the count (vendors that answer {items, next_cursor})
12
+ cursor_absent_when_done = false # true: no cursor key at all on the last page, instead of "" / null
13
+ page = "cursor" # none | offset | cursor: how list routes paginate
14
+ limit_param = "limit" # the query parameters the vendor's client sends for a page
15
+ offset_param = "offset"
16
+ cursor_param = "cursor"
17
+ page_size = 100
18
+ unauthorized = '{"detail": "Authentication credentials were not provided."}'
19
+ not_found = '{"detail": "Not found."}' # error bodies are JSON strings; "" or 'null' = no body at all
20
+ invalid = '{"detail": "Invalid request."}'
21
+ error_content_type = "application/problem+json" # what error bodies are labelled; the vendor's choice
22
+ unauthorized_status = 401 # some vendors answer 403 for a bad key; say what the vendor says
23
+ not_found_status = 404
24
+ invalid_status = 400
25
+ token_path = "/oauth/token" # oauth2 worlds mint bearer tokens here, the way the vendor does
26
+ handlers = "api/handlers.py" # the world's own logic (default when the file exists)
27
+ before = "gate" # optional: runs before every operation; returns None or an answer
28
+
29
+ [[operations]]
30
+ name = "get_records_by_email"
31
+ path = "/breach/data/emails/{email}"
32
+ params = ["since", "status[]"] # a [] suffix declares a key the vendor repeats: status[]=a&status[]=b
33
+ entity = "spycloud_records"
34
+ [operations.api]
35
+ filter = { email = "attributes.email", "status[]" = "status" }
36
+ # path argument or query parameter -> row field (dotted),
37
+ # matched case-insensitively; an absent parameter does not filter;
38
+ # a parameter sent more than once matches rows carrying any value
39
+ not_found = '{"message": "Resource not found"}' # optional: this route's own 404 body and status,
40
+ not_found_status = 403 # when the vendor answers a missing row its own way
41
+ cursor_absent_when_done = true # optional: overrides [api] for this route
42
+
43
+ [[operations]]
44
+ name = "create_search"
45
+ method = "POST"
46
+ path = "/searches"
47
+ entity = "torchlight_searches"
48
+ [operations.api]
49
+ action = "create" # read | create | update | delete | handler
50
+ status = 201 # what the vendor answers with
51
+ single = true # the row itself, not a list envelope
52
+ body = { name = "name", description = "description" } # row field <- request body path
53
+ defaults = { status = "drafted" }
54
+ generate = { id = "uuid", createdAt = "now" } # uuid | int | now
55
+
56
+ [[operations]]
57
+ name = "execute_search"
58
+ method = "POST"
59
+ path = "/searches/{id}/execute"
60
+ entity = "torchlight_searches"
61
+ [operations.api]
62
+ action = "handler"
63
+ handler = "execute_search" # def execute_search(ctx, args, query, body) in api/handlers.py
64
+
65
+ An ``action = "handler"`` operation runs the world's own Python: ``ctx`` reads
66
+ and writes the store (``rows``, ``get``, ``insert``, ``update``, ``delete``),
67
+ tells the time (``now``, ``elapsed``, ``ladder`` for status machines that
68
+ advance on a clock), mints ids (``uuid``) and wraps answers (``envelope``,
69
+ ``not_found``). The ``query`` a handler receives keeps the first value of each
70
+ parameter; ``ctx.query_all`` holds every value (``{"expand[]": ["a", "b"]}``)
71
+ for the filters a vendor lets a client repeat. That is where computed results
72
+ and workflow transitions live, in the customer's world, never in this package.
73
+
74
+ ``serve`` runs the world's API locally with the standard library alone.
75
+ ``build_api_bundle`` writes the api-kind bundle the platform hosts (``gateway-api-world.toml``,
76
+ ``openapi.json``, ``seed/``, ``scenarios/``, ``server/``): the compiled world
77
+ and this package are copied into ``server/`` so the container needs nothing
78
+ installed, and the bundle root stays legacy-shaped because the api runner
79
+ refuses a schema bundle at its root. The runner's admin endpoints
80
+ (``/healthz``, ``/__world/seed``, ``/__world/reset``, ``/__world/state``) are
81
+ served beside the vendor routes.
82
+ """
83
+
84
+ from __future__ import annotations
85
+
86
+ import base64
87
+ import importlib.util
88
+ import json
89
+ import os
90
+ import re
91
+ import secrets
92
+ import shutil
93
+ import sys
94
+ import tempfile
95
+ import threading
96
+ import time
97
+ import tomllib
98
+ import urllib.parse
99
+ import uuid
100
+ from dataclasses import dataclass, field
101
+ from datetime import datetime, timezone
102
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
103
+ from pathlib import Path
104
+ from typing import Any, Callable
105
+
106
+ from . import snapshot as snapshots
107
+ from .compiler import check_bundle, compile_bundle
108
+ from .connector import DEFAULT_TOKEN_PATH, SPEC, Operation, Spec, load_spec, stored_forms
109
+ from .store import SQLiteStore
110
+ from .validation import ContractError, fail, read_json
111
+
112
+ ADMIN = {"seed": "/__world/seed", "reset": "/__world/reset", "state": "/__world/state", "health": "/healthz"}
113
+ #: How many events :meth:`WorldState.emit` keeps for a page polling ``since``.
114
+ EVENT_LOG_SIZE = 500
115
+ PORT = 8080
116
+ FILTER_KEY = "api"
117
+ HANDLERS = "api/handlers.py"
118
+ SCENARIOS = "scenarios"
119
+ BEFORE = "__before__"
120
+ ACTIONS = ("read", "create", "update", "delete", "handler")
121
+ MATCHES = ("equals", "contains", "prefix")
122
+ PAGING = ("none", "offset", "cursor")
123
+ GENERATORS = ("uuid", "int", "now")
124
+ #: Set to an epoch to freeze the world's clock (tests, reproducible workflows).
125
+ CLOCK_ENV = "GATEWAY_WORLD_CLOCK"
126
+ #: An ``[operations.api]`` setting left out inherits ``[api]``; distinct from None,
127
+ #: which for an error body means "no body at all".
128
+ INHERITED: Any = object()
129
+
130
+
131
+ # ---------------------------------------------------------------- settings
132
+
133
+
134
+ @dataclass(frozen=True)
135
+ class Paging:
136
+ style: str = "none"
137
+ limit_param: str = "limit"
138
+ offset_param: str = "offset"
139
+ cursor_param: str = "cursor"
140
+ page_size: int = 100
141
+
142
+
143
+ @dataclass(frozen=True)
144
+ class OperationSettings:
145
+ filter: dict[str, str] = field(default_factory=dict) # arg -> row field path
146
+ match: dict[str, str] = field(default_factory=dict) # arg -> equals | contains | prefix
147
+ action: str = "read"
148
+ status: int = 200
149
+ envelope: str | None = None # None inherits [api].envelope
150
+ single: bool = False
151
+ body: dict[str, str] = field(default_factory=dict) # row field <- body path; empty = the body as-is.
152
+ # On a handler the world's own code reads the body; the mapping still tells the
153
+ # generated ui which row fields its form asks for and where they go in the request.
154
+ defaults: dict[str, Any] = field(default_factory=dict)
155
+ generate: dict[str, str] = field(default_factory=dict)
156
+ handler: str | None = None
157
+ paging: str | None = None # None inherits [api].page
158
+ sample: dict[str, str] = field(default_factory=dict) # arg -> a value the route accepts, for conformance runs
159
+ not_found: Any = INHERITED # this route's own 404 body; INHERITED takes [api].not_found
160
+ not_found_status: int | None = None # None inherits [api].not_found_status
161
+ cursor_absent_when_done: bool | None = None # None inherits [api].cursor_absent_when_done
162
+
163
+
164
+ @dataclass(frozen=True)
165
+ class UiSettings:
166
+ """``[ui]`` in connector.toml: a prebuilt static single-page app shipped
167
+ with the world and served by the World Host on the session's ui origin."""
168
+
169
+ #: Directory in the world holding ``index.html`` and its assets.
170
+ static: str
171
+ #: The page an agent lands on first.
172
+ entry: str = "/"
173
+ #: Same-origin prefix the SPA calls the api at; the host rewrites it.
174
+ api_path: str = "/__world-api"
175
+
176
+
177
+ @dataclass(frozen=True)
178
+ class ApiSettings:
179
+ envelope: str
180
+ unauthorized: Any
181
+ not_found: Any
182
+ filters: dict[str, dict[str, str]] # operation -> {arg: row field path}; kept for callers that read it
183
+ unauthorized_status: int = 401
184
+ not_found_status: int = 404
185
+ invalid: Any = None
186
+ invalid_status: int = 400
187
+ error_content_type: str = "application/json"
188
+ hits_key: str = "hits" # "" leaves the count out of the envelope
189
+ cursor_key: str = "cursor"
190
+ cursor_absent_when_done: bool = False # drop the cursor key on the last page instead of sending "" / null
191
+ previous_key: str | None = None # emit the previous page's cursor under this key (DRF's "previous")
192
+ page_headers: dict[str, str] = field(default_factory=dict) # cursor | total | previous -> response header name
193
+ page_links: bool = False # next/previous as absolute URLs of the served host, the way DRF answers
194
+ paging: Paging = field(default_factory=Paging)
195
+ token_path: str | None = None
196
+ handlers: Path | None = None
197
+ before: str | None = None # a function in the handlers module run before every operation
198
+ operations: dict[str, OperationSettings] = field(default_factory=dict)
199
+ ui: UiSettings | None = None
200
+
201
+ def for_operation(self, name: str) -> OperationSettings:
202
+ return self.operations.get(name, OperationSettings())
203
+
204
+ def not_found_for(self, op: OperationSettings) -> tuple[int, Any]:
205
+ """The 404 a route answers: its own body and status when ``[operations.api]``
206
+ sets them (a vendor that answers 403 with its own message for one resource
207
+ and 404 for the rest), else the world-wide ones."""
208
+ body = self.not_found if op.not_found is INHERITED else op.not_found
209
+ status = self.not_found_status if op.not_found_status is None else op.not_found_status
210
+ return status, body
211
+
212
+ def omits_done_cursor(self, op: OperationSettings) -> bool:
213
+ return self.cursor_absent_when_done if op.cursor_absent_when_done is None else op.cursor_absent_when_done
214
+
215
+
216
+ def _json_body(table: dict, key: str, default: Any, location: str) -> Any:
217
+ """An error body setting: a JSON string replayed as given. ``""`` (like ``'null'``)
218
+ means no body at all — a vendor that answers a bare 401 needs a way to say so."""
219
+ text = table.get(key)
220
+ if text is None:
221
+ return default
222
+ if not isinstance(text, str):
223
+ fail("spec", f"{key} must be a JSON string", f"{location}/{key}")
224
+ if text == "":
225
+ return None
226
+ try:
227
+ return json.loads(text)
228
+ except json.JSONDecodeError:
229
+ fail("spec", f"{key} is not valid JSON", f"{location}/{key}")
230
+
231
+
232
+ def _status(table: dict, key: str, default: int, location: str, *, low: int, high: int) -> int:
233
+ value = table.get(key, default)
234
+ if isinstance(value, bool) or not isinstance(value, int) or not low <= value <= high:
235
+ fail("spec", f"{key} must be an HTTP status between {low} and {high}", f"{location}/{key}")
236
+ return value
237
+
238
+
239
+ def _page_headers(api: dict) -> dict[str, str]:
240
+ """``page_headers = { cursor = "Cursor", total = "Total-Count" }``: vendors that page by
241
+ response header (Torchlight) get the same values there as in the envelope."""
242
+ mapping = api.get("page_headers", {})
243
+ if not isinstance(mapping, dict) or not all(
244
+ k in ("cursor", "total", "previous") and isinstance(v, str) and v.strip() for k, v in mapping.items()
245
+ ):
246
+ fail("spec", "api.page_headers maps cursor, total and previous to response header names", "/api/page_headers")
247
+ return dict(mapping)
248
+
249
+
250
+ def _flag(table: dict, key: str, location: str) -> bool:
251
+ value = table.get(key, False)
252
+ if not isinstance(value, bool):
253
+ fail("spec", f"{key} must be true or false", f"{location}/{key}")
254
+ return value
255
+
256
+
257
+ def _name(table: dict, key: str, default: str, location: str) -> str:
258
+ value = table.get(key, default)
259
+ if not isinstance(value, str) or not value.strip():
260
+ fail("spec", f"{key} must be a non-empty string", f"{location}/{key}")
261
+ return value
262
+
263
+
264
+ def _key_name(api: dict, key: str, default: str) -> str:
265
+ """An envelope key the vendor names, or ``""`` to leave it out: a vendor whose list
266
+ answer is ``{items, next_cursor?}`` has no count to put anywhere."""
267
+ value = api.get(key, default)
268
+ if not isinstance(value, str):
269
+ fail("spec", f"{key} must be a string ('' leaves the key out)", f"/api/{key}")
270
+ return value
271
+
272
+
273
+ def _str_map(table: dict, key: str, location: str) -> dict[str, str]:
274
+ mapping = table.get(key, {})
275
+ if not isinstance(mapping, dict) or not all(
276
+ isinstance(k, str) and isinstance(v, str) and k for k, v in mapping.items()
277
+ ):
278
+ fail("spec", f"{key} maps names to strings", f"{location}/{key}")
279
+ return dict(mapping)
280
+
281
+
282
+ def _operation_settings(entry: dict, operation: Operation, location: str) -> OperationSettings:
283
+ table = entry.get(FILTER_KEY, {})
284
+ if not isinstance(table, dict):
285
+ fail("spec", "[operations.api] must be a table", location)
286
+ mapping = _str_map(table, "filter", location)
287
+ for arg in mapping:
288
+ if arg not in operation.placeholders and arg not in operation.params:
289
+ fail(
290
+ "spec",
291
+ f"api.filter names {arg}, which is neither a path argument nor a parameter",
292
+ f"{location}/filter",
293
+ )
294
+ match = _str_map(table, "match", location)
295
+ for arg, mode in match.items():
296
+ if arg not in mapping:
297
+ fail("spec", f"api.match names {arg}, which api.filter does not declare", f"{location}/match")
298
+ if mode not in MATCHES:
299
+ fail("spec", f"api.match.{arg} must be one of {', '.join(MATCHES)}", f"{location}/match")
300
+ action = _name(table, "action", "read", location)
301
+ if action not in ACTIONS:
302
+ fail("spec", f"api.action must be one of {', '.join(ACTIONS)}", f"{location}/action")
303
+ if action in ("create", "update", "delete") and not operation.entity:
304
+ fail("spec", f"api.action {action} needs an entity to write", f"{location}/action")
305
+ if action in ("update", "delete") and not mapping:
306
+ fail("spec", f"api.action {action} needs a filter to find the row", f"{location}/filter")
307
+ handler = table.get("handler")
308
+ if action == "handler":
309
+ if not isinstance(handler, str) or not re.match(r"^[a-z_][a-z0-9_]*$", handler):
310
+ fail("spec", "api.handler names a function in the world's handlers module", f"{location}/handler")
311
+ elif handler is not None:
312
+ fail("spec", 'api.handler belongs to action = "handler"', f"{location}/handler")
313
+ default_status = {"create": 201, "delete": 204}.get(action, 200)
314
+ status = _status(table, "status", default_status, location, low=200, high=299)
315
+ envelope = table.get("envelope")
316
+ if envelope is not None and not isinstance(envelope, str):
317
+ fail("spec", "api.envelope must be a string", f"{location}/envelope")
318
+ single = table.get("single", action in ("create", "update"))
319
+ if not isinstance(single, bool):
320
+ fail("spec", "api.single must be true or false", f"{location}/single")
321
+ body = _str_map(table, "body", location)
322
+ defaults = table.get("defaults", {})
323
+ if not isinstance(defaults, dict):
324
+ fail("spec", "api.defaults is a table of constant fields", f"{location}/defaults")
325
+ generate = _str_map(table, "generate", location)
326
+ for field_name, kind in generate.items():
327
+ if kind not in GENERATORS:
328
+ fail("spec", f"api.generate.{field_name} must be one of {', '.join(GENERATORS)}", f"{location}/generate")
329
+ if (defaults or generate) and action not in ("create", "update"):
330
+ fail("spec", "api.defaults and generate belong to create and update actions", location)
331
+ if body and action not in ("create", "update", "handler"):
332
+ fail("spec", "api.body belongs to create, update and handler actions", location)
333
+ sample = table.get("sample", {})
334
+ if not isinstance(sample, dict) or not all(
335
+ isinstance(k, str) and isinstance(v, (str, int, float)) for k, v in sample.items()
336
+ ):
337
+ fail("spec", "api.sample maps path arguments or parameters to a value the route accepts", f"{location}/sample")
338
+ for arg in sample:
339
+ if arg not in operation.placeholders and arg not in operation.params:
340
+ fail(
341
+ "spec",
342
+ f"api.sample names {arg}, which is neither a path argument nor a parameter",
343
+ f"{location}/sample",
344
+ )
345
+ paging = table.get("page")
346
+ if paging is not None and paging not in PAGING:
347
+ fail("spec", f"api.page must be one of {', '.join(PAGING)}", f"{location}/page")
348
+ not_found_status = None
349
+ if table.get("not_found_status") is not None:
350
+ not_found_status = _status(table, "not_found_status", 404, location, low=400, high=599)
351
+ cursor_absent_when_done = None
352
+ if table.get("cursor_absent_when_done") is not None:
353
+ cursor_absent_when_done = _flag(table, "cursor_absent_when_done", location)
354
+ return OperationSettings(
355
+ filter=mapping,
356
+ match=match,
357
+ action=action,
358
+ status=status,
359
+ envelope=envelope,
360
+ single=single,
361
+ body=body,
362
+ defaults=dict(defaults),
363
+ generate=generate,
364
+ handler=handler if action == "handler" else None,
365
+ paging=paging,
366
+ sample={k: str(v) for k, v in sample.items()},
367
+ not_found=_json_body(table, "not_found", INHERITED, location),
368
+ not_found_status=not_found_status,
369
+ cursor_absent_when_done=cursor_absent_when_done,
370
+ )
371
+
372
+
373
+ # Directory names every pusher (``bench push`` in Python and TypeScript, the
374
+ # web upload) drops from a bundle at any depth, as build artifacts. A built ui
375
+ # under one of them never reaches the hub, so the manifest refuses it here
376
+ # rather than the host refusing every open of the version.
377
+ ARCHIVE_DROPPED_DIRS = frozenset({"dist", "build", "outputs", "__pycache__"})
378
+
379
+
380
+ def _ui_settings(raw: dict, world: Path) -> UiSettings | None:
381
+ ui = raw.get("ui")
382
+ if ui is None:
383
+ return None
384
+ if not isinstance(ui, dict):
385
+ fail("spec", "[ui] must be a table", "/ui")
386
+ static = ui.get("static")
387
+ if not isinstance(static, str) or not static or static.startswith("/") or ".." in static.split("/"):
388
+ fail("spec", "ui.static is a directory inside the world holding the built ui", "/ui/static")
389
+ dropped = [part for part in static.split("/") if part in ARCHIVE_DROPPED_DIRS or part.startswith(".")]
390
+ if dropped:
391
+ fail(
392
+ "spec",
393
+ f"ui.static = {static!r} is under {dropped[0]!r}, which bench push drops from every bundle "
394
+ "as a build artifact; build the ui into a directory such as ui/static",
395
+ "/ui/static",
396
+ )
397
+ if not (world / static / "index.html").is_file():
398
+ fail("spec", f"ui.static = {static!r} has no index.html; build the ui first", "/ui/static")
399
+ entry = ui.get("entry", "/")
400
+ if not isinstance(entry, str) or not entry.startswith("/"):
401
+ fail("spec", "ui.entry is the path the agent lands on, starting with /", "/ui/entry")
402
+ api_path = ui.get("api_path", "/__world-api")
403
+ if not isinstance(api_path, str) or not api_path.startswith("/") or api_path == "/":
404
+ fail("spec", "ui.api_path is the same-origin prefix the ui calls the api at", "/ui/api_path")
405
+ return UiSettings(static=static.rstrip("/"), entry=entry, api_path=api_path.rstrip("/"))
406
+
407
+
408
+ def load_api_settings(world: Path, spec: Spec) -> ApiSettings:
409
+ raw = tomllib.loads((world / SPEC).read_text(encoding="utf-8"))
410
+ api = raw.get(FILTER_KEY, {})
411
+ if not isinstance(api, dict):
412
+ fail("spec", "[api] must be a table", "/api")
413
+ envelope = api.get("envelope", "")
414
+ if not isinstance(envelope, str):
415
+ fail("spec", "api.envelope must be a string", "/api/envelope")
416
+ style = _name(api, "page", "none", "/api")
417
+ if style not in PAGING:
418
+ fail("spec", f"api.page must be one of {', '.join(PAGING)}", "/api/page")
419
+ page_size = api.get("page_size", 100)
420
+ if isinstance(page_size, bool) or not isinstance(page_size, int) or page_size < 1:
421
+ fail("spec", "api.page_size must be a positive integer", "/api/page_size")
422
+ paging = Paging(
423
+ style=style,
424
+ limit_param=_name(api, "limit_param", "limit", "/api"),
425
+ offset_param=_name(api, "offset_param", "offset", "/api"),
426
+ cursor_param=_name(api, "cursor_param", "cursor", "/api"),
427
+ page_size=page_size,
428
+ )
429
+ token_path = api.get("token_path")
430
+ if token_path is not None and (not isinstance(token_path, str) or not token_path.startswith("/")):
431
+ fail("spec", "api.token_path is the path the world mints tokens on", "/api/token_path")
432
+ if token_path is not None and spec.scheme != "oauth2":
433
+ fail("spec", "api.token_path belongs to auth.scheme oauth2", "/api/token_path")
434
+ if spec.scheme == "oauth2" and token_path is None:
435
+ token_path = spec.token_url if (spec.token_url or "").startswith("/") else DEFAULT_TOKEN_PATH
436
+ handlers_name = api.get("handlers")
437
+ if handlers_name is not None and not isinstance(handlers_name, str):
438
+ fail("spec", "api.handlers is the path of the world's handlers module", "/api/handlers")
439
+ handlers = world / (handlers_name or HANDLERS)
440
+ if handlers_name is not None and not handlers.is_file():
441
+ fail("spec", f"api.handlers names {handlers_name}, which is not a file in the world", "/api/handlers")
442
+ operations: dict[str, OperationSettings] = {}
443
+ for index, entry in enumerate(raw.get("operations", [])):
444
+ location = f"/operations/{index}/api"
445
+ operation = spec.operations[entry["name"]]
446
+ operations[operation.name] = _operation_settings(entry, operation, location)
447
+ before = api.get("before")
448
+ if before is not None and (not isinstance(before, str) or not re.match(r"^[a-z_][a-z0-9_]*$", before)):
449
+ fail("spec", "api.before names a function in the world's handlers module", "/api/before")
450
+ needs_handlers = [name for name, op in operations.items() if op.handler] + (
451
+ [f"[api].before={before}"] if before else []
452
+ )
453
+ if needs_handlers and not handlers.is_file():
454
+ fail(
455
+ "spec",
456
+ f"Operations {', '.join(needs_handlers)} name handlers but the world has no {handlers.name}",
457
+ "/api/handlers",
458
+ )
459
+ return ApiSettings(
460
+ envelope=envelope,
461
+ unauthorized=_json_body(api, "unauthorized", {"error": "unauthorized"}, "/api"),
462
+ not_found=_json_body(api, "not_found", {"error": "not_found"}, "/api"),
463
+ filters={name: dict(op.filter) for name, op in operations.items()},
464
+ unauthorized_status=_status(api, "unauthorized_status", 401, "/api", low=400, high=599),
465
+ not_found_status=_status(api, "not_found_status", 404, "/api", low=400, high=599),
466
+ invalid=_json_body(api, "invalid", {"error": "invalid"}, "/api"),
467
+ invalid_status=_status(api, "invalid_status", 400, "/api", low=400, high=599),
468
+ error_content_type=_name(api, "error_content_type", "application/json", "/api"),
469
+ hits_key=_key_name(api, "hits_key", "hits"),
470
+ cursor_key=_name(api, "cursor_key", "cursor", "/api"),
471
+ cursor_absent_when_done=_flag(api, "cursor_absent_when_done", "/api"),
472
+ previous_key=_name(api, "previous_key", "", "/api") if api.get("previous_key") is not None else None,
473
+ page_headers=_page_headers(api),
474
+ page_links=_flag(api, "page_links", "/api"),
475
+ paging=paging,
476
+ token_path=token_path,
477
+ handlers=handlers if handlers.is_file() else None,
478
+ before=before,
479
+ operations=operations,
480
+ ui=_ui_settings(raw, world),
481
+ )
482
+
483
+
484
+ # ---------------------------------------------------------------- state
485
+
486
+
487
+ class WorldState:
488
+ """The store behind the served API.
489
+
490
+ With a compiled snapshot in the tree (``db/state.sqlite`` whose sidecar names
491
+ this contract) a reset is a file copy and an open; without one the world's
492
+ initial batch is replayed, as it always was. ``snapshot`` is the sidecar of the
493
+ snapshot in use, or None on the legacy path."""
494
+
495
+ def __init__(self, world: Path):
496
+ self.world = world
497
+ self.contract = check_bundle(world)
498
+ self._initial: dict | None = None
499
+ self._snapshot_path = snapshots.default_snapshot(world)
500
+ # Only a snapshot that IS the tree's data through this contract (or the
501
+ # platform's pin) is opened; one left behind by an earlier compile while the
502
+ # journals grew is stale, and the journals are replayed instead.
503
+ self.snapshot: dict | None = snapshots.current_default(world, self.contract)
504
+ self._dir = tempfile.TemporaryDirectory(prefix="gateway-world-api-")
505
+ self._lock = threading.Lock()
506
+ self.store: SQLiteStore | None = None
507
+ self._clear_events()
508
+ self.reset()
509
+
510
+ @property
511
+ def digest(self) -> str | None:
512
+ """The batch digest of the snapshot the world is on; None on the legacy path."""
513
+ return self.snapshot["batchDigest"] if self.snapshot else None
514
+
515
+ @property
516
+ def initial(self) -> dict:
517
+ """The world's initial batch, read when the legacy path needs it: a snapshot
518
+ start never parses the JSON at all."""
519
+ if self._initial is None:
520
+ self._initial = read_json(self.world / "data/initial.json")
521
+ return self._initial
522
+
523
+ def reset(self, *, initial: bool = True) -> None:
524
+ """A fresh store: the snapshot copied (or the world's initial batch applied),
525
+ or empty when a legacy seed is about to supply the whole state (the runner's
526
+ base + overlay seed carries the initial rows itself; applying both would
527
+ collide on every key)."""
528
+ with self._lock:
529
+ self._clear_events()
530
+ self._open(self._snapshot_path if initial and self.snapshot else None, initial=initial)
531
+
532
+ # -- the live feed: what changed, for a page that polls
533
+
534
+ def _clear_events(self) -> None:
535
+ self._events: list[dict] = []
536
+ self.event_seq = 0
537
+
538
+ def emit(self, event: dict) -> dict:
539
+ """Record what a write changed, numbered ``seq`` in order, the last
540
+ :data:`EVENT_LOG_SIZE` kept. A world's handlers call this from their
541
+ writes; a route of the world renders :meth:`events_since` for a page
542
+ that polls (Slack's ``/events``). The log is the session's, cleared
543
+ with the store on reset, never persisted."""
544
+ with self._lock:
545
+ self.event_seq += 1
546
+ stamped = {**event, "seq": self.event_seq}
547
+ self._events.append(stamped)
548
+ del self._events[:-EVENT_LOG_SIZE]
549
+ return stamped
550
+
551
+ def events_since(self, seq: int) -> list[dict]:
552
+ """Every event recorded after ``seq``, oldest first."""
553
+ with self._lock:
554
+ return [event for event in self._events if event["seq"] > seq]
555
+
556
+ def _open(self, snapshot: Path | None, *, initial: bool = True) -> None:
557
+ if self.store is not None:
558
+ self.store.close()
559
+ database = Path(self._dir.name) / f"{uuid.uuid4().hex}.db"
560
+ if snapshot is not None:
561
+ self.store = snapshots.open_copy(snapshot, self.contract, database)
562
+ return
563
+ self.store = SQLiteStore.create(database, self.contract)
564
+ if initial:
565
+ self.store.apply_batch(self.initial)
566
+
567
+ def seed(self, body: Any) -> dict:
568
+ """The runner's seed. Two bodies: the legacy whole state ``{entity: [rows]}``
569
+ (inserted on top of an empty world) and the overlay ``{"base": digest, "rows":
570
+ {entity: [rows]}, "mode": append|replace}`` (the snapshot reset, then the rows
571
+ applied on top). An overlay whose base is not the snapshot this world is on is
572
+ refused with ``base_mismatch`` naming the expected digest: a version mismatch
573
+ is an error, never a silent full reseed."""
574
+ if not isinstance(body, dict):
575
+ fail("seed", "Seed must be an object of entity -> rows", "/seed")
576
+ if isinstance(body.get("base"), str) and isinstance(body.get("rows"), dict):
577
+ return self._seed_overlay(body)
578
+ mutations = []
579
+ for entity, rows in body.items():
580
+ if entity not in self.contract.entities:
581
+ fail("seed", f"Unknown entity {entity}", f"/seed/{entity}")
582
+ if not isinstance(rows, list):
583
+ fail("seed", "Rows must be an array", f"/seed/{entity}")
584
+ for row in rows:
585
+ mutations.append(
586
+ {"op": "insert", "entity": entity, "value": row, "source": {"record": f"api-seed:{entity}"}}
587
+ )
588
+ self.reset(initial=False)
589
+ if not mutations:
590
+ return {"applied": 0}
591
+ with self._lock:
592
+ assert self.store is not None
593
+ return self.store.apply_batch(
594
+ {
595
+ "id": f"api-seed-{uuid.uuid4().hex}",
596
+ "target": self.contract.target,
597
+ "mapping": {"id": "api-seed", "version": "1"},
598
+ "coverage": "partial",
599
+ "mutations": mutations,
600
+ }
601
+ )
602
+
603
+ def _seed_overlay(self, body: dict) -> dict:
604
+ from .data import MODES
605
+
606
+ mode = body.get("mode", "append")
607
+ if mode not in MODES:
608
+ fail("seed", f"mode must be one of {', '.join(MODES)}", "/seed/mode")
609
+ if body["base"] != self.digest:
610
+ fail("base_mismatch", "The overlay's base is not the snapshot this world is on", expected=self.digest)
611
+ self.reset()
612
+ return self.seed_live(body["rows"], mode, body.get("redact", "off"))
613
+
614
+ def seed_live(self, rows: dict, mode: str = "append", redact: str = "off") -> dict:
615
+ """Rows onto the world as it stands, no reset: ``append`` upserts by primary
616
+ key, ``replace`` swaps the named entities. The session's seed, so tool calls
617
+ made so far and the scenario's own rows stay. ``redact`` — ``off`` stores the
618
+ rows as given, ``apply`` runs the world's ``[redact]`` policy over them first,
619
+ ``refuse`` rejects plaintext in a redacted field (:mod:`.redaction`)."""
620
+ from .data import MODES, seed_batch
621
+ from .redaction import parse_mode, redact_rows, require_policy
622
+
623
+ if mode not in MODES:
624
+ fail("seed", f"mode must be one of {', '.join(MODES)}", "/seed/mode")
625
+ redact = parse_mode(redact, "/seed/redact")
626
+ rows = redact_rows(require_policy(self.world, redact), rows, redact)
627
+ with self._lock:
628
+ assert self.store is not None
629
+ batch = seed_batch(self.store, self.contract, rows, mode, batch_id=f"api-seed-{uuid.uuid4().hex}")
630
+ return self.store.apply_batch(batch)
631
+
632
+ def scenarios(self) -> dict[str, Path]:
633
+ """The world's own ``scenarios/<name>/scenario.toml`` dirs: a starting state each."""
634
+ return _scenario_dirs(self.world)
635
+
636
+ def apply_scenario(self, name: str) -> None:
637
+ """Start the world in one of its scenarios: the base seed with the scenario's
638
+ ``seed/*.json`` overlays replacing whole entities, the way the platform's runner
639
+ does. A compiled scenario snapshot is opened as it is; otherwise the overlay is
640
+ applied on a fresh default."""
641
+ scenarios = self.scenarios()
642
+ if name not in scenarios:
643
+ fail(
644
+ "scenario",
645
+ f"No scenario {name}; the world has {', '.join(scenarios) or 'none'}",
646
+ f"/{SCENARIOS}/{name}",
647
+ )
648
+ built = snapshots.scenario_snapshot(self.world, name)
649
+ if self.snapshot and snapshots.current(
650
+ built,
651
+ snapshots.contract_hash(self.contract),
652
+ snapshots.scenario_batch_digest(scenarios[name], snapshots.expected_default_digest(self.world)),
653
+ ):
654
+ with self._lock:
655
+ self._open(built)
656
+ return
657
+ overlay = snapshots.scenario_overlay(scenarios[name])
658
+ if self.snapshot:
659
+ self.seed({"base": self.digest, "rows": overlay, "mode": "replace"})
660
+ return
661
+ base: dict[str, list] = {}
662
+ for mutation in self.initial.get("mutations", []):
663
+ if mutation.get("op") == "insert":
664
+ base.setdefault(mutation["entity"], []).append(mutation["value"])
665
+ base.update(overlay)
666
+ self.seed(base)
667
+
668
+ def rows(self, entity: str) -> list[dict]:
669
+ with self._lock:
670
+ assert self.store is not None
671
+ return list(self.store.list(entity))
672
+
673
+ def get(self, entity: str, key: dict) -> dict | None:
674
+ with self._lock:
675
+ assert self.store is not None
676
+ return self.store.get(entity, key)
677
+
678
+ def insert(self, entity: str, value: dict) -> dict:
679
+ """Persist a row the API created; the contract validates it like any ingest."""
680
+ with self._lock:
681
+ assert self.store is not None
682
+ return self.store.insert(entity, value, source={"record": "api.create"})
683
+
684
+ def update(self, entity: str, key: dict, patch: dict) -> dict:
685
+ with self._lock:
686
+ assert self.store is not None
687
+ return self.store.update(entity, key, patch, source={"record": "api.update"})
688
+
689
+ def delete(self, entity: str, key: dict) -> None:
690
+ with self._lock:
691
+ assert self.store is not None
692
+ self.store.delete(entity, key, source={"record": "api.delete"})
693
+
694
+ def key_of(self, entity: str, row: dict) -> dict:
695
+ return {name: row.get(name) for name in self.contract.entities[entity]["primary_key"]}
696
+
697
+ def dump(self) -> dict:
698
+ out: dict[str, dict[str, dict]] = {}
699
+ for entity, spec in self.contract.entities.items():
700
+ keyed = {}
701
+ for row in self.rows(entity):
702
+ key = ":".join(str(row.get(field)) for field in spec["primary_key"])
703
+ keyed[key] = row
704
+ out[entity] = keyed
705
+ return out
706
+
707
+ def describe_snapshot(self) -> dict | None:
708
+ """What ``/__world/state`` reports beside the rows: the snapshot in use, or null."""
709
+ if not self.snapshot:
710
+ return None
711
+ return {"batchDigest": self.snapshot["batchDigest"], "contractHash": self.snapshot["contractHash"]}
712
+
713
+ def close(self) -> None:
714
+ with self._lock:
715
+ if self.store is not None:
716
+ self.store.close()
717
+ self.store = None
718
+ self._dir.cleanup()
719
+
720
+
721
+ # ---------------------------------------------------------------- routing
722
+
723
+
724
+ def _dig(row: Any, path: str) -> Any:
725
+ for part in path.split("."):
726
+ if not isinstance(row, dict) or part not in row:
727
+ return None
728
+ row = row[part]
729
+ return row
730
+
731
+
732
+ def _matches(
733
+ row: dict,
734
+ filters: dict[str, str],
735
+ values: dict[str, str | list[str]],
736
+ modes: dict[str, str] | None = None,
737
+ ) -> bool:
738
+ """Every filter whose argument was supplied must match; a parameter left out does not narrow.
739
+
740
+ ``modes`` picks how: ``equals`` (default), ``contains`` (case-insensitive substring,
741
+ the vendor's ``icontains``) or ``prefix``. A list field matches when any element does,
742
+ and a parameter the client sent more than once (``status[]=a&status[]=b``) matches
743
+ when any of its values does — the vendor's "any of" filter."""
744
+ for arg, path in filters.items():
745
+ if arg not in values:
746
+ continue
747
+ value = _dig(row, path)
748
+ if value is None:
749
+ return False
750
+ mode = (modes or {}).get(arg, "equals")
751
+ sent = values[arg]
752
+ wanted = [w.lower() for w in (sent if isinstance(sent, list) else [sent])]
753
+ candidates = value if isinstance(value, list) else [value]
754
+ if not any(_compare(str(candidate).lower(), w, mode) for candidate in candidates for w in wanted):
755
+ return False
756
+ return True
757
+
758
+
759
+ def _compare(have: str, wanted: str, mode: str) -> bool:
760
+ if mode == "contains":
761
+ return wanted in have
762
+ if mode == "prefix":
763
+ return have.startswith(wanted)
764
+ return have == wanted
765
+
766
+
767
+ class Router:
768
+ def __init__(self, spec: Spec, settings: ApiSettings):
769
+ self.spec = spec
770
+ self.settings = settings
771
+ self.routes = [(operation, self._pattern(operation)) for operation in spec.operations.values()]
772
+ self.tokens: set[str] = set()
773
+ #: refresh token -> the subject it was minted for (password / refresh grants)
774
+ self._refresh_tokens: dict[str, str] = {}
775
+ self._jwt_secret = secrets.token_bytes(32)
776
+ self._lock = threading.Lock()
777
+
778
+ @staticmethod
779
+ def _pattern(operation: Operation) -> re.Pattern:
780
+ escaped = re.escape(operation.path)
781
+ pattern = re.sub(r"\\\{([A-Za-z_][A-Za-z0-9_]*)\\\}", r"(?P<\1>[^/]+)", escaped)
782
+ return re.compile(f"^{pattern}$")
783
+
784
+ def match(self, method: str, path: str, query: dict[str, str]) -> tuple[Operation, dict[str, str]] | None:
785
+ """The operation for a request. Vendors reuse one path for several lookups that
786
+ differ only by query parameter, so among path matches the one whose declared
787
+ parameters the caller actually sent wins; ties keep declaration order."""
788
+ best: tuple[int, int, Operation, dict[str, str]] | None = None
789
+ for index, (operation, pattern) in enumerate(self.routes):
790
+ found = pattern.match(path)
791
+ if not found or method not in operation.methods:
792
+ continue
793
+ present = sum(1 for name in operation.params if name in query)
794
+ candidate = (present, -index, operation, {k: urllib.parse.unquote(v) for k, v in found.groupdict().items()})
795
+ if best is None or candidate[:2] > best[:2]:
796
+ best = candidate
797
+ return None if best is None else (best[2], best[3])
798
+
799
+ def issue_token(self, form: dict[str, str], key: str | None) -> dict | None:
800
+ """The vendor's token endpoint. Three grants, the way real vendors mint:
801
+
802
+ * ``client_credentials`` (the default): a bearer ``access_token``.
803
+ * ``password``: ``email`` + ``password`` in, an ``id_token`` (an HS256 JWT
804
+ carrying ``sub``/``iat``/``exp``, so a client that reads expiry from the
805
+ token itself sees a real one) plus a ``refresh_token``. This is how
806
+ Torchlight's clients authenticate.
807
+ * ``refresh_token``: a refresh token this world minted in, a fresh
808
+ ``id_token`` + ``refresh_token`` out; an unknown refresh token is refused.
809
+
810
+ With ``WORLD_API_KEY`` pinned the client secret (or the password) must be that
811
+ key, the way a real vendor knows its clients; unpinned, any grant is served.
812
+ Every bearer this world minted — access or id token — authorizes calls."""
813
+ grant = form.get("grant_type", "client_credentials")
814
+ if grant == "client_credentials":
815
+ if key is not None and form.get("client_secret") != key:
816
+ return None
817
+ token = secrets.token_urlsafe(32)
818
+ with self._lock:
819
+ self.tokens.add(token)
820
+ answer = {"access_token": token, "token_type": "Bearer", "expires_in": 3600}
821
+ if form.get("scope"):
822
+ answer["scope"] = form["scope"]
823
+ elif self.spec.scope:
824
+ answer["scope"] = self.spec.scope
825
+ return answer
826
+ if grant == "password":
827
+ subject = form.get("email") or form.get("username") or ""
828
+ if not subject or not form.get("password"):
829
+ return None
830
+ if key is not None and form.get("password") != key:
831
+ return None
832
+ return self._issue_identity(subject)
833
+ if grant == "refresh_token":
834
+ presented = form.get("refresh_token") or ""
835
+ with self._lock:
836
+ subject = self._refresh_tokens.pop(presented, None)
837
+ if subject is None:
838
+ return None
839
+ return self._issue_identity(subject)
840
+ return None
841
+
842
+ def _issue_identity(self, subject: str) -> dict:
843
+ """An ``id_token`` (HS256 JWT, one hour) and a ``refresh_token``, both
844
+ remembered so later calls and refreshes are honoured."""
845
+ import hmac
846
+ import hashlib
847
+
848
+ now = int(time.time())
849
+ header = base64.urlsafe_b64encode(b'{"alg":"HS256","typ":"JWT"}').rstrip(b"=").decode()
850
+ payload = base64.urlsafe_b64encode(
851
+ json.dumps(
852
+ {"sub": subject, "iat": now, "exp": now + 3600, "iss": self.spec.slug, "jti": secrets.token_urlsafe(9)},
853
+ separators=(",", ":"),
854
+ ).encode()
855
+ ).rstrip(b"=").decode()
856
+ signature = base64.urlsafe_b64encode(
857
+ hmac.new(self._jwt_secret, f"{header}.{payload}".encode(), hashlib.sha256).digest()
858
+ ).rstrip(b"=").decode()
859
+ id_token = f"{header}.{payload}.{signature}"
860
+ refresh = secrets.token_urlsafe(32)
861
+ with self._lock:
862
+ self.tokens.add(id_token)
863
+ self._refresh_tokens[refresh] = subject
864
+ return {
865
+ "id_token": id_token,
866
+ "access_token": id_token,
867
+ "refresh_token": refresh,
868
+ "token_type": "Bearer",
869
+ "expires_in": 3600,
870
+ }
871
+
872
+ def authorized(self, headers: dict[str, str], query: dict[str, str], key: str | None) -> bool:
873
+ spec = self.spec
874
+ if spec.scheme == "none":
875
+ return True
876
+ presented: str | None = None
877
+ if spec.scheme == "header":
878
+ presented = headers.get((spec.auth_name or "").lower())
879
+ elif spec.scheme in ("bearer", "oauth2"):
880
+ value = headers.get("authorization", "")
881
+ presented = value[7:] if value.lower().startswith("bearer ") else None
882
+ elif spec.scheme == "basic":
883
+ value = headers.get("authorization", "")
884
+ try:
885
+ presented = base64.b64decode(value[6:]).decode() if value.lower().startswith("basic ") else None
886
+ except (ValueError, UnicodeDecodeError):
887
+ presented = None
888
+ elif spec.scheme == "query":
889
+ presented = query.get(spec.auth_name or "")
890
+ if not presented:
891
+ return False
892
+ if spec.scheme == "oauth2":
893
+ # A bearer is good only if this world minted it: the client did the grant first.
894
+ with self._lock:
895
+ return presented in self.tokens
896
+ return key is None or presented == key
897
+
898
+
899
+ # ---------------------------------------------------------------- handlers
900
+
901
+
902
+ class ApiContext:
903
+ """What a world's handler gets: the store, the clock, and the vendor's shapes."""
904
+
905
+ def __init__(
906
+ self, state: WorldState, router: Router, operation: Operation, link: tuple[str, dict[str, str]] | None = None
907
+ ):
908
+ self.state = state
909
+ self.router = router
910
+ self.settings = router.settings
911
+ self.operation = operation
912
+ self.spec = router.spec
913
+ #: (absolute URL without query, query) of the request being answered, for page links.
914
+ self.link = link
915
+ #: The request's headers, lower-cased — a gate reads the credential from here.
916
+ self.headers: dict[str, str] = {}
917
+ #: Every value of every query parameter, in order sent: ``{"expand[]": ["a", "b"]}``.
918
+ #: The ``query`` a handler is passed keeps only the first, as most routes want.
919
+ self.query_all: dict[str, list[str]] = {}
920
+
921
+ # -- the store
922
+ def rows(self, entity: str) -> list[dict]:
923
+ return self.state.rows(entity)
924
+
925
+ def get(self, entity: str, key: dict) -> dict | None:
926
+ return self.state.get(entity, key)
927
+
928
+ def find(self, entity: str, **fields: Any) -> list[dict]:
929
+ wanted = {k: str(v) for k, v in fields.items()}
930
+ return [row for row in self.state.rows(entity) if _matches(row, {k: k for k in wanted}, wanted)]
931
+
932
+ def insert(self, entity: str, value: dict) -> dict:
933
+ return self.state.insert(entity, value)
934
+
935
+ def update(self, entity: str, key: dict, patch: dict) -> dict:
936
+ return self.state.update(entity, key, patch)
937
+
938
+ def delete(self, entity: str, key: dict) -> None:
939
+ self.state.delete(entity, key)
940
+
941
+ def key_of(self, entity: str, row: dict) -> dict:
942
+ return self.state.key_of(entity, row)
943
+
944
+ # -- the live feed
945
+ def emit(self, event: dict) -> dict:
946
+ """Record what this write changed for a page that polls (:meth:`WorldState.emit`)."""
947
+ return self.state.emit(event)
948
+
949
+ def events_since(self, seq: int) -> list[dict]:
950
+ return self.state.events_since(seq)
951
+
952
+ def stored_forms(self, field: str, plaintext: Any) -> tuple[Any, ...]:
953
+ """The values the store may hold for a plaintext under this world's ``[redact]``
954
+ (see :func:`connector.stored_forms`); a world without a spec stores the clear value."""
955
+ if self.spec is None:
956
+ return (plaintext,)
957
+ return stored_forms(self.spec, field, plaintext)
958
+
959
+ # -- time and identity
960
+ @staticmethod
961
+ def clock() -> float:
962
+ frozen = os.environ.get(CLOCK_ENV)
963
+ return float(frozen) if frozen else time.time()
964
+
965
+ def now(self) -> str:
966
+ return datetime.fromtimestamp(self.clock(), timezone.utc).isoformat(timespec="seconds").replace("+00:00", "Z")
967
+
968
+ def elapsed(self, since: str | None) -> float:
969
+ """Seconds since an ISO timestamp the world recorded; infinite when it never happened."""
970
+ if not since:
971
+ return float("inf")
972
+ started = datetime.fromisoformat(since.replace("Z", "+00:00"))
973
+ return self.clock() - started.timestamp()
974
+
975
+ def ladder(self, since: str | None, steps: list[tuple[float, Any]], before: Any = None) -> Any:
976
+ """A status machine on a clock: the last step whose delay has passed.
977
+
978
+ ``ladder(executed_at, [(0, "queued"), (5, "started"), (20, "completed")])``
979
+ reads ``queued`` right after execute, ``started`` five seconds later, and
980
+ ``completed`` from twenty seconds on. ``before`` is the answer when nothing
981
+ has started yet."""
982
+ if not since:
983
+ return before
984
+ passed = self.elapsed(since)
985
+ current = before
986
+ for delay, value in steps:
987
+ if passed >= delay:
988
+ current = value
989
+ return current
990
+
991
+ @staticmethod
992
+ def uuid() -> str:
993
+ return str(uuid.uuid4())
994
+
995
+ # -- the vendor's shapes
996
+ def envelope(self, rows: list[dict], query: dict[str, str] | None = None, *, envelope: str | None = None) -> Any:
997
+ page = paginate(rows, query or {}, self.settings.paging)
998
+ return wrap(page, self.settings, envelope, link=self.link, omit_done_cursor=self._omits_done_cursor())
999
+
1000
+ def paged(
1001
+ self, rows: list[dict], query: dict[str, str] | None = None, *, envelope: str | None = None, status: int = 200
1002
+ ) -> Any:
1003
+ """``envelope`` plus the vendor's paging headers, as a handler's full answer."""
1004
+ page = paginate(rows, query or {}, self.settings.paging)
1005
+ body = wrap(page, self.settings, envelope, link=self.link, omit_done_cursor=self._omits_done_cursor())
1006
+ return status, body, page_headers(page, self.settings)
1007
+
1008
+ def _omits_done_cursor(self) -> bool:
1009
+ return self.settings.omits_done_cursor(self.settings.for_operation(self.operation.name))
1010
+
1011
+ def not_found(self) -> tuple[int, Any]:
1012
+ """The operation's own 404 when ``[operations.api]`` sets one, else the world's."""
1013
+ return self.settings.not_found_for(self.settings.for_operation(self.operation.name))
1014
+
1015
+ def invalid(self, detail: str | None = None) -> tuple[int, Any]:
1016
+ body = self.settings.invalid
1017
+ if detail and isinstance(body, dict):
1018
+ body = {**body, "detail": detail}
1019
+ return self.settings.invalid_status, body
1020
+
1021
+
1022
+ Handler = Callable[[ApiContext, dict[str, str], dict[str, str], Any], Any]
1023
+
1024
+
1025
+ def load_handlers(settings: ApiSettings) -> dict[str, Handler]:
1026
+ """Import the world's handlers module once; every ``action = "handler"`` name must exist."""
1027
+ if settings.handlers is None:
1028
+ return {}
1029
+ module_name = f"gateway_world_api_handlers_{uuid.uuid4().hex}"
1030
+ spec = importlib.util.spec_from_file_location(module_name, settings.handlers)
1031
+ if spec is None or spec.loader is None:
1032
+ fail("handlers", f"Could not load {settings.handlers}", "/api/handlers")
1033
+ module = importlib.util.module_from_spec(spec)
1034
+ sys.modules[module_name] = module
1035
+ try:
1036
+ spec.loader.exec_module(module)
1037
+ finally:
1038
+ sys.modules.pop(module_name, None)
1039
+ handlers: dict[str, Handler] = {}
1040
+ if settings.before:
1041
+ gate = getattr(module, settings.before, None)
1042
+ if not callable(gate):
1043
+ fail(
1044
+ "handlers",
1045
+ f"{settings.handlers.name} has no function {settings.before} for [api].before",
1046
+ "/api/before",
1047
+ )
1048
+ handlers[BEFORE] = gate
1049
+ for name, op in settings.operations.items():
1050
+ if not op.handler:
1051
+ continue
1052
+ function = getattr(module, op.handler, None)
1053
+ if not callable(function):
1054
+ fail(
1055
+ "handlers",
1056
+ f"{settings.handlers.name} has no function {op.handler} for operation {name}",
1057
+ "/api/handlers",
1058
+ )
1059
+ handlers[name] = function
1060
+ return handlers
1061
+
1062
+
1063
+ # ---------------------------------------------------------------- pages and envelopes
1064
+
1065
+
1066
+ @dataclass(frozen=True)
1067
+ class Page:
1068
+ rows: list[dict]
1069
+ total: int
1070
+ offset: int
1071
+ limit: int
1072
+ style: str
1073
+
1074
+ @property
1075
+ def next_offset(self) -> int | None:
1076
+ following = self.offset + self.limit
1077
+ return following if self.style != "none" and following < self.total else None
1078
+
1079
+ @property
1080
+ def previous_offset(self) -> int | None:
1081
+ return max(self.offset - self.limit, 0) if self.style != "none" and self.offset > 0 else None
1082
+
1083
+
1084
+ def _encode_cursor(offset: int) -> str:
1085
+ return base64.urlsafe_b64encode(str(offset).encode()).decode().rstrip("=")
1086
+
1087
+
1088
+ def paginate(rows: list[dict], query: dict[str, str], paging: Paging) -> Page:
1089
+ """One page of rows with the offsets the next and previous pages start at."""
1090
+ total = len(rows)
1091
+ if paging.style == "none":
1092
+ return Page(rows, total, 0, total, "none")
1093
+ limit = _int_param(query.get(paging.limit_param), paging.page_size)
1094
+ offset = 0
1095
+ if paging.style == "offset":
1096
+ offset = _int_param(query.get(paging.offset_param), 0)
1097
+ else:
1098
+ raw = query.get(paging.cursor_param)
1099
+ if raw:
1100
+ try:
1101
+ offset = int(base64.urlsafe_b64decode(raw + "=" * (-len(raw) % 4)).decode())
1102
+ except (ValueError, UnicodeDecodeError):
1103
+ offset = 0
1104
+ return Page(rows[offset : offset + limit], total, offset, limit, paging.style)
1105
+
1106
+
1107
+ def _int_param(value: str | None, default: int) -> int:
1108
+ try:
1109
+ parsed = int(value) if value is not None else default
1110
+ except ValueError:
1111
+ return default
1112
+ return parsed if parsed >= 0 else default
1113
+
1114
+
1115
+ def _page_ref(page: Page, offset: int | None, paging: Paging, link: tuple[str, dict[str, str]] | None) -> Any:
1116
+ """What the vendor's client is handed for a neighbouring page: '' or None when there is
1117
+ none, a cursor token, or — with ``page_links`` — the absolute URL DRF-style vendors answer."""
1118
+ if offset is None:
1119
+ return None if link is not None else ""
1120
+ if link is None:
1121
+ return _encode_cursor(offset)
1122
+ base, query = link
1123
+ following = dict(query)
1124
+ if page.style == "offset":
1125
+ following[paging.offset_param] = str(offset)
1126
+ else:
1127
+ following[paging.cursor_param] = _encode_cursor(offset)
1128
+ following[paging.limit_param] = str(page.limit)
1129
+ return f"{base}?{urllib.parse.urlencode(following)}"
1130
+
1131
+
1132
+ def page_headers(page: Page, settings: ApiSettings, paging: Paging | None = None) -> dict[str, str] | None:
1133
+ """The page's cursor/total/previous as response headers, when the vendor sends them that way."""
1134
+ if not settings.page_headers:
1135
+ return None
1136
+ paging = paging or settings.paging
1137
+ values = {
1138
+ "cursor": _page_ref(page, page.next_offset, paging, None),
1139
+ "total": str(page.total),
1140
+ "previous": _page_ref(page, page.previous_offset, paging, None),
1141
+ }
1142
+ return {header: str(values[key]) for key, header in settings.page_headers.items() if values[key] not in ("", None)}
1143
+
1144
+
1145
+ def wrap(
1146
+ page: Page | list[dict],
1147
+ settings: ApiSettings,
1148
+ envelope: str | None = None,
1149
+ *,
1150
+ paging: Paging | None = None,
1151
+ link: tuple[str, dict[str, str]] | None = None,
1152
+ omit_done_cursor: bool = False,
1153
+ ) -> Any:
1154
+ """Rows in the vendor's envelope: ``{<envelope>: rows, <hits_key>: total, <cursor_key>: next
1155
+ [, <previous_key>: previous]}``; an empty envelope key means the bare array, an empty
1156
+ ``hits_key`` leaves the count out, and ``omit_done_cursor`` leaves the cursor key out
1157
+ on the last page — together they make the ``{items, next_cursor?}`` shape vendors such
1158
+ as Brex answer, which a client may check with ``"next_cursor" in body``."""
1159
+ if not isinstance(page, Page):
1160
+ page = Page(page, len(page), 0, len(page), "none")
1161
+ key = settings.envelope if envelope is None else envelope
1162
+ if not key:
1163
+ return page.rows
1164
+ paging = paging or settings.paging
1165
+ link = link if settings.page_links else None
1166
+ out = {key: page.rows}
1167
+ if settings.hits_key:
1168
+ out[settings.hits_key] = page.total
1169
+ if page.next_offset is not None or not omit_done_cursor:
1170
+ out[settings.cursor_key] = _page_ref(page, page.next_offset, paging, link)
1171
+ if settings.previous_key:
1172
+ out[settings.previous_key] = _page_ref(page, page.previous_offset, paging, link)
1173
+ return out
1174
+
1175
+
1176
+ def _normalize(result: Any, default_status: int | None) -> Any:
1177
+ """What a handler (or the gate) hands back, as ``(status, body, headers)``.
1178
+
1179
+ A handler returns a body, ``(status, body)`` or ``(status, body, headers)``;
1180
+ the gate returns ``None`` to let the request through or one of those to stop it."""
1181
+ if result is None and default_status is None:
1182
+ return None
1183
+ if (
1184
+ isinstance(result, tuple)
1185
+ and len(result) in (2, 3)
1186
+ and isinstance(result[0], int)
1187
+ and not isinstance(result[0], bool)
1188
+ ):
1189
+ status, body = result[0], result[1]
1190
+ extra = result[2] if len(result) == 3 else None
1191
+ if extra is not None and not (
1192
+ isinstance(extra, dict) and all(isinstance(k, str) and isinstance(v, str) for k, v in extra.items())
1193
+ ):
1194
+ fail("handlers", "A handler's headers are a mapping of header names to strings", "/api/handlers")
1195
+ if isinstance(body, bytes) and not any(k.lower() == "content-type" for k in extra or {}):
1196
+ # Bytes go on the wire as they are (an event stream, a file); the
1197
+ # handler says what they are, since the world's JSON type is not it.
1198
+ fail("handlers", "A handler answering bytes names the Content-Type in its headers", "/api/handlers")
1199
+ return status, body, extra
1200
+ return default_status, result, None
1201
+
1202
+
1203
+ # ---------------------------------------------------------------- writes
1204
+
1205
+
1206
+ def _set(row: dict, target: str, value: Any, current: dict | None) -> None:
1207
+ """Assign a dotted target (``attributes.note``), keeping the rest of a nested
1208
+ object an update leaves alone."""
1209
+ parts = target.split(".")
1210
+ if len(parts) == 1:
1211
+ row[target] = value
1212
+ return
1213
+ head = parts[0]
1214
+ if head not in row:
1215
+ base = current.get(head) if current else None
1216
+ row[head] = json.loads(json.dumps(base)) if isinstance(base, dict) else {}
1217
+ node = row[head]
1218
+ for part in parts[1:-1]:
1219
+ if not isinstance(node.get(part), dict):
1220
+ node[part] = {}
1221
+ node = node[part]
1222
+ node[parts[-1]] = value
1223
+
1224
+
1225
+ def _bind(op: OperationSettings, ctx: ApiContext, body: Any, current: dict | None = None) -> dict:
1226
+ """The row a create or update writes: defaults, then the body (mapped or as-is), then generated fields."""
1227
+ if body is None or not isinstance(body, dict):
1228
+ body = {}
1229
+ row: dict = json.loads(json.dumps(op.defaults)) if current is None else {}
1230
+ if op.body:
1231
+ for field_name, path in op.body.items():
1232
+ value = _dig(body, path)
1233
+ if value is not None:
1234
+ _set(row, field_name, value, current)
1235
+ else:
1236
+ row.update(body)
1237
+ if current is None:
1238
+ for field_name, kind in op.generate.items():
1239
+ if row.get(field_name) is not None:
1240
+ continue
1241
+ if kind == "uuid":
1242
+ row[field_name] = ctx.uuid()
1243
+ elif kind == "now":
1244
+ row[field_name] = ctx.now()
1245
+ else:
1246
+ existing = [r.get(field_name) for r in ctx.rows(ctx.operation.entity or "")]
1247
+ row[field_name] = max([v for v in existing if isinstance(v, int)] + [0]) + 1
1248
+ return row
1249
+
1250
+
1251
+ # ---------------------------------------------------------------- presenting a credential
1252
+
1253
+
1254
+ def vendor_credential(spec: Spec, presented: str, *, grant: str | None = None) -> tuple[dict[str, str], dict[str, str]]:
1255
+ """(headers, query) carrying the world's own credential: ``presented`` in
1256
+ the shape the vendor's scheme declares — a ``query`` world reads its key
1257
+ from the query string, so that half is a query parameter; an ``oauth2``
1258
+ world accepts only a bearer it minted, so the caller passes its ``grant``.
1259
+ The host presents a session token this way, the local server its pin."""
1260
+ if spec.scheme == "none":
1261
+ return {}, {}
1262
+ if spec.scheme == "header":
1263
+ return {(spec.auth_name or "x-api-key").lower(): presented}, {}
1264
+ if spec.scheme == "bearer":
1265
+ return {"authorization": f"Bearer {presented}"}, {}
1266
+ if spec.scheme == "oauth2":
1267
+ return {"authorization": f"Bearer {grant or ''}"}, {}
1268
+ if spec.scheme == "basic":
1269
+ return {"authorization": "Basic " + base64.b64encode(f"{presented}:".encode()).decode()}, {}
1270
+ if spec.scheme == "query":
1271
+ return {}, {spec.auth_name or "api_key": presented}
1272
+ fail("spec", f"auth scheme '{spec.scheme}' has no credential shape to present", "/auth/scheme")
1273
+ raise AssertionError # fail() never returns
1274
+
1275
+
1276
+ def with_query(target: str, extra: dict[str, str]) -> str:
1277
+ """``target`` with ``extra`` merged into its query string: the caller's
1278
+ params kept, duplicates and all, except one named like a credential in
1279
+ ``extra``, which the credential replaces (the world reads the first value
1280
+ of a name, and the presented credential must be the one it reads)."""
1281
+ if not extra:
1282
+ return target
1283
+ url = urllib.parse.urlsplit(target)
1284
+ kept = [(k, v) for k, v in urllib.parse.parse_qsl(url.query, keep_blank_values=True) if k not in extra]
1285
+ query = kept + list(extra.items())
1286
+ return urllib.parse.urlunsplit(url._replace(query=urllib.parse.urlencode(query)))
1287
+
1288
+
1289
+ # ---------------------------------------------------------------- the server
1290
+
1291
+
1292
+ Response = tuple[int, Any, dict[str, str] | None]
1293
+
1294
+
1295
+ class WorldApp:
1296
+ """One world's HTTP behaviour as a function of the request.
1297
+
1298
+ ``handle`` takes what a server read off the wire (method, request target,
1299
+ headers, raw body) and answers ``(status, body, extra headers)``; nothing in
1300
+ it touches a socket. ``make_handler`` wraps it for ``serve()``, and the
1301
+ World Host calls it for whichever session a request names, so one process
1302
+ can answer for many worlds without the handler knowing.
1303
+ """
1304
+
1305
+ def __init__(
1306
+ self,
1307
+ state: WorldState,
1308
+ router: Router,
1309
+ key: str | None,
1310
+ handlers: dict[str, Handler] | None = None,
1311
+ allowed: frozenset[str] | None = None,
1312
+ ):
1313
+ self.state = state
1314
+ self.router = router
1315
+ self.key = key
1316
+ self.settings = router.settings
1317
+ self.prefix = urllib.parse.urlsplit(router.spec.base_url).path.rstrip("/")
1318
+ self.handlers = load_handlers(self.settings) if handlers is None else handlers
1319
+ #: The operations this session's task allows, or None for all of them.
1320
+ #: A route outside the list answers 403 before any handler runs, so the
1321
+ #: list holds against a client that talks to the vendor API directly.
1322
+ self.allowed = allowed
1323
+
1324
+ # ------------------------------------------------------------ helpers
1325
+
1326
+ @staticmethod
1327
+ def _json(raw: bytes) -> Any:
1328
+ if not raw:
1329
+ return {}
1330
+ try:
1331
+ return json.loads(raw.decode("utf-8"))
1332
+ except (UnicodeDecodeError, json.JSONDecodeError):
1333
+ return None
1334
+
1335
+ @staticmethod
1336
+ def _body(raw: bytes, headers: dict[str, str]) -> Any:
1337
+ """A write's body as the route reads it: JSON, or a form (``application/
1338
+ x-www-form-urlencoded``, what Slack's Web API takes and a browser page
1339
+ posts) as ``{name: first value}``. A body that is JSON reads as JSON
1340
+ whatever the label says — urllib labels every POST a form, and no form
1341
+ field starts with ``{``. Malformed JSON is None."""
1342
+ content_type = (headers.get("content-type") or "").split(";")[0].strip().lower()
1343
+ if content_type == "application/x-www-form-urlencoded" and not raw.lstrip().startswith((b"{", b"[")):
1344
+ pairs = urllib.parse.parse_qs(raw.decode("utf-8", "replace"), keep_blank_values=True)
1345
+ return {k: v[0] for k, v in pairs.items()}
1346
+ return WorldApp._json(raw)
1347
+
1348
+ @staticmethod
1349
+ def _form(raw: bytes, headers: dict[str, str]) -> dict[str, str]:
1350
+ content_type = (headers.get("content-type") or "").split(";")[0].strip().lower()
1351
+ if content_type == "application/json":
1352
+ try:
1353
+ parsed = json.loads(raw.decode("utf-8"))
1354
+ except (UnicodeDecodeError, json.JSONDecodeError):
1355
+ return {}
1356
+ return {k: str(v) for k, v in parsed.items()} if isinstance(parsed, dict) else {}
1357
+ form = {k: v[0] for k, v in urllib.parse.parse_qs(raw.decode("utf-8", "replace")).items()}
1358
+ basic = headers.get("authorization", "")
1359
+ if basic.lower().startswith("basic "):
1360
+ try:
1361
+ client_id, _, client_secret = base64.b64decode(basic[6:]).decode().partition(":")
1362
+ form.setdefault("client_id", client_id)
1363
+ form.setdefault("client_secret", client_secret)
1364
+ except (ValueError, UnicodeDecodeError):
1365
+ pass
1366
+ return form
1367
+
1368
+ def _strip(self, path: str) -> str:
1369
+ if self.prefix and path.startswith(self.prefix):
1370
+ return path[len(self.prefix) :] or "/"
1371
+ return path
1372
+
1373
+ # ------------------------------------------------------------ the request
1374
+
1375
+ def handle(self, method: str, target: str, headers: dict[str, str], raw: bytes, default_host: str) -> Response:
1376
+ """Answer one request. ``headers`` are lower-cased; ``default_host`` is what
1377
+ a link uses when the request carries no Host header."""
1378
+ url = urllib.parse.urlsplit(target)
1379
+ settings, router, state = self.settings, self.router, self.state
1380
+ if method == "GET":
1381
+ if url.path == ADMIN["health"]:
1382
+ return 200, {"ok": True, "world": router.spec.slug}, None
1383
+ if url.path == ADMIN["state"]:
1384
+ return 200, {**state.dump(), "snapshot": state.describe_snapshot()}, None
1385
+ if method == "POST":
1386
+ if url.path == ADMIN["reset"]:
1387
+ state.reset()
1388
+ return 200, {"ok": True}, None
1389
+ if url.path == ADMIN["seed"]:
1390
+ body = self._json(raw)
1391
+ if body is None:
1392
+ return 400, {"error": "seed must be JSON"}, None
1393
+ try:
1394
+ state.seed(body)
1395
+ except ContractError as error:
1396
+ if error.detail.get("code") == "base_mismatch":
1397
+ return 409, {"error": "base_mismatch", "expected": error.detail.get("expected")}, None
1398
+ return 400, {"error": "seed_rejected", "detail": str(error)}, None
1399
+ except Exception as error: # a rejected seed is the caller's problem, reported plainly
1400
+ return 400, {"error": "seed_rejected", "detail": str(error)}, None
1401
+ return 200, {"ok": True}, None
1402
+ if settings.token_path and self._strip(url.path) == settings.token_path:
1403
+ issued = router.issue_token(self._form(raw, headers), self.key)
1404
+ if issued is None:
1405
+ return 400, {"error": "invalid_client"}, None
1406
+ return 200, issued, None
1407
+ if method not in ("GET", "POST", "PUT", "PATCH", "DELETE"):
1408
+ return 405, {"error": "method_not_allowed"}, None
1409
+ return self._route(method, url, headers, raw, default_host)
1410
+
1411
+ def _route(self, method: str, url, headers: dict[str, str], raw: bytes, default_host: str) -> Response:
1412
+ settings, router, state, handlers = self.settings, self.router, self.state, self.handlers
1413
+ path = self._strip(url.path)
1414
+ # Every value of a repeated key is kept; ``query`` hands routes the first, the way
1415
+ # they always read it, and ``ctx.query_all`` hands handlers and filters the rest.
1416
+ query_all = {k: list(v) for k, v in urllib.parse.parse_qs(url.query).items()}
1417
+ query = {k: v[0] for k, v in query_all.items()}
1418
+ if not router.authorized(headers, query, self.key):
1419
+ return settings.unauthorized_status, settings.unauthorized, None
1420
+ matched = router.match(method, path, query)
1421
+ if matched is None:
1422
+ return settings.not_found_status, settings.not_found, None
1423
+ operation, args = matched
1424
+ if self.allowed is not None and operation.name not in self.allowed:
1425
+ return 403, {"error": "tool_not_allowed", "tool": operation.name}, None
1426
+ op = settings.for_operation(operation.name)
1427
+ body = self._body(raw, headers) if method in ("POST", "PUT", "PATCH") else {}
1428
+ if body is None:
1429
+ return settings.invalid_status, settings.invalid, None
1430
+ host = headers.get("host") or default_host
1431
+ forwarded = (headers.get("x-forwarded-proto") or "http").split(",")[0].strip()
1432
+ ctx = ApiContext(state, router, operation, link=(f"{forwarded}://{host}{url.path}", query))
1433
+ ctx.headers = headers
1434
+ ctx.query_all = query_all
1435
+ try:
1436
+ if BEFORE in handlers:
1437
+ # The world's gate: quotas, allow-lists, key states — whatever the vendor
1438
+ # checks before any route, declarative ones included.
1439
+ verdict = _normalize(handlers[BEFORE](ctx, args, query, body), None)
1440
+ if verdict is not None:
1441
+ return verdict
1442
+ status, answer, extra = _normalize(self._answer(op, operation, ctx, args, query, body, handlers), op.status)
1443
+ except ContractError as error:
1444
+ detail = getattr(error, "detail", None) or {"message": str(error)}
1445
+ invalid = settings.invalid
1446
+ if isinstance(invalid, dict):
1447
+ invalid = {**invalid, "detail": detail}
1448
+ return settings.invalid_status, invalid, None
1449
+ return status, answer, extra
1450
+
1451
+ @staticmethod
1452
+ def _answer(
1453
+ op: OperationSettings,
1454
+ operation: Operation,
1455
+ ctx: ApiContext,
1456
+ args: dict[str, str],
1457
+ query: dict[str, str],
1458
+ body: Any,
1459
+ handlers: dict[str, Handler],
1460
+ ) -> Any:
1461
+ if op.action == "handler":
1462
+ return handlers[operation.name](ctx, args, query, body)
1463
+ if not operation.entity:
1464
+ return 501, {"error": "not_modelled", "operation": operation.name}
1465
+ entity = operation.entity
1466
+ # A declared parameter filters on every value the client sent, so ``status[]=a&status[]=b``
1467
+ # reads as "either", not as "a" with "b" silently dropped.
1468
+ values: dict[str, str | list[str]] = {
1469
+ **{k: v for k, v in ctx.query_all.items() if k in operation.params},
1470
+ **args,
1471
+ }
1472
+ omit_done_cursor = ctx.settings.omits_done_cursor(op)
1473
+ if op.action == "create":
1474
+ row = ctx.insert(entity, _bind(op, ctx, body))
1475
+ return op.status, row if op.single else wrap([row], ctx.settings, op.envelope)
1476
+ rows = [row for row in ctx.rows(entity) if _matches(row, op.filter, values, op.match)]
1477
+ if op.action in ("update", "delete"):
1478
+ if len(rows) != 1:
1479
+ return ctx.not_found()
1480
+ key = ctx.key_of(entity, rows[0])
1481
+ if op.action == "delete":
1482
+ ctx.delete(entity, key)
1483
+ return op.status, None
1484
+ row = ctx.update(entity, key, _bind(op, ctx, body, current=rows[0]))
1485
+ return op.status, row if op.single else wrap([row], ctx.settings, op.envelope)
1486
+ if op.single:
1487
+ if not rows:
1488
+ return ctx.not_found()
1489
+ return op.status, rows[0]
1490
+ paging = (
1491
+ ctx.settings.paging
1492
+ if op.paging is None
1493
+ else Paging(
1494
+ op.paging,
1495
+ ctx.settings.paging.limit_param,
1496
+ ctx.settings.paging.offset_param,
1497
+ ctx.settings.paging.cursor_param,
1498
+ ctx.settings.paging.page_size,
1499
+ )
1500
+ )
1501
+ page = paginate(rows, query, paging)
1502
+ return (
1503
+ op.status,
1504
+ wrap(page, ctx.settings, op.envelope, paging=paging, link=ctx.link, omit_done_cursor=omit_done_cursor),
1505
+ page_headers(page, ctx.settings, paging),
1506
+ )
1507
+
1508
+
1509
+ def send_response(
1510
+ handler: BaseHTTPRequestHandler, status: int, body: Any, extra: dict[str, str] | None, error_content_type: str
1511
+ ) -> None:
1512
+ """Write one ``WorldApp`` answer to a request handler's socket."""
1513
+ if status == 204 or body is None:
1514
+ handler.send_response(status)
1515
+ for name, value in (extra or {}).items():
1516
+ handler.send_header(name, value)
1517
+ handler.send_header("Content-Length", "0")
1518
+ handler.end_headers()
1519
+ return
1520
+ headers = dict(extra or {})
1521
+ if isinstance(body, bytes):
1522
+ # As the handler shaped them, under the Content-Type it named (checked in _normalize).
1523
+ payload = body
1524
+ else:
1525
+ payload = json.dumps(body, ensure_ascii=False).encode("utf-8")
1526
+ headers = {"Content-Type": error_content_type if status >= 400 else "application/json", **headers}
1527
+ handler.send_response(status)
1528
+ for name, value in headers.items():
1529
+ handler.send_header(name, value)
1530
+ handler.send_header("Content-Length", str(len(payload)))
1531
+ handler.end_headers()
1532
+ handler.wfile.write(payload)
1533
+
1534
+
1535
+ def make_handler(state: WorldState, router: Router, key: str | None):
1536
+ app = WorldApp(state, router, key)
1537
+
1538
+ class Handler(BaseHTTPRequestHandler):
1539
+ server_version = f"gateway-world-api/{router.spec.slug}"
1540
+
1541
+ def log_message(self, *_):
1542
+ pass
1543
+
1544
+ def _serve(self, method: str) -> None:
1545
+ length = int(self.headers.get("Content-Length") or 0)
1546
+ raw = self.rfile.read(length) if length else b""
1547
+ headers = {k.lower(): v for k, v in self.headers.items()}
1548
+ status, body, extra = app.handle(method, self.path, headers, raw, f"127.0.0.1:{self.server.server_port}")
1549
+ send_response(self, status, body, extra, app.settings.error_content_type)
1550
+
1551
+ def do_GET(self):
1552
+ self._serve("GET")
1553
+
1554
+ def do_POST(self):
1555
+ self._serve("POST")
1556
+
1557
+ def do_PUT(self):
1558
+ self._serve("PUT")
1559
+
1560
+ def do_PATCH(self):
1561
+ self._serve("PATCH")
1562
+
1563
+ def do_DELETE(self):
1564
+ self._serve("DELETE")
1565
+
1566
+ return Handler
1567
+
1568
+
1569
+ def serve(
1570
+ world: str | Path,
1571
+ *,
1572
+ port: int = PORT,
1573
+ host: str = "0.0.0.0",
1574
+ api_key: str | None = None,
1575
+ scenario: str | None = None,
1576
+ ) -> ThreadingHTTPServer:
1577
+ """Start the world's API and return the server; the caller decides how long it runs."""
1578
+ root = Path(world)
1579
+ spec = load_spec(root)
1580
+ settings = load_api_settings(root, spec)
1581
+ state = WorldState(root)
1582
+ if scenario:
1583
+ state.apply_scenario(scenario)
1584
+ server = ThreadingHTTPServer((host, port), make_handler(state, Router(spec, settings), api_key))
1585
+ server.world_state = state # type: ignore[attr-defined]
1586
+ return server
1587
+
1588
+
1589
+ def fetch_hosted_snapshot(world: str | Path, environ: dict[str, str] | None = None) -> dict | None:
1590
+ """The hosted pod's snapshot, when ``WORLD_SNAPSHOT_URL`` / ``_SHA256`` / ``_DIGEST``
1591
+ are set: downloaded to ``db/state.sqlite``, verified, sidecar written. All three
1592
+ are required together; a digest mismatch is fatal and names the digest."""
1593
+ env = os.environ if environ is None else environ
1594
+ values = {name: env.get(name) for name in (snapshots.ENV_URL, snapshots.ENV_SHA256, snapshots.ENV_DIGEST)}
1595
+ if not any(values.values()):
1596
+ return None
1597
+ missing = [name for name, value in values.items() if not value]
1598
+ if missing:
1599
+ fail("snapshot", f"{', '.join(missing)} must be set together with the snapshot URL")
1600
+ root = Path(world)
1601
+ return snapshots.fetch(
1602
+ root,
1603
+ check_bundle(root),
1604
+ values[snapshots.ENV_URL],
1605
+ values[snapshots.ENV_SHA256],
1606
+ values[snapshots.ENV_DIGEST],
1607
+ )
1608
+
1609
+
1610
+ def serve_forever(
1611
+ world: str | Path, *, port: int = PORT, api_key: str | None = None, scenario: str | None = None
1612
+ ) -> None:
1613
+ try:
1614
+ fetched = fetch_hosted_snapshot(world)
1615
+ except ContractError as error:
1616
+ print(f"world snapshot refused: {error}", file=sys.stderr)
1617
+ raise SystemExit(2)
1618
+ if fetched:
1619
+ print(f"world snapshot {fetched['batchDigest']} opened", file=sys.stderr)
1620
+ server = serve(world, port=port, api_key=api_key, scenario=scenario)
1621
+ try:
1622
+ print(f"world api listening on http://0.0.0.0:{port}", file=sys.stderr)
1623
+ server.serve_forever()
1624
+ finally:
1625
+ server.server_close()
1626
+ server.world_state.close() # type: ignore[attr-defined]
1627
+
1628
+
1629
+ # ---------------------------------------------------------------- bundle
1630
+
1631
+
1632
+ def openapi_document(spec: Spec, contract_id: str, settings: ApiSettings | None = None) -> dict:
1633
+ parameters = {"header": "header", "query": "query"}
1634
+ security_scheme: dict[str, Any] = {}
1635
+ if spec.scheme in ("header", "query"):
1636
+ security_scheme = {"type": "apiKey", "in": parameters[spec.scheme], "name": spec.auth_name}
1637
+ elif spec.scheme == "bearer":
1638
+ security_scheme = {"type": "http", "scheme": "bearer"}
1639
+ elif spec.scheme == "basic":
1640
+ security_scheme = {"type": "http", "scheme": "basic"}
1641
+ elif spec.scheme == "oauth2":
1642
+ token_url = (settings.token_path if settings else None) or DEFAULT_TOKEN_PATH
1643
+ security_scheme = {
1644
+ "type": "oauth2",
1645
+ "flows": {"clientCredentials": {"tokenUrl": token_url, "scopes": {spec.scope or "api": "API access"}}},
1646
+ }
1647
+ paths: dict[str, dict] = {}
1648
+ for operation in spec.operations.values():
1649
+ op = settings.for_operation(operation.name) if settings else OperationSettings()
1650
+ params = [
1651
+ {"name": name, "in": "path", "required": True, "schema": {"type": "string"}}
1652
+ for name in operation.placeholders
1653
+ ] + [
1654
+ {"name": name, "in": "query", "required": False, "schema": {"type": "string"}} for name in operation.params
1655
+ ]
1656
+ entry: dict[str, Any] = {
1657
+ "operationId": operation.name,
1658
+ "parameters": params,
1659
+ **({"x-gateway-entity": operation.entity} if operation.entity else {}),
1660
+ "x-gateway-action": op.action,
1661
+ "responses": {
1662
+ str(op.status): {"description": "OK"},
1663
+ "401": {"description": "Unauthorized"},
1664
+ "404": {"description": "Not found"},
1665
+ },
1666
+ **({"security": [{"vendor": []}]} if security_scheme else {}),
1667
+ }
1668
+ if op.action in ("create", "update") or (
1669
+ op.action == "handler" and operation.method in ("POST", "PUT", "PATCH")
1670
+ ):
1671
+ entry["requestBody"] = {"content": {"application/json": {"schema": {"type": "object"}}}}
1672
+ if len(operation.methods) > 1:
1673
+ # One OpenAPI operation, listed under the verb a capture sends; the
1674
+ # others the served route also answers are named here.
1675
+ entry["x-gateway-methods"] = list(operation.methods)
1676
+ methods = paths.setdefault(operation.path, {})
1677
+ method = operation.method.lower()
1678
+ if method in methods:
1679
+ # OpenAPI keys one operation per path+method; a vendor that tells lookups apart
1680
+ # by query parameter keeps every one of them here rather than losing all but the first.
1681
+ methods[method].setdefault("x-gateway-variants", []).append(
1682
+ {
1683
+ k: v
1684
+ for k, v in entry.items()
1685
+ if k in ("operationId", "parameters", "x-gateway-entity", "x-gateway-action")
1686
+ }
1687
+ )
1688
+ else:
1689
+ methods[method] = entry
1690
+ document: dict[str, Any] = {
1691
+ "openapi": "3.1.0",
1692
+ "info": {"title": spec.slug, "version": "1.0.0", "x-gateway-domain": contract_id},
1693
+ "servers": [{"url": spec.base_url}],
1694
+ "paths": paths,
1695
+ }
1696
+ if security_scheme:
1697
+ document["components"] = {"securitySchemes": {"vendor": security_scheme}}
1698
+ return document
1699
+
1700
+
1701
+ def _scenario_dirs(root: Path) -> dict[str, Path]:
1702
+ """A world's authored scenarios: each a starting state (seed overlays replacing whole
1703
+ entities) plus an instruction, so a session can open the world mid-investigation,
1704
+ quota-exhausted, or whatever else the vendor's client should be tested against."""
1705
+ return snapshots.scenario_dirs(root)
1706
+
1707
+
1708
+ def base_seed(initial: dict) -> dict[str, list]:
1709
+ """``seed/base.json``: the initial batch's inserted rows by entity, what older
1710
+ runners post as the base of a session's seed."""
1711
+ seed: dict[str, list] = {}
1712
+ for mutation in initial.get("mutations", []):
1713
+ if mutation.get("op") == "insert":
1714
+ seed.setdefault(mutation["entity"], []).append(mutation["value"])
1715
+ return seed
1716
+
1717
+
1718
+ def write_base_seed(world: Path, bundle: Path) -> Path:
1719
+ """Regenerate the bundle's ``seed/base.json`` from the world's ``data/initial.json``."""
1720
+ target = bundle / "seed/base.json"
1721
+ target.parent.mkdir(parents=True, exist_ok=True)
1722
+ target.write_text(json.dumps(base_seed(read_json(world / "data/initial.json")), indent=1) + "\n")
1723
+ return target
1724
+
1725
+
1726
+ def build_api_bundle(world: str | Path, out: str | Path) -> Path:
1727
+ """Write the api-kind bundle that hosts this world's API under ``out``.
1728
+
1729
+ The world stays the authority; this is packaging. `gateway bench push` calls it
1730
+ for any schema world carrying connector.toml, so users push the world, not a
1731
+ second artifact."""
1732
+ root = Path(world)
1733
+ out_dir = Path(out)
1734
+ if out_dir.exists() and any(out_dir.iterdir()):
1735
+ fail("api", "Output directory must be empty or absent", "/api/out")
1736
+ spec = load_spec(root)
1737
+ settings = load_api_settings(root, spec)
1738
+ load_handlers(settings) # a handler the module lacks fails here, not in the container
1739
+ contract = compile_bundle(root)
1740
+ check_bundle(root)
1741
+ out_dir.mkdir(parents=True, exist_ok=True)
1742
+ manifest = [
1743
+ "# Generated from the world under server/world, which is the authority.",
1744
+ "[service]",
1745
+ f'name = "{contract.metadata["package"]["id"]}"',
1746
+ f'emulates = "{spec.slug}"',
1747
+ "",
1748
+ "[server]",
1749
+ f"port = {PORT}",
1750
+ f'healthcheck = "{ADMIN["health"]}"',
1751
+ "",
1752
+ "[admin]",
1753
+ f'reset = "{ADMIN["reset"]}"',
1754
+ f'seed = "{ADMIN["seed"]}"',
1755
+ f'state = "{ADMIN["state"]}"',
1756
+ "",
1757
+ ]
1758
+ if settings.ui is not None:
1759
+ # The built ui travels inside the copied world; the host serves it from
1760
+ # there, so no ui image is ever built for a schema world.
1761
+ manifest += [
1762
+ "[ui]",
1763
+ f'static = "server/world/{settings.ui.static}"',
1764
+ f'entry = "{settings.ui.entry}"',
1765
+ f'api_path = "{settings.ui.api_path}"',
1766
+ "",
1767
+ ]
1768
+ (out_dir / "gateway-api-world.toml").write_text("\n".join(manifest))
1769
+ (out_dir / "openapi.json").write_text(
1770
+ json.dumps(openapi_document(spec, contract.target["id"], settings), indent=1) + "\n"
1771
+ )
1772
+ (out_dir / "seed").mkdir()
1773
+ write_base_seed(root, out_dir)
1774
+ authored = _scenario_dirs(root)
1775
+ for name, path in authored.items():
1776
+ shutil.copytree(path, out_dir / "scenarios" / name)
1777
+ if "default" not in authored:
1778
+ scenario = out_dir / "scenarios/default"
1779
+ scenario.mkdir(parents=True)
1780
+ (scenario / "scenario.toml").write_text('name = "default"\nseed = "seed"\n')
1781
+ (scenario / "instruction.md").write_text(
1782
+ f"The {spec.slug} world serving the vendor's API, seeded with its captured state. Point the provider client here.\n"
1783
+ )
1784
+ server = out_dir / "server"
1785
+ package = server / "gatewaysdk" / "environment" / "schema"
1786
+ package.mkdir(parents=True)
1787
+ (server / "gatewaysdk" / "__init__.py").write_text("")
1788
+ (server / "gatewaysdk" / "environment" / "__init__.py").write_text("")
1789
+ for module in sorted(Path(__file__).parent.glob("*.py")):
1790
+ shutil.copy(module, package / module.name)
1791
+ shutil.copytree(root, server / "world", ignore=shutil.ignore_patterns("captures", "__pycache__", ".git"))
1792
+ (server / "main.py").write_text(
1793
+ "\n".join(
1794
+ [
1795
+ '"""Serve the world\'s API; everything it needs sits beside this file."""',
1796
+ "import os",
1797
+ "import sys",
1798
+ "from pathlib import Path",
1799
+ "",
1800
+ "sys.path.insert(0, str(Path(__file__).resolve().parent))",
1801
+ "from gatewaysdk.environment.schema.api import serve_forever # noqa: E402",
1802
+ "",
1803
+ "serve_forever(",
1804
+ ' Path(__file__).resolve().parent / "world",',
1805
+ f' port=int(os.environ.get("PORT") or {PORT}),',
1806
+ ' api_key=os.environ.get("WORLD_API_KEY") or None,',
1807
+ ")",
1808
+ "",
1809
+ ]
1810
+ )
1811
+ )
1812
+ (server / "Dockerfile").write_text(
1813
+ "\n".join(
1814
+ [
1815
+ "FROM python:3.12-slim",
1816
+ "WORKDIR /app",
1817
+ "COPY server /app",
1818
+ f"EXPOSE {PORT}",
1819
+ 'CMD ["python", "/app/main.py"]',
1820
+ "",
1821
+ ]
1822
+ )
1823
+ )
1824
+ return out_dir