expandai 0.0.3 → 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 (320) 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/build/skills/expandai/SKILL.md +12 -6
  8. package/package.json +19 -11
  9. package/build/dts/ApiClient.d.ts +0 -165
  10. package/build/dts/ApiClient.d.ts.map +0 -1
  11. package/build/dts/Auth/Domain.d.ts +0 -95
  12. package/build/dts/Auth/Domain.d.ts.map +0 -1
  13. package/build/dts/Auth/ManualAuthorization.d.ts +0 -107
  14. package/build/dts/Auth/ManualAuthorization.d.ts.map +0 -1
  15. package/build/dts/Auth/PendingInit.d.ts +0 -35
  16. package/build/dts/Auth/PendingInit.d.ts.map +0 -1
  17. package/build/dts/Auth/Pkce.d.ts +0 -10
  18. package/build/dts/Auth/Pkce.d.ts.map +0 -1
  19. package/build/dts/Auth/SetupGrantAuthorization.d.ts +0 -34
  20. package/build/dts/Auth/SetupGrantAuthorization.d.ts.map +0 -1
  21. package/build/dts/Authentication.d.ts +0 -24
  22. package/build/dts/Authentication.d.ts.map +0 -1
  23. package/build/dts/BrowserOAuth.d.ts +0 -99
  24. package/build/dts/BrowserOAuth.d.ts.map +0 -1
  25. package/build/dts/CommandPath.d.ts +0 -2
  26. package/build/dts/CommandPath.d.ts.map +0 -1
  27. package/build/dts/Commands/Fetch.d.ts +0 -30
  28. package/build/dts/Commands/Fetch.d.ts.map +0 -1
  29. package/build/dts/Commands/Hook.d.ts +0 -17
  30. package/build/dts/Commands/Hook.d.ts.map +0 -1
  31. package/build/dts/Commands/Init.d.ts +0 -55
  32. package/build/dts/Commands/Init.d.ts.map +0 -1
  33. package/build/dts/Commands/Mcp.d.ts +0 -11
  34. package/build/dts/Commands/Mcp.d.ts.map +0 -1
  35. package/build/dts/Commands/McpRun.d.ts +0 -5
  36. package/build/dts/Commands/McpRun.d.ts.map +0 -1
  37. package/build/dts/Commands/Search.d.ts +0 -21
  38. package/build/dts/Commands/Search.d.ts.map +0 -1
  39. package/build/dts/Commands/Skill.d.ts +0 -12
  40. package/build/dts/Commands/Skill.d.ts.map +0 -1
  41. package/build/dts/Commands/Status.d.ts +0 -27
  42. package/build/dts/Commands/Status.d.ts.map +0 -1
  43. package/build/dts/Commands/Telemetry.d.ts +0 -7
  44. package/build/dts/Commands/Telemetry.d.ts.map +0 -1
  45. package/build/dts/Commands/Uninstall.d.ts +0 -9
  46. package/build/dts/Commands/Uninstall.d.ts.map +0 -1
  47. package/build/dts/Config.d.ts +0 -196
  48. package/build/dts/Config.d.ts.map +0 -1
  49. package/build/dts/Hook/Claude.d.ts +0 -13
  50. package/build/dts/Hook/Claude.d.ts.map +0 -1
  51. package/build/dts/Hook/Errors.d.ts +0 -20
  52. package/build/dts/Hook/Errors.d.ts.map +0 -1
  53. package/build/dts/Hook/Opencode.d.ts +0 -13
  54. package/build/dts/Hook/Opencode.d.ts.map +0 -1
  55. package/build/dts/Hook/SnapshotNote.d.ts +0 -12
  56. package/build/dts/Hook/SnapshotNote.d.ts.map +0 -1
  57. package/build/dts/Init/ClaudeAdapter.d.ts +0 -61
  58. package/build/dts/Init/ClaudeAdapter.d.ts.map +0 -1
  59. package/build/dts/Init/ClaudeProfile.d.ts +0 -78
  60. package/build/dts/Init/ClaudeProfile.d.ts.map +0 -1
  61. package/build/dts/Init/Domain.d.ts +0 -139
  62. package/build/dts/Init/Domain.d.ts.map +0 -1
  63. package/build/dts/Init/HarnessAdapter.d.ts +0 -33
  64. package/build/dts/Init/HarnessAdapter.d.ts.map +0 -1
  65. package/build/dts/Init/HarnessDetector.d.ts +0 -19
  66. package/build/dts/Init/HarnessDetector.d.ts.map +0 -1
  67. package/build/dts/Init/HarnessRegistry.d.ts +0 -50
  68. package/build/dts/Init/HarnessRegistry.d.ts.map +0 -1
  69. package/build/dts/Init/MutationTransaction.d.ts +0 -96
  70. package/build/dts/Init/MutationTransaction.d.ts.map +0 -1
  71. package/build/dts/Init/Service.d.ts +0 -72
  72. package/build/dts/Init/Service.d.ts.map +0 -1
  73. package/build/dts/Init/StandardAdapters.d.ts +0 -42
  74. package/build/dts/Init/StandardAdapters.d.ts.map +0 -1
  75. package/build/dts/Init/Status.d.ts +0 -149
  76. package/build/dts/Init/Status.d.ts.map +0 -1
  77. package/build/dts/Install/Claude/Hook.d.ts +0 -120
  78. package/build/dts/Install/Claude/Hook.d.ts.map +0 -1
  79. package/build/dts/Install/Claude/Mcp.d.ts +0 -48
  80. package/build/dts/Install/Claude/Mcp.d.ts.map +0 -1
  81. package/build/dts/Install/Claude/Skill.d.ts +0 -23
  82. package/build/dts/Install/Claude/Skill.d.ts.map +0 -1
  83. package/build/dts/Install/Codex/Mcp.d.ts +0 -45
  84. package/build/dts/Install/Codex/Mcp.d.ts.map +0 -1
  85. package/build/dts/Install/Codex/Skill.d.ts +0 -22
  86. package/build/dts/Install/Codex/Skill.d.ts.map +0 -1
  87. package/build/dts/Install/Cursor/Mcp.d.ts +0 -45
  88. package/build/dts/Install/Cursor/Mcp.d.ts.map +0 -1
  89. package/build/dts/Install/Cursor/Skill.d.ts +0 -29
  90. package/build/dts/Install/Cursor/Skill.d.ts.map +0 -1
  91. package/build/dts/Install/Domain.d.ts +0 -103
  92. package/build/dts/Install/Domain.d.ts.map +0 -1
  93. package/build/dts/Install/Hook.d.ts +0 -30
  94. package/build/dts/Install/Hook.d.ts.map +0 -1
  95. package/build/dts/Install/Mcp.d.ts +0 -28
  96. package/build/dts/Install/Mcp.d.ts.map +0 -1
  97. package/build/dts/Install/Opencode/Hook.d.ts +0 -24
  98. package/build/dts/Install/Opencode/Hook.d.ts.map +0 -1
  99. package/build/dts/Install/Opencode/Mcp.d.ts +0 -47
  100. package/build/dts/Install/Opencode/Mcp.d.ts.map +0 -1
  101. package/build/dts/Install/Opencode/Skill.d.ts +0 -26
  102. package/build/dts/Install/Opencode/Skill.d.ts.map +0 -1
  103. package/build/dts/Install/Skill.d.ts +0 -32
  104. package/build/dts/Install/Skill.d.ts.map +0 -1
  105. package/build/dts/Install/Uninstall.d.ts +0 -32
  106. package/build/dts/Install/Uninstall.d.ts.map +0 -1
  107. package/build/dts/MarkdownAnsi.d.ts +0 -29
  108. package/build/dts/MarkdownAnsi.d.ts.map +0 -1
  109. package/build/dts/Mcp/ExpandDocs.d.ts +0 -19
  110. package/build/dts/Mcp/ExpandDocs.d.ts.map +0 -1
  111. package/build/dts/Mcp/RequestHeaders.d.ts.map +0 -1
  112. package/build/dts/Mcp/Server.d.ts.map +0 -1
  113. package/build/dts/Mcp/Toolkit.d.ts +0 -3
  114. package/build/dts/Mcp/Toolkit.d.ts.map +0 -1
  115. package/build/dts/Mcp/tools/Citations.d.ts +0 -266
  116. package/build/dts/Mcp/tools/Citations.d.ts.map +0 -1
  117. package/build/dts/Mcp/tools/Fetch.d.ts +0 -168
  118. package/build/dts/Mcp/tools/Fetch.d.ts.map +0 -1
  119. package/build/dts/SecureFile.d.ts +0 -23
  120. package/build/dts/SecureFile.d.ts.map +0 -1
  121. package/build/dts/Snippets.d.ts +0 -18
  122. package/build/dts/Snippets.d.ts.map +0 -1
  123. package/build/dts/Telemetry.d.ts +0 -30
  124. package/build/dts/Telemetry.d.ts.map +0 -1
  125. package/build/dts/Version.d.ts +0 -2
  126. package/build/dts/Version.d.ts.map +0 -1
  127. package/build/dts/Xdg.d.ts +0 -11
  128. package/build/dts/Xdg.d.ts.map +0 -1
  129. package/build/dts/index.d.ts.map +0 -1
  130. package/build/dts/main.d.ts +0 -3
  131. package/build/dts/main.d.ts.map +0 -1
  132. package/build/esm/ApiClient.js +0 -305
  133. package/build/esm/ApiClient.js.map +0 -1
  134. package/build/esm/Auth/Domain.js +0 -56
  135. package/build/esm/Auth/Domain.js.map +0 -1
  136. package/build/esm/Auth/ManualAuthorization.js +0 -253
  137. package/build/esm/Auth/ManualAuthorization.js.map +0 -1
  138. package/build/esm/Auth/PendingInit.js +0 -267
  139. package/build/esm/Auth/PendingInit.js.map +0 -1
  140. package/build/esm/Auth/Pkce.js +0 -23
  141. package/build/esm/Auth/Pkce.js.map +0 -1
  142. package/build/esm/Auth/SetupGrantAuthorization.js +0 -91
  143. package/build/esm/Auth/SetupGrantAuthorization.js.map +0 -1
  144. package/build/esm/Authentication.js +0 -143
  145. package/build/esm/Authentication.js.map +0 -1
  146. package/build/esm/BrowserOAuth.js +0 -251
  147. package/build/esm/BrowserOAuth.js.map +0 -1
  148. package/build/esm/CommandPath.js +0 -31
  149. package/build/esm/CommandPath.js.map +0 -1
  150. package/build/esm/Commands/Fetch.js +0 -119
  151. package/build/esm/Commands/Fetch.js.map +0 -1
  152. package/build/esm/Commands/Hook.js +0 -20
  153. package/build/esm/Commands/Hook.js.map +0 -1
  154. package/build/esm/Commands/Init.js +0 -371
  155. package/build/esm/Commands/Init.js.map +0 -1
  156. package/build/esm/Commands/Mcp.js +0 -19
  157. package/build/esm/Commands/Mcp.js.map +0 -1
  158. package/build/esm/Commands/McpRun.js +0 -15
  159. package/build/esm/Commands/McpRun.js.map +0 -1
  160. package/build/esm/Commands/Search.js +0 -46
  161. package/build/esm/Commands/Search.js.map +0 -1
  162. package/build/esm/Commands/Skill.js +0 -17
  163. package/build/esm/Commands/Skill.js.map +0 -1
  164. package/build/esm/Commands/Status.js +0 -186
  165. package/build/esm/Commands/Status.js.map +0 -1
  166. package/build/esm/Commands/Telemetry.js +0 -23
  167. package/build/esm/Commands/Telemetry.js.map +0 -1
  168. package/build/esm/Commands/Uninstall.js +0 -28
  169. package/build/esm/Commands/Uninstall.js.map +0 -1
  170. package/build/esm/Config.js +0 -619
  171. package/build/esm/Config.js.map +0 -1
  172. package/build/esm/Hook/Claude.js +0 -74
  173. package/build/esm/Hook/Claude.js.map +0 -1
  174. package/build/esm/Hook/Errors.js +0 -18
  175. package/build/esm/Hook/Errors.js.map +0 -1
  176. package/build/esm/Hook/Opencode.js +0 -50
  177. package/build/esm/Hook/Opencode.js.map +0 -1
  178. package/build/esm/Hook/SnapshotNote.js +0 -65
  179. package/build/esm/Hook/SnapshotNote.js.map +0 -1
  180. package/build/esm/Init/ClaudeAdapter.js +0 -137
  181. package/build/esm/Init/ClaudeAdapter.js.map +0 -1
  182. package/build/esm/Init/ClaudeProfile.js +0 -380
  183. package/build/esm/Init/ClaudeProfile.js.map +0 -1
  184. package/build/esm/Init/Domain.js +0 -118
  185. package/build/esm/Init/Domain.js.map +0 -1
  186. package/build/esm/Init/HarnessAdapter.js +0 -21
  187. package/build/esm/Init/HarnessAdapter.js.map +0 -1
  188. package/build/esm/Init/HarnessDetector.js +0 -65
  189. package/build/esm/Init/HarnessDetector.js.map +0 -1
  190. package/build/esm/Init/HarnessRegistry.js +0 -58
  191. package/build/esm/Init/HarnessRegistry.js.map +0 -1
  192. package/build/esm/Init/MutationTransaction.js +0 -494
  193. package/build/esm/Init/MutationTransaction.js.map +0 -1
  194. package/build/esm/Init/Service.js +0 -319
  195. package/build/esm/Init/Service.js.map +0 -1
  196. package/build/esm/Init/StandardAdapters.js +0 -116
  197. package/build/esm/Init/StandardAdapters.js.map +0 -1
  198. package/build/esm/Init/Status.js +0 -215
  199. package/build/esm/Init/Status.js.map +0 -1
  200. package/build/esm/Install/Claude/Hook.js +0 -221
  201. package/build/esm/Install/Claude/Hook.js.map +0 -1
  202. package/build/esm/Install/Claude/Mcp.js +0 -101
  203. package/build/esm/Install/Claude/Mcp.js.map +0 -1
  204. package/build/esm/Install/Claude/Skill.js +0 -56
  205. package/build/esm/Install/Claude/Skill.js.map +0 -1
  206. package/build/esm/Install/Codex/Mcp.js +0 -97
  207. package/build/esm/Install/Codex/Mcp.js.map +0 -1
  208. package/build/esm/Install/Codex/Skill.js +0 -33
  209. package/build/esm/Install/Codex/Skill.js.map +0 -1
  210. package/build/esm/Install/Cursor/Mcp.js +0 -74
  211. package/build/esm/Install/Cursor/Mcp.js.map +0 -1
  212. package/build/esm/Install/Cursor/Skill.js +0 -40
  213. package/build/esm/Install/Cursor/Skill.js.map +0 -1
  214. package/build/esm/Install/Domain.js +0 -162
  215. package/build/esm/Install/Domain.js.map +0 -1
  216. package/build/esm/Install/Hook.js +0 -38
  217. package/build/esm/Install/Hook.js.map +0 -1
  218. package/build/esm/Install/Mcp.js +0 -40
  219. package/build/esm/Install/Mcp.js.map +0 -1
  220. package/build/esm/Install/Opencode/Hook.js +0 -44
  221. package/build/esm/Install/Opencode/Hook.js.map +0 -1
  222. package/build/esm/Install/Opencode/Mcp.js +0 -76
  223. package/build/esm/Install/Opencode/Mcp.js.map +0 -1
  224. package/build/esm/Install/Opencode/Skill.js +0 -37
  225. package/build/esm/Install/Opencode/Skill.js.map +0 -1
  226. package/build/esm/Install/Skill.js +0 -41
  227. package/build/esm/Install/Skill.js.map +0 -1
  228. package/build/esm/Install/Uninstall.js +0 -49
  229. package/build/esm/Install/Uninstall.js.map +0 -1
  230. package/build/esm/MarkdownAnsi.js +0 -142
  231. package/build/esm/MarkdownAnsi.js.map +0 -1
  232. package/build/esm/Mcp/ExpandDocs.js +0 -56
  233. package/build/esm/Mcp/ExpandDocs.js.map +0 -1
  234. package/build/esm/Mcp/RequestHeaders.js +0 -13
  235. package/build/esm/Mcp/RequestHeaders.js.map +0 -1
  236. package/build/esm/Mcp/Server.js +0 -12
  237. package/build/esm/Mcp/Server.js.map +0 -1
  238. package/build/esm/Mcp/Toolkit.js +0 -16
  239. package/build/esm/Mcp/Toolkit.js.map +0 -1
  240. package/build/esm/Mcp/tools/Citations.js +0 -193
  241. package/build/esm/Mcp/tools/Citations.js.map +0 -1
  242. package/build/esm/Mcp/tools/Fetch.js +0 -165
  243. package/build/esm/Mcp/tools/Fetch.js.map +0 -1
  244. package/build/esm/SecureFile.js +0 -36
  245. package/build/esm/SecureFile.js.map +0 -1
  246. package/build/esm/Snippets.js +0 -29
  247. package/build/esm/Snippets.js.map +0 -1
  248. package/build/esm/Telemetry.js +0 -157
  249. package/build/esm/Telemetry.js.map +0 -1
  250. package/build/esm/Version.js +0 -4
  251. package/build/esm/Version.js.map +0 -1
  252. package/build/esm/Xdg.js +0 -15
  253. package/build/esm/Xdg.js.map +0 -1
  254. package/build/esm/index.js.map +0 -1
  255. package/build/esm/main.js.map +0 -1
  256. package/src/ApiClient.ts +0 -450
  257. package/src/Auth/Domain.ts +0 -63
  258. package/src/Auth/ManualAuthorization.ts +0 -296
  259. package/src/Auth/PendingInit.ts +0 -338
  260. package/src/Auth/Pkce.ts +0 -26
  261. package/src/Auth/SetupGrantAuthorization.ts +0 -116
  262. package/src/Authentication.ts +0 -202
  263. package/src/BrowserOAuth.ts +0 -359
  264. package/src/CommandPath.ts +0 -30
  265. package/src/Commands/Fetch.ts +0 -188
  266. package/src/Commands/Hook.ts +0 -48
  267. package/src/Commands/Init.ts +0 -489
  268. package/src/Commands/Mcp.ts +0 -30
  269. package/src/Commands/McpRun.ts +0 -25
  270. package/src/Commands/Search.ts +0 -97
  271. package/src/Commands/Skill.ts +0 -30
  272. package/src/Commands/Status.ts +0 -228
  273. package/src/Commands/Telemetry.ts +0 -42
  274. package/src/Commands/Uninstall.ts +0 -38
  275. package/src/Config.ts +0 -840
  276. package/src/Hook/Claude.ts +0 -81
  277. package/src/Hook/Errors.ts +0 -19
  278. package/src/Hook/Opencode.ts +0 -58
  279. package/src/Hook/SnapshotNote.ts +0 -66
  280. package/src/Init/ClaudeAdapter.ts +0 -191
  281. package/src/Init/ClaudeProfile.ts +0 -496
  282. package/src/Init/Domain.ts +0 -153
  283. package/src/Init/HarnessAdapter.ts +0 -35
  284. package/src/Init/HarnessDetector.ts +0 -77
  285. package/src/Init/HarnessRegistry.ts +0 -87
  286. package/src/Init/MutationTransaction.ts +0 -747
  287. package/src/Init/Service.ts +0 -385
  288. package/src/Init/StandardAdapters.ts +0 -141
  289. package/src/Init/Status.ts +0 -253
  290. package/src/Install/Claude/Hook.ts +0 -286
  291. package/src/Install/Claude/Mcp.ts +0 -129
  292. package/src/Install/Claude/Skill.ts +0 -77
  293. package/src/Install/Codex/Mcp.ts +0 -114
  294. package/src/Install/Codex/Skill.ts +0 -44
  295. package/src/Install/Cursor/Mcp.ts +0 -85
  296. package/src/Install/Cursor/Skill.ts +0 -51
  297. package/src/Install/Domain.ts +0 -221
  298. package/src/Install/Hook.ts +0 -50
  299. package/src/Install/Mcp.ts +0 -71
  300. package/src/Install/Opencode/Hook.ts +0 -55
  301. package/src/Install/Opencode/Mcp.ts +0 -87
  302. package/src/Install/Opencode/Skill.ts +0 -48
  303. package/src/Install/Opencode/expandai-webfetch.d.ts +0 -23
  304. package/src/Install/Opencode/expandai-webfetch.js +0 -56
  305. package/src/Install/Skill.ts +0 -57
  306. package/src/Install/Uninstall.ts +0 -82
  307. package/src/MarkdownAnsi.ts +0 -162
  308. package/src/Mcp/ExpandDocs.ts +0 -62
  309. package/src/Mcp/RequestHeaders.ts +0 -16
  310. package/src/Mcp/Server.ts +0 -15
  311. package/src/Mcp/Toolkit.ts +0 -21
  312. package/src/Mcp/tools/Citations.ts +0 -219
  313. package/src/Mcp/tools/Fetch.ts +0 -203
  314. package/src/SecureFile.ts +0 -70
  315. package/src/Snippets.ts +0 -39
  316. package/src/Telemetry.ts +0 -186
  317. package/src/Version.ts +0 -3
  318. package/src/Xdg.ts +0 -18
  319. package/src/index.ts +0 -1
  320. package/src/main.ts +0 -305
@@ -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"}
@@ -1,42 +0,0 @@
1
- import { FileSystem } from '@effect/platform';
2
- import { Effect } from 'effect';
3
- import { CodexMcp } from '../Install/Codex/Mcp.js';
4
- import { CodexSkill } from '../Install/Codex/Skill.js';
5
- import { CursorMcp } from '../Install/Cursor/Mcp.js';
6
- import { CursorSkill } from '../Install/Cursor/Skill.js';
7
- import { OpencodeHook } from '../Install/Opencode/Hook.js';
8
- import { OpencodeMcp } from '../Install/Opencode/Mcp.js';
9
- import { OpencodeSkill } from '../Install/Opencode/Skill.js';
10
- import { HarnessConfigurationError, type HarnessInspection, HarnessInspectionError } from './HarnessAdapter.js';
11
- declare const CursorAdapter_base: Effect.Service.Class<CursorAdapter, "@expandai/cli/Init/CursorAdapter", {
12
- readonly dependencies: readonly [import("effect/Layer").Layer<CursorMcp, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<CursorSkill, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>];
13
- readonly effect: Effect.Effect<{
14
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
15
- readonly inspect: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessInspectionError, never>;
16
- readonly configure: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessConfigurationError, never>;
17
- }, never, CursorMcp | CursorSkill>;
18
- }>;
19
- export declare class CursorAdapter extends CursorAdapter_base {
20
- }
21
- declare const CodexAdapter_base: Effect.Service.Class<CodexAdapter, "@expandai/cli/Init/CodexAdapter", {
22
- readonly dependencies: readonly [import("effect/Layer").Layer<CodexMcp, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<CodexSkill, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>];
23
- readonly effect: Effect.Effect<{
24
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
25
- readonly inspect: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessInspectionError, never>;
26
- readonly configure: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessConfigurationError, never>;
27
- }, never, CodexMcp | CodexSkill>;
28
- }>;
29
- export declare class CodexAdapter extends CodexAdapter_base {
30
- }
31
- declare const OpencodeAdapter_base: Effect.Service.Class<OpencodeAdapter, "@expandai/cli/Init/OpencodeAdapter", {
32
- readonly dependencies: readonly [import("effect/Layer").Layer<FileSystem.FileSystem, never, never>, import("effect/Layer").Layer<OpencodeHook, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<OpencodeMcp, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<OpencodeSkill, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, never>];
33
- readonly effect: Effect.Effect<{
34
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
35
- readonly inspect: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessInspectionError, never>;
36
- readonly configure: (scope: "global" | "project") => Effect.Effect<HarnessInspection, HarnessConfigurationError, never>;
37
- }, never, FileSystem.FileSystem | OpencodeHook | OpencodeMcp | OpencodeSkill>;
38
- }>;
39
- export declare class OpencodeAdapter extends OpencodeAdapter_base {
40
- }
41
- export {};
42
- //# sourceMappingURL=StandardAdapters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StandardAdapters.d.ts","sourceRoot":"","sources":["../../../src/Init/StandardAdapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAG5D,OAAO,EAAE,yBAAyB,EAAE,KAAK,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;;;;;;;;;AAoD/G,qBAAa,aAAc,SAAQ,kBAuBjC;CAAG;;;;;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAuBhC;CAAG;;;;;;;;;AAEL,qBAAa,eAAgB,SAAQ,oBA0BnC;CAAG"}
@@ -1,149 +0,0 @@
1
- import { DateTime, Effect, Schema } from 'effect';
2
- import { PendingInitStore } from '../Auth/PendingInit.js';
3
- import { ConfigManager } from '../Config.js';
4
- import { HarnessRegistry } from './HarnessRegistry.js';
5
- declare const StatusRequest_base: Schema.Class<StatusRequest, {
6
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
7
- scope: Schema.Literal<["project", "global"]>;
8
- }, Schema.Struct.Encoded<{
9
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
10
- scope: Schema.Literal<["project", "global"]>;
11
- }>, never, {
12
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
13
- } & {
14
- readonly scope: "global" | "project";
15
- }, {}, {}>;
16
- export declare class StatusRequest extends StatusRequest_base {
17
- }
18
- declare const StatusResult_base: Schema.Class<StatusResult, {
19
- schemaVersion: Schema.Literal<[1]>;
20
- status: Schema.Literal<["ok"]>;
21
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
22
- scope: Schema.Literal<["project", "global"]>;
23
- cli: Schema.Struct<{
24
- version: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
25
- }>;
26
- auth: Schema.Struct<{
27
- state: Schema.Literal<["absent", "unusable", "refresh_required", "healthy"]>;
28
- healthy: typeof Schema.Boolean;
29
- }>;
30
- pendingAuthorization: Schema.Union<[Schema.Struct<{
31
- state: Schema.Literal<["none"]>;
32
- count: Schema.Literal<[0]>;
33
- }>, Schema.Struct<{
34
- state: Schema.Literal<["approval_pending"]>;
35
- count: Schema.Literal<[1]>;
36
- approvalExpiresAt: typeof Schema.DateTimeUtc;
37
- }>]>;
38
- installation: Schema.Struct<{
39
- configured: typeof Schema.Boolean;
40
- integrationVersion: Schema.optional<Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>>;
41
- components: Schema.Struct<{
42
- webfetchHook: typeof Schema.Boolean;
43
- runtimeSkill: typeof Schema.Boolean;
44
- mcp: typeof Schema.Boolean;
45
- }>;
46
- runtimeState: Schema.Literal<["unverified", "reload_required", "blocked"]>;
47
- reloadState: Schema.Literal<["not_required", "required"]>;
48
- consentState: Schema.Literal<["not_required", "may_be_required"]>;
49
- policyState: Schema.Literal<["unverified", "blocked"]>;
50
- policyCodes: Schema.filter<Schema.Array$<Schema.Literal<["managed_policy_blocked", "target_read_only"]>>>;
51
- }>;
52
- }, Schema.Struct.Encoded<{
53
- schemaVersion: Schema.Literal<[1]>;
54
- status: Schema.Literal<["ok"]>;
55
- harness: Schema.Literal<["claude-code", "cursor", "opencode", "codex"]>;
56
- scope: Schema.Literal<["project", "global"]>;
57
- cli: Schema.Struct<{
58
- version: Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>;
59
- }>;
60
- auth: Schema.Struct<{
61
- state: Schema.Literal<["absent", "unusable", "refresh_required", "healthy"]>;
62
- healthy: typeof Schema.Boolean;
63
- }>;
64
- pendingAuthorization: Schema.Union<[Schema.Struct<{
65
- state: Schema.Literal<["none"]>;
66
- count: Schema.Literal<[0]>;
67
- }>, Schema.Struct<{
68
- state: Schema.Literal<["approval_pending"]>;
69
- count: Schema.Literal<[1]>;
70
- approvalExpiresAt: typeof Schema.DateTimeUtc;
71
- }>]>;
72
- installation: Schema.Struct<{
73
- configured: typeof Schema.Boolean;
74
- integrationVersion: Schema.optional<Schema.filter<Schema.filter<Schema.filter<typeof Schema.String>>>>;
75
- components: Schema.Struct<{
76
- webfetchHook: typeof Schema.Boolean;
77
- runtimeSkill: typeof Schema.Boolean;
78
- mcp: typeof Schema.Boolean;
79
- }>;
80
- runtimeState: Schema.Literal<["unverified", "reload_required", "blocked"]>;
81
- reloadState: Schema.Literal<["not_required", "required"]>;
82
- consentState: Schema.Literal<["not_required", "may_be_required"]>;
83
- policyState: Schema.Literal<["unverified", "blocked"]>;
84
- policyCodes: Schema.filter<Schema.Array$<Schema.Literal<["managed_policy_blocked", "target_read_only"]>>>;
85
- }>;
86
- }>, never, {
87
- readonly auth: {
88
- readonly state: "absent" | "healthy" | "refresh_required" | "unusable";
89
- readonly healthy: boolean;
90
- };
91
- } & {
92
- readonly cli: {
93
- readonly version: string;
94
- };
95
- } & {
96
- readonly harness: "claude-code" | "codex" | "cursor" | "opencode";
97
- } & {
98
- readonly installation: {
99
- readonly configured: boolean;
100
- readonly integrationVersion?: string | undefined;
101
- readonly components: {
102
- readonly webfetchHook: boolean;
103
- readonly runtimeSkill: boolean;
104
- readonly mcp: boolean;
105
- };
106
- readonly runtimeState: "blocked" | "reload_required" | "unverified";
107
- readonly reloadState: "not_required" | "required";
108
- readonly consentState: "may_be_required" | "not_required";
109
- readonly policyState: "blocked" | "unverified";
110
- readonly policyCodes: readonly ("managed_policy_blocked" | "target_read_only")[];
111
- };
112
- } & {
113
- readonly pendingAuthorization: {
114
- readonly state: "none";
115
- readonly count: 0;
116
- } | {
117
- readonly state: "approval_pending";
118
- readonly count: 1;
119
- readonly approvalExpiresAt: DateTime.Utc;
120
- };
121
- } & {
122
- readonly schemaVersion: 1;
123
- } & {
124
- readonly scope: "global" | "project";
125
- } & {
126
- readonly status: "ok";
127
- }, {}, {}>;
128
- export declare class StatusResult extends StatusResult_base {
129
- }
130
- export declare const StatusServiceErrorCode: Schema.Literal<["credential_config_malformed", "credential_storage_insecure", "credential_health_failed", "pending_state_malformed", "pending_state_unavailable", "harness_inspection_failed", "invalid_status_result"]>;
131
- declare const StatusServiceError_base: Schema.TaggedErrorClass<StatusServiceError, "StatusServiceError", {
132
- readonly _tag: Schema.tag<"StatusServiceError">;
133
- } & {
134
- code: Schema.Literal<["credential_config_malformed", "credential_storage_insecure", "credential_health_failed", "pending_state_malformed", "pending_state_unavailable", "harness_inspection_failed", "invalid_status_result"]>;
135
- recoverable: typeof Schema.Boolean;
136
- }>;
137
- export declare class StatusServiceError extends StatusServiceError_base {
138
- get message(): "Credential storage is not secure enough to inspect." | "Local diagnostics returned an invalid result." | "Pending authorization state could not be inspected safely." | "Pending authorization state is malformed." | "Stored credential configuration is malformed." | "Stored credentials could not be inspected safely." | "The harness configuration could not be inspected safely.";
139
- }
140
- declare const StatusService_base: Effect.Service.Class<StatusService, "@expandai/cli/Init/StatusService", {
141
- readonly dependencies: readonly [import("effect/Layer").Layer<ConfigManager, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<PendingInitStore, import("effect/ConfigError").ConfigError, never>, import("effect/Layer").Layer<HarnessRegistry, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, import("@effect/platform/FileSystem").FileSystem>];
142
- readonly effect: Effect.Effect<{
143
- readonly run: (request: StatusRequest) => Effect.Effect<StatusResult, StatusServiceError, never>;
144
- }, never, ConfigManager | HarnessRegistry | PendingInitStore>;
145
- }>;
146
- export declare class StatusService extends StatusService_base {
147
- }
148
- export {};
149
- //# sourceMappingURL=Status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../../../src/Init/Status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAOzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEzD,OAAO,EAAE,aAAa,EAA+D,MAAM,cAAc,CAAA;AAKzG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;;;;;;;;;;;;AAKtD,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCL,qBAAa,YAAa,SAAQ,iBAShC;CAAG;AAEL,eAAO,MAAM,sBAAsB,0NAQlC,CAAA;;;;;;;AAED,qBAAa,kBAAmB,SAAQ,uBAGtC;IACD,IAAI,OAAO,8XAiBV;CACD;;;;;;;AAoGD,qBAAa,aAAc,SAAQ,kBAqDjC;CAAG"}
@@ -1,120 +0,0 @@
1
- import { Effect, Schema } from 'effect';
2
- import { type CliCommand, ConfigIo } from '../Domain.js';
3
- /** Claude Code WebFetch hook invocation persisted in harness settings. */
4
- export declare const HOOK_INVOCATION = "expandai hook claude-code";
5
- export declare const HOOK_COMMAND = "expandai hook claude-code";
6
- /**
7
- * The hook line for a resolved CLI. Defaults to the bare `expandai` command;
8
- * when the CLI is not on PATH — an `npx expandai init` with no global install —
9
- * `CliInvocation` resolves to the npx form and the written hook stays runnable.
10
- */
11
- export declare function hookCommandFor(cli?: CliCommand): string;
12
- export declare const WEBFETCH_MATCHER = "WebFetch";
13
- export declare const HookCommandEntry: Schema.TypeLiteral<{
14
- type: Schema.Literal<["command"]>;
15
- command: typeof Schema.String;
16
- expandaiProfileVersion: Schema.optional<typeof Schema.String>;
17
- /** Whether this install added the `WebFetch` deny rule — see `makeExpandaiMatcher`. */
18
- expandaiManagedDeny: Schema.optional<typeof Schema.Boolean>;
19
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
20
- export declare const HookMatcher: Schema.TypeLiteral<{
21
- matcher: Schema.optional<typeof Schema.String>;
22
- hooks: Schema.Array$<Schema.TypeLiteral<{
23
- type: Schema.Literal<["command"]>;
24
- command: typeof Schema.String;
25
- expandaiProfileVersion: Schema.optional<typeof Schema.String>;
26
- /** Whether this install added the `WebFetch` deny rule — see `makeExpandaiMatcher`. */
27
- expandaiManagedDeny: Schema.optional<typeof Schema.Boolean>;
28
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
29
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
30
- declare const HooksSection: Schema.TypeLiteral<{
31
- PreToolUse: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
32
- matcher: Schema.optional<typeof Schema.String>;
33
- hooks: Schema.Array$<Schema.TypeLiteral<{
34
- type: Schema.Literal<["command"]>;
35
- command: typeof Schema.String;
36
- expandaiProfileVersion: Schema.optional<typeof Schema.String>;
37
- /** Whether this install added the `WebFetch` deny rule — see `makeExpandaiMatcher`. */
38
- expandaiManagedDeny: Schema.optional<typeof Schema.Boolean>;
39
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
40
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>>;
41
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>;
42
- export declare const SettingsSchema: Schema.transform<Schema.SchemaClass<unknown, string, never>, Schema.TypeLiteral<{
43
- hooks: Schema.optionalWith<Schema.TypeLiteral<{
44
- PreToolUse: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
45
- matcher: Schema.optional<typeof Schema.String>;
46
- hooks: Schema.Array$<Schema.TypeLiteral<{
47
- type: Schema.Literal<["command"]>;
48
- command: typeof Schema.String;
49
- expandaiProfileVersion: Schema.optional<typeof Schema.String>;
50
- /** Whether this install added the `WebFetch` deny rule — see `makeExpandaiMatcher`. */
51
- expandaiManagedDeny: Schema.optional<typeof Schema.Boolean>;
52
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
53
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>>;
54
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>, {
55
- default: () => typeof HooksSection.Type;
56
- }>;
57
- permissions: Schema.optional<Schema.TypeLiteral<{
58
- deny: Schema.optional<Schema.Array$<typeof Schema.String>>;
59
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
60
- }, readonly [Schema.Record$<typeof Schema.String, typeof Schema.Unknown>]>>;
61
- export interface ClaudeHookPlan {
62
- readonly changed: boolean;
63
- readonly settings: typeof SettingsSchema.Type;
64
- }
65
- export declare function isExpandaiHookCommand(command: string): boolean;
66
- /**
67
- * `expandaiManagedDeny` records whether *we* added `WebFetch` to
68
- * `permissions.deny`, so uninstall can tell our entry from an identical one the
69
- * user set first. A deny entry is a bare string with nowhere to carry that, and
70
- * "our hook is present" is not the same claim: installing over a settings file
71
- * that already denied `WebFetch` leaves the hook without us having written the
72
- * rule, and removing it then revokes a control its owner chose.
73
- */
74
- export declare function makeExpandaiMatcher(profileVersion: string, cli?: CliCommand, managedDeny?: boolean): typeof HookMatcher.Type;
75
- /** True only when our own hook entry says we wrote the deny rule. */
76
- export declare function expandaiOwnsWebFetchDeny(settings: typeof SettingsSchema.Type): boolean;
77
- export declare const expandaiMatcher: {
78
- readonly [x: string]: unknown;
79
- readonly matcher?: string | undefined;
80
- readonly hooks: readonly {
81
- readonly [x: string]: unknown;
82
- readonly type: "command";
83
- readonly command: string;
84
- readonly expandaiProfileVersion?: string | undefined;
85
- readonly expandaiManagedDeny?: boolean | undefined;
86
- }[];
87
- };
88
- /**
89
- * Denying `WebFetch` removes it from the toolset rather than blocking it per call,
90
- * so the agent reaches for Expand's tool instead of being refused. That difference
91
- * is the whole point: a hook can only answer a WebFetch call with `deny`, which
92
- * Claude Code renders to the user as `Error:` on every single fetch.
93
- *
94
- * The hook stays installed as the fallback. With the deny rule in force WebFetch is
95
- * never called, so the hook never fires; if the rule is ever absent or overridden,
96
- * the hook still intercepts — with the red line, but correctly.
97
- */
98
- export declare function planClaudeWebFetchDeny(settings: typeof SettingsSchema.Type): ClaudeHookPlan;
99
- /**
100
- * Drops the `WebFetch` entry; anything else the user denied is left alone.
101
- *
102
- * A deny entry is a bare string with nowhere to record who wrote it, so this
103
- * cannot tell our rule from an identical one the user added themselves. The
104
- * caller supplies that evidence — see `uninstall`.
105
- */
106
- export declare function planClaudeWebFetchDenyRemoval(settings: typeof SettingsSchema.Type): ClaudeHookPlan;
107
- export declare function planClaudeHook(settings: typeof SettingsSchema.Type, profileVersion?: string, cli?: CliCommand): ClaudeHookPlan;
108
- export declare function planClaudeHookRemoval(settings: typeof SettingsSchema.Type): ClaudeHookPlan;
109
- declare const ClaudeHook_base: Effect.Service.Class<ClaudeHook, "@expandai/cli/Install/Claude/Hook", {
110
- readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>];
111
- readonly effect: Effect.Effect<{
112
- readonly install: (scope: "global" | "project") => Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
113
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
114
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
115
- }, import("effect/ConfigError").ConfigError, ConfigIo>;
116
- }>;
117
- export declare class ClaudeHook extends ClaudeHook_base {
118
- }
119
- export {};
120
- //# sourceMappingURL=Hook.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Hook.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Hook.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,MAAM,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEtE,OAAO,EAAE,KAAK,UAAU,EAAE,QAAQ,EAA+B,MAAM,cAAc,CAAA;AAGrF,0EAA0E;AAC1E,eAAO,MAAM,eAAe,8BAA8B,CAAA;AAC1D,eAAO,MAAM,YAAY,8BAAkB,CAAA;AAG3C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,UAAuB,GAAG,MAAM,CAEnE;AACD,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C,eAAO,MAAM,gBAAgB;;;;IAK3B,uFAAuF;;0EAIxF,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;QANtB,uFAAuF;;;0EAYxF,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;YAdhB,uFAAuF;;;;0EAiBxF,CAAA;AAOD,eAAO,MAAM,cAAc;;;;;;;;gBAxBzB,uFAAuF;;;;;uBA2BpB,OAAO,YAAY,CAAC,IAAI;;;;;2EAM5F,CAAA;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,CAAA;CAC7C;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAW9D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAClC,cAAc,EAAE,MAAM,EACtB,GAAG,GAAE,UAAuB,EAC5B,WAAW,UAAO,GAChB,OAAO,WAAW,CAAC,IAAI,CAYzB;AAED,qEAAqE;AACrE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,GAAG,OAAO,CAItF;AAMD,eAAO,MAAM,eAAe;;;;;;;;;;CAAmC,CAAA;AAS/D;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,GAAG,cAAc,CAU3F;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,GAAG,cAAc,CAMlG;AAED,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,EACpC,cAAc,GAAE,MAAoB,EACpC,GAAG,GAAE,UAAuB,GAC1B,cAAc,CA8BhB;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,cAAc,CAAC,IAAI,GAAG,cAAc,CAY1F;;;;;;;;;AAED,qBAAa,UAAW,SAAQ,eAyE9B;CAAG"}
@@ -1,48 +0,0 @@
1
- import { Effect, Schema } from 'effect';
2
- import { type CliCommand, ConfigIo, McpParseError, McpServersConfigSchema, McpWriteError } from '../Domain.js';
3
- declare const Entry_base: Schema.Class<Entry, {
4
- type: Schema.Literal<["stdio"]>;
5
- command: typeof Schema.NonEmptyTrimmedString;
6
- args: Schema.Array$<typeof Schema.String>;
7
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
8
- }, Schema.Struct.Encoded<{
9
- type: Schema.Literal<["stdio"]>;
10
- command: typeof Schema.NonEmptyTrimmedString;
11
- args: Schema.Array$<typeof Schema.String>;
12
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
13
- }>, never, {
14
- readonly env?: {
15
- readonly [x: string]: string;
16
- } | undefined;
17
- } & {
18
- readonly args: readonly string[];
19
- } & {
20
- readonly command: string;
21
- } & {
22
- readonly type: "stdio";
23
- }, {}, {}>;
24
- /** Claude Code MCP descriptor stored under the Expand-owned server key. */
25
- export declare class Entry extends Entry_base {
26
- }
27
- export interface ClaudeMcpPlan {
28
- readonly changed: boolean;
29
- readonly config: typeof McpServersConfigSchema.Type;
30
- }
31
- /** Claude execs the descriptor directly, so `command`/`args` stay separate. */
32
- export declare function claudeMcpEntry(cli?: CliCommand): Entry;
33
- export declare const CLAUDE_MCP_ENTRY: Entry;
34
- export declare function planClaudeMcp(config: typeof McpServersConfigSchema.Type, cli?: CliCommand): ClaudeMcpPlan;
35
- export declare function planClaudeMcpRemoval(config: typeof McpServersConfigSchema.Type): ClaudeMcpPlan;
36
- declare const ClaudeMcp_base: Effect.Service.Class<ClaudeMcp, "@expandai/cli/Install/Claude/Mcp", {
37
- readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>];
38
- readonly effect: Effect.Effect<{
39
- readonly install: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError, never>;
40
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError, never>;
41
- readonly isInstalled: (scope: "global" | "project") => Effect.Effect<boolean, McpParseError, never>;
42
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
43
- }, import("effect/ConfigError").ConfigError, ConfigIo>;
44
- }>;
45
- export declare class ClaudeMcp extends ClaudeMcp_base {
46
- }
47
- export {};
48
- //# sourceMappingURL=Mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EACN,KAAK,UAAU,EACf,QAAQ,EAER,aAAa,EACb,sBAAsB,EACtB,aAAa,EAEb,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;AAGrB,2EAA2E;AAC3E,qBAAa,KAAM,SAAQ,UAKzB;CAAG;AAEL,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,sBAAsB,CAAC,IAAI,CAAA;CACnD;AAID,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,GAAG,GAAE,UAAuB,GAAG,KAAK,CAOlE;AAED,eAAO,MAAM,gBAAgB,OAAmB,CAAA;AAqBhD,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,sBAAsB,CAAC,IAAI,EAAE,GAAG,GAAE,UAAuB,GAAG,aAAa,CAUrH;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,sBAAsB,CAAC,IAAI,GAAG,aAAa,CAM9F;;;;;;;;;;AAED,qBAAa,SAAU,SAAQ,cAiD7B;CAAG"}
@@ -1,23 +0,0 @@
1
- import { FileSystem, Path } from '@effect/platform';
2
- import { Effect } from 'effect';
3
- export declare const SKILL_NAME = "expandai";
4
- export declare const SKILL_FILE_NAME = "SKILL.md";
5
- export interface ClaudeSkillPlan {
6
- readonly changed: boolean;
7
- readonly text: string;
8
- }
9
- export declare function renderClaudeSkill(source: string, profileVersion?: string): string;
10
- export declare function planClaudeSkill(current: string | undefined, source: string, profileVersion?: string): ClaudeSkillPlan;
11
- declare const ClaudeSkill_base: Effect.Service.Class<ClaudeSkill, "@expandai/cli/Install/Claude/Skill", {
12
- readonly dependencies: readonly [import("effect/Layer").Layer<FileSystem.FileSystem, never, never>, import("effect/Layer").Layer<Path.Path, never, never>];
13
- readonly effect: Effect.Effect<{
14
- readonly install: (scope: "global" | "project") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
15
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
16
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
17
- readonly source: () => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
18
- }, import("@effect/platform/Error").BadArgument | import("effect/ConfigError").ConfigError, FileSystem.FileSystem | Path.Path>;
19
- }>;
20
- export declare class ClaudeSkill extends ClaudeSkill_base {
21
- }
22
- export {};
23
- //# sourceMappingURL=Skill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Skill.d.ts","sourceRoot":"","sources":["../../../../src/Install/Claude/Skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAU,MAAM,EAAS,MAAM,QAAQ,CAAA;AAI9C,eAAO,MAAM,UAAU,aAAa,CAAA;AACpC,eAAO,MAAM,eAAe,aAAa,CAAA;AAGzC,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,GAAE,MAAoB,GAAG,MAAM,CAK9F;AAED,wBAAgB,eAAe,CAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,MAAoB,GAClC,eAAe,CAGjB;;;;;;;;;;AA2CD,qBAAa,WAAY,SAAQ,gBAG/B;CAAG"}
@@ -1,45 +0,0 @@
1
- import { Effect, Schema } from 'effect';
2
- import { CliInvocation, ConfigIo, McpParseError, McpWriteError } from '../Domain.js';
3
- declare const Entry_base: Schema.Class<Entry, {
4
- command: typeof Schema.NonEmptyTrimmedString;
5
- args: Schema.Array$<typeof Schema.String>;
6
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
7
- enabled: typeof Schema.Boolean;
8
- }, Schema.Struct.Encoded<{
9
- command: typeof Schema.NonEmptyTrimmedString;
10
- args: Schema.Array$<typeof Schema.String>;
11
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
12
- enabled: typeof Schema.Boolean;
13
- }>, never, {
14
- readonly env?: {
15
- readonly [x: string]: string;
16
- } | undefined;
17
- } & {
18
- readonly args: readonly string[];
19
- } & {
20
- readonly command: string;
21
- } & {
22
- readonly enabled: boolean;
23
- }, {}, {}>;
24
- export declare class Entry extends Entry_base {
25
- }
26
- declare const CodexMcp_base: Effect.Service.Class<CodexMcp, "@expandai/cli/Install/Codex/Mcp", {
27
- readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>, import("effect/Layer").Layer<CliInvocation, import("effect/ConfigError").ConfigError, never>];
28
- readonly effect: Effect.Effect<{
29
- readonly install: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError | import("@effect/platform/Error").PlatformError, never>;
30
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError | import("@effect/platform/Error").PlatformError, never>;
31
- readonly isInstalled: (scope: "global" | "project") => Effect.Effect<boolean, McpParseError | import("@effect/platform/Error").PlatformError, never>;
32
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
33
- }, import("effect/ConfigError").ConfigError, CliInvocation | ConfigIo>;
34
- }>;
35
- /**
36
- * Codex MCP descriptor — Codex stores MCP servers in TOML config under
37
- * `[mcp_servers.<name>]`.
38
- *
39
- * - global → `~/.codex/config.toml`
40
- * - project → `<cwd>/.codex/config.toml`
41
- */
42
- export declare class CodexMcp extends CodexMcp_base {
43
- }
44
- export {};
45
- //# sourceMappingURL=Mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../../src/Install/Codex/Mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAc,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;AAGhG,qBAAa,KAAM,SAAQ,UAKzB;CAAG;;;;;;;;;;AAgBL;;;;;;GAMG;AACH,qBAAa,QAAS,SAAQ,aA+E5B;CAAG"}
@@ -1,22 +0,0 @@
1
- import { Effect } from 'effect';
2
- import { SkillIo } from '../Domain.js';
3
- /**
4
- * Codex skills use the open agent skills locations:
5
- *
6
- * - global → `~/.agents/skills/<name>/`
7
- * - project → `<cwd>/.agents/skills/<name>/`
8
- */
9
- export declare const SKILL_NAME = "expandai";
10
- declare const CodexSkill_base: Effect.Service.Class<CodexSkill, "@expandai/cli/Install/Codex/Skill", {
11
- readonly dependencies: readonly [import("effect/Layer").Layer<SkillIo, import("@effect/platform/Error").BadArgument, never>];
12
- readonly effect: Effect.Effect<{
13
- readonly install: (scope: "global" | "project") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
14
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<string, import("@effect/platform/Error").PlatformError, never>;
15
- readonly isCurrent: (scope: "global" | "project") => Effect.Effect<boolean, import("@effect/platform/Error").PlatformError, never>;
16
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
17
- }, import("effect/ConfigError").ConfigError, SkillIo>;
18
- }>;
19
- export declare class CodexSkill extends CodexSkill_base {
20
- }
21
- export {};
22
- //# sourceMappingURL=Skill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Skill.d.ts","sourceRoot":"","sources":["../../../../src/Install/Codex/Skill.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,MAAM,EAAS,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,aAAa,CAAA;;;;;;;;;;AAEpC,qBAAa,UAAW,SAAQ,eA6B9B;CAAG"}
@@ -1,45 +0,0 @@
1
- import { Effect, Schema } from 'effect';
2
- import { CliInvocation, ConfigIo, McpParseError, McpWriteError } from '../Domain.js';
3
- declare const Entry_base: Schema.Class<Entry, {
4
- type: Schema.Literal<["stdio"]>;
5
- command: typeof Schema.NonEmptyTrimmedString;
6
- args: Schema.Array$<typeof Schema.String>;
7
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
8
- }, Schema.Struct.Encoded<{
9
- type: Schema.Literal<["stdio"]>;
10
- command: typeof Schema.NonEmptyTrimmedString;
11
- args: Schema.Array$<typeof Schema.String>;
12
- env: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
13
- }>, never, {
14
- readonly env?: {
15
- readonly [x: string]: string;
16
- } | undefined;
17
- } & {
18
- readonly args: readonly string[];
19
- } & {
20
- readonly command: string;
21
- } & {
22
- readonly type: "stdio";
23
- }, {}, {}>;
24
- /**
25
- * Cursor MCP descriptor — same `mcpServers` shape as Claude Code, different
26
- * paths.
27
- *
28
- * - global → `~/.cursor/mcp.json`
29
- * - project → `<cwd>/.cursor/mcp.json`
30
- */
31
- export declare class Entry extends Entry_base {
32
- }
33
- declare const CursorMcp_base: Effect.Service.Class<CursorMcp, "@expandai/cli/Install/Cursor/Mcp", {
34
- readonly dependencies: readonly [import("effect/Layer").Layer<ConfigIo, never, never>, import("effect/Layer").Layer<CliInvocation, import("effect/ConfigError").ConfigError, never>];
35
- readonly effect: Effect.Effect<{
36
- readonly install: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError, never>;
37
- readonly uninstall: (scope: "global" | "project") => Effect.Effect<void, McpParseError | McpWriteError, never>;
38
- readonly isInstalled: (scope: "global" | "project") => Effect.Effect<boolean, McpParseError, never>;
39
- readonly pathFor: (scope: "global" | "project") => Effect.Effect<string, never, never>;
40
- }, import("effect/ConfigError").ConfigError, CliInvocation | ConfigIo>;
41
- }>;
42
- export declare class CursorMcp extends CursorMcp_base {
43
- }
44
- export {};
45
- //# sourceMappingURL=Mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Mcp.d.ts","sourceRoot":"","sources":["../../../../src/Install/Cursor/Mcp.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,MAAM,EAAiB,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAA0B,aAAa,EAAc,MAAM,cAAc,CAAA;;;;;;;;;;;;;;;;;;;;;;AAGxH;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,UAKzB;CAAG;;;;;;;;;;AAEL,qBAAa,SAAU,SAAQ,cAiE7B;CAAG"}