@skaile/workspaces 5.1.3 → 5.3.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 (379) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +1 -1
  3. package/dist/app-sdk/index.js +1 -1
  4. package/dist/{asset-feeds-C4X4RTZV.js → asset-feeds-VIZXYDAO.js} +13 -13
  5. package/dist/{asset-feeds-C4X4RTZV.js.map → asset-feeds-VIZXYDAO.js.map} +1 -1
  6. package/dist/asset-manager/catalog-deployer.js +10 -10
  7. package/dist/asset-manager/index.js +14 -14
  8. package/dist/asset-manager/installer.js +10 -10
  9. package/dist/asset-manager/src/index.d.ts +39 -4
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/installer.d.ts +2 -1
  12. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  13. package/dist/bridge/drivers/claude-sdk.js +16 -15
  14. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  15. package/dist/bridge/drivers/codex.js +13 -12
  16. package/dist/bridge/drivers/codex.js.map +1 -1
  17. package/dist/bridge/drivers/continue.js +13 -13
  18. package/dist/bridge/drivers/echo.js +3 -3
  19. package/dist/bridge/drivers/gemini.js +5 -5
  20. package/dist/bridge/drivers/goose.js +13 -13
  21. package/dist/bridge/drivers/omp.js +6 -5
  22. package/dist/bridge/drivers/omp.js.map +1 -1
  23. package/dist/bridge/drivers/opencode.js +13 -13
  24. package/dist/bridge/drivers/qwen.js +5 -5
  25. package/dist/bridge/index.js +15 -15
  26. package/dist/bridge/src/driver-capabilities.d.ts +66 -0
  27. package/dist/bridge/src/driver-capabilities.d.ts.map +1 -0
  28. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  29. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  30. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  31. package/dist/bridge/src/index.d.ts +1 -0
  32. package/dist/bridge/src/index.d.ts.map +1 -1
  33. package/dist/bridge/src/registry.d.ts.map +1 -1
  34. package/dist/{chunk-7SAWDPUT.js → chunk-37GBJLF5.js} +5 -55
  35. package/dist/chunk-37GBJLF5.js.map +1 -0
  36. package/dist/{chunk-SP47UJKE.js → chunk-3ZVSINEV.js} +247 -118
  37. package/dist/chunk-3ZVSINEV.js.map +1 -0
  38. package/dist/{chunk-ZVKJNNME.js → chunk-4257Q2LH.js} +8 -8
  39. package/dist/{chunk-ZVKJNNME.js.map → chunk-4257Q2LH.js.map} +1 -1
  40. package/dist/{chunk-YDJZRLGN.js → chunk-4SSKKFDF.js} +4 -4
  41. package/dist/{chunk-YDJZRLGN.js.map → chunk-4SSKKFDF.js.map} +1 -1
  42. package/dist/{chunk-K5GBV4SA.js → chunk-5BEFNLOR.js} +6 -5
  43. package/dist/chunk-5BEFNLOR.js.map +1 -0
  44. package/dist/{chunk-IWCCZL7C.js → chunk-6GBQND2F.js} +99 -36
  45. package/dist/chunk-6GBQND2F.js.map +1 -0
  46. package/dist/{chunk-QU4J5YSJ.js → chunk-7L4WFH3Y.js} +4 -4
  47. package/dist/{chunk-QU4J5YSJ.js.map → chunk-7L4WFH3Y.js.map} +1 -1
  48. package/dist/{chunk-O4U7OL6D.js → chunk-A223FDDC.js} +6 -6
  49. package/dist/{chunk-O4U7OL6D.js.map → chunk-A223FDDC.js.map} +1 -1
  50. package/dist/{chunk-AZYIEK3F.js → chunk-AWGQVAC5.js} +3 -3
  51. package/dist/{chunk-AZYIEK3F.js.map → chunk-AWGQVAC5.js.map} +1 -1
  52. package/dist/{chunk-RDYI4MML.js → chunk-BNUZEYC3.js} +3 -3
  53. package/dist/{chunk-RDYI4MML.js.map → chunk-BNUZEYC3.js.map} +1 -1
  54. package/dist/{chunk-RNNUYFFD.js → chunk-BUZ3K2PT.js} +3 -3
  55. package/dist/{chunk-RNNUYFFD.js.map → chunk-BUZ3K2PT.js.map} +1 -1
  56. package/dist/{chunk-WKIOWDLQ.js → chunk-CZ35I4RK.js} +4 -4
  57. package/dist/{chunk-WKIOWDLQ.js.map → chunk-CZ35I4RK.js.map} +1 -1
  58. package/dist/{chunk-KWP4RVTJ.js → chunk-D63AJVBW.js} +761 -643
  59. package/dist/chunk-D63AJVBW.js.map +1 -0
  60. package/dist/{chunk-BJZHNSQO.js → chunk-DECPI7DN.js} +5 -5
  61. package/dist/{chunk-BJZHNSQO.js.map → chunk-DECPI7DN.js.map} +1 -1
  62. package/dist/{chunk-KVAI5DGL.js → chunk-ERCSHLTF.js} +3 -3
  63. package/dist/{chunk-KVAI5DGL.js.map → chunk-ERCSHLTF.js.map} +1 -1
  64. package/dist/{chunk-ZD7CX25M.js → chunk-FTYM4VRZ.js} +56 -7
  65. package/dist/chunk-FTYM4VRZ.js.map +1 -0
  66. package/dist/{chunk-DLLM4U6C.js → chunk-FXN4PLRO.js} +3 -3
  67. package/dist/{chunk-DLLM4U6C.js.map → chunk-FXN4PLRO.js.map} +1 -1
  68. package/dist/{chunk-KNC55536.js → chunk-FZGL7Z52.js} +5 -4
  69. package/dist/chunk-FZGL7Z52.js.map +1 -0
  70. package/dist/{chunk-WCQMXBO5.js → chunk-GCYD4EGY.js} +4 -4
  71. package/dist/{chunk-WCQMXBO5.js.map → chunk-GCYD4EGY.js.map} +1 -1
  72. package/dist/{chunk-EB6OPURC.js → chunk-HTKZ4AOW.js} +3 -3
  73. package/dist/{chunk-EB6OPURC.js.map → chunk-HTKZ4AOW.js.map} +1 -1
  74. package/dist/{chunk-YV4J7V53.js → chunk-JAJG4G5E.js} +3 -3
  75. package/dist/{chunk-YV4J7V53.js.map → chunk-JAJG4G5E.js.map} +1 -1
  76. package/dist/{chunk-TYUJB336.js → chunk-JELTQ4H7.js} +3 -3
  77. package/dist/{chunk-TYUJB336.js.map → chunk-JELTQ4H7.js.map} +1 -1
  78. package/dist/{chunk-VDJKWKH2.js → chunk-JKWU6ULI.js} +3 -3
  79. package/dist/{chunk-VDJKWKH2.js.map → chunk-JKWU6ULI.js.map} +1 -1
  80. package/dist/{chunk-AGWYBS2E.js → chunk-K2JVODQD.js} +18 -6
  81. package/dist/chunk-K2JVODQD.js.map +1 -0
  82. package/dist/{chunk-IDEA6CYI.js → chunk-K2K7OF4P.js} +95 -3
  83. package/dist/chunk-K2K7OF4P.js.map +1 -0
  84. package/dist/{chunk-MXXKTQXJ.js → chunk-KBAE7PU7.js} +18 -33
  85. package/dist/chunk-KBAE7PU7.js.map +1 -0
  86. package/dist/{chunk-ARUJBGAH.js → chunk-KXTO7HON.js} +3 -3
  87. package/dist/{chunk-ARUJBGAH.js.map → chunk-KXTO7HON.js.map} +1 -1
  88. package/dist/{chunk-TVOODIZE.js → chunk-LAI7X6I2.js} +3 -3
  89. package/dist/{chunk-TVOODIZE.js.map → chunk-LAI7X6I2.js.map} +1 -1
  90. package/dist/{chunk-DXUQCMVT.js → chunk-LFMX2UEF.js} +3 -3
  91. package/dist/{chunk-DXUQCMVT.js.map → chunk-LFMX2UEF.js.map} +1 -1
  92. package/dist/{chunk-UMSWQKCY.js → chunk-LM5XEFNS.js} +3 -3
  93. package/dist/{chunk-UMSWQKCY.js.map → chunk-LM5XEFNS.js.map} +1 -1
  94. package/dist/{chunk-TLKM4M47.js → chunk-MFHKHXDE.js} +6 -3
  95. package/dist/chunk-MFHKHXDE.js.map +1 -0
  96. package/dist/{chunk-5S4ZK75K.js → chunk-OMD4TAJX.js} +3 -3
  97. package/dist/{chunk-5S4ZK75K.js.map → chunk-OMD4TAJX.js.map} +1 -1
  98. package/dist/{chunk-M4ISBWXR.js → chunk-OOKFZW6H.js} +2472 -2265
  99. package/dist/chunk-OOKFZW6H.js.map +1 -0
  100. package/dist/{chunk-WPWJRDR3.js → chunk-QHIMMBJO.js} +8 -7
  101. package/dist/chunk-QHIMMBJO.js.map +1 -0
  102. package/dist/{chunk-KC3OF6B2.js → chunk-QMWMSZQ4.js} +3 -3
  103. package/dist/{chunk-KC3OF6B2.js.map → chunk-QMWMSZQ4.js.map} +1 -1
  104. package/dist/{chunk-AG44ZJ7W.js → chunk-SR4RFKHM.js} +35 -13
  105. package/dist/chunk-SR4RFKHM.js.map +1 -0
  106. package/dist/{chunk-RNOIDD3Y.js → chunk-TR7KFBIO.js} +7 -7
  107. package/dist/chunk-TR7KFBIO.js.map +1 -0
  108. package/dist/{chunk-YMOZC2D3.js → chunk-TVFSA5IQ.js} +4 -4
  109. package/dist/{chunk-YMOZC2D3.js.map → chunk-TVFSA5IQ.js.map} +1 -1
  110. package/dist/{chunk-H4EGUQ7M.js → chunk-VKSA2CDJ.js} +7 -8
  111. package/dist/chunk-VKSA2CDJ.js.map +1 -0
  112. package/dist/{chunk-I75CM2QF.js → chunk-VLEWVR44.js} +14 -15
  113. package/dist/chunk-VLEWVR44.js.map +1 -0
  114. package/dist/{chunk-RO4Z2CBP.js → chunk-WGN7Z36G.js} +21 -4
  115. package/dist/chunk-WGN7Z36G.js.map +1 -0
  116. package/dist/{chunk-BEOKEK3B.js → chunk-WGNFDLHT.js} +135 -64
  117. package/dist/chunk-WGNFDLHT.js.map +1 -0
  118. package/dist/{chunk-43ZBF3WH.js → chunk-WX74MVNA.js} +16 -3
  119. package/dist/chunk-WX74MVNA.js.map +1 -0
  120. package/dist/{chunk-U6K3I3AX.js → chunk-XGIS325V.js} +3 -3
  121. package/dist/{chunk-U6K3I3AX.js.map → chunk-XGIS325V.js.map} +1 -1
  122. package/dist/{chunk-UVOJSWD2.js → chunk-Y7UBRRKG.js} +107 -135
  123. package/dist/chunk-Y7UBRRKG.js.map +1 -0
  124. package/dist/{chunk-Y6V6NUEV.js → chunk-YTJZQ4HY.js} +3 -3
  125. package/dist/{chunk-Y6V6NUEV.js.map → chunk-YTJZQ4HY.js.map} +1 -1
  126. package/dist/{chunk-IAGCOAIW.js → chunk-YXNYBUQY.js} +5 -5
  127. package/dist/{chunk-IAGCOAIW.js.map → chunk-YXNYBUQY.js.map} +1 -1
  128. package/dist/chunk-ZCSFGGLG.js +15 -0
  129. package/dist/{chunk-XUQBVK4R.js.map → chunk-ZCSFGGLG.js.map} +1 -1
  130. package/dist/{chunk-2HR3RPWD.js → chunk-ZDMGMWK6.js} +13 -11
  131. package/dist/chunk-ZDMGMWK6.js.map +1 -0
  132. package/dist/cli/index.js +696 -552
  133. package/dist/cli/index.js.map +1 -1
  134. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  135. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  136. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  137. package/dist/cli/src/commands/config.d.ts.map +1 -1
  138. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  139. package/dist/cli/src/commands/library-index.d.ts +43 -1
  140. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  141. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  142. package/dist/cli/src/commands/outdated.d.ts +3 -1
  143. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  144. package/dist/cli/src/commands/project.d.ts.map +1 -1
  145. package/dist/cli/src/commands/run.d.ts.map +1 -1
  146. package/dist/cli/src/commands/skailify-lib.d.ts +3 -47
  147. package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
  148. package/dist/cli/src/commands/source.d.ts.map +1 -1
  149. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  150. package/dist/cli/src/flow-discovery.d.ts +9 -0
  151. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  152. package/dist/cli/src/helpers.d.ts +13 -0
  153. package/dist/cli/src/helpers.d.ts.map +1 -1
  154. package/dist/cli/src/setup.d.ts.map +1 -1
  155. package/dist/connectors/config.js +6 -6
  156. package/dist/connectors/index.js +19 -19
  157. package/dist/connectors/src/connector-manager.d.ts +8 -27
  158. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  159. package/dist/connectors/src/index.d.ts +1 -1
  160. package/dist/connectors/src/index.d.ts.map +1 -1
  161. package/dist/connectors/src/mount-ledger.d.ts +61 -0
  162. package/dist/connectors/src/mount-ledger.d.ts.map +1 -0
  163. package/dist/{connectors-BQXFKISC.js → connectors-Z2FUGAJU.js} +22 -22
  164. package/dist/{connectors-BQXFKISC.js.map → connectors-Z2FUGAJU.js.map} +1 -1
  165. package/dist/connectors-shared/index.js +2 -2
  166. package/dist/core/framework.js +1 -1
  167. package/dist/core/index.js +9 -9
  168. package/dist/core/manifest.js +2 -2
  169. package/dist/core/models.js +1 -1
  170. package/dist/core/publish-manifest.js +2 -2
  171. package/dist/core/ref.js +1 -1
  172. package/dist/core/runtime-assets.js +6 -6
  173. package/dist/core/src/asset-roots.d.ts +8 -0
  174. package/dist/core/src/asset-roots.d.ts.map +1 -1
  175. package/dist/core/src/cache-paths.d.ts +6 -0
  176. package/dist/core/src/cache-paths.d.ts.map +1 -1
  177. package/dist/core/src/framework.d.ts +7 -0
  178. package/dist/core/src/framework.d.ts.map +1 -1
  179. package/dist/core/src/index.d.ts +6 -6
  180. package/dist/core/src/index.d.ts.map +1 -1
  181. package/dist/core/src/lock.d.ts +12 -0
  182. package/dist/core/src/lock.d.ts.map +1 -1
  183. package/dist/core/src/manifest-yaml-editor.d.ts +14 -6
  184. package/dist/core/src/manifest-yaml-editor.d.ts.map +1 -1
  185. package/dist/core/src/models.d.ts +22 -0
  186. package/dist/core/src/models.d.ts.map +1 -1
  187. package/dist/core/src/publish-manifest.d.ts +28 -6
  188. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  189. package/dist/core/src/settings.d.ts.map +1 -1
  190. package/dist/core/src/walker.d.ts.map +1 -1
  191. package/dist/core/store.js +2 -2
  192. package/dist/core/workspace-config.js +5 -5
  193. package/dist/deploy/index.js +9 -9
  194. package/dist/discovery/index.js +4 -4
  195. package/dist/discovery/src/discover-manifest.d.ts +5 -0
  196. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  197. package/dist/discovery/src/discover.d.ts.map +1 -1
  198. package/dist/discovery/src/hash.d.ts +45 -23
  199. package/dist/discovery/src/hash.d.ts.map +1 -1
  200. package/dist/discovery/src/index.d.ts +3 -1
  201. package/dist/discovery/src/index.d.ts.map +1 -1
  202. package/dist/discovery/src/parse-manifest.d.ts +27 -0
  203. package/dist/discovery/src/parse-manifest.d.ts.map +1 -0
  204. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  205. package/dist/{ensure-sources-CMHOTYFS.js → ensure-sources-3IH5XHAP.js} +17 -17
  206. package/dist/{ensure-sources-CMHOTYFS.js.map → ensure-sources-3IH5XHAP.js.map} +1 -1
  207. package/dist/factory-assets/connectors/box.js +19 -19
  208. package/dist/factory-assets/connectors/deploy.js +19 -19
  209. package/dist/factory-assets/connectors/devserver.js +19 -19
  210. package/dist/factory-assets/connectors/flow/adapter.d.ts +28 -4
  211. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  212. package/dist/factory-assets/connectors/flow/adapter.js +19 -19
  213. package/dist/factory-assets/connectors/flow/engine.js +10 -10
  214. package/dist/factory-assets/connectors/flow/index.d.ts +1 -1
  215. package/dist/factory-assets/connectors/flow/index.d.ts.map +1 -1
  216. package/dist/factory-assets/connectors/flow/run-flow.js +21 -21
  217. package/dist/factory-assets/connectors/flow.js +19 -19
  218. package/dist/factory-assets/connectors/git/checkout.d.ts +161 -0
  219. package/dist/factory-assets/connectors/git/checkout.d.ts.map +1 -0
  220. package/dist/factory-assets/connectors/git/config.d.ts +78 -0
  221. package/dist/factory-assets/connectors/git/config.d.ts.map +1 -0
  222. package/dist/factory-assets/connectors/git/credentials.d.ts +93 -0
  223. package/dist/factory-assets/connectors/git/credentials.d.ts.map +1 -0
  224. package/dist/factory-assets/connectors/git/driver.d.ts +39 -598
  225. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  226. package/dist/factory-assets/connectors/git/exec.d.ts +177 -0
  227. package/dist/factory-assets/connectors/git/exec.d.ts.map +1 -0
  228. package/dist/factory-assets/connectors/git/inspect.d.ts +120 -0
  229. package/dist/factory-assets/connectors/git/inspect.d.ts.map +1 -0
  230. package/dist/factory-assets/connectors/git/lifecycle.d.ts +107 -0
  231. package/dist/factory-assets/connectors/git/lifecycle.d.ts.map +1 -0
  232. package/dist/factory-assets/connectors/git/repo.d.ts +496 -0
  233. package/dist/factory-assets/connectors/git/repo.d.ts.map +1 -0
  234. package/dist/factory-assets/connectors/git.js +19 -19
  235. package/dist/factory-assets/connectors/gmail.js +19 -19
  236. package/dist/factory-assets/connectors/googledrive.js +19 -19
  237. package/dist/factory-assets/connectors/local.js +19 -19
  238. package/dist/factory-assets/connectors/mattermost.js +19 -19
  239. package/dist/factory-assets/connectors/memory.js +19 -19
  240. package/dist/factory-assets/connectors/minio.js +19 -19
  241. package/dist/factory-assets/connectors/postgres.js +19 -19
  242. package/dist/factory-assets/connectors/s3.js +19 -19
  243. package/dist/factory-assets/connectors/sharepoint.js +19 -19
  244. package/dist/factory-assets/connectors/sqlite.js +19 -19
  245. package/dist/factory-assets/connectors/static-server.js +19 -19
  246. package/dist/factory-assets/connectors/tunnel.js +19 -19
  247. package/dist/factory-assets/connectors/webdav.js +19 -19
  248. package/dist/factory-assets/connectors/xstate-store.js +19 -19
  249. package/dist/factory-assets/connectors/xstate.js +19 -19
  250. package/dist/flows-64OAOYLP.js +26 -0
  251. package/dist/{flows-SVCCADGE.js.map → flows-64OAOYLP.js.map} +1 -1
  252. package/dist/{helpers-R3GLTAER.js → helpers-HV5Y57CY.js} +17 -17
  253. package/dist/{helpers-R3GLTAER.js.map → helpers-HV5Y57CY.js.map} +1 -1
  254. package/dist/library/index.js +12 -12
  255. package/dist/library/install.js +3 -2
  256. package/dist/library/src/config.d.ts +5 -4
  257. package/dist/library/src/config.d.ts.map +1 -1
  258. package/dist/library/src/index.d.ts +6 -3
  259. package/dist/library/src/index.d.ts.map +1 -1
  260. package/dist/library/src/install/install-from-manifest.d.ts +21 -0
  261. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  262. package/dist/library/src/local/install-library-asset.d.ts +64 -0
  263. package/dist/library/src/local/install-library-asset.d.ts.map +1 -0
  264. package/dist/library/src/local/library.d.ts.map +1 -1
  265. package/dist/library/src/local/local-catalog-source.d.ts +30 -0
  266. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  267. package/dist/library/src/local/store-paths.d.ts +6 -0
  268. package/dist/library/src/local/store-paths.d.ts.map +1 -1
  269. package/dist/library/src/manifest-writer.d.ts +79 -0
  270. package/dist/library/src/manifest-writer.d.ts.map +1 -0
  271. package/dist/library/src/sync/git-driver.d.ts +8 -0
  272. package/dist/library/src/sync/git-driver.d.ts.map +1 -1
  273. package/dist/library/src/sync/manifest-writeback.d.ts +2 -17
  274. package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
  275. package/dist/{library-publish-EL7VYICU.js → library-publish-TVS3WQ4C.js} +27 -25
  276. package/dist/library-publish-TVS3WQ4C.js.map +1 -0
  277. package/dist/{open-library-MTD34YX3.js → open-library-AT6RYQ5M.js} +20 -20
  278. package/dist/{open-library-MTD34YX3.js.map → open-library-AT6RYQ5M.js.map} +1 -1
  279. package/dist/open-registry-F2Z4OLXJ.js +32 -0
  280. package/dist/{open-registry-CHCWKV5W.js.map → open-registry-F2Z4OLXJ.js.map} +1 -1
  281. package/dist/paths-P7ZXMDCX.js +22 -0
  282. package/dist/{paths-MKSI52PF.js.map → paths-P7ZXMDCX.js.map} +1 -1
  283. package/dist/plugin-registry/src/targets.d.ts +3 -1
  284. package/dist/plugin-registry/src/targets.d.ts.map +1 -1
  285. package/dist/{plugin-store-SVYV7L4C.js → plugin-store-27KGLW4S.js} +11 -11
  286. package/dist/{plugin-store-SVYV7L4C.js.map → plugin-store-27KGLW4S.js.map} +1 -1
  287. package/dist/{project-HCNWJP7J.js → project-J2EROMBW.js} +18 -18
  288. package/dist/{project-HCNWJP7J.js.map → project-J2EROMBW.js.map} +1 -1
  289. package/dist/resolver/index.js +10 -10
  290. package/dist/runner/index.js +29 -29
  291. package/dist/runner/src/agent.d.ts +1 -1
  292. package/dist/runner/src/agent.d.ts.map +1 -1
  293. package/dist/runner/src/codex-init.d.ts.map +1 -1
  294. package/dist/runner/src/compaction-gate.d.ts +9 -33
  295. package/dist/runner/src/compaction-gate.d.ts.map +1 -1
  296. package/dist/runner/src/managed-codex-bootstrap.d.ts.map +1 -1
  297. package/dist/runner/src/pending-turns.d.ts +7 -2
  298. package/dist/runner/src/pending-turns.d.ts.map +1 -1
  299. package/dist/runner/src/resources.d.ts +2 -2
  300. package/dist/runner/src/resources.d.ts.map +1 -1
  301. package/dist/runner/src/serve-credentials.d.ts +2 -1
  302. package/dist/runner/src/serve-credentials.d.ts.map +1 -1
  303. package/dist/runner/src/serve.d.ts +19 -35
  304. package/dist/runner/src/serve.d.ts.map +1 -1
  305. package/dist/runner/src/session-builder.d.ts.map +1 -1
  306. package/dist/runner/src/turn-scheduler.d.ts +158 -0
  307. package/dist/runner/src/turn-scheduler.d.ts.map +1 -0
  308. package/dist/sdk/asset-manager.js +14 -14
  309. package/dist/sdk/bridge.js +15 -15
  310. package/dist/sdk/core.js +9 -9
  311. package/dist/sdk/flow.js +10 -10
  312. package/dist/sdk/index.js +29 -29
  313. package/dist/sdk/resolver.js +10 -10
  314. package/dist/sdk/runner.js +29 -29
  315. package/dist/sdk/session.js +2 -2
  316. package/dist/sdk/types.js +1 -1
  317. package/dist/secrets/index.js +2 -2
  318. package/dist/session/index.js +2 -2
  319. package/dist/session/src/dispatcher.d.ts.map +1 -1
  320. package/dist/{setup-HTXNR2CZ.js → setup-IFGA4NQA.js} +25 -25
  321. package/dist/setup-IFGA4NQA.js.map +1 -0
  322. package/dist/skills-3T55L4YT.js +26 -0
  323. package/dist/{skills-7K2YO3KN.js.map → skills-3T55L4YT.js.map} +1 -1
  324. package/dist/{source-UIFC2PFC.js → source-HEAE43IL.js} +21 -21
  325. package/dist/{source-UIFC2PFC.js.map → source-HEAE43IL.js.map} +1 -1
  326. package/dist/{source-manifest-publish-QKAKXDVH.js → source-manifest-publish-SCAHAYSQ.js} +23 -23
  327. package/dist/{source-manifest-publish-QKAKXDVH.js.map → source-manifest-publish-SCAHAYSQ.js.map} +1 -1
  328. package/dist/tui/index.js +30 -30
  329. package/dist/tui/index.js.map +1 -1
  330. package/dist/types/index.js +1 -1
  331. package/dist/types/src/delivery.d.ts +26 -0
  332. package/dist/types/src/delivery.d.ts.map +1 -0
  333. package/dist/types/src/index.d.ts +3 -1
  334. package/dist/types/src/index.d.ts.map +1 -1
  335. package/dist/types/src/runtime.d.ts +51 -0
  336. package/dist/types/src/runtime.d.ts.map +1 -1
  337. package/dist/workspace-plugin/adapters/mcp.js +26 -26
  338. package/dist/workspace-plugin/adapters/omp.js +18 -17
  339. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  340. package/dist/workspace-plugin/index.js +2 -1
  341. package/dist/workspace-plugin/src/adapters/mcp.d.ts.map +1 -1
  342. package/dist/workspace-plugin/src/adapters/omp.d.ts.map +1 -1
  343. package/dist/workspace-plugin/src/plugin.d.ts.map +1 -1
  344. package/package.json +1 -1
  345. package/dist/chunk-2HR3RPWD.js.map +0 -1
  346. package/dist/chunk-43ZBF3WH.js.map +0 -1
  347. package/dist/chunk-7SAWDPUT.js.map +0 -1
  348. package/dist/chunk-AG44ZJ7W.js.map +0 -1
  349. package/dist/chunk-AGWYBS2E.js.map +0 -1
  350. package/dist/chunk-BEOKEK3B.js.map +0 -1
  351. package/dist/chunk-F7JHP7JV.js +0 -122
  352. package/dist/chunk-F7JHP7JV.js.map +0 -1
  353. package/dist/chunk-H4EGUQ7M.js.map +0 -1
  354. package/dist/chunk-I75CM2QF.js.map +0 -1
  355. package/dist/chunk-IDEA6CYI.js.map +0 -1
  356. package/dist/chunk-IWCCZL7C.js.map +0 -1
  357. package/dist/chunk-K5GBV4SA.js.map +0 -1
  358. package/dist/chunk-KNC55536.js.map +0 -1
  359. package/dist/chunk-KWP4RVTJ.js.map +0 -1
  360. package/dist/chunk-M4ISBWXR.js.map +0 -1
  361. package/dist/chunk-MXXKTQXJ.js.map +0 -1
  362. package/dist/chunk-RNOIDD3Y.js.map +0 -1
  363. package/dist/chunk-RO4Z2CBP.js.map +0 -1
  364. package/dist/chunk-SP47UJKE.js.map +0 -1
  365. package/dist/chunk-TLKM4M47.js.map +0 -1
  366. package/dist/chunk-UVOJSWD2.js.map +0 -1
  367. package/dist/chunk-WPWJRDR3.js.map +0 -1
  368. package/dist/chunk-XUQBVK4R.js +0 -15
  369. package/dist/chunk-ZD7CX25M.js.map +0 -1
  370. package/dist/flows-SVCCADGE.js +0 -26
  371. package/dist/library-publish-EL7VYICU.js.map +0 -1
  372. package/dist/open-registry-CHCWKV5W.js +0 -32
  373. package/dist/paths-MKSI52PF.js +0 -22
  374. package/dist/runner/src/flow-turn-dispatch.d.ts +0 -41
  375. package/dist/runner/src/flow-turn-dispatch.d.ts.map +0 -1
  376. package/dist/runner/src/reply-routing.d.ts +0 -54
  377. package/dist/runner/src/reply-routing.d.ts.map +0 -1
  378. package/dist/setup-HTXNR2CZ.js.map +0 -1
  379. package/dist/skills-7K2YO3KN.js +0 -26
