@opengeni/contracts 3.1.0-canary.2 → 3.1.2

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 (429) hide show
  1. package/dist/agent-authored-durable-text.d.ts +9 -9
  2. package/dist/agent-config.d.ts +971 -0
  3. package/dist/agent-instruction-changes.d.ts +0 -2
  4. package/dist/allowance-refusal.d.ts +9 -0
  5. package/dist/allowance-refusal.js +50 -0
  6. package/dist/allowance-refusal.js.map +1 -0
  7. package/dist/analytics-consent-report.d.ts +19 -0
  8. package/dist/analytics-consent-report.js +10 -0
  9. package/dist/analytics-consent-report.js.map +1 -0
  10. package/dist/api-key-presets.d.ts +19 -0
  11. package/dist/artifact-catalog.d.ts +188 -0
  12. package/dist/artifacts.d.ts +86 -0
  13. package/dist/atlassian-native-retirement.d.ts +16 -0
  14. package/dist/atlassian-native-retirement.js +30 -0
  15. package/dist/atlassian-native-retirement.js.map +1 -0
  16. package/dist/atlassian.d.ts +1 -0
  17. package/dist/atlassian.js +34 -19
  18. package/dist/browser-storage.d.ts +5 -0
  19. package/dist/browser-storage.js +9 -0
  20. package/dist/browser-storage.js.map +1 -0
  21. package/dist/bundled-skills.d.ts +24 -1
  22. package/dist/canonical-human-identities.js +2 -1
  23. package/dist/chunk-2ZIHHL72.js +153 -0
  24. package/dist/chunk-2ZIHHL72.js.map +1 -0
  25. package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
  26. package/dist/chunk-4JGHSSB7.js +11 -0
  27. package/dist/chunk-4JGHSSB7.js.map +1 -0
  28. package/dist/chunk-4QO6GJUX.js +85 -0
  29. package/dist/chunk-4QO6GJUX.js.map +1 -0
  30. package/dist/chunk-4VDMHLLL.js +49 -0
  31. package/dist/chunk-4VDMHLLL.js.map +1 -0
  32. package/dist/chunk-56SNIMDO.js +9 -0
  33. package/dist/chunk-56SNIMDO.js.map +1 -0
  34. package/dist/chunk-6C2HKFTU.js +207 -0
  35. package/dist/chunk-6C2HKFTU.js.map +1 -0
  36. package/dist/chunk-6IXO76Z6.js +72 -0
  37. package/dist/chunk-6IXO76Z6.js.map +1 -0
  38. package/dist/chunk-7272KVWZ.js +60 -0
  39. package/dist/chunk-7272KVWZ.js.map +1 -0
  40. package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
  41. package/dist/chunk-E3GGUBHS.js.map +1 -0
  42. package/dist/chunk-EFZYKUE2.js +767 -0
  43. package/dist/chunk-EFZYKUE2.js.map +1 -0
  44. package/dist/chunk-EKWNTOG3.js +154 -0
  45. package/dist/chunk-EKWNTOG3.js.map +1 -0
  46. package/dist/chunk-HABQ7ADB.js +234 -0
  47. package/dist/chunk-HABQ7ADB.js.map +1 -0
  48. package/dist/chunk-HRRU4QPI.js +91 -0
  49. package/dist/chunk-HRRU4QPI.js.map +1 -0
  50. package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
  51. package/dist/chunk-IK36LXKC.js.map +1 -0
  52. package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
  53. package/dist/chunk-ILJ72KPO.js.map +1 -0
  54. package/dist/chunk-J4HQ3UKY.js +93 -0
  55. package/dist/chunk-J4HQ3UKY.js.map +1 -0
  56. package/dist/chunk-KHHZTBP7.js +11 -0
  57. package/dist/chunk-KHHZTBP7.js.map +1 -0
  58. package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
  59. package/dist/chunk-LZ2LAHIX.js.map +1 -0
  60. package/dist/chunk-NDZHPTCL.js +400 -0
  61. package/dist/chunk-NDZHPTCL.js.map +1 -0
  62. package/dist/chunk-OF6OKOBF.js +54793 -0
  63. package/dist/chunk-OF6OKOBF.js.map +1 -0
  64. package/dist/chunk-OL23ARTF.js +94 -0
  65. package/dist/chunk-OL23ARTF.js.map +1 -0
  66. package/dist/chunk-PUIUXIOL.js +189 -0
  67. package/dist/chunk-PUIUXIOL.js.map +1 -0
  68. package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
  69. package/dist/chunk-RMWXDZEO.js.map +1 -0
  70. package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
  71. package/dist/chunk-SHO4YO4B.js.map +1 -0
  72. package/dist/chunk-SWRN2DJ3.js +153 -0
  73. package/dist/chunk-SWRN2DJ3.js.map +1 -0
  74. package/dist/chunk-TCXCRBPF.js +267 -0
  75. package/dist/chunk-TCXCRBPF.js.map +1 -0
  76. package/dist/chunk-TLU3UEMD.js +324 -0
  77. package/dist/chunk-TLU3UEMD.js.map +1 -0
  78. package/dist/chunk-TSWWZMUS.js +186 -0
  79. package/dist/chunk-TSWWZMUS.js.map +1 -0
  80. package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
  81. package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
  82. package/dist/chunk-XDLAGX66.js +127 -0
  83. package/dist/chunk-XDLAGX66.js.map +1 -0
  84. package/dist/chunk-YKZ4WU4P.js +33 -0
  85. package/dist/chunk-YKZ4WU4P.js.map +1 -0
  86. package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
  87. package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
  88. package/dist/chunk-ZDCRWCGZ.js.map +1 -0
  89. package/dist/claude-provider-account-authority.d.ts +18 -0
  90. package/dist/claude-subscription-oauth.d.ts +42 -0
  91. package/dist/claude-subscription-usage.d.ts +159 -0
  92. package/dist/client-error-report.d.ts +158 -0
  93. package/dist/client-error-report.js +164 -0
  94. package/dist/client-error-report.js.map +1 -0
  95. package/dist/code-search.d.ts +52 -0
  96. package/dist/code-search.js +40 -0
  97. package/dist/code-search.js.map +1 -0
  98. package/dist/codex-provider-account-authority.js +20 -12
  99. package/dist/codex-provider-account-authority.js.map +1 -1
  100. package/dist/company-profile.d.ts +144 -6
  101. package/dist/connect.d.ts +37 -0
  102. package/dist/connect.js +216 -159
  103. package/dist/connect.js.map +1 -1
  104. package/dist/connection-account-label.d.ts +2 -0
  105. package/dist/connection-account-label.js +35 -0
  106. package/dist/connection-account-label.js.map +1 -0
  107. package/dist/connection-authority.d.ts +9 -317
  108. package/dist/connection-authority.js +37 -42
  109. package/dist/connector-attachments.js +2 -1
  110. package/dist/connector-destinations.js +2 -1
  111. package/dist/connector-tool-permissions.d.ts +137 -0
  112. package/dist/cua-desktop-tools.d.ts +17 -0
  113. package/dist/define-schema.d.ts +8 -0
  114. package/dist/direct-model-provider.d.ts +36 -0
  115. package/dist/editable-artifact-codec-registry.js +5 -5
  116. package/dist/editable-artifact-committed-transaction.js +3 -2
  117. package/dist/editable-artifact-live.js +5 -5
  118. package/dist/editable-artifact-serialized-commit.js +6 -6
  119. package/dist/editable-artifact-versions.d.ts +7 -1
  120. package/dist/editable-artifact-versions.js +1 -1
  121. package/dist/editable-artifacts.js +62 -56
  122. package/dist/event-preview.d.ts +22 -0
  123. package/dist/external-identities.d.ts +138 -0
  124. package/dist/external-identities.js +9 -4
  125. package/dist/first-party-tool-authorization.d.ts +815 -0
  126. package/dist/github-repository-contracts.js +60 -43
  127. package/dist/github-repository-contracts.js.map +1 -1
  128. package/dist/google-drive.d.ts +2 -1
  129. package/dist/google-drive.js +305 -238
  130. package/dist/google-drive.js.map +1 -1
  131. package/dist/host-mcp-bindings.d.ts +5 -0
  132. package/dist/host-mcp-bindings.js +233 -170
  133. package/dist/host-mcp-bindings.js.map +1 -1
  134. package/dist/image-generation.d.ts +1 -0
  135. package/dist/index.d.ts +16761 -5946
  136. package/dist/index.js +1973 -260
  137. package/dist/insights-usage.d.ts +877 -0
  138. package/dist/insights-usage.js +559 -0
  139. package/dist/insights-usage.js.map +1 -0
  140. package/dist/interaction.d.ts +1176 -829
  141. package/dist/knowledge-entries.d.ts +81 -2
  142. package/dist/knowledge-preparation.d.ts +239 -0
  143. package/dist/managed-auth-session-sets.d.ts +7 -0
  144. package/dist/managed-auth-session-sets.js +198 -132
  145. package/dist/managed-auth-session-sets.js.map +1 -1
  146. package/dist/managed-sign-in-methods.d.ts +56 -0
  147. package/dist/managed-sign-in-methods.js +64 -0
  148. package/dist/managed-sign-in-methods.js.map +1 -0
  149. package/dist/mcp-catalog-limits.d.ts +2 -0
  150. package/dist/mcp-oauth.d.ts +2 -2
  151. package/dist/mcp-structured-content.d.ts +25 -0
  152. package/dist/modal-native-proof-v2.d.ts +587 -0
  153. package/dist/modal-native-proof-v2.js +38 -0
  154. package/dist/modal-native-proof-v2.js.map +1 -0
  155. package/dist/model-account-choice.d.ts +235 -0
  156. package/dist/model-account-settings.d.ts +422 -0
  157. package/dist/model-availability.d.ts +15 -0
  158. package/dist/model-connection-access.d.ts +13 -0
  159. package/dist/model-context-inspector.d.ts +98 -0
  160. package/dist/model-display.d.ts +43 -0
  161. package/dist/model-display.js +17 -0
  162. package/dist/model-display.js.map +1 -0
  163. package/dist/model-picker-order.d.ts +3 -1
  164. package/dist/model-picker-order.js +3 -0
  165. package/dist/model-picker-order.js.map +1 -1
  166. package/dist/organization-access.d.ts +412 -0
  167. package/dist/organization-access.js +39 -0
  168. package/dist/organization-access.js.map +1 -0
  169. package/dist/organization-integration-policy.d.ts +27 -0
  170. package/dist/organization-membership-lifecycle.d.ts +38 -0
  171. package/dist/organization-model-usage.d.ts +146 -0
  172. package/dist/organization-model-usage.js +78 -0
  173. package/dist/organization-model-usage.js.map +1 -0
  174. package/dist/organization-recovery.js +2 -1
  175. package/dist/organization-usage.d.ts +138 -0
  176. package/dist/permissions.d.ts +18 -0
  177. package/dist/personal-github.d.ts +1 -0
  178. package/dist/personal-github.js +199 -144
  179. package/dist/personal-github.js.map +1 -1
  180. package/dist/prepared-mcp-setup.d.ts +54 -0
  181. package/dist/prepared-mcp-setup.js +12 -0
  182. package/dist/prepared-mcp-setup.js.map +1 -0
  183. package/dist/product-analytics.d.ts +116 -0
  184. package/dist/product-lifecycle-facts.d.ts +73 -0
  185. package/dist/remember.d.ts +98 -6
  186. package/dist/retained-output.d.ts +8 -0
  187. package/dist/sandbox-file-artifacts.d.ts +1 -0
  188. package/dist/sandbox-provider-command.d.ts +91 -1
  189. package/dist/sandbox-recovery.d.ts +146 -0
  190. package/dist/secret-generator.d.ts +44 -0
  191. package/dist/secret-references.d.ts +90 -0
  192. package/dist/secret-resolution.d.ts +111 -0
  193. package/dist/secret-totp.d.ts +41 -0
  194. package/dist/session-final-reply.d.ts +6 -0
  195. package/dist/session-final-reply.js +9 -0
  196. package/dist/session-final-reply.js.map +1 -0
  197. package/dist/session-goal-reports.d.ts +21 -0
  198. package/dist/session-history-import.d.ts +1272 -0
  199. package/dist/session-list-entries.d.ts +4 -0
  200. package/dist/session-list-entries.js +56 -0
  201. package/dist/session-list-entries.js.map +1 -0
  202. package/dist/session-mcp-projections.d.ts +6 -0
  203. package/dist/session-mcp-tool-permissions.d.ts +62 -0
  204. package/dist/session-message-search.d.ts +68 -0
  205. package/dist/session-target.d.ts +18 -0
  206. package/dist/session-titles.d.ts +8 -0
  207. package/dist/session-titles.js +5 -1
  208. package/dist/session-usage-limit-refusal.d.ts +34 -0
  209. package/dist/session-usage-limit-refusal.js +15 -0
  210. package/dist/session-usage-limit-refusal.js.map +1 -0
  211. package/dist/session-usage-limits.d.ts +127 -0
  212. package/dist/session-usage-limits.js +41 -0
  213. package/dist/session-usage-limits.js.map +1 -0
  214. package/dist/signup-attribution.d.ts +39 -0
  215. package/dist/site-data.d.ts +286 -0
  216. package/dist/site-operations.d.ts +39 -0
  217. package/dist/site-publishing.d.ts +778 -0
  218. package/dist/site-session-http.d.ts +89 -4
  219. package/dist/site-session-http.js +25 -1
  220. package/dist/site-sql.d.ts +421 -0
  221. package/dist/skill-catalog-context.d.ts +7 -0
  222. package/dist/skill-files.d.ts +1 -1
  223. package/dist/skill-use.d.ts +61 -0
  224. package/dist/skills.d.ts +15 -0
  225. package/dist/slack-bot-scopes.d.ts +17 -12
  226. package/dist/slack-bot-scopes.js +10 -3
  227. package/dist/slack-rest-mcp.d.ts +36 -0
  228. package/dist/slack-rest-mcp.js +25 -0
  229. package/dist/slack-rest-mcp.js.map +1 -0
  230. package/dist/spreadsheet-artifact-commands.d.ts +14 -1
  231. package/dist/spreadsheet-artifact-commands.js +8 -2
  232. package/dist/spreadsheet-artifact-query.d.ts +13 -6
  233. package/dist/spreadsheet-artifact-query.js +3 -3
  234. package/dist/subscription-account-actions.d.ts +64 -0
  235. package/dist/subscription-account-pools.d.ts +292 -0
  236. package/dist/subscription-personal-authority-v2.d.ts +28 -0
  237. package/dist/subscription-personal-authority-v2.js +12 -0
  238. package/dist/subscription-personal-authority-v2.js.map +1 -0
  239. package/dist/tool-action-review.d.ts +132 -0
  240. package/dist/tool-catalog.d.ts +408 -0
  241. package/dist/tool-policy.d.ts +5 -0
  242. package/dist/tool-review-presentation.d.ts +12 -0
  243. package/dist/tool-review-presentation.js +17 -0
  244. package/dist/tool-review-presentation.js.map +1 -0
  245. package/dist/transcription-recordings.d.ts +21 -0
  246. package/dist/turn-serving-policy.d.ts +221 -0
  247. package/dist/usage-allowances.d.ts +314 -0
  248. package/dist/usage-allowances.js +52 -0
  249. package/dist/usage-allowances.js.map +1 -0
  250. package/dist/vaults.d.ts +1286 -0
  251. package/dist/video-generation.d.ts +3 -0
  252. package/dist/video-generation.js +2 -1
  253. package/dist/workspace-integration-wire.d.ts +36 -0
  254. package/dist/workspace-integration-wire.js +23 -0
  255. package/dist/workspace-integration-wire.js.map +1 -0
  256. package/dist/workspace-integrations.d.ts +1028 -0
  257. package/dist/xai-provider-account-authority.js +2 -1
  258. package/package.json +93 -5
  259. package/src/agent-authored-durable-text.ts +14 -11
  260. package/src/agent-config.ts +1698 -0
  261. package/src/agent-instruction-changes.ts +91 -74
  262. package/src/agent-learning.ts +94 -67
  263. package/src/agent-topology.ts +57 -52
  264. package/src/allowance-refusal.ts +81 -0
  265. package/src/analytics-consent-report.ts +20 -0
  266. package/src/api-key-presets.ts +28 -0
  267. package/src/artifact-catalog.ts +82 -0
  268. package/src/artifacts.ts +299 -227
  269. package/src/atlassian-native-retirement.ts +33 -0
  270. package/src/atlassian.ts +135 -108
  271. package/src/browser-storage.ts +10 -0
  272. package/src/bundled-skills.ts +60 -17
  273. package/src/canonical-human-identities.ts +60 -58
  274. package/src/claude-provider-account-authority.ts +12 -0
  275. package/src/claude-subscription-oauth.ts +73 -0
  276. package/src/claude-subscription-usage.ts +68 -0
  277. package/src/client-error-report.ts +343 -0
  278. package/src/code-search.ts +105 -0
  279. package/src/codex-provider-account-authority.ts +21 -16
  280. package/src/company-brain-governed-writes.ts +255 -233
  281. package/src/company-brain.ts +164 -153
  282. package/src/company-profile.ts +365 -292
  283. package/src/connect.ts +212 -173
  284. package/src/connection-account-label.ts +46 -0
  285. package/src/connection-authority.ts +183 -364
  286. package/src/connector-attachments.ts +137 -122
  287. package/src/connector-destinations.ts +46 -42
  288. package/src/connector-tool-permissions.ts +117 -0
  289. package/src/cua-desktop-tools.gen.json +6512 -0
  290. package/src/cua-desktop-tools.linux.gen.json +6600 -0
  291. package/src/cua-desktop-tools.ts +36 -0
  292. package/src/cua-desktop-tools.windows.gen.json +6353 -0
  293. package/src/define-schema.ts +10 -0
  294. package/src/direct-model-provider.ts +108 -0
  295. package/src/editable-artifact-committed-transaction.ts +17 -0
  296. package/src/editable-artifact-versions.ts +7 -1
  297. package/src/event-preview.ts +53 -3
  298. package/src/external-identities.ts +249 -176
  299. package/src/feedback.ts +43 -30
  300. package/src/first-party-tool-authorization.ts +356 -0
  301. package/src/github-repository-contracts.ts +78 -64
  302. package/src/google-drive.ts +285 -234
  303. package/src/governed-learning-activation.ts +152 -131
  304. package/src/governed-learning-evaluator.ts +140 -133
  305. package/src/host-mcp-bindings.ts +252 -198
  306. package/src/image-generation.ts +104 -95
  307. package/src/index.ts +13235 -8687
  308. package/src/insights-usage.ts +727 -0
  309. package/src/interaction.ts +3070 -2326
  310. package/src/knowledge-entries.ts +361 -276
  311. package/src/knowledge-preparation.ts +57 -0
  312. package/src/knowledge.ts +246 -213
  313. package/src/managed-auth-session-sets.ts +220 -144
  314. package/src/managed-sign-in-methods.ts +52 -0
  315. package/src/mcp-catalog-limits.ts +2 -0
  316. package/src/mcp-oauth.ts +43 -34
  317. package/src/mcp-receipts.ts +192 -192
  318. package/src/mcp-structured-content.ts +81 -0
  319. package/src/memory-slack-delivery.ts +171 -142
  320. package/src/modal-native-proof-v2.ts +429 -0
  321. package/src/model-account-choice.ts +177 -0
  322. package/src/model-account-settings.ts +210 -0
  323. package/src/model-availability.ts +22 -0
  324. package/src/model-connection-access.ts +61 -14
  325. package/src/model-context-inspector.ts +133 -99
  326. package/src/model-display.ts +221 -0
  327. package/src/model-picker-order.ts +12 -1
  328. package/src/organization-access.ts +217 -0
  329. package/src/organization-integration-policy.ts +63 -0
  330. package/src/organization-membership-lifecycle.ts +528 -382
  331. package/src/organization-model-usage.ts +81 -0
  332. package/src/organization-recovery.ts +147 -135
  333. package/src/organization-usage.ts +94 -0
  334. package/src/permissions.ts +88 -52
  335. package/src/personal-github.ts +210 -171
  336. package/src/preference-registry.ts +314 -258
  337. package/src/prepared-mcp-setup.ts +189 -0
  338. package/src/product-analytics.ts +261 -0
  339. package/src/product-lifecycle-facts.ts +122 -0
  340. package/src/remember.ts +181 -167
  341. package/src/retained-output.ts +194 -165
  342. package/src/sandbox-file-artifacts.ts +60 -47
  343. package/src/sandbox-provider-command.ts +88 -20
  344. package/src/sandbox-recovery.ts +129 -0
  345. package/src/scoped-knowledge.ts +61 -43
  346. package/src/secret-generator.ts +155 -0
  347. package/src/secret-references.ts +414 -0
  348. package/src/secret-resolution.ts +274 -0
  349. package/src/secret-totp.ts +188 -0
  350. package/src/session-final-reply.ts +16 -0
  351. package/src/session-goal-reports.ts +64 -0
  352. package/src/session-history-import.ts +177 -0
  353. package/src/session-list-entries.ts +96 -0
  354. package/src/session-mcp-projections.ts +11 -0
  355. package/src/session-mcp-tool-permissions.ts +108 -0
  356. package/src/session-message-search.ts +61 -0
  357. package/src/session-target.ts +57 -0
  358. package/src/session-titles.ts +80 -10
  359. package/src/session-topology-primitives.ts +19 -12
  360. package/src/session-usage-limit-refusal.ts +101 -0
  361. package/src/session-usage-limits.ts +171 -0
  362. package/src/signup-attribution.ts +86 -0
  363. package/src/site-data.ts +339 -0
  364. package/src/site-operations.ts +154 -0
  365. package/src/site-publishing.ts +876 -0
  366. package/src/site-session-http.ts +294 -16
  367. package/src/site-sql.ts +1123 -0
  368. package/src/skill-catalog-context.ts +50 -0
  369. package/src/skill-files.ts +3 -3
  370. package/src/skill-use.ts +80 -0
  371. package/src/skills.ts +82 -54
  372. package/src/slack-bot-scopes.ts +31 -39
  373. package/src/slack-rest-mcp.ts +222 -0
  374. package/src/slack-task-policy.ts +96 -73
  375. package/src/spreadsheet-artifact-commands.ts +73 -2
  376. package/src/spreadsheet-artifact-query.ts +187 -39
  377. package/src/subscription-account-actions.ts +84 -0
  378. package/src/subscription-account-pools.ts +53 -0
  379. package/src/subscription-personal-authority-v2.ts +66 -0
  380. package/src/task-notes.ts +55 -51
  381. package/src/tool-action-review.ts +258 -0
  382. package/src/tool-catalog.ts +609 -372
  383. package/src/tool-policy.ts +82 -0
  384. package/src/tool-result-spill.ts +12 -9
  385. package/src/tool-review-presentation.ts +385 -0
  386. package/src/transcription-recordings.ts +145 -131
  387. package/src/turn-serving-policy.ts +166 -0
  388. package/src/usage-allowances.ts +248 -0
  389. package/src/vaults.ts +850 -0
  390. package/src/video-generation.ts +385 -360
  391. package/src/work-claims.ts +173 -149
  392. package/src/workspace-instruction-policies.ts +349 -276
  393. package/src/workspace-integration-wire.ts +101 -0
  394. package/src/workspace-integrations.ts +724 -0
  395. package/src/workspace-learning-administration.ts +57 -44
  396. package/src/workspace-learning-policy.ts +127 -96
  397. package/src/workspace-state.ts +250 -220
  398. package/src/xai-provider-account-authority.ts +22 -17
  399. package/dist/chunk-2AC63F4S.js +0 -171
  400. package/dist/chunk-2AC63F4S.js.map +0 -1
  401. package/dist/chunk-3SIZGL3O.js.map +0 -1
  402. package/dist/chunk-7ABONTXE.js.map +0 -1
  403. package/dist/chunk-BCS7WHCK.js +0 -139
  404. package/dist/chunk-BCS7WHCK.js.map +0 -1
  405. package/dist/chunk-GRG7PHWQ.js +0 -25
  406. package/dist/chunk-GRG7PHWQ.js.map +0 -1
  407. package/dist/chunk-JUFK3T4Q.js +0 -80
  408. package/dist/chunk-JUFK3T4Q.js.map +0 -1
  409. package/dist/chunk-M5ZGRVIQ.js +0 -719
  410. package/dist/chunk-M5ZGRVIQ.js.map +0 -1
  411. package/dist/chunk-MRWYRAS5.js.map +0 -1
  412. package/dist/chunk-OVFORMPW.js +0 -348
  413. package/dist/chunk-OVFORMPW.js.map +0 -1
  414. package/dist/chunk-P3HLDT77.js +0 -59
  415. package/dist/chunk-P3HLDT77.js.map +0 -1
  416. package/dist/chunk-QQUJ6NPW.js +0 -23093
  417. package/dist/chunk-QQUJ6NPW.js.map +0 -1
  418. package/dist/chunk-TXTQIYCV.js.map +0 -1
  419. package/dist/chunk-WYBDERIY.js.map +0 -1
  420. package/dist/chunk-Y3KNXVTD.js.map +0 -1
  421. package/dist/chunk-YBW5JSA3.js.map +0 -1
  422. package/dist/chunk-YRXAWWCU.js +0 -45
  423. package/dist/chunk-YRXAWWCU.js.map +0 -1
  424. package/dist/host-mcp-resolvers.d.ts +0 -32
  425. package/dist/host-mcp-resolvers.js +0 -34
  426. package/dist/host-mcp-resolvers.js.map +0 -1
  427. package/src/host-mcp-resolvers.ts +0 -50
  428. /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
  429. /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
@@ -1,28 +1,45 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-QQUJ6NPW.js";
4
- import "./chunk-YBW5JSA3.js";
5
- import "./chunk-O5LEQHDM.js";
6
- import "./chunk-GRG7PHWQ.js";
7
- import "./chunk-RKX3NQYS.js";
8
- import "./chunk-MRWYRAS5.js";
9
- import "./chunk-3SIZGL3O.js";
3
+ } from "./chunk-OF6OKOBF.js";
4
+ import "./chunk-EFZYKUE2.js";
5
+ import "./chunk-Z7WEVGCL.js";
6
+ import "./chunk-4JGHSSB7.js";
7
+ import "./chunk-2ZIHHL72.js";
8
+ import "./chunk-LZ2LAHIX.js";
9
+ import "./chunk-NDZHPTCL.js";
10
+ import "./chunk-SHO4YO4B.js";
11
+ import "./chunk-TSWWZMUS.js";
12
+ import "./chunk-XDLAGX66.js";
13
+ import "./chunk-4VDMHLLL.js";
14
+ import "./chunk-E3GGUBHS.js";
15
+ import "./chunk-KHHZTBP7.js";
16
+ import "./chunk-6IXO76Z6.js";
10
17
  import "./chunk-NVJMJWLL.js";
18
+ import "./chunk-352X6ENP.js";
11
19
  import "./chunk-YRKRZ6OF.js";
12
- import "./chunk-JUFK3T4Q.js";
13
- import "./chunk-M5ZGRVIQ.js";
14
- import "./chunk-BCS7WHCK.js";
15
- import "./chunk-5LYFSZ7O.js";
16
- import "./chunk-Y3KNXVTD.js";
17
- import "./chunk-D2HKF2EF.js";
18
- import "./chunk-TXTQIYCV.js";
20
+ import "./chunk-J4HQ3UKY.js";
21
+ import "./chunk-YKZ4WU4P.js";
22
+ import "./chunk-TLU3UEMD.js";
23
+ import "./chunk-OL23ARTF.js";
24
+ import "./chunk-TCXCRBPF.js";
25
+ import "./chunk-ZDCRWCGZ.js";
26
+ import "./chunk-SWRN2DJ3.js";
27
+ import "./chunk-HRRU4QPI.js";
28
+ import "./chunk-IK36LXKC.js";
19
29
  import "./chunk-RIY7GYQS.js";
30
+ import "./chunk-4QO6GJUX.js";
31
+ import "./chunk-EKWNTOG3.js";
32
+ import {
33
+ defineSchema
34
+ } from "./chunk-56SNIMDO.js";
35
+ import "./chunk-D2HKF2EF.js";
20
36
  import "./chunk-MYBZRDTY.js";
21
- import "./chunk-PX3VCKAU.js";
22
- import "./chunk-YRXAWWCU.js";
23
- import "./chunk-WYBDERIY.js";
24
- import "./chunk-P3HLDT77.js";
25
- import "./chunk-7ABONTXE.js";
37
+ import "./chunk-PUIUXIOL.js";
38
+ import "./chunk-RKX3NQYS.js";
39
+ import "./chunk-7272KVWZ.js";
40
+ import "./chunk-RMWXDZEO.js";
41
+ import "./chunk-ILJ72KPO.js";
42
+ import "./chunk-WVCFSOUZ.js";
26
43
 
27
44
  // src/personal-github.ts
28
45
  import { z } from "zod";
@@ -36,142 +53,180 @@ var PERSONAL_GITHUB_TOKEN_URL = "https://github.com/login/oauth/access_token";
36
53
  var PERSONAL_GITHUB_USER_URL = "https://api.github.com/user";
37
54
  var PERSONAL_GITHUB_API_ORIGIN = "https://api.github.com";
38
55
  var PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100;
39
- var PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\d*$/u);
40
- var PersonalGitHubRepositoryAccess = z.enum(["read", "write"]);
41
- var PersonalGitHubRepositoryPermissions = z.object({
42
- pull: z.boolean(),
43
- push: z.boolean(),
44
- admin: z.boolean(),
45
- maintain: z.boolean(),
46
- triage: z.boolean()
47
- }).strict();
48
- var PersonalGitHubRepositoryVisibility = z.enum(["public", "private", "internal"]);
49
- var PersonalGitHubRepositoryFullName = z.string().min(3).max(140).regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9_.-]{1,100}$/u);
56
+ var PersonalGitHubRepositoryId = /* @__PURE__ */ defineSchema(
57
+ () => z.string().regex(/^[1-9]\d*$/u)
58
+ );
59
+ var PersonalGitHubRepositoryAccess = /* @__PURE__ */ defineSchema(
60
+ () => z.enum(["read", "write"])
61
+ );
62
+ var PersonalGitHubRepositoryPermissions = /* @__PURE__ */ defineSchema(
63
+ () => z.object({
64
+ pull: z.boolean(),
65
+ push: z.boolean(),
66
+ admin: z.boolean(),
67
+ maintain: z.boolean(),
68
+ triage: z.boolean()
69
+ }).strict()
70
+ );
71
+ var PersonalGitHubRepositoryVisibility = /* @__PURE__ */ defineSchema(
72
+ () => z.enum(["public", "private", "internal"])
73
+ );
74
+ var PersonalGitHubRepositoryFullName = /* @__PURE__ */ defineSchema(
75
+ () => z.string().min(3).max(140).regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9_.-]{1,100}$/u)
76
+ );
50
77
  function canonicalPersonalGitHubRepositoryUrl(fullName) {
51
78
  return `https://github.com/${fullName}`;
52
79
  }
53
- var PersonalGitHubRepository = z.object({
54
- repositoryId: PersonalGitHubRepositoryId,
55
- fullName: PersonalGitHubRepositoryFullName,
56
- canonicalUrl: z.string().url().max(512),
57
- defaultBranch: z.string().min(1).max(255),
58
- visibility: PersonalGitHubRepositoryVisibility,
59
- private: z.boolean(),
60
- archived: z.boolean(),
61
- disabled: z.boolean(),
62
- permissions: PersonalGitHubRepositoryPermissions
63
- }).strict().superRefine((repository, context) => {
64
- if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {
65
- context.addIssue({
66
- code: "custom",
67
- path: ["canonicalUrl"],
68
- message: "canonicalUrl must be derived from fullName"
69
- });
70
- }
71
- if (repository.private !== (repository.visibility === "private")) {
72
- context.addIssue({
73
- code: "custom",
74
- path: ["private"],
75
- message: "private must agree with visibility"
76
- });
77
- }
78
- });
79
- var PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({
80
- selectedAccess: PersonalGitHubRepositoryAccess,
81
- selectionGeneration: z.number().int().positive(),
82
- selectedAt: z.string().datetime({ offset: true }),
83
- lastVerifiedAt: z.string().datetime({ offset: true })
84
- }).strict();
85
- var PersonalGitHubRepositorySelectionState = z.object({
86
- connectionAuthorityGeneration: z.number().int().positive(),
87
- credentialBindingId: z.string().uuid(),
88
- providerPrincipalId: PersonalGitHubRepositoryId,
89
- selectionGeneration: z.number().int().nonnegative(),
90
- repositories: z.array(PersonalGitHubSelectedRepository).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
91
- }).strict();
92
- var ListPersonalGitHubRepositoriesQuery = z.object({
93
- cursor: z.coerce.number().int().positive().max(1e4).default(1),
94
- limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50)
95
- }).strict();
96
- var PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({
97
- selectedAccess: PersonalGitHubRepositoryAccess.nullable()
98
- }).strict();
99
- var ListPersonalGitHubRepositoriesResponse = z.object({
100
- repositories: z.array(PersonalGitHubRepositoryCatalogItem).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),
101
- nextCursor: z.number().int().positive().nullable(),
102
- selection: PersonalGitHubRepositorySelectionState
103
- }).strict();
104
- var PersonalGitHubRepositorySelectionInput = z.object({
105
- repositoryId: PersonalGitHubRepositoryId,
106
- fullName: PersonalGitHubRepositoryFullName,
107
- access: PersonalGitHubRepositoryAccess
108
- }).strict();
109
- var ReplacePersonalGitHubRepositorySelectionsRequest = z.object({
110
- expectedConnectionAuthorityGeneration: z.number().int().positive(),
111
- expectedSelectionGeneration: z.number().int().nonnegative(),
112
- idempotencyKey: z.string().trim().min(1).max(200),
113
- repositories: z.array(PersonalGitHubRepositorySelectionInput).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
114
- }).strict().superRefine((request, context) => {
115
- const repositoryIds = /* @__PURE__ */ new Set();
116
- const fullNames = /* @__PURE__ */ new Set();
117
- request.repositories.forEach((repository, index) => {
118
- const normalizedFullName = repository.fullName.toLowerCase();
119
- if (repositoryIds.has(repository.repositoryId)) {
80
+ var PersonalGitHubRepository = /* @__PURE__ */ defineSchema(
81
+ () => z.object({
82
+ repositoryId: PersonalGitHubRepositoryId,
83
+ fullName: PersonalGitHubRepositoryFullName,
84
+ canonicalUrl: z.string().url().max(512),
85
+ defaultBranch: z.string().min(1).max(255),
86
+ visibility: PersonalGitHubRepositoryVisibility,
87
+ private: z.boolean(),
88
+ archived: z.boolean(),
89
+ disabled: z.boolean(),
90
+ permissions: PersonalGitHubRepositoryPermissions
91
+ }).strict().superRefine((repository, context) => {
92
+ if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {
120
93
  context.addIssue({
121
94
  code: "custom",
122
- path: ["repositories", index, "repositoryId"],
123
- message: "repositoryId must be unique"
95
+ path: ["canonicalUrl"],
96
+ message: "canonicalUrl must be derived from fullName"
124
97
  });
125
98
  }
126
- if (fullNames.has(normalizedFullName)) {
99
+ if (repository.private !== (repository.visibility === "private")) {
127
100
  context.addIssue({
128
101
  code: "custom",
129
- path: ["repositories", index, "fullName"],
130
- message: "fullName must be unique"
102
+ path: ["private"],
103
+ message: "private must agree with visibility"
131
104
  });
132
105
  }
133
- repositoryIds.add(repository.repositoryId);
134
- fullNames.add(normalizedFullName);
135
- });
136
- });
137
- var VerifyPersonalGitHubRepositorySelectionsRequest = z.object({
138
- expectedConnectionAuthorityGeneration: z.number().int().positive(),
139
- expectedSelectionGeneration: z.number().int().nonnegative(),
140
- idempotencyKey: z.string().trim().min(1).max(200)
141
- }).strict();
142
- var PersonalGitHubConnectionMetadata = z.object({
143
- credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),
144
- providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),
145
- providerPrincipalId: z.string().regex(/^\d+$/u),
146
- githubUserId: z.string().regex(/^\d+$/u),
147
- githubLogin: z.string().min(1).max(100),
148
- oauthEnvironment: z.string().min(1).max(128),
149
- oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),
150
- credentialBindingId: z.string().uuid(),
151
- connectedAt: z.string().datetime({ offset: true }),
152
- lastVerifiedAt: z.string().datetime({ offset: true }),
153
- disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),
154
- refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional()
155
- }).passthrough();
156
- var PersonalGitHubOAuthStartRequest = z.object({
157
- /** Existing exact connection generation to re-authorize in place. */
158
- connectionId: z.string().uuid().optional(),
159
- /** Same-workspace UI path restored after the callback. */
160
- returnPath: z.string().min(1).max(2048).optional()
161
- }).strict();
162
- var PersonalGitHubOAuthStartResponse = z.object({
163
- authorizationUrl: z.string().url(),
164
- expiresAt: z.string().datetime({ offset: true })
165
- }).strict();
166
- var PersonalGitHubConnectionStatusResponse = z.object({
167
- enabled: z.boolean(),
168
- connection: ConnectionMetadata.nullable(),
169
- reviewUrl: z.string().url().nullable()
170
- }).strict();
171
- var PersonalGitHubDisconnectRequest = z.object({
172
- expectedVersion: z.number().int().positive(),
173
- idempotencyKey: z.string().trim().min(1).max(200)
174
- }).strict();
106
+ })
107
+ );
108
+ var PersonalGitHubSelectedRepository = /* @__PURE__ */ defineSchema(
109
+ () => PersonalGitHubRepository.safeExtend({
110
+ selectedAccess: PersonalGitHubRepositoryAccess,
111
+ selectionGeneration: z.number().int().positive(),
112
+ selectedAt: z.string().datetime({ offset: true }),
113
+ lastVerifiedAt: z.string().datetime({ offset: true })
114
+ }).strict()
115
+ );
116
+ var PersonalGitHubRepositorySelectionState = /* @__PURE__ */ defineSchema(
117
+ () => z.object({
118
+ connectionAuthorityGeneration: z.number().int().positive(),
119
+ credentialBindingId: z.string().uuid(),
120
+ providerPrincipalId: PersonalGitHubRepositoryId,
121
+ selectionGeneration: z.number().int().nonnegative(),
122
+ repositories: z.array(PersonalGitHubSelectedRepository).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
123
+ }).strict()
124
+ );
125
+ var ListPersonalGitHubRepositoriesQuery = /* @__PURE__ */ defineSchema(
126
+ () => z.object({
127
+ cursor: z.coerce.number().int().positive().max(1e4).default(1),
128
+ limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50)
129
+ }).strict()
130
+ );
131
+ var PersonalGitHubRepositoryCatalogItem = /* @__PURE__ */ defineSchema(
132
+ () => PersonalGitHubRepository.safeExtend({
133
+ selectedAccess: PersonalGitHubRepositoryAccess.nullable()
134
+ }).strict()
135
+ );
136
+ var ListPersonalGitHubRepositoriesResponse = /* @__PURE__ */ defineSchema(
137
+ () => z.object({
138
+ repositories: z.array(PersonalGitHubRepositoryCatalogItem).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),
139
+ nextCursor: z.number().int().positive().nullable(),
140
+ selection: PersonalGitHubRepositorySelectionState
141
+ }).strict()
142
+ );
143
+ var PersonalGitHubRepositorySelectionInput = /* @__PURE__ */ defineSchema(
144
+ () => z.object({
145
+ repositoryId: PersonalGitHubRepositoryId,
146
+ fullName: PersonalGitHubRepositoryFullName,
147
+ access: PersonalGitHubRepositoryAccess
148
+ }).strict()
149
+ );
150
+ var ReplacePersonalGitHubRepositorySelectionsRequest = /* @__PURE__ */ defineSchema(
151
+ () => z.object({
152
+ expectedConnectionAuthorityGeneration: z.number().int().positive(),
153
+ expectedSelectionGeneration: z.number().int().nonnegative(),
154
+ idempotencyKey: z.string().trim().min(1).max(200),
155
+ repositories: z.array(PersonalGitHubRepositorySelectionInput).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
156
+ }).strict().superRefine((request, context) => {
157
+ const repositoryIds = /* @__PURE__ */ new Set();
158
+ const fullNames = /* @__PURE__ */ new Set();
159
+ request.repositories.forEach((repository, index) => {
160
+ const normalizedFullName = repository.fullName.toLowerCase();
161
+ if (repositoryIds.has(repository.repositoryId)) {
162
+ context.addIssue({
163
+ code: "custom",
164
+ path: ["repositories", index, "repositoryId"],
165
+ message: "repositoryId must be unique"
166
+ });
167
+ }
168
+ if (fullNames.has(normalizedFullName)) {
169
+ context.addIssue({
170
+ code: "custom",
171
+ path: ["repositories", index, "fullName"],
172
+ message: "fullName must be unique"
173
+ });
174
+ }
175
+ repositoryIds.add(repository.repositoryId);
176
+ fullNames.add(normalizedFullName);
177
+ });
178
+ })
179
+ );
180
+ var VerifyPersonalGitHubRepositorySelectionsRequest = /* @__PURE__ */ defineSchema(
181
+ () => z.object({
182
+ expectedConnectionAuthorityGeneration: z.number().int().positive(),
183
+ expectedSelectionGeneration: z.number().int().nonnegative(),
184
+ idempotencyKey: z.string().trim().min(1).max(200)
185
+ }).strict()
186
+ );
187
+ var PersonalGitHubConnectionMetadata = /* @__PURE__ */ defineSchema(
188
+ () => z.object({
189
+ credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),
190
+ providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),
191
+ providerPrincipalId: z.string().regex(/^\d+$/u),
192
+ githubUserId: z.string().regex(/^\d+$/u),
193
+ githubLogin: z.string().min(1).max(100),
194
+ oauthEnvironment: z.string().min(1).max(128),
195
+ oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),
196
+ credentialBindingId: z.string().uuid(),
197
+ connectedAt: z.string().datetime({ offset: true }),
198
+ lastVerifiedAt: z.string().datetime({ offset: true }),
199
+ disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),
200
+ refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional()
201
+ }).passthrough()
202
+ );
203
+ var PersonalGitHubOAuthStartRequest = /* @__PURE__ */ defineSchema(
204
+ () => z.object({
205
+ /** Existing exact connection generation to re-authorize in place. */
206
+ connectionId: z.string().uuid().optional(),
207
+ /** Same-workspace UI path restored after the callback. */
208
+ returnPath: z.string().min(1).max(2048).optional()
209
+ }).strict()
210
+ );
211
+ var PersonalGitHubOAuthStartResponse = /* @__PURE__ */ defineSchema(
212
+ () => z.object({
213
+ authorizationUrl: z.string().url(),
214
+ expiresAt: z.string().datetime({ offset: true })
215
+ }).strict()
216
+ );
217
+ var PersonalGitHubConnectionStatusResponse = /* @__PURE__ */ defineSchema(
218
+ () => z.object({
219
+ enabled: z.boolean(),
220
+ connection: ConnectionMetadata.nullable(),
221
+ reviewUrl: z.string().url().nullable()
222
+ }).strict()
223
+ );
224
+ var PersonalGitHubDisconnectRequest = /* @__PURE__ */ defineSchema(
225
+ () => z.object({
226
+ expectedVersion: z.number().int().positive(),
227
+ idempotencyKey: z.string().trim().min(1).max(200)
228
+ }).strict()
229
+ );
175
230
  function isPersonalGitHubConnection(connection) {
176
231
  return connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN && connection.kind === "oauth2" && PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success;
177
232
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/personal-github.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const PERSONAL_GITHUB_PROVIDER_DOMAIN = \"github.com\" as const;\nexport const PERSONAL_GITHUB_PROVIDER_FAMILY = \"github\" as const;\nexport const PERSONAL_GITHUB_CREDENTIAL_ROLE = \"opengeni_github_personal\" as const;\nexport const PERSONAL_GITHUB_CONNECTION_SURFACE_ID = \"github:personal\" as const;\nexport const PERSONAL_GITHUB_REQUESTED_SCOPES = [\"repo\"] as const;\nexport const PERSONAL_GITHUB_AUTHORIZATION_URL =\n \"https://github.com/login/oauth/authorize\" as const;\nexport const PERSONAL_GITHUB_TOKEN_URL = \"https://github.com/login/oauth/access_token\" as const;\nexport const PERSONAL_GITHUB_USER_URL = \"https://api.github.com/user\" as const;\nexport const PERSONAL_GITHUB_API_ORIGIN = \"https://api.github.com\" as const;\nexport const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100 as const;\n\nexport const PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\\d*$/u);\nexport type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;\n\nexport const PersonalGitHubRepositoryAccess = z.enum([\"read\", \"write\"]);\nexport type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;\n\nexport const PersonalGitHubRepositoryPermissions = z\n .object({\n pull: z.boolean(),\n push: z.boolean(),\n admin: z.boolean(),\n maintain: z.boolean(),\n triage: z.boolean(),\n })\n .strict();\nexport type PersonalGitHubRepositoryPermissions = z.infer<\n typeof PersonalGitHubRepositoryPermissions\n>;\n\nexport const PersonalGitHubRepositoryVisibility = z.enum([\"public\", \"private\", \"internal\"]);\nexport type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;\n\nconst PersonalGitHubRepositoryFullName = z\n .string()\n .min(3)\n .max(140)\n .regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9_.-]{1,100}$/u);\n\nexport function canonicalPersonalGitHubRepositoryUrl(fullName: string): string {\n return `https://github.com/${fullName}`;\n}\n\n/** A bounded, credential-free projection verified directly against GitHub. */\nexport const PersonalGitHubRepository = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n canonicalUrl: z.string().url().max(512),\n defaultBranch: z.string().min(1).max(255),\n visibility: PersonalGitHubRepositoryVisibility,\n private: z.boolean(),\n archived: z.boolean(),\n disabled: z.boolean(),\n permissions: PersonalGitHubRepositoryPermissions,\n })\n .strict()\n .superRefine((repository, context) => {\n if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"canonicalUrl\"],\n message: \"canonicalUrl must be derived from fullName\",\n });\n }\n if (repository.private !== (repository.visibility === \"private\")) {\n context.addIssue({\n code: \"custom\",\n path: [\"private\"],\n message: \"private must agree with visibility\",\n });\n }\n });\nexport type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;\n\nexport const PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess,\n selectionGeneration: z.number().int().positive(),\n selectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n}).strict();\nexport type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;\n\nexport const PersonalGitHubRepositorySelectionState = z\n .object({\n connectionAuthorityGeneration: z.number().int().positive(),\n credentialBindingId: z.string().uuid(),\n providerPrincipalId: PersonalGitHubRepositoryId,\n selectionGeneration: z.number().int().nonnegative(),\n repositories: z\n .array(PersonalGitHubSelectedRepository)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionState = z.infer<\n typeof PersonalGitHubRepositorySelectionState\n>;\n\nexport const ListPersonalGitHubRepositoriesQuery = z\n .object({\n cursor: z.coerce.number().int().positive().max(10_000).default(1),\n limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50),\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesQuery = z.infer<\n typeof ListPersonalGitHubRepositoriesQuery\n>;\n\nexport const PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess.nullable(),\n}).strict();\nexport type PersonalGitHubRepositoryCatalogItem = z.infer<\n typeof PersonalGitHubRepositoryCatalogItem\n>;\n\nexport const ListPersonalGitHubRepositoriesResponse = z\n .object({\n repositories: z\n .array(PersonalGitHubRepositoryCatalogItem)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n nextCursor: z.number().int().positive().nullable(),\n selection: PersonalGitHubRepositorySelectionState,\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesResponse = z.infer<\n typeof ListPersonalGitHubRepositoriesResponse\n>;\n\nexport const PersonalGitHubRepositorySelectionInput = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n access: PersonalGitHubRepositoryAccess,\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionInput = z.infer<\n typeof PersonalGitHubRepositorySelectionInput\n>;\n\nexport const ReplacePersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n repositories: z\n .array(PersonalGitHubRepositorySelectionInput)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict()\n .superRefine((request, context) => {\n const repositoryIds = new Set<string>();\n const fullNames = new Set<string>();\n request.repositories.forEach((repository, index) => {\n const normalizedFullName = repository.fullName.toLowerCase();\n if (repositoryIds.has(repository.repositoryId)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"repositoryId\"],\n message: \"repositoryId must be unique\",\n });\n }\n if (fullNames.has(normalizedFullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"fullName\"],\n message: \"fullName must be unique\",\n });\n }\n repositoryIds.add(repository.repositoryId);\n fullNames.add(normalizedFullName);\n });\n });\nexport type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof ReplacePersonalGitHubRepositorySelectionsRequest\n>;\n\nexport const VerifyPersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof VerifyPersonalGitHubRepositorySelectionsRequest\n>;\n\n/**\n * Owner-visible, credential-free metadata for one dedicated personal GitHub\n * OAuth connection. Repository selections are a separate authority and never\n * live in this credential record.\n */\nexport const PersonalGitHubConnectionMetadata = z\n .object({\n credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),\n providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),\n providerPrincipalId: z.string().regex(/^\\d+$/u),\n githubUserId: z.string().regex(/^\\d+$/u),\n githubLogin: z.string().min(1).max(100),\n oauthEnvironment: z.string().min(1).max(128),\n oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),\n credentialBindingId: z.string().uuid(),\n connectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),\n refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional(),\n })\n .passthrough();\nexport type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;\n\nexport const PersonalGitHubOAuthStartRequest = z\n .object({\n /** Existing exact connection generation to re-authorize in place. */\n connectionId: z.string().uuid().optional(),\n /** Same-workspace UI path restored after the callback. */\n returnPath: z.string().min(1).max(2048).optional(),\n })\n .strict();\nexport type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;\n\nexport const PersonalGitHubOAuthStartResponse = z\n .object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n })\n .strict();\nexport type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;\n\nexport const PersonalGitHubConnectionStatusResponse = z\n .object({\n enabled: z.boolean(),\n connection: ConnectionMetadata.nullable(),\n reviewUrl: z.string().url().nullable(),\n })\n .strict();\nexport type PersonalGitHubConnectionStatusResponse = z.infer<\n typeof PersonalGitHubConnectionStatusResponse\n>;\n\nexport const PersonalGitHubDisconnectRequest = z\n .object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;\n\nexport function isPersonalGitHubConnection(\n connection: Pick<z.infer<typeof ConnectionMetadata>, \"providerDomain\" | \"kind\" | \"metadata\">,\n): boolean {\n return (\n connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN &&\n connection.kind === \"oauth2\" &&\n PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success\n );\n}\n\nexport function hasReservedPersonalGitHubMetadata(\n metadata: Record<string, unknown> | undefined,\n): boolean {\n return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAIX,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACx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AC;AACjD,CAAC,EACA,OAAO;AAGH,IAAM,yCAAyC,EACnD,OAAO;AAAA,EACN,SAAS,EAAE,QAAQ;AAAA,EACnB,YAAY,mBAAmB,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AACvC,CAAC,EACA,OAAO;AAKH,IAAM,kCAAkC,EAC5C,OAAO;AAAA,EACN,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EAC3C,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAClD,CAAC,EACA,OAAO;AAGH,SAAS,2BACd,YACS;AACT,SACE,WAAW,eAAe,YAAY,MAAM,mCAC5C,WAAW,SAAS,YACpB,iCAAiC,UAAU,WAAW,QAAQ,EAAE;AAEpE;AAEO,SAAS,kCACd,UACS;AACT,SAAO,UAAU,mBAAmB;AACtC;","names":[]}
1
+ {"version":3,"sources":["../src/personal-github.ts"],"sourcesContent":["import { defineSchema } from \"./define-schema\";\nimport { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const PERSONAL_GITHUB_PROVIDER_DOMAIN = \"github.com\" as const;\nexport const PERSONAL_GITHUB_PROVIDER_FAMILY = \"github\" as const;\nexport const PERSONAL_GITHUB_CREDENTIAL_ROLE = \"opengeni_github_personal\" as const;\nexport const PERSONAL_GITHUB_CONNECTION_SURFACE_ID = \"github:personal\" as const;\nexport const PERSONAL_GITHUB_REQUESTED_SCOPES = [\"repo\"] as const;\nexport const PERSONAL_GITHUB_AUTHORIZATION_URL =\n \"https://github.com/login/oauth/authorize\" as const;\nexport const PERSONAL_GITHUB_TOKEN_URL = \"https://github.com/login/oauth/access_token\" as const;\nexport const PERSONAL_GITHUB_USER_URL = \"https://api.github.com/user\" as const;\nexport const PERSONAL_GITHUB_API_ORIGIN = \"https://api.github.com\" as const;\nexport const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100 as const;\n\nexport const PersonalGitHubRepositoryId = /* @__PURE__ */ defineSchema(() =>\n z.string().regex(/^[1-9]\\d*$/u),\n);\nexport type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;\n\nexport const PersonalGitHubRepositoryAccess = /* @__PURE__ */ defineSchema(() =>\n z.enum([\"read\", \"write\"]),\n);\nexport type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;\n\nexport const PersonalGitHubRepositoryPermissions = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n pull: z.boolean(),\n push: z.boolean(),\n admin: z.boolean(),\n maintain: z.boolean(),\n triage: z.boolean(),\n })\n .strict(),\n);\nexport type PersonalGitHubRepositoryPermissions = z.infer<\n typeof PersonalGitHubRepositoryPermissions\n>;\n\nexport const PersonalGitHubRepositoryVisibility = /* @__PURE__ */ defineSchema(() =>\n z.enum([\"public\", \"private\", \"internal\"]),\n);\nexport type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;\n\nconst PersonalGitHubRepositoryFullName = /* @__PURE__ */ defineSchema(() =>\n z\n .string()\n .min(3)\n .max(140)\n .regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9_.-]{1,100}$/u),\n);\n\nexport function canonicalPersonalGitHubRepositoryUrl(fullName: string): string {\n return `https://github.com/${fullName}`;\n}\n\n/** A bounded, credential-free projection verified directly against GitHub. */\nexport const PersonalGitHubRepository = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n canonicalUrl: z.string().url().max(512),\n defaultBranch: z.string().min(1).max(255),\n visibility: PersonalGitHubRepositoryVisibility,\n private: z.boolean(),\n archived: z.boolean(),\n disabled: z.boolean(),\n permissions: PersonalGitHubRepositoryPermissions,\n })\n .strict()\n .superRefine((repository, context) => {\n if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"canonicalUrl\"],\n message: \"canonicalUrl must be derived from fullName\",\n });\n }\n if (repository.private !== (repository.visibility === \"private\")) {\n context.addIssue({\n code: \"custom\",\n path: [\"private\"],\n message: \"private must agree with visibility\",\n });\n }\n }),\n);\nexport type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;\n\nexport const PersonalGitHubSelectedRepository = /* @__PURE__ */ defineSchema(() =>\n PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess,\n selectionGeneration: z.number().int().positive(),\n selectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n }).strict(),\n);\nexport type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;\n\nexport const PersonalGitHubRepositorySelectionState = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n connectionAuthorityGeneration: z.number().int().positive(),\n credentialBindingId: z.string().uuid(),\n providerPrincipalId: PersonalGitHubRepositoryId,\n selectionGeneration: z.number().int().nonnegative(),\n repositories: z\n .array(PersonalGitHubSelectedRepository)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict(),\n);\nexport type PersonalGitHubRepositorySelectionState = z.infer<\n typeof PersonalGitHubRepositorySelectionState\n>;\n\nexport const ListPersonalGitHubRepositoriesQuery = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n cursor: z.coerce.number().int().positive().max(10_000).default(1),\n limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50),\n })\n .strict(),\n);\nexport type ListPersonalGitHubRepositoriesQuery = z.infer<\n typeof ListPersonalGitHubRepositoriesQuery\n>;\n\nexport const PersonalGitHubRepositoryCatalogItem = /* @__PURE__ */ defineSchema(() =>\n PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess.nullable(),\n }).strict(),\n);\nexport type PersonalGitHubRepositoryCatalogItem = z.infer<\n typeof PersonalGitHubRepositoryCatalogItem\n>;\n\nexport const ListPersonalGitHubRepositoriesResponse = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n repositories: z\n .array(PersonalGitHubRepositoryCatalogItem)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n nextCursor: z.number().int().positive().nullable(),\n selection: PersonalGitHubRepositorySelectionState,\n })\n .strict(),\n);\nexport type ListPersonalGitHubRepositoriesResponse = z.infer<\n typeof ListPersonalGitHubRepositoriesResponse\n>;\n\nexport const PersonalGitHubRepositorySelectionInput = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n access: PersonalGitHubRepositoryAccess,\n })\n .strict(),\n);\nexport type PersonalGitHubRepositorySelectionInput = z.infer<\n typeof PersonalGitHubRepositorySelectionInput\n>;\n\nexport const ReplacePersonalGitHubRepositorySelectionsRequest = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n repositories: z\n .array(PersonalGitHubRepositorySelectionInput)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict()\n .superRefine((request, context) => {\n const repositoryIds = new Set<string>();\n const fullNames = new Set<string>();\n request.repositories.forEach((repository, index) => {\n const normalizedFullName = repository.fullName.toLowerCase();\n if (repositoryIds.has(repository.repositoryId)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"repositoryId\"],\n message: \"repositoryId must be unique\",\n });\n }\n if (fullNames.has(normalizedFullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"fullName\"],\n message: \"fullName must be unique\",\n });\n }\n repositoryIds.add(repository.repositoryId);\n fullNames.add(normalizedFullName);\n });\n }),\n);\nexport type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof ReplacePersonalGitHubRepositorySelectionsRequest\n>;\n\nexport const VerifyPersonalGitHubRepositorySelectionsRequest = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict(),\n);\nexport type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof VerifyPersonalGitHubRepositorySelectionsRequest\n>;\n\n/**\n * Owner-visible, credential-free metadata for one dedicated personal GitHub\n * OAuth connection. Repository selections are a separate authority and never\n * live in this credential record.\n */\nexport const PersonalGitHubConnectionMetadata = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),\n providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),\n providerPrincipalId: z.string().regex(/^\\d+$/u),\n githubUserId: z.string().regex(/^\\d+$/u),\n githubLogin: z.string().min(1).max(100),\n oauthEnvironment: z.string().min(1).max(128),\n oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),\n credentialBindingId: z.string().uuid(),\n connectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),\n refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional(),\n })\n .passthrough(),\n);\nexport type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;\n\nexport const PersonalGitHubOAuthStartRequest = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n /** Existing exact connection generation to re-authorize in place. */\n connectionId: z.string().uuid().optional(),\n /** Same-workspace UI path restored after the callback. */\n returnPath: z.string().min(1).max(2048).optional(),\n })\n .strict(),\n);\nexport type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;\n\nexport const PersonalGitHubOAuthStartResponse = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n })\n .strict(),\n);\nexport type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;\n\nexport const PersonalGitHubConnectionStatusResponse = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n enabled: z.boolean(),\n connection: ConnectionMetadata.nullable(),\n reviewUrl: z.string().url().nullable(),\n })\n .strict(),\n);\nexport type PersonalGitHubConnectionStatusResponse = z.infer<\n typeof PersonalGitHubConnectionStatusResponse\n>;\n\nexport const PersonalGitHubDisconnectRequest = /* @__PURE__ */ defineSchema(() =>\n z\n .object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict(),\n);\nexport type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;\n\nexport function isPersonalGitHubConnection(\n connection: Pick<z.infer<typeof ConnectionMetadata>, \"providerDomain\" | \"kind\" | \"metadata\">,\n): boolean {\n return (\n connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN &&\n connection.kind === \"oauth2\" &&\n PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success\n );\n}\n\nexport function hasReservedPersonalGitHubMetadata(\n metadata: Record<string, unknown> | undefined,\n): boolean {\n return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS;AAIX,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,wCAAwC;AAC9C,IAAM,mCAAmC,CAAC,MAAM;AAChD,IAAM,oCACX;AACK,IAAM,4BAA4B;AAClC,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AACnC,IAAM,yCAAyC;AAE/C,IAAM,6BAA6C;AAAA,EAAa,MACrE,EAA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AEzC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE,SAAS;AAAA,EACnD,CAAC,EACA,OAAO;AACZ;AAGO,IAAM,mCAAmD;AAAA,EAAa,MAC3E,EACG,OAAO;AAAA,IACN,kBAAkB,EAAE,OAAO,EAAE,IAAI;AAAA,IACjC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,KAAK,CAAC;AAAA,EACjD,CAAC,EACA,OAAO;AACZ;AAGO,IAAM,yCAAyD;AAAA,EAAa,MACjF,EACG,OAAO;AAAA,IACN,SAAS,EAAE,QAAQ;AAAA,IACnB,YAAY,mBAAmB,SAAS;AAAA,IACxC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EACvC,CAAC,EACA,OAAO;AACZ;AAKO,IAAM,kCAAkD;AAAA,EAAa,MAC1E,EACG,OAAO;AAAA,IACN,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,IAC3C,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EAClD,CAAC,EACA,OAAO;AACZ;AAGO,SAAS,2BACd,YACS;AACT,SACE,WAAW,eAAe,YAAY,MAAM,mCAC5C,WAAW,SAAS,YACpB,iCAAiC,UAAU,WAAW,QAAQ,EAAE;AAEpE;AAEO,SAAS,kCACd,UACS;AACT,SAAO,UAAU,mBAAmB;AACtC;","names":[]}
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+ /** Configuration is safe to retain; secret values enter only the protected
3
+ * Connect credential request, never this model-visible setup description. */
4
+ export declare const PreparedMcpSetup: z.ZodObject<{
5
+ name: z.ZodString;
6
+ endpointUrl: z.ZodString;
7
+ headers: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
8
+ name: z.ZodString;
9
+ value: z.ZodString;
10
+ }, z.core.$strict>, z.ZodObject<{
11
+ name: z.ZodString;
12
+ secret: z.ZodString;
13
+ prefix: z.ZodOptional<z.ZodString>;
14
+ suffix: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strict>]>>;
16
+ secretFields: z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ label: z.ZodString;
19
+ }, z.core.$strict>>;
20
+ }, z.core.$strict>;
21
+ export type PreparedMcpSetup = z.infer<typeof PreparedMcpSetup>;
22
+ /** A missing-key proposal retains configuration only. Ownership is explicit
23
+ * and the displayed identity must equal the destination actually configured. */
24
+ export declare const CustomMcpSetupRequest: z.ZodObject<{
25
+ kind: z.ZodLiteral<"mcp">;
26
+ name: z.ZodString;
27
+ endpointUrl: z.ZodString;
28
+ rationale: z.ZodString;
29
+ ownership: z.ZodOptional<z.ZodEnum<{
30
+ personal: "personal";
31
+ workspace: "workspace";
32
+ }>>;
33
+ mcpSetup: z.ZodOptional<z.ZodObject<{
34
+ name: z.ZodString;
35
+ endpointUrl: z.ZodString;
36
+ headers: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
37
+ name: z.ZodString;
38
+ value: z.ZodString;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ name: z.ZodString;
41
+ secret: z.ZodString;
42
+ prefix: z.ZodOptional<z.ZodString>;
43
+ suffix: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strict>]>>;
45
+ secretFields: z.ZodArray<z.ZodObject<{
46
+ id: z.ZodString;
47
+ label: z.ZodString;
48
+ }, z.core.$strict>>;
49
+ }, z.core.$strict>>;
50
+ }, z.core.$strict>;
51
+ export type CustomMcpSetupRequest = z.infer<typeof CustomMcpSetupRequest>;
52
+ /** Values are intentionally accepted separately. Errors name neither supplied
53
+ * values nor undeclared input keys, which may themselves contain credentials. */
54
+ export declare function preparedMcpHeaders(configuration: PreparedMcpSetup, values: Readonly<Record<string, string>>): Record<string, string>;
@@ -0,0 +1,12 @@
1
+ import {
2
+ CustomMcpSetupRequest,
3
+ PreparedMcpSetup,
4
+ preparedMcpHeaders
5
+ } from "./chunk-XDLAGX66.js";
6
+ import "./chunk-56SNIMDO.js";
7
+ export {
8
+ CustomMcpSetupRequest,
9
+ PreparedMcpSetup,
10
+ preparedMcpHeaders
11
+ };
12
+ //# sourceMappingURL=prepared-mcp-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,116 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * The product surface through which a turn's request entered Opengeni.
4
+ *
5
+ * - `web`: the Opengeni web app (managed cookie or the local browser context).
6
+ * - `slack`: a Slack mention, command, DM, shortcut, thread reply, or reaction.
7
+ * - `api_key`: an API key or configured key, including the SDK and scripts.
8
+ * - `embedded`: a host that embeds Opengeni through signed delegation or an
9
+ * organization key acting for an external user.
10
+ * - `scheduled`: a scheduled-task occurrence.
11
+ * - `agent`: another agent (a child session, an agent message, or Agent Steer).
12
+ * - `voice`: a realtime voice delegation or its end-of-call handoff.
13
+ * - `site`: a published workspace Site.
14
+ * - `automation`: an event-triggered automation run.
15
+ * - `mcp`: an external MCP client connected through workspace MCP OAuth.
16
+ * - `system`: Opengeni's own maintenance work with no human entry.
17
+ *
18
+ * Turns that no new request entered (goal continuations, child results,
19
+ * command results, wait timeouts, compaction) inherit the surface of the
20
+ * session's latest started turn. Null means no surface was captured: rows
21
+ * written before capture existed, or machine work in a session that has
22
+ * never started a turn with one.
23
+ */
24
+ export declare const SESSION_TURN_SURFACES: readonly ["web", "slack", "api_key", "embedded", "scheduled", "agent", "voice", "site", "automation", "mcp", "system"];
25
+ export declare const SessionTurnSurface: z.ZodEnum<{
26
+ agent: "agent";
27
+ api_key: "api_key";
28
+ automation: "automation";
29
+ embedded: "embedded";
30
+ mcp: "mcp";
31
+ scheduled: "scheduled";
32
+ site: "site";
33
+ slack: "slack";
34
+ system: "system";
35
+ voice: "voice";
36
+ web: "web";
37
+ }>;
38
+ export type SessionTurnSurface = z.infer<typeof SessionTurnSurface>;
39
+ /**
40
+ * Request header the first-party web console sends while its tab is visible
41
+ * and the person interacted with it in the last few minutes. The API records
42
+ * server-side presence (`opengeni_active_users`, `user.active`) only for
43
+ * canonical managed browser sessions carrying this exact value, so an idle open
44
+ * tab, background polling and stream re-authorization never count as activity.
45
+ * Analytics only: it never grants or narrows access.
46
+ */
47
+ export declare const OPENGENI_USER_ACTIVITY_HEADER = "x-opengeni-user-activity";
48
+ export declare const OPENGENI_USER_ACTIVITY_ACTIVE = "active";
49
+ /** Interaction recency, in milliseconds, behind the activity header. */
50
+ export declare const OPENGENI_USER_ACTIVITY_WINDOW_MS: number;
51
+ /** Parse a stored value; anything outside the fixed list is treated as absent. */
52
+ export declare function sessionTurnSurfaceOrNull(value: unknown): SessionTurnSurface | null;
53
+ /**
54
+ * Model provider families exported for analytics. Reserved Opengeni provider
55
+ * ids pass through unchanged; every operator-configured registry provider is
56
+ * reported as `registry` so a deployment's own naming never leaves it.
57
+ * `opengeni_private.analytics_model_provider` (migration 0533) mirrors this.
58
+ */
59
+ export declare const ANALYTICS_MODEL_PROVIDERS: readonly ["openai", "azure", "codex-subscription", "supergrok-subscription", "opengeni-gateway", "workspace-gateway", "organization-gateway", "openrouter", "workspace-openrouter", "organization-openrouter", "opper", "workspace-opper", "organization-opper", "registry"];
60
+ export declare const AnalyticsModelProvider: z.ZodEnum<{
61
+ azure: "azure";
62
+ "codex-subscription": "codex-subscription";
63
+ openai: "openai";
64
+ "opengeni-gateway": "opengeni-gateway";
65
+ openrouter: "openrouter";
66
+ opper: "opper";
67
+ "organization-gateway": "organization-gateway";
68
+ "organization-openrouter": "organization-openrouter";
69
+ "organization-opper": "organization-opper";
70
+ registry: "registry";
71
+ "supergrok-subscription": "supergrok-subscription";
72
+ "workspace-gateway": "workspace-gateway";
73
+ "workspace-openrouter": "workspace-openrouter";
74
+ "workspace-opper": "workspace-opper";
75
+ }>;
76
+ export type AnalyticsModelProvider = z.infer<typeof AnalyticsModelProvider>;
77
+ /** Map an accepted turn's execution-policy provider id to its analytics family. */
78
+ export declare function analyticsModelProvider(providerId: string | null | undefined): AnalyticsModelProvider | null;
79
+ /**
80
+ * Tool family on a tool-call fact: an Opengeni first-party tool name,
81
+ * `integration:<catalog domain>` for a reviewed catalog integration, or
82
+ * `custom` for any other MCP server (a workspace's own server, a self-hosted
83
+ * provider, or an unreviewed catalog entry). The domain part is limited to
84
+ * {@link TOOL_FAMILY_INTEGRATION_DOMAINS}, so a tenant's own host name is
85
+ * never exported.
86
+ */
87
+ export declare const ToolFamily: z.ZodString;
88
+ export type ToolFamily = z.infer<typeof ToolFamily>;
89
+ /**
90
+ * Reviewed integration domains that may appear as `integration:<domain>`:
91
+ * Opengeni's native provider domains plus the MCP host of every curated
92
+ * catalog entry (`data/catalog/curated.json`). A test keeps the curated part
93
+ * in sync. Any other domain is reported as `custom`.
94
+ */
95
+ export declare const TOOL_FAMILY_INTEGRATION_DOMAINS: readonly ["github.com", "gitlab.com", "dev.azure.com", "slack.com", "chatgpt.com", "x.com", "reddit.com", "fiken.no", "api.atlassian.com", "googleapis.com", "gmailmcp.googleapis.com", "mcp.slack.com", "api.mobbin.com", "mcp.linear.app", "mcp.asana.com", "mcp.stripe.com", "mcp.figma.com", "mcp.canva.com", "mcp.sentry.dev", "mcp.vercel.com", "bindings.mcp.cloudflare.com", "mcp.paypal.com", "mcp.monday.com", "mcp.airtable.com", "mcp.zapier.com", "mcp.webflow.com", "mcp.supabase.com", "mcp.clickup.com", "mcp.calendly.com", "mcp.box.com", "mcp.dropbox.com", "mcp.amplitude.com", "mcp.posthog.com", "mcp.pagerduty.com", "mcp.apollo.io", "api.ahrefs.com", "mcp.semrush.com", "mcp.frontapp.com", "mcp.otter.ai", "mcp.notion.com", "mcp.hubspot.com", "mcp.atlassian.com", "mcp.intercom.com"];
96
+ /**
97
+ * Tool family for an MCP server that is not first-party. The first candidate
98
+ * domain on the reviewed list wins; otherwise the server is `custom`.
99
+ */
100
+ export declare function integrationToolFamily(candidateDomains: readonly (string | null | undefined)[]): ToolFamily;
101
+ /**
102
+ * First-party tools the runtime exposes outside any MCP server: base sandbox
103
+ * and runtime tools, progressive-disclosure routers, media generation, and
104
+ * provider-hosted tool calls as the event stream names them.
105
+ */
106
+ export declare const FIRST_PARTY_FUNCTION_TOOL_FAMILY_NAMES: readonly ["exec_command", "write_stdin", "view_image", "apply_patch", "skill_read", "repository_skill_read", "request_human_input", "list_models", "code_search", "tool_search", "tool_list", "tool_invoke", "generate_image", "generate_video", "get_video_generation_capabilities", "computer_screenshot", "web_search_call", "image_generation_call", "code_interpreter_call", "file_search_call", "computer_call", "local_shell_call", "shell_call", "apply_patch_call"];
107
+ /**
108
+ * First-party tools served by in-process attempt definitions or the dedicated
109
+ * `files` server rather than the public `opengeni` MCP catalog.
110
+ */
111
+ export declare const FIRST_PARTY_ATTEMPT_TOOL_FAMILY_NAMES: readonly ["skill_checkout", "skill_publish", "skill_install", "skill_remove", "skill_save", "skill_search", "operation_read", "knowledge_source_fetch", "knowledge_source_read", "files_get_download_url"];
112
+ /**
113
+ * Opengeni's in-process integration tools that are not registry MCP servers,
114
+ * keyed by their catalog server id, with the provider domain they act on.
115
+ */
116
+ export declare const IN_PROCESS_INTEGRATION_TOOL_FAMILY_DOMAINS: Readonly<Record<string, string>>;