@dxos/plugin-github 0.7.4 → 0.14.0

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 (642) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +784 -0
  3. package/dist/lib/GitHubCapabilities.mjs +10 -0
  4. package/dist/lib/GitHubCapabilities.mjs.map +1 -0
  5. package/dist/lib/GitHubEvents.mjs +15 -0
  6. package/dist/lib/GitHubEvents.mjs.map +1 -0
  7. package/dist/lib/GitHubOperation.mjs +384 -0
  8. package/dist/lib/GitHubOperation.mjs.map +1 -0
  9. package/dist/lib/GitHubPlugin.mjs +16 -0
  10. package/dist/lib/GitHubPlugin.mjs.map +1 -0
  11. package/dist/lib/Walkthrough.mjs +59 -0
  12. package/dist/lib/Walkthrough.mjs.map +1 -0
  13. package/dist/lib/capabilities.browser.mjs +54 -0
  14. package/dist/lib/capabilities.browser.mjs.map +1 -0
  15. package/dist/lib/capabilities.mjs +54 -0
  16. package/dist/lib/capabilities.mjs.map +1 -0
  17. package/dist/lib/capabilities.node.mjs +30 -0
  18. package/dist/lib/capabilities.node.mjs.map +1 -0
  19. package/dist/lib/capabilities.tauri.mjs +54 -0
  20. package/dist/lib/capabilities.tauri.mjs.map +1 -0
  21. package/dist/lib/capabilities.workerd.mjs +30 -0
  22. package/dist/lib/capabilities.workerd.mjs.map +1 -0
  23. package/dist/lib/chunk-ImportPullRequestDialog.mjs +116 -0
  24. package/dist/lib/chunk-ImportPullRequestDialog.mjs.map +1 -0
  25. package/dist/lib/chunk-PLUGIN.mjs +6 -0
  26. package/dist/lib/chunk-PLUGIN.mjs.map +1 -0
  27. package/dist/lib/chunk-PullRequestArticle.mjs +1506 -0
  28. package/dist/lib/chunk-PullRequestArticle.mjs.map +1 -0
  29. package/dist/lib/chunk-PullRequestArticle2.mjs +2 -0
  30. package/dist/lib/chunk-PullRequestCardMenu.mjs +123 -0
  31. package/dist/lib/chunk-PullRequestCardMenu.mjs.map +1 -0
  32. package/dist/lib/chunk-PullRequestsArticle.mjs +594 -0
  33. package/dist/lib/chunk-PullRequestsArticle.mjs.map +1 -0
  34. package/dist/lib/chunk-WalkthroughArticle.mjs +26 -0
  35. package/dist/lib/chunk-WalkthroughArticle.mjs.map +1 -0
  36. package/dist/lib/chunk-add-pull-request-comment.mjs +19 -0
  37. package/dist/lib/chunk-add-pull-request-comment.mjs.map +1 -0
  38. package/dist/lib/chunk-add-pull-request-review-comment.mjs +25 -0
  39. package/dist/lib/chunk-add-pull-request-review-comment.mjs.map +1 -0
  40. package/dist/lib/chunk-app-graph-builder.mjs +39 -0
  41. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  42. package/dist/lib/chunk-connector.mjs +70 -0
  43. package/dist/lib/chunk-connector.mjs.map +1 -0
  44. package/dist/lib/chunk-constants.mjs +11 -0
  45. package/dist/lib/chunk-constants.mjs.map +1 -0
  46. package/dist/lib/chunk-errors.mjs +29 -0
  47. package/dist/lib/chunk-errors.mjs.map +1 -0
  48. package/dist/lib/chunk-generate-walkthrough.mjs +86 -0
  49. package/dist/lib/chunk-generate-walkthrough.mjs.map +1 -0
  50. package/dist/lib/chunk-generate.mjs +719 -0
  51. package/dist/lib/chunk-generate.mjs.map +1 -0
  52. package/dist/lib/chunk-get-pull-request-diff.mjs +25 -0
  53. package/dist/lib/chunk-get-pull-request-diff.mjs.map +1 -0
  54. package/dist/lib/chunk-get-pull-request-status.mjs +29 -0
  55. package/dist/lib/chunk-get-pull-request-status.mjs.map +1 -0
  56. package/dist/lib/chunk-get-repositories.mjs +32 -0
  57. package/dist/lib/chunk-get-repositories.mjs.map +1 -0
  58. package/dist/lib/chunk-github-api.mjs +375 -0
  59. package/dist/lib/chunk-github-api.mjs.map +1 -0
  60. package/dist/lib/chunk-github-link.mjs +59 -0
  61. package/dist/lib/chunk-github-link.mjs.map +1 -0
  62. package/dist/lib/chunk-import-pull-request-from-snapshot.mjs +25 -0
  63. package/dist/lib/chunk-import-pull-request-from-snapshot.mjs.map +1 -0
  64. package/dist/lib/chunk-import-pull-request.mjs +171 -0
  65. package/dist/lib/chunk-import-pull-request.mjs.map +1 -0
  66. package/dist/lib/chunk-link-resolver.mjs +109 -0
  67. package/dist/lib/chunk-link-resolver.mjs.map +1 -0
  68. package/dist/lib/chunk-markdown-extension.mjs +92 -0
  69. package/dist/lib/chunk-markdown-extension.mjs.map +1 -0
  70. package/dist/lib/chunk-materialize-target.mjs +36 -0
  71. package/dist/lib/chunk-materialize-target.mjs.map +1 -0
  72. package/dist/lib/chunk-operation-handler.mjs +12 -0
  73. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  74. package/dist/lib/chunk-page-action.mjs +22 -0
  75. package/dist/lib/chunk-page-action.mjs.map +1 -0
  76. package/dist/lib/chunk-pull-request.mjs +58 -0
  77. package/dist/lib/chunk-pull-request.mjs.map +1 -0
  78. package/dist/lib/chunk-pull-request2.mjs +110 -0
  79. package/dist/lib/chunk-pull-request2.mjs.map +1 -0
  80. package/dist/lib/chunk-react-surface.mjs +233 -0
  81. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  82. package/dist/lib/chunk-refresh-pull-requests.mjs +49 -0
  83. package/dist/lib/chunk-refresh-pull-requests.mjs.map +1 -0
  84. package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
  85. package/dist/lib/chunk-schema.mjs +15 -0
  86. package/dist/lib/chunk-schema.mjs.map +1 -0
  87. package/dist/lib/chunk-skill-definition.mjs +10 -0
  88. package/dist/lib/chunk-skill-definition.mjs.map +1 -0
  89. package/dist/lib/chunk-submit-pull-request-approval.mjs +56 -0
  90. package/dist/lib/chunk-submit-pull-request-approval.mjs.map +1 -0
  91. package/dist/lib/chunk-sync-pull-request.mjs +26 -0
  92. package/dist/lib/chunk-sync-pull-request.mjs.map +1 -0
  93. package/dist/lib/chunk-sync.mjs +481 -0
  94. package/dist/lib/chunk-sync.mjs.map +1 -0
  95. package/dist/lib/chunk-useOpenObject.mjs +43 -0
  96. package/dist/lib/chunk-useOpenObject.mjs.map +1 -0
  97. package/dist/lib/extensions.mjs +132 -0
  98. package/dist/lib/extensions.mjs.map +1 -0
  99. package/dist/lib/index.mjs +4 -0
  100. package/dist/lib/meta.mjs +47 -0
  101. package/dist/lib/meta.mjs.map +1 -0
  102. package/dist/lib/ns/Extensions.mjs +18 -0
  103. package/dist/lib/ns/Extensions.mjs.map +1 -0
  104. package/dist/lib/operations.mjs +23 -0
  105. package/dist/lib/operations.mjs.map +1 -0
  106. package/dist/lib/plugin.mjs +9 -0
  107. package/dist/lib/plugin.mjs.map +1 -0
  108. package/dist/lib/skills.mjs +44 -0
  109. package/dist/lib/skills.mjs.map +1 -0
  110. package/dist/lib/testing.mjs +189 -0
  111. package/dist/lib/testing.mjs.map +1 -0
  112. package/dist/lib/translations.mjs +136 -0
  113. package/dist/lib/translations.mjs.map +1 -0
  114. package/dist/lib/types.mjs +5 -0
  115. package/dist/types/dx.config.d.ts +28 -0
  116. package/dist/types/dx.config.d.ts.map +1 -0
  117. package/dist/types/src/Extensions.d.ts +2 -0
  118. package/dist/types/src/Extensions.d.ts.map +1 -0
  119. package/dist/types/src/GitHubPlugin.d.ts +37 -0
  120. package/dist/types/src/GitHubPlugin.d.ts.map +1 -0
  121. package/dist/types/src/GitHubPlugin.workerd.test.d.ts +2 -0
  122. package/dist/types/src/GitHubPlugin.workerd.test.d.ts.map +1 -0
  123. package/dist/types/src/approval.d.ts +21 -0
  124. package/dist/types/src/approval.d.ts.map +1 -0
  125. package/dist/types/src/approval.test.d.ts +2 -0
  126. package/dist/types/src/approval.test.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/app-graph-builder.d.ts +9 -0
  128. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/connector.d.ts +17 -0
  130. package/dist/types/src/capabilities/connector.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/gen/browser.d.ts +13 -0
  132. package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/gen/node.d.ts +13 -0
  134. package/dist/types/src/capabilities/gen/node.d.ts.map +1 -0
  135. package/dist/types/src/capabilities/gen/tauri.d.ts +13 -0
  136. package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
  137. package/dist/types/src/capabilities/gen/workerd.d.ts +13 -0
  138. package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -0
  139. package/dist/types/src/capabilities/index.d.ts +13 -0
  140. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  141. package/dist/types/src/capabilities/link-resolver.d.ts +10 -0
  142. package/dist/types/src/capabilities/link-resolver.d.ts.map +1 -0
  143. package/dist/types/src/capabilities/markdown-extension.d.ts +14 -0
  144. package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
  145. package/dist/types/src/capabilities/operation-handler.d.ts +5 -0
  146. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  147. package/dist/types/src/capabilities/page-action.d.ts +5 -0
  148. package/dist/types/src/capabilities/page-action.d.ts.map +1 -0
  149. package/dist/types/src/capabilities/react-surface.d.ts +5 -0
  150. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  151. package/dist/types/src/capabilities/schema.d.ts +12 -0
  152. package/dist/types/src/capabilities/schema.d.ts.map +1 -0
  153. package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
  154. package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
  155. package/dist/types/src/cards/GitHubCard.d.ts +11 -0
  156. package/dist/types/src/cards/GitHubCard.d.ts.map +1 -0
  157. package/dist/types/src/cards/GitHubCard.stories.d.ts +45 -0
  158. package/dist/types/src/cards/GitHubCard.stories.d.ts.map +1 -0
  159. package/dist/types/src/cards/PullRequestCard.d.ts +9 -0
  160. package/dist/types/src/cards/PullRequestCard.d.ts.map +1 -0
  161. package/dist/types/src/cards/index.d.ts +3 -0
  162. package/dist/types/src/cards/index.d.ts.map +1 -0
  163. package/dist/types/src/components/CommentComposer/CommentComposer.d.ts +30 -0
  164. package/dist/types/src/components/CommentComposer/CommentComposer.d.ts.map +1 -0
  165. package/dist/types/src/components/CommentComposer/index.d.ts +2 -0
  166. package/dist/types/src/components/CommentComposer/index.d.ts.map +1 -0
  167. package/dist/types/src/components/PullRequestFiles/DiffStat.d.ts +8 -0
  168. package/dist/types/src/components/PullRequestFiles/DiffStat.d.ts.map +1 -0
  169. package/dist/types/src/components/PullRequestFiles/FileTree.d.ts +17 -0
  170. package/dist/types/src/components/PullRequestFiles/FileTree.d.ts.map +1 -0
  171. package/dist/types/src/components/PullRequestFiles/PullRequestFiles.d.ts +23 -0
  172. package/dist/types/src/components/PullRequestFiles/PullRequestFiles.d.ts.map +1 -0
  173. package/dist/types/src/components/PullRequestFiles/files.d.ts +39 -0
  174. package/dist/types/src/components/PullRequestFiles/files.d.ts.map +1 -0
  175. package/dist/types/src/components/PullRequestFiles/files.test.d.ts +2 -0
  176. package/dist/types/src/components/PullRequestFiles/files.test.d.ts.map +1 -0
  177. package/dist/types/src/components/PullRequestFiles/index.d.ts +5 -0
  178. package/dist/types/src/components/PullRequestFiles/index.d.ts.map +1 -0
  179. package/dist/types/src/components/PullRequestOverview/ArtifactPill.d.ts +21 -0
  180. package/dist/types/src/components/PullRequestOverview/ArtifactPill.d.ts.map +1 -0
  181. package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts +18 -0
  182. package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts.map +1 -0
  183. package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts +2 -0
  184. package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts.map +1 -0
  185. package/dist/types/src/components/PullRequestOverview/PullRequestDetails.d.ts +10 -0
  186. package/dist/types/src/components/PullRequestOverview/PullRequestDetails.d.ts.map +1 -0
  187. package/dist/types/src/components/PullRequestOverview/PullRequestOverview.d.ts +16 -0
  188. package/dist/types/src/components/PullRequestOverview/PullRequestOverview.d.ts.map +1 -0
  189. package/dist/types/src/components/PullRequestOverview/RelatedCards.d.ts +28 -0
  190. package/dist/types/src/components/PullRequestOverview/RelatedCards.d.ts.map +1 -0
  191. package/dist/types/src/components/PullRequestOverview/index.d.ts +6 -0
  192. package/dist/types/src/components/PullRequestOverview/index.d.ts.map +1 -0
  193. package/dist/types/src/components/PullRequestStatus/PullRequestStatus.d.ts +20 -0
  194. package/dist/types/src/components/PullRequestStatus/PullRequestStatus.d.ts.map +1 -0
  195. package/dist/types/src/components/PullRequestStatus/index.d.ts +2 -0
  196. package/dist/types/src/components/PullRequestStatus/index.d.ts.map +1 -0
  197. package/dist/types/src/components/WalkthroughView/WalkthroughView.d.ts +18 -0
  198. package/dist/types/src/components/WalkthroughView/WalkthroughView.d.ts.map +1 -0
  199. package/dist/types/src/components/WalkthroughView/extensions.d.ts +16 -0
  200. package/dist/types/src/components/WalkthroughView/extensions.d.ts.map +1 -0
  201. package/dist/types/src/components/WalkthroughView/index.d.ts +3 -0
  202. package/dist/types/src/components/WalkthroughView/index.d.ts.map +1 -0
  203. package/dist/types/src/components/index.d.ts +5 -8
  204. package/dist/types/src/components/index.d.ts.map +1 -1
  205. package/dist/types/src/constants.d.ts +7 -0
  206. package/dist/types/src/constants.d.ts.map +1 -0
  207. package/dist/types/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.d.ts +6 -0
  208. package/dist/types/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.d.ts.map +1 -0
  209. package/dist/types/src/containers/ImportPullRequestDialog/index.d.ts +3 -0
  210. package/dist/types/src/containers/ImportPullRequestDialog/index.d.ts.map +1 -0
  211. package/dist/types/src/containers/PullRequestArticle/PullRequestArticle.d.ts +15 -0
  212. package/dist/types/src/containers/PullRequestArticle/PullRequestArticle.d.ts.map +1 -0
  213. package/dist/types/src/containers/PullRequestArticle/failure.d.ts +10 -0
  214. package/dist/types/src/containers/PullRequestArticle/failure.d.ts.map +1 -0
  215. package/dist/types/src/containers/PullRequestArticle/failure.test.d.ts +2 -0
  216. package/dist/types/src/containers/PullRequestArticle/failure.test.d.ts.map +1 -0
  217. package/dist/types/src/containers/PullRequestArticle/index.d.ts +2 -0
  218. package/dist/types/src/containers/PullRequestArticle/index.d.ts.map +1 -0
  219. package/dist/types/src/containers/PullRequestCardMenu/PullRequestCardMenu.d.ts +14 -0
  220. package/dist/types/src/containers/PullRequestCardMenu/PullRequestCardMenu.d.ts.map +1 -0
  221. package/dist/types/src/containers/PullRequestCardMenu/index.d.ts +2 -0
  222. package/dist/types/src/containers/PullRequestCardMenu/index.d.ts.map +1 -0
  223. package/dist/types/src/containers/PullRequestsArticle/PullRequestsArticle.d.ts +13 -0
  224. package/dist/types/src/containers/PullRequestsArticle/PullRequestsArticle.d.ts.map +1 -0
  225. package/dist/types/src/containers/PullRequestsArticle/arrange.d.ts +44 -0
  226. package/dist/types/src/containers/PullRequestsArticle/arrange.d.ts.map +1 -0
  227. package/dist/types/src/containers/PullRequestsArticle/arrange.test.d.ts +2 -0
  228. package/dist/types/src/containers/PullRequestsArticle/arrange.test.d.ts.map +1 -0
  229. package/dist/types/src/containers/PullRequestsArticle/format.d.ts +3 -0
  230. package/dist/types/src/containers/PullRequestsArticle/format.d.ts.map +1 -0
  231. package/dist/types/src/containers/PullRequestsArticle/index.d.ts +2 -0
  232. package/dist/types/src/containers/PullRequestsArticle/index.d.ts.map +1 -0
  233. package/dist/types/src/containers/WalkthroughArticle/WalkthroughArticle.d.ts +13 -0
  234. package/dist/types/src/containers/WalkthroughArticle/WalkthroughArticle.d.ts.map +1 -0
  235. package/dist/types/src/containers/WalkthroughArticle/index.d.ts +2 -0
  236. package/dist/types/src/containers/WalkthroughArticle/index.d.ts.map +1 -0
  237. package/dist/types/src/containers/index.d.ts +7 -0
  238. package/dist/types/src/containers/index.d.ts.map +1 -0
  239. package/dist/types/src/errors.d.ts +157 -0
  240. package/dist/types/src/errors.d.ts.map +1 -0
  241. package/dist/types/src/extensions/index.d.ts +3 -0
  242. package/dist/types/src/extensions/index.d.ts.map +1 -0
  243. package/dist/types/src/extensions/links.d.ts +21 -0
  244. package/dist/types/src/extensions/links.d.ts.map +1 -0
  245. package/dist/types/src/extensions/links.test.d.ts +2 -0
  246. package/dist/types/src/extensions/links.test.d.ts.map +1 -0
  247. package/dist/types/src/extensions/references.d.ts +23 -0
  248. package/dist/types/src/extensions/references.d.ts.map +1 -0
  249. package/dist/types/src/extensions/references.test.d.ts +2 -0
  250. package/dist/types/src/extensions/references.test.d.ts.map +1 -0
  251. package/dist/types/src/github-link.d.ts +29 -0
  252. package/dist/types/src/github-link.d.ts.map +1 -0
  253. package/dist/types/src/hooks/index.d.ts +5 -2
  254. package/dist/types/src/hooks/index.d.ts.map +1 -1
  255. package/dist/types/src/hooks/useOpenObject.d.ts +9 -0
  256. package/dist/types/src/hooks/useOpenObject.d.ts.map +1 -0
  257. package/dist/types/src/hooks/usePullRequestChecks.d.ts +10 -0
  258. package/dist/types/src/hooks/usePullRequestChecks.d.ts.map +1 -0
  259. package/dist/types/src/hooks/usePullRequestDiff.d.ts +12 -0
  260. package/dist/types/src/hooks/usePullRequestDiff.d.ts.map +1 -0
  261. package/dist/types/src/hooks/usePullRequestFiles.d.ts +22 -0
  262. package/dist/types/src/hooks/usePullRequestFiles.d.ts.map +1 -0
  263. package/dist/types/src/hooks/useSyncPullRequest.d.ts +10 -0
  264. package/dist/types/src/hooks/useSyncPullRequest.d.ts.map +1 -0
  265. package/dist/types/src/index.d.ts +3 -3
  266. package/dist/types/src/index.d.ts.map +1 -1
  267. package/dist/types/src/meta.d.ts +34 -11
  268. package/dist/types/src/meta.d.ts.map +1 -1
  269. package/dist/types/src/operations/add-pull-request-comment.d.ts +5 -0
  270. package/dist/types/src/operations/add-pull-request-comment.d.ts.map +1 -0
  271. package/dist/types/src/operations/add-pull-request-review-comment.d.ts +5 -0
  272. package/dist/types/src/operations/add-pull-request-review-comment.d.ts.map +1 -0
  273. package/dist/types/src/operations/generate-walkthrough.d.ts +11 -0
  274. package/dist/types/src/operations/generate-walkthrough.d.ts.map +1 -0
  275. package/dist/types/src/operations/get-pull-request-diff.d.ts +5 -0
  276. package/dist/types/src/operations/get-pull-request-diff.d.ts.map +1 -0
  277. package/dist/types/src/operations/get-pull-request-status.d.ts +5 -0
  278. package/dist/types/src/operations/get-pull-request-status.d.ts.map +1 -0
  279. package/dist/types/src/operations/get-repositories.d.ts +13 -0
  280. package/dist/types/src/operations/get-repositories.d.ts.map +1 -0
  281. package/dist/types/src/operations/import-pull-request-from-snapshot.d.ts +12 -0
  282. package/dist/types/src/operations/import-pull-request-from-snapshot.d.ts.map +1 -0
  283. package/dist/types/src/operations/import-pull-request.d.ts +63 -0
  284. package/dist/types/src/operations/import-pull-request.d.ts.map +1 -0
  285. package/dist/types/src/operations/import-pull-request.test.d.ts +2 -0
  286. package/dist/types/src/operations/import-pull-request.test.d.ts.map +1 -0
  287. package/dist/types/src/operations/index.d.ts +3 -0
  288. package/dist/types/src/operations/index.d.ts.map +1 -0
  289. package/dist/types/src/operations/materialize-target.d.ts +12 -0
  290. package/dist/types/src/operations/materialize-target.d.ts.map +1 -0
  291. package/dist/types/src/operations/pull-request.d.ts +48 -0
  292. package/dist/types/src/operations/pull-request.d.ts.map +1 -0
  293. package/dist/types/src/operations/pull-request.test.d.ts +2 -0
  294. package/dist/types/src/operations/pull-request.test.d.ts.map +1 -0
  295. package/dist/types/src/operations/refresh-pull-requests.d.ts +5 -0
  296. package/dist/types/src/operations/refresh-pull-requests.d.ts.map +1 -0
  297. package/dist/types/src/operations/refresh.d.ts +37 -0
  298. package/dist/types/src/operations/refresh.d.ts.map +1 -0
  299. package/dist/types/src/operations/refresh.test.d.ts +2 -0
  300. package/dist/types/src/operations/refresh.test.d.ts.map +1 -0
  301. package/dist/types/src/operations/submit-pull-request-approval.d.ts +5 -0
  302. package/dist/types/src/operations/submit-pull-request-approval.d.ts.map +1 -0
  303. package/dist/types/src/operations/sync-pull-request.d.ts +5 -0
  304. package/dist/types/src/operations/sync-pull-request.d.ts.map +1 -0
  305. package/dist/types/src/operations/sync.d.ts +123 -0
  306. package/dist/types/src/operations/sync.d.ts.map +1 -0
  307. package/dist/types/src/operations/sync.test.d.ts +2 -0
  308. package/dist/types/src/operations/sync.test.d.ts.map +1 -0
  309. package/dist/types/src/plugin.d.ts +4 -0
  310. package/dist/types/src/plugin.d.ts.map +1 -0
  311. package/dist/types/src/plugin.test.d.ts +2 -0
  312. package/dist/types/src/plugin.test.d.ts.map +1 -0
  313. package/dist/types/src/pull-request-body.d.ts +37 -0
  314. package/dist/types/src/pull-request-body.d.ts.map +1 -0
  315. package/dist/types/src/pull-request-body.test.d.ts +2 -0
  316. package/dist/types/src/pull-request-body.test.d.ts.map +1 -0
  317. package/dist/types/src/pull-request.d.ts +28 -0
  318. package/dist/types/src/pull-request.d.ts.map +1 -0
  319. package/dist/types/src/pull-request.test.d.ts +2 -0
  320. package/dist/types/src/pull-request.test.d.ts.map +1 -0
  321. package/dist/types/src/services/github-api.d.ts +332 -0
  322. package/dist/types/src/services/github-api.d.ts.map +1 -0
  323. package/dist/types/src/services/index.d.ts +2 -0
  324. package/dist/types/src/services/index.d.ts.map +1 -0
  325. package/dist/types/src/skills/GitHubSkill.d.ts +12 -0
  326. package/dist/types/src/skills/GitHubSkill.d.ts.map +1 -0
  327. package/dist/types/src/skills/index.d.ts +2 -0
  328. package/dist/types/src/skills/index.d.ts.map +1 -0
  329. package/dist/types/src/stories/Generate.stories.d.ts +27 -0
  330. package/dist/types/src/stories/Generate.stories.d.ts.map +1 -0
  331. package/dist/types/src/stories/Links.stories.d.ts +23 -0
  332. package/dist/types/src/stories/Links.stories.d.ts.map +1 -0
  333. package/dist/types/src/stories/PullRequestArticle.stories.d.ts +359 -0
  334. package/dist/types/src/stories/PullRequestArticle.stories.d.ts.map +1 -0
  335. package/dist/types/src/stories/PullRequestFiles.stories.d.ts +365 -0
  336. package/dist/types/src/stories/PullRequestFiles.stories.d.ts.map +1 -0
  337. package/dist/types/src/stories/PullRequestOverview.stories.d.ts +367 -0
  338. package/dist/types/src/stories/PullRequestOverview.stories.d.ts.map +1 -0
  339. package/dist/types/src/stories/PullRequestsArticle.stories.d.ts +357 -0
  340. package/dist/types/src/stories/PullRequestsArticle.stories.d.ts.map +1 -0
  341. package/dist/types/src/stories/Walkthrough.stories.d.ts +380 -0
  342. package/dist/types/src/stories/Walkthrough.stories.d.ts.map +1 -0
  343. package/dist/types/src/stories/github.d.ts +23 -0
  344. package/dist/types/src/stories/github.d.ts.map +1 -0
  345. package/dist/types/src/stories/github.test.d.ts +2 -0
  346. package/dist/types/src/stories/github.test.d.ts.map +1 -0
  347. package/dist/types/src/stories/walkthrough-fixture.d.ts +8 -0
  348. package/dist/types/src/stories/walkthrough-fixture.d.ts.map +1 -0
  349. package/dist/types/src/testing/fixtures.d.ts +14 -0
  350. package/dist/types/src/testing/fixtures.d.ts.map +1 -0
  351. package/dist/types/src/testing/index.d.ts +4 -0
  352. package/dist/types/src/testing/index.d.ts.map +1 -0
  353. package/dist/types/src/testing/plugin.d.ts +4 -0
  354. package/dist/types/src/testing/plugin.d.ts.map +1 -0
  355. package/dist/types/src/testing/pull-request-13348.d.ts +6 -0
  356. package/dist/types/src/testing/pull-request-13348.d.ts.map +1 -0
  357. package/dist/types/src/translations.d.ts +339 -53
  358. package/dist/types/src/translations.d.ts.map +1 -1
  359. package/dist/types/src/types/GitHubCapabilities.d.ts +13 -0
  360. package/dist/types/src/types/GitHubCapabilities.d.ts.map +1 -0
  361. package/dist/types/src/types/GitHubEvents.d.ts +8 -0
  362. package/dist/types/src/types/GitHubEvents.d.ts.map +1 -0
  363. package/dist/types/src/types/GitHubOperation.d.ts +281 -0
  364. package/dist/types/src/types/GitHubOperation.d.ts.map +1 -0
  365. package/dist/types/src/types/PullRequestsView.d.ts +35 -0
  366. package/dist/types/src/types/PullRequestsView.d.ts.map +1 -0
  367. package/dist/types/src/types/Walkthrough.d.ts +31 -0
  368. package/dist/types/src/types/Walkthrough.d.ts.map +1 -0
  369. package/dist/types/src/types/Walkthrough.test.d.ts +2 -0
  370. package/dist/types/src/types/Walkthrough.test.d.ts.map +1 -0
  371. package/dist/types/src/types/index.d.ts +5 -0
  372. package/dist/types/src/types/index.d.ts.map +1 -0
  373. package/dist/types/src/walkthrough/fill.d.ts +28 -0
  374. package/dist/types/src/walkthrough/fill.d.ts.map +1 -0
  375. package/dist/types/src/walkthrough/fill.test.d.ts +2 -0
  376. package/dist/types/src/walkthrough/fill.test.d.ts.map +1 -0
  377. package/dist/types/src/walkthrough/generate.d.ts +67 -0
  378. package/dist/types/src/walkthrough/generate.d.ts.map +1 -0
  379. package/dist/types/src/walkthrough/generate.test.d.ts +2 -0
  380. package/dist/types/src/walkthrough/generate.test.d.ts.map +1 -0
  381. package/dist/types/src/walkthrough/generated.d.ts +20 -0
  382. package/dist/types/src/walkthrough/generated.d.ts.map +1 -0
  383. package/dist/types/src/walkthrough/generated.test.d.ts +2 -0
  384. package/dist/types/src/walkthrough/generated.test.d.ts.map +1 -0
  385. package/dist/types/src/walkthrough/headings.d.ts +8 -0
  386. package/dist/types/src/walkthrough/headings.d.ts.map +1 -0
  387. package/dist/types/src/walkthrough/headings.test.d.ts +2 -0
  388. package/dist/types/src/walkthrough/headings.test.d.ts.map +1 -0
  389. package/dist/types/src/walkthrough/index.d.ts +9 -0
  390. package/dist/types/src/walkthrough/index.d.ts.map +1 -0
  391. package/dist/types/src/walkthrough/patch.d.ts +48 -0
  392. package/dist/types/src/walkthrough/patch.d.ts.map +1 -0
  393. package/dist/types/src/walkthrough/plan.d.ts +55 -0
  394. package/dist/types/src/walkthrough/plan.d.ts.map +1 -0
  395. package/dist/types/src/walkthrough/plan.test.d.ts +2 -0
  396. package/dist/types/src/walkthrough/plan.test.d.ts.map +1 -0
  397. package/dist/types/src/walkthrough/prompt.d.ts +33 -0
  398. package/dist/types/src/walkthrough/prompt.d.ts.map +1 -0
  399. package/dist/types/src/walkthrough/prompt.test.d.ts +2 -0
  400. package/dist/types/src/walkthrough/prompt.test.d.ts.map +1 -0
  401. package/dist/types/src/walkthrough/score.d.ts +43 -0
  402. package/dist/types/src/walkthrough/score.d.ts.map +1 -0
  403. package/dist/types/src/walkthrough/score.test.d.ts +2 -0
  404. package/dist/types/src/walkthrough/score.test.d.ts.map +1 -0
  405. package/dist/types/tsconfig.tsbuildinfo +1 -0
  406. package/dx.config.ts +39 -0
  407. package/package.json +167 -48
  408. package/src/Extensions.ts +7 -0
  409. package/src/GitHubPlugin.ts +15 -0
  410. package/src/GitHubPlugin.workerd.test.ts +23 -0
  411. package/src/approval.test.ts +40 -0
  412. package/src/approval.ts +39 -0
  413. package/src/capabilities/app-graph-builder.ts +47 -0
  414. package/src/capabilities/connector.ts +95 -0
  415. package/src/capabilities/gen/browser.ts +82 -0
  416. package/src/capabilities/gen/node.ts +43 -0
  417. package/src/capabilities/gen/tauri.ts +82 -0
  418. package/src/capabilities/gen/workerd.ts +43 -0
  419. package/src/capabilities/index.ts +71 -0
  420. package/src/capabilities/link-resolver.ts +137 -0
  421. package/src/capabilities/markdown-extension.ts +146 -0
  422. package/src/capabilities/operation-handler.ts +16 -0
  423. package/src/capabilities/page-action.ts +32 -0
  424. package/src/capabilities/react-surface.ts +98 -0
  425. package/src/capabilities/schema.ts +16 -0
  426. package/src/capabilities/skill-definition.ts +14 -0
  427. package/src/cards/GitHubCard.stories.tsx +165 -0
  428. package/src/cards/GitHubCard.tsx +93 -0
  429. package/src/cards/PullRequestCard.tsx +23 -0
  430. package/src/cards/index.ts +6 -0
  431. package/src/components/CommentComposer/CommentComposer.tsx +109 -0
  432. package/src/components/CommentComposer/index.ts +5 -0
  433. package/src/components/PullRequestFiles/DiffStat.tsx +15 -0
  434. package/src/components/PullRequestFiles/FileTree.tsx +102 -0
  435. package/src/components/PullRequestFiles/PullRequestFiles.tsx +87 -0
  436. package/src/components/PullRequestFiles/files.test.ts +59 -0
  437. package/src/components/PullRequestFiles/files.ts +115 -0
  438. package/src/components/PullRequestFiles/index.ts +8 -0
  439. package/src/components/PullRequestOverview/ArtifactPill.tsx +82 -0
  440. package/src/components/PullRequestOverview/CheckRunList.test.ts +29 -0
  441. package/src/components/PullRequestOverview/CheckRunList.tsx +141 -0
  442. package/src/components/PullRequestOverview/PullRequestDetails.tsx +15 -0
  443. package/src/components/PullRequestOverview/PullRequestOverview.tsx +110 -0
  444. package/src/components/PullRequestOverview/RelatedCards.tsx +147 -0
  445. package/src/components/PullRequestOverview/index.ts +9 -0
  446. package/src/components/PullRequestStatus/PullRequestStatus.tsx +84 -0
  447. package/src/components/PullRequestStatus/index.ts +5 -0
  448. package/src/components/WalkthroughView/WalkthroughView.tsx +62 -0
  449. package/src/components/WalkthroughView/extensions.ts +53 -0
  450. package/src/components/WalkthroughView/index.ts +6 -0
  451. package/src/components/index.ts +6 -9
  452. package/src/constants.ts +12 -0
  453. package/src/containers/ImportPullRequestDialog/ImportPullRequestDialog.tsx +160 -0
  454. package/src/containers/ImportPullRequestDialog/index.ts +7 -0
  455. package/src/containers/PullRequestArticle/PullRequestArticle.tsx +573 -0
  456. package/src/containers/PullRequestArticle/failure.test.ts +42 -0
  457. package/src/containers/PullRequestArticle/failure.ts +16 -0
  458. package/src/containers/PullRequestArticle/index.ts +5 -0
  459. package/src/containers/PullRequestCardMenu/PullRequestCardMenu.tsx +134 -0
  460. package/src/containers/PullRequestCardMenu/index.ts +5 -0
  461. package/src/containers/PullRequestsArticle/PullRequestsArticle.tsx +361 -0
  462. package/src/containers/PullRequestsArticle/arrange.test.ts +122 -0
  463. package/src/containers/PullRequestsArticle/arrange.ts +245 -0
  464. package/src/containers/PullRequestsArticle/format.ts +31 -0
  465. package/src/containers/PullRequestsArticle/index.ts +5 -0
  466. package/src/containers/WalkthroughArticle/WalkthroughArticle.tsx +31 -0
  467. package/src/containers/WalkthroughArticle/index.ts +5 -0
  468. package/src/containers/index.ts +11 -0
  469. package/src/errors.ts +61 -0
  470. package/src/extensions/index.ts +6 -0
  471. package/src/extensions/links.test.ts +133 -0
  472. package/src/extensions/links.ts +91 -0
  473. package/src/extensions/references.test.ts +83 -0
  474. package/src/extensions/references.ts +100 -0
  475. package/src/github-link.ts +70 -0
  476. package/src/hooks/index.ts +6 -3
  477. package/src/hooks/useOpenObject.ts +48 -0
  478. package/src/hooks/usePullRequestChecks.ts +81 -0
  479. package/src/hooks/usePullRequestDiff.ts +57 -0
  480. package/src/hooks/usePullRequestFiles.ts +98 -0
  481. package/src/hooks/useSyncPullRequest.ts +51 -0
  482. package/src/index.ts +4 -6
  483. package/src/meta.ts +8 -13
  484. package/src/operations/add-pull-request-comment.ts +31 -0
  485. package/src/operations/add-pull-request-review-comment.ts +32 -0
  486. package/src/operations/generate-walkthrough.ts +124 -0
  487. package/src/operations/get-pull-request-diff.ts +37 -0
  488. package/src/operations/get-pull-request-status.ts +44 -0
  489. package/src/operations/get-repositories.ts +53 -0
  490. package/src/operations/import-pull-request-from-snapshot.ts +48 -0
  491. package/src/operations/import-pull-request.test.ts +151 -0
  492. package/src/operations/import-pull-request.ts +149 -0
  493. package/src/operations/index.ts +30 -0
  494. package/src/operations/materialize-target.ts +60 -0
  495. package/src/operations/pull-request.test.ts +120 -0
  496. package/src/operations/pull-request.ts +141 -0
  497. package/src/operations/refresh-pull-requests.ts +69 -0
  498. package/src/operations/refresh.test.ts +112 -0
  499. package/src/operations/refresh.ts +111 -0
  500. package/src/operations/submit-pull-request-approval.ts +41 -0
  501. package/src/operations/sync-pull-request.ts +34 -0
  502. package/src/operations/sync.test.ts +453 -0
  503. package/src/operations/sync.ts +807 -0
  504. package/src/plugin.test.ts +40 -0
  505. package/src/plugin.ts +37 -0
  506. package/src/pull-request-body.test.ts +61 -0
  507. package/src/pull-request-body.ts +144 -0
  508. package/src/pull-request.test.ts +67 -0
  509. package/src/pull-request.ts +80 -0
  510. package/src/services/github-api.ts +735 -0
  511. package/src/services/index.ts +5 -0
  512. package/src/skills/GitHubSkill.ts +46 -0
  513. package/src/skills/index.ts +5 -0
  514. package/src/stories/Generate.stories.tsx +152 -0
  515. package/src/stories/Links.stories.tsx +153 -0
  516. package/src/stories/PullRequestArticle.stories.tsx +107 -0
  517. package/src/stories/PullRequestFiles.stories.tsx +69 -0
  518. package/src/stories/PullRequestOverview.stories.tsx +114 -0
  519. package/src/stories/PullRequestsArticle.stories.tsx +170 -0
  520. package/src/stories/Walkthrough.stories.tsx +110 -0
  521. package/src/stories/github.test.ts +65 -0
  522. package/src/stories/github.ts +70 -0
  523. package/src/stories/walkthrough-fixture.ts +115 -0
  524. package/src/testing/fixtures.ts +99 -0
  525. package/src/testing/index.ts +7 -0
  526. package/src/testing/plugin.ts +25 -0
  527. package/src/testing/pull-request-13348.ts +104 -0
  528. package/src/testing/pull-request-13363.patch +2981 -0
  529. package/src/translations.ts +135 -63
  530. package/src/types/GitHubCapabilities.ts +27 -0
  531. package/src/types/GitHubEvents.ts +16 -0
  532. package/src/types/GitHubOperation.ts +397 -0
  533. package/src/types/PullRequestsView.ts +45 -0
  534. package/src/types/Walkthrough.test.ts +75 -0
  535. package/src/types/Walkthrough.ts +66 -0
  536. package/src/types/index.ts +8 -0
  537. package/src/vite-env.d.ts +15 -0
  538. package/src/walkthrough/fill.test.ts +337 -0
  539. package/src/walkthrough/fill.ts +246 -0
  540. package/src/walkthrough/generate.test.ts +219 -0
  541. package/src/walkthrough/generate.ts +248 -0
  542. package/src/walkthrough/generated.test.ts +70 -0
  543. package/src/walkthrough/generated.ts +70 -0
  544. package/src/walkthrough/headings.test.ts +40 -0
  545. package/src/walkthrough/headings.ts +39 -0
  546. package/src/walkthrough/index.ts +12 -0
  547. package/src/walkthrough/patch.ts +154 -0
  548. package/src/walkthrough/plan.test.ts +178 -0
  549. package/src/walkthrough/plan.ts +251 -0
  550. package/src/walkthrough/prompt.test.ts +100 -0
  551. package/src/walkthrough/prompt.ts +147 -0
  552. package/src/walkthrough/score.test.ts +272 -0
  553. package/src/walkthrough/score.ts +430 -0
  554. package/README.md +0 -15
  555. package/dist/lib/browser/chunk-S4MPSBA5.mjs +0 -21
  556. package/dist/lib/browser/chunk-S4MPSBA5.mjs.map +0 -7
  557. package/dist/lib/browser/index.css +0 -7
  558. package/dist/lib/browser/index.css.map +0 -7
  559. package/dist/lib/browser/index.mjs +0 -1535
  560. package/dist/lib/browser/index.mjs.map +0 -7
  561. package/dist/lib/browser/meta.json +0 -1
  562. package/dist/lib/browser/meta.mjs +0 -11
  563. package/dist/lib/browser/meta.mjs.map +0 -7
  564. package/dist/types/src/GithubPlugin.d.ts +0 -4
  565. package/dist/types/src/GithubPlugin.d.ts.map +0 -1
  566. package/dist/types/src/components/EmbeddedMain/EmbeddedMain.d.ts +0 -4
  567. package/dist/types/src/components/EmbeddedMain/EmbeddedMain.d.ts.map +0 -1
  568. package/dist/types/src/components/EmbeddedMain/GfmPreview.d.ts +0 -9
  569. package/dist/types/src/components/EmbeddedMain/GfmPreview.d.ts.map +0 -1
  570. package/dist/types/src/components/EmbeddedMain/index.d.ts +0 -2
  571. package/dist/types/src/components/EmbeddedMain/index.d.ts.map +0 -1
  572. package/dist/types/src/components/ExportDialog.d.ts +0 -8
  573. package/dist/types/src/components/ExportDialog.d.ts.map +0 -1
  574. package/dist/types/src/components/GithubApiProviders/GitHubSettings.d.ts +0 -3
  575. package/dist/types/src/components/GithubApiProviders/GitHubSettings.d.ts.map +0 -1
  576. package/dist/types/src/components/GithubApiProviders/OctokitProvider.d.ts +0 -15
  577. package/dist/types/src/components/GithubApiProviders/OctokitProvider.d.ts.map +0 -1
  578. package/dist/types/src/components/GithubApiProviders/index.d.ts +0 -3
  579. package/dist/types/src/components/GithubApiProviders/index.d.ts.map +0 -1
  580. package/dist/types/src/components/GithubEchoResolverProviders/DocumentTreeItem.d.ts +0 -6
  581. package/dist/types/src/components/GithubEchoResolverProviders/DocumentTreeItem.d.ts.map +0 -1
  582. package/dist/types/src/components/GithubEchoResolverProviders/ResolverContext.d.ts +0 -7
  583. package/dist/types/src/components/GithubEchoResolverProviders/ResolverContext.d.ts.map +0 -1
  584. package/dist/types/src/components/GithubEchoResolverProviders/ResolverDialog.d.ts +0 -6
  585. package/dist/types/src/components/GithubEchoResolverProviders/ResolverDialog.d.ts.map +0 -1
  586. package/dist/types/src/components/GithubEchoResolverProviders/ResolverProps.d.ts +0 -16
  587. package/dist/types/src/components/GithubEchoResolverProviders/ResolverProps.d.ts.map +0 -1
  588. package/dist/types/src/components/GithubEchoResolverProviders/ResolverTree.d.ts +0 -3
  589. package/dist/types/src/components/GithubEchoResolverProviders/ResolverTree.d.ts.map +0 -1
  590. package/dist/types/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.d.ts +0 -11
  591. package/dist/types/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.d.ts.map +0 -1
  592. package/dist/types/src/components/GithubEchoResolverProviders/index.d.ts +0 -3
  593. package/dist/types/src/components/GithubEchoResolverProviders/index.d.ts.map +0 -1
  594. package/dist/types/src/components/GithubEchoResolverProviders/spaceResolvers.d.ts +0 -6
  595. package/dist/types/src/components/GithubEchoResolverProviders/spaceResolvers.d.ts.map +0 -1
  596. package/dist/types/src/components/ImportDialog.d.ts +0 -7
  597. package/dist/types/src/components/ImportDialog.d.ts.map +0 -1
  598. package/dist/types/src/components/Issue.d.ts +0 -5
  599. package/dist/types/src/components/Issue.d.ts.map +0 -1
  600. package/dist/types/src/components/Loading/Loading.d.ts +0 -15
  601. package/dist/types/src/components/Loading/Loading.d.ts.map +0 -1
  602. package/dist/types/src/components/Loading/Loading.stories.d.ts +0 -40
  603. package/dist/types/src/components/Loading/Loading.stories.d.ts.map +0 -1
  604. package/dist/types/src/components/Loading/index.d.ts +0 -2
  605. package/dist/types/src/components/Loading/index.d.ts.map +0 -1
  606. package/dist/types/src/components/MarkdownActions.d.ts +0 -7
  607. package/dist/types/src/components/MarkdownActions.d.ts.map +0 -1
  608. package/dist/types/src/components/UrlDialog.d.ts +0 -6
  609. package/dist/types/src/components/UrlDialog.d.ts.map +0 -1
  610. package/dist/types/src/hooks/useDocGhId.d.ts +0 -6
  611. package/dist/types/src/hooks/useDocGhId.d.ts.map +0 -1
  612. package/dist/types/src/hooks/useGhIdFromUrl.d.ts +0 -2
  613. package/dist/types/src/hooks/useGhIdFromUrl.d.ts.map +0 -1
  614. package/dist/types/src/types.d.ts +0 -30
  615. package/dist/types/src/types.d.ts.map +0 -1
  616. package/src/GithubPlugin.tsx +0 -127
  617. package/src/components/EmbeddedMain/EmbeddedMain.tsx +0 -294
  618. package/src/components/EmbeddedMain/GfmPreview.tsx +0 -110
  619. package/src/components/EmbeddedMain/embedded.css +0 -3
  620. package/src/components/EmbeddedMain/index.ts +0 -5
  621. package/src/components/ExportDialog.tsx +0 -157
  622. package/src/components/GithubApiProviders/GitHubSettings.tsx +0 -72
  623. package/src/components/GithubApiProviders/OctokitProvider.tsx +0 -60
  624. package/src/components/GithubApiProviders/index.ts +0 -6
  625. package/src/components/GithubEchoResolverProviders/DocumentTreeItem.tsx +0 -26
  626. package/src/components/GithubEchoResolverProviders/ResolverContext.tsx +0 -137
  627. package/src/components/GithubEchoResolverProviders/ResolverDialog.tsx +0 -34
  628. package/src/components/GithubEchoResolverProviders/ResolverProps.ts +0 -23
  629. package/src/components/GithubEchoResolverProviders/ResolverTree.tsx +0 -86
  630. package/src/components/GithubEchoResolverProviders/SpacePickerTreeItem.tsx +0 -105
  631. package/src/components/GithubEchoResolverProviders/index.ts +0 -6
  632. package/src/components/GithubEchoResolverProviders/spaceResolvers.ts +0 -86
  633. package/src/components/ImportDialog.tsx +0 -72
  634. package/src/components/Issue.tsx +0 -62
  635. package/src/components/Loading/Loading.stories.tsx +0 -32
  636. package/src/components/Loading/Loading.tsx +0 -70
  637. package/src/components/Loading/index.ts +0 -5
  638. package/src/components/MarkdownActions.tsx +0 -136
  639. package/src/components/UrlDialog.tsx +0 -52
  640. package/src/hooks/useDocGhId.ts +0 -38
  641. package/src/hooks/useGhIdFromUrl.ts +0 -26
  642. package/src/types.ts +0 -51
@@ -0,0 +1,132 @@
1
+ import { n as parseGitHubLink, r as parsePullRequestReference, t as GITHUB_LINK } from "./chunk-github-link.mjs";
2
+ import { createElement } from "react";
3
+ import { AnchorWidget, linkWidgets, matchPattern } from "@dxos/ui-editor";
4
+ import { syntaxTree } from "@codemirror/language";
5
+ import { Decoration, ViewPlugin } from "@codemirror/view";
6
+ //#region src/extensions/links.ts
7
+ /** The chip's leading icon for a pull request, in GitHub's open-state green. */
8
+ var PULL_REQUEST_ICON = {
9
+ icon: "ph--git-pull-request--regular",
10
+ classNames: "text-green-500"
11
+ };
12
+ /** The chip icon for a GitHub URL: a pull request's; none for an issue or a repository. */
13
+ var githubLinkIcon = (url) => parseGitHubLink(url)?.kind === "pull" ? PULL_REQUEST_ICON : void 0;
14
+ /**
15
+ * GitHub pull request and issue links as widgets: a `linkWidgets` matcher on the URL's shape rather
16
+ * than its scheme, whose widget gets the parsed parts. The default anchor chip carries the URL to
17
+ * the preview popover, where this plugin's link resolver answers with the pull request or issue.
18
+ * Contributed through `MarkdownCapabilities.ExtensionProvider` rather than built into the editor.
19
+ */
20
+ /**
21
+ * What a chip says for a link the reader wrote as a bare URL: `#123`, or `owner/repo` for a
22
+ * repository. The URL is its own text in that form, and a chip repeating it is longer than the text
23
+ * it replaced — the read-only renderer makes the same substitution.
24
+ */
25
+ var bareLabel = ({ number, owner, repo }) => number ? `#${number}` : `${owner}/${repo}`;
26
+ var githubLinks = ({ trigger, link = { factory: (props) => new AnchorWidget(props.label === props.url ? bareLabel(props) : props.label, props.url, trigger, void 0, props.kind === "pull" ? PULL_REQUEST_ICON : void 0) } } = {}) => linkWidgets({
27
+ match: matchPattern(GITHUB_LINK),
28
+ link: withGitHubLink(link)
29
+ });
30
+ /** The definition over link props, with the URL parsed into the parts the GitHub-side code reads. */
31
+ var withGitHubLink = (def) => {
32
+ const { factory, Component, estimatedHeight, ...rest } = def;
33
+ const githubProps = (props) => {
34
+ const link = parseGitHubLink(props.url);
35
+ return link && {
36
+ ...props,
37
+ ...link
38
+ };
39
+ };
40
+ return {
41
+ ...rest,
42
+ ...factory && { factory: (props) => {
43
+ const parsed = githubProps(props);
44
+ return parsed ? factory(parsed) : null;
45
+ } },
46
+ ...Component && { Component: (props) => {
47
+ const parsed = githubProps(props);
48
+ return parsed ? createElement(Component, parsed) : null;
49
+ } },
50
+ ...estimatedHeight && { estimatedHeight: (props) => {
51
+ const parsed = githubProps(props);
52
+ return parsed ? estimatedHeight(parsed) : 0;
53
+ } }
54
+ };
55
+ };
56
+ //#endregion
57
+ //#region src/extensions/references.ts
58
+ /** `#123` — a GitHub issue or pull-request reference. GitHub itself caps numbers well below this. */
59
+ var REFERENCE = /(^|[^\w#/])#(\d{1,9})\b/g;
60
+ /**
61
+ * Nodes whose text is not prose: a `#` inside them is a fragment, a colour, or code — never a
62
+ * reference. A heading is deliberately absent: `## Notes on #123` is prose after the marker.
63
+ */
64
+ var OPAQUE_NODES = /* @__PURE__ */ new Set([
65
+ "InlineCode",
66
+ "CodeText",
67
+ "FencedCode",
68
+ "CodeBlock",
69
+ "URL",
70
+ "Link",
71
+ "Autolink"
72
+ ]);
73
+ /**
74
+ * Decorates `#123` as a link to the issue or pull request.
75
+ *
76
+ * Contributed by this plugin rather than built into the editor: the number resolves against the
77
+ * repository the space is bound to, which is GitHub-specific knowledge, and a document with no
78
+ * GitHub binding must render the text unchanged.
79
+ */
80
+ var githubReferences = ({ resolve }) => ViewPlugin.fromClass(class {
81
+ decorations;
82
+ constructor(view) {
83
+ this.decorations = build(view, resolve);
84
+ }
85
+ update(update) {
86
+ if (update.docChanged || update.viewportChanged) this.decorations = build(update.view, resolve);
87
+ }
88
+ }, { decorations: (instance) => instance.decorations });
89
+ /** Only the visible ranges: a long document would otherwise re-scan in full on every keystroke. */
90
+ var build = (view, resolve) => {
91
+ const ranges = [];
92
+ const tree = syntaxTree(view.state);
93
+ for (const { from, to } of view.visibleRanges) {
94
+ const text = view.state.sliceDoc(from, to);
95
+ REFERENCE.lastIndex = 0;
96
+ let match;
97
+ while (match = REFERENCE.exec(text)) {
98
+ const start = from + match.index + match[1].length;
99
+ const end = start + match[2].length + 1;
100
+ if (isOpaque(tree, start)) continue;
101
+ const url = resolve(Number(match[2]));
102
+ if (!url) continue;
103
+ ranges.push(Decoration.mark({
104
+ tagName: "a",
105
+ attributes: {
106
+ class: "cm-link",
107
+ href: url,
108
+ rel: "noreferrer",
109
+ target: "_blank"
110
+ }
111
+ }).range(start, end));
112
+ }
113
+ }
114
+ return Decoration.set(ranges, true);
115
+ };
116
+ var isOpaque = (tree, position) => {
117
+ let node = tree.resolveInner(position, 1);
118
+ while (node.parent) {
119
+ if (OPAQUE_NODES.has(node.name)) return true;
120
+ node = node.parent;
121
+ }
122
+ return OPAQUE_NODES.has(node.name);
123
+ };
124
+ /**
125
+ * The canonical target for a reference. `issues/<n>` is deliberate: GitHub redirects it to the pull
126
+ * request when the number is one, so a single URL serves both without asking which it is.
127
+ */
128
+ var referenceUrl = (repo, number) => `https://github.com/${repo}/issues/${number}`;
129
+ //#endregion
130
+ export { GITHUB_LINK, PULL_REQUEST_ICON, githubLinkIcon, githubLinks, githubReferences, parseGitHubLink, parsePullRequestReference, referenceUrl };
131
+
132
+ //# sourceMappingURL=extensions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.mjs","names":[],"sources":["../../src/extensions/links.ts","../../src/extensions/references.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Extension } from '@codemirror/state';\nimport { createElement } from 'react';\n\nimport { AnchorWidget, type LinkWidgetProps, type WidgetDef, linkWidgets, matchPattern } from '@dxos/ui-editor';\n\nimport { GITHUB_LINK, type GitHubLink, parseGitHubLink } from '../github-link.ts';\n\nexport * from '../github-link.ts';\n\n/** A link widget's props, with the URL's parts alongside it. */\nexport type GitHubLinkProps<TContext = any> = LinkWidgetProps<TContext> & GitHubLink;\n\n/** The chip's leading icon for a pull request, in GitHub's open-state green. */\nexport const PULL_REQUEST_ICON = { icon: 'ph--git-pull-request--regular', classNames: 'text-green-500' };\n\n/** The chip icon for a GitHub URL: a pull request's; none for an issue or a repository. */\nexport const githubLinkIcon = (url: string): typeof PULL_REQUEST_ICON | undefined =>\n parseGitHubLink(url)?.kind === 'pull' ? PULL_REQUEST_ICON : undefined;\n\nexport type GitHubLinksOptions = {\n /** Overrides the default chip's preview trigger. */\n trigger?: 'hover' | 'click';\n /** The inline widget for `[label](https://github.com/…/pull/123)`; the anchor chip by default. */\n link?: WidgetDef<GitHubLinkProps>;\n};\n\n/**\n * GitHub pull request and issue links as widgets: a `linkWidgets` matcher on the URL's shape rather\n * than its scheme, whose widget gets the parsed parts. The default anchor chip carries the URL to\n * the preview popover, where this plugin's link resolver answers with the pull request or issue.\n * Contributed through `MarkdownCapabilities.ExtensionProvider` rather than built into the editor.\n */\n/**\n * What a chip says for a link the reader wrote as a bare URL: `#123`, or `owner/repo` for a\n * repository. The URL is its own text in that form, and a chip repeating it is longer than the text\n * it replaced — the read-only renderer makes the same substitution.\n */\nconst bareLabel = ({ number, owner, repo }: GitHubLink): string => (number ? `#${number}` : `${owner}/${repo}`);\n\nexport const githubLinks = ({\n trigger,\n link = {\n factory: (props) =>\n new AnchorWidget(\n props.label === props.url ? bareLabel(props) : props.label,\n props.url,\n trigger,\n undefined,\n props.kind === 'pull' ? PULL_REQUEST_ICON : undefined,\n ),\n },\n}: GitHubLinksOptions = {}): Extension =>\n linkWidgets({\n match: matchPattern(GITHUB_LINK),\n link: withGitHubLink(link),\n });\n\n/** The definition over link props, with the URL parsed into the parts the GitHub-side code reads. */\nconst withGitHubLink = (def: WidgetDef<GitHubLinkProps>): WidgetDef<LinkWidgetProps> => {\n const { factory, Component, estimatedHeight, ...rest } = def;\n const githubProps = (props: LinkWidgetProps): GitHubLinkProps | undefined => {\n const link = parseGitHubLink(props.url);\n return link && { ...props, ...link };\n };\n\n return {\n ...rest,\n ...(factory && {\n factory: (props) => {\n const parsed = githubProps(props);\n return parsed ? factory(parsed) : null;\n },\n }),\n ...(Component && {\n Component: (props) => {\n const parsed = githubProps(props);\n return parsed ? createElement(Component, parsed) : null;\n },\n }),\n ...(estimatedHeight && {\n estimatedHeight: (props) => {\n const parsed = githubProps(props);\n return parsed ? estimatedHeight(parsed) : 0;\n },\n }),\n };\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { syntaxTree } from '@codemirror/language';\nimport { type Extension, type Range } from '@codemirror/state';\nimport { Decoration, type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate } from '@codemirror/view';\n\n/** `#123` — a GitHub issue or pull-request reference. GitHub itself caps numbers well below this. */\nconst REFERENCE = /(^|[^\\w#/])#(\\d{1,9})\\b/g;\n\n/**\n * Nodes whose text is not prose: a `#` inside them is a fragment, a colour, or code — never a\n * reference. A heading is deliberately absent: `## Notes on #123` is prose after the marker.\n */\nconst OPAQUE_NODES = new Set(['InlineCode', 'CodeText', 'FencedCode', 'CodeBlock', 'URL', 'Link', 'Autolink']);\n\nexport type GitHubReferenceResolver = (number: number) => string | undefined;\n\nexport type GitHubReferencesOptions = {\n /**\n * Target for a reference, or `undefined` to leave it undecorated — which is the answer whenever\n * the repository is unknown, since `#123` means nothing without one.\n */\n resolve: GitHubReferenceResolver;\n};\n\n/**\n * Decorates `#123` as a link to the issue or pull request.\n *\n * Contributed by this plugin rather than built into the editor: the number resolves against the\n * repository the space is bound to, which is GitHub-specific knowledge, and a document with no\n * GitHub binding must render the text unchanged.\n */\nexport const githubReferences = ({ resolve }: GitHubReferencesOptions): Extension =>\n ViewPlugin.fromClass(\n class {\n decorations: DecorationSet;\n\n constructor(view: EditorView) {\n this.decorations = build(view, resolve);\n }\n\n update(update: ViewUpdate) {\n if (update.docChanged || update.viewportChanged) {\n this.decorations = build(update.view, resolve);\n }\n }\n },\n {\n decorations: (instance) => instance.decorations,\n },\n );\n\n/** Only the visible ranges: a long document would otherwise re-scan in full on every keystroke. */\nconst build = (view: EditorView, resolve: GitHubReferenceResolver): DecorationSet => {\n const ranges: Range<Decoration>[] = [];\n const tree = syntaxTree(view.state);\n for (const { from, to } of view.visibleRanges) {\n const text = view.state.sliceDoc(from, to);\n REFERENCE.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = REFERENCE.exec(text))) {\n const start = from + match.index + match[1].length;\n const end = start + match[2].length + 1;\n if (isOpaque(tree, start)) {\n continue;\n }\n const url = resolve(Number(match[2]));\n if (!url) {\n continue;\n }\n ranges.push(\n Decoration.mark({\n tagName: 'a',\n attributes: { class: 'cm-link', href: url, rel: 'noreferrer', target: '_blank' },\n }).range(start, end),\n );\n }\n }\n\n return Decoration.set(ranges, true);\n};\n\nconst isOpaque = (tree: ReturnType<typeof syntaxTree>, position: number): boolean => {\n let node = tree.resolveInner(position, 1);\n while (node.parent) {\n if (OPAQUE_NODES.has(node.name)) {\n return true;\n }\n node = node.parent;\n }\n return OPAQUE_NODES.has(node.name);\n};\n\n/**\n * The canonical target for a reference. `issues/<n>` is deliberate: GitHub redirects it to the pull\n * request when the number is one, so a single URL serves both without asking which it is.\n */\nexport const referenceUrl = (repo: string, number: number): string => `https://github.com/${repo}/issues/${number}`;\n"],"mappings":";;;;;;;AAiBA,IAAa,oBAAoB;CAAE,MAAM;CAAiC,YAAY;AAAiB;;AAGvG,IAAa,kBAAkB,QAC7B,gBAAgB,GAAG,CAAC,EAAE,SAAS,SAAS,oBAAoB,KAAA;;;;;;;;;;;;AAoB9D,IAAM,aAAa,EAAE,QAAQ,OAAO,WAAgC,SAAS,IAAI,WAAW,GAAG,MAAM,GAAG;AAExG,IAAa,eAAe,EAC1B,SACA,OAAO,EACL,UAAU,UACR,IAAI,aACF,MAAM,UAAU,MAAM,MAAM,UAAU,KAAK,IAAI,MAAM,OACrD,MAAM,KACN,SACA,KAAA,GACA,MAAM,SAAS,SAAS,oBAAoB,KAAA,CAC9C,EACJ,MACsB,CAAC,MACvB,YAAY;CACV,OAAO,aAAa,WAAW;CAC/B,MAAM,eAAe,IAAI;AAC3B,CAAC;;AAGH,IAAM,kBAAkB,QAAgE;CACtF,MAAM,EAAE,SAAS,WAAW,iBAAiB,GAAG,SAAS;CACzD,MAAM,eAAe,UAAwD;EAC3E,MAAM,OAAO,gBAAgB,MAAM,GAAG;EACtC,OAAO,QAAQ;GAAE,GAAG;GAAO,GAAG;EAAK;CACrC;CAEA,OAAO;EACL,GAAG;EACH,GAAI,WAAW,EACb,UAAU,UAAU;GAClB,MAAM,SAAS,YAAY,KAAK;GAChC,OAAO,SAAS,QAAQ,MAAM,IAAI;EACpC,EACF;EACA,GAAI,aAAa,EACf,YAAY,UAAU;GACpB,MAAM,SAAS,YAAY,KAAK;GAChC,OAAO,SAAS,cAAc,WAAW,MAAM,IAAI;EACrD,EACF;EACA,GAAI,mBAAmB,EACrB,kBAAkB,UAAU;GAC1B,MAAM,SAAS,YAAY,KAAK;GAChC,OAAO,SAAS,gBAAgB,MAAM,IAAI;EAC5C,EACF;CACF;AACF;;;;ACjFA,IAAM,YAAY;;;;;AAMlB,IAAM,+BAAe,IAAI,IAAI;CAAC;CAAc;CAAY;CAAc;CAAa;CAAO;CAAQ;AAAU,CAAC;;;;;;;;AAmB7G,IAAa,oBAAoB,EAAE,cACjC,WAAW,UACT,MAAM;CACJ;CAEA,YAAY,MAAkB;EAC5B,KAAK,cAAc,MAAM,MAAM,OAAO;CACxC;CAEA,OAAO,QAAoB;EACzB,IAAI,OAAO,cAAc,OAAO,iBAC9B,KAAK,cAAc,MAAM,OAAO,MAAM,OAAO;CAEjD;AACF,GACA,EACE,cAAc,aAAa,SAAS,YACtC,CACF;;AAGF,IAAM,SAAS,MAAkB,YAAoD;CACnF,MAAM,SAA8B,CAAC;CACrC,MAAM,OAAO,WAAW,KAAK,KAAK;CAClC,KAAK,MAAM,EAAE,MAAM,QAAQ,KAAK,eAAe;EAC7C,MAAM,OAAO,KAAK,MAAM,SAAS,MAAM,EAAE;EACzC,UAAU,YAAY;EACtB,IAAI;EACJ,OAAQ,QAAQ,UAAU,KAAK,IAAI,GAAI;GACrC,MAAM,QAAQ,OAAO,MAAM,QAAQ,MAAM,EAAE,CAAC;GAC5C,MAAM,MAAM,QAAQ,MAAM,EAAE,CAAC,SAAS;GACtC,IAAI,SAAS,MAAM,KAAK,GACtB;GAEF,MAAM,MAAM,QAAQ,OAAO,MAAM,EAAE,CAAC;GACpC,IAAI,CAAC,KACH;GAEF,OAAO,KACL,WAAW,KAAK;IACd,SAAS;IACT,YAAY;KAAE,OAAO;KAAW,MAAM;KAAK,KAAK;KAAc,QAAQ;IAAS;GACjF,CAAC,CAAC,CAAC,MAAM,OAAO,GAAG,CACrB;EACF;CACF;CAEA,OAAO,WAAW,IAAI,QAAQ,IAAI;AACpC;AAEA,IAAM,YAAY,MAAqC,aAA8B;CACnF,IAAI,OAAO,KAAK,aAAa,UAAU,CAAC;CACxC,OAAO,KAAK,QAAQ;EAClB,IAAI,aAAa,IAAI,KAAK,IAAI,GAC5B,OAAO;EAET,OAAO,KAAK;CACd;CACA,OAAO,aAAa,IAAI,KAAK,IAAI;AACnC;;;;;AAMA,IAAa,gBAAgB,MAAc,WAA2B,sBAAsB,KAAK,UAAU"}
@@ -0,0 +1,4 @@
1
+ import { t as Extensions_exports } from "./ns/Extensions.mjs";
2
+ import { t as GitHubPlugin_exports } from "./GitHubPlugin.mjs";
3
+ export * from "#types";
4
+ export { Extensions_exports as Extensions, GitHubPlugin_exports as GitHubPlugin };
@@ -0,0 +1,47 @@
1
+ import * as Plugin from "@dxos/app-framework/Plugin";
2
+ import { DXN } from "@dxos/keys";
3
+ import { Config2 } from "@dxos/app-framework/config";
4
+ import { trim } from "@dxos/util";
5
+ //#region dx.config.ts
6
+ var dx_config_default = Config2.make({ plugin: {
7
+ key: "org.dxos.plugin.github",
8
+ name: "GitHub",
9
+ author: "DXOS",
10
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-github",
11
+ spec: "PLUGIN.mdl",
12
+ description: trim`
13
+ Connect GitHub to your Composer workspace so organizations, repositories,
14
+ issues, and pull requests stay available alongside everything else you're
15
+ working on.
16
+
17
+ Authenticate with a GitHub OAuth App or GitHub App and select the
18
+ repositories you want to track. On each sync pass the plugin pulls
19
+ organizations and their members into ECHO as Organization and Person
20
+ objects, and mirrors every repository as a Project and every issue or
21
+ pull request as a Task — with open mapping to "todo" and closed mapping
22
+ to "done".
23
+
24
+ Edits made locally to issue title, description, or open/closed status
25
+ are pushed back to GitHub via a snapshot-diff reconciliation step, so
26
+ changes flow in both directions. Pull request status is deliberately
27
+ pull-only to avoid accidental closes; repo renames are similarly guarded.
28
+
29
+ All GitHub data is stored in ECHO and replicated to other peers in the
30
+ space, giving the whole team a shared, local-first view of the project
31
+ without requiring each member to hold their own GitHub token.
32
+ `,
33
+ icon: {
34
+ key: "ph--github-logo--regular",
35
+ hue: "purple"
36
+ },
37
+ tags: ["labs", "connector"]
38
+ } });
39
+ //#endregion
40
+ //#region src/meta.ts
41
+ var meta = Plugin.getMetaFromConfig(dx_config_default);
42
+ /** The dialog behind the "Import pull request" command. */
43
+ var IMPORT_PULL_REQUEST_DIALOG = DXN.make(`${meta.profile.key}.importPullRequestDialog`);
44
+ //#endregion
45
+ export { IMPORT_PULL_REQUEST_DIALOG, meta };
46
+
47
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.github',\n name: 'GitHub',\n author: 'DXOS',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-github',\n spec: 'PLUGIN.mdl',\n description: trim`\n Connect GitHub to your Composer workspace so organizations, repositories,\n issues, and pull requests stay available alongside everything else you're\n working on.\n\n Authenticate with a GitHub OAuth App or GitHub App and select the\n repositories you want to track. On each sync pass the plugin pulls\n organizations and their members into ECHO as Organization and Person\n objects, and mirrors every repository as a Project and every issue or\n pull request as a Task — with open mapping to \"todo\" and closed mapping\n to \"done\".\n\n Edits made locally to issue title, description, or open/closed status\n are pushed back to GitHub via a snapshot-diff reconciliation step, so\n changes flow in both directions. Pull request status is deliberately\n pull-only to avoid accidental closes; repo renames are similarly guarded.\n\n All GitHub data is stored in ECHO and replicated to other peers in the\n space, giving the whole team a shared, local-first view of the project\n without requiring each member to hold their own GitHub token.\n `,\n icon: { key: 'ph--github-logo--regular', hue: 'purple' },\n tags: ['labs', 'connector'],\n },\n});\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport { DXN } from '@dxos/keys';\n\nimport config from '../dx.config.ts';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n\n/** The dialog behind the \"Import pull request\" command. */\nexport const IMPORT_PULL_REQUEST_DIALOG = DXN.make(`${meta.profile.key}.importPullRequestDialog`);\n"],"mappings":";;;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,aAAa,IAAI;;;;;;;;;;;;;;;;;;;;;CAqBjB,MAAM;EAAE,KAAK;EAA4B,KAAK;CAAS;CACvD,MAAM,CAAC,QAAQ,WAAW;AAC5B,EACF,CAAC;;;AC7BD,IAAa,OAAO,OAAO,kBAAkB,iBAAM;;AAGnD,IAAa,6BAA6B,IAAI,KAAK,GAAG,KAAK,QAAQ,IAAI,yBAAyB"}
@@ -0,0 +1,18 @@
1
+ import { t as __exportAll } from "../chunk-rolldown-runtime.mjs";
2
+ import { n as parseGitHubLink, r as parsePullRequestReference, t as GITHUB_LINK } from "../chunk-github-link.mjs";
3
+ import { PULL_REQUEST_ICON, githubLinkIcon, githubLinks, githubReferences, referenceUrl } from "../extensions.mjs";
4
+ //#region src/Extensions.ts
5
+ var Extensions_exports = /* @__PURE__ */ __exportAll({
6
+ GITHUB_LINK: () => GITHUB_LINK,
7
+ PULL_REQUEST_ICON: () => PULL_REQUEST_ICON,
8
+ githubLinkIcon: () => githubLinkIcon,
9
+ githubLinks: () => githubLinks,
10
+ githubReferences: () => githubReferences,
11
+ parseGitHubLink: () => parseGitHubLink,
12
+ parsePullRequestReference: () => parsePullRequestReference,
13
+ referenceUrl: () => referenceUrl
14
+ });
15
+ //#endregion
16
+ export { GITHUB_LINK, PULL_REQUEST_ICON, githubLinkIcon, githubLinks, githubReferences, parseGitHubLink, parsePullRequestReference, referenceUrl, Extensions_exports as t };
17
+
18
+ //# sourceMappingURL=Extensions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Extensions.mjs","names":[],"sources":["../../../src/Extensions.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nexport * from './extensions/index.ts';\n"],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { GitHubOperation } from "#types";
2
+ import * as Operation from "@dxos/compute/Operation";
3
+ import * as OperationHandlerSet from "@dxos/compute/OperationHandlerSet";
4
+ //#region src/operations/index.ts
5
+ var GitHubOperationHandlerSet = OperationHandlerSet.lazy([
6
+ GitHubOperation.GetGitHubRepositories.pipe(Operation.lazyHandler(() => import("./chunk-get-repositories.mjs"))),
7
+ GitHubOperation.MaterializeGitHubTarget.pipe(Operation.lazyHandler(() => import("./chunk-materialize-target.mjs"))),
8
+ GitHubOperation.SyncGitHubRepositories.pipe(Operation.lazyHandler(() => import("./chunk-sync.mjs"))),
9
+ GitHubOperation.GenerateWalkthrough.pipe(Operation.lazyHandler(() => import("./chunk-generate-walkthrough.mjs"))),
10
+ GitHubOperation.ImportPullRequest.pipe(Operation.lazyHandler(() => import("./chunk-import-pull-request.mjs").then((n) => n.t))),
11
+ GitHubOperation.ImportPullRequestFromSnapshot.pipe(Operation.lazyHandler(() => import("./chunk-import-pull-request-from-snapshot.mjs"))),
12
+ GitHubOperation.SubmitPullRequestApproval.pipe(Operation.lazyHandler(() => import("./chunk-submit-pull-request-approval.mjs"))),
13
+ GitHubOperation.AddPullRequestComment.pipe(Operation.lazyHandler(() => import("./chunk-add-pull-request-comment.mjs"))),
14
+ GitHubOperation.AddPullRequestReviewComment.pipe(Operation.lazyHandler(() => import("./chunk-add-pull-request-review-comment.mjs"))),
15
+ GitHubOperation.GetPullRequestStatus.pipe(Operation.lazyHandler(() => import("./chunk-get-pull-request-status.mjs"))),
16
+ GitHubOperation.SyncPullRequest.pipe(Operation.lazyHandler(() => import("./chunk-sync-pull-request.mjs"))),
17
+ GitHubOperation.RefreshPullRequests.pipe(Operation.lazyHandler(() => import("./chunk-refresh-pull-requests.mjs"))),
18
+ GitHubOperation.GetPullRequestDiff.pipe(Operation.lazyHandler(() => import("./chunk-get-pull-request-diff.mjs")))
19
+ ]);
20
+ //#endregion
21
+ export { GitHubOperationHandlerSet };
22
+
23
+ //# sourceMappingURL=operations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.mjs","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';\n\nimport { GitHubOperation } from '#types';\n\nexport const GitHubOperationHandlerSet = OperationHandlerSet.lazy([\n GitHubOperation.GetGitHubRepositories.pipe(Operation.lazyHandler(() => import('./get-repositories.ts'))),\n GitHubOperation.MaterializeGitHubTarget.pipe(Operation.lazyHandler(() => import('./materialize-target.ts'))),\n GitHubOperation.SyncGitHubRepositories.pipe(Operation.lazyHandler(() => import('./sync.ts'))),\n GitHubOperation.GenerateWalkthrough.pipe(Operation.lazyHandler(() => import('./generate-walkthrough.ts'))),\n GitHubOperation.ImportPullRequest.pipe(Operation.lazyHandler(() => import('./import-pull-request.ts'))),\n GitHubOperation.ImportPullRequestFromSnapshot.pipe(\n Operation.lazyHandler(() => import('./import-pull-request-from-snapshot.ts')),\n ),\n GitHubOperation.SubmitPullRequestApproval.pipe(\n Operation.lazyHandler(() => import('./submit-pull-request-approval.ts')),\n ),\n GitHubOperation.AddPullRequestComment.pipe(Operation.lazyHandler(() => import('./add-pull-request-comment.ts'))),\n GitHubOperation.AddPullRequestReviewComment.pipe(\n Operation.lazyHandler(() => import('./add-pull-request-review-comment.ts')),\n ),\n GitHubOperation.GetPullRequestStatus.pipe(Operation.lazyHandler(() => import('./get-pull-request-status.ts'))),\n GitHubOperation.SyncPullRequest.pipe(Operation.lazyHandler(() => import('./sync-pull-request.ts'))),\n GitHubOperation.RefreshPullRequests.pipe(Operation.lazyHandler(() => import('./refresh-pull-requests.ts'))),\n GitHubOperation.GetPullRequestDiff.pipe(Operation.lazyHandler(() => import('./get-pull-request-diff.ts'))),\n]);\n"],"mappings":";;;;AASA,IAAa,4BAA4B,oBAAoB,KAAK;CAChE,gBAAgB,sBAAsB,KAAK,UAAU,kBAAkB,OAAO,+BAAwB,CAAC;CACvG,gBAAgB,wBAAwB,KAAK,UAAU,kBAAkB,OAAO,iCAA0B,CAAC;CAC3G,gBAAgB,uBAAuB,KAAK,UAAU,kBAAkB,OAAO,mBAAY,CAAC;CAC5F,gBAAgB,oBAAoB,KAAK,UAAU,kBAAkB,OAAO,mCAA4B,CAAC;CACzG,gBAAgB,kBAAkB,KAAK,UAAU,kBAAkB,OAAO,kCAA2B,CAAA,MAAA,MAAA,EAAA,CAAA,CAAA,CAAC;CACtG,gBAAgB,8BAA8B,KAC5C,UAAU,kBAAkB,OAAO,gDAAyC,CAC9E;CACA,gBAAgB,0BAA0B,KACxC,UAAU,kBAAkB,OAAO,2CAAoC,CACzE;CACA,gBAAgB,sBAAsB,KAAK,UAAU,kBAAkB,OAAO,uCAAgC,CAAC;CAC/G,gBAAgB,4BAA4B,KAC1C,UAAU,kBAAkB,OAAO,8CAAuC,CAC5E;CACA,gBAAgB,qBAAqB,KAAK,UAAU,kBAAkB,OAAO,sCAA+B,CAAC;CAC7G,gBAAgB,gBAAgB,KAAK,UAAU,kBAAkB,OAAO,gCAAyB,CAAC;CAClG,gBAAgB,oBAAoB,KAAK,UAAU,kBAAkB,OAAO,oCAA6B,CAAC;CAC1G,gBAAgB,mBAAmB,KAAK,UAAU,kBAAkB,OAAO,oCAA6B,CAAC;AAC3G,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { meta } from "#meta";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
+ import { AppGraphBuilder, Connector, LinkResolver, MarkdownExtension, OperationHandler, PageActionProvider, PluginAsset, ReactSurface, Schema, SkillDefinition, Translations } from "#capabilities";
4
+ //#region src/plugin.ts
5
+ var GitHubPlugin = Plugin.define(meta).pipe(Plugin.addModule(AppGraphBuilder), Plugin.addModule(Connector), Plugin.addModule(LinkResolver), Plugin.addModule(MarkdownExtension), Plugin.addModule(OperationHandler), Plugin.addModule(PageActionProvider), Plugin.addModule(PluginAsset), Plugin.addModule(ReactSurface), Plugin.addModule(Schema), Plugin.addModule(SkillDefinition), Plugin.addModule(Translations), Plugin.make);
6
+ //#endregion
7
+ export { GitHubPlugin, GitHubPlugin as default };
8
+
9
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/plugin.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Plugin from '@dxos/app-framework/Plugin';\n\nimport {\n AppGraphBuilder,\n Connector,\n LinkResolver,\n MarkdownExtension,\n OperationHandler,\n PageActionProvider,\n PluginAsset,\n ReactSurface,\n Schema,\n SkillDefinition,\n Translations,\n} from '#capabilities';\nimport { meta } from '#meta';\n\nexport const GitHubPlugin = Plugin.define(meta).pipe(\n Plugin.addModule(AppGraphBuilder),\n Plugin.addModule(Connector),\n Plugin.addModule(LinkResolver),\n Plugin.addModule(MarkdownExtension),\n Plugin.addModule(OperationHandler),\n Plugin.addModule(PageActionProvider),\n Plugin.addModule(PluginAsset),\n Plugin.addModule(ReactSurface),\n Plugin.addModule(Schema),\n Plugin.addModule(SkillDefinition),\n Plugin.addModule(Translations),\n Plugin.make,\n);\n\nexport default GitHubPlugin;\n"],"mappings":";;;;AAqBA,IAAa,eAAe,OAAO,OAAO,IAAI,CAAC,CAAC,KAC9C,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,SAAS,GAC1B,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,iBAAiB,GAClC,OAAO,UAAU,gBAAgB,GACjC,OAAO,UAAU,kBAAkB,GACnC,OAAO,UAAU,WAAW,GAC5B,OAAO,UAAU,YAAY,GAC7B,OAAO,UAAU,MAAM,GACvB,OAAO,UAAU,eAAe,GAChC,OAAO,UAAU,YAAY,GAC7B,OAAO,IACT"}
@@ -0,0 +1,44 @@
1
+ import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
2
+ import { GitHubOperation } from "#types";
3
+ import { trim } from "@dxos/util";
4
+ import * as Operation from "@dxos/compute/Operation";
5
+ import * as Skill from "@dxos/compute/Skill";
6
+ import * as Template from "@dxos/compute/Template";
7
+ //#region src/skills/GitHubSkill.ts
8
+ var GitHubSkill_exports = /* @__PURE__ */ __exportAll({
9
+ key: () => key,
10
+ make: () => make,
11
+ operations: () => operations
12
+ });
13
+ var key = "org.dxos.skill.github";
14
+ /**
15
+ * Imported rather than named as strings: an unresolvable tool id is dropped from the toolkit with
16
+ * only a log line. Verbs that write to GitHub (approvals, comments) are left out so an agent cannot
17
+ * post under the user's account without a skill that asks for it.
18
+ */
19
+ var operations = [
20
+ GitHubOperation.ImportPullRequest,
21
+ GitHubOperation.GetPullRequestStatus,
22
+ GitHubOperation.GenerateWalkthrough
23
+ ];
24
+ /** GitHub pull requests: import them into a space by URL, read their live state, and walk through them. */
25
+ var make = () => Skill.make({
26
+ key,
27
+ name: "GitHub",
28
+ description: "Import GitHub pull requests into a space by URL or owner/repo#number, read their state and CI status, and generate walkthroughs. Use when a task, message or the user names a pull request.",
29
+ agentCanEnable: true,
30
+ mcpPrompt: true,
31
+ tools: Skill.toolDefinitions({ operations }),
32
+ instructions: Template.make({ source: trim`
33
+ Pull requests live in the space as org.dxos.type.pullRequest objects, fetched from GitHub through the space's GitHub connection.
34
+ Whenever you have a pull request -- one you just opened, or one a task, message or the user names -- import it with ${Operation.toolName(GitHubOperation.ImportPullRequest)}, passing its github.com URL or owner/repo#number.
35
+ Never create the object by hand, since only an import fills its title, state and diff.
36
+ Importing is idempotent: a pull request the space already holds is returned unchanged, so import before referencing one rather than searching first.
37
+ Pass the returned pullRequest reference to the other tools, and use it wherever the pull request must be attached to another object, such as a task's artifacts.
38
+ Read the state and CI status with ${Operation.toolName(GitHubOperation.GetPullRequestStatus)} before reporting whether a pull request is open, merged or green; the stored object may be stale.
39
+ ` })
40
+ });
41
+ //#endregion
42
+ export { GitHubSkill_exports as GitHubSkill };
43
+
44
+ //# sourceMappingURL=skills.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.mjs","names":[],"sources":["../../src/skills/GitHubSkill.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Operation from '@dxos/compute/Operation';\nimport * as Skill from '@dxos/compute/Skill';\nimport * as Template from '@dxos/compute/Template';\nimport { trim } from '@dxos/util';\n\nimport { GitHubOperation } from '#types';\n\nexport const key = 'org.dxos.skill.github';\n\n/**\n * Imported rather than named as strings: an unresolvable tool id is dropped from the toolkit with\n * only a log line. Verbs that write to GitHub (approvals, comments) are left out so an agent cannot\n * post under the user's account without a skill that asks for it.\n */\nexport const operations: readonly Operation.Definition.Any[] = [\n GitHubOperation.ImportPullRequest,\n GitHubOperation.GetPullRequestStatus,\n GitHubOperation.GenerateWalkthrough,\n];\n\n/** GitHub pull requests: import them into a space by URL, read their live state, and walk through them. */\nexport const make = (): Skill.Skill =>\n Skill.make({\n key,\n name: 'GitHub',\n description:\n 'Import GitHub pull requests into a space by URL or owner/repo#number, read their state and CI ' +\n 'status, and generate walkthroughs. Use when a task, message or the user names a pull request.',\n agentCanEnable: true,\n mcpPrompt: true,\n tools: Skill.toolDefinitions({ operations }),\n instructions: Template.make({\n source: trim`\n Pull requests live in the space as org.dxos.type.pullRequest objects, fetched from GitHub through the space's GitHub connection.\n Whenever you have a pull request -- one you just opened, or one a task, message or the user names -- import it with ${Operation.toolName(GitHubOperation.ImportPullRequest)}, passing its github.com URL or owner/repo#number.\n Never create the object by hand, since only an import fills its title, state and diff.\n Importing is idempotent: a pull request the space already holds is returned unchanged, so import before referencing one rather than searching first.\n Pass the returned pullRequest reference to the other tools, and use it wherever the pull request must be attached to another object, such as a task's artifacts.\n Read the state and CI status with ${Operation.toolName(GitHubOperation.GetPullRequestStatus)} before reporting whether a pull request is open, merged or green; the stored object may be stale.\n `,\n }),\n });\n"],"mappings":";;;;;;;;;;;;AAWA,IAAa,MAAM;;;;;;AAOnB,IAAa,aAAkD;CAC7D,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;AAClB;;AAGA,IAAa,aACX,MAAM,KAAK;CACT;CACA,MAAM;CACN,aACE;CAEF,gBAAgB;CAChB,WAAW;CACX,OAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC;CAC3C,cAAc,SAAS,KAAK,EAC1B,QAAQ,IAAI;;8HAE4G,UAAU,SAAS,gBAAgB,iBAAiB,EAAE;;;;4CAIxI,UAAU,SAAS,gBAAgB,oBAAoB,EAAE;QAEjG,CAAC;AACH,CAAC"}
@@ -0,0 +1,189 @@
1
+ import * as Capability from "@dxos/app-framework/Capability";
2
+ import * as Plugin from "@dxos/app-framework/Plugin";
3
+ import { GitHubCapabilities } from "#types";
4
+ import { DXN } from "@dxos/keys";
5
+ import * as Effect from "effect/Effect";
6
+ import { random } from "@dxos/random";
7
+ import { Issue, PullRequest, Repo } from "@dxos/types";
8
+ //#region src/testing/fixtures.ts
9
+ /** Deterministic per link, so a re-hover shows the same fixture. */
10
+ var seedFor = (link) => random.seed(link.url.split("").reduce((acc, char) => acc + char.charCodeAt(0), 1));
11
+ /** A repository fixture for a link, deterministic per URL. */
12
+ var createRepo = (link = {
13
+ owner: "dxos",
14
+ repo: "dxos",
15
+ kind: "repo",
16
+ url: "https://github.com/dxos/dxos"
17
+ }) => {
18
+ seedFor(link);
19
+ return Repo.make({
20
+ owner: link.owner,
21
+ name: link.repo,
22
+ url: link.url,
23
+ description: random.lorem.paragraph(),
24
+ defaultBranch: "main"
25
+ });
26
+ };
27
+ /** An issue fixture for a link, deterministic per URL. */
28
+ var createIssue = (link = {
29
+ owner: "dxos",
30
+ repo: "dxos",
31
+ kind: "issue",
32
+ number: 1,
33
+ url: "https://github.com/dxos/dxos/issues/1"
34
+ }) => {
35
+ seedFor(link);
36
+ return Issue.make({
37
+ owner: link.owner,
38
+ repo: link.repo,
39
+ number: link.number ?? 0,
40
+ url: link.url,
41
+ title: random.lorem.sentence(),
42
+ state: random.helpers.arrayElement(["open", "closed"]),
43
+ author: random.person.fullName(),
44
+ description: random.lorem.paragraph(),
45
+ labels: ["bug", "editor"]
46
+ });
47
+ };
48
+ /** A pull-request fixture for a link, deterministic per URL. */
49
+ var createPullRequest = (link = {
50
+ owner: "dxos",
51
+ repo: "dxos",
52
+ kind: "pull",
53
+ number: 13007,
54
+ url: "https://github.com/dxos/dxos/pull/13007"
55
+ }) => {
56
+ seedFor(link);
57
+ return PullRequest.make({
58
+ owner: link.owner,
59
+ repo: link.repo,
60
+ number: link.number ?? 0,
61
+ url: link.url,
62
+ title: random.lorem.sentence(),
63
+ state: random.helpers.arrayElement([
64
+ "open",
65
+ "merged",
66
+ "draft",
67
+ "closed"
68
+ ]),
69
+ author: random.person.fullName(),
70
+ description: random.lorem.paragraph(),
71
+ baseBranch: "main",
72
+ headBranch: `${random.lorem.word()}/${random.lorem.word()}`,
73
+ additions: random.number.int({
74
+ min: 5,
75
+ max: 900
76
+ }),
77
+ deletions: random.number.int({
78
+ min: 0,
79
+ max: 400
80
+ })
81
+ });
82
+ };
83
+ /** A repository the fixture source cannot reach, standing in for a private one the space holds no token for. */
84
+ var UNREACHABLE_REPO = "private";
85
+ /** A `LinkSource` answering from fixtures, so a story exercises the resolver without the network. */
86
+ var fixtureLinkSource = (link) => Effect.succeed(link.repo === "private" ? void 0 : link.kind === "repo" ? createRepo(link) : link.kind === "pull" ? createPullRequest(link) : createIssue(link));
87
+ //#endregion
88
+ //#region src/testing/plugin.ts
89
+ /** Replaces the plugin's default fetch: a story answers every link from fixtures, deterministic per URL. */
90
+ var FixtureLinkSourcePlugin = Plugin.define(Plugin.makeMeta({
91
+ key: DXN.make("org.dxos.plugin.github.testing.linkSource"),
92
+ name: "Fixture link source"
93
+ })).pipe(Plugin.addModule({
94
+ id: "linkSource",
95
+ provides: [GitHubCapabilities.LinkSource],
96
+ activate: () => Effect.succeed([Capability.contribute(GitHubCapabilities.LinkSource, fixtureLinkSource)])
97
+ }), Plugin.make);
98
+ //#endregion
99
+ //#region src/testing/pull-request-13348.ts
100
+ /** The body of dxos/dxos#13348 as GitHub returned it: R2 demo media, the Claude Code footer and the preview block. */
101
+ var PULL_REQUEST_13348_BODY = [
102
+ "Hovering a PR pill in a task body showed no card when the PR could not be fetched. Now the card opens, titled with the pill's short name (`#1145`), and says **No preview available.**",
103
+ "",
104
+ "**Demo (before → after):** https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/pr-pill-hover-card.webm",
105
+ "",
106
+ "| Before | After |",
107
+ "| --- | --- |",
108
+ "| [before](https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/before.png) | [after](https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/after.png) |",
109
+ "",
110
+ "## Root cause",
111
+ "",
112
+ "The reported pill is `https://github.com/dxos/edge/pull/1145` in the Stability project. SigNoz shows every hover on the reporting device logging `github link preview failed` with a **404** from `api.github.com/repos/dxos/edge/pulls/1145`, exactly one per hover. That means only the anonymous attempt ran: the DXOS space holds no GitHub connection, and `dxos/edge` is private. The resolver therefore returned `undefined`, and `preview-popover.ts` returned without doing anything. The pill looked live but was dead.",
113
+ "",
114
+ "Hover handling in the task row itself is fine. The existing `DescriptionLinks` story, and the same flow driven with Playwright, both open the card when the link resolves.",
115
+ "",
116
+ "## Change",
117
+ "",
118
+ "- `plugin-preview` `preview-popover.ts`: when no resolver answers a link that some resolver *matches*, open a card popover with no subject. The title comes from the resolver's `linkLabel`, and the deck already renders `No preview available.` for a card with no subject. The fallback is gated on `isPreviewLink`, so anchor activations that `EditorMenuProvider` owns (those with no `eid`) still fall through untouched. The stale-activation check now runs before the fallback, so a late lookup cannot reopen a card after the pointer has left.",
119
+ "- `plugin-testing` `Layout`: render the same no-preview body the deck does, so stories can show it.",
120
+ "- `plugin-github` fixtures: links into a repo named `private` resolve to nothing, standing in for a private repo with no token.",
121
+ "- `plugin-tasks` `TaskSetArticle` story `DescriptionLinkUnavailable`: hover a `acme/private` PR chip and expect the card with `#7` and `No preview available.` It **fails without the fix and passes with it**, verified in storybook.",
122
+ "",
123
+ "## Not in this PR",
124
+ "",
125
+ "Getting a real preview for `dxos/edge` PRs requires a GitHub connection in the DXOS space; that is data, not code. A card that says *why* (for example, \"connect GitHub to preview private repositories\") would be a follow-up in plugin-github.",
126
+ "",
127
+ "## Verification",
128
+ "",
129
+ "- `tsc --noEmit` is clean for plugin-preview, plugin-testing, plugin-github and plugin-tasks.",
130
+ "- `oxlint` is clean and `oxfmt` has been applied to the changed files.",
131
+ "- Storybook interactions: `DescriptionLinkUnavailable` PASS (FAIL with the fix reverted); `DescriptionLinks` still passes.",
132
+ "",
133
+ "🤖 Generated with [Claude Code](https://claude.com/claude-code)",
134
+ "",
135
+ "https://claude.ai/code/session_016GM9fXXzbrr6JGNeeQBCmj",
136
+ "",
137
+ "---",
138
+ "_Generated by [Claude Code](https://claude.ai/code/session_016GM9fXXzbrr6JGNeeQBCmj)_",
139
+ "",
140
+ "<!-- composer-preview:begin -->",
141
+ "---",
142
+ "🚀 Composer preview: https://pr-13348-composer-dev.dxos.workers.dev",
143
+ "<!-- composer-preview:end -->",
144
+ ""
145
+ ].join("\n");
146
+ var DEPOT = "https://depot.dev/orgs/t8fblrl00n/workflows/hfxxpk92lm?repo=dxos%2Fdxos&job=";
147
+ var run = (name, conclusion, job, startedAt, completedAt) => ({
148
+ name,
149
+ outcome: conclusion,
150
+ conclusion,
151
+ url: `${DEPOT}${job}`,
152
+ startedAt: `2026-09-23T${startedAt}Z`,
153
+ completedAt: `2026-09-23T${completedAt}Z`
154
+ });
155
+ /** The check runs on dxos/dxos#13348's head commit, as GitHub reported them. */
156
+ var PULL_REQUEST_13348_RUNS = [
157
+ run("Check / report", "skipped", "7fh69tgb95", "12:59:47", "12:59:47"),
158
+ run("Check / boot-budget-comment", "success", "c6p04pkb3t", "12:51:52", "12:51:55"),
159
+ run("Check / test (node-version=24.11.1, shard=3)", "success", "17h3h82gcs", "12:47:07", "12:51:45"),
160
+ run("Check / test (node-version=24.11.1, shard=2)", "success", "nbqk52q3fm", "12:47:08", "12:53:40"),
161
+ run("Check / e2e (browser=chromium, shard=rest)", "success", "gsf6kkw035", "12:47:06", "12:51:34"),
162
+ run("Check / test (node-version=24.11.1, shard=5)", "success", "0t4c6dtjn8", "12:47:08", "12:59:46"),
163
+ run("Check / e2e (browser=webkit, shard=rest)", "success", "9hl1kp2zwk", "12:47:07", "12:50:31"),
164
+ run("Check / e2e (browser=chromium, shard=composer)", "success", "v7nlm01xnb", "12:47:08", "12:54:10"),
165
+ run("Check / test (node-version=24.11.1, shard=4)", "success", "9cqxpk0681", "12:47:07", "12:54:31"),
166
+ run("Check / test (node-version=24.11.1, shard=1)", "success", "cfx86qgz5x", "12:47:07", "12:52:17"),
167
+ run("Check / e2e (browser=firefox, shard=composer)", "success", "q9c9nw1w7p", "12:47:07", "12:52:34"),
168
+ run("Check / test (node-version=24.11.1, shard=0)", "success", "0mlw67znhz", "12:47:07", "12:51:53"),
169
+ run("Check / boot-budget", "success", "b21gq1ptpd", "12:47:06", "12:51:46"),
170
+ run("Check / e2e (browser=webkit, shard=composer)", "success", "vj4z932vgt", "12:47:06", "12:54:09"),
171
+ run("Check / e2e (browser=firefox, shard=rest)", "success", "h9jbcv80ps", "12:47:05", "12:51:10"),
172
+ run("Check / changeset-reminder", "success", "cd9102dxk7", "12:47:07", "12:47:21"),
173
+ run("Check / check", "success", "2qvs1jfpvc", "12:47:05", "12:51:13"),
174
+ run("Check / memory", "success", "04427k64lt", "12:47:06", "12:48:34"),
175
+ run("Check / cli-foreign", "skipped", "q40pt3n8hc", "12:47:04", "12:47:04"),
176
+ run("Check / cli", "skipped", "jx1fp4bz0f", "12:47:03", "12:47:03"),
177
+ {
178
+ ...run("Model Fixture / model-fixture", "success", "dj3hv8l8vw", "12:46:57", "12:50:07"),
179
+ url: "https://depot.dev/orgs/t8fblrl00n/workflows/h01tzcxkbp?repo=dxos%2Fdxos&job=dj3hv8l8vw"
180
+ },
181
+ {
182
+ ...run("build", "success", "", "12:46:56", "12:51:42"),
183
+ url: "https://github.com/dxos/dxos/actions/runs/35862669563/job/107186431578"
184
+ }
185
+ ];
186
+ //#endregion
187
+ export { FixtureLinkSourcePlugin, PULL_REQUEST_13348_BODY, PULL_REQUEST_13348_RUNS, UNREACHABLE_REPO, createIssue, createPullRequest, createRepo, fixtureLinkSource };
188
+
189
+ //# sourceMappingURL=testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.mjs","names":[],"sources":["../../src/testing/fixtures.ts","../../src/testing/plugin.ts","../../src/testing/pull-request-13348.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { random } from '@dxos/random';\nimport { Issue, PullRequest, Repo } from '@dxos/types';\n\nimport { type GitHubCapabilities } from '#types';\n\nimport { type GitHubLink } from '../extensions/index.ts';\n\n// Kept out of the story modules: react-refresh only fast-refreshes a module whose exports are all\n// components, so factories exported beside a story force a full page reload on every edit.\n\n/** Deterministic per link, so a re-hover shows the same fixture. */\nconst seedFor = (link: GitHubLink) =>\n random.seed(link.url.split('').reduce((acc: number, char: string) => acc + char.charCodeAt(0), 1));\n\n/** A repository fixture for a link, deterministic per URL. */\nexport const createRepo = (\n link: GitHubLink = { owner: 'dxos', repo: 'dxos', kind: 'repo', url: 'https://github.com/dxos/dxos' },\n): Repo.Repo => {\n seedFor(link);\n return Repo.make({\n owner: link.owner,\n name: link.repo,\n url: link.url,\n description: random.lorem.paragraph(),\n defaultBranch: 'main',\n });\n};\n\n/** An issue fixture for a link, deterministic per URL. */\nexport const createIssue = (\n link: GitHubLink = {\n owner: 'dxos',\n repo: 'dxos',\n kind: 'issue',\n number: 1,\n url: 'https://github.com/dxos/dxos/issues/1',\n },\n): Issue.Issue => {\n seedFor(link);\n return Issue.make({\n owner: link.owner,\n repo: link.repo,\n number: link.number ?? 0,\n url: link.url,\n title: random.lorem.sentence(),\n state: random.helpers.arrayElement(['open', 'closed'] as const),\n author: random.person.fullName(),\n description: random.lorem.paragraph(),\n labels: ['bug', 'editor'],\n });\n};\n\n/** A pull-request fixture for a link, deterministic per URL. */\nexport const createPullRequest = (\n link: GitHubLink = {\n owner: 'dxos',\n repo: 'dxos',\n kind: 'pull',\n number: 13007,\n url: 'https://github.com/dxos/dxos/pull/13007',\n },\n): PullRequest.PullRequest => {\n seedFor(link);\n return PullRequest.make({\n owner: link.owner,\n repo: link.repo,\n number: link.number ?? 0,\n url: link.url,\n title: random.lorem.sentence(),\n state: random.helpers.arrayElement(['open', 'merged', 'draft', 'closed'] as const),\n author: random.person.fullName(),\n description: random.lorem.paragraph(),\n baseBranch: 'main',\n headBranch: `${random.lorem.word()}/${random.lorem.word()}`,\n additions: random.number.int({ min: 5, max: 900 }),\n deletions: random.number.int({ min: 0, max: 400 }),\n });\n};\n\n/** A repository the fixture source cannot reach, standing in for a private one the space holds no token for. */\nexport const UNREACHABLE_REPO = 'private';\n\n/** A `LinkSource` answering from fixtures, so a story exercises the resolver without the network. */\nexport const fixtureLinkSource: GitHubCapabilities.GitHubLinkSource = (link) =>\n Effect.succeed(\n link.repo === UNREACHABLE_REPO\n ? undefined\n : link.kind === 'repo'\n ? createRepo(link)\n : link.kind === 'pull'\n ? createPullRequest(link)\n : createIssue(link),\n );\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as Plugin from '@dxos/app-framework/Plugin';\nimport { DXN } from '@dxos/keys';\n\nimport { GitHubCapabilities } from '#types';\n\nimport { fixtureLinkSource } from './fixtures.ts';\n\n/** Replaces the plugin's default fetch: a story answers every link from fixtures, deterministic per URL. */\nexport const FixtureLinkSourcePlugin = Plugin.define(\n Plugin.makeMeta({ key: DXN.make('org.dxos.plugin.github.testing.linkSource'), name: 'Fixture link source' }),\n).pipe(\n Plugin.addModule({\n id: 'linkSource',\n provides: [GitHubCapabilities.LinkSource],\n activate: () => Effect.succeed([Capability.contribute(GitHubCapabilities.LinkSource, fixtureLinkSource)]),\n }),\n Plugin.make,\n);\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { type GitHubOperation } from '#types';\n\n// Kept out of the story modules: react-refresh only fast-refreshes a module whose exports are all\n// components.\n\n/** The body of dxos/dxos#13348 as GitHub returned it: R2 demo media, the Claude Code footer and the preview block. */\nexport const PULL_REQUEST_13348_BODY = [\n \"Hovering a PR pill in a task body showed no card when the PR could not be fetched. Now the card opens, titled with the pill's short name (`#1145`), and says **No preview available.**\",\n '',\n '**Demo (before → after):** https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/pr-pill-hover-card.webm',\n '',\n '| Before | After |',\n '| --- | --- |',\n '| [before](https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/before.png) | [after](https://pub-39066a86073446d7b77b1c157b660bb5.r2.dev/demos/2026-09-23-artifact/after.png) |',\n '',\n '## Root cause',\n '',\n 'The reported pill is `https://github.com/dxos/edge/pull/1145` in the Stability project. SigNoz shows every hover on the reporting device logging `github link preview failed` with a **404** from `api.github.com/repos/dxos/edge/pulls/1145`, exactly one per hover. That means only the anonymous attempt ran: the DXOS space holds no GitHub connection, and `dxos/edge` is private. The resolver therefore returned `undefined`, and `preview-popover.ts` returned without doing anything. The pill looked live but was dead.',\n '',\n 'Hover handling in the task row itself is fine. The existing `DescriptionLinks` story, and the same flow driven with Playwright, both open the card when the link resolves.',\n '',\n '## Change',\n '',\n \"- `plugin-preview` `preview-popover.ts`: when no resolver answers a link that some resolver *matches*, open a card popover with no subject. The title comes from the resolver's `linkLabel`, and the deck already renders `No preview available.` for a card with no subject. The fallback is gated on `isPreviewLink`, so anchor activations that `EditorMenuProvider` owns (those with no `eid`) still fall through untouched. The stale-activation check now runs before the fallback, so a late lookup cannot reopen a card after the pointer has left.\",\n '- `plugin-testing` `Layout`: render the same no-preview body the deck does, so stories can show it.',\n '- `plugin-github` fixtures: links into a repo named `private` resolve to nothing, standing in for a private repo with no token.',\n '- `plugin-tasks` `TaskSetArticle` story `DescriptionLinkUnavailable`: hover a `acme/private` PR chip and expect the card with `#7` and `No preview available.` It **fails without the fix and passes with it**, verified in storybook.',\n '',\n '## Not in this PR',\n '',\n 'Getting a real preview for `dxos/edge` PRs requires a GitHub connection in the DXOS space; that is data, not code. A card that says *why* (for example, \"connect GitHub to preview private repositories\") would be a follow-up in plugin-github.',\n '',\n '## Verification',\n '',\n '- `tsc --noEmit` is clean for plugin-preview, plugin-testing, plugin-github and plugin-tasks.',\n '- `oxlint` is clean and `oxfmt` has been applied to the changed files.',\n '- Storybook interactions: `DescriptionLinkUnavailable` PASS (FAIL with the fix reverted); `DescriptionLinks` still passes.',\n '',\n '🤖 Generated with [Claude Code](https://claude.com/claude-code)',\n '',\n 'https://claude.ai/code/session_016GM9fXXzbrr6JGNeeQBCmj',\n '',\n '---',\n '_Generated by [Claude Code](https://claude.ai/code/session_016GM9fXXzbrr6JGNeeQBCmj)_',\n '',\n '<!-- composer-preview:begin -->',\n '---',\n '🚀 Composer preview: https://pr-13348-composer-dev.dxos.workers.dev',\n '<!-- composer-preview:end -->',\n '',\n].join('\\n');\n\nconst DEPOT = 'https://depot.dev/orgs/t8fblrl00n/workflows/hfxxpk92lm?repo=dxos%2Fdxos&job=';\n\nconst run = (\n name: string,\n conclusion: 'success' | 'skipped',\n job: string,\n startedAt: string,\n completedAt: string,\n): GitHubOperation.CheckRun => ({\n name,\n outcome: conclusion,\n conclusion,\n url: `${DEPOT}${job}`,\n startedAt: `2026-09-23T${startedAt}Z`,\n completedAt: `2026-09-23T${completedAt}Z`,\n});\n\n/** The check runs on dxos/dxos#13348's head commit, as GitHub reported them. */\nexport const PULL_REQUEST_13348_RUNS: GitHubOperation.CheckRun[] = [\n run('Check / report', 'skipped', '7fh69tgb95', '12:59:47', '12:59:47'),\n run('Check / boot-budget-comment', 'success', 'c6p04pkb3t', '12:51:52', '12:51:55'),\n run('Check / test (node-version=24.11.1, shard=3)', 'success', '17h3h82gcs', '12:47:07', '12:51:45'),\n run('Check / test (node-version=24.11.1, shard=2)', 'success', 'nbqk52q3fm', '12:47:08', '12:53:40'),\n run('Check / e2e (browser=chromium, shard=rest)', 'success', 'gsf6kkw035', '12:47:06', '12:51:34'),\n run('Check / test (node-version=24.11.1, shard=5)', 'success', '0t4c6dtjn8', '12:47:08', '12:59:46'),\n run('Check / e2e (browser=webkit, shard=rest)', 'success', '9hl1kp2zwk', '12:47:07', '12:50:31'),\n run('Check / e2e (browser=chromium, shard=composer)', 'success', 'v7nlm01xnb', '12:47:08', '12:54:10'),\n run('Check / test (node-version=24.11.1, shard=4)', 'success', '9cqxpk0681', '12:47:07', '12:54:31'),\n run('Check / test (node-version=24.11.1, shard=1)', 'success', 'cfx86qgz5x', '12:47:07', '12:52:17'),\n run('Check / e2e (browser=firefox, shard=composer)', 'success', 'q9c9nw1w7p', '12:47:07', '12:52:34'),\n run('Check / test (node-version=24.11.1, shard=0)', 'success', '0mlw67znhz', '12:47:07', '12:51:53'),\n run('Check / boot-budget', 'success', 'b21gq1ptpd', '12:47:06', '12:51:46'),\n run('Check / e2e (browser=webkit, shard=composer)', 'success', 'vj4z932vgt', '12:47:06', '12:54:09'),\n run('Check / e2e (browser=firefox, shard=rest)', 'success', 'h9jbcv80ps', '12:47:05', '12:51:10'),\n run('Check / changeset-reminder', 'success', 'cd9102dxk7', '12:47:07', '12:47:21'),\n run('Check / check', 'success', '2qvs1jfpvc', '12:47:05', '12:51:13'),\n run('Check / memory', 'success', '04427k64lt', '12:47:06', '12:48:34'),\n run('Check / cli-foreign', 'skipped', 'q40pt3n8hc', '12:47:04', '12:47:04'),\n run('Check / cli', 'skipped', 'jx1fp4bz0f', '12:47:03', '12:47:03'),\n {\n ...run('Model Fixture / model-fixture', 'success', 'dj3hv8l8vw', '12:46:57', '12:50:07'),\n url: 'https://depot.dev/orgs/t8fblrl00n/workflows/h01tzcxkbp?repo=dxos%2Fdxos&job=dj3hv8l8vw',\n },\n {\n ...run('build', 'success', '', '12:46:56', '12:51:42'),\n url: 'https://github.com/dxos/dxos/actions/runs/35862669563/job/107186431578',\n },\n];\n"],"mappings":"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"}