@@ -1,193 +1,44 @@
1
1
  /**
2
- * GitConnector — git repository filesystem-face connector.
2
+ * GitConnector - git repository filesystem-face connector.
3
3
  * Mounts a git repo by cloning/pulling to a local directory.
4
4
  * Session-aware: auto-branching, lifecycle hooks (hibernate/close), periodic fetch/rebase.
5
5
  *
6
- * Everything in this file that touches `mountPath` is asynchronous and
7
- * deadline-bounded. Inside the agent container that path is the rclone FUSE
8
- * mount, and a synchronous `execSync` / `fs` call there parks the entire
9
- * single-threaded event loop in an uninterruptible kernel wait — a hang, not an
10
- * error, so `try/catch` never fires and the whole session dies (issue #454).
6
+ * The connector itself is an adapter: it wires one mount's three collaborators
7
+ * to the connector contract and holds no git logic of its own.
8
+ *
9
+ * - `credentials.ts` - token acquisition, refresh, the agent-facing gitconfig;
10
+ * - `repo.ts` - every operation on the checkout (clone, commit, merge, push, pull);
11
+ * - `lifecycle.ts` - when those run (timers, hibernate, session close, read-only refresh).
11
12
  */
12
13
  import type { ConnectContext, ConnectorChangeEvent, ConnectorDeclaration, ConnectorHandle, ConnectorHookReport, FilesystemFace, ToolFace, WatchHandle, WatchOptions } from "@skaile/workspaces/connectors";
13
14
  import { AbstractConnector } from "@skaile/workspaces/connectors";
14
- interface GitSessionConfig {
15
- enabled: boolean;
16
- slug?: string;
17
- isMain: boolean;
18
- branchPrefix: string;
19
- /**
20
- * Starting point for a freshly-created session branch. When set and the
21
- * session branch does not already exist on origin, the driver fetches this
22
- * ref and branches from it instead of from the base branch tip. Used by
23
- * the platform's fork flow so a forked session branches off the source
24
- * session's tip rather than off `main`. May be a branch name (e.g.
25
- * `skaile/session-source-slug`) or a commit SHA. Ignored when the session
26
- * branch already exists on origin (existing branch wins). No-op when
27
- * `enabled = false` or `isMain = true` (only branch sessions cut new
28
- * branches). The value is validated against `isValidGitRefOrSha` before
29
- * use; refs with shell metacharacters are rejected and the driver falls
30
- * back to branching off base.
31
- */
32
- fromRef?: string;
33
- }
34
- interface GitSyncConfig {
35
- fetchIntervalSec: number;
36
- autoRebase: boolean;
37
- autoPull: boolean;
38
- }
39
- interface GitLifecycleConfig {
40
- commitOnHibernate: boolean;
41
- pushOnHibernate: boolean;
42
- mergeOnClose: boolean;
43
- pushOnClose: boolean;
44
- /** Auto-commit after N ms of no file changes. 0 = disabled. Default: 30000 (30s). */
45
- autoCommitIdleMs: number;
46
- /** Push to remote after each auto-commit. */
47
- pushAfterCommit: boolean;
48
- /** Push freshly-created session branch to origin on connect. Best-effort — push
49
- * failures are swallowed; lifecycle push hooks remain the backstop. */
50
- publishOnCreate: boolean;
51
- }
52
- /**
53
- * Resolve the session/sync/lifecycle config blocks for a git connector. `mode`
54
- * seeds per-block defaults (`agent` / `sync`); explicit `options.{session,sync,
55
- * lifecycle}` keys still override those defaults. Absent `mode` reproduces the
56
- * legacy literals exactly, so behavior is unchanged for declarations that set none.
57
- */
58
- declare function resolveGitConfig(args: {
59
- mode?: "agent" | "sync";
60
- options?: Record<string, unknown>;
61
- }): {
62
- session: GitSessionConfig;
63
- sync: GitSyncConfig;
64
- lifecycle: GitLifecycleConfig;
65
- };
66
- /** How long before the minted token's expiry the proactive refresh fires. */
67
- export declare const REFRESH_LEAD_MS: number;
68
- /**
69
- * Shortest refresh re-arm. A mediator that keeps minting tokens already inside
70
- * {@link REFRESH_LEAD_MS} would otherwise be asked for a new one every second.
71
- * A token living under this floor lapses until the next tick: Tier-2 recovers
72
- * sooner through the reactive retry-401 path, Tier-1 (no helper) waits for the
73
- * tick to put a fresh token in state.
74
- */
75
- export declare const MIN_REFRESH_DELAY_MS = 30000;
76
- /**
77
- * Longest delay ever handed to `setTimeout`, a margin below its 2^31-1 ms
78
- * ceiling (above which the delay silently collapses to 1 ms). Same cap the
79
- * runner's AI-credential scheduler uses.
80
- */
81
- export declare const MAX_REARM_MS: number;
82
- /**
83
- * The remote a network git command authenticates against. `GitState` satisfies
84
- * it, and is passed as-is so a rotated token is read at spawn time.
85
- */
86
- interface GitRemoteAuth {
87
- url: string;
88
- token?: string;
89
- /**
90
- * Scope the header to this repository's URL instead of its host. For the
91
- * agent's ops: a same-host `pushurl` / `insteadOf` the agent sets after the
92
- * origin check then gets no header. Off for the driver's own commands, whose
93
- * relative submodules on the same host need it.
94
- */
95
- repoScoped?: boolean;
96
- }
97
- /**
98
- * `auth.url` without userinfo when a token will authenticate it — the URL that
99
- * goes into `origin`. Without a token the declared URL is used unchanged.
100
- */
101
- declare function plainRemoteUrl(auth: GitRemoteAuth): string;
102
- /**
103
- * Child environment for a network git command: the token as an
104
- * `http.<origin>.extraHeader` through `GIT_CONFIG_COUNT`, so it reaches git
105
- * without touching `.git/config`, a credentials file, or the argv (which
106
- * `/proc/<pid>/cmdline` and git's own error messages expose).
107
- *
108
- * Scoped to scheme, host and port, not the repository path: a relative
109
- * submodule on the same host needs it too, and git does not send it to a host
110
- * that `origin` or an `insteadOf` rule was re-pointed at.
111
- */
112
- declare function networkGitEnv(auth: GitRemoteAuth | undefined, base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
113
- /**
114
- * Run a git command that talks to a remote, authenticated for this one
115
- * command only. Every clone, fetch, pull, push, ls-remote and submodule update
116
- * of this driver goes through here.
117
- */
118
- declare function runRemoteGit(args: string[], auth: GitRemoteAuth | undefined, options: {
119
- cwd?: string;
120
- /**
121
- * Child working directory for a command that names its remote by URL and
122
- * must not run inside a repository. Unlike `cwd`, the TLS-trust scan does
123
- * not treat it as a checkout.
124
- */
125
- neutralCwd?: string;
126
- safeDir: string;
127
- timeout: number;
128
- env?: NodeJS.ProcessEnv;
129
- }): Promise<string>;
130
- /**
131
- * An https remote without userinfo, query or fragment (as `origin` is written
132
- * on either tier); any other URL unchanged. Used to compare remotes and as the
133
- * repository scope of a header.
134
- */
135
- declare function comparableRemoteUrl(url: string): string;
136
- /**
137
- * Snapshot returned by the `sync_status` tool op. JSON-serialised over the
138
- * transport; the platform overlays `available`/`containerAwake`/`reason`
139
- * before handing it to the UI badge.
140
- */
141
- export interface GitSyncStatusResult {
142
- /** Current branch name, or `null` (detached HEAD / unavailable). */
143
- branch: string | null;
144
- /** Working tree has uncommitted changes (`git status --porcelain` non-empty). */
145
- dirty: boolean;
146
- /** Commits on HEAD not on its upstream — i.e. unpushed. */
147
- ahead: number;
148
- /** Commits on the upstream not on HEAD — i.e. unpulled (since last fetch). */
149
- behind: number;
150
- /**
151
- * Whether the current branch has a configured upstream. `false` ⇒ the branch
152
- * has never been pushed; `ahead`/`behind` read as 0 (no remote-tracking ref
153
- * to diff against), so this distinguishes "never pushed" from "synced".
154
- */
155
- hasUpstream: boolean;
156
- /** Commits on HEAD not on `origin/<baseBranch>` — diverged ahead of base. */
157
- mainAhead: number;
158
- /** Commits on `origin/<baseBranch>` not on HEAD — diverged behind base. */
159
- mainBehind: number;
160
- /** Current HEAD commit SHA, or `null` when unavailable. */
161
- commitSha: string | null;
15
+ import { type GitCredentials } from "./credentials.js";
16
+ import { GitLifecycle } from "./lifecycle.js";
17
+ import { GitRepo } from "./repo.js";
18
+ export { readGitSyncStatus } from "./inspect.js";
19
+ export type { GitSyncStatusResult } from "./inspect.js";
20
+ export type { GitRemoteOpResult } from "./repo.js";
21
+ /** A mount this connector runs git for: its three collaborators, plus the change sink `watch` installs. */
22
+ export interface GitOwnedMount {
23
+ fleetManaged?: undefined;
24
+ credentials: GitCredentials;
25
+ repo: GitRepo;
26
+ lifecycle: GitLifecycle;
27
+ /** Callback for emitting change events (set by `watch()`). */
28
+ emitChange?: (event: ConnectorChangeEvent) => void;
162
29
  }
163
- /**
164
- * Result of the agent-facing `push`, `pull` and `fetch` tool ops, JSON-serialised.
165
- * An expected outcome the agent must act on (a rejected push, a conflicting
166
- * pull) is a `status`, not a thrown error; auth or network failures throw.
167
- */
168
- export interface GitRemoteOpResult {
169
- op: "push" | "pull" | "fetch";
170
- /** The mount's branch the op acted on (the session branch on a branching mount). */
30
+ /** A mount whose clone, pull, commit and push the host's GitFleetService owns. */
31
+ export interface GitFleetMount {
32
+ fleetManaged: true;
33
+ /** The branch the host's worktree is on (`unknown` when it could not be read). */
171
34
  branch: string;
172
- status: "pushed" | "rejected" | "fetched" | "merged" | "up-to-date" | "no-upstream" | "conflict" | "blocked";
173
- /** What happened and what to do next, in words the agent can act on. */
174
- message?: string;
175
- /** Files that conflicted, for `status: "conflict"` (the merge itself was aborted). */
176
- conflicts?: string[];
177
- /** Sync status after the op. */
178
- sync: GitSyncStatusResult;
35
+ /** Callback for emitting change events (set by `watch()`). */
36
+ emitChange?: (event: ConnectorChangeEvent) => void;
37
+ /** Auto-started watcher (no auto-commit timer); disposed in `disconnect`. */
38
+ fleetWatcher?: WatchHandle;
179
39
  }
180
- /**
181
- * Read git sync status for an in-container checkout. Pure and never throws —
182
- * every git call degrades to a safe default. No network fetch:
183
- * ahead/behind reflect locally-known remote-tracking refs ("since last sync").
184
- * `baseBranch` is the mount's tracked base (e.g. "main"); base divergence is
185
- * measured against `origin/<baseBranch>`.
186
- *
187
- * Asynchronous since v3: every `git` call it makes runs against a path that may
188
- * be a network mount, and the synchronous version blocked the event loop there.
189
- */
190
- export declare function readGitSyncStatus(cwd: string, baseBranch: string): Promise<GitSyncStatusResult>;
40
+ /** What `ConnectorHandle.state` holds for a git mount. */
41
+ export type GitMountState = GitOwnedMount | GitFleetMount;
191
42
  /**
192
43
  * Filesystem-face connector for git repositories — clones or pulls on connect, supports
193
44
  * session branching, periodic fetch/rebase, and lifecycle hooks (hibernate commit/push,
@@ -211,118 +62,12 @@ export declare class GitConnector extends AbstractConnector {
211
62
  private _describeOperations;
212
63
  private _executeOp;
213
64
  /**
214
- * Run `fn` after every earlier job on this mount has settled. Network git and
215
- * index-writing git on one checkout must not overlap: two of them contend for
216
- * `.git/index.lock`, and a push racing a pull can push a half-merged branch.
217
- * Not re-entrant — a job must never wait on the lock it runs under.
218
- */
219
- private withMountLock;
220
- /**
221
- * The agent's network git: the driver runs it with the mount's credential, so
222
- * an agent on a mount without `exposeAccessToken` can push and pull without
223
- * ever holding the token. Acts only on the mount's own branch, never forces.
65
+ * The agent's network git. Refuses unless the mount is connected, owned by
66
+ * this driver, and (for `push`) not declared read-only; the repo then runs the
67
+ * op under the mount lock with the mount's credential.
224
68
  */
225
69
  private agentRemoteOp;
226
- /** Fetch origin's base branch and, on a branching mount, the session branch. */
227
- private fetchActiveBranch;
228
- private agentFetch;
229
- private agentPush;
230
- private agentPull;
231
70
  connect(declaration: ConnectorDeclaration, ctx: ConnectContext): Promise<ConnectorHandle>;
232
- /**
233
- * Bring `targetDir` into a usable checkout state for `connect()`.
234
- *
235
- * Minimal-connect policy: `connect()` never auto-syncs with the remote.
236
- * The lifecycle hooks (`pushOnHibernate`, `pushAfterCommit`,
237
- * `sync.autoPull`) and the explicit `filesystem.sync()` method are the
238
- * only paths that touch the network with the existing checkout. Recreating
239
- * a container is therefore idempotent — the on-disk dir is preserved.
240
- *
241
- * Three cases:
242
- * - `.git` exists → use as-is. No pull, no reset.
243
- * - dir empty → fresh clone (only network fetch on connect), or
244
- * `bootstrapEmptyRemote` when the remote has no refs at all.
245
- * - dir populated, no `.git` → `git init` + `remote add origin` so
246
- * lifecycle hooks (commit/push) can do their job. No fetch, no
247
- * reset, no clean. Existing files become uncommitted-on-init; the
248
- * agent or `pushAfterCommit` reconciles with remote later.
249
- */
250
- private prepareCheckout;
251
- /**
252
- * Create and check out the session branch for a non-main session, updating
253
- * `state.activeBranch`. Reuses an existing local branch (unpushed work);
254
- * else prefers `origin/<branch>`; otherwise branches off `fromRef` (platform
255
- * fork flow) when supplied and valid, else off the currently-checked-out
256
- * HEAD (== base branch).
257
- */
258
- private checkoutSessionBranch;
259
- /**
260
- * Fetch the session branch into `refs/remotes/origin/<sessionBranch>` and,
261
- * when origin has it, map it with a fetch refspec. Never throws: a missing
262
- * remote branch is the normal case for a new session, and any other failure
263
- * leaves the checkout as it was (the caller creates the branch from the base).
264
- *
265
- * The refspec is added only once origin has the branch, and removed when
266
- * origin does not have it: a configured refspec for a missing branch makes
267
- * every plain `git fetch origin` fail. Runs on every connect, so it also
268
- * repairs a checkout cloned before the refspec existed.
269
- */
270
- private trackSessionBranch;
271
- /**
272
- * Re-point a session branch that this connect cut from the base at
273
- * `origin/<sessionBranch>`, once the retried fetch shows origin has it.
274
- * Safe because the freshly-cut branch holds no work. Never throws: when the
275
- * checkout is refused (for example local changes in the way), the branch
276
- * stays as it is and the push later fails as non-fast-forward.
277
- */
278
- private adoptOriginSessionBranch;
279
- /**
280
- * Line up a reused local session branch (checked out) with
281
- * `origin/<sessionBranch>` after a successful fetch. Never rewrites local
282
- * history and never throws:
283
- * - local is an ancestor of origin → fast-forward (another node pushed
284
- * newer work);
285
- * - local has commits that origin does not have → keep them and log a
286
- * warning; when origin also has commits that local lacks (diverged),
287
- * merge origin in with {@link integrateOriginSessionBranch};
288
- * - origin has no such branch → nothing to do.
289
- * In the first two cases the upstream is set to `origin/<sessionBranch>`.
290
- */
291
- private reconcileLocalSessionBranch;
292
- /**
293
- * Merge `origin/<branch>` into the checked-out session branch when origin
294
- * holds commits that the local branch lacks (another node or the agent
295
- * pushed, or an older driver rewrote the local branch). A merge, never a
296
- * rebase: the commits on origin are published. After this, a push of the
297
- * branch is a fast-forward and needs no force. Never throws; a merge that
298
- * cannot complete is aborted, and the push that follows fails as before.
299
- */
300
- private integrateOriginSessionBranch;
301
- /**
302
- * After a successful push of a session branch: map it with a fetch refspec
303
- * and point `refs/remotes/origin/<branch>` at the pushed tip. The push ran
304
- * before the refspec existed (a refspec for a branch that origin does not
305
- * have yet would break `git fetch origin`), so git did not update the
306
- * tracking ref itself. With both, `@{upstream}` resolves and the platform's
307
- * hibernate save gate sees `ahead` 0. Never throws.
308
- */
309
- private recordPushedSessionBranch;
310
- /**
311
- * Push the active branch. A session branch first gets any commits that are
312
- * only on `origin/<branch>` merged in, so the push is a fast-forward and
313
- * never needs a force. It is pushed with `-u` and then recorded (see
314
- * {@link recordPushedSessionBranch}), so `@{upstream}` resolves — the
315
- * platform's hibernate save gate reads exactly that. The base branch is
316
- * first brought up to date with origin ({@link integrateOriginBaseBranch}),
317
- * so a base branch that origin moved past is pushed rather than rejected.
318
- */
319
- private pushActiveBranch;
320
- /**
321
- * Attempt to create `sessionBranch` anchored on `session.fromRef`. Returns
322
- * true when the branch was created from the anchor; false when no valid
323
- * `fromRef` was supplied or the fetch failed (caller falls back to base).
324
- */
325
- private branchFromRef;
326
71
  /**
327
72
  * Fleet-managed connect: verify the host bind, register an explorer watcher,
328
73
  * no-op every git lifecycle hook. Spec: `_devlog/specs/2026-05-28-git-fleet-mode-design.md`.
@@ -335,314 +80,19 @@ export declare class GitConnector extends AbstractConnector {
335
80
  * `reason: 'retry-401'` so the platform can distinguish proactive refreshes
336
81
  * from emergency ones in audit logs.
337
82
  *
338
- * No-op when:
339
- * - the handle was not minted with `exposeAccessToken: true`
340
- * (no `managedGitconfig` on state), or
341
- * - the connector was not provisioned with a `tokenMediator` (PAT path —
342
- * the script will keep serving the static token and the user must
343
- * rotate the PAT manually).
83
+ * No-op when the mount's credential is not exposed to the agent
84
+ * (`exposeAccessToken` off) or was not minted by the mediator (PAT path —
85
+ * the script keeps serving the static token and the user must rotate the
86
+ * PAT manually).
344
87
  *
345
88
  * Spec: `_devlog/specs/2026-05-07-unified-credential-mediation.md` Step 9a.
346
89
  */
347
- refreshExposedCredential(connectorId: string, handle: ConnectorHandle): Promise<void>;
90
+ refreshExposedCredential(_connectorId: string, handle: ConnectorHandle): Promise<void>;
348
91
  disconnect(handle: ConnectorHandle): Promise<void>;
349
92
  private _sync;
350
93
  watch(handle: ConnectorHandle, callback: (event: ConnectorChangeEvent) => void, options?: WatchOptions): WatchHandle;
351
- /**
352
- * Commit and push per the lifecycle config, then report what the checkout
353
- * can prove afterwards (`pushState`) so the host can tell whether anything
354
- * exists only on local disk. A push that throws still throws (no report).
355
- */
356
94
  onHibernate(handle: ConnectorHandle): Promise<string | ConnectorHookReport>;
357
- /** The commit/push half of {@link onHibernate}; returns its detail line. Runs under the mount lock. */
358
- private hibernateSave;
359
- /**
360
- * What this checkout can prove after a hibernate save, for a host deciding
361
- * whether deleting the workspace loses anything. Read-only: never fetches,
362
- * pushes, or writes the repo. Every doubt answers in the "keep it" direction.
363
- */
364
- private readPushState;
365
- /**
366
- * Whether every commit reachable from a local ref (`refs/heads/*`, `HEAD`
367
- * even when detached, `refs/stash`) is reachable from some remote branch
368
- * head. The remote heads come from `ls-remote`, because local `origin/*`
369
- * refs go stale (a push by URL does not move them); only the ones whose
370
- * commit this checkout already holds can be walked, so a head we lack
371
- * proves nothing and the answer leans to `false`.
372
- *
373
- * `false` for any initialised submodule, checked first: a commit pinned only
374
- * in its local clone is out of this walk's reach. `null` when the remote
375
- * cannot be asked within {@link PUSH_STATE_REMOTE_TIMEOUT_MS}, which includes
376
- * a remote the mount reaches only through ambient config (a credential helper,
377
- * ssh or CA settings in global/system gitconfig): that config is switched off
378
- * here, so such a workspace always reads "cannot tell" and is kept.
379
- */
380
- private isWorkspaceOnRemote;
381
- /**
382
- * Hibernate with nothing new to commit: push commits that are still only
383
- * local (the agent committed its own work, or an earlier push failed).
384
- * "Unpushed" is measured exactly as the platform's hibernate save gate reads
385
- * `sync_status`: ahead of the upstream, or, with no upstream, ahead of
386
- * `origin/<base>`. Skipping it left the gate refusing to hibernate forever.
387
- */
388
- private pushUnpushedOnHibernate;
389
95
  onSessionClose(handle: ConnectorHandle): Promise<string | undefined>;
390
- /**
391
- * Scope the credential helper to the sanitized full repository URL.
392
- * Userinfo, query, and fragment data must never enter managed gitconfig.
393
- */
394
- private deriveCredentialScope;
395
- /**
396
- * Acquire the initial credential for a connector.
397
- *
398
- * `auth:` accepts the post-2026-05-06 grammar:
399
- * - `backend` → request a token from the platform mediator
400
- * (preferred for any platform-backed session).
401
- * - `pat:env:NAME` → static token from the secrets chain
402
- * (standalone CLI / non-platform contexts).
403
- *
404
- * Anonymous connectors (`auth` unset) succeed without a token — the
405
- * `git clone`/`git pull` calls still work for public repos.
406
- *
407
- * @returns The parsed auth ref, the resolved token (when any), and the
408
- * `expiresAt` timestamp surfaced by the mediator (used to schedule a
409
- * refresh tick when the credential is exposed to the agent CLI).
410
- */
411
- private acquireInitialToken;
412
- /**
413
- * Register a credential helper that *reports* why there is no credential,
414
- * after this connector failed to connect.
415
- *
416
- * Without it git finds no helper for the host and asks the terminal for a
417
- * username, so the agent sees `fatal: could not read Username for
418
- * 'https://github.com'` — which names neither the mount nor the cause, and
419
- * which only ever appears on a write, since reads against a public remote
420
- * keep succeeding. The helper written here makes git stop with the mediator's
421
- * actual refusal text instead.
422
- *
423
- * Entirely best-effort: it runs on the failure path and must never mask the
424
- * connect error that is already on its way up.
425
- */
426
- private registerUnavailableCredentialHelper;
427
- /**
428
- * Best-effort pre-creation of the helper's refresh-attempt stamp. A missing
429
- * stamp only costs the cooldown (the helper dances on every git op instead of
430
- * once per window), so a failure here is never worth surfacing.
431
- */
432
- private ensureAttemptStamp;
433
- /**
434
- * Best-effort removal of the unavailable-mount blocks that would answer this
435
- * connector's git operations: its own from a previous failed session, and any
436
- * left under the same repository scope by a sibling mount that failed earlier
437
- * in this `connectAll` (git matches helpers by URL, not by mount id).
438
- */
439
- private clearUnavailableCredentialHelper;
440
- private exposeManagedCredential;
441
- /**
442
- * Schedule the next refresh of the credential file, {@link REFRESH_LEAD_MS}
443
- * before `expiresAt`.
444
- *
445
- * Cancels any existing timer first so re-connects (and the test harness)
446
- * do not double-fire. The delay is clamped into
447
- * [{@link MIN_REFRESH_DELAY_MS}, {@link MAX_REARM_MS}]: the floor stops a
448
- * mediator that keeps minting tokens inside the lead from re-minting every
449
- * second, and a delay above the cap is served as re-arms that mint nothing
450
- * until the real refresh point — `setTimeout` silently collapses anything
451
- * over 2^31-1 ms (~24.8d) to 1 ms, which would mint in a loop.
452
- */
453
- private scheduleRefresh;
454
- private refreshManagedCredential;
455
- private teardownManagedCredential;
456
- /**
457
- * Bring a populated, non-git directory under git tracking without
458
- * touching the working tree. Runs only on the "dir populated, no `.git`"
459
- * branch of `connect()` — exactly when a previous connect aborted before
460
- * `.git` was written, or when the bind-mounted host dir's `.git` FILE
461
- * pointed outside the container.
462
- *
463
- * The intent is to preserve whatever the agent last had on disk. We
464
- * therefore:
465
- * - `git init` — creates `.git/`; does not modify any existing file.
466
- * - `git remote add origin <remoteUrl>` — wires up the remote so the
467
- * normal lifecycle hooks (`pushOnHibernate`, `pushAfterCommit`)
468
- * have a target.
469
- *
470
- * Deliberately omitted:
471
- * - `fetch` — would touch the network on every recreate. The lifecycle
472
- * handles sync explicitly (periodic `fetch`/`pull` via
473
- * `sync.autoPull`, push on hibernate, etc.).
474
- * - `checkout -f` / `reset --hard` / `clean -fd` — would discard the
475
- * user's last on-disk state. The agent or autocommit reconciles
476
- * with the remote later.
477
- *
478
- * `remoteUrl` carries no credential; network commands authenticate per
479
- * command (see `runRemoteGit`).
480
- */
481
- private initInPlace;
482
- /**
483
- * Count `refs/heads/*` on the remote, optionally narrowed to one `branch`.
484
- *
485
- * Returns `null` when the probe itself fails (network, auth, bad URL).
486
- * "Cannot tell" must never collapse into "no refs": the empty-remote
487
- * fallback WRITES to origin, and every caller therefore treats `null` as
488
- * "assume populated" and falls through to the path that fails loudly.
489
- */
490
- private countRemoteHeads;
491
- /**
492
- * Bootstrap a checkout against a remote that has no refs at all — the state
493
- * of a GitHub repo created without "Add a README".
494
- *
495
- * A plain `git clone` is NOT a substitute: cloning a ref-less remote leaves
496
- * local HEAD on git's `init.defaultBranch` (`master`), not the declared
497
- * branch, so the branch is created explicitly here.
498
- *
499
- * The root commit is created REGARDLESS of `access` and `publish`; only the
500
- * push to origin is gated on them (`publish` is false when every lifecycle
501
- * push flag is off). An unborn HEAD is not a stable resting state: the
502
- * next connect sees `.git` with no resolvable HEAD, routes to
503
- * `bootstrapFromOrigin`, and its `fetch origin <branch>` dies on the still
504
- * ref-less remote — turning a fixed first connect into a broken second one.
505
- * A local commit costs a read-only connector nothing (it is never pushed)
506
- * and makes reconnect take the cheap "use as-is" path.
507
- *
508
- * With the push done, `origin/<branch>` exists for everything downstream —
509
- * notably `checkoutSessionBranch`, whose publish-on-create push needs a
510
- * commit to point at.
511
- *
512
- * Invariant: this method never throws on a failed push. The session must
513
- * come up with a usable checkout even when origin is unreachable — the
514
- * lifecycle hooks (`pushAfterCommit`, hibernate/close push) publish later.
515
- */
516
- private bootstrapEmptyRemote;
517
- /**
518
- * True when `<targetDir>/.git` contains at least one resolvable commit
519
- * (i.e. `HEAD` points at a real object). False when `.git` is an empty
520
- * shell — e.g. just-initialised but never fetched, or all refs deleted.
521
- *
522
- * Used by `connect()` to tell the difference between a working agent
523
- * checkout (preserve, don't touch) and a half-initialised one
524
- * (bootstrap by fetching from origin).
525
- */
526
- private isInitialisedCheckout;
527
- /**
528
- * One-shot bootstrap path for the "`.git` exists but is empty" state.
529
- *
530
- * Runs `fetch --depth=1 origin <branch>` followed by `checkout -B
531
- * <branch> origin/<branch>` so the working tree gets the remote
532
- * content. Before the checkout, any untracked file whose path also
533
- * exists in the remote tree is renamed to `<path>.local` so the user
534
- * (or previous agent run) does not lose data. Other untracked files
535
- * are left in place.
536
- *
537
- * Deliberately not destructive: we never `clean -fd` and never
538
- * `reset --hard`. Files that do not conflict with the remote stay
539
- * exactly where they are.
540
- *
541
- * A pre-existing `origin` is replaced with the declared URL, which also
542
- * drops a token an older driver wrote into it.
543
- */
544
- private bootstrapFromOrigin;
545
- /**
546
- * Walk the remote tree at `origin/<branch>` and rename any untracked
547
- * working-tree file whose path also exists there. Renames go to
548
- * `<path>.local`; on `.local` collision a millisecond suffix is
549
- * appended so nothing is overwritten.
550
- *
551
- * This makes the subsequent `git checkout -B <branch> origin/<branch>`
552
- * safe: without it, `checkout` aborts with "untracked working tree
553
- * files would be overwritten" the moment any local file collides with
554
- * a tracked path on the remote.
555
- *
556
- * Files in the local tree whose paths are NOT in the remote tree are
557
- * left untouched — they are pure local additions and survive the
558
- * bootstrap.
559
- */
560
- private preserveConflictingUntracked;
561
- /**
562
- * Align `origin` with the exact sanitized URL used by the Tier-2 helper.
563
- * Git does not normalize query/fragment data, path case, or `.git` aliases
564
- * when matching `credential.<url>` sections, so the two strings must agree.
565
- * The declared mount source remains authoritative over an existing remote.
566
- */
567
- private alignRemoteWithCredentialScope;
568
- /**
569
- * Point `origin` at the declared URL, without a credential in it.
570
- *
571
- * Clones made before the driver authenticated per command hold
572
- * `https://x-access-token:<token>@…` in `.git/config`, where the agent can
573
- * read it; this is what removes it, on the first connect after an upgrade.
574
- * With a token in hand `origin` is set to the declared URL, as the old
575
- * re-bake did. Without one only a token-bearing origin is rewritten: a URL
576
- * the user declared with their own userinfo is theirs to keep.
577
- */
578
- private reconcileRemoteUrl;
579
- /**
580
- * Set `remote.origin.pushurl` to {@link READ_ONLY_PUSH_URL} on a read-only
581
- * mount, and remove it again (only that value) once the mount is read-write,
582
- * because the driver's own pushes go through `origin` and would hit it too.
583
- */
584
- private applyPushGuard;
585
- /**
586
- * Bring a read-only mount to origin's base branch tip and drop every local
587
- * change: edits, untracked files (ignored ones stay, so `.skaile/` and build
588
- * output survive), local commits, an unfinished merge or rebase, and a branch
589
- * switch. Replaces the pull, so the rebase and merge-conflict paths never run.
590
- *
591
- * With `tolerateFetchFailure` (connect), an unreachable origin is logged and
592
- * the checkout is reset to the last fetched `origin/<base>` instead, so a
593
- * mount that was usable stays usable. With `skipWhenAtTarget` (periodic tick)
594
- * a checkout already on origin's tip is left as it is. While
595
- * `readOnlySaveOwed` is set the work is saved first ({@link preserveLocalWork});
596
- * when that fails nothing is discarded. The first reset after a save sets the
597
- * push block. Runs under the mount lock. True when the checkout was reset.
598
- */
599
- private refreshReadOnly;
600
- /**
601
- * Save what the first read-only discard would destroy on a checkout that was
602
- * used read-write: local commits on the base branch or a detached HEAD go to a
603
- * `skaile/pre-read-only-<time>` branch, uncommitted edits and untracked files
604
- * to a stash. Other local branches are left alone by the discard anyway.
605
- * False (logged) when the stash fails, e.g. over unmerged paths.
606
- */
607
- private preserveLocalWork;
608
- private startPeriodicFetch;
609
- /** One periodic-fetch tick. Bails out at each resumption point once disconnected. */
610
- private runPeriodicFetch;
611
- /**
612
- * `git fetch origin` for the periodic tick. When origin no longer has a
613
- * branch that a session refspec names (for example a session branch deleted
614
- * after a merge, or one from an earlier session on this checkout), that
615
- * refspec fails the whole fetch. Drop it and fetch again. The base branch
616
- * refspec is never dropped.
617
- */
618
- private fetchOrigin;
619
- /**
620
- * Merge `origin/<base>` into a published session branch (periodic tick with
621
- * `autoRebase`). No-op when the base is already contained. Conflicts are
622
- * handled like the merge on close: keep "ours" (the session branch) and
623
- * save "theirs" as `.conflict` files.
624
- */
625
- private mergeBaseIntoSessionBranch;
626
- /**
627
- * True (and logged) when a merge or rebase is already open in the checkout,
628
- * so a driver merge must not start: its failure path would abort or resolve
629
- * the agent's own operation.
630
- */
631
- private skipOverUnfinishedOperation;
632
- /**
633
- * Attempt to resolve merge/rebase conflicts by keeping "ours" and copying
634
- * "theirs" to a .conflict file. If resolution fails entirely, abort.
635
- * Returns true if conflicts were resolved, false if aborted.
636
- */
637
- private resolveConflictsOrAbort;
638
- /**
639
- * For a single conflicted file: keep "ours", save "theirs" as .conflict file.
640
- */
641
- private resolveFileConflict;
642
- private stripConflictKeepOurs;
643
- private resetAutoCommitTimer;
644
- private performAutoCommit;
645
- private generateCommitMessage;
646
96
  }
647
97
  /**
648
98
  * Creates a new GitConnector instance.
@@ -650,13 +100,4 @@ export declare class GitConnector extends AbstractConnector {
650
100
  * @docLink packages/factory-assets/api-reference#git-connector-factory
651
101
  */
652
102
  export declare function createConnector(): GitConnector;
653
- /** Test-only surface for unit assertions. */
654
- export declare const __test: {
655
- resolveGitConfig: typeof resolveGitConfig;
656
- networkGitEnv: typeof networkGitEnv;
657
- plainRemoteUrl: typeof plainRemoteUrl;
658
- runRemoteGit: typeof runRemoteGit;
659
- comparableRemoteUrl: typeof comparableRemoteUrl;
660
- };
661
- export {};
662
103
  //# sourceMappingURL=driver.d.ts.map