expandai 0.0.4 → 0.0.5

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 (319) hide show
  1. package/build/{esm/Install/Opencode → assets/opencode}/expandai-webfetch.js +22 -4
  2. package/build/dts/Mcp/RequestHeaders.d.ts +0 -1
  3. package/build/dts/Mcp/Server.d.ts +1 -2
  4. package/build/dts/index.d.ts +0 -1
  5. package/build/esm/index.js +180 -2
  6. package/build/esm/main.js +677 -200
  7. package/package.json +19 -11
  8. package/build/dts/ApiClient.d.ts +0 -165
  9. package/build/dts/ApiClient.d.ts.map +0 -1
  10. package/build/dts/Auth/Domain.d.ts +0 -95
  11. package/build/dts/Auth/Domain.d.ts.map +0 -1
  12. package/build/dts/Auth/ManualAuthorization.d.ts +0 -107
  13. package/build/dts/Auth/ManualAuthorization.d.ts.map +0 -1
  14. package/build/dts/Auth/PendingInit.d.ts +0 -35
  15. package/build/dts/Auth/PendingInit.d.ts.map +0 -1
  16. package/build/dts/Auth/Pkce.d.ts +0 -10
  17. package/build/dts/Auth/Pkce.d.ts.map +0 -1
  18. package/build/dts/Auth/SetupGrantAuthorization.d.ts +0 -34
  19. package/build/dts/Auth/SetupGrantAuthorization.d.ts.map +0 -1
  20. package/build/dts/Authentication.d.ts +0 -24
  21. package/build/dts/Authentication.d.ts.map +0 -1
  22. package/build/dts/BrowserOAuth.d.ts +0 -99
  23. package/build/dts/BrowserOAuth.d.ts.map +0 -1
  24. package/build/dts/CommandPath.d.ts +0 -2
  25. package/build/dts/CommandPath.d.ts.map +0 -1
  26. package/build/dts/Commands/Fetch.d.ts +0 -30
  27. package/build/dts/Commands/Fetch.d.ts.map +0 -1
  28. package/build/dts/Commands/Hook.d.ts +0 -17
  29. package/build/dts/Commands/Hook.d.ts.map +0 -1
  30. package/build/dts/Commands/Init.d.ts +0 -55
  31. package/build/dts/Commands/Init.d.ts.map +0 -1
  32. package/build/dts/Commands/Mcp.d.ts +0 -11
  33. package/build/dts/Commands/Mcp.d.ts.map +0 -1
  34. package/build/dts/Commands/McpRun.d.ts +0 -5
  35. package/build/dts/Commands/McpRun.d.ts.map +0 -1
  36. package/build/dts/Commands/Search.d.ts +0 -21
  37. package/build/dts/Commands/Search.d.ts.map +0 -1
  38. package/build/dts/Commands/Skill.d.ts +0 -12
  39. package/build/dts/Commands/Skill.d.ts.map +0 -1
  40. package/build/dts/Commands/Status.d.ts +0 -27
  41. package/build/dts/Commands/Status.d.ts.map +0 -1
  42. package/build/dts/Commands/Telemetry.d.ts +0 -7
  43. package/build/dts/Commands/Telemetry.d.ts.map +0 -1
  44. package/build/dts/Commands/Uninstall.d.ts +0 -9
  45. package/build/dts/Commands/Uninstall.d.ts.map +0 -1
  46. package/build/dts/Config.d.ts +0 -196
  47. package/build/dts/Config.d.ts.map +0 -1
  48. package/build/dts/Hook/Claude.d.ts +0 -13
  49. package/build/dts/Hook/Claude.d.ts.map +0 -1
  50. package/build/dts/Hook/Errors.d.ts +0 -20
  51. package/build/dts/Hook/Errors.d.ts.map +0 -1
  52. package/build/dts/Hook/Opencode.d.ts +0 -13
  53. package/build/dts/Hook/Opencode.d.ts.map +0 -1
  54. package/build/dts/Hook/SnapshotNote.d.ts +0 -12
  55. package/build/dts/Hook/SnapshotNote.d.ts.map +0 -1
  56. package/build/dts/Init/ClaudeAdapter.d.ts +0 -61
  57. package/build/dts/Init/ClaudeAdapter.d.ts.map +0 -1
  58. package/build/dts/Init/ClaudeProfile.d.ts +0 -77
  59. package/build/dts/Init/ClaudeProfile.d.ts.map +0 -1
  60. package/build/dts/Init/Domain.d.ts +0 -139
  61. package/build/dts/Init/Domain.d.ts.map +0 -1
  62. package/build/dts/Init/HarnessAdapter.d.ts +0 -33
  63. package/build/dts/Init/HarnessAdapter.d.ts.map +0 -1
  64. package/build/dts/Init/HarnessDetector.d.ts +0 -19
  65. package/build/dts/Init/HarnessDetector.d.ts.map +0 -1
  66. package/build/dts/Init/HarnessRegistry.d.ts +0 -50
  67. package/build/dts/Init/HarnessRegistry.d.ts.map +0 -1
  68. package/build/dts/Init/MutationTransaction.d.ts +0 -96
  69. package/build/dts/Init/MutationTransaction.d.ts.map +0 -1
  70. package/build/dts/Init/Service.d.ts +0 -72
  71. package/build/dts/Init/Service.d.ts.map +0 -1
  72. package/build/dts/Init/StandardAdapters.d.ts +0 -42
  73. package/build/dts/Init/StandardAdapters.d.ts.map +0 -1
  74. package/build/dts/Init/Status.d.ts +0 -149
  75. package/build/dts/Init/Status.d.ts.map +0 -1
  76. package/build/dts/Install/Claude/Hook.d.ts +0 -88
  77. package/build/dts/Install/Claude/Hook.d.ts.map +0 -1
  78. package/build/dts/Install/Claude/Mcp.d.ts +0 -48
  79. package/build/dts/Install/Claude/Mcp.d.ts.map +0 -1
  80. package/build/dts/Install/Claude/Skill.d.ts +0 -23
  81. package/build/dts/Install/Claude/Skill.d.ts.map +0 -1
  82. package/build/dts/Install/Codex/Mcp.d.ts +0 -45
  83. package/build/dts/Install/Codex/Mcp.d.ts.map +0 -1
  84. package/build/dts/Install/Codex/Skill.d.ts +0 -22
  85. package/build/dts/Install/Codex/Skill.d.ts.map +0 -1
  86. package/build/dts/Install/Cursor/Mcp.d.ts +0 -45
  87. package/build/dts/Install/Cursor/Mcp.d.ts.map +0 -1
  88. package/build/dts/Install/Cursor/Skill.d.ts +0 -29
  89. package/build/dts/Install/Cursor/Skill.d.ts.map +0 -1
  90. package/build/dts/Install/Domain.d.ts +0 -103
  91. package/build/dts/Install/Domain.d.ts.map +0 -1
  92. package/build/dts/Install/Hook.d.ts +0 -30
  93. package/build/dts/Install/Hook.d.ts.map +0 -1
  94. package/build/dts/Install/Mcp.d.ts +0 -28
  95. package/build/dts/Install/Mcp.d.ts.map +0 -1
  96. package/build/dts/Install/Opencode/Hook.d.ts +0 -24
  97. package/build/dts/Install/Opencode/Hook.d.ts.map +0 -1
  98. package/build/dts/Install/Opencode/Mcp.d.ts +0 -47
  99. package/build/dts/Install/Opencode/Mcp.d.ts.map +0 -1
  100. package/build/dts/Install/Opencode/Skill.d.ts +0 -26
  101. package/build/dts/Install/Opencode/Skill.d.ts.map +0 -1
  102. package/build/dts/Install/Skill.d.ts +0 -32
  103. package/build/dts/Install/Skill.d.ts.map +0 -1
  104. package/build/dts/Install/Uninstall.d.ts +0 -32
  105. package/build/dts/Install/Uninstall.d.ts.map +0 -1
  106. package/build/dts/MarkdownAnsi.d.ts +0 -29
  107. package/build/dts/MarkdownAnsi.d.ts.map +0 -1
  108. package/build/dts/Mcp/ExpandDocs.d.ts +0 -19
  109. package/build/dts/Mcp/ExpandDocs.d.ts.map +0 -1
  110. package/build/dts/Mcp/RequestHeaders.d.ts.map +0 -1
  111. package/build/dts/Mcp/Server.d.ts.map +0 -1
  112. package/build/dts/Mcp/Toolkit.d.ts +0 -3
  113. package/build/dts/Mcp/Toolkit.d.ts.map +0 -1
  114. package/build/dts/Mcp/tools/Citations.d.ts +0 -266
  115. package/build/dts/Mcp/tools/Citations.d.ts.map +0 -1
  116. package/build/dts/Mcp/tools/Fetch.d.ts +0 -168
  117. package/build/dts/Mcp/tools/Fetch.d.ts.map +0 -1
  118. package/build/dts/SecureFile.d.ts +0 -23
  119. package/build/dts/SecureFile.d.ts.map +0 -1
  120. package/build/dts/Snippets.d.ts +0 -18
  121. package/build/dts/Snippets.d.ts.map +0 -1
  122. package/build/dts/Telemetry.d.ts +0 -30
  123. package/build/dts/Telemetry.d.ts.map +0 -1
  124. package/build/dts/Version.d.ts +0 -2
  125. package/build/dts/Version.d.ts.map +0 -1
  126. package/build/dts/Xdg.d.ts +0 -11
  127. package/build/dts/Xdg.d.ts.map +0 -1
  128. package/build/dts/index.d.ts.map +0 -1
  129. package/build/dts/main.d.ts +0 -3
  130. package/build/dts/main.d.ts.map +0 -1
  131. package/build/esm/ApiClient.js +0 -305
  132. package/build/esm/ApiClient.js.map +0 -1
  133. package/build/esm/Auth/Domain.js +0 -56
  134. package/build/esm/Auth/Domain.js.map +0 -1
  135. package/build/esm/Auth/ManualAuthorization.js +0 -253
  136. package/build/esm/Auth/ManualAuthorization.js.map +0 -1
  137. package/build/esm/Auth/PendingInit.js +0 -267
  138. package/build/esm/Auth/PendingInit.js.map +0 -1
  139. package/build/esm/Auth/Pkce.js +0 -23
  140. package/build/esm/Auth/Pkce.js.map +0 -1
  141. package/build/esm/Auth/SetupGrantAuthorization.js +0 -91
  142. package/build/esm/Auth/SetupGrantAuthorization.js.map +0 -1
  143. package/build/esm/Authentication.js +0 -143
  144. package/build/esm/Authentication.js.map +0 -1
  145. package/build/esm/BrowserOAuth.js +0 -251
  146. package/build/esm/BrowserOAuth.js.map +0 -1
  147. package/build/esm/CommandPath.js +0 -31
  148. package/build/esm/CommandPath.js.map +0 -1
  149. package/build/esm/Commands/Fetch.js +0 -119
  150. package/build/esm/Commands/Fetch.js.map +0 -1
  151. package/build/esm/Commands/Hook.js +0 -20
  152. package/build/esm/Commands/Hook.js.map +0 -1
  153. package/build/esm/Commands/Init.js +0 -371
  154. package/build/esm/Commands/Init.js.map +0 -1
  155. package/build/esm/Commands/Mcp.js +0 -19
  156. package/build/esm/Commands/Mcp.js.map +0 -1
  157. package/build/esm/Commands/McpRun.js +0 -15
  158. package/build/esm/Commands/McpRun.js.map +0 -1
  159. package/build/esm/Commands/Search.js +0 -46
  160. package/build/esm/Commands/Search.js.map +0 -1
  161. package/build/esm/Commands/Skill.js +0 -17
  162. package/build/esm/Commands/Skill.js.map +0 -1
  163. package/build/esm/Commands/Status.js +0 -186
  164. package/build/esm/Commands/Status.js.map +0 -1
  165. package/build/esm/Commands/Telemetry.js +0 -23
  166. package/build/esm/Commands/Telemetry.js.map +0 -1
  167. package/build/esm/Commands/Uninstall.js +0 -28
  168. package/build/esm/Commands/Uninstall.js.map +0 -1
  169. package/build/esm/Config.js +0 -619
  170. package/build/esm/Config.js.map +0 -1
  171. package/build/esm/Hook/Claude.js +0 -74
  172. package/build/esm/Hook/Claude.js.map +0 -1
  173. package/build/esm/Hook/Errors.js +0 -18
  174. package/build/esm/Hook/Errors.js.map +0 -1
  175. package/build/esm/Hook/Opencode.js +0 -50
  176. package/build/esm/Hook/Opencode.js.map +0 -1
  177. package/build/esm/Hook/SnapshotNote.js +0 -65
  178. package/build/esm/Hook/SnapshotNote.js.map +0 -1
  179. package/build/esm/Init/ClaudeAdapter.js +0 -137
  180. package/build/esm/Init/ClaudeAdapter.js.map +0 -1
  181. package/build/esm/Init/ClaudeProfile.js +0 -344
  182. package/build/esm/Init/ClaudeProfile.js.map +0 -1
  183. package/build/esm/Init/Domain.js +0 -118
  184. package/build/esm/Init/Domain.js.map +0 -1
  185. package/build/esm/Init/HarnessAdapter.js +0 -21
  186. package/build/esm/Init/HarnessAdapter.js.map +0 -1
  187. package/build/esm/Init/HarnessDetector.js +0 -65
  188. package/build/esm/Init/HarnessDetector.js.map +0 -1
  189. package/build/esm/Init/HarnessRegistry.js +0 -58
  190. package/build/esm/Init/HarnessRegistry.js.map +0 -1
  191. package/build/esm/Init/MutationTransaction.js +0 -494
  192. package/build/esm/Init/MutationTransaction.js.map +0 -1
  193. package/build/esm/Init/Service.js +0 -319
  194. package/build/esm/Init/Service.js.map +0 -1
  195. package/build/esm/Init/StandardAdapters.js +0 -116
  196. package/build/esm/Init/StandardAdapters.js.map +0 -1
  197. package/build/esm/Init/Status.js +0 -215
  198. package/build/esm/Init/Status.js.map +0 -1
  199. package/build/esm/Install/Claude/Hook.js +0 -77
  200. package/build/esm/Install/Claude/Hook.js.map +0 -1
  201. package/build/esm/Install/Claude/Mcp.js +0 -101
  202. package/build/esm/Install/Claude/Mcp.js.map +0 -1
  203. package/build/esm/Install/Claude/Skill.js +0 -56
  204. package/build/esm/Install/Claude/Skill.js.map +0 -1
  205. package/build/esm/Install/Codex/Mcp.js +0 -97
  206. package/build/esm/Install/Codex/Mcp.js.map +0 -1
  207. package/build/esm/Install/Codex/Skill.js +0 -33
  208. package/build/esm/Install/Codex/Skill.js.map +0 -1
  209. package/build/esm/Install/Cursor/Mcp.js +0 -74
  210. package/build/esm/Install/Cursor/Mcp.js.map +0 -1
  211. package/build/esm/Install/Cursor/Skill.js +0 -40
  212. package/build/esm/Install/Cursor/Skill.js.map +0 -1
  213. package/build/esm/Install/Domain.js +0 -162
  214. package/build/esm/Install/Domain.js.map +0 -1
  215. package/build/esm/Install/Hook.js +0 -38
  216. package/build/esm/Install/Hook.js.map +0 -1
  217. package/build/esm/Install/Mcp.js +0 -40
  218. package/build/esm/Install/Mcp.js.map +0 -1
  219. package/build/esm/Install/Opencode/Hook.js +0 -44
  220. package/build/esm/Install/Opencode/Hook.js.map +0 -1
  221. package/build/esm/Install/Opencode/Mcp.js +0 -76
  222. package/build/esm/Install/Opencode/Mcp.js.map +0 -1
  223. package/build/esm/Install/Opencode/Skill.js +0 -37
  224. package/build/esm/Install/Opencode/Skill.js.map +0 -1
  225. package/build/esm/Install/Skill.js +0 -41
  226. package/build/esm/Install/Skill.js.map +0 -1
  227. package/build/esm/Install/Uninstall.js +0 -49
  228. package/build/esm/Install/Uninstall.js.map +0 -1
  229. package/build/esm/MarkdownAnsi.js +0 -142
  230. package/build/esm/MarkdownAnsi.js.map +0 -1
  231. package/build/esm/Mcp/ExpandDocs.js +0 -56
  232. package/build/esm/Mcp/ExpandDocs.js.map +0 -1
  233. package/build/esm/Mcp/RequestHeaders.js +0 -13
  234. package/build/esm/Mcp/RequestHeaders.js.map +0 -1
  235. package/build/esm/Mcp/Server.js +0 -12
  236. package/build/esm/Mcp/Server.js.map +0 -1
  237. package/build/esm/Mcp/Toolkit.js +0 -16
  238. package/build/esm/Mcp/Toolkit.js.map +0 -1
  239. package/build/esm/Mcp/tools/Citations.js +0 -193
  240. package/build/esm/Mcp/tools/Citations.js.map +0 -1
  241. package/build/esm/Mcp/tools/Fetch.js +0 -165
  242. package/build/esm/Mcp/tools/Fetch.js.map +0 -1
  243. package/build/esm/SecureFile.js +0 -36
  244. package/build/esm/SecureFile.js.map +0 -1
  245. package/build/esm/Snippets.js +0 -29
  246. package/build/esm/Snippets.js.map +0 -1
  247. package/build/esm/Telemetry.js +0 -157
  248. package/build/esm/Telemetry.js.map +0 -1
  249. package/build/esm/Version.js +0 -4
  250. package/build/esm/Version.js.map +0 -1
  251. package/build/esm/Xdg.js +0 -15
  252. package/build/esm/Xdg.js.map +0 -1
  253. package/build/esm/index.js.map +0 -1
  254. package/build/esm/main.js.map +0 -1
  255. package/src/ApiClient.ts +0 -450
  256. package/src/Auth/Domain.ts +0 -63
  257. package/src/Auth/ManualAuthorization.ts +0 -296
  258. package/src/Auth/PendingInit.ts +0 -338
  259. package/src/Auth/Pkce.ts +0 -26
  260. package/src/Auth/SetupGrantAuthorization.ts +0 -116
  261. package/src/Authentication.ts +0 -202
  262. package/src/BrowserOAuth.ts +0 -359
  263. package/src/CommandPath.ts +0 -30
  264. package/src/Commands/Fetch.ts +0 -188
  265. package/src/Commands/Hook.ts +0 -48
  266. package/src/Commands/Init.ts +0 -489
  267. package/src/Commands/Mcp.ts +0 -30
  268. package/src/Commands/McpRun.ts +0 -25
  269. package/src/Commands/Search.ts +0 -97
  270. package/src/Commands/Skill.ts +0 -30
  271. package/src/Commands/Status.ts +0 -228
  272. package/src/Commands/Telemetry.ts +0 -42
  273. package/src/Commands/Uninstall.ts +0 -38
  274. package/src/Config.ts +0 -840
  275. package/src/Hook/Claude.ts +0 -81
  276. package/src/Hook/Errors.ts +0 -19
  277. package/src/Hook/Opencode.ts +0 -58
  278. package/src/Hook/SnapshotNote.ts +0 -66
  279. package/src/Init/ClaudeAdapter.ts +0 -191
  280. package/src/Init/ClaudeProfile.ts +0 -453
  281. package/src/Init/Domain.ts +0 -153
  282. package/src/Init/HarnessAdapter.ts +0 -35
  283. package/src/Init/HarnessDetector.ts +0 -77
  284. package/src/Init/HarnessRegistry.ts +0 -87
  285. package/src/Init/MutationTransaction.ts +0 -747
  286. package/src/Init/Service.ts +0 -385
  287. package/src/Init/StandardAdapters.ts +0 -141
  288. package/src/Init/Status.ts +0 -253
  289. package/src/Install/Claude/Hook.ts +0 -123
  290. package/src/Install/Claude/Mcp.ts +0 -129
  291. package/src/Install/Claude/Skill.ts +0 -77
  292. package/src/Install/Codex/Mcp.ts +0 -114
  293. package/src/Install/Codex/Skill.ts +0 -44
  294. package/src/Install/Cursor/Mcp.ts +0 -85
  295. package/src/Install/Cursor/Skill.ts +0 -51
  296. package/src/Install/Domain.ts +0 -221
  297. package/src/Install/Hook.ts +0 -50
  298. package/src/Install/Mcp.ts +0 -71
  299. package/src/Install/Opencode/Hook.ts +0 -55
  300. package/src/Install/Opencode/Mcp.ts +0 -87
  301. package/src/Install/Opencode/Skill.ts +0 -48
  302. package/src/Install/Opencode/expandai-webfetch.d.ts +0 -23
  303. package/src/Install/Opencode/expandai-webfetch.js +0 -56
  304. package/src/Install/Skill.ts +0 -57
  305. package/src/Install/Uninstall.ts +0 -82
  306. package/src/MarkdownAnsi.ts +0 -162
  307. package/src/Mcp/ExpandDocs.ts +0 -62
  308. package/src/Mcp/RequestHeaders.ts +0 -16
  309. package/src/Mcp/Server.ts +0 -15
  310. package/src/Mcp/Toolkit.ts +0 -21
  311. package/src/Mcp/tools/Citations.ts +0 -219
  312. package/src/Mcp/tools/Fetch.ts +0 -203
  313. package/src/SecureFile.ts +0 -70
  314. package/src/Snippets.ts +0 -39
  315. package/src/Telemetry.ts +0 -186
  316. package/src/Version.ts +0 -3
  317. package/src/Xdg.ts +0 -18
  318. package/src/index.ts +0 -1
  319. package/src/main.ts +0 -305
@@ -1 +0,0 @@
1
- {"version":3,"file":"Opencode.d.ts","sourceRoot":"","sources":["../../../src/Hook/Opencode.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,MAAM,EAAkB,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,kBAAkB,EAAkB,MAAM,aAAa,CAAA;;;;;;;AAqBhE,qBAAa,YAAa,SAAQ,iBAgChC;CAAG"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Citation guidance for `expandai fetch` text output consumed by an agent. The plain
3
- * command is a third fetch path alongside the hook and the MCP tools — an agent that
4
- * shells out to it used to receive evidence ids with nothing telling it to cite them,
5
- * and answered uncited. Humans at a TTY do not need this, so callers gate on that.
6
- *
7
- * Returns the markdown unchanged when no playground URL is present, rather than
8
- * emitting an instruction the reader cannot follow.
9
- */
10
- export declare function withCitationFooter(markdown: string): string;
11
- export declare function withSnapshotNote(markdown: string, snapshotId: string, playgroundUrl: string): string;
12
- //# sourceMappingURL=SnapshotNote.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SnapshotNote.d.ts","sourceRoot":"","sources":["../../../src/Hook/SnapshotNote.ts"],"names":[],"mappings":"AAeA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiB3D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAsBpG"}
@@ -1,61 +0,0 @@
1
- import { CommandExecutor } from '@effect/platform';
2
- import { Effect, Layer, Schema } from 'effect';
3
- import { ClaudeProfile } from './ClaudeProfile.js';
4
- import { HarnessConfigurationError, type HarnessInspection, HarnessInspectionError } from './HarnessAdapter.js';
5
- import { MutationTransaction } from './MutationTransaction.js';
6
- declare const IncompatibleClaudeProfileVersionError_base: Schema.TaggedErrorClass<IncompatibleClaudeProfileVersionError, "IncompatibleClaudeProfileVersionError", {
7
- readonly _tag: Schema.tag<"IncompatibleClaudeProfileVersionError">;
8
- } & {
9
- executingVersion: typeof Schema.String;
10
- requiredVersion: typeof Schema.String;
11
- }>;
12
- export declare class IncompatibleClaudeProfileVersionError extends IncompatibleClaudeProfileVersionError_base {
13
- get message(): string;
14
- }
15
- declare const ClaudeProfilePolicyBlockedError_base: Schema.TaggedErrorClass<ClaudeProfilePolicyBlockedError, "ClaudeProfilePolicyBlockedError", {
16
- readonly _tag: Schema.tag<"ClaudeProfilePolicyBlockedError">;
17
- } & {
18
- policyBlock: typeof Schema.String;
19
- }>;
20
- export declare class ClaudeProfilePolicyBlockedError extends ClaudeProfilePolicyBlockedError_base {
21
- get message(): string;
22
- }
23
- declare const ClaudeAdapterOperationError_base: Schema.TaggedErrorClass<ClaudeAdapterOperationError, "ClaudeAdapterOperationError", {
24
- readonly _tag: Schema.tag<"ClaudeAdapterOperationError">;
25
- } & {
26
- code: Schema.Literal<["inspection_failed", "configuration_failed"]>;
27
- }>;
28
- export declare class ClaudeAdapterOperationError extends ClaudeAdapterOperationError_base {
29
- get message(): "Claude Code profile configuration failed" | "Claude Code profile inspection failed";
30
- }
31
- declare const ClaudeRuntimeProbe_base: Effect.Service.Class<ClaudeRuntimeProbe, "@expandai/cli/Init/ClaudeRuntimeProbe", {
32
- readonly dependencies: readonly [Layer.Layer<CommandExecutor.CommandExecutor, never, import("@effect/platform/FileSystem").FileSystem>];
33
- readonly effect: Effect.Effect<{
34
- executingVersion: string;
35
- portableCommandAvailable: Effect.Effect<boolean, never, never>;
36
- }, import("effect/ConfigError").ConfigError, CommandExecutor.CommandExecutor>;
37
- }>;
38
- /** Runtime facts kept separate from persisted harness commands. */
39
- export declare class ClaudeRuntimeProbe extends ClaudeRuntimeProbe_base {
40
- /**
41
- * Not `DefaultWithoutDependencies`: that layer always reports `CLI_VERSION` and
42
- * always runs the real command probe. Tests need to pin an arbitrary executing
43
- * version and a precomputed probe result, which only a fixture layer can supply.
44
- */
45
- static testLayer(options: {
46
- readonly executingVersion: string;
47
- readonly portableCommandAvailable: boolean;
48
- }): Layer.Layer<ClaudeRuntimeProbe, never, never>;
49
- }
50
- declare const ClaudeAdapter_base: Effect.Service.Class<ClaudeAdapter, "@expandai/cli/Init/ClaudeAdapter", {
51
- readonly dependencies: readonly [Layer.Layer<ClaudeProfile, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>, Layer.Layer<MutationTransaction, never, never>, Layer.Layer<ClaudeRuntimeProbe, import("effect/ConfigError").ConfigError, import("@effect/platform/FileSystem").FileSystem>];
52
- readonly effect: Effect.Effect<{
53
- readonly harness: 'claude-code';
54
- readonly inspect: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessInspectionError, never>;
55
- readonly configure: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessConfigurationError, never>;
56
- }, never, ClaudeProfile | ClaudeRuntimeProbe | MutationTransaction>;
57
- }>;
58
- export declare class ClaudeAdapter extends ClaudeAdapter_base {
59
- }
60
- export {};
61
- //# sourceMappingURL=ClaudeAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClaudeAdapter.d.ts","sourceRoot":"","sources":["../../../src/Init/ClaudeAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,EAAU,MAAM,EAAE,KAAK,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAE9D,OAAO,EAA0B,aAAa,EAAgC,MAAM,oBAAoB,CAAA;AAExG,OAAO,EAAE,yBAAyB,EAAE,KAAK,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;;;;;;;AAE9D,qBAAa,qCAAsC,SAAQ,0CAM1D;IACA,IAAI,OAAO,WAEV;CACD;;;;;;AAED,qBAAa,+BAAgC,SAAQ,oCAKpD;IACA,IAAI,OAAO,WAEV;CACD;;;;;;AAED,qBAAa,2BAA4B,SAAQ,gCAKhD;IACA,IAAI,OAAO,yFAIV;CACD;;;;;;;;AA0CD,mEAAmE;AACnE,qBAAa,kBAAmB,SAAQ,uBAGtC;IACD;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAA;KAAE,iDAQ1G;CACD;;;;0BAgFkB,aAAa;;;;;AAGhC,qBAAa,aAAc,SAAQ,kBAGjC;CAAG"}
@@ -1,77 +0,0 @@
1
- import { FileSystem, Path } from '@effect/platform';
2
- import { Effect, Layer } from 'effect';
3
- import { CliInvocation } from '../Install/Domain.js';
4
- import type { InitComponent, InitScope } from './Domain.js';
5
- import type { MutationOperation } from './MutationTransaction.js';
6
- export declare const CLAUDE_PROFILE_VERSION = "0.0.4";
7
- export declare const CLAUDE_POLICY_MANAGED_MCP = "managed_mcp_only";
8
- export declare const CLAUDE_POLICY_MCP_DENIED = "managed_mcp_denied";
9
- export declare const CLAUDE_POLICY_MCP_NOT_ALLOWED = "managed_mcp_not_allowed";
10
- export declare const CLAUDE_POLICY_READ_ONLY = "target_read_only";
11
- interface ClaudeTargetLocations {
12
- readonly settingsFile: string;
13
- readonly skillDirectory: string;
14
- readonly skillFile: string;
15
- readonly mcpFile: string;
16
- readonly managedSettingsFiles: string[];
17
- readonly managedSettingsDirectories: string[];
18
- }
19
- export interface ClaudeManagedSettingsLocationSet {
20
- readonly files: string[];
21
- readonly directories: string[];
22
- }
23
- interface ClaudeRegistrationInspection {
24
- readonly current: boolean;
25
- readonly installed: boolean;
26
- readonly legacyVariants: string[];
27
- readonly version?: string;
28
- }
29
- export interface ClaudeProfileInspection {
30
- readonly scope: InitScope;
31
- readonly targets: ClaudeTargetLocations;
32
- readonly hook: ClaudeRegistrationInspection;
33
- readonly skill: ClaudeRegistrationInspection;
34
- readonly mcp: ClaudeRegistrationInspection;
35
- readonly components: InitComponent[];
36
- readonly configured: boolean;
37
- readonly profileVersion: string;
38
- readonly componentVersions: {
39
- readonly hook?: string;
40
- readonly skill?: string;
41
- readonly mcp?: string;
42
- };
43
- readonly policyBlocks: string[];
44
- readonly remotePolicyMayApply: true;
45
- readonly reloadMayBeRequired: boolean;
46
- readonly consentMayBeRequired: boolean;
47
- }
48
- export interface ClaudeProfileMutationPlan {
49
- readonly changed: boolean;
50
- readonly inspection: ClaudeProfileInspection;
51
- readonly resultInspection: ClaudeProfileInspection;
52
- readonly operations: MutationOperation[];
53
- }
54
- declare function defaultManagedSettingsLocations(): ClaudeManagedSettingsLocationSet;
55
- declare const ClaudeManagedSettingsLocations_base: Effect.Service.Class<ClaudeManagedSettingsLocations, "@expandai/cli/Init/ClaudeManagedSettingsLocations", {
56
- readonly sync: typeof defaultManagedSettingsLocations;
57
- }>;
58
- /** Discoverable file-based Claude managed-policy locations for the current platform. */
59
- export declare class ClaudeManagedSettingsLocations extends ClaudeManagedSettingsLocations_base {
60
- static testLayer(locations: ClaudeManagedSettingsLocationSet): Layer.Layer<ClaudeManagedSettingsLocations, never, never>;
61
- }
62
- declare const ClaudeProfile_base: Effect.Service.Class<ClaudeProfile, "@expandai/cli/Init/ClaudeProfile", {
63
- readonly dependencies: readonly [Layer.Layer<FileSystem.FileSystem, never, never>, Layer.Layer<Path.Path, never, never>, Layer.Layer<ClaudeManagedSettingsLocations, never, never>, Layer.Layer<CliInvocation, import("effect/ConfigError").ConfigError, never>];
64
- readonly effect: Effect.Effect<{
65
- readonly inspect: (scope: "global" | "project") => Effect.Effect<ClaudeProfileInspection, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
66
- readonly plan: (scope: "global" | "project") => Effect.Effect<{
67
- changed: boolean;
68
- inspection: ClaudeProfileInspection;
69
- resultInspection: ClaudeProfileInspection;
70
- operations: MutationOperation[];
71
- }, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
72
- }, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, ClaudeManagedSettingsLocations | CliInvocation | FileSystem.FileSystem | Path.Path>;
73
- }>;
74
- export declare class ClaudeProfile extends ClaudeProfile_base {
75
- }
76
- export {};
77
- //# sourceMappingURL=ClaudeProfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClaudeProfile.d.ts","sourceRoot":"","sources":["../../../src/Init/ClaudeProfile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAiB,MAAM,EAAU,KAAK,EAAkB,MAAM,QAAQ,CAAA;AAI7E,OAAO,EAAmB,aAAa,EAAsC,MAAM,sBAAsB,CAAA;AAEzG,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAyB,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAExF,eAAO,MAAM,sBAAsB,UAAc,CAAA;AAEjD,eAAO,MAAM,yBAAyB,qBAAqB,CAAA;AAC3D,eAAO,MAAM,wBAAwB,uBAAuB,CAAA;AAC5D,eAAO,MAAM,6BAA6B,4BAA4B,CAAA;AACtE,eAAO,MAAM,uBAAuB,qBAAqB,CAAA;AAEzD,UAAU,qBAAqB;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,oBAAoB,EAAE,MAAM,EAAE,CAAA;IACvC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,EAAE,CAAA;CAC7C;AAED,MAAM,WAAW,gCAAgC;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAA;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED,UAAU,4BAA4B;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,IAAI,EAAE,4BAA4B,CAAA;IAC3C,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAA;IAC5C,QAAQ,CAAC,GAAG,EAAE,4BAA4B,CAAA;IAC1C,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAA;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,iBAAiB,EAAE;QAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;IAC/B,QAAQ,CAAC,oBAAoB,EAAE,IAAI,CAAA;IACnC,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAA;IACrC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;CACtC;AAED,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,UAAU,EAAE,uBAAuB,CAAA;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,uBAAuB,CAAA;IAClD,QAAQ,CAAC,UAAU,EAAE,iBAAiB,EAAE,CAAA;CACxC;AA2BD,iBAAS,+BAA+B,IAAI,gCAAgC,CAmB3E;;;;AAED,wFAAwF;AACxF,qBAAa,8BAA+B,SAAQ,mCAKnD;IACA,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,gCAAgC,6DAE3D;CACD;;;;;;;;;;;;;AAsUD,qBAAa,aAAc,SAAQ,kBAGjC;CAAG"}
@@ -1,139 +0,0 @@
1
- import { Schema } from 'effect';
2
- export declare const AUTHORIZATION_REQUIRED_MESSAGE = "Open the approval page in your browser, type in the code shown here, and approve. Only enter this code on the Expand approval page your terminal named \u2014 never a code someone sent you, and never on a page from a link you did not expect. When you have approved, say so, and the same command will pick the authorization up.";
3
- export declare const AUTHORIZATION_CONSUMED_MESSAGE = "Authorization complete. That setup code has been consumed and cannot be reused.";
4
- export declare const ALREADY_AUTHENTICATED_MESSAGE = "Expand is already authorized. Agent setup is complete.";
5
- /**
6
- * Some harnesses were configured and some were not. This has to be its own
7
- * message: the agent relays `userMessage` verbatim, so reporting a partial run
8
- * with "Agent setup is complete" tells the user something untrue about a
9
- * machine they are about to rely on.
10
- */
11
- export declare const PARTIAL_CONFIGURATION_MESSAGE = "Expand is authorized, but not every harness could be configured. The harnesses that failed are listed under `failures`; the ones under `installations` are ready to use.";
12
- export declare const HARNESS_SELECTION_MESSAGE = "Show these harnesses to the user and ask which to configure. Pass the chosen ones to `expandai init --harnesses`. Harnesses that are not chosen are left untouched.";
13
- /** There is nothing to choose from, so the agent must not present an empty list. */
14
- export declare const NO_HARNESS_DETECTED_MESSAGE = "No supported agent harness was found on this machine. Do not ask the user to choose from an empty list. Tell them Expand supports claude-code, cursor, opencode, and codex, and that setup cannot continue until one of them is installed.";
15
- export declare const InitHarness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
16
- export type InitHarness = typeof InitHarness.Type;
17
- declare const InitDetectionResult_base: Schema.Class<InitDetectionResult, {
18
- schemaVersion: Schema.Literal<[1]>;
19
- status: Schema.Literal<["detected"]>;
20
- harnesses: Schema.Array$<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
21
- current: Schema.optional<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
22
- userMessage: Schema.Literal<["Show these harnesses to the user and ask which to configure. Pass the chosen ones to `expandai init --harnesses`. Harnesses that are not chosen are left untouched.", "No supported agent harness was found on this machine. Do not ask the user to choose from an empty list. Tell them Expand supports claude-code, cursor, opencode, and codex, and that setup cannot continue until one of them is installed."]>;
23
- }, Schema.Struct.Encoded<{
24
- schemaVersion: Schema.Literal<[1]>;
25
- status: Schema.Literal<["detected"]>;
26
- harnesses: Schema.Array$<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
27
- current: Schema.optional<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
28
- userMessage: Schema.Literal<["Show these harnesses to the user and ask which to configure. Pass the chosen ones to `expandai init --harnesses`. Harnesses that are not chosen are left untouched.", "No supported agent harness was found on this machine. Do not ask the user to choose from an empty list. Tell them Expand supports claude-code, cursor, opencode, and codex, and that setup cannot continue until one of them is installed."]>;
29
- }>, never, {
30
- readonly current?: "claude-code" | "codex" | "cursor" | "opencode" | undefined;
31
- } & {
32
- readonly harnesses: readonly ("claude-code" | "codex" | "cursor" | "opencode")[];
33
- } & {
34
- readonly schemaVersion: 1;
35
- } & {
36
- readonly status: "detected";
37
- } & {
38
- readonly userMessage: "No supported agent harness was found on this machine. Do not ask the user to choose from an empty list. Tell them Expand supports claude-code, cursor, opencode, and codex, and that setup cannot continue until one of them is installed." | "Show these harnesses to the user and ask which to configure. Pass the chosen ones to `expandai init --harnesses`. Harnesses that are not chosen are left untouched.";
39
- }, {}, {}>;
40
- /**
41
- * Answer to `init --detect`: what setup *would* touch, before it touches
42
- * anything. Separate from `InitResult` because detection never authorizes,
43
- * never writes, and can legitimately find nothing.
44
- */
45
- export declare class InitDetectionResult extends InitDetectionResult_base {
46
- }
47
- export declare const InitHarnesses: Schema.NonEmptyArray<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
48
- export type InitHarnesses = typeof InitHarnesses.Type;
49
- export declare const InitScope: Schema.Literal<["project", "global"]>;
50
- export type InitScope = typeof InitScope.Type;
51
- export declare const InitComponent: Schema.Literal<["webfetch-hook", "runtime-skill", "mcp"]>;
52
- export type InitComponent = typeof InitComponent.Type;
53
- export declare const InitRuntimeState: Schema.Literal<["unverified", "observed", "reload_required", "blocked"]>;
54
- export type InitRuntimeState = typeof InitRuntimeState.Type;
55
- export declare const InitStatus: Schema.Literal<["authorization_required", "completed"]>;
56
- export type InitStatus = typeof InitStatus.Type;
57
- declare const InitRequest_base: Schema.Class<InitRequest, {
58
- harnesses: Schema.NonEmptyArray<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
59
- scope: Schema.Literal<["project", "global"]>;
60
- setupToken: Schema.optional<Schema.transform<Schema.filter<Schema.filter<typeof Schema.String>>, Schema.Redacted<typeof Schema.String>>>;
61
- }, Schema.Struct.Encoded<{
62
- harnesses: Schema.NonEmptyArray<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
63
- scope: Schema.Literal<["project", "global"]>;
64
- setupToken: Schema.optional<Schema.transform<Schema.filter<Schema.filter<typeof Schema.String>>, Schema.Redacted<typeof Schema.String>>>;
65
- }>, never, {
66
- readonly setupToken?: import("effect/Redacted").Redacted<string> | undefined;
67
- } & {
68
- readonly harnesses: readonly ["claude-code" | "codex" | "cursor" | "opencode", ...("claude-code" | "codex" | "cursor" | "opencode")[]];
69
- } & {
70
- readonly scope: "global" | "project";
71
- }, {}, {}>;
72
- export declare class InitRequest extends InitRequest_base {
73
- }
74
- export declare const InitResult: Schema.Union<[Schema.Struct<{
75
- schemaVersion: Schema.Literal<[1]>;
76
- status: Schema.Literal<["authorization_required"]>;
77
- harnesses: Schema.NonEmptyArray<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
78
- scope: Schema.Literal<["project", "global"]>;
79
- userMessage: Schema.Literal<["Open the approval page in your browser, type in the code shown here, and approve. Only enter this code on the Expand approval page your terminal named — never a code someone sent you, and never on a page from a link you did not expect. When you have approved, say so, and the same command will pick the authorization up."]>;
80
- authorization: Schema.Struct<{
81
- url: typeof Schema.URL;
82
- userCode: typeof Schema.String;
83
- approvalExpiresAt: typeof Schema.DateTimeUtc;
84
- }>;
85
- }>, Schema.Struct<{
86
- schemaVersion: Schema.Literal<[1]>;
87
- status: Schema.Literal<["completed"]>;
88
- harnesses: Schema.NonEmptyArray<Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>>;
89
- scope: Schema.Literal<["project", "global"]>;
90
- userMessage: Schema.Literal<["Authorization complete. That setup code has been consumed and cannot be reused.", "Expand is already authorized. Agent setup is complete.", "Expand is authorized, but not every harness could be configured. The harnesses that failed are listed under `failures`; the ones under `installations` are ready to use."]>;
91
- auth: Schema.Struct<{
92
- healthy: typeof Schema.Boolean;
93
- }>;
94
- projectPath: Schema.optional<typeof Schema.String>;
95
- installations: Schema.NonEmptyArray<Schema.Struct<{
96
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
97
- configured: typeof Schema.Boolean;
98
- changed: typeof Schema.Boolean;
99
- components: Schema.Array$<Schema.Literal<["webfetch-hook", "runtime-skill", "mcp"]>>;
100
- version: typeof Schema.String;
101
- verification: Schema.Struct<{
102
- runtimeState: Schema.Literal<["unverified", "observed", "reload_required", "blocked"]>;
103
- nextAction: typeof Schema.String;
104
- }>;
105
- }>>;
106
- failures: Schema.optional<Schema.Array$<Schema.Struct<{
107
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
108
- code: typeof Schema.String;
109
- recoverable: typeof Schema.Boolean;
110
- }>>>;
111
- }>]>;
112
- export type InitResult = typeof InitResult.Type;
113
- declare const InitErrorEnvelope_base: Schema.Class<InitErrorEnvelope, {
114
- schemaVersion: Schema.Literal<[1]>;
115
- status: Schema.Literal<["error"]>;
116
- code: typeof Schema.String;
117
- message: typeof Schema.String;
118
- recoverable: typeof Schema.Boolean;
119
- }, Schema.Struct.Encoded<{
120
- schemaVersion: Schema.Literal<[1]>;
121
- status: Schema.Literal<["error"]>;
122
- code: typeof Schema.String;
123
- message: typeof Schema.String;
124
- recoverable: typeof Schema.Boolean;
125
- }>, never, {
126
- readonly code: string;
127
- } & {
128
- readonly message: string;
129
- } & {
130
- readonly recoverable: boolean;
131
- } & {
132
- readonly schemaVersion: 1;
133
- } & {
134
- readonly status: "error";
135
- }, {}, {}>;
136
- export declare class InitErrorEnvelope extends InitErrorEnvelope_base {
137
- }
138
- export {};
139
- //# sourceMappingURL=Domain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain.d.ts","sourceRoot":"","sources":["../../../src/Init/Domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAI/B,eAAO,MAAM,8BAA8B,0UACwR,CAAA;AAEnU,eAAO,MAAM,8BAA8B,oFACuC,CAAA;AAElF,eAAO,MAAM,6BAA6B,2DAA2D,CAAA;AAErG;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,6KACiI,CAAA;AAE3K,eAAO,MAAM,yBAAyB,wKACgI,CAAA;AAEtK,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,+OACqM,CAAA;AAE7O,eAAO,MAAM,WAAW,gEAA+D,CAAA;AACvF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AAEjD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,wBAMvC;CAAG;AAEL,eAAO,MAAM,aAAa,sFAAoC,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,SAAS,uCAAsC,CAAA;AAC5D,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,eAAO,MAAM,aAAa,2DAA0D,CAAA;AACpF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,gBAAgB,0EAAyE,CAAA;AACtG,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAA;AAE3D,eAAO,MAAM,UAAU,yDAAwD,CAAA;AAC/E,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;AAa/C,qBAAa,WAAY,SAAQ,gBAI/B;CAAG;AAqEL,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqE,CAAA;AAC5F,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AAE/C,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG"}
@@ -1,33 +0,0 @@
1
- import { Schema } from 'effect';
2
- import { type InitComponent, type InitRuntimeState } from './Domain.js';
3
- export interface HarnessInspection {
4
- readonly configured: boolean;
5
- readonly changed?: boolean;
6
- readonly components: InitComponent[];
7
- readonly integrationVersion?: string;
8
- readonly policyBlock?: string;
9
- readonly nextAction: string;
10
- readonly runtimeState?: InitRuntimeState;
11
- }
12
- declare const HarnessInspectionError_base: Schema.TaggedErrorClass<HarnessInspectionError, "HarnessInspectionError", {
13
- readonly _tag: Schema.tag<"HarnessInspectionError">;
14
- } & {
15
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
16
- scope: Schema.Literal<["project", "global"]>;
17
- error: typeof Schema.Defect;
18
- }>;
19
- export declare class HarnessInspectionError extends HarnessInspectionError_base {
20
- get message(): string;
21
- }
22
- declare const HarnessConfigurationError_base: Schema.TaggedErrorClass<HarnessConfigurationError, "HarnessConfigurationError", {
23
- readonly _tag: Schema.tag<"HarnessConfigurationError">;
24
- } & {
25
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
26
- scope: Schema.Literal<["project", "global"]>;
27
- error: typeof Schema.Defect;
28
- }>;
29
- export declare class HarnessConfigurationError extends HarnessConfigurationError_base {
30
- get message(): string;
31
- }
32
- export {};
33
- //# sourceMappingURL=HarnessAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HarnessAdapter.d.ts","sourceRoot":"","sources":["../../../src/Init/HarnessAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAe,KAAK,gBAAgB,EAAa,MAAM,aAAa,CAAA;AAE/F,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,CAAA;IACpC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAA;CACxC;;;;;;;;AAED,qBAAa,sBAAuB,SAAQ,2BAI1C;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;;AAED,qBAAa,yBAA0B,SAAQ,8BAO9C;IACA,IAAI,OAAO,WAEV;CACD"}
@@ -1,19 +0,0 @@
1
- import { FileSystem, Path } from '@effect/platform';
2
- import { Effect, Option } from 'effect';
3
- import { InitHarness } from './Domain.js';
4
- interface HarnessDetectionInput {
5
- readonly cwd?: string;
6
- readonly environment?: Readonly<Record<string, string | undefined>>;
7
- readonly hint?: typeof InitHarness.Type;
8
- }
9
- declare const HarnessDetector_base: Effect.Service.Class<HarnessDetector, "@expandai/cli/Init/HarnessDetector", {
10
- readonly dependencies: readonly [import("effect/Layer").Layer<FileSystem.FileSystem, never, never>, import("effect/Layer").Layer<Path.Path, never, never>];
11
- readonly effect: Effect.Effect<{
12
- readonly detect: (input?: HarnessDetectionInput | undefined) => Effect.Effect<("claude-code" | "codex" | "cursor" | "opencode")[], never, never>;
13
- readonly detectCurrent: (input?: Pick<HarnessDetectionInput, "environment"> | undefined) => Effect.Effect<Option.Option<"claude-code" | "codex" | "cursor" | "opencode">, never, never>;
14
- }, never, FileSystem.FileSystem | Path.Path>;
15
- }>;
16
- export declare class HarnessDetector extends HarnessDetector_base {
17
- }
18
- export {};
19
- //# sourceMappingURL=HarnessDetector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HarnessDetector.d.ts","sourceRoot":"","sources":["../../../src/Init/HarnessDetector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAA;AAE7D,UAAU,qBAAqB;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IACnE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,WAAW,CAAC,IAAI,CAAA;CACvC;;;;;;;;AAmBD,qBAAa,eAAgB,SAAQ,oBA+CnC;CAAG"}
@@ -1,50 +0,0 @@
1
- import { Effect, Schema } from 'effect';
2
- import { ClaudeAdapter } from './ClaudeAdapter.js';
3
- import type { InitHarness, InitScope } from './Domain.js';
4
- import type { HarnessConfigurationError, HarnessInspection, HarnessInspectionError } from './HarnessAdapter.js';
5
- import { CodexAdapter, CursorAdapter, OpencodeAdapter } from './StandardAdapters.js';
6
- export interface HarnessAdapterContract {
7
- readonly harness: InitHarness;
8
- readonly inspect: (scope: InitScope) => Effect.Effect<HarnessInspection, HarnessInspectionError>;
9
- readonly configure: (scope: InitScope) => Effect.Effect<HarnessInspection, HarnessConfigurationError>;
10
- }
11
- interface HarnessRegistryContract {
12
- readonly inspect: (harness: InitHarness, scope: InitScope) => Effect.Effect<HarnessInspection, UnsupportedInitHarnessError | HarnessInspectionError>;
13
- readonly configure: (harness: InitHarness, scope: InitScope) => Effect.Effect<HarnessInspection, UnsupportedInitHarnessError | HarnessConfigurationError>;
14
- }
15
- declare const UnsupportedInitHarnessError_base: Schema.TaggedErrorClass<UnsupportedInitHarnessError, "UnsupportedInitHarnessError", {
16
- readonly _tag: Schema.tag<"UnsupportedInitHarnessError">;
17
- } & {
18
- harness: typeof Schema.String;
19
- }>;
20
- export declare class UnsupportedInitHarnessError extends UnsupportedInitHarnessError_base {
21
- get message(): string;
22
- }
23
- declare const HarnessRegistry_base: Effect.Service.Class<HarnessRegistry, "@expandai/cli/Init/HarnessRegistry", {
24
- readonly dependencies: readonly [import("effect/Layer").Layer<ClaudeAdapter, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, import("@effect/platform/FileSystem").FileSystem>, import("effect/Layer").Layer<CursorAdapter, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<OpencodeAdapter, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<CodexAdapter, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>];
25
- readonly effect: Effect.Effect<HarnessRegistryContract, never, ClaudeAdapter | CodexAdapter | CursorAdapter | OpencodeAdapter>;
26
- }>;
27
- /**
28
- * `Default` is the **real** registry, wired to the four adapters.
29
- *
30
- * It used to be `sync: () => makeRegistry([])` — an empty registry that reported
31
- * every harness as unsupported. Nothing consumed it, because `main.ts` and the
32
- * tests both built `DefaultWithoutDependencies` with a registry supplied by
33
- * hand; but `InitService` and `StatusService` still *declared* it in their
34
- * `dependencies`, so the declaration was decorative and would have silently
35
- * produced an empty registry for anyone who reached for the obvious layer.
36
- * `Effect.Service` always generates `Default`, so the fix is to make it correct
37
- * rather than to remove it.
38
- */
39
- export declare class HarnessRegistry extends HarnessRegistry_base {
40
- /**
41
- * The adapters are statically known at the composition root, so the contract
42
- * is enforced by the type. The previous version took `ReadonlyArray<object>`
43
- * and proved membership at runtime by walking prototypes and calling
44
- * `Context.isTag` on the constructor — reflection standing in for a type, plus
45
- * an error channel for a condition the compiler already rules out.
46
- */
47
- static readonly fromAdapters: (adapters: ReadonlyArray<HarnessAdapterContract>) => HarnessRegistry;
48
- }
49
- export {};
50
- //# sourceMappingURL=HarnessRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HarnessRegistry.d.ts","sourceRoot":"","sources":["../../../src/Init/HarnessRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC/G,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEpF,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAA;IAChG,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAA;CACrG;AAED,UAAU,uBAAuB;IAChC,QAAQ,CAAC,OAAO,EAAE,CACjB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,SAAS,KACZ,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,2BAA2B,GAAG,sBAAsB,CAAC,CAAA;IAC3F,QAAQ,CAAC,SAAS,EAAE,CACnB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,SAAS,KACZ,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,2BAA2B,GAAG,yBAAyB,CAAC,CAAA;CAC9F;;;;;;AAED,qBAAa,2BAA4B,SAAQ,gCAKhD;IACA,IAAI,OAAO,WAEV;CACD;;;;;AA0BD;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,SAAQ,oBAMnC;IACD;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,CAAC,YAAY,aAAc,aAAa,CAAC,sBAAsB,CAAC,qBAClC;CAC7C"}
@@ -1,96 +0,0 @@
1
- import { FileSystem, Path } from '@effect/platform';
2
- import { Effect, Schema } from 'effect';
3
- type MutationType = 'write' | 'remove' | 'mkdir';
4
- interface MutationBase {
5
- readonly type: MutationType;
6
- readonly path: string;
7
- readonly expected?: MutationExpectedState;
8
- readonly validate?: Effect.Effect<unknown, unknown>;
9
- }
10
- export type MutationExpectedState = {
11
- readonly exists: false;
12
- } | {
13
- readonly exists: true;
14
- readonly type: 'File';
15
- readonly bytes: Uint8Array;
16
- readonly mode: number;
17
- } | {
18
- readonly exists: true;
19
- readonly type: 'Directory';
20
- readonly mode: number;
21
- };
22
- export interface WriteMutation extends MutationBase {
23
- readonly type: 'write';
24
- readonly bytes: Uint8Array;
25
- readonly mode?: number;
26
- }
27
- export interface RemoveMutation extends MutationBase {
28
- readonly type: 'remove';
29
- }
30
- export interface MakeDirectoryMutation extends MutationBase {
31
- readonly type: 'mkdir';
32
- readonly mode?: number;
33
- }
34
- export type MutationOperation = WriteMutation | RemoveMutation | MakeDirectoryMutation;
35
- declare const MutationFailure: Schema.Struct<{
36
- path: typeof Schema.String;
37
- operation: Schema.Literal<["write", "remove", "mkdir"]>;
38
- error: typeof Schema.Defect;
39
- }>;
40
- export type MutationFailure = typeof MutationFailure.Type;
41
- declare const MutationSymlinkError_base: Schema.TaggedErrorClass<MutationSymlinkError, "MutationSymlinkError", {
42
- readonly _tag: Schema.tag<"MutationSymlinkError">;
43
- } & {
44
- path: typeof Schema.String;
45
- }>;
46
- export declare class MutationSymlinkError extends MutationSymlinkError_base {
47
- get message(): string;
48
- }
49
- declare const MutationValidationError_base: Schema.TaggedErrorClass<MutationValidationError, "MutationValidationError", {
50
- readonly _tag: Schema.tag<"MutationValidationError">;
51
- } & Readonly<{
52
- path: typeof Schema.String;
53
- operation: Schema.Literal<["write", "remove", "mkdir"]>;
54
- error: typeof Schema.Defect;
55
- }>>;
56
- export declare class MutationValidationError extends MutationValidationError_base {
57
- get message(): string;
58
- }
59
- declare const MutationApplicationError_base: Schema.TaggedErrorClass<MutationApplicationError, "MutationApplicationError", {
60
- readonly _tag: Schema.tag<"MutationApplicationError">;
61
- } & {
62
- path: typeof Schema.String;
63
- operation: Schema.Literal<["write", "remove", "mkdir"]>;
64
- error: typeof Schema.Defect;
65
- rollbackFailures: Schema.Array$<Schema.Struct<{
66
- path: typeof Schema.String;
67
- operation: Schema.Literal<["write", "remove", "mkdir"]>;
68
- error: typeof Schema.Defect;
69
- }>>;
70
- }>;
71
- export declare class MutationApplicationError extends MutationApplicationError_base {
72
- get message(): string;
73
- }
74
- declare const MutationRollbackError_base: Schema.TaggedErrorClass<MutationRollbackError, "MutationRollbackError", {
75
- readonly _tag: Schema.tag<"MutationRollbackError">;
76
- } & {
77
- rollbackFailures: Schema.Array$<Schema.Struct<{
78
- path: typeof Schema.String;
79
- operation: Schema.Literal<["write", "remove", "mkdir"]>;
80
- error: typeof Schema.Defect;
81
- }>>;
82
- }>;
83
- export declare class MutationRollbackError extends MutationRollbackError_base {
84
- get message(): string;
85
- }
86
- export type MutationTransactionError = MutationSymlinkError | MutationValidationError | MutationApplicationError | MutationRollbackError;
87
- declare const MutationTransaction_base: Effect.Service.Class<MutationTransaction, "@expandai/cli/Init/MutationTransaction", {
88
- readonly dependencies: readonly [import("effect/Layer").Layer<FileSystem.FileSystem, never, never>, import("effect/Layer").Layer<Path.Path, never, never>];
89
- readonly effect: Effect.Effect<{
90
- readonly run: (operations: readonly MutationOperation[]) => Effect.Effect<undefined, MutationTransactionError, never>;
91
- }, never, FileSystem.FileSystem | Path.Path>;
92
- }>;
93
- export declare class MutationTransaction extends MutationTransaction_base {
94
- }
95
- export {};
96
- //# sourceMappingURL=MutationTransaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MutationTransaction.d.ts","sourceRoot":"","sources":["../../../src/Init/MutationTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAA0B,MAAM,kBAAkB,CAAA;AAE3E,OAAO,EAAuB,MAAM,EAAqC,MAAM,EAAS,MAAM,QAAQ,CAAA;AAEtG,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhD,UAAU,YAAY;IACrB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;CACnD;AAED,MAAM,MAAM,qBAAqB,GAC9B;IAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAE,GAC1B;IACA,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACpB,GACD;IACA,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACpB,CAAA;AAEJ,MAAM,WAAW,aAAc,SAAQ,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IACnD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CACvB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IAC1D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,cAAc,GAAG,qBAAqB,CAAA;AAEtF,QAAA,MAAM,eAAe;;;;EAInB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;;;;;;AAEzD,qBAAa,oBAAqB,SAAQ,yBAExC;IACD,IAAI,OAAO,WAEV;CACD;;;;;;;;AAqBD,qBAAa,uBAAwB,SAAQ,4BAG5C;IACA,IAAI,OAAO,WAEV;CACD;;;;;;;;;;;;;AAED,qBAAa,wBAAyB,SAAQ,6BAM7C;IACA,IAAI,OAAO,WAIV;CACD;;;;;;;;;;AAED,qBAAa,qBAAsB,SAAQ,0BAEzC;IACD,IAAI,OAAO,WAEV;CACD;AAED,MAAM,MAAM,wBAAwB,GACjC,oBAAoB,GACpB,uBAAuB,GACvB,wBAAwB,GACxB,qBAAqB,CAAA;;;;;;;AAknBxB,qBAAa,mBAAoB,SAAQ,wBAMxC;CAAG"}
@@ -1,72 +0,0 @@
1
- import { DateTime, Effect, Schema } from 'effect';
2
- import { ManualAuthorization } from '../Auth/ManualAuthorization.js';
3
- import { SetupGrantAuthorization } from '../Auth/SetupGrantAuthorization.js';
4
- import { Authentication } from '../Authentication.js';
5
- import { type InitRequest } from './Domain.js';
6
- import { HarnessRegistry } from './HarnessRegistry.js';
7
- declare const InitServiceError_base: Schema.TaggedErrorClass<InitServiceError, "InitServiceError", {
8
- readonly _tag: Schema.tag<"InitServiceError">;
9
- } & {
10
- code: Schema.Literal<["authorization_failed", "setup_token_rejected", "setup_unreachable", "stored_credential_conflict", "authorization_unreachable", "authorization_denied", "authorization_refused", "credential_health_failed", "credential_save_failed", "credential_storage_insecure", "unsupported_harness", "inspection_failed", "configuration_failed", "policy_blocked", "invalid_adapter_result"]>;
11
- recoverable: typeof Schema.Boolean;
12
- }>;
13
- export declare class InitServiceError extends InitServiceError_base {
14
- get message(): "A managed harness policy blocks this configuration." | "An Expand API key is already stored on this machine, and completing setup would replace it with no way to recover it. Nothing was changed and the setup prompt is still valid. Tell the user to run `expandai logout` to clear the stored key, then run the same setup command again." | "Authorization completed, but credentials could not be saved. Start authorization again." | "Authorization could not be completed. Start authorization again." | "Could not reach Expand to redeem the setup token. Nothing was sent, so the same token is still good — check the network and run the same command again." | "Could not reach the Expand API. Nothing was changed: any pending authorization is still pending, and if none existed, none was started. Do not retry the same command until the connection is fixed. Check that this machine can reach the API — if you are running inside an agent sandbox, its shell may have network access disabled — and check `EXPAND_API_URL` if it is set. Then run the same command again." | "Credential storage is not secure enough to continue." | "Expand refused to complete the authorization for a reason a new code cannot fix — most likely an OAuth client, resource, or scope misconfiguration on the server. Do not run setup again; each retry asks the user to approve and then fails the same way. Report the error under `code`." | "Stored credentials could not be validated safely." | "That setup token was rejected and is now spent. Do not retry it. Ask the user for a fresh setup prompt from the Expand dashboard, or continue without one to authorize in a browser." | "The authorization was denied in the browser. If that was unintended, run the same command again for a fresh approval code." | "The harness adapter returned an invalid configuration result." | "The harness configuration could not be inspected safely." | "The harness configuration could not be updated safely." | "This harness is not supported by init.";
15
- }
16
- declare const InitService_base: Effect.Service.Class<InitService, "@expandai/cli/Init/Service", {
17
- readonly dependencies: readonly [import("effect/Layer").Layer<Authentication, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<ManualAuthorization, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<SetupGrantAuthorization, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<HarnessRegistry, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, import("@effect/platform/FileSystem").FileSystem>];
18
- readonly effect: Effect.Effect<{
19
- readonly run: (request: InitRequest) => Effect.Effect<{
20
- readonly schemaVersion: 1;
21
- readonly status: "authorization_required";
22
- readonly harnesses: readonly ["claude-code" | "codex" | "cursor" | "opencode", ...("claude-code" | "codex" | "cursor" | "opencode")[]];
23
- readonly scope: "global" | "project";
24
- readonly userMessage: "Open the approval page in your browser, type in the code shown here, and approve. Only enter this code on the Expand approval page your terminal named — never a code someone sent you, and never on a page from a link you did not expect. When you have approved, say so, and the same command will pick the authorization up.";
25
- readonly authorization: {
26
- readonly url: URL;
27
- readonly userCode: string;
28
- readonly approvalExpiresAt: DateTime.Utc;
29
- };
30
- } | {
31
- readonly schemaVersion: 1;
32
- readonly status: "completed";
33
- readonly harnesses: readonly ["claude-code" | "codex" | "cursor" | "opencode", ...("claude-code" | "codex" | "cursor" | "opencode")[]];
34
- readonly scope: "global" | "project";
35
- readonly userMessage: "Authorization complete. That setup code has been consumed and cannot be reused." | "Expand is already authorized. Agent setup is complete." | "Expand is authorized, but not every harness could be configured. The harnesses that failed are listed under `failures`; the ones under `installations` are ready to use.";
36
- readonly auth: {
37
- readonly healthy: boolean;
38
- };
39
- readonly projectPath?: string | undefined;
40
- readonly installations: readonly [{
41
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
42
- readonly configured: boolean;
43
- readonly changed: boolean;
44
- readonly components: readonly ("mcp" | "runtime-skill" | "webfetch-hook")[];
45
- readonly version: string;
46
- readonly verification: {
47
- readonly runtimeState: "blocked" | "observed" | "reload_required" | "unverified";
48
- readonly nextAction: string;
49
- };
50
- }, ...{
51
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
52
- readonly configured: boolean;
53
- readonly changed: boolean;
54
- readonly components: readonly ("mcp" | "runtime-skill" | "webfetch-hook")[];
55
- readonly version: string;
56
- readonly verification: {
57
- readonly runtimeState: "blocked" | "observed" | "reload_required" | "unverified";
58
- readonly nextAction: string;
59
- };
60
- }[]];
61
- readonly failures?: readonly {
62
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
63
- readonly code: string;
64
- readonly recoverable: boolean;
65
- }[] | undefined;
66
- }, InitServiceError, never>;
67
- }, never, Authentication | HarnessRegistry | ManualAuthorization | SetupGrantAuthorization>;
68
- }>;
69
- export declare class InitService extends InitService_base {
70
- }
71
- export {};
72
- //# sourceMappingURL=Service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../src/Init/Service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,QAAQ,EAAE,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEjF,OAAO,EACN,mBAAmB,EAKnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAgC,MAAM,oCAAoC,CAAA;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAKN,KAAK,WAAW,EAGhB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,eAAe,EAA+B,MAAM,sBAAsB,CAAA;;;;;;;AAoBnF,qBAAa,gBAAiB,SAAQ,qBAGpC;IACD,IAAI,OAAO,m9DA8CV;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsHD,qBAAa,WAAY,SAAQ,gBA6K/B;CAAG"}