@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
@@ -30,6 +30,483 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
+ // src/worlds/browser.ts
34
+ function surfaceKinds(s) {
35
+ const kinds = ["tools"];
36
+ if (s.api) kinds.push("api");
37
+ if (s.ui) kinds.push("ui");
38
+ if (s.browser) kinds.push("browser");
39
+ return kinds;
40
+ }
41
+ function uiUrl(ui, path8) {
42
+ const base = ui.url.replace(/\/+$/, "");
43
+ const rel = path8.startsWith("/") ? path8 : `/${path8}`;
44
+ if (!ui.token) return base + rel;
45
+ const [beforeHash, hash] = splitHash(rel);
46
+ const joiner = beforeHash.includes("?") ? "&" : "?";
47
+ const query = `${UI_TOKEN_QUERY}=${encodeURIComponent(ui.token)}`;
48
+ return base + beforeHash + joiner + query + hash;
49
+ }
50
+ function uiEntryUrl(ui) {
51
+ return uiUrl(ui, ui.entry || "/");
52
+ }
53
+ function withoutUiToken(url) {
54
+ const [beforeHash, hash] = splitHash(url);
55
+ const q = beforeHash.indexOf("?");
56
+ if (q < 0) return url;
57
+ const kept = beforeHash.slice(q + 1).split("&").filter((pair) => pair !== "" && pair.split("=")[0] !== UI_TOKEN_QUERY);
58
+ return beforeHash.slice(0, q) + (kept.length ? `?${kept.join("&")}` : "") + hash;
59
+ }
60
+ function splitHash(url) {
61
+ const h = url.indexOf("#");
62
+ return h < 0 ? [url, ""] : [url.slice(0, h), url.slice(h)];
63
+ }
64
+ function redactActionArgs(action, args) {
65
+ const secretField = action === "browser_type" && SECRET_KEY.test(String(args.selector ?? ""));
66
+ const out = {};
67
+ for (const [key, value] of Object.entries(args)) {
68
+ if (value === null || value === void 0) out[key] = null;
69
+ else if (typeof value === "boolean" || typeof value === "number")
70
+ out[key] = value;
71
+ else if (typeof value === "string") {
72
+ if (SECRET_KEY.test(key) || SECRET_VALUE.test(value) || secretField && key === "text")
73
+ out[key] = "[redacted]";
74
+ else
75
+ out[key] = value.length <= EVENT_MAX_STRING ? value : value.slice(0, EVENT_MAX_STRING) + "\u2026";
76
+ } else out[key] = "[omitted]";
77
+ }
78
+ return out;
79
+ }
80
+ async function loadPlaywright() {
81
+ try {
82
+ const name = "playwright";
83
+ return await import(name);
84
+ } catch (error) {
85
+ throw new Error(
86
+ "Driving a world UI needs Playwright: npm install playwright (and `npx playwright install chromium` for local mode).",
87
+ { cause: error }
88
+ );
89
+ }
90
+ }
91
+ function resolveBrowserMode(surfaces, mode) {
92
+ if (!surfaces.ui && !surfaces.browser)
93
+ throw new WorldSurfaceUnavailable(
94
+ "ui",
95
+ "open the session with surfaces: ['ui'] on a world that declares [ui]"
96
+ );
97
+ const resolved = mode === "auto" ? surfaces.browser ? "hosted" : "local" : mode;
98
+ if (resolved === "hosted" && !surfaces.browser)
99
+ throw new WorldSurfaceUnavailable(
100
+ "browser",
101
+ "open the session with surfaces: ['browser'] to get a hosted browser"
102
+ );
103
+ return resolved;
104
+ }
105
+ async function openBrowser(surfaces, opts = {}) {
106
+ const mode = resolveBrowserMode(surfaces, opts.mode ?? "auto");
107
+ const pw = opts.playwright ?? await loadPlaywright();
108
+ const viewport = surfaces.browser?.viewport ?? DEFAULT_VIEWPORT;
109
+ const browser = mode === "hosted" ? surfaces.browser.protocol === "playwright" ? await pw.chromium.connect(surfaces.browser.wsUrl) : await pw.chromium.connectOverCDP(surfaces.browser.wsUrl) : await pw.chromium.launch({ headless: opts.headless ?? true });
110
+ const context = await browser.newContext({ viewport });
111
+ const page = await context.newPage();
112
+ return new WorldBrowser(
113
+ page,
114
+ surfaces.ui,
115
+ mode,
116
+ async () => {
117
+ await context.close();
118
+ await browser.close();
119
+ },
120
+ viewport,
121
+ opts.recorder ?? null
122
+ );
123
+ }
124
+ function computerUseToolkit(browser, opts = {}) {
125
+ const maxText = opts.maxText ?? 2e4;
126
+ const observe = async (selector = "body") => {
127
+ const text2 = await browser.text(selector);
128
+ return {
129
+ url: browser.url,
130
+ title: await browser.title(),
131
+ text: text2.slice(0, maxText),
132
+ truncated: text2.length > maxText
133
+ };
134
+ };
135
+ const impls = {
136
+ browser_goto: async (a) => {
137
+ await browser.goto(typeof a.path === "string" ? a.path : void 0);
138
+ return observe();
139
+ },
140
+ browser_click: async (a) => {
141
+ await browser.click(str(a.selector, ""));
142
+ return observe();
143
+ },
144
+ browser_type: async (a) => {
145
+ await browser.type(str(a.selector, ""), String(a.text ?? ""));
146
+ return { ok: true, url: browser.url };
147
+ },
148
+ browser_press: async (a) => {
149
+ await browser.press(str(a.key, "Enter"));
150
+ return observe();
151
+ },
152
+ browser_scroll: async (a) => {
153
+ await browser.scroll(typeof a.dy === "number" ? a.dy : 600);
154
+ return { ok: true, url: browser.url };
155
+ },
156
+ browser_screenshot: async (a) => ({
157
+ image_base64: await browser.screenshotBase64(a.full_page === true),
158
+ url: browser.url
159
+ }),
160
+ browser_read: async (a) => observe(str(a.selector, "body")),
161
+ browser_back: async () => {
162
+ await browser.back();
163
+ return observe();
164
+ }
165
+ };
166
+ const specs = COMPUTER_USE_SPECS.map((s) => ({ ...s }));
167
+ return {
168
+ schemas: specs.map((spec) => schemaFromSignature(spec)),
169
+ impls,
170
+ specs
171
+ };
172
+ }
173
+ var SURFACE_KINDS, DEFAULT_VIEWPORT, SETTLE_TIMEOUT_MS, SETTLE_QUIET_MS, SETTLE_POLL_MS, EVENT_BATCH_SIZE, EVENT_FLUSH_INTERVAL_MS, EVENT_MAX_RETRIES, EVENT_SCREENSHOT_QUALITY, EVENT_MAX_STRING, SECRET_KEY, SECRET_VALUE, WorldSurfaceUnavailable, UI_TOKEN_QUERY, BrowserActionRecorder, WorldBrowser, COMPUTER_USE_SPECS, str;
174
+ var init_browser = __esm({
175
+ "src/worlds/browser.ts"() {
176
+ "use strict";
177
+ init_session();
178
+ SURFACE_KINDS = ["tools", "api", "ui", "browser"];
179
+ DEFAULT_VIEWPORT = { width: 1280, height: 800 };
180
+ SETTLE_TIMEOUT_MS = 5e3;
181
+ SETTLE_QUIET_MS = 150;
182
+ SETTLE_POLL_MS = 25;
183
+ EVENT_BATCH_SIZE = 10;
184
+ EVENT_FLUSH_INTERVAL_MS = 1e3;
185
+ EVENT_MAX_RETRIES = 3;
186
+ EVENT_SCREENSHOT_QUALITY = 60;
187
+ EVENT_MAX_STRING = 500;
188
+ SECRET_KEY = /pass(word|wd)?|secret|token|api[-_]?key|authorization|cookie|(^|[-_ #.\["'=])(otp|pin|cvv|ssn)([-_ \]"']|$)/i;
189
+ SECRET_VALUE = /^((sk|pk|ghp|xox[abp])[-_][-_A-Za-z0-9]{8,}|AKIA[0-9A-Z]{12,}|Bearer [-_.A-Za-z0-9]{8,})/;
190
+ WorldSurfaceUnavailable = class extends Error {
191
+ constructor(surface, reason) {
192
+ super(`World surface '${surface}' is unavailable: ${reason}`);
193
+ this.surface = surface;
194
+ }
195
+ };
196
+ UI_TOKEN_QUERY = "token";
197
+ BrowserActionRecorder = class {
198
+ constructor(post, agentId, opts = {}) {
199
+ this.post = post;
200
+ this.agentId = agentId;
201
+ this.opts = opts;
202
+ }
203
+ seq = 0;
204
+ base = null;
205
+ queue = [];
206
+ timer = null;
207
+ inflight = Promise.resolve();
208
+ sent = 0;
209
+ dropped = 0;
210
+ /** This recorder's next position; the wire seq is `resumeFrom() + this`. */
211
+ nextSeq() {
212
+ return this.seq++;
213
+ }
214
+ resolveBase() {
215
+ if (this.base === null) {
216
+ const resolve6 = this.opts.resumeFrom ?? (async () => 0);
217
+ this.base = resolve6().then((n) => {
218
+ if (!Number.isInteger(n) || n < 0)
219
+ throw new Error(
220
+ `browser event base seq must be a non-negative integer, got ${String(n)}`
221
+ );
222
+ return n;
223
+ });
224
+ this.base.catch(() => {
225
+ this.base = null;
226
+ });
227
+ }
228
+ return this.base;
229
+ }
230
+ record(event) {
231
+ this.queue.push(event);
232
+ if (this.queue.length >= (this.opts.batchSize ?? EVENT_BATCH_SIZE)) {
233
+ this.drain();
234
+ } else if (this.timer === null) {
235
+ this.timer = setTimeout(
236
+ () => this.drain(),
237
+ this.opts.flushIntervalMs ?? EVENT_FLUSH_INTERVAL_MS
238
+ );
239
+ if (typeof this.timer === "object" && "unref" in this.timer)
240
+ this.timer.unref();
241
+ }
242
+ }
243
+ /** Resolve once everything recorded so far has been posted (or dropped). */
244
+ async flush() {
245
+ this.drain();
246
+ await this.inflight;
247
+ }
248
+ async close() {
249
+ await this.flush();
250
+ }
251
+ drain() {
252
+ if (this.timer !== null) {
253
+ clearTimeout(this.timer);
254
+ this.timer = null;
255
+ }
256
+ if (this.queue.length === 0) return;
257
+ const batch = this.queue;
258
+ this.queue = [];
259
+ this.inflight = this.inflight.then(() => this.send(batch));
260
+ }
261
+ async send(batch) {
262
+ const retries = this.opts.maxRetries ?? EVENT_MAX_RETRIES;
263
+ const sleep2 = this.opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
264
+ for (let attempt = 0; attempt < retries; attempt++) {
265
+ try {
266
+ const base = await this.resolveBase();
267
+ await this.post(
268
+ base === 0 ? batch : batch.map((e) => ({ ...e, seq: base + e.seq }))
269
+ );
270
+ this.sent += batch.length;
271
+ return;
272
+ } catch (error) {
273
+ if (attempt + 1 === retries) {
274
+ this.dropped += batch.length;
275
+ (this.opts.warn ?? console.warn)(
276
+ `dropping ${batch.length} browser events after ${attempt + 1} attempts: ${String(error)}`
277
+ );
278
+ return;
279
+ }
280
+ await sleep2(500 * 2 ** attempt);
281
+ }
282
+ }
283
+ }
284
+ };
285
+ WorldBrowser = class {
286
+ constructor(page, ui, mode, teardown, viewport = DEFAULT_VIEWPORT, recorder = null) {
287
+ this.page = page;
288
+ this.ui = ui;
289
+ this.mode = mode;
290
+ this.teardown = teardown;
291
+ this.viewport = viewport;
292
+ this.recorder = recorder;
293
+ page.on("request", () => {
294
+ this.inflight += 1;
295
+ this.lastNetwork = Date.now();
296
+ });
297
+ const done = () => {
298
+ this.inflight = Math.max(0, this.inflight - 1);
299
+ this.lastNetwork = Date.now();
300
+ };
301
+ page.on("requestfinished", done);
302
+ page.on("requestfailed", done);
303
+ }
304
+ inflight = 0;
305
+ lastNetwork = Date.now();
306
+ get agentId() {
307
+ return this.recorder?.agentId ?? null;
308
+ }
309
+ /** Run one action and report it: the event carries what was asked,
310
+ * whether it worked, and the screen after — for failures too, so a
311
+ * reviewer sees what the agent saw when the selector did not match. */
312
+ async act(action, args, fn) {
313
+ const recorder = this.recorder;
314
+ if (!recorder) return fn();
315
+ const started = Date.now();
316
+ let ok = true;
317
+ let error = null;
318
+ try {
319
+ return await fn();
320
+ } catch (err) {
321
+ ok = false;
322
+ error = (err instanceof Error ? `${err.name}: ${err.message}` : String(err)).slice(0, 4e3);
323
+ throw err;
324
+ } finally {
325
+ recorder.record({
326
+ agentId: recorder.agentId,
327
+ seq: recorder.nextSeq(),
328
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
329
+ action,
330
+ args: redactActionArgs(action, args),
331
+ ok,
332
+ error,
333
+ durationMs: Date.now() - started,
334
+ mode: this.mode,
335
+ viewport: { ...this.viewport },
336
+ ...await this.observeForEvent()
337
+ });
338
+ }
339
+ }
340
+ async observeForEvent() {
341
+ const out = {
342
+ url: null,
343
+ title: null,
344
+ screenshot: null
345
+ };
346
+ try {
347
+ out.url = this.page.url();
348
+ out.title = await this.page.title();
349
+ const jpeg = await this.page.screenshot({
350
+ type: "jpeg",
351
+ quality: EVENT_SCREENSHOT_QUALITY
352
+ });
353
+ out.screenshot = jpeg.toString("base64");
354
+ } catch {
355
+ }
356
+ return out;
357
+ }
358
+ /** Open a UI path (`/customers`), a full URL, or — with no argument — the
359
+ * UI's declared entry page. */
360
+ async goto(pathOrUrl) {
361
+ let target;
362
+ if (pathOrUrl === void 0) {
363
+ if (!this.ui)
364
+ throw new WorldSurfaceUnavailable(
365
+ "ui",
366
+ "this session has no UI to navigate to"
367
+ );
368
+ target = uiEntryUrl(this.ui);
369
+ } else if (/^https?:\/\//.test(pathOrUrl)) {
370
+ target = pathOrUrl;
371
+ } else {
372
+ if (!this.ui)
373
+ throw new WorldSurfaceUnavailable(
374
+ "ui",
375
+ "relative paths need a UI surface"
376
+ );
377
+ target = uiUrl(this.ui, pathOrUrl);
378
+ }
379
+ return this.act(
380
+ "browser_goto",
381
+ { path: pathOrUrl ?? null, url: withoutUiToken(target) },
382
+ async () => {
383
+ await this.page.goto(target, { waitUntil: "load" });
384
+ await this.settle();
385
+ return this.page.url();
386
+ }
387
+ );
388
+ }
389
+ async back() {
390
+ return this.act("browser_back", {}, async () => {
391
+ await this.page.goBack({ waitUntil: "load" });
392
+ await this.settle();
393
+ return this.page.url();
394
+ });
395
+ }
396
+ /** Wait for the page to finish reacting to an action. `load` alone is not
397
+ * enough for client-rendered UIs (React et al.): a click returns before the
398
+ * fetch that re-renders the page, so an agent would read stale text.
399
+ * Playwright's `networkidle` is per navigation and resolves at once after
400
+ * the first one, so this tracks requests itself: done when nothing is in
401
+ * flight and the network has been quiet for `SETTLE_QUIET_MS`, bounded so
402
+ * long-polling UIs cannot hang us. */
403
+ async settle() {
404
+ await this.page.waitForLoadState("load");
405
+ const deadline = Date.now() + SETTLE_TIMEOUT_MS;
406
+ while (Date.now() < deadline) {
407
+ const quiet = Date.now() - this.lastNetwork >= SETTLE_QUIET_MS;
408
+ if (this.inflight === 0 && quiet) return;
409
+ await this.page.waitForTimeout(SETTLE_POLL_MS);
410
+ }
411
+ }
412
+ async click(selector) {
413
+ await this.act("browser_click", { selector }, async () => {
414
+ await this.page.click(selector);
415
+ await this.settle();
416
+ });
417
+ }
418
+ async type(selector, text2) {
419
+ await this.act(
420
+ "browser_type",
421
+ { selector, text: text2 },
422
+ () => this.page.fill(selector, text2)
423
+ );
424
+ }
425
+ async press(key) {
426
+ await this.act("browser_press", { key }, async () => {
427
+ await this.page.keyboard.press(key);
428
+ await this.settle();
429
+ });
430
+ }
431
+ async scroll(dy) {
432
+ await this.act(
433
+ "browser_scroll",
434
+ { dy },
435
+ () => this.page.mouse.wheel(0, dy)
436
+ );
437
+ }
438
+ async screenshot(fullPage = false) {
439
+ return this.page.screenshot({ type: "png", fullPage });
440
+ }
441
+ async screenshotBase64(fullPage = false) {
442
+ return (await this.screenshot(fullPage)).toString("base64");
443
+ }
444
+ async text(selector = "body") {
445
+ return this.page.innerText(selector);
446
+ }
447
+ async html() {
448
+ return this.page.content();
449
+ }
450
+ get url() {
451
+ return this.page.url();
452
+ }
453
+ async title() {
454
+ return this.page.title();
455
+ }
456
+ async close() {
457
+ try {
458
+ await this.teardown();
459
+ } finally {
460
+ await this.recorder?.close();
461
+ }
462
+ }
463
+ };
464
+ COMPUTER_USE_SPECS = [
465
+ {
466
+ name: "browser_goto",
467
+ signature: "browser_goto(path=None)",
468
+ doc: "Open a page of the world's UI. `path` is a UI path like /customers, a full URL, or omitted for the entry page. Returns the URL and page text."
469
+ },
470
+ {
471
+ name: "browser_click",
472
+ signature: "browser_click(selector)",
473
+ doc: "Click an element by Playwright selector (CSS, `text=Refund`, `role=button[name=Save]`). Returns the page text after the click."
474
+ },
475
+ {
476
+ name: "browser_type",
477
+ signature: "browser_type(selector, text)",
478
+ doc: "Replace the value of an input/textarea found by selector with `text`."
479
+ },
480
+ {
481
+ name: "browser_press",
482
+ signature: "browser_press(key)",
483
+ doc: "Press a key (Enter, Tab, Escape, ArrowDown, ...). Returns the page text after."
484
+ },
485
+ {
486
+ name: "browser_scroll",
487
+ signature: "browser_scroll(dy=600)",
488
+ doc: "Scroll the page vertically by `dy` pixels (negative scrolls up)."
489
+ },
490
+ {
491
+ name: "browser_screenshot",
492
+ signature: "browser_screenshot(full_page=False)",
493
+ doc: "Take a PNG screenshot; returns {image_base64, url}."
494
+ },
495
+ {
496
+ name: "browser_read",
497
+ signature: "browser_read(selector='body')",
498
+ doc: "Return the visible text of an element (default: whole page) plus the URL and title."
499
+ },
500
+ {
501
+ name: "browser_back",
502
+ signature: "browser_back()",
503
+ doc: "Go back one page in history."
504
+ }
505
+ ];
506
+ str = (v, fallback) => typeof v === "string" && v.length > 0 ? v : fallback;
507
+ }
508
+ });
509
+
33
510
  // src/worlds/session.ts
34
511
  var session_exports = {};
35
512
  __export(session_exports, {
@@ -37,11 +514,23 @@ __export(session_exports, {
37
514
  WorldSessionCallError: () => WorldSessionCallError,
38
515
  WorldSessionTimeout: () => WorldSessionTimeout,
39
516
  attachSession: () => attachSession,
517
+ isTaskIdRef: () => isTaskIdRef,
518
+ isTaskSpec: () => isTaskSpec,
40
519
  openSession: () => openSession,
41
520
  runSessions: () => runSessions,
42
- schemaFromSignature: () => schemaFromSignature
521
+ schemaFromSignature: () => schemaFromSignature,
522
+ taskLabel: () => taskLabel
43
523
  });
44
524
  function schemaFromSignature(spec) {
525
+ if (spec.inputSchema)
526
+ return {
527
+ type: "function",
528
+ function: {
529
+ name: modelToolName(spec.name),
530
+ description: spec.doc ?? spec.name,
531
+ parameters: spec.inputSchema
532
+ }
533
+ };
45
534
  const inside = /\(([\s\S]*)\)\s*$/.exec(spec.signature.trim())?.[1] ?? "";
46
535
  const properties = {};
47
536
  const required = [];
@@ -77,7 +566,7 @@ function schemaFromSignature(spec) {
77
566
  return {
78
567
  type: "function",
79
568
  function: {
80
- name: spec.name,
569
+ name: modelToolName(spec.name),
81
570
  description: spec.doc ?? spec.name,
82
571
  parameters: { type: "object", properties, required }
83
572
  }
@@ -91,8 +580,20 @@ async function attachSession(sessionId, options = {}) {
91
580
  );
92
581
  return new WorldSession(sessionId, state, options);
93
582
  }
94
- async function openSession(slugOrRef, task, opts = {}) {
583
+ async function openSession(slugOrRef, taskOrOpts, positionalOpts = {}) {
584
+ const { task, ...opts } = typeof taskOrOpts === "object" && "task" in taskOrOpts ? taskOrOpts : { task: taskOrOpts, ...positionalOpts };
585
+ if (task === void 0 || task === null || typeof task === "string" && !task || isTaskIdRef(task) && !task.id || isTaskSpec(task) && !task.instruction || typeof task === "object" && !isTaskIdRef(task) && !isTaskSpec(task))
586
+ throw new Error(
587
+ "openSession needs a task: a bundled task name, a stored task { id, version? } or { instruction, seed?, grader?, metadata? }"
588
+ );
95
589
  const options = opts.options ?? {};
590
+ const unknown = (opts.surfaces ?? []).filter(
591
+ (s) => !SURFACE_KINDS.includes(s)
592
+ );
593
+ if (unknown.length)
594
+ throw new Error(
595
+ `Unknown world surfaces: ${unknown.join(", ")}; choose from ${SURFACE_KINDS.join(", ")}`
596
+ );
96
597
  const at = slugOrRef.indexOf("@");
97
598
  const slug = at === -1 ? slugOrRef : slugOrRef.slice(0, at);
98
599
  const state = await apiRequest(
@@ -102,7 +603,8 @@ async function openSession(slugOrRef, task, opts = {}) {
102
603
  {
103
604
  ...opts.versionId ? { versionId: opts.versionId } : { slug },
104
605
  task,
105
- ...opts.reuseWarm === void 0 ? {} : { reuseWarm: opts.reuseWarm }
606
+ ...opts.reuseWarm === void 0 ? {} : { reuseWarm: opts.reuseWarm },
607
+ ...opts.surfaces?.length ? { surfaces: opts.surfaces } : {}
106
608
  }
107
609
  );
108
610
  return new WorldSession(state.sessionId, state, options);
@@ -123,20 +625,24 @@ async function runSessions(opts) {
123
625
  await Promise.all(
124
626
  Array.from({ length: Math.min(concurrency, tasks.length) }, async () => {
125
627
  while (next < tasks.length) {
126
- const task = tasks[next++];
628
+ const taskRef = tasks[next++];
629
+ let task = taskLabel(taskRef);
127
630
  let session = null;
128
631
  try {
129
- session = await openSession(opts.world, task, {
632
+ session = await openSession(opts.world, {
633
+ task: taskRef,
130
634
  versionId,
131
635
  options
132
636
  });
637
+ task = taskLabel(taskRef, session.taskInfo);
133
638
  await session.ready();
134
639
  const toolkit = await session.toolkit();
135
640
  await opts.agent({
136
641
  session,
137
642
  toolkit,
138
- instruction: session.instruction ?? task,
139
- task
643
+ instruction: session.instruction ?? (isTaskSpec(taskRef) ? taskRef.instruction : task),
644
+ task,
645
+ taskRef
140
646
  });
141
647
  const graded = await session.grade();
142
648
  const result = {
@@ -172,35 +678,148 @@ async function runSessions(opts) {
172
678
  passed: opts.failUnder === void 0 ? true : mean >= opts.failUnder
173
679
  };
174
680
  }
175
- var READY_TIMEOUT_MS, READY_POLL_MS, CALL_TIMEOUT_MS, CALL_POLL_MS, sleep, WorldSessionTimeout, WorldSessionCallError, WorldSession;
681
+ var import_node_crypto, isTaskIdRef, isTaskSpec, taskLabel, READY_TIMEOUT_MS, READY_POLL_MS, CALL_TIMEOUT_MS, CALL_POLL_MS, JUDGED_GRADE_TIMEOUT_MS, JUDGED_GRADE_POLL_MS, EXPORT_PAGE, sleep, modelToolName, WorldSessionTimeout, WorldSessionCallError, WorldSession;
176
682
  var init_session = __esm({
177
683
  "src/worlds/session.ts"() {
178
684
  "use strict";
685
+ import_node_crypto = require("crypto");
179
686
  init_worlds();
687
+ init_browser();
688
+ isTaskIdRef = (task) => typeof task === "object" && task !== null && "id" in task;
689
+ isTaskSpec = (task) => typeof task === "object" && task !== null && "instruction" in task;
690
+ taskLabel = (task, info) => {
691
+ if (typeof task === "string") return task;
692
+ if (isTaskIdRef(task)) return info?.name ?? task.id;
693
+ if (task.name) return task.name;
694
+ return info?.hash ? `inline:${info.hash.slice(0, 12)}` : "inline";
695
+ };
180
696
  READY_TIMEOUT_MS = 10 * 6e4;
181
697
  READY_POLL_MS = 2e3;
182
698
  CALL_TIMEOUT_MS = 3 * 6e4;
183
699
  CALL_POLL_MS = 400;
700
+ JUDGED_GRADE_TIMEOUT_MS = 15 * 6e4;
701
+ JUDGED_GRADE_POLL_MS = 2e3;
702
+ EXPORT_PAGE = 500;
184
703
  sleep = (ms) => new Promise((r) => setTimeout(r, ms));
704
+ modelToolName = (name) => name.replace(/[^A-Za-z0-9_-]/g, "_").slice(0, 64) || "tool";
185
705
  WorldSessionTimeout = class extends Error {
186
706
  };
187
707
  WorldSessionCallError = class extends Error {
188
708
  };
189
709
  WorldSession = class {
190
- constructor(sessionId, state, options) {
710
+ constructor(sessionId, current, options) {
191
711
  this.sessionId = sessionId;
192
- this.state = state;
712
+ this.current = current;
193
713
  this.options = options;
194
714
  }
715
+ /** The task's display name: a bundled scenario's, or the inline spec's
716
+ * `name` (null when the spec was unnamed). Same as `taskName`. */
195
717
  get task() {
196
- return this.state.taskName;
718
+ return this.current.taskName;
719
+ }
720
+ /** The task's display name: a bundled scenario's, or the inline spec's
721
+ * `name` (null when the spec was unnamed). */
722
+ get taskName() {
723
+ return this.current.taskName;
724
+ }
725
+ /** The platform's notices about the world this session runs on (empty
726
+ * for a schema world). Printed by the CLI on stderr at open. */
727
+ get deprecations() {
728
+ return this.current.deprecations ?? [];
197
729
  }
198
- /** What this task asks for — the bundle's own instruction.md. */
730
+ /** The task this session runs: bundled scenario, stored task or inline
731
+ * spec, its name, hash and the caller's metadata. */
732
+ get taskInfo() {
733
+ return this.current.task ?? {
734
+ source: "bundled",
735
+ name: this.current.taskName,
736
+ hash: null,
737
+ metadata: {}
738
+ };
739
+ }
740
+ /** What this task asks for — the bundle's instruction.md, or the inline
741
+ * spec's `instruction`. */
199
742
  get instruction() {
200
- return this.state.instruction ?? null;
743
+ return this.current.instruction ?? null;
201
744
  }
202
745
  get versionId() {
203
- return this.state.versionId;
746
+ return this.current.versionId;
747
+ }
748
+ /** Whether the session answered ready as of the last state read (the open,
749
+ * a `status()`, or the poll inside `ready()`); no request is made. */
750
+ get isReady() {
751
+ return this.current.ready;
752
+ }
753
+ /** `api` / `ui` / `browser` are present exactly when the world declares
754
+ * them AND the session was opened asking for them. */
755
+ async surfaces() {
756
+ if (!this.current.surfaces) await this.status();
757
+ return this.current.surfaces ?? { tools: { kind: "rendezvous" } };
758
+ }
759
+ /** Base URL of the world's own HTTP API for this session. */
760
+ async api() {
761
+ const { api: api2 } = await this.surfaces();
762
+ if (!api2)
763
+ throw new WorldSurfaceUnavailable(
764
+ "api",
765
+ "open the session with surfaces: ['api'] on an api-type world"
766
+ );
767
+ return api2.url;
768
+ }
769
+ /** Headers every request to `api()` needs. A World Host session gates its
770
+ * api surface on a per-session token; a pod or hosted twin answers with the
771
+ * world's own declared auth and this is `{}`. */
772
+ async apiHeaders() {
773
+ const { api: api2 } = await this.surfaces();
774
+ return api2?.token ? { Authorization: `Bearer ${api2.token}` } : {};
775
+ }
776
+ /** URL of the world's UI entry page for this session. */
777
+ async ui() {
778
+ const { ui } = await this.surfaces();
779
+ if (!ui)
780
+ throw new WorldSurfaceUnavailable(
781
+ "ui",
782
+ "open the session with surfaces: ['ui'] on a world that declares [ui]"
783
+ );
784
+ return uiEntryUrl(ui);
785
+ }
786
+ /** A Playwright browser on this session's UI: `hosted` drives the one the
787
+ * platform runs next to the world, `local` launches one here, `auto`
788
+ * prefers hosted. Call `close()` when done.
789
+ *
790
+ * Every action is reported to the platform under `agentId` (default:
791
+ * `GATEWAY_AGENT_ID` or a fresh `agent-<hex>`) so the session page shows
792
+ * this agent's own timeline — several agents may share one session and
793
+ * one hosted browser. `record: false` opts out. */
794
+ async browser(opts = {}) {
795
+ const { agentId, record = true, ...rest } = opts;
796
+ return openBrowser(await this.surfaces(), {
797
+ ...rest,
798
+ recorder: record ? this.browserRecorder(agentId) : null
799
+ });
800
+ }
801
+ /** The reporter `browser()` uses; exposed for a page you drive yourself. */
802
+ browserRecorder(agentId) {
803
+ const path8 = `/api/public/world-sessions/${encodeURIComponent(this.sessionId)}/browser-events`;
804
+ const id = agentId ?? process.env.GATEWAY_AGENT_ID ?? `agent-${(0, import_node_crypto.randomUUID)().replace(/-/g, "").slice(0, 8)}`;
805
+ return new BrowserActionRecorder(
806
+ async (events) => {
807
+ await apiRequest(this.options, "POST", path8, { events });
808
+ },
809
+ id,
810
+ {
811
+ // Continue this agent's timeline where the platform has it, so the
812
+ // same id reopened later never re-numbers from zero.
813
+ resumeFrom: async () => {
814
+ const summary = await apiRequest(this.options, "GET", path8);
815
+ return summary.agents.find((a) => a.agentId === id)?.nextSeq ?? 0;
816
+ }
817
+ }
818
+ );
819
+ }
820
+ /** Browser actions as model tools, in the same shape as `toolkit()`. */
821
+ computerUseTools(browser) {
822
+ return computerUseToolkit(browser);
204
823
  }
205
824
  /** The session's latest platform state (one request, no waiting). */
206
825
  async status() {
@@ -209,12 +828,14 @@ var init_session = __esm({
209
828
  "GET",
210
829
  `/api/public/world-sessions/${encodeURIComponent(this.sessionId)}`
211
830
  );
212
- this.state = {
213
- instruction: this.state.instruction,
214
- tools: this.state.tools,
831
+ this.current = {
832
+ instruction: this.current.instruction,
833
+ tools: this.current.tools,
834
+ surfaces: this.current.surfaces,
835
+ task: this.current.task,
215
836
  ...fresh
216
837
  };
217
- return this.state;
838
+ return this.current;
218
839
  }
219
840
  /**
220
841
  * Wait until the container is warm — meaning the process inside it has
@@ -237,14 +858,18 @@ var init_session = __esm({
237
858
  }
238
859
  }
239
860
  /** Enqueue one interaction and wait for the container's answer. */
240
- async exchange(body, timeoutMs = CALL_TIMEOUT_MS) {
241
- const { callId } = await apiRequest(
861
+ async exchange(body, timeoutMs) {
862
+ const enqueued = await apiRequest(
242
863
  this.options,
243
864
  "POST",
244
865
  `/api/public/world-sessions/${encodeURIComponent(this.sessionId)}/calls`,
245
866
  body
246
867
  );
247
- const deadline = Date.now() + timeoutMs;
868
+ const { callId } = enqueued;
869
+ const judged = enqueued.pending === true;
870
+ const budgetMs = timeoutMs ?? (judged ? JUDGED_GRADE_TIMEOUT_MS : CALL_TIMEOUT_MS);
871
+ const pollMs2 = judged ? JUDGED_GRADE_POLL_MS : CALL_POLL_MS;
872
+ const deadline = Date.now() + budgetMs;
248
873
  for (; ; ) {
249
874
  const call = await apiRequest(
250
875
  this.options,
@@ -257,9 +882,9 @@ var init_session = __esm({
257
882
  }
258
883
  if (Date.now() > deadline)
259
884
  throw new WorldSessionTimeout(
260
- `Call ${callId} still ${call.state} after ${Math.round(timeoutMs / 1e3)}s \u2014 the container may have died.`
885
+ judged ? `Grade ${callId} still ${call.state} after ${Math.round(budgetMs / 1e3)}s \u2014 the judge has not answered; the platform finalizes the call on its own, read it back with export().` : `Call ${callId} still ${call.state} after ${Math.round(budgetMs / 1e3)}s \u2014 the container may have died.`
261
886
  );
262
- await sleep(CALL_POLL_MS);
887
+ await sleep(pollMs2);
263
888
  }
264
889
  }
265
890
  /**
@@ -283,15 +908,27 @@ var init_session = __esm({
283
908
  * hand-written map that still remembers the old name.
284
909
  */
285
910
  async toolkit() {
286
- let specs = this.state.tools;
911
+ let specs = this.current.tools;
287
912
  if (!specs) specs = (await this.status()).tools ?? [];
288
- const impls = {};
913
+ const impls = /* @__PURE__ */ Object.create(null);
289
914
  for (const spec of specs) {
290
- impls[spec.name] = (args = {}) => this.call(spec.name, args);
915
+ const alias = modelToolName(spec.name);
916
+ if (Object.hasOwn(impls, alias))
917
+ throw new WorldSessionCallError(`Model tool name collision: ${alias}`);
918
+ impls[alias] = (args = {}) => this.call(spec.name, args);
291
919
  }
292
920
  return { schemas: specs.map(schemaFromSignature), impls, specs };
293
921
  }
294
- /** Run the task's grader against the container's END STATE. */
922
+ /** Run the task's grader against the container's END STATE. Graders answer
923
+ * in one of two shapes: the scalar with named rewards beside it
924
+ * (`{reward, check_a, check_b}`, a task's own `grade.py`), or the named
925
+ * rewards nested under `rewards` (the api, mock-tools and World Host
926
+ * runners). Both land in `rewards`.
927
+ *
928
+ * A rubric grade is finalized by the platform's judge, not the container:
929
+ * the platform answers the enqueue with `pending: true`, and this waits on
930
+ * the judge's budget (15 min) instead of a call's. `timeoutMs` overrides
931
+ * either. */
295
932
  async grade(opts = {}) {
296
933
  const raw = await this.exchange(
297
934
  { kind: "grade" },
@@ -299,6 +936,12 @@ var init_session = __esm({
299
936
  );
300
937
  const record = raw && typeof raw === "object" ? raw : {};
301
938
  const rewards = {};
939
+ const nested = record.rewards;
940
+ if (nested && typeof nested === "object") {
941
+ for (const [key, value] of Object.entries(nested)) {
942
+ if (typeof value === "number") rewards[key] = value;
943
+ }
944
+ }
302
945
  for (const [key, value] of Object.entries(record)) {
303
946
  if (key !== "reward" && typeof value === "number") rewards[key] = value;
304
947
  }
@@ -308,6 +951,95 @@ var init_session = __esm({
308
951
  raw
309
952
  };
310
953
  }
954
+ /**
955
+ * Put rows into the LIVE world through its contract, in one batch:
956
+ * `append` (default) upserts by primary key, `replace` makes the named
957
+ * entities hold exactly these rows. Atomic — a refused row leaves the
958
+ * session unchanged and the error names the entity, row and field.
959
+ */
960
+ async seed(rows, opts = {}) {
961
+ const mode = opts.mode ?? "append";
962
+ const redact = opts.redact ?? "off";
963
+ return await this.exchange(
964
+ {
965
+ kind: "seed",
966
+ args: { mode, rows, ...redact !== "off" ? { redact } : {} }
967
+ },
968
+ opts.timeoutMs
969
+ );
970
+ }
971
+ /** Every entity's rows as the world holds them now — the same dump a
972
+ * grader reads. The shape is the world runtime's: a schema world answers
973
+ * `{<entity>: {<key>: row}, snapshot}`, a mock-tools world
974
+ * `{entities: {<entity>: [row]}}`. */
975
+ async state(opts = {}) {
976
+ return this.exchange({ kind: "state" }, opts.timeoutMs);
977
+ }
978
+ /** Back to the opening state: the version's data plus the bundled
979
+ * scenario's or the inline task's seed. Rows written since are gone; the
980
+ * call log stays. */
981
+ async reset(opts = {}) {
982
+ await this.exchange({ kind: "reset" }, opts.timeoutMs);
983
+ }
984
+ /** The session's call log, oldest first: every tool call, seed, reset,
985
+ * grade with its result — the record of the episode. */
986
+ async export() {
987
+ const calls = [];
988
+ let cursor;
989
+ do {
990
+ const params = new URLSearchParams({ limit: String(EXPORT_PAGE) });
991
+ if (cursor) params.set("cursor", cursor);
992
+ const page = await apiRequest(
993
+ this.options,
994
+ "GET",
995
+ `/api/public/world-sessions/${encodeURIComponent(this.sessionId)}/calls?${params.toString()}`
996
+ );
997
+ for (const call of page.calls) {
998
+ calls.push({
999
+ seq: Number(call.seq),
1000
+ kind: String(call.kind ?? "call"),
1001
+ tool: typeof call.tool === "string" ? call.tool : null,
1002
+ args: call.args ?? null,
1003
+ result: call.result ?? null,
1004
+ error: typeof call.error === "string" ? call.error : null,
1005
+ completedAt: typeof call.completedAt === "string" ? call.completedAt : null
1006
+ });
1007
+ }
1008
+ cursor = page.nextCursor ?? void 0;
1009
+ } while (cursor);
1010
+ return calls;
1011
+ }
1012
+ /**
1013
+ * Promote this session's inline task into a stored task of the project
1014
+ * (version 1, pinned to the session's world unless `world` says otherwise),
1015
+ * so a task written for one end user can be reused and its grades
1016
+ * compared. The session then records the new task's id. A session on a
1017
+ * bundled task has nothing to save; one on a stored task is already saved.
1018
+ */
1019
+ async saveTask(opts = {}) {
1020
+ const task = await apiRequest(
1021
+ this.options,
1022
+ "POST",
1023
+ `/api/public/world-sessions/${encodeURIComponent(this.sessionId)}/task`,
1024
+ {
1025
+ ...opts.name !== void 0 ? { name: opts.name } : {},
1026
+ ...opts.world !== void 0 ? { world: opts.world } : {},
1027
+ ...opts.message !== void 0 ? { message: opts.message } : {}
1028
+ }
1029
+ );
1030
+ this.current = {
1031
+ ...this.current,
1032
+ taskName: task.name,
1033
+ task: {
1034
+ ...this.taskInfo,
1035
+ source: "stored",
1036
+ name: task.name,
1037
+ id: task.id,
1038
+ version: task.version
1039
+ }
1040
+ };
1041
+ return task;
1042
+ }
311
1043
  /**
312
1044
  * End the session. `keepWarm` hands the container back to the pool instead
313
1045
  * of tearing it down, so the next session for the same task starts warm —
@@ -325,7 +1057,100 @@ var init_session = __esm({
325
1057
  }
326
1058
  });
327
1059
 
1060
+ // src/worlds/tasks.ts
1061
+ async function createTask(input, options = {}) {
1062
+ return apiRequest(
1063
+ options,
1064
+ "POST",
1065
+ TASKS,
1066
+ compact({
1067
+ spec: input.spec,
1068
+ name: input.name,
1069
+ world: input.world,
1070
+ message: input.message
1071
+ })
1072
+ );
1073
+ }
1074
+ async function updateTask(taskId, input, options = {}) {
1075
+ if (input.spec === void 0 && input.name === void 0 && input.world === void 0)
1076
+ throw new Error("updateTask: nothing to update \u2014 pass spec, name or world");
1077
+ return apiRequest(
1078
+ options,
1079
+ "PATCH",
1080
+ taskRoute(taskId),
1081
+ compact({
1082
+ spec: input.spec,
1083
+ name: input.name,
1084
+ world: input.world,
1085
+ message: input.message
1086
+ })
1087
+ );
1088
+ }
1089
+ async function listTasks(filter = {}, options = {}) {
1090
+ const params = new URLSearchParams();
1091
+ if (filter.world) params.set("world", filter.world);
1092
+ if (filter.page !== void 0) params.set("page", String(filter.page));
1093
+ if (filter.limit !== void 0) params.set("limit", String(filter.limit));
1094
+ for (const [key, value] of Object.entries(filter.metadata ?? {}))
1095
+ params.set(`metadata.${key}`, value);
1096
+ const query = params.toString();
1097
+ return apiRequest(
1098
+ options,
1099
+ "GET",
1100
+ query ? `${TASKS}?${query}` : TASKS
1101
+ );
1102
+ }
1103
+ async function getTask(taskId, opts = {}, options = {}) {
1104
+ const query = opts.version === void 0 ? "" : `?version=${String(opts.version)}`;
1105
+ return apiRequest(
1106
+ options,
1107
+ "GET",
1108
+ `${taskRoute(taskId)}${query}`
1109
+ );
1110
+ }
1111
+ async function deleteTask(taskId, options = {}) {
1112
+ return apiRequest(options, "DELETE", taskRoute(taskId));
1113
+ }
1114
+ async function validateTask(taskId, target = {}, options = {}) {
1115
+ return apiRequest(
1116
+ options,
1117
+ "POST",
1118
+ `${taskRoute(taskId)}/validate`,
1119
+ compact({
1120
+ version: target.version,
1121
+ slug: target.slug,
1122
+ versionId: target.versionId
1123
+ })
1124
+ );
1125
+ }
1126
+ var TASKS, taskRoute, compact;
1127
+ var init_tasks = __esm({
1128
+ "src/worlds/tasks.ts"() {
1129
+ "use strict";
1130
+ init_worlds();
1131
+ TASKS = "/api/public/world-tasks";
1132
+ taskRoute = (id) => `${TASKS}/${encodeURIComponent(id)}`;
1133
+ compact = (body) => Object.fromEntries(Object.entries(body).filter(([, v]) => v !== void 0));
1134
+ }
1135
+ });
1136
+
328
1137
  // src/worlds/hub.ts
1138
+ var hub_exports = {};
1139
+ __export(hub_exports, {
1140
+ DEFAULT_BRANCH: () => DEFAULT_BRANCH,
1141
+ buildSourceTarball: () => buildSourceTarball,
1142
+ collectArchiveRelPaths: () => collectArchiveRelPaths,
1143
+ computeContentHash: () => computeContentHash,
1144
+ createRef: () => createRef,
1145
+ isIncludedInContentHash: () => isIncludedInContentHash,
1146
+ localTreeState: () => localTreeState,
1147
+ propose: () => propose,
1148
+ pull: () => pull,
1149
+ push: () => push,
1150
+ readLocalMeta: () => readLocalMeta,
1151
+ snapshotTreeHashes: () => snapshotTreeHashes,
1152
+ writeLocalMeta: () => writeLocalMeta
1153
+ });
329
1154
  function isExcludedDirComponent(component) {
330
1155
  return component.startsWith(".") || ROOT_EXCLUDED_DIRS.has(component) || component.endsWith(".egg-info");
331
1156
  }
@@ -367,7 +1192,7 @@ function collectArchiveRelPaths(dir) {
367
1192
  return out.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
368
1193
  }
369
1194
  function computeContentHash(dir) {
370
- const hasher = (0, import_node_crypto.createHash)("sha256");
1195
+ const hasher = (0, import_node_crypto2.createHash)("sha256");
371
1196
  for (const relPath of collectArchiveRelPaths(dir)) {
372
1197
  hasher.update(Buffer.from(`file:${relPath}`, "utf-8"));
373
1198
  hasher.update(fs.readFileSync(path.join(dir, relPath)));
@@ -441,7 +1266,7 @@ function writeLocalMeta(dir, meta) {
441
1266
  function snapshotTreeHashes(dir) {
442
1267
  const out = {};
443
1268
  for (const relPath of collectArchiveRelPaths(dir)) {
444
- out[relPath] = (0, import_node_crypto.createHash)("sha256").update(fs.readFileSync(path.join(dir, relPath))).digest("hex");
1269
+ out[relPath] = (0, import_node_crypto2.createHash)("sha256").update(fs.readFileSync(path.join(dir, relPath))).digest("hex");
445
1270
  }
446
1271
  return out;
447
1272
  }
@@ -459,8 +1284,8 @@ function localTreeState(dir) {
459
1284
  }
460
1285
  function readPyproject(dir) {
461
1286
  try {
462
- const text = fs.readFileSync(path.join(dir, "pyproject.toml"), "utf-8");
463
- const section = /\[project\]([\s\S]*?)(\n\[|$)/.exec(text)?.[1] ?? "";
1287
+ const text2 = fs.readFileSync(path.join(dir, "pyproject.toml"), "utf-8");
1288
+ const section = /\[project\]([\s\S]*?)(\n\[|$)/.exec(text2)?.[1] ?? "";
464
1289
  const name = /\bname\s*=\s*"([^"]+)"/.exec(section)?.[1];
465
1290
  const version = /\bversion\s*=\s*"([^"]+)"/.exec(section)?.[1];
466
1291
  return { name, version };
@@ -468,6 +1293,17 @@ function readPyproject(dir) {
468
1293
  return {};
469
1294
  }
470
1295
  }
1296
+ function readWorldContractVersion(dir) {
1297
+ for (const rel of ["schema/world.json", path.join("server", "world", "schema", "world.json")]) {
1298
+ try {
1299
+ const parsed = JSON.parse(fs.readFileSync(path.join(dir, rel), "utf-8"));
1300
+ const pkg = parsed["x-gateway"]?.package;
1301
+ if (pkg?.version) return { name: pkg.id, version: pkg.version };
1302
+ } catch {
1303
+ }
1304
+ }
1305
+ return {};
1306
+ }
471
1307
  function buildFileManifest(dir) {
472
1308
  const entries = [];
473
1309
  const walk = (rel) => {
@@ -484,7 +1320,7 @@ function buildFileManifest(dir) {
484
1320
  path: childRel,
485
1321
  isDirectory: false,
486
1322
  size: payload.length,
487
- sha256: (0, import_node_crypto.createHash)("sha256").update(payload).digest("hex")
1323
+ sha256: (0, import_node_crypto2.createHash)("sha256").update(payload).digest("hex")
488
1324
  });
489
1325
  }
490
1326
  }
@@ -513,17 +1349,25 @@ async function push(dir, opts = {}) {
513
1349
  const baseVersionId = opts.baseVersionId ?? localMeta.versionId ?? null;
514
1350
  const contentHash = computeContentHash(dir);
515
1351
  const pyproject = readPyproject(dir);
1352
+ const contractVersion = pyproject.version ? void 0 : readWorldContractVersion(dir).version;
1353
+ if (contractVersion) pyproject.version = contractVersion;
516
1354
  const slug = opts.slug ?? pyproject.name ?? path.basename(path.resolve(dir));
517
- const resolve2 = await apiRequest(
1355
+ const resolve6 = await apiRequest(
518
1356
  options,
519
1357
  "POST",
520
1358
  "/api/public/benchmark-containers/resolve",
521
- { slug, name: pyproject.name ?? slug }
1359
+ {
1360
+ slug,
1361
+ name: opts.name ?? pyproject.name ?? slug,
1362
+ ...opts.description ? { description: opts.description } : {},
1363
+ ...opts.tags?.length ? { tags: opts.tags } : {},
1364
+ ...opts.visibility ? { visibility: opts.visibility } : {}
1365
+ }
522
1366
  );
523
1367
  const tarball = buildSourceTarball(dir);
524
1368
  const bundleSha256 = sha256b64(tarball);
525
1369
  const version = await apiRequest(options, "POST", "/api/public/benchmark-containers/versions", {
526
- containerId: resolve2.containerId,
1370
+ containerId: resolve6.containerId,
527
1371
  contentHash,
528
1372
  bundleSha256,
529
1373
  bundleSizeBytes: tarball.length,
@@ -534,10 +1378,11 @@ async function push(dir, opts = {}) {
534
1378
  baseVersionId,
535
1379
  ...opts.force ? { force: true } : {},
536
1380
  ...opts.message ? { changeReason: opts.message } : {},
537
- ...opts.author ? { author: opts.author } : {}
1381
+ ...opts.author ? { author: opts.author } : {},
1382
+ ...opts.imageRef ? { imageRef: opts.imageRef } : {}
538
1383
  });
539
1384
  if (version.uploadUrl) await putObject(version.uploadUrl, tarball, bundleSha256);
540
- await apiRequest(
1385
+ const final = await apiRequest(
541
1386
  options,
542
1387
  "POST",
543
1388
  `/api/public/benchmark-containers/versions/${version.versionId}/finalize`,
@@ -554,7 +1399,15 @@ async function push(dir, opts = {}) {
554
1399
  forkedFromVersionId: baseVersionId,
555
1400
  baseFiles: snapshotTreeHashes(dir)
556
1401
  });
557
- return { slug, versionId: version.versionId, contentHash, branch };
1402
+ return {
1403
+ containerId: resolve6.containerId,
1404
+ slug,
1405
+ versionId: version.versionId,
1406
+ contentHash,
1407
+ branch: final.branch ?? branch,
1408
+ state: final.state ?? null,
1409
+ alreadyUploaded: Boolean(version.alreadyUploaded)
1410
+ };
558
1411
  }
559
1412
  function extractBundle(bundle, dir) {
560
1413
  const tar = (0, import_node_zlib.gunzipSync)(bundle);
@@ -663,11 +1516,11 @@ async function createRef(slug, name, kind, versionId, options = {}) {
663
1516
  ...versionId ? { versionId } : {}
664
1517
  });
665
1518
  }
666
- var import_node_crypto, import_node_zlib, fs, path, DEFAULT_BRANCH, META_RELPATH, SKIP_DIRS, ROOT_EXCLUDED_DIRS, BROAD_ROOT_MARKERS, sha256b64;
1519
+ var import_node_crypto2, import_node_zlib, fs, path, DEFAULT_BRANCH, META_RELPATH, SKIP_DIRS, ROOT_EXCLUDED_DIRS, BROAD_ROOT_MARKERS, sha256b64;
667
1520
  var init_hub = __esm({
668
1521
  "src/worlds/hub.ts"() {
669
1522
  "use strict";
670
- import_node_crypto = require("crypto");
1523
+ import_node_crypto2 = require("crypto");
671
1524
  import_node_zlib = require("zlib");
672
1525
  fs = __toESM(require("fs"));
673
1526
  path = __toESM(require("path"));
@@ -686,7 +1539,7 @@ var init_hub = __esm({
686
1539
  ]);
687
1540
  ROOT_EXCLUDED_DIRS = /* @__PURE__ */ new Set(["dist", "build", "outputs", "__pycache__"]);
688
1541
  BROAD_ROOT_MARKERS = ["gateway-env.toml", "gateway-api-world.toml"];
689
- sha256b64 = (data) => (0, import_node_crypto.createHash)("sha256").update(data).digest("base64");
1542
+ sha256b64 = (data) => (0, import_node_crypto2.createHash)("sha256").update(data).digest("base64");
690
1543
  }
691
1544
  });
692
1545
 
@@ -874,41 +1727,1844 @@ var init_validate = __esm({
874
1727
  }
875
1728
  });
876
1729
 
877
- // src/worlds/index.ts
878
- var worlds_exports = {};
879
- __export(worlds_exports, {
880
- DEFAULT_BRANCH: () => DEFAULT_BRANCH,
881
- WorldSession: () => WorldSession,
882
- WorldSessionCallError: () => WorldSessionCallError,
883
- WorldSessionTimeout: () => WorldSessionTimeout,
884
- WorldSet: () => WorldSet,
885
- WorldTask: () => WorldTask,
886
- apiRequest: () => apiRequest,
887
- attachSession: () => attachSession,
888
- buildSourceTarball: () => buildSourceTarball,
889
- collectArchiveRelPaths: () => collectArchiveRelPaths,
890
- computeContentHash: () => computeContentHash,
891
- createRef: () => createRef,
892
- deleteEnvSecret: () => deleteEnvSecret,
893
- detectProvenance: () => detectProvenance,
894
- getRun: () => getRun,
895
- isIncludedInContentHash: () => isIncludedInContentHash,
896
- listEnvSecretKeys: () => listEnvSecretKeys,
897
- listRunConfigs: () => listRunConfigs,
898
- localTreeState: () => localTreeState,
899
- openSession: () => openSession,
900
- openWorld: () => openWorld,
901
- propose: () => propose,
902
- pull: () => pull,
903
- push: () => push,
904
- readLocalMeta: () => readLocalMeta,
905
- runSessions: () => runSessions,
906
- schemaFromSignature: () => schemaFromSignature,
907
- setEnvSecret: () => setEnvSecret,
908
- snapshotTreeHashes: () => snapshotTreeHashes,
909
- validateWorld: () => validateWorld,
910
- waitForRun: () => waitForRun,
911
- writeLocalMeta: () => writeLocalMeta
1730
+ // src/worlds/describe.ts
1731
+ async function describeWorld(slug, options = {}) {
1732
+ if (slug.includes("@"))
1733
+ throw new Error(
1734
+ `describeWorld reads a world's head version: pass the slug without @ref (got ${slug})`
1735
+ );
1736
+ return apiRequest(
1737
+ options,
1738
+ "GET",
1739
+ `/api/public/worlds/${encodeURIComponent(slug)}`
1740
+ );
1741
+ }
1742
+ var init_describe = __esm({
1743
+ "src/worlds/describe.ts"() {
1744
+ "use strict";
1745
+ init_worlds();
1746
+ }
1747
+ });
1748
+
1749
+ // src/cli/platform/worldData/json.ts
1750
+ function parseJson(text2) {
1751
+ const p = new Parser(text2);
1752
+ p.skipWs();
1753
+ const value = p.value();
1754
+ p.skipWs();
1755
+ if (p.i < text2.length) throw new JsonSyntaxError(`Extra data at ${p.i}`);
1756
+ return value;
1757
+ }
1758
+ function dumps(value) {
1759
+ if (value === null) return "null";
1760
+ if (value === true) return "true";
1761
+ if (value === false) return "false";
1762
+ if (typeof value === "string") return JSON.stringify(value);
1763
+ if (value instanceof JsonNumber) return numberText(value);
1764
+ if (Array.isArray(value)) return "[" + value.map(dumps).join(",") + "]";
1765
+ const parts = [];
1766
+ for (const [key, item] of value) parts.push(JSON.stringify(key) + ":" + dumps(item));
1767
+ return "{" + parts.join(",") + "}";
1768
+ }
1769
+ function numberText(n) {
1770
+ if (!n.isFloat) return /^-0+$/.test(n.text) ? "0" : n.text;
1771
+ const value = n.value;
1772
+ if (Number.isNaN(value)) return "NaN";
1773
+ if (value === Infinity) return "Infinity";
1774
+ if (value === -Infinity) return "-Infinity";
1775
+ return pyFloatRepr(value);
1776
+ }
1777
+ function pyFloatRepr(x) {
1778
+ if (x === 0) return Object.is(x, -0) ? "-0.0" : "0.0";
1779
+ const sign = x < 0 ? "-" : "";
1780
+ const js = String(Math.abs(x));
1781
+ const [mantissa, exponentPart] = js.split("e");
1782
+ let exponent = exponentPart ? Number(exponentPart) : 0;
1783
+ const [intPart, fracPart = ""] = mantissa.split(".");
1784
+ let digits = intPart + fracPart;
1785
+ let decpt = intPart.length + exponent;
1786
+ const leading = digits.match(/^0*/)[0].length;
1787
+ digits = digits.slice(leading);
1788
+ decpt -= leading;
1789
+ digits = digits.replace(/0+$/, "");
1790
+ if (digits === "") return sign + "0.0";
1791
+ const sci = decpt - 1;
1792
+ if (sci >= -4 && sci < 16) {
1793
+ if (decpt <= 0) return sign + "0." + "0".repeat(-decpt) + digits;
1794
+ if (decpt >= digits.length) return sign + digits + "0".repeat(decpt - digits.length) + ".0";
1795
+ return sign + digits.slice(0, decpt) + "." + digits.slice(decpt);
1796
+ }
1797
+ exponent = sci;
1798
+ const mag = String(Math.abs(exponent)).padStart(2, "0");
1799
+ return sign + digits[0] + (digits.length > 1 ? "." + digits.slice(1) : "") + "e" + (exponent < 0 ? "-" : "+") + mag;
1800
+ }
1801
+ function pyRound(n, ndigits) {
1802
+ if (!n.isFloat) return n;
1803
+ const x = n.value;
1804
+ if (!Number.isFinite(x)) return n;
1805
+ const sign = x < 0 ? -1 : 1;
1806
+ const magnitude = Math.abs(x);
1807
+ if (magnitude >= 9007199254740992) return new JsonNumber(pyFloatRepr(x));
1808
+ const { m, k } = exactFraction(magnitude);
1809
+ let rounded;
1810
+ if (k <= ndigits) rounded = magnitude;
1811
+ else if (k !== ndigits + 1) rounded = Number(magnitude.toFixed(ndigits));
1812
+ else {
1813
+ const scaled = m * 5n ** BigInt(k);
1814
+ let kept = scaled / 10n;
1815
+ if (kept % 2n === 1n) kept += 1n;
1816
+ const text2 = kept.toString().padStart(ndigits + 1, "0");
1817
+ rounded = ndigits === 0 ? Number(text2) : Number(text2.slice(0, -ndigits) + "." + text2.slice(-ndigits));
1818
+ }
1819
+ return new JsonNumber(pyFloatRepr(sign * rounded));
1820
+ }
1821
+ function exactFraction(x) {
1822
+ if (x === 0) return { m: 0n, k: 0 };
1823
+ const view = new DataView(new ArrayBuffer(8));
1824
+ view.setFloat64(0, x);
1825
+ const bits = view.getBigUint64(0);
1826
+ const exponent = Number(bits >> 52n & 0x7ffn);
1827
+ let mantissa = bits & (1n << 52n) - 1n;
1828
+ let e;
1829
+ if (exponent === 0) e = -1074;
1830
+ else {
1831
+ mantissa |= 1n << 52n;
1832
+ e = exponent - 1075;
1833
+ }
1834
+ while (mantissa !== 0n && (mantissa & 1n) === 0n) {
1835
+ mantissa >>= 1n;
1836
+ e += 1;
1837
+ }
1838
+ if (e >= 0) return { m: mantissa << BigInt(e), k: 0 };
1839
+ return { m: mantissa, k: -e };
1840
+ }
1841
+ var JsonNumber, JsonSyntaxError, Parser, isDigit;
1842
+ var init_json = __esm({
1843
+ "src/cli/platform/worldData/json.ts"() {
1844
+ "use strict";
1845
+ JsonNumber = class {
1846
+ /** The lexeme as it appeared, e.g. "1.0", "-0", "1e21". */
1847
+ constructor(text2) {
1848
+ this.text = text2;
1849
+ }
1850
+ /** A float in Python's eyes: a fraction, an exponent, or a non-finite literal. */
1851
+ get isFloat() {
1852
+ return /[.eE]/.test(this.text) || /[nN]/.test(this.text);
1853
+ }
1854
+ get value() {
1855
+ return Number(this.text);
1856
+ }
1857
+ };
1858
+ JsonSyntaxError = class extends Error {
1859
+ };
1860
+ Parser = class {
1861
+ constructor(s) {
1862
+ this.s = s;
1863
+ }
1864
+ i = 0;
1865
+ skipWs() {
1866
+ const s = this.s;
1867
+ while (this.i < s.length) {
1868
+ const c = s.charCodeAt(this.i);
1869
+ if (c === 32 || c === 10 || c === 13 || c === 9) this.i++;
1870
+ else break;
1871
+ }
1872
+ }
1873
+ fail(what) {
1874
+ throw new JsonSyntaxError(`${what} at ${this.i}`);
1875
+ }
1876
+ value() {
1877
+ const s = this.s;
1878
+ if (this.i >= s.length) this.fail("Expecting value");
1879
+ const c = s[this.i];
1880
+ if (c === "{") return this.object();
1881
+ if (c === "[") return this.array();
1882
+ if (c === '"') return this.string();
1883
+ if (c === "t") return this.literal("true", true);
1884
+ if (c === "f") return this.literal("false", false);
1885
+ if (c === "n") return this.literal("null", null);
1886
+ if (c === "N") return this.literal("NaN", new JsonNumber("NaN"));
1887
+ if (c === "I") return this.literal("Infinity", new JsonNumber("Infinity"));
1888
+ return this.number();
1889
+ }
1890
+ literal(word, value) {
1891
+ if (!this.s.startsWith(word, this.i)) this.fail("Expecting value");
1892
+ this.i += word.length;
1893
+ return value;
1894
+ }
1895
+ number() {
1896
+ const s = this.s;
1897
+ const start = this.i;
1898
+ if (s[this.i] === "-") {
1899
+ this.i++;
1900
+ if (s.startsWith("Infinity", this.i)) {
1901
+ this.i += 8;
1902
+ return new JsonNumber("-Infinity");
1903
+ }
1904
+ }
1905
+ const intStart = this.i;
1906
+ if (s[this.i] === "0") this.i++;
1907
+ else {
1908
+ while (this.i < s.length && isDigit(s.charCodeAt(this.i))) this.i++;
1909
+ if (this.i === intStart) this.fail("Expecting value");
1910
+ }
1911
+ if (s[this.i] === ".") {
1912
+ this.i++;
1913
+ const fracStart = this.i;
1914
+ while (this.i < s.length && isDigit(s.charCodeAt(this.i))) this.i++;
1915
+ if (this.i === fracStart) this.fail("Invalid number");
1916
+ }
1917
+ if (s[this.i] === "e" || s[this.i] === "E") {
1918
+ this.i++;
1919
+ if (s[this.i] === "+" || s[this.i] === "-") this.i++;
1920
+ const expStart = this.i;
1921
+ while (this.i < s.length && isDigit(s.charCodeAt(this.i))) this.i++;
1922
+ if (this.i === expStart) this.fail("Invalid number");
1923
+ }
1924
+ return new JsonNumber(s.slice(start, this.i));
1925
+ }
1926
+ string() {
1927
+ const s = this.s;
1928
+ this.i++;
1929
+ let out = "";
1930
+ let runStart = this.i;
1931
+ for (; ; ) {
1932
+ if (this.i >= s.length) this.fail("Unterminated string");
1933
+ const c = s.charCodeAt(this.i);
1934
+ if (c === 34) {
1935
+ out += s.slice(runStart, this.i);
1936
+ this.i++;
1937
+ return out;
1938
+ }
1939
+ if (c < 32) this.fail("Invalid control character");
1940
+ if (c !== 92) {
1941
+ this.i++;
1942
+ continue;
1943
+ }
1944
+ out += s.slice(runStart, this.i);
1945
+ this.i++;
1946
+ const e = s[this.i];
1947
+ switch (e) {
1948
+ case '"':
1949
+ case "\\":
1950
+ case "/":
1951
+ out += e;
1952
+ break;
1953
+ case "b":
1954
+ out += "\b";
1955
+ break;
1956
+ case "f":
1957
+ out += "\f";
1958
+ break;
1959
+ case "n":
1960
+ out += "\n";
1961
+ break;
1962
+ case "r":
1963
+ out += "\r";
1964
+ break;
1965
+ case "t":
1966
+ out += " ";
1967
+ break;
1968
+ case "u": {
1969
+ const hex2 = s.slice(this.i + 1, this.i + 5);
1970
+ if (!/^[0-9a-fA-F]{4}$/.test(hex2)) this.fail("Invalid \\u escape");
1971
+ out += String.fromCharCode(parseInt(hex2, 16));
1972
+ this.i += 4;
1973
+ break;
1974
+ }
1975
+ default:
1976
+ this.fail("Invalid escape");
1977
+ }
1978
+ this.i++;
1979
+ runStart = this.i;
1980
+ }
1981
+ }
1982
+ array() {
1983
+ this.i++;
1984
+ const out = [];
1985
+ this.skipWs();
1986
+ if (this.s[this.i] === "]") {
1987
+ this.i++;
1988
+ return out;
1989
+ }
1990
+ for (; ; ) {
1991
+ this.skipWs();
1992
+ out.push(this.value());
1993
+ this.skipWs();
1994
+ const c = this.s[this.i];
1995
+ if (c === ",") {
1996
+ this.i++;
1997
+ continue;
1998
+ }
1999
+ if (c === "]") {
2000
+ this.i++;
2001
+ return out;
2002
+ }
2003
+ this.fail("Expecting ',' delimiter");
2004
+ }
2005
+ }
2006
+ object() {
2007
+ this.i++;
2008
+ const out = /* @__PURE__ */ new Map();
2009
+ this.skipWs();
2010
+ if (this.s[this.i] === "}") {
2011
+ this.i++;
2012
+ return out;
2013
+ }
2014
+ for (; ; ) {
2015
+ this.skipWs();
2016
+ if (this.s[this.i] !== '"') this.fail("Expecting property name enclosed in double quotes");
2017
+ const key = this.string();
2018
+ this.skipWs();
2019
+ if (this.s[this.i] !== ":") this.fail("Expecting ':' delimiter");
2020
+ this.i++;
2021
+ this.skipWs();
2022
+ out.set(key, this.value());
2023
+ this.skipWs();
2024
+ const c = this.s[this.i];
2025
+ if (c === ",") {
2026
+ this.i++;
2027
+ continue;
2028
+ }
2029
+ if (c === "}") {
2030
+ this.i++;
2031
+ return out;
2032
+ }
2033
+ this.fail("Expecting ',' delimiter");
2034
+ }
2035
+ }
2036
+ };
2037
+ isDigit = (c) => c >= 48 && c <= 57;
2038
+ }
2039
+ });
2040
+
2041
+ // src/worlds/transforms.ts
2042
+ function parseTransform(name) {
2043
+ const simple = Object.prototype.hasOwnProperty.call(SIMPLE, name) ? SIMPLE[name] : void 0;
2044
+ if (simple) return simple;
2045
+ const colon = name.indexOf(":");
2046
+ if (colon !== -1) {
2047
+ const head = name.slice(0, colon);
2048
+ const prefix = name.slice(colon + 1);
2049
+ if (head === STRIP_PREFIX && prefix && !prefix.includes(",")) return stripPrefix(prefix);
2050
+ }
2051
+ throw new Error(`Unknown transform '${name}'; choose one of ${TRANSFORMS.join(", ")}`);
2052
+ }
2053
+ function applyTransforms(value, chain) {
2054
+ const steps = chain.map(parseTransform);
2055
+ let out = text(value);
2056
+ for (const step of steps) out = step(out);
2057
+ return out;
2058
+ }
2059
+ var import_node_crypto3, WHITESPACE, WHITESPACE_EDGES, WHITESPACE_RUN, NOT_DIGIT, STRIP_PREFIX, trim, emailLocalPart, emailDomain, stripPrefix, hex, SIMPLE, TRANSFORMS, text;
2060
+ var init_transforms = __esm({
2061
+ "src/worlds/transforms.ts"() {
2062
+ "use strict";
2063
+ import_node_crypto3 = require("crypto");
2064
+ init_json();
2065
+ WHITESPACE = " \n\r\f\v";
2066
+ WHITESPACE_EDGES = /^[ \t\n\r\f\v]+|[ \t\n\r\f\v]+$/g;
2067
+ WHITESPACE_RUN = /[ \t\n\r\f\v]+/g;
2068
+ NOT_DIGIT = /[^0-9]/g;
2069
+ STRIP_PREFIX = "strip_prefix";
2070
+ trim = (value) => value.replace(WHITESPACE_EDGES, "");
2071
+ emailLocalPart = (value) => {
2072
+ const at = value.lastIndexOf("@");
2073
+ return at === -1 ? value : value.slice(0, at);
2074
+ };
2075
+ emailDomain = (value) => {
2076
+ const at = value.lastIndexOf("@");
2077
+ return at === -1 ? "" : value.slice(at + 1).toLowerCase();
2078
+ };
2079
+ stripPrefix = (prefix) => (value) => value.startsWith(prefix) ? value.slice(prefix.length) : value;
2080
+ hex = (algorithm, value) => (0, import_node_crypto3.createHash)(algorithm).update(value, "utf8").digest("hex");
2081
+ SIMPLE = {
2082
+ lower: (value) => value.toLowerCase(),
2083
+ upper: (value) => value.toUpperCase(),
2084
+ trim,
2085
+ collapse_ws: (value) => trim(value).replace(WHITESPACE_RUN, " "),
2086
+ nfkc: (value) => value.normalize("NFKC"),
2087
+ digits: (value) => value.replace(NOT_DIGIT, ""),
2088
+ email_local_part: emailLocalPart,
2089
+ email_domain: emailDomain,
2090
+ // Vendor-style digests: lowercase hex of the utf-8 bytes, unsalted. This is
2091
+ // how SpyCloud accepts a hashed selector (`_digests` in its api_handlers).
2092
+ sha1: (value) => hex("sha1", value),
2093
+ sha256: (value) => hex("sha256", value)
2094
+ };
2095
+ TRANSFORMS = [...Object.keys(SIMPLE), `${STRIP_PREFIX}:<prefix>`];
2096
+ text = (value) => {
2097
+ if (typeof value === "string") return value;
2098
+ return Number.isInteger(value) ? String(value) : pyFloatRepr(value);
2099
+ };
2100
+ }
2101
+ });
2102
+
2103
+ // src/worlds/redaction.ts
2104
+ function pyText(value) {
2105
+ if (typeof value === "string") return value;
2106
+ if (Number.isInteger(value)) return String(value);
2107
+ if (Number.isNaN(value)) return "nan";
2108
+ if (!Number.isFinite(value)) return value > 0 ? "inf" : "-inf";
2109
+ return pyFloatRepr(value);
2110
+ }
2111
+ function hashForm(slug, plaintext) {
2112
+ return "sha256:" + (0, import_node_crypto4.createHash)("sha256").update(`${slug}:${pyText(plaintext)}`, "utf8").digest("hex");
2113
+ }
2114
+ function preserveForm(slug, plaintext) {
2115
+ const kind = typeof plaintext === "string" ? "str" : isInt(plaintext) ? "int" : "float";
2116
+ const shaped = shapeText(slug, pyText(plaintext), kind);
2117
+ return kind === "str" ? shaped : Number(shaped);
2118
+ }
2119
+ function shapeText(slug, text2, kind) {
2120
+ const seed = Buffer.from(`${slug}:${text2}`, "utf8");
2121
+ let digest = (0, import_node_crypto4.createHash)("sha256").update(seed).digest();
2122
+ let cursor = 0;
2123
+ const out = [];
2124
+ for (const char of text2) {
2125
+ if (cursor === digest.length) {
2126
+ digest = (0, import_node_crypto4.createHash)("sha256").update(Buffer.concat([digest, seed])).digest();
2127
+ cursor = 0;
2128
+ }
2129
+ const byte = digest[cursor];
2130
+ cursor += 1;
2131
+ if (char >= "0" && char <= "9") out.push(String(byte % 10));
2132
+ else if (kind === "str" && char >= "a" && char <= "z") out.push(String.fromCharCode(97 + byte % 26));
2133
+ else if (kind === "str" && char >= "A" && char <= "Z") out.push(String.fromCharCode(65 + byte % 26));
2134
+ else out.push(char);
2135
+ }
2136
+ if (kind === "int" && out.length > 1 && out[0] === "0") out[0] = String(1 + digest[0] % 9);
2137
+ return out.join("");
2138
+ }
2139
+ function roundForm(plaintext, decimals) {
2140
+ if (typeof plaintext === "string" || isInt(plaintext) || !Number.isFinite(plaintext)) return plaintext;
2141
+ return pyRound(new JsonNumber(pyFloatRepr(plaintext)), decimals).value;
2142
+ }
2143
+ function redactionOf(redact, field) {
2144
+ if (!redact) return null;
2145
+ const named = (names) => (names ?? []).some((name) => name === field || name.slice(name.lastIndexOf(".") + 1) === field);
2146
+ if (named(redact.drop)) return "drop";
2147
+ if (named(redact.hash)) return "hash";
2148
+ if (named(redact.preserve)) return "preserve";
2149
+ const decimals = redact.round?.[field];
2150
+ if (typeof decimals === "number") return `round:${decimals}`;
2151
+ return null;
2152
+ }
2153
+ function storedForms(world, field, plaintext, transform) {
2154
+ if (transform?.length) plaintext = applyTransforms(plaintext, transform);
2155
+ const policy = redactionOf(world.redact, field);
2156
+ const salt = world.redact?.slug ?? world.slug;
2157
+ if (policy === "drop") return [];
2158
+ if (policy === "hash") return [hashForm(salt, plaintext)];
2159
+ if (policy === "preserve") return [preserveForm(salt, plaintext)];
2160
+ if (policy !== null) return [roundForm(plaintext, world.redact.round[field])];
2161
+ return [plaintext];
2162
+ }
2163
+ var import_node_crypto4, isInt;
2164
+ var init_redaction = __esm({
2165
+ "src/worlds/redaction.ts"() {
2166
+ "use strict";
2167
+ import_node_crypto4 = require("crypto");
2168
+ init_json();
2169
+ init_transforms();
2170
+ isInt = (value) => typeof value === "number" && Number.isInteger(value);
2171
+ }
2172
+ });
2173
+
2174
+ // src/worlds/query.ts
2175
+ function queryRowsSearch(entity, opts = {}) {
2176
+ const search = new URLSearchParams();
2177
+ search.set("entity", entity);
2178
+ if (opts.where && Object.keys(opts.where).length) search.set("where", JSON.stringify(opts.where));
2179
+ if (opts.limit !== void 0) search.set("limit", String(opts.limit));
2180
+ if (opts.offset !== void 0) search.set("offset", String(opts.offset));
2181
+ if (opts.resolve) search.set("resolve", "true");
2182
+ if (opts.across) search.set("across", "true");
2183
+ if (opts.compare) search.set("compare", "true");
2184
+ return `?${search.toString()}`;
2185
+ }
2186
+ async function queryRows(slug, entity, opts = {}, options = {}) {
2187
+ if (slug.includes("@"))
2188
+ throw new Error(
2189
+ `queryRows reads a world's head version: pass the slug without @ref (got ${slug})`
2190
+ );
2191
+ if (!entity) throw new Error("queryRows needs an entity");
2192
+ if (opts.compare && !opts.across) throw new Error("queryRows: compare needs across");
2193
+ return apiRequest(
2194
+ options,
2195
+ "GET",
2196
+ `/api/public/worlds/${encodeURIComponent(slug)}/data${queryRowsSearch(entity, opts)}`
2197
+ );
2198
+ }
2199
+ var init_query = __esm({
2200
+ "src/worlds/query.ts"() {
2201
+ "use strict";
2202
+ init_worlds();
2203
+ }
2204
+ });
2205
+
2206
+ // src/worlds/migrate.ts
2207
+ async function migrateWorld(slug, input = {}, options = {}) {
2208
+ if (slug.includes("@"))
2209
+ throw new Error(
2210
+ `migrateWorld converts a world's head version: pass the slug without @ref (got ${slug})`
2211
+ );
2212
+ return apiRequest(
2213
+ options,
2214
+ "POST",
2215
+ `/api/public/worlds/${encodeURIComponent(slug)}/migrate`,
2216
+ {
2217
+ ...input.apply === void 0 ? {} : { apply: input.apply },
2218
+ ...input.force === void 0 ? {} : { force: input.force }
2219
+ }
2220
+ );
2221
+ }
2222
+ async function migrateProjectWorlds(input = {}, options = {}) {
2223
+ return apiRequest(
2224
+ options,
2225
+ "POST",
2226
+ "/api/public/worlds/migrate",
2227
+ input.apply === void 0 ? {} : { apply: input.apply }
2228
+ );
2229
+ }
2230
+ var init_migrate = __esm({
2231
+ "src/worlds/migrate.ts"() {
2232
+ "use strict";
2233
+ init_worlds();
2234
+ }
2235
+ });
2236
+
2237
+ // src/cli/router.ts
2238
+ var CliError;
2239
+ var init_router = __esm({
2240
+ "src/cli/router.ts"() {
2241
+ "use strict";
2242
+ CliError = class extends Error {
2243
+ constructor(message, exitCode = 2) {
2244
+ super(message);
2245
+ this.exitCode = exitCode;
2246
+ }
2247
+ };
2248
+ }
2249
+ });
2250
+
2251
+ // src/cli/config.ts
2252
+ async function api(creds, method, route, body, init = {}) {
2253
+ const controller = new AbortController();
2254
+ const timer = setTimeout(() => controller.abort(), init.timeoutMs ?? 12e4);
2255
+ try {
2256
+ const res = await fetch(`${creds.host}${route}`, {
2257
+ method,
2258
+ headers: {
2259
+ "content-type": "application/json",
2260
+ accept: "application/json",
2261
+ authorization: "Basic " + Buffer.from(`${creds.publicKey}:${creds.secretKey}`).toString("base64")
2262
+ },
2263
+ ...body === void 0 ? {} : { body: JSON.stringify(body) },
2264
+ signal: controller.signal
2265
+ });
2266
+ const text2 = await res.text();
2267
+ if (!res.ok) throw new ApiError(res.status, method, route, text2);
2268
+ return text2 ? JSON.parse(text2) : {};
2269
+ } finally {
2270
+ clearTimeout(timer);
2271
+ }
2272
+ }
2273
+ var fs2, os, path2, ApiError;
2274
+ var init_config = __esm({
2275
+ "src/cli/config.ts"() {
2276
+ "use strict";
2277
+ fs2 = __toESM(require("fs"));
2278
+ os = __toESM(require("os"));
2279
+ path2 = __toESM(require("path"));
2280
+ init_router();
2281
+ ApiError = class extends CliError {
2282
+ constructor(status, method, route, text2) {
2283
+ super(`${method} ${route} -> ${status}: ${text2.slice(0, 600)}`, 1);
2284
+ this.status = status;
2285
+ this.method = method;
2286
+ this.route = route;
2287
+ this.text = text2;
2288
+ }
2289
+ };
2290
+ }
2291
+ });
2292
+
2293
+ // src/cli/runtime/local.ts
2294
+ function tailOf(output) {
2295
+ return output.length > DIAGNOSTIC_TAIL ? `\u2026${output.slice(-DIAGNOSTIC_TAIL)}` : output;
2296
+ }
2297
+ function runtimeMode() {
2298
+ const raw = (process.env.GATEWAY_RUNTIME ?? "auto").toLowerCase();
2299
+ if (raw === "local" || raw === "platform" || raw === "auto") return raw;
2300
+ throw new CliError(
2301
+ `GATEWAY_RUNTIME must be local, platform or auto (got ${raw})`
2302
+ );
2303
+ }
2304
+ function runtimeRoot() {
2305
+ const candidates = [];
2306
+ if (process.env.GATEWAY_RUNTIME_PATH)
2307
+ candidates.push(process.env.GATEWAY_RUNTIME_PATH);
2308
+ const entry = process.argv[1] && fs3.existsSync(process.argv[1]) ? path3.dirname(fs3.realpathSync(process.argv[1])) : null;
2309
+ if (entry) {
2310
+ candidates.push(path3.resolve(entry, "..", "runtime"));
2311
+ candidates.push(path3.resolve(entry, "..", "..", "runtime"));
2312
+ candidates.push(path3.resolve(entry, "..", "..", "sdk", "src"));
2313
+ }
2314
+ candidates.push(path3.resolve(process.cwd(), "runtime"));
2315
+ for (const root of candidates)
2316
+ if (fs3.existsSync(
2317
+ path3.join(root, "gatewaysdk", "environment", "schema", "platform.py")
2318
+ ))
2319
+ return root;
2320
+ return null;
2321
+ }
2322
+ function probeVersion(name) {
2323
+ const probe = (0, import_node_child_process.spawnSync)(
2324
+ name,
2325
+ ["-c", "import sys;print(sys.version_info[0],sys.version_info[1])"],
2326
+ { encoding: "utf8", timeout: 1e4 }
2327
+ );
2328
+ if (probe.status !== 0) return null;
2329
+ const [major, minor] = probe.stdout.trim().split(/\s+/).map(Number);
2330
+ return Number.isInteger(major) && Number.isInteger(minor) ? `${major}.${minor}` : null;
2331
+ }
2332
+ function atLeastMinimum(version) {
2333
+ const [major, minor] = version.split(".").map(Number);
2334
+ return major > MIN_PYTHON[0] || major === MIN_PYTHON[0] && minor >= MIN_PYTHON[1];
2335
+ }
2336
+ function uvPython() {
2337
+ const found = (0, import_node_child_process.spawnSync)("uv", UV_FIND, { encoding: "utf8", timeout: 1e4 });
2338
+ if (found.status !== 0) return null;
2339
+ const line = found.stdout.trim().split(/\r?\n/)[0] ?? "";
2340
+ return line || null;
2341
+ }
2342
+ function findPython() {
2343
+ if (pythonCache !== void 0) return pythonCache;
2344
+ const named = process.env.GATEWAY_PYTHON;
2345
+ const candidates = named ? [named] : PYTHON_CANDIDATES;
2346
+ for (const name of candidates) {
2347
+ const version = probeVersion(name);
2348
+ pythonProbes.push({ name, version });
2349
+ if (version && atLeastMinimum(version)) {
2350
+ pythonCache = name;
2351
+ return name;
2352
+ }
2353
+ }
2354
+ if (!named) {
2355
+ const fromUv = uvPython();
2356
+ const version = fromUv ? probeVersion(fromUv) : null;
2357
+ pythonProbes.push({ name: fromUv ?? "uv python find", version });
2358
+ if (fromUv && version && atLeastMinimum(version)) {
2359
+ pythonCache = fromUv;
2360
+ return fromUv;
2361
+ }
2362
+ }
2363
+ pythonCache = null;
2364
+ return null;
2365
+ }
2366
+ function pythonAdvice() {
2367
+ findPython();
2368
+ const floor = MIN_PYTHON.join(".");
2369
+ const named = process.env.GATEWAY_PYTHON;
2370
+ const seen = pythonProbes.filter((probe) => probe.version).map((probe) => `${probe.name} is ${probe.version}`);
2371
+ const found = seen.length ? seen.join(", ") : named ? `${named} did not run` : "none on PATH";
2372
+ return `No python3 >= ${floor} usable (${found}); set GATEWAY_PYTHON to a newer interpreter, e.g. GATEWAY_PYTHON="$(brew --prefix python@3.12)/bin/python3.12" or GATEWAY_PYTHON="$(uv python find 3.12)".`;
2373
+ }
2374
+ function localRuntimeReason() {
2375
+ if (runtimeMode() === "platform")
2376
+ return "GATEWAY_RUNTIME=platform forces the hosted side.";
2377
+ if (!findPython()) return pythonAdvice();
2378
+ if (!runtimeRoot())
2379
+ return "The bundled runtime is missing (set GATEWAY_RUNTIME_PATH).";
2380
+ return "";
2381
+ }
2382
+ function localRuntime() {
2383
+ if (runtimeMode() === "platform") return null;
2384
+ const python = findPython();
2385
+ const root = runtimeRoot();
2386
+ if (!python || !root) {
2387
+ if (runtimeMode() === "local")
2388
+ throw new CliError(
2389
+ !python ? `GATEWAY_RUNTIME=local but ${pythonAdvice()}` : "GATEWAY_RUNTIME=local but the bundled runtime is missing (set GATEWAY_RUNTIME_PATH)"
2390
+ );
2391
+ return null;
2392
+ }
2393
+ return { python, root };
2394
+ }
2395
+ function localPythonHasYaml(python) {
2396
+ return (0, import_node_child_process.spawnSync)(python, ["-c", "import yaml"], { timeout: 1e4 }).status === 0;
2397
+ }
2398
+ async function localBridge(request, local, opts = {}) {
2399
+ const input = JSON.stringify(request);
2400
+ return await new Promise((resolve6, reject) => {
2401
+ const child = (0, import_node_child_process.spawn)(
2402
+ local.python,
2403
+ ["-I", "-B", "-c", BRIDGE_BOOTSTRAP, local.root],
2404
+ {
2405
+ stdio: ["pipe", "pipe", "pipe"],
2406
+ // This is the author's machine running the author's world: the one
2407
+ // place the runtime may import and run a world's own Python (check's
2408
+ // handler execution, `worlds call`, `worlds test` tool cases).
2409
+ env: {
2410
+ PATH: process.env.PATH ?? "",
2411
+ HOME: process.env.HOME ?? "",
2412
+ TMPDIR: process.env.TMPDIR ?? "",
2413
+ GATEWAY_RUNTIME_EXECUTE: "1"
2414
+ }
2415
+ }
2416
+ );
2417
+ const out = [];
2418
+ const err = [];
2419
+ const timer = setTimeout(
2420
+ () => child.kill("SIGKILL"),
2421
+ opts.timeoutMs ?? 3e5
2422
+ );
2423
+ child.stdout.on("data", (chunk) => out.push(chunk));
2424
+ child.stderr.on("data", (chunk) => err.push(chunk));
2425
+ child.on("error", (error) => {
2426
+ clearTimeout(timer);
2427
+ reject(
2428
+ new CliError(
2429
+ `local runtime could not start (${local.python}): ${error.message}`,
2430
+ 1
2431
+ )
2432
+ );
2433
+ });
2434
+ child.on("close", (code) => {
2435
+ clearTimeout(timer);
2436
+ const text2 = Buffer.concat(out).toString("utf8");
2437
+ const stderr = Buffer.concat(err).toString("utf8");
2438
+ let payload = null;
2439
+ try {
2440
+ payload = text2 ? JSON.parse(text2) : null;
2441
+ } catch {
2442
+ payload = null;
2443
+ }
2444
+ if (payload && typeof payload === "object") {
2445
+ resolve6(payload);
2446
+ return;
2447
+ }
2448
+ reject(
2449
+ new CliError(
2450
+ `local runtime (${request.command}) exited ${code}: ${tailOf((stderr || text2).trim()) || "no output"}`,
2451
+ 1
2452
+ )
2453
+ );
2454
+ });
2455
+ child.stdin.end(input);
2456
+ });
2457
+ }
2458
+ var import_node_child_process, fs3, net, path3, MIN_PYTHON, DIAGNOSTIC_TAIL, BRIDGE_BOOTSTRAP, pythonCache, pythonProbes, PYTHON_CANDIDATES, UV_FIND;
2459
+ var init_local = __esm({
2460
+ "src/cli/runtime/local.ts"() {
2461
+ "use strict";
2462
+ import_node_child_process = require("child_process");
2463
+ fs3 = __toESM(require("fs"));
2464
+ net = __toESM(require("net"));
2465
+ path3 = __toESM(require("path"));
2466
+ init_router();
2467
+ init_config();
2468
+ MIN_PYTHON = [3, 11];
2469
+ DIAGNOSTIC_TAIL = 600;
2470
+ BRIDGE_BOOTSTRAP = `import sys,runpy,types,os
2471
+ root=sys.argv[1]
2472
+ package=types.ModuleType('gatewaysdk')
2473
+ package.__path__=[os.path.join(root,'gatewaysdk')]
2474
+ sys.modules['gatewaysdk']=package
2475
+ runpy.run_module('gatewaysdk.environment.schema.platform',run_name='__main__')`;
2476
+ pythonProbes = [];
2477
+ PYTHON_CANDIDATES = [
2478
+ "python3.13",
2479
+ "python3.12",
2480
+ "python3.11",
2481
+ "python3",
2482
+ "python"
2483
+ ];
2484
+ UV_FIND = ["python", "find", `>=${MIN_PYTHON.join(".")}`];
2485
+ }
2486
+ });
2487
+
2488
+ // src/cli/runtime/client.ts
2489
+ function isBuildOutput(relPath) {
2490
+ return BUILD_OUTPUT.test(relPath);
2491
+ }
2492
+ function readWorldFiles(dir, opts = {}) {
2493
+ if (!fs4.existsSync(dir) || !fs4.statSync(dir).isDirectory())
2494
+ throw new CliError(`Not a directory: ${dir}`);
2495
+ const out = [];
2496
+ const walk = (rel) => {
2497
+ const abs = rel ? path4.join(dir, rel) : dir;
2498
+ const entries = fs4.readdirSync(abs, { withFileTypes: true });
2499
+ entries.sort((a, b) => a.name.localeCompare(b.name));
2500
+ for (const entry of entries) {
2501
+ const childRel = rel ? `${rel}/${entry.name}` : entry.name;
2502
+ if (entry.isDirectory()) {
2503
+ if (!SKIP_DIRS2.has(entry.name)) walk(childRel);
2504
+ } else if (entry.isFile()) {
2505
+ if (!opts.buildOutputs && isBuildOutput(childRel)) continue;
2506
+ out.push({
2507
+ path: childRel,
2508
+ content: fs4.readFileSync(path4.join(dir, childRel)).toString("base64")
2509
+ });
2510
+ }
2511
+ }
2512
+ };
2513
+ walk("");
2514
+ return out.sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
2515
+ }
2516
+ function assertSafeRelPath(rel) {
2517
+ const parts = rel.split("/");
2518
+ if (!rel || rel.startsWith("/") || rel.includes("\\") || /^[A-Za-z]:/.test(rel) || parts.some((p) => p === "" || p === "." || p === ".."))
2519
+ throw new CliError(`The runtime returned an unsafe file path: ${rel}`, 1);
2520
+ }
2521
+ function writeWorldFiles(dir, files, opts = {}) {
2522
+ for (const file of files) assertSafeRelPath(file.path);
2523
+ if (opts.clean && fs4.existsSync(dir)) {
2524
+ const keep = new Set(files.map((f) => f.path));
2525
+ for (const existing of readWorldFiles(dir)) {
2526
+ if (!keep.has(existing.path)) fs4.rmSync(path4.join(dir, existing.path));
2527
+ }
2528
+ pruneEmptyDirs(dir);
2529
+ }
2530
+ fs4.mkdirSync(dir, { recursive: true });
2531
+ const written = [];
2532
+ for (const file of files) {
2533
+ const target = path4.join(dir, file.path);
2534
+ fs4.mkdirSync(path4.dirname(target), { recursive: true });
2535
+ fs4.writeFileSync(target, Buffer.from(file.content, "base64"));
2536
+ written.push(file.path);
2537
+ }
2538
+ return written;
2539
+ }
2540
+ function pruneEmptyDirs(root) {
2541
+ const walk = (abs) => {
2542
+ let empty = true;
2543
+ for (const entry of fs4.readdirSync(abs, { withFileTypes: true })) {
2544
+ const child = path4.join(abs, entry.name);
2545
+ if (entry.isDirectory()) {
2546
+ if (SKIP_DIRS2.has(entry.name)) {
2547
+ empty = false;
2548
+ continue;
2549
+ }
2550
+ if (walk(child)) fs4.rmdirSync(child);
2551
+ else empty = false;
2552
+ } else empty = false;
2553
+ }
2554
+ return empty;
2555
+ };
2556
+ walk(root);
2557
+ }
2558
+ function formatBridgeError(detail) {
2559
+ const where = detail.schema_path || detail.path || "/";
2560
+ return `${detail.code} at ${where}: ${detail.message}`;
2561
+ }
2562
+ function detailFrom(payload) {
2563
+ if (!payload || typeof payload !== "object") return null;
2564
+ const error = payload.error;
2565
+ if (!error || typeof error !== "object") return null;
2566
+ const detail = error;
2567
+ if (typeof detail.code !== "string" || typeof detail.message !== "string") return null;
2568
+ return detail;
2569
+ }
2570
+ async function runtime(creds, request, opts = {}) {
2571
+ const local = localRuntime();
2572
+ const yamlSpec = request.command === "conform" && Array.isArray(request.openapi) && request.openapi.some((doc) => /\.ya?ml$/i.test(doc.path ?? ""));
2573
+ if (local && !(yamlSpec && !localPythonHasYaml(local.python))) {
2574
+ const payload = await localBridge(request, local, opts);
2575
+ const detail = detailFrom(payload);
2576
+ if (detail) throw new BridgeRejected(detail);
2577
+ return payload;
2578
+ }
2579
+ if (!creds)
2580
+ throw new CliError(
2581
+ "This needs the schema runtime (the CLI bundles it) or platform credentials (`gateway auth login`). " + localRuntimeReason()
2582
+ );
2583
+ const controller = new AbortController();
2584
+ const timer = setTimeout(() => controller.abort(), opts.timeoutMs ?? 18e4);
2585
+ const route = "/api/public/worlds/runtime";
2586
+ try {
2587
+ const res = await fetch(`${creds.host}${route}`, {
2588
+ method: "POST",
2589
+ headers: {
2590
+ "content-type": "application/json",
2591
+ accept: "application/json",
2592
+ authorization: "Basic " + Buffer.from(`${creds.publicKey}:${creds.secretKey}`).toString("base64")
2593
+ },
2594
+ body: JSON.stringify(request),
2595
+ signal: controller.signal
2596
+ });
2597
+ const text2 = await res.text();
2598
+ let payload = null;
2599
+ try {
2600
+ payload = text2 ? JSON.parse(text2) : {};
2601
+ } catch {
2602
+ payload = null;
2603
+ }
2604
+ const detail = detailFrom(payload);
2605
+ if (detail) throw new BridgeRejected(detail);
2606
+ if (!res.ok)
2607
+ throw new CliError(`POST ${route} (${request.command}) -> ${res.status}: ${text2.slice(0, 600)}`, 1);
2608
+ if (payload === null) throw new CliError(`POST ${route} (${request.command}) returned non-JSON`, 1);
2609
+ return payload;
2610
+ } finally {
2611
+ clearTimeout(timer);
2612
+ }
2613
+ }
2614
+ var fs4, path4, SKIP_DIRS2, BUILD_OUTPUT, BridgeRejected;
2615
+ var init_client = __esm({
2616
+ "src/cli/runtime/client.ts"() {
2617
+ "use strict";
2618
+ fs4 = __toESM(require("fs"));
2619
+ path4 = __toESM(require("path"));
2620
+ init_router();
2621
+ init_local();
2622
+ SKIP_DIRS2 = /* @__PURE__ */ new Set(["__pycache__", ".git", "node_modules", ".gateway"]);
2623
+ BUILD_OUTPUT = /(^|\/)state\.(sqlite|json)$/;
2624
+ BridgeRejected = class extends CliError {
2625
+ constructor(detail) {
2626
+ super(formatBridgeError(detail), 1);
2627
+ this.detail = detail;
2628
+ }
2629
+ };
2630
+ }
2631
+ });
2632
+
2633
+ // src/cli/runtime/data.ts
2634
+ var data_exports = {};
2635
+ __export(data_exports, {
2636
+ checkLocalWorldData: () => checkLocalWorldData,
2637
+ dropBuildOutputs: () => dropBuildOutputs,
2638
+ importLocalWorldData: () => importLocalWorldData,
2639
+ ingestLocalToolCalls: () => ingestLocalToolCalls,
2640
+ queryLocalWorldData: () => queryLocalWorldData,
2641
+ queryLocalWorldDataAcross: () => queryLocalWorldDataAcross,
2642
+ showLocalWorldData: () => showLocalWorldData
2643
+ });
2644
+ async function importLocalWorldData(dir, rows, opts, creds) {
2645
+ const res = await runtime(creds, {
2646
+ command: "import-data",
2647
+ files: readWorldFiles(dir),
2648
+ rows,
2649
+ mode: opts.mode ?? "append",
2650
+ ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {}
2651
+ });
2652
+ if (res.files?.length) writeWorldFiles(dir, res.files);
2653
+ if (res.changed) dropBuildOutputs(dir);
2654
+ return {
2655
+ kind: res.kind ?? "unknown",
2656
+ entity_counts: res.entity_counts ?? {},
2657
+ changed: Boolean(res.changed)
2658
+ };
2659
+ }
2660
+ function dropBuildOutputs(dir) {
2661
+ const dropped = [];
2662
+ for (const file of readWorldFiles(dir, { buildOutputs: true })) {
2663
+ if (!BUILD_OUTPUT2.test(file.path)) continue;
2664
+ fs5.rmSync(path5.join(dir, file.path), { force: true });
2665
+ dropped.push(file.path);
2666
+ }
2667
+ return dropped;
2668
+ }
2669
+ async function checkLocalWorldData(dir, rows, creds, opts = {}) {
2670
+ const res = await runtime(creds, {
2671
+ command: "import-data",
2672
+ files: readWorldFiles(dir),
2673
+ rows,
2674
+ mode: "append",
2675
+ ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {}
2676
+ });
2677
+ return {
2678
+ kind: res.kind ?? "unknown",
2679
+ entity_counts: res.entity_counts ?? {},
2680
+ changed: Boolean(res.changed)
2681
+ };
2682
+ }
2683
+ async function showLocalWorldData(dir, entity, creds) {
2684
+ const res = await runtime(creds, {
2685
+ command: "counts",
2686
+ files: readWorldFiles(dir),
2687
+ ...entity ? { entity } : {}
2688
+ });
2689
+ const out = { kind: res.kind ?? "unknown" };
2690
+ if (entity) {
2691
+ out.entity = entity;
2692
+ out.rows = res.rows ?? [];
2693
+ } else out.entity_counts = res.entity_counts ?? {};
2694
+ return out;
2695
+ }
2696
+ async function queryLocalWorldData(dir, entity, where, opts, creds) {
2697
+ const res = await runtime(creds, {
2698
+ command: "query",
2699
+ files: readWorldFiles(dir),
2700
+ entity,
2701
+ ...Object.keys(where).length ? { where } : {},
2702
+ ...opts.limit !== void 0 ? { limit: opts.limit } : {},
2703
+ ...opts.offset !== void 0 ? { offset: opts.offset } : {},
2704
+ ...opts.resolve ? { resolve: true } : {},
2705
+ ...opts.scenario ? { scenario: opts.scenario } : {}
2706
+ });
2707
+ const rows = res.rows ?? [];
2708
+ return {
2709
+ ...res.kind ? { kind: res.kind } : {},
2710
+ entity: res.entity ?? entity,
2711
+ ...res.scenario ? { scenario: res.scenario } : {},
2712
+ rows,
2713
+ count: res.count ?? rows.length,
2714
+ total: res.total ?? null,
2715
+ limit: res.limit ?? opts.limit ?? rows.length,
2716
+ offset: res.offset ?? opts.offset ?? 0,
2717
+ ...res.resolved ? { resolved: res.resolved } : {}
2718
+ };
2719
+ }
2720
+ async function queryLocalWorldDataAcross(dir, entity, where, opts) {
2721
+ const local = localRuntime();
2722
+ if (!local)
2723
+ throw new CliError(
2724
+ "`--across` on a directory reads the linked worlds at their paths, so it needs the bundled runtime on this machine. " + localRuntimeReason(),
2725
+ 1
2726
+ );
2727
+ const payload = await localBridge(
2728
+ {
2729
+ command: "query",
2730
+ world: path5.resolve(dir),
2731
+ entity,
2732
+ across: true,
2733
+ ...opts.compare ? { compare: true } : {},
2734
+ ...Object.keys(where).length ? { where } : {},
2735
+ ...opts.limit !== void 0 ? { limit: opts.limit } : {},
2736
+ ...opts.offset !== void 0 ? { offset: opts.offset } : {},
2737
+ ...opts.resolve ? { resolve: true } : {},
2738
+ ...opts.scenario ? { scenario: opts.scenario } : {}
2739
+ },
2740
+ local
2741
+ );
2742
+ const detail = detailFrom(payload);
2743
+ if (detail) throw new BridgeRejected(detail);
2744
+ return payload;
2745
+ }
2746
+ async function ingestLocalToolCalls(dir, records, opts, creds) {
2747
+ const res = await runtime(creds, {
2748
+ command: "ingest-calls",
2749
+ files: readWorldFiles(dir),
2750
+ records,
2751
+ mode: opts.mode ?? "append",
2752
+ ...opts.dryRun ? { dry_run: true } : {},
2753
+ ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {},
2754
+ ...opts.map !== void 0 ? { map: opts.map } : {}
2755
+ });
2756
+ if (!opts.dryRun && res.files?.length) writeWorldFiles(dir, res.files);
2757
+ if (res.changed) dropBuildOutputs(dir);
2758
+ return {
2759
+ ...res.via ? { via: res.via } : {},
2760
+ ...res.sources ? { sources: res.sources } : {},
2761
+ ...res.unmatched ? { unmatched: res.unmatched } : {},
2762
+ ...res.note ? { note: res.note } : {},
2763
+ records: res.records ?? records.length,
2764
+ ingested: res.ingested ?? 0,
2765
+ skipped: res.skipped ?? {},
2766
+ refusals: res.refusals ?? [],
2767
+ rows: res.rows ?? {},
2768
+ ...res.projected ? { projected: res.projected } : {},
2769
+ dry_run: Boolean(res.dry_run ?? opts.dryRun),
2770
+ redact: res.redact ?? opts.redact ?? "off",
2771
+ changed: Boolean(res.changed),
2772
+ ...res.kind ? { kind: res.kind } : {},
2773
+ ...res.entity_counts ? { entity_counts: res.entity_counts } : {},
2774
+ ...res.batch !== void 0 ? { batch: res.batch } : {}
2775
+ };
2776
+ }
2777
+ var fs5, path5, BUILD_OUTPUT2;
2778
+ var init_data = __esm({
2779
+ "src/cli/runtime/data.ts"() {
2780
+ "use strict";
2781
+ fs5 = __toESM(require("fs"));
2782
+ path5 = __toESM(require("path"));
2783
+ init_router();
2784
+ init_client();
2785
+ init_local();
2786
+ BUILD_OUTPUT2 = /(^|\/)state\.(sqlite|json)$/;
2787
+ }
2788
+ });
2789
+
2790
+ // src/cli/platform/worldData/transform.ts
2791
+ var transform_exports = {};
2792
+ __export(transform_exports, {
2793
+ DEFAULT_TRANSFORM_TIMEOUT_MS: () => DEFAULT_TRANSFORM_TIMEOUT_MS,
2794
+ NODE_SUFFIXES: () => NODE_SUFFIXES,
2795
+ NODE_WRAPPER: () => NODE_WRAPPER,
2796
+ PYTHON_SUFFIXES: () => PYTHON_SUFFIXES,
2797
+ PY_WRAPPER: () => PY_WRAPPER,
2798
+ checkRows: () => checkRows,
2799
+ runTransform: () => runTransform,
2800
+ transformRecords: () => transformRecords
2801
+ });
2802
+ function checkRows(value, where) {
2803
+ if (!isObject(value)) throw new CliError(`${where} must return {entity: [rows]}; got ${value === null ? "null" : Array.isArray(value) ? "an array" : typeof value}`, 1);
2804
+ for (const [entity, listed] of Object.entries(value)) {
2805
+ if (!Array.isArray(listed)) throw new CliError(`${where}: ${entity} must be a list of rows; got ${listed === null ? "null" : typeof listed}`, 1);
2806
+ listed.forEach((row, index) => {
2807
+ if (!isObject(row)) throw new CliError(`${where}: ${entity}[${index}] is not an object`, 1);
2808
+ });
2809
+ }
2810
+ return value;
2811
+ }
2812
+ function typescriptPrefix() {
2813
+ const [major, minor] = process.versions.node.split(".").map(Number);
2814
+ if (!process.env.GATEWAY_NODE && (major > 22 || major === 22 && minor >= 6)) return ["--experimental-strip-types", "--no-warnings"];
2815
+ try {
2816
+ return [(0, import_node_module.createRequire)(import_meta.url).resolve("tsx/cli")];
2817
+ } catch {
2818
+ throw new CliError(
2819
+ `a .ts transform needs Node 22.6 or newer (built-in type stripping; this is ${process.versions.node}) or the tsx package installed beside the CLI; write the transform as .mjs or .py, or set GATEWAY_NODE to a newer node`,
2820
+ 1
2821
+ );
2822
+ }
2823
+ }
2824
+ function command(script, wrapperDir) {
2825
+ const suffix = path6.extname(script).toLowerCase();
2826
+ if (PYTHON_SUFFIXES.includes(suffix)) return { file: process.env.GATEWAY_PYTHON || "python3", args: ["-c", PY_WRAPPER, script] };
2827
+ if (NODE_SUFFIXES.includes(suffix)) {
2828
+ const wrapper = path6.join(wrapperDir, "transform-wrapper.mjs");
2829
+ fs6.writeFileSync(wrapper, NODE_WRAPPER);
2830
+ const flags = suffix === ".ts" || suffix === ".mts" ? typescriptPrefix() : [];
2831
+ return { file: process.env.GATEWAY_NODE || process.execPath, args: [...flags, wrapper, script] };
2832
+ }
2833
+ throw new CliError(`${path6.basename(script)}: a transform script is .py, .ts, .mjs, .js or .cjs`, 1);
2834
+ }
2835
+ async function runTransform(script, records, opts = {}) {
2836
+ if (!fs6.existsSync(script) || !fs6.statSync(script).isFile()) throw new CliError(`no transform script at ${script}`, 1);
2837
+ const resolved = path6.resolve(script);
2838
+ const name = path6.basename(script);
2839
+ const timeoutMs = opts.timeoutMs ?? DEFAULT_TRANSFORM_TIMEOUT_MS;
2840
+ const scratch = fs6.mkdtempSync(path6.join(os2.tmpdir(), "gateway-transform-"));
2841
+ try {
2842
+ const { file, args } = command(resolved, scratch);
2843
+ const env = Object.fromEntries(Object.entries(process.env).filter(([key]) => !SCRUBBED.test(key)));
2844
+ const done = await new Promise((resolve6, reject) => {
2845
+ const child = (0, import_node_child_process2.spawn)(file, args, { cwd: path6.dirname(resolved), env, stdio: ["pipe", "pipe", "pipe"] });
2846
+ let stdout = "";
2847
+ let stderr = "";
2848
+ let timedOut = false;
2849
+ const timer = setTimeout(() => {
2850
+ timedOut = true;
2851
+ child.kill("SIGKILL");
2852
+ }, timeoutMs);
2853
+ child.stdout.setEncoding("utf8").on("data", (chunk) => stdout += chunk);
2854
+ child.stderr.setEncoding("utf8").on("data", (chunk) => stderr += chunk);
2855
+ child.on("error", (error) => {
2856
+ clearTimeout(timer);
2857
+ reject(new CliError(`${name}: cannot run ${file}: ${error.message}`, 1));
2858
+ });
2859
+ child.on("close", (code) => {
2860
+ clearTimeout(timer);
2861
+ resolve6({ code, stdout, stderr, timedOut });
2862
+ });
2863
+ child.stdin.on("error", () => void 0);
2864
+ child.stdin.end(records.map((record) => JSON.stringify(record) + "\n").join(""));
2865
+ });
2866
+ if (done.timedOut) throw new CliError(`${name} timed out after ${timeoutMs / 1e3}s${tail(done.stderr)}`, 1);
2867
+ if (done.code !== 0) throw new CliError(`${name} exited ${done.code ?? "?"}${tail(done.stderr)}`, 1);
2868
+ let value;
2869
+ try {
2870
+ value = done.stdout.trim() ? JSON.parse(done.stdout) : null;
2871
+ } catch {
2872
+ throw new CliError(`${name} printed something other than the rows document${tail(done.stderr)}`, 1);
2873
+ }
2874
+ return { rows: checkRows(value, name), stderr: done.stderr };
2875
+ } finally {
2876
+ fs6.rmSync(scratch, { recursive: true, force: true });
2877
+ }
2878
+ }
2879
+ async function transformRecords(transform, records, opts = {}) {
2880
+ if (typeof transform === "function") return { rows: checkRows(await transform(records), "transform(records)"), stderr: "" };
2881
+ return runTransform(transform, records, opts);
2882
+ }
2883
+ var import_node_child_process2, fs6, os2, path6, import_node_module, import_meta, DEFAULT_TRANSFORM_TIMEOUT_MS, NODE_SUFFIXES, PYTHON_SUFFIXES, SCRUBBED, PY_WRAPPER, NODE_WRAPPER, isObject, tail;
2884
+ var init_transform = __esm({
2885
+ "src/cli/platform/worldData/transform.ts"() {
2886
+ "use strict";
2887
+ import_node_child_process2 = require("child_process");
2888
+ fs6 = __toESM(require("fs"));
2889
+ os2 = __toESM(require("os"));
2890
+ path6 = __toESM(require("path"));
2891
+ import_node_module = require("module");
2892
+ init_router();
2893
+ import_meta = {};
2894
+ DEFAULT_TRANSFORM_TIMEOUT_MS = 12e4;
2895
+ NODE_SUFFIXES = [".ts", ".mts", ".mjs", ".js", ".cjs"];
2896
+ PYTHON_SUFFIXES = [".py"];
2897
+ SCRUBBED = /^(GATEWAY_|HTTPS?_PROXY$|ALL_PROXY$|https?_proxy$|all_proxy$)/;
2898
+ PY_WRAPPER = `
2899
+ import io, json, runpy, socket, sys
2900
+
2901
+ def _deny(*args, **kwargs):
2902
+ raise RuntimeError("network is disabled in a transform")
2903
+
2904
+ class _Denied(socket.socket):
2905
+ def __init__(self, *args, **kwargs):
2906
+ _deny()
2907
+
2908
+ socket.socket = _Denied
2909
+ socket.SocketType = _Denied
2910
+ socket.create_connection = _deny
2911
+ socket.getaddrinfo = _deny
2912
+
2913
+ text = sys.stdin.read()
2914
+ records = [json.loads(line) for line in text.splitlines() if line.strip()]
2915
+ sys.stdin = io.StringIO(text)
2916
+ captured = io.StringIO()
2917
+ real = sys.stdout
2918
+ sys.stdout = captured
2919
+ try:
2920
+ namespace = runpy.run_path(sys.argv[1], run_name="__main__")
2921
+ finally:
2922
+ sys.stdout = real
2923
+ fn = namespace.get("transform")
2924
+ if callable(fn):
2925
+ out = fn(records)
2926
+ else:
2927
+ printed = captured.getvalue().strip()
2928
+ if not printed:
2929
+ sys.stderr.write("the transform defines no transform(records) and printed nothing\\n")
2930
+ sys.exit(3)
2931
+ out = json.loads(printed)
2932
+ real.write(json.dumps(out))
2933
+ `;
2934
+ NODE_WRAPPER = `
2935
+ import { pathToFileURL } from "node:url";
2936
+ import net from "node:net";
2937
+ import tls from "node:tls";
2938
+ import http from "node:http";
2939
+ import https from "node:https";
2940
+ import dgram from "node:dgram";
2941
+
2942
+ const deny = () => { throw new Error("network is disabled in a transform"); };
2943
+ net.Socket.prototype.connect = deny;
2944
+ net.connect = deny;
2945
+ net.createConnection = deny;
2946
+ tls.connect = deny;
2947
+ http.request = deny;
2948
+ http.get = deny;
2949
+ https.request = deny;
2950
+ https.get = deny;
2951
+ dgram.createSocket = deny;
2952
+ globalThis.fetch = deny;
2953
+
2954
+ const module = await import(pathToFileURL(process.argv[2]).href);
2955
+ const fn = typeof module.transform === "function" ? module.transform : typeof module.default === "function" ? module.default : null;
2956
+ if (fn) {
2957
+ const chunks = [];
2958
+ for await (const chunk of process.stdin) chunks.push(chunk);
2959
+ const text = Buffer.concat(chunks).toString("utf8");
2960
+ const records = text.split("\\n").filter((line) => line.trim()).map((line) => JSON.parse(line));
2961
+ const out = await fn(records);
2962
+ process.stdout.write(JSON.stringify(out));
2963
+ }
2964
+ `;
2965
+ isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2966
+ tail = (stderr, lines = 12) => {
2967
+ const kept = stderr.split("\n").filter((line) => line.trim()).slice(-lines);
2968
+ return kept.length ? "\n" + kept.join("\n") : "";
2969
+ };
2970
+ }
2971
+ });
2972
+
2973
+ // src/cli/platform/worldData/batches.ts
2974
+ function uploadHeadersFor(gz) {
2975
+ return {
2976
+ "content-type": "application/gzip",
2977
+ "content-length": String(gz.length),
2978
+ "x-amz-checksum-sha256": (0, import_node_crypto5.createHash)("sha256").update(gz).digest("base64")
2979
+ };
2980
+ }
2981
+ async function forEachLimited(items, limit, fn) {
2982
+ const inFlight = /* @__PURE__ */ new Set();
2983
+ let failure = null;
2984
+ const track = (p) => {
2985
+ const wrapped = p.then(
2986
+ () => {
2987
+ inFlight.delete(wrapped);
2988
+ },
2989
+ (error) => {
2990
+ failure ??= error;
2991
+ inFlight.delete(wrapped);
2992
+ }
2993
+ );
2994
+ inFlight.add(wrapped);
2995
+ };
2996
+ for await (const item of items) {
2997
+ if (failure) break;
2998
+ track(fn(item));
2999
+ if (inFlight.size >= limit) await Promise.race(inFlight);
3000
+ }
3001
+ await Promise.all(inFlight);
3002
+ if (failure) throw failure;
3003
+ }
3004
+ async function waitForBatch(client, batchId, opts = {}) {
3005
+ const sleep2 = opts.sleep ?? client.sleep;
3006
+ let delay = opts.initialDelayMs ?? 1e3;
3007
+ let last = "";
3008
+ for (; ; ) {
3009
+ const status = await client.get(batchId);
3010
+ const phase = phaseLine(status);
3011
+ if (phase !== last) {
3012
+ opts.onPhase?.(phase);
3013
+ last = phase;
3014
+ }
3015
+ if (TERMINAL_STATES.has(status.state)) return status;
3016
+ await sleep2(delay);
3017
+ delay = Math.min(1e4, Math.round(delay * 1.5));
3018
+ }
3019
+ }
3020
+ function phaseLine(status) {
3021
+ const phase = status.progress?.phase;
3022
+ return phase ? `${status.state} (${phase})` : status.state;
3023
+ }
3024
+ var import_node_crypto5, fs7, TERMINAL_STATES, sleepMs, WorldDataApi;
3025
+ var init_batches = __esm({
3026
+ "src/cli/platform/worldData/batches.ts"() {
3027
+ "use strict";
3028
+ import_node_crypto5 = require("crypto");
3029
+ fs7 = __toESM(require("fs"));
3030
+ init_config();
3031
+ init_router();
3032
+ TERMINAL_STATES = /* @__PURE__ */ new Set(["applied", "refused", "published", "failed"]);
3033
+ sleepMs = (ms) => new Promise((resolve6) => setTimeout(resolve6, ms));
3034
+ WorldDataApi = class {
3035
+ constructor(creds, slug, sleep2 = sleepMs) {
3036
+ this.creds = creds;
3037
+ this.slug = slug;
3038
+ this.sleep = sleep2;
3039
+ this.base = `/api/public/worlds/${encodeURIComponent(slug)}/data`;
3040
+ }
3041
+ base;
3042
+ open(body) {
3043
+ return api(this.creds, "POST", `${this.base}/batches`, body);
3044
+ }
3045
+ register(batchId, chunk) {
3046
+ return api(this.creds, "POST", `${this.base}/batches/${batchId}/chunks`, {
3047
+ ordinal: chunk.ordinal,
3048
+ digest: chunk.digest,
3049
+ bytes: chunk.bytes,
3050
+ rows: chunk.rows,
3051
+ ...chunk.entity ? { entity: chunk.entity } : {}
3052
+ });
3053
+ }
3054
+ markUploaded(batchId, chunkId) {
3055
+ return api(this.creds, "POST", `${this.base}/batches/${batchId}/chunks/${chunkId}/uploaded`);
3056
+ }
3057
+ complete(batchId) {
3058
+ return api(this.creds, "POST", `${this.base}/batches/${batchId}/complete`);
3059
+ }
3060
+ get(batchId) {
3061
+ return api(this.creds, "GET", `${this.base}/batches/${batchId}`);
3062
+ }
3063
+ list(limit, cursor) {
3064
+ const params = new URLSearchParams();
3065
+ if (limit !== void 0) params.set("limit", String(limit));
3066
+ if (cursor) params.set("cursor", cursor);
3067
+ const q = params.toString();
3068
+ return api(this.creds, "GET", `${this.base}/batches${q ? `?${q}` : ""}`);
3069
+ }
3070
+ publish(message) {
3071
+ return api(this.creds, "POST", `${this.base}/publish`, message ? { message } : {});
3072
+ }
3073
+ /**
3074
+ * PUT the gzipped chunk to its presigned URL with exactly the headers the
3075
+ * URL was signed for (the platform's `uploadHeaders`; the same three when it
3076
+ * sends none), with backoff on a dropped connection or a 5xx.
3077
+ */
3078
+ async put(uploadUrl, gz, signed) {
3079
+ const headers = signed ?? uploadHeadersFor(gz);
3080
+ const delays = [500, 1500, 4e3];
3081
+ for (let attempt = 0; ; attempt++) {
3082
+ try {
3083
+ const res = await fetch(uploadUrl, { method: "PUT", body: new Uint8Array(gz), headers });
3084
+ if (res.ok) return;
3085
+ if (res.status < 500 || attempt >= delays.length) throw new CliError(`chunk upload -> ${res.status}: ${(await res.text()).slice(0, 300)}`, 1);
3086
+ } catch (error) {
3087
+ if (error instanceof CliError || attempt >= delays.length) throw error instanceof CliError ? error : new CliError(`chunk upload failed: ${error.message}`, 1);
3088
+ }
3089
+ await this.sleep(delays[attempt]);
3090
+ }
3091
+ }
3092
+ /** Register, upload unless the server already holds the content, confirm. */
3093
+ async upload(batchId, chunk) {
3094
+ const registered = await this.register(batchId, chunk);
3095
+ if (!registered.uploaded) {
3096
+ if (!registered.uploadUrl) throw new CliError(`the server registered chunk ${chunk.ordinal} without an upload URL`, 1);
3097
+ await this.put(registered.uploadUrl, chunk.gz, registered.uploadHeaders);
3098
+ await this.markUploaded(batchId, registered.chunkId);
3099
+ }
3100
+ return { ordinal: chunk.ordinal, digest: chunk.digest, bytes: chunk.bytes, rows: chunk.rows, entity: chunk.entity, chunkId: registered.chunkId, uploaded: true };
3101
+ }
3102
+ };
3103
+ }
3104
+ });
3105
+
3106
+ // src/cli/platform/worldData/chunker.ts
3107
+ function chunkLine(row, declared) {
3108
+ if (declared !== null) return dumps(row.row) + "\n";
3109
+ const tagged = /* @__PURE__ */ new Map();
3110
+ tagged.set("entity", row.entity);
3111
+ tagged.set("row", row.row);
3112
+ return dumps(tagged) + "\n";
3113
+ }
3114
+ async function* buildChunks(rows, plan) {
3115
+ let lines = [];
3116
+ let rawBytes = 0;
3117
+ let ordinal = 0;
3118
+ let seen = 0;
3119
+ const flush = () => {
3120
+ const raw = Buffer.concat(lines);
3121
+ const built = finishChunk(ordinal++, raw, lines.length, plan.entity, seen - lines.length);
3122
+ lines = [];
3123
+ rawBytes = 0;
3124
+ return built;
3125
+ };
3126
+ for await (const row of rows) {
3127
+ const line = Buffer.from(chunkLine(row, plan.entity), "utf8");
3128
+ const full = lines.length > 0 && (plan.chunkRows !== null && lines.length >= plan.chunkRows || rawBytes + line.length > plan.chunkBytes);
3129
+ if (full) yield flush();
3130
+ lines.push(line);
3131
+ rawBytes += line.length;
3132
+ seen++;
3133
+ }
3134
+ if (lines.length) yield flush();
3135
+ }
3136
+ function finishChunk(ordinal, raw, rows, entity, firstRow = 0) {
3137
+ const gz = gzipDeterministic(raw, { name: chunkName(ordinal) });
3138
+ return {
3139
+ ordinal,
3140
+ digest: (0, import_node_crypto6.createHash)("sha256").update(gz).digest("hex"),
3141
+ bytes: gz.length,
3142
+ rows,
3143
+ entity,
3144
+ rawBytes: raw.length,
3145
+ contentSha256: (0, import_node_crypto6.createHash)("sha256").update(raw).digest("hex"),
3146
+ firstRow,
3147
+ gz
3148
+ };
3149
+ }
3150
+ function gzipDeterministic(raw, opts = {}) {
3151
+ const level = opts.level ?? GZIP_LEVEL;
3152
+ const name = opts.name ? Buffer.concat([Buffer.from(opts.name, "latin1"), Buffer.from([0])]) : Buffer.alloc(0);
3153
+ const header = Buffer.from([31, 139, 8, opts.name ? 8 : 0, 0, 0, 0, 0, level === 9 ? 2 : level === 1 ? 4 : 0, 255]);
3154
+ const body = (0, import_node_zlib2.deflateRawSync)(raw, { level });
3155
+ const trailer = Buffer.alloc(8);
3156
+ trailer.writeUInt32LE(crc32(raw), 0);
3157
+ trailer.writeUInt32LE(raw.length >>> 0, 4);
3158
+ return Buffer.concat([header, name, body, trailer]);
3159
+ }
3160
+ function crc32(data) {
3161
+ if (!table) {
3162
+ table = new Uint32Array(256);
3163
+ for (let n = 0; n < 256; n++) {
3164
+ let c = n;
3165
+ for (let k = 0; k < 8; k++) c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
3166
+ table[n] = c >>> 0;
3167
+ }
3168
+ }
3169
+ let crc = 4294967295;
3170
+ for (let i = 0; i < data.length; i++) crc = table[(crc ^ data[i]) & 255] ^ crc >>> 8;
3171
+ return (crc ^ 4294967295) >>> 0;
3172
+ }
3173
+ var import_node_crypto6, import_node_zlib2, DEFAULT_CHUNK_BYTES, GZIP_LEVEL, chunkName, table;
3174
+ var init_chunker = __esm({
3175
+ "src/cli/platform/worldData/chunker.ts"() {
3176
+ "use strict";
3177
+ import_node_crypto6 = require("crypto");
3178
+ import_node_zlib2 = require("zlib");
3179
+ init_json();
3180
+ DEFAULT_CHUNK_BYTES = 64 * 1024 * 1024;
3181
+ GZIP_LEVEL = 9;
3182
+ chunkName = (ordinal) => `chunk-${String(ordinal).padStart(5, "0")}.jsonl`;
3183
+ table = null;
3184
+ }
3185
+ });
3186
+
3187
+ // src/cli/platform/worldData/push.ts
3188
+ var push_exports = {};
3189
+ __export(push_exports, {
3190
+ pushRows: () => pushRows
3191
+ });
3192
+ async function pushRows(creds, slug, rows, opts = {}) {
3193
+ const client = opts.sleep ? new WorldDataApi(creds, slug, opts.sleep) : new WorldDataApi(creds, slug);
3194
+ const opened = await client.open({
3195
+ mode: opts.mode ?? "append",
3196
+ merge: "upsert",
3197
+ ...opts.redact && opts.redact !== "off" ? { redact: opts.redact } : {},
3198
+ atomic: true,
3199
+ dryRun: Boolean(opts.dryRun),
3200
+ publish: opts.publish ?? "now",
3201
+ ...opts.message ? { message: opts.message } : {}
3202
+ });
3203
+ if (!opened.batchId) throw new Error("the platform opened no batch (no batchId in the answer)");
3204
+ const tagged = (async function* () {
3205
+ for (const [entity, listed] of Object.entries(rows))
3206
+ for (let index = 0; index < listed.length; index++)
3207
+ yield { entity, row: parseJson(JSON.stringify(listed[index])), where: `${entity}[${index}]` };
3208
+ })();
3209
+ const chunks = buildChunks(tagged, { chunkBytes: opts.chunkBytes ?? DEFAULT_CHUNK_BYTES, chunkRows: null, entity: null });
3210
+ await forEachLimited(chunks, Math.max(1, opts.parallel ?? 4), async (chunk) => {
3211
+ await client.upload(opened.batchId, chunk);
3212
+ });
3213
+ await client.complete(opened.batchId);
3214
+ return waitForBatch(client, opened.batchId, { initialDelayMs: pollMs() });
3215
+ }
3216
+ function pollMs() {
3217
+ const raw = Number(process.env.GATEWAY_WORLD_DATA_POLL_MS ?? 1e3);
3218
+ return Number.isFinite(raw) && raw >= 0 ? raw : 1e3;
3219
+ }
3220
+ var init_push = __esm({
3221
+ "src/cli/platform/worldData/push.ts"() {
3222
+ "use strict";
3223
+ init_batches();
3224
+ init_chunker();
3225
+ init_json();
3226
+ }
3227
+ });
3228
+
3229
+ // src/worlds/ingest.ts
3230
+ function parseToolCallRecord(raw) {
3231
+ const none = { record: null, skip: null };
3232
+ if (!isObject2(raw)) return { ...none, refusal: "record is not an object" };
3233
+ const kind = raw.kind;
3234
+ if (kind !== void 0 && kind !== null && kind !== "call") return { record: null, skip: `kind ${String(kind)}`, refusal: null };
3235
+ const tool = raw.tool;
3236
+ if (typeof tool !== "string" || !tool) return { ...none, refusal: "record has no tool name" };
3237
+ if (raw.error !== void 0 && raw.error !== null && raw.error !== "") return { record: null, skip: "call failed", refusal: null };
3238
+ const args = raw.args ?? {};
3239
+ if (!isObject2(args)) return { ...none, refusal: `args of ${tool} is not an object` };
3240
+ if (!("result" in raw)) return { ...none, refusal: `record of ${tool} has no result` };
3241
+ const at = raw.at ?? raw.completedAt;
3242
+ const record = { tool, args, result: raw.result };
3243
+ if (typeof at === "string") record.at = at;
3244
+ if (typeof raw.session === "string") record.session = raw.session;
3245
+ if (typeof raw.source === "string") record.source = raw.source;
3246
+ return { record, skip: null, refusal: null };
3247
+ }
3248
+ function readToolCallRecords(paths) {
3249
+ const records = [];
3250
+ for (const file of paths) records.push(...toolCallRecordsIn(fs8.readFileSync(file, "utf8"), file));
3251
+ return records;
3252
+ }
3253
+ function toolCallRecordsIn(text2, where) {
3254
+ const stripped = text2.trim();
3255
+ if (!stripped) return [];
3256
+ if (stripped.startsWith("[")) {
3257
+ const listed = JSON.parse(stripped);
3258
+ if (!Array.isArray(listed)) throw new Error(`${where} is neither a JSON array nor JSON Lines`);
3259
+ listed.forEach((item, index) => {
3260
+ if (!isObject2(item)) throw new Error(`${where}[${index}] is not an object`);
3261
+ });
3262
+ return listed;
3263
+ }
3264
+ const records = [];
3265
+ const lines = text2.split(/\r?\n/);
3266
+ for (let index = 0; index < lines.length; index++) {
3267
+ const line = lines[index];
3268
+ if (!line.trim()) continue;
3269
+ let item;
3270
+ try {
3271
+ item = JSON.parse(line);
3272
+ } catch {
3273
+ throw new Error(`${where}:${index + 1} is not JSON`);
3274
+ }
3275
+ if (!isObject2(item)) throw new Error(`${where}:${index + 1} is not an object`);
3276
+ records.push(item);
3277
+ }
3278
+ return records;
3279
+ }
3280
+ async function emit(sink, record) {
3281
+ if (Array.isArray(sink)) {
3282
+ sink.push(record);
3283
+ return;
3284
+ }
3285
+ if (typeof sink === "string") {
3286
+ fs8.appendFileSync(sink, JSON.stringify(record) + "\n");
3287
+ return;
3288
+ }
3289
+ if (typeof sink === "function") {
3290
+ await sink(record);
3291
+ return;
3292
+ }
3293
+ throw new TypeError("sink must be an array, a file path, or a function");
3294
+ }
3295
+ function captureToolCalls(tools, sink, opts = {}) {
3296
+ const wrapped = /* @__PURE__ */ Object.create(null);
3297
+ for (const [name, fn] of Object.entries(tools)) {
3298
+ wrapped[name] = async (args = {}) => {
3299
+ const record = { tool: name, args, at: (/* @__PURE__ */ new Date()).toISOString() };
3300
+ if (opts.session) record.session = opts.session;
3301
+ if (opts.source) record.source = opts.source;
3302
+ let result;
3303
+ try {
3304
+ result = await fn(args);
3305
+ } catch (error) {
3306
+ record.error = error instanceof Error ? error.message || error.name : String(error);
3307
+ await emit(sink, record);
3308
+ throw error;
3309
+ }
3310
+ record.result = result;
3311
+ await emit(sink, record);
3312
+ return result;
3313
+ };
3314
+ }
3315
+ return wrapped;
3316
+ }
3317
+ function jsonish(value) {
3318
+ if (typeof value !== "string") return value;
3319
+ try {
3320
+ return JSON.parse(value);
3321
+ } catch {
3322
+ return value;
3323
+ }
3324
+ }
3325
+ function toolCallsFromObservations(observations, opts = {}) {
3326
+ const known = opts.tools ? new Set(opts.tools) : null;
3327
+ const sinceMs = opts.since ? Date.parse(opts.since) : NaN;
3328
+ const out = { records: [], unknownTools: {}, skipped: {} };
3329
+ const skip = (reason) => {
3330
+ out.skipped[reason] = (out.skipped[reason] ?? 0) + 1;
3331
+ };
3332
+ for (const observation of observations) {
3333
+ if (observation.type !== "TOOL") {
3334
+ skip(`type ${observation.type ?? "unknown"}`);
3335
+ continue;
3336
+ }
3337
+ const tool = observation.name;
3338
+ if (typeof tool !== "string" || !tool) {
3339
+ skip("no name");
3340
+ continue;
3341
+ }
3342
+ const at = isoOf(observation.startTime);
3343
+ if (!Number.isNaN(sinceMs) && at !== void 0 && Date.parse(at) < sinceMs) {
3344
+ skip("before since");
3345
+ continue;
3346
+ }
3347
+ if (known && !known.has(tool)) {
3348
+ out.unknownTools[tool] = (out.unknownTools[tool] ?? 0) + 1;
3349
+ continue;
3350
+ }
3351
+ const input = jsonish(observation.input);
3352
+ const record = { tool, args: isObject2(input) ? input : {} };
3353
+ if (observation.level === "ERROR") record.error = observation.statusMessage || "ERROR";
3354
+ else record.result = jsonish(observation.output);
3355
+ if (at !== void 0) record.at = at;
3356
+ if (opts.session) record.session = opts.session;
3357
+ record.source = `trace:${observation.traceId ?? "?"}/${observation.id ?? "?"}`;
3358
+ out.records.push(record);
3359
+ }
3360
+ return out;
3361
+ }
3362
+ function credentialsOf(options) {
3363
+ const host = (options.host ?? process.env.GATEWAY_HOST ?? "https://withgateway.ai").replace(/\/+$/, "");
3364
+ const publicKey = options.publicKey ?? process.env.GATEWAY_PUBLIC_KEY;
3365
+ const secretKey = options.secretKey ?? process.env.GATEWAY_SECRET_KEY;
3366
+ return publicKey && secretKey ? { host, publicKey, secretKey } : null;
3367
+ }
3368
+ async function ingest(world, records, options = {}) {
3369
+ const { ingestLocalToolCalls: ingestLocalToolCalls2, importLocalWorldData: importLocalWorldData2, checkLocalWorldData: checkLocalWorldData2 } = await Promise.resolve().then(() => (init_data(), data_exports));
3370
+ if (options.transform !== void 0 && options.map !== void 0) throw new Error("records go through one of transform, map");
3371
+ const redact = options.redact ?? "off";
3372
+ const mode = options.mode ?? "append";
3373
+ const dryRun = Boolean(options.dryRun);
3374
+ const creds = credentialsOf(options);
3375
+ const local = fs8.existsSync(world) && fs8.statSync(world).isDirectory();
3376
+ const map = options.map === void 0 ? void 0 : options.map;
3377
+ let rows = null;
3378
+ let stderr = "";
3379
+ if (options.transform !== void 0) {
3380
+ const { transformRecords: transformRecords2 } = await Promise.resolve().then(() => (init_transform(), transform_exports));
3381
+ ({ rows, stderr } = await transformRecords2(options.transform, records, { timeoutMs: options.timeoutMs }));
3382
+ }
3383
+ if (local) {
3384
+ if (rows === null) return reportOf(world, await ingestLocalToolCalls2(world, records, { redact, dryRun, mode, map }, creds), redact);
3385
+ const landed = dryRun ? await checkLocalWorldData2(world, rows, creds, { redact }) : await importLocalWorldData2(world, rows, { mode, redact }, creds);
3386
+ return transformReport(world, records.length, rows, stderr, { dryRun, redact, changed: !dryRun && landed.changed, kind: landed.kind, entityCounts: landed.entity_counts });
3387
+ }
3388
+ if (!creds) throw new Error("Gateway keys missing: set GATEWAY_PUBLIC_KEY / GATEWAY_SECRET_KEY (or pass publicKey/secretKey).");
3389
+ const { pull: pull2 } = await Promise.resolve().then(() => (init_hub(), hub_exports));
3390
+ const slug = world.split("@", 1)[0];
3391
+ const scratch = fs8.mkdtempSync(path7.join(os3.tmpdir(), "gateway-ingest-"));
3392
+ try {
3393
+ const pulled = await pull2(world, path7.join(scratch, slug), options);
3394
+ let report;
3395
+ let projected;
3396
+ if (rows === null) {
3397
+ const proven = await ingestLocalToolCalls2(pulled.dir, records, { redact: "off", dryRun: true, mode, map }, creds);
3398
+ report = reportOf(world, proven, redact);
3399
+ projected = proven.projected ?? {};
3400
+ } else {
3401
+ const proven = await checkLocalWorldData2(pulled.dir, rows, creds);
3402
+ report = transformReport(world, records.length, rows, stderr, { dryRun, redact, changed: false, kind: proven.kind, entityCounts: proven.entity_counts });
3403
+ projected = rows;
3404
+ }
3405
+ report.dryRun = dryRun;
3406
+ if (dryRun || report.refusals.length || !Object.keys(projected).length) return report;
3407
+ const { pushRows: pushRows2 } = await Promise.resolve().then(() => (init_push(), push_exports));
3408
+ const status = await pushRows2(creds, slug, projected, { mode, redact, message: options.message });
3409
+ report.batch = status;
3410
+ report.changed = status.state === "applied" || status.state === "published";
3411
+ if (status.entityCounts) report.entityCounts = status.entityCounts;
3412
+ return report;
3413
+ } finally {
3414
+ fs8.rmSync(scratch, { recursive: true, force: true });
3415
+ }
3416
+ }
3417
+ async function ingestToolCalls(world, records, options = {}) {
3418
+ return ingest(world, records, options);
3419
+ }
3420
+ function transformReport(world, records, rows, stderr, outcome) {
3421
+ return {
3422
+ world,
3423
+ via: "transform",
3424
+ ...stderr ? { stderr } : {},
3425
+ records,
3426
+ ingested: records,
3427
+ skipped: {},
3428
+ refusals: [],
3429
+ rows: Object.fromEntries(Object.entries(rows).map(([entity, listed]) => [entity, listed.length])),
3430
+ dryRun: outcome.dryRun,
3431
+ redact: outcome.redact,
3432
+ changed: outcome.changed,
3433
+ ...outcome.kind ? { kind: outcome.kind } : {},
3434
+ ...outcome.entityCounts ? { entityCounts: outcome.entityCounts } : {}
3435
+ };
3436
+ }
3437
+ function reportOf(world, local, redact) {
3438
+ return {
3439
+ world,
3440
+ ...local.via ? { via: local.via } : {},
3441
+ ...local.sources ? { sources: local.sources.map(({ unmapped_fields, unset_fields, ...rest }) => ({ ...rest, unmappedFields: unmapped_fields, unsetFields: unset_fields })) } : {},
3442
+ ...local.unmatched ? { unmatched: local.unmatched } : {},
3443
+ ...local.note ? { note: local.note } : {},
3444
+ records: local.records,
3445
+ ingested: local.ingested,
3446
+ skipped: local.skipped,
3447
+ refusals: local.refusals,
3448
+ rows: local.rows,
3449
+ dryRun: local.dry_run,
3450
+ redact,
3451
+ changed: local.changed,
3452
+ ...local.kind ? { kind: local.kind } : {},
3453
+ ...local.entity_counts ? { entityCounts: local.entity_counts } : {}
3454
+ };
3455
+ }
3456
+ async function sessionToolObservations(sessionId, options = {}) {
3457
+ const session = await apiRequest(
3458
+ options,
3459
+ "GET",
3460
+ `/api/public/sessions/${encodeURIComponent(sessionId)}?includeIO=true`
3461
+ );
3462
+ const out = [];
3463
+ for (const trace of session.traces ?? [])
3464
+ for (const observation of trace.observations ?? []) out.push({ traceId: trace.id ?? null, ...observation });
3465
+ return out;
3466
+ }
3467
+ var fs8, os3, path7, isObject2, isoOf;
3468
+ var init_ingest = __esm({
3469
+ "src/worlds/ingest.ts"() {
3470
+ "use strict";
3471
+ fs8 = __toESM(require("fs"));
3472
+ os3 = __toESM(require("os"));
3473
+ path7 = __toESM(require("path"));
3474
+ init_worlds();
3475
+ isObject2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
3476
+ isoOf = (value) => value instanceof Date ? value.toISOString() : typeof value === "string" ? value : void 0;
3477
+ }
3478
+ });
3479
+
3480
+ // src/worlds/index.ts
3481
+ var worlds_exports = {};
3482
+ __export(worlds_exports, {
3483
+ BrowserActionRecorder: () => BrowserActionRecorder,
3484
+ COMPUTER_USE_SPECS: () => COMPUTER_USE_SPECS,
3485
+ DEFAULT_BRANCH: () => DEFAULT_BRANCH,
3486
+ DEFAULT_VIEWPORT: () => DEFAULT_VIEWPORT,
3487
+ EVENT_BATCH_SIZE: () => EVENT_BATCH_SIZE,
3488
+ EVENT_FLUSH_INTERVAL_MS: () => EVENT_FLUSH_INTERVAL_MS,
3489
+ EVENT_MAX_RETRIES: () => EVENT_MAX_RETRIES,
3490
+ STRIP_PREFIX: () => STRIP_PREFIX,
3491
+ SURFACE_KINDS: () => SURFACE_KINDS,
3492
+ TRANSFORMS: () => TRANSFORMS,
3493
+ WHITESPACE: () => WHITESPACE,
3494
+ WorldBrowser: () => WorldBrowser,
3495
+ WorldSession: () => WorldSession,
3496
+ WorldSessionCallError: () => WorldSessionCallError,
3497
+ WorldSessionTimeout: () => WorldSessionTimeout,
3498
+ WorldSet: () => WorldSet,
3499
+ WorldSurfaceUnavailable: () => WorldSurfaceUnavailable,
3500
+ WorldTask: () => WorldTask,
3501
+ apiRequest: () => apiRequest,
3502
+ applyTransforms: () => applyTransforms,
3503
+ attachSession: () => attachSession,
3504
+ buildSourceTarball: () => buildSourceTarball,
3505
+ captureToolCalls: () => captureToolCalls,
3506
+ collectArchiveRelPaths: () => collectArchiveRelPaths,
3507
+ computeContentHash: () => computeContentHash,
3508
+ computerUseToolkit: () => computerUseToolkit,
3509
+ createRef: () => createRef,
3510
+ createTask: () => createTask,
3511
+ deleteEnvSecret: () => deleteEnvSecret,
3512
+ deleteTask: () => deleteTask,
3513
+ describeWorld: () => describeWorld,
3514
+ detectProvenance: () => detectProvenance,
3515
+ getRun: () => getRun,
3516
+ getTask: () => getTask,
3517
+ hashForm: () => hashForm,
3518
+ ingest: () => ingest,
3519
+ ingestToolCalls: () => ingestToolCalls,
3520
+ isIncludedInContentHash: () => isIncludedInContentHash,
3521
+ isTaskIdRef: () => isTaskIdRef,
3522
+ isTaskSpec: () => isTaskSpec,
3523
+ listEnvSecretKeys: () => listEnvSecretKeys,
3524
+ listRunConfigs: () => listRunConfigs,
3525
+ listTasks: () => listTasks,
3526
+ localTreeState: () => localTreeState,
3527
+ migrateProjectWorlds: () => migrateProjectWorlds,
3528
+ migrateWorld: () => migrateWorld,
3529
+ openBrowser: () => openBrowser,
3530
+ openSession: () => openSession,
3531
+ openWorld: () => openWorld,
3532
+ parseToolCallRecord: () => parseToolCallRecord,
3533
+ parseTransform: () => parseTransform,
3534
+ parseWorldTaskRefs: () => parseWorldTaskRefs,
3535
+ preserveForm: () => preserveForm,
3536
+ propose: () => propose,
3537
+ pull: () => pull,
3538
+ push: () => push,
3539
+ pyText: () => pyText,
3540
+ queryRows: () => queryRows,
3541
+ queryRowsSearch: () => queryRowsSearch,
3542
+ readLocalMeta: () => readLocalMeta,
3543
+ readToolCallRecords: () => readToolCallRecords,
3544
+ redactActionArgs: () => redactActionArgs,
3545
+ redactionOf: () => redactionOf,
3546
+ resolveBrowserMode: () => resolveBrowserMode,
3547
+ roundForm: () => roundForm,
3548
+ runSessions: () => runSessions,
3549
+ schemaFromSignature: () => schemaFromSignature,
3550
+ sessionToolObservations: () => sessionToolObservations,
3551
+ setEnvSecret: () => setEnvSecret,
3552
+ shapeText: () => shapeText,
3553
+ snapshotTreeHashes: () => snapshotTreeHashes,
3554
+ storedForms: () => storedForms,
3555
+ surfaceKinds: () => surfaceKinds,
3556
+ taskLabel: () => taskLabel,
3557
+ toolCallRecordsIn: () => toolCallRecordsIn,
3558
+ toolCallsFromObservations: () => toolCallsFromObservations,
3559
+ uiEntryUrl: () => uiEntryUrl,
3560
+ uiUrl: () => uiUrl,
3561
+ updateTask: () => updateTask,
3562
+ upsertRunConfig: () => upsertRunConfig,
3563
+ validateTask: () => validateTask,
3564
+ validateWorld: () => validateWorld,
3565
+ waitForRun: () => waitForRun,
3566
+ withoutUiToken: () => withoutUiToken,
3567
+ writeLocalMeta: () => writeLocalMeta
912
3568
  });
913
3569
  module.exports = __toCommonJS(worlds_exports);
914
3570
  function resolveEnv(options) {
@@ -922,9 +3578,9 @@ function resolveEnv(options) {
922
3578
  }
923
3579
  return { host: host.replace(/\/+$/, ""), publicKey, secretKey };
924
3580
  }
925
- async function apiRequest(options, method, path2, body) {
3581
+ async function apiRequest(options, method, path8, body) {
926
3582
  const { host, publicKey, secretKey } = resolveEnv(options);
927
- const res = await fetch(`${host}${path2}`, {
3583
+ const res = await fetch(`${host}${path8}`, {
928
3584
  method,
929
3585
  headers: {
930
3586
  "content-type": "application/json",
@@ -932,13 +3588,13 @@ async function apiRequest(options, method, path2, body) {
932
3588
  },
933
3589
  ...body === void 0 ? {} : { body: JSON.stringify(body) }
934
3590
  });
935
- const text = await res.text();
3591
+ const text2 = await res.text();
936
3592
  if (!res.ok) {
937
3593
  throw new Error(
938
- `${method} ${path2} -> ${res.status}: ${text.slice(0, 400)}`
3594
+ `${method} ${path8} -> ${res.status}: ${text2.slice(0, 400)}`
939
3595
  );
940
3596
  }
941
- return JSON.parse(text);
3597
+ return JSON.parse(text2);
942
3598
  }
943
3599
  async function setEnvSecret(slug, key, value, options = {}) {
944
3600
  return apiRequest(
@@ -979,6 +3635,28 @@ async function listRunConfigs(options = {}) {
979
3635
  );
980
3636
  return res.runConfigs;
981
3637
  }
3638
+ async function upsertRunConfig(input, options = {}) {
3639
+ return apiRequest(
3640
+ options,
3641
+ "POST",
3642
+ "/api/public/benchmark-containers/run-configs",
3643
+ input
3644
+ );
3645
+ }
3646
+ function parseWorldTaskRefs(spec) {
3647
+ const items = (Array.isArray(spec) ? spec : spec.split(",")).map((s) => s.trim()).filter(Boolean);
3648
+ return items.map((item) => {
3649
+ const at = item.lastIndexOf("@");
3650
+ if (at < 0) return { id: item };
3651
+ const id = item.slice(0, at);
3652
+ const version = Number(item.slice(at + 1));
3653
+ if (!id || !Number.isInteger(version) || version < 1)
3654
+ throw new Error(
3655
+ `stored task ref '${item}' is not <id> or <id>@<version> (version a positive integer)`
3656
+ );
3657
+ return { id, version };
3658
+ });
3659
+ }
982
3660
  async function getRun(runId, options = {}) {
983
3661
  return apiRequest(
984
3662
  options,
@@ -997,7 +3675,7 @@ async function waitForRun(runId, opts = {}) {
997
3675
  );
998
3676
  opts.onTick?.(run);
999
3677
  await new Promise(
1000
- (resolve2) => setTimeout(resolve2, (opts.intervalSeconds ?? 20) * 1e3)
3678
+ (resolve6) => setTimeout(resolve6, (opts.intervalSeconds ?? 20) * 1e3)
1001
3679
  );
1002
3680
  }
1003
3681
  }
@@ -1071,8 +3749,16 @@ var WorldTask, WorldSet;
1071
3749
  var init_worlds = __esm({
1072
3750
  "src/worlds/index.ts"() {
1073
3751
  init_session();
3752
+ init_tasks();
3753
+ init_browser();
1074
3754
  init_hub();
1075
3755
  init_validate();
3756
+ init_describe();
3757
+ init_redaction();
3758
+ init_transforms();
3759
+ init_query();
3760
+ init_migrate();
3761
+ init_ingest();
1076
3762
  WorldTask = class {
1077
3763
  constructor(world, name, variant) {
1078
3764
  this.world = world;
@@ -1100,15 +3786,18 @@ var init_worlds = __esm({
1100
3786
  return hit;
1101
3787
  }
1102
3788
  /**
1103
- * Open a LIVE session against one of this world's tasks: the platform boots
1104
- * (or reuses) a warm container, and your agent calls its tools through the
1105
- * platform. See worlds/session.ts.
3789
+ * Open a LIVE session against one of this world's tasks — a bundled task's
3790
+ * name or an inline `WorldTaskSpec`: the platform boots (or reuses) a warm
3791
+ * container, and your agent calls its tools through the platform. See
3792
+ * worlds/session.ts.
1106
3793
  */
1107
3794
  async open(task, opts = {}) {
1108
3795
  const { openSession: openSession2 } = await Promise.resolve().then(() => (init_session(), session_exports));
1109
- return openSession2(this.slug, task, {
3796
+ return openSession2(this.slug, {
3797
+ task,
1110
3798
  versionId: this.version.versionId,
1111
3799
  reuseWarm: opts.reuseWarm,
3800
+ surfaces: opts.surfaces,
1112
3801
  options: this.options
1113
3802
  });
1114
3803
  }
@@ -1137,37 +3826,90 @@ var init_worlds = __esm({
1137
3826
  init_worlds();
1138
3827
  // Annotate the CommonJS export names for ESM import in node:
1139
3828
  0 && (module.exports = {
3829
+ BrowserActionRecorder,
3830
+ COMPUTER_USE_SPECS,
1140
3831
  DEFAULT_BRANCH,
3832
+ DEFAULT_VIEWPORT,
3833
+ EVENT_BATCH_SIZE,
3834
+ EVENT_FLUSH_INTERVAL_MS,
3835
+ EVENT_MAX_RETRIES,
3836
+ STRIP_PREFIX,
3837
+ SURFACE_KINDS,
3838
+ TRANSFORMS,
3839
+ WHITESPACE,
3840
+ WorldBrowser,
1141
3841
  WorldSession,
1142
3842
  WorldSessionCallError,
1143
3843
  WorldSessionTimeout,
1144
3844
  WorldSet,
3845
+ WorldSurfaceUnavailable,
1145
3846
  WorldTask,
1146
3847
  apiRequest,
3848
+ applyTransforms,
1147
3849
  attachSession,
1148
3850
  buildSourceTarball,
3851
+ captureToolCalls,
1149
3852
  collectArchiveRelPaths,
1150
3853
  computeContentHash,
3854
+ computerUseToolkit,
1151
3855
  createRef,
3856
+ createTask,
1152
3857
  deleteEnvSecret,
3858
+ deleteTask,
3859
+ describeWorld,
1153
3860
  detectProvenance,
1154
3861
  getRun,
3862
+ getTask,
3863
+ hashForm,
3864
+ ingest,
3865
+ ingestToolCalls,
1155
3866
  isIncludedInContentHash,
3867
+ isTaskIdRef,
3868
+ isTaskSpec,
1156
3869
  listEnvSecretKeys,
1157
3870
  listRunConfigs,
3871
+ listTasks,
1158
3872
  localTreeState,
3873
+ migrateProjectWorlds,
3874
+ migrateWorld,
3875
+ openBrowser,
1159
3876
  openSession,
1160
3877
  openWorld,
3878
+ parseToolCallRecord,
3879
+ parseTransform,
3880
+ parseWorldTaskRefs,
3881
+ preserveForm,
1161
3882
  propose,
1162
3883
  pull,
1163
3884
  push,
3885
+ pyText,
3886
+ queryRows,
3887
+ queryRowsSearch,
1164
3888
  readLocalMeta,
3889
+ readToolCallRecords,
3890
+ redactActionArgs,
3891
+ redactionOf,
3892
+ resolveBrowserMode,
3893
+ roundForm,
1165
3894
  runSessions,
1166
3895
  schemaFromSignature,
3896
+ sessionToolObservations,
1167
3897
  setEnvSecret,
3898
+ shapeText,
1168
3899
  snapshotTreeHashes,
3900
+ storedForms,
3901
+ surfaceKinds,
3902
+ taskLabel,
3903
+ toolCallRecordsIn,
3904
+ toolCallsFromObservations,
3905
+ uiEntryUrl,
3906
+ uiUrl,
3907
+ updateTask,
3908
+ upsertRunConfig,
3909
+ validateTask,
1169
3910
  validateWorld,
1170
3911
  waitForRun,
3912
+ withoutUiToken,
1171
3913
  writeLocalMeta
1172
3914
  });
1173
3915
  //# sourceMappingURL=index.js.map