apex-code 0.0.1-alpha.1 → 0.0.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +66 -681
  3. package/dist/cli/args.d.ts +5 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +45 -6
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/cli/auth-command.d.ts.map +1 -1
  8. package/dist/cli/auth-command.js +3 -3
  9. package/dist/cli/auth-command.js.map +1 -1
  10. package/dist/cli/cost-command.d.ts +19 -0
  11. package/dist/cli/cost-command.d.ts.map +1 -0
  12. package/dist/cli/cost-command.js +107 -0
  13. package/dist/cli/cost-command.js.map +1 -0
  14. package/dist/cli/startup-ui.d.ts +1 -1
  15. package/dist/cli/startup-ui.d.ts.map +1 -1
  16. package/dist/cli/startup-ui.js +1 -2
  17. package/dist/cli/startup-ui.js.map +1 -1
  18. package/dist/cli.d.ts.map +1 -1
  19. package/dist/cli.js +45 -16
  20. package/dist/cli.js.map +1 -1
  21. package/dist/config.d.ts +2 -2
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +14 -7
  24. package/dist/config.js.map +1 -1
  25. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  26. package/dist/core/agent-session-runtime.js +2 -0
  27. package/dist/core/agent-session-runtime.js.map +1 -1
  28. package/dist/core/agent-session-services.d.ts +9 -0
  29. package/dist/core/agent-session-services.d.ts.map +1 -1
  30. package/dist/core/agent-session-services.js +30 -4
  31. package/dist/core/agent-session-services.js.map +1 -1
  32. package/dist/core/agent-session.d.ts +46 -0
  33. package/dist/core/agent-session.d.ts.map +1 -1
  34. package/dist/core/agent-session.js +137 -19
  35. package/dist/core/agent-session.js.map +1 -1
  36. package/dist/core/auth-storage.d.ts.map +1 -1
  37. package/dist/core/auth-storage.js +6 -6
  38. package/dist/core/auth-storage.js.map +1 -1
  39. package/dist/core/bash-executor.d.ts.map +1 -1
  40. package/dist/core/bash-executor.js +1 -1
  41. package/dist/core/bash-executor.js.map +1 -1
  42. package/dist/core/context/deferred-schemas.d.ts +92 -0
  43. package/dist/core/context/deferred-schemas.d.ts.map +1 -0
  44. package/dist/core/context/deferred-schemas.js +74 -0
  45. package/dist/core/context/deferred-schemas.js.map +1 -0
  46. package/dist/core/context/eviction.d.ts +47 -0
  47. package/dist/core/context/eviction.d.ts.map +1 -0
  48. package/dist/core/context/eviction.js +83 -0
  49. package/dist/core/context/eviction.js.map +1 -0
  50. package/dist/core/context/pipeline.d.ts +90 -0
  51. package/dist/core/context/pipeline.d.ts.map +1 -0
  52. package/dist/core/context/pipeline.js +109 -0
  53. package/dist/core/context/pipeline.js.map +1 -0
  54. package/dist/core/credential-failover.d.ts +30 -0
  55. package/dist/core/credential-failover.d.ts.map +1 -0
  56. package/dist/core/credential-failover.js +46 -0
  57. package/dist/core/credential-failover.js.map +1 -0
  58. package/dist/core/credential-pool.d.ts +60 -0
  59. package/dist/core/credential-pool.d.ts.map +1 -0
  60. package/dist/core/credential-pool.js +84 -0
  61. package/dist/core/credential-pool.js.map +1 -0
  62. package/dist/core/delegation/agents.d.ts +15 -0
  63. package/dist/core/delegation/agents.d.ts.map +1 -0
  64. package/dist/core/delegation/agents.js +55 -0
  65. package/dist/core/delegation/agents.js.map +1 -0
  66. package/dist/core/delegation/ceiling.d.ts +29 -0
  67. package/dist/core/delegation/ceiling.d.ts.map +1 -0
  68. package/dist/core/delegation/ceiling.js +34 -0
  69. package/dist/core/delegation/ceiling.js.map +1 -0
  70. package/dist/core/delegation/runtime.d.ts +94 -0
  71. package/dist/core/delegation/runtime.d.ts.map +1 -0
  72. package/dist/core/delegation/runtime.js +117 -0
  73. package/dist/core/delegation/runtime.js.map +1 -0
  74. package/dist/core/durable-state/daemon.d.ts +37 -0
  75. package/dist/core/durable-state/daemon.d.ts.map +1 -0
  76. package/dist/core/durable-state/daemon.js +62 -0
  77. package/dist/core/durable-state/daemon.js.map +1 -0
  78. package/dist/core/durable-state/provenance.d.ts +7 -0
  79. package/dist/core/durable-state/provenance.d.ts.map +1 -0
  80. package/dist/core/durable-state/provenance.js +24 -0
  81. package/dist/core/durable-state/provenance.js.map +1 -0
  82. package/dist/core/durable-state/sqlite.d.ts +84 -0
  83. package/dist/core/durable-state/sqlite.d.ts.map +1 -0
  84. package/dist/core/durable-state/sqlite.js +331 -0
  85. package/dist/core/durable-state/sqlite.js.map +1 -0
  86. package/dist/core/environment.d.ts +12 -0
  87. package/dist/core/environment.d.ts.map +1 -0
  88. package/dist/core/environment.js +69 -0
  89. package/dist/core/environment.js.map +1 -0
  90. package/dist/core/evidence-policy.d.ts +17 -0
  91. package/dist/core/evidence-policy.d.ts.map +1 -0
  92. package/dist/core/evidence-policy.js +25 -0
  93. package/dist/core/evidence-policy.js.map +1 -0
  94. package/dist/core/evidence.d.ts +16 -0
  95. package/dist/core/evidence.d.ts.map +1 -0
  96. package/dist/core/evidence.js +51 -0
  97. package/dist/core/evidence.js.map +1 -0
  98. package/dist/core/experimental.d.ts.map +1 -1
  99. package/dist/core/experimental.js +2 -1
  100. package/dist/core/experimental.js.map +1 -1
  101. package/dist/core/extensions/types.d.ts +2 -0
  102. package/dist/core/extensions/types.d.ts.map +1 -1
  103. package/dist/core/extensions/types.js.map +1 -1
  104. package/dist/core/index.d.ts +1 -0
  105. package/dist/core/index.d.ts.map +1 -1
  106. package/dist/core/index.js +1 -0
  107. package/dist/core/index.js.map +1 -1
  108. package/dist/core/model-config.d.ts +8 -0
  109. package/dist/core/model-config.d.ts.map +1 -1
  110. package/dist/core/model-config.js +21 -5
  111. package/dist/core/model-config.js.map +1 -1
  112. package/dist/core/model-resolver.d.ts +20 -0
  113. package/dist/core/model-resolver.d.ts.map +1 -1
  114. package/dist/core/model-resolver.js +59 -0
  115. package/dist/core/model-resolver.js.map +1 -1
  116. package/dist/core/model-runtime.d.ts +73 -0
  117. package/dist/core/model-runtime.d.ts.map +1 -1
  118. package/dist/core/model-runtime.js +225 -8
  119. package/dist/core/model-runtime.js.map +1 -1
  120. package/dist/core/observability/aggregate.d.ts +21 -0
  121. package/dist/core/observability/aggregate.d.ts.map +1 -0
  122. package/dist/core/observability/aggregate.js +36 -0
  123. package/dist/core/observability/aggregate.js.map +1 -0
  124. package/dist/core/observability/otlp.d.ts +66 -0
  125. package/dist/core/observability/otlp.d.ts.map +1 -0
  126. package/dist/core/observability/otlp.js +95 -0
  127. package/dist/core/observability/otlp.js.map +1 -0
  128. package/dist/core/package-manager.d.ts.map +1 -1
  129. package/dist/core/package-manager.js +3 -2
  130. package/dist/core/package-manager.js.map +1 -1
  131. package/dist/core/permissions/gate.d.ts +35 -0
  132. package/dist/core/permissions/gate.d.ts.map +1 -0
  133. package/dist/core/permissions/gate.js +72 -0
  134. package/dist/core/permissions/gate.js.map +1 -0
  135. package/dist/core/permissions/modes.d.ts +18 -0
  136. package/dist/core/permissions/modes.d.ts.map +1 -0
  137. package/dist/core/permissions/modes.js +57 -0
  138. package/dist/core/permissions/modes.js.map +1 -0
  139. package/dist/core/permissions/responder.d.ts +30 -0
  140. package/dist/core/permissions/responder.d.ts.map +1 -0
  141. package/dist/core/permissions/responder.js +32 -0
  142. package/dist/core/permissions/responder.js.map +1 -0
  143. package/dist/core/permissions/rules.d.ts +34 -0
  144. package/dist/core/permissions/rules.d.ts.map +1 -0
  145. package/dist/core/permissions/rules.js +74 -0
  146. package/dist/core/permissions/rules.js.map +1 -0
  147. package/dist/core/permissions/startup.d.ts +33 -0
  148. package/dist/core/permissions/startup.d.ts.map +1 -0
  149. package/dist/core/permissions/startup.js +55 -0
  150. package/dist/core/permissions/startup.js.map +1 -0
  151. package/dist/core/permissions/store.d.ts +114 -0
  152. package/dist/core/permissions/store.d.ts.map +1 -0
  153. package/dist/core/permissions/store.js +229 -0
  154. package/dist/core/permissions/store.js.map +1 -0
  155. package/dist/core/project-trust.d.ts.map +1 -1
  156. package/dist/core/project-trust.js +1 -1
  157. package/dist/core/project-trust.js.map +1 -1
  158. package/dist/core/provider-attribution.d.ts.map +1 -1
  159. package/dist/core/provider-attribution.js +6 -7
  160. package/dist/core/provider-attribution.js.map +1 -1
  161. package/dist/core/remote-catalog-provider.d.ts +2 -2
  162. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  163. package/dist/core/remote-catalog-provider.js +20 -16
  164. package/dist/core/remote-catalog-provider.js.map +1 -1
  165. package/dist/core/sandbox/child-entry.d.ts +2 -0
  166. package/dist/core/sandbox/child-entry.d.ts.map +1 -0
  167. package/dist/core/sandbox/child-entry.js +11 -0
  168. package/dist/core/sandbox/child-entry.js.map +1 -0
  169. package/dist/core/sandbox/cli-launch.d.ts +27 -0
  170. package/dist/core/sandbox/cli-launch.d.ts.map +1 -0
  171. package/dist/core/sandbox/cli-launch.js +133 -0
  172. package/dist/core/sandbox/cli-launch.js.map +1 -0
  173. package/dist/core/sandbox/cli-supervisor.d.ts +25 -0
  174. package/dist/core/sandbox/cli-supervisor.d.ts.map +1 -0
  175. package/dist/core/sandbox/cli-supervisor.js +57 -0
  176. package/dist/core/sandbox/cli-supervisor.js.map +1 -0
  177. package/dist/core/sandbox/linux-backend.d.ts +18 -0
  178. package/dist/core/sandbox/linux-backend.d.ts.map +1 -0
  179. package/dist/core/sandbox/linux-backend.js +186 -0
  180. package/dist/core/sandbox/linux-backend.js.map +1 -0
  181. package/dist/core/sandbox/macos-backend.d.ts +18 -0
  182. package/dist/core/sandbox/macos-backend.d.ts.map +1 -0
  183. package/dist/core/sandbox/macos-backend.js +195 -0
  184. package/dist/core/sandbox/macos-backend.js.map +1 -0
  185. package/dist/core/sandbox/network-proxy.d.ts +19 -0
  186. package/dist/core/sandbox/network-proxy.d.ts.map +1 -0
  187. package/dist/core/sandbox/network-proxy.js +79 -0
  188. package/dist/core/sandbox/network-proxy.js.map +1 -0
  189. package/dist/core/sandbox/policy.d.ts +32 -0
  190. package/dist/core/sandbox/policy.d.ts.map +1 -0
  191. package/dist/core/sandbox/policy.js +38 -0
  192. package/dist/core/sandbox/policy.js.map +1 -0
  193. package/dist/core/sandbox/supervisor.d.ts +31 -0
  194. package/dist/core/sandbox/supervisor.d.ts.map +1 -0
  195. package/dist/core/sandbox/supervisor.js +18 -0
  196. package/dist/core/sandbox/supervisor.js.map +1 -0
  197. package/dist/core/sandbox/violations.d.ts +23 -0
  198. package/dist/core/sandbox/violations.d.ts.map +1 -0
  199. package/dist/core/sandbox/violations.js +30 -0
  200. package/dist/core/sandbox/violations.js.map +1 -0
  201. package/dist/core/sdk.d.ts +20 -36
  202. package/dist/core/sdk.d.ts.map +1 -1
  203. package/dist/core/sdk.js +129 -2
  204. package/dist/core/sdk.js.map +1 -1
  205. package/dist/core/session-manager.d.ts +41 -2
  206. package/dist/core/session-manager.d.ts.map +1 -1
  207. package/dist/core/session-manager.js +57 -0
  208. package/dist/core/session-manager.js.map +1 -1
  209. package/dist/core/session-share.d.ts +16 -0
  210. package/dist/core/session-share.d.ts.map +1 -0
  211. package/dist/core/session-share.js +22 -0
  212. package/dist/core/session-share.js.map +1 -0
  213. package/dist/core/settings-manager.d.ts +38 -9
  214. package/dist/core/settings-manager.d.ts.map +1 -1
  215. package/dist/core/settings-manager.js +39 -24
  216. package/dist/core/settings-manager.js.map +1 -1
  217. package/dist/core/system-prompt.d.ts.map +1 -1
  218. package/dist/core/system-prompt.js +5 -5
  219. package/dist/core/system-prompt.js.map +1 -1
  220. package/dist/core/timings.d.ts +1 -1
  221. package/dist/core/timings.d.ts.map +1 -1
  222. package/dist/core/timings.js +3 -2
  223. package/dist/core/timings.js.map +1 -1
  224. package/dist/core/tools/ask-user.d.ts +25 -0
  225. package/dist/core/tools/ask-user.d.ts.map +1 -0
  226. package/dist/core/tools/ask-user.js +49 -0
  227. package/dist/core/tools/ask-user.js.map +1 -0
  228. package/dist/core/tools/bash-command-segments.d.ts +22 -0
  229. package/dist/core/tools/bash-command-segments.d.ts.map +1 -0
  230. package/dist/core/tools/bash-command-segments.js +128 -0
  231. package/dist/core/tools/bash-command-segments.js.map +1 -0
  232. package/dist/core/tools/bash.d.ts +26 -3
  233. package/dist/core/tools/bash.d.ts.map +1 -1
  234. package/dist/core/tools/bash.js +105 -16
  235. package/dist/core/tools/bash.js.map +1 -1
  236. package/dist/core/tools/contract.d.ts +156 -0
  237. package/dist/core/tools/contract.d.ts.map +1 -0
  238. package/dist/core/tools/contract.js +48 -0
  239. package/dist/core/tools/contract.js.map +1 -0
  240. package/dist/core/tools/delegate.d.ts +38 -0
  241. package/dist/core/tools/delegate.d.ts.map +1 -0
  242. package/dist/core/tools/delegate.js +66 -0
  243. package/dist/core/tools/delegate.js.map +1 -0
  244. package/dist/core/tools/edit.d.ts +2 -2
  245. package/dist/core/tools/edit.d.ts.map +1 -1
  246. package/dist/core/tools/edit.js +24 -0
  247. package/dist/core/tools/edit.js.map +1 -1
  248. package/dist/core/tools/find.d.ts +2 -2
  249. package/dist/core/tools/find.d.ts.map +1 -1
  250. package/dist/core/tools/find.js +12 -0
  251. package/dist/core/tools/find.js.map +1 -1
  252. package/dist/core/tools/grep.d.ts +2 -2
  253. package/dist/core/tools/grep.d.ts.map +1 -1
  254. package/dist/core/tools/grep.js +12 -0
  255. package/dist/core/tools/grep.js.map +1 -1
  256. package/dist/core/tools/index.d.ts +29 -4
  257. package/dist/core/tools/index.d.ts.map +1 -1
  258. package/dist/core/tools/index.js +118 -2
  259. package/dist/core/tools/index.js.map +1 -1
  260. package/dist/core/tools/ls.d.ts +2 -2
  261. package/dist/core/tools/ls.d.ts.map +1 -1
  262. package/dist/core/tools/ls.js +12 -0
  263. package/dist/core/tools/ls.js.map +1 -1
  264. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  265. package/dist/core/tools/output-accumulator.js +1 -1
  266. package/dist/core/tools/output-accumulator.js.map +1 -1
  267. package/dist/core/tools/path-permission.d.ts +18 -0
  268. package/dist/core/tools/path-permission.d.ts.map +1 -0
  269. package/dist/core/tools/path-permission.js +28 -0
  270. package/dist/core/tools/path-permission.js.map +1 -0
  271. package/dist/core/tools/plan-present.d.ts +27 -0
  272. package/dist/core/tools/plan-present.d.ts.map +1 -0
  273. package/dist/core/tools/plan-present.js +55 -0
  274. package/dist/core/tools/plan-present.js.map +1 -0
  275. package/dist/core/tools/read.d.ts +2 -2
  276. package/dist/core/tools/read.d.ts.map +1 -1
  277. package/dist/core/tools/read.js +12 -0
  278. package/dist/core/tools/read.js.map +1 -1
  279. package/dist/core/tools/test.d.ts +34 -0
  280. package/dist/core/tools/test.d.ts.map +1 -0
  281. package/dist/core/tools/test.js +75 -0
  282. package/dist/core/tools/test.js.map +1 -0
  283. package/dist/core/tools/todo-write.d.ts +31 -0
  284. package/dist/core/tools/todo-write.d.ts.map +1 -0
  285. package/dist/core/tools/todo-write.js +51 -0
  286. package/dist/core/tools/todo-write.js.map +1 -0
  287. package/dist/core/tools/tool-definition-wrapper.d.ts +13 -2
  288. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  289. package/dist/core/tools/tool-definition-wrapper.js +11 -1
  290. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  291. package/dist/core/tools/tool-schema.d.ts +22 -0
  292. package/dist/core/tools/tool-schema.d.ts.map +1 -0
  293. package/dist/core/tools/tool-schema.js +45 -0
  294. package/dist/core/tools/tool-schema.js.map +1 -0
  295. package/dist/core/tools/web-fetch.d.ts +26 -0
  296. package/dist/core/tools/web-fetch.d.ts.map +1 -0
  297. package/dist/core/tools/web-fetch.js +62 -0
  298. package/dist/core/tools/web-fetch.js.map +1 -0
  299. package/dist/core/tools/web-search.d.ts +26 -0
  300. package/dist/core/tools/web-search.d.ts.map +1 -0
  301. package/dist/core/tools/web-search.js +53 -0
  302. package/dist/core/tools/web-search.js.map +1 -0
  303. package/dist/core/tools/write.d.ts +6 -2
  304. package/dist/core/tools/write.d.ts.map +1 -1
  305. package/dist/core/tools/write.js +32 -1
  306. package/dist/core/tools/write.js.map +1 -1
  307. package/dist/core/usage-performance-store.d.ts +56 -0
  308. package/dist/core/usage-performance-store.d.ts.map +1 -0
  309. package/dist/core/usage-performance-store.js +85 -0
  310. package/dist/core/usage-performance-store.js.map +1 -0
  311. package/dist/index.d.ts +1 -0
  312. package/dist/index.d.ts.map +1 -1
  313. package/dist/index.js +1 -0
  314. package/dist/index.js.map +1 -1
  315. package/dist/main.d.ts.map +1 -1
  316. package/dist/main.js +48 -6
  317. package/dist/main.js.map +1 -1
  318. package/dist/migrations.d.ts.map +1 -1
  319. package/dist/migrations.js +2 -2
  320. package/dist/migrations.js.map +1 -1
  321. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  322. package/dist/modes/interactive/components/config-selector.js +9 -6
  323. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  324. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -4
  325. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  326. package/dist/modes/interactive/components/first-time-setup.js +11 -39
  327. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  328. package/dist/modes/interactive/components/footer.d.ts +8 -1
  329. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  330. package/dist/modes/interactive/components/footer.js +49 -20
  331. package/dist/modes/interactive/components/footer.js.map +1 -1
  332. package/dist/modes/interactive/components/settings-selector.d.ts +2 -2
  333. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  334. package/dist/modes/interactive/components/settings-selector.js +6 -6
  335. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  336. package/dist/modes/interactive/components/tool-execution.d.ts +2 -1
  337. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  338. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  339. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  340. package/dist/modes/interactive/external-editor.js +58 -9
  341. package/dist/modes/interactive/external-editor.js.map +1 -1
  342. package/dist/modes/interactive/interactive-mode.d.ts +2 -3
  343. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  344. package/dist/modes/interactive/interactive-mode.js +92 -104
  345. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  346. package/dist/modes/interactive/theme/theme-schema.json +2 -2
  347. package/dist/package-manager-cli.d.ts.map +1 -1
  348. package/dist/package-manager-cli.js +15 -10
  349. package/dist/package-manager-cli.js.map +1 -1
  350. package/dist/rpc-entry.d.ts.map +1 -1
  351. package/dist/rpc-entry.js +2 -1
  352. package/dist/rpc-entry.js.map +1 -1
  353. package/dist/server/create-harness.d.ts +1 -1
  354. package/dist/server/create-harness.d.ts.map +1 -1
  355. package/dist/server/create-harness.js +6 -5
  356. package/dist/server/create-harness.js.map +1 -1
  357. package/dist/testing/replay/metrics.d.ts +24 -0
  358. package/dist/testing/replay/metrics.d.ts.map +1 -0
  359. package/dist/testing/replay/metrics.js +35 -0
  360. package/dist/testing/replay/metrics.js.map +1 -0
  361. package/dist/testing/replay/recorded-provider.d.ts +10 -0
  362. package/dist/testing/replay/recorded-provider.d.ts.map +1 -0
  363. package/dist/testing/replay/recorded-provider.js +108 -0
  364. package/dist/testing/replay/recorded-provider.js.map +1 -0
  365. package/dist/testing/replay/runner.d.ts +56 -0
  366. package/dist/testing/replay/runner.d.ts.map +1 -0
  367. package/dist/testing/replay/runner.js +406 -0
  368. package/dist/testing/replay/runner.js.map +1 -0
  369. package/dist/utils/apex-code-user-agent.d.ts +2 -0
  370. package/dist/utils/apex-code-user-agent.d.ts.map +1 -0
  371. package/dist/utils/apex-code-user-agent.js +5 -0
  372. package/dist/utils/apex-code-user-agent.js.map +1 -0
  373. package/dist/utils/clipboard-image.d.ts.map +1 -1
  374. package/dist/utils/clipboard-image.js +1 -1
  375. package/dist/utils/clipboard-image.js.map +1 -1
  376. package/dist/utils/tools-manager.d.ts +32 -0
  377. package/dist/utils/tools-manager.d.ts.map +1 -1
  378. package/dist/utils/tools-manager.js +198 -100
  379. package/dist/utils/tools-manager.js.map +1 -1
  380. package/dist/utils/version-check.d.ts +5 -5
  381. package/dist/utils/version-check.d.ts.map +1 -1
  382. package/dist/utils/version-check.js +23 -14
  383. package/dist/utils/version-check.js.map +1 -1
  384. package/dist/utils/windows-self-update.d.ts.map +1 -1
  385. package/dist/utils/windows-self-update.js +1 -1
  386. package/dist/utils/windows-self-update.js.map +1 -1
  387. package/docs/compaction.md +21 -21
  388. package/docs/containerization.md +24 -21
  389. package/docs/custom-provider.md +9 -9
  390. package/docs/development.md +11 -11
  391. package/docs/environment-variables.md +36 -77
  392. package/docs/extensions.md +47 -47
  393. package/docs/index.md +12 -24
  394. package/docs/json.md +6 -6
  395. package/docs/keybindings.md +3 -3
  396. package/docs/llama-cpp.md +7 -7
  397. package/docs/models.md +11 -11
  398. package/docs/packages.md +46 -42
  399. package/docs/prompt-templates.md +3 -3
  400. package/docs/providers.md +10 -10
  401. package/docs/quickstart.md +49 -32
  402. package/docs/rpc.md +11 -11
  403. package/docs/sdk.md +4 -4
  404. package/docs/security.md +18 -18
  405. package/docs/session-format.md +9 -9
  406. package/docs/sessions.md +13 -13
  407. package/docs/settings.md +10 -14
  408. package/docs/shell-aliases.md +1 -1
  409. package/docs/skills.md +8 -8
  410. package/docs/terminal-setup.md +12 -12
  411. package/docs/termux.md +4 -4
  412. package/docs/themes.md +8 -8
  413. package/docs/tmux.md +4 -4
  414. package/docs/tui.md +3 -3
  415. package/docs/usage.md +54 -51
  416. package/docs/windows.md +1 -1
  417. package/npm-shrinkwrap.json +5 -5
  418. package/package.json +2 -3
  419. package/dist/core/telemetry.d.ts +0 -3
  420. package/dist/core/telemetry.d.ts.map +0 -1
  421. package/dist/core/telemetry.js +0 -9
  422. package/dist/core/telemetry.js.map +0 -1
  423. package/dist/utils/pi-user-agent.d.ts +0 -2
  424. package/dist/utils/pi-user-agent.d.ts.map +0 -1
  425. package/dist/utils/pi-user-agent.js +0 -5
  426. package/dist/utils/pi-user-agent.js.map +0 -1
package/docs/models.md CHANGED
@@ -34,9 +34,9 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
34
34
  }
35
35
  ```
36
36
 
37
- The `apiKey` value is a placeholder because Ollama ignores it. pi still treats models as requiring auth before they appear in `/model`, so keyless local servers should keep a dummy value, save a key for that provider with `/login`, or pass `--api-key` when selecting the model.
37
+ The `apiKey` value is a placeholder because Ollama ignores it. Apex Code still treats models as requiring auth before they appear in `/model`, so keyless local servers should keep a dummy value, save a key for that provider with `/login`, or pass `--api-key` when selecting the model.
38
38
 
39
- Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so pi sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
39
+ Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so Apex Code sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
40
40
 
41
41
  You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
42
42
 
@@ -169,7 +169,7 @@ The `apiKey` and `headers` fields support command execution, environment interpo
169
169
  "apiKey": "sk-..."
170
170
  ```
171
171
 
172
- For `models.json`, shell commands are resolved at request time. pi intentionally does not apply built-in TTL, stale reuse, or recovery logic for arbitrary commands. Different commands need different caching and failure strategies, and pi cannot infer the right one.
172
+ For `models.json`, shell commands are resolved at request time. Apex Code intentionally does not apply built-in TTL, stale reuse, or recovery logic for arbitrary commands. Different commands need different caching and failure strategies, and Apex Code cannot infer the right one.
173
173
 
174
174
  If your command is slow, expensive, rate-limited, or should keep using a previous value on transient failures, wrap it in your own script or command that implements the caching or TTL behavior you want.
175
175
 
@@ -202,7 +202,7 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
202
202
  | `name` | No | `id` | Human-readable model label. Used for matching (`--model` patterns) and shown as secondary model detail text. |
203
203
  | `api` | No | provider's `api` | Override provider's API for this model |
204
204
  | `reasoning` | No | `false` | Supports extended thinking |
205
- | `thinkingLevelMap` | No | omitted | Maps pi thinking levels to provider values and marks unsupported levels (see below) |
205
+ | `thinkingLevelMap` | No | omitted | Maps Apex Code thinking levels to provider values and marks unsupported levels (see below) |
206
206
  | `input` | No | `["text"]` | Input types: `["text"]` or `["text", "image"]` |
207
207
  | `contextWindow` | No | `128000` | Context window size in tokens |
208
208
  | `maxTokens` | No | `16384` | Maximum output tokens |
@@ -238,7 +238,7 @@ Current behavior:
238
238
 
239
239
  ### Sampling Parameters
240
240
 
241
- `samplingParams` is a free-form object merged verbatim into every request body for the model, after the fields pi sets itself, so its keys win. Use it to send sampling parameters pi does not model — including server-specific ones like llama.cpp's `min_p` or vLLM's `top_k`:
241
+ `samplingParams` is a free-form object merged verbatim into every request body for the model, after the fields Apex Code sets itself, so its keys win. Use it to send sampling parameters Apex Code does not model — including server-specific ones like llama.cpp's `min_p` or vLLM's `top_k`:
242
242
 
243
243
  ```json
244
244
  {
@@ -252,11 +252,11 @@ Current behavior:
252
252
  }
253
253
  ```
254
254
 
255
- Only OpenAI-compatible APIs apply it (`openai-completions`, `openai-responses`, `azure-openai-responses`); other APIs ignore it. Keys override pi's named request fields (for example a `temperature` key here beats the request-level temperature), so prefer it as the single source of sampling truth for a model. In `modelOverrides`, `samplingParams` merges per key with the base model's value.
255
+ Only OpenAI-compatible APIs apply it (`openai-completions`, `openai-responses`, `azure-openai-responses`); other APIs ignore it. Keys override Apex Code's named request fields (for example a `temperature` key here beats the request-level temperature), so prefer it as the single source of sampling truth for a model. In `modelOverrides`, `samplingParams` merges per key with the base model's value.
256
256
 
257
257
  ### Thinking Level Map
258
258
 
259
- Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are pi thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Maps may contain holes; for example, a model can expose `high` and `max` without exposing `xhigh`.
259
+ Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are Apex Code thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. Maps may contain holes; for example, a model can expose `high` and `max` without exposing `xhigh`.
260
260
 
261
261
  Values are tristate:
262
262
 
@@ -388,7 +388,7 @@ Behavior notes:
388
388
 
389
389
  For providers or proxies using `api: "anthropic-messages"`, use `compat` to control Anthropic-specific request compatibility.
390
390
 
391
- By default pi sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Pi will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
391
+ By default Apex Code sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Apex Code will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
392
392
 
393
393
  Some Anthropic models require adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) instead of the legacy budget-based thinking payload. Built-in models set this automatically. For custom providers or aliases that route to those models, set `forceAdaptiveThinking` to `true`.
394
394
 
@@ -460,15 +460,15 @@ For providers with partial OpenAI compatibility, use the `compat` field.
460
460
  | `supportsDeveloperRole` | Use `developer` vs `system` role |
461
461
  | `supportsReasoningEffort` | Support for `reasoning_effort` parameter |
462
462
  | `supportsUsageInStreaming` | Supports `stream_options: { include_usage: true }` (default: `true`) |
463
- | `supportsFinishReason` | Whether streamed responses include `finish_reason`. When `false`, pi infers `stop` or `toolUse` when the stream ends. Default: `true`. |
463
+ | `supportsFinishReason` | Whether streamed responses include `finish_reason`. When `false`, Apex Code infers `stop` or `toolUse` when the stream ends. Default: `true`. |
464
464
  | `maxTokensField` | Use `max_completion_tokens` or `max_tokens` |
465
465
  | `requiresToolResultName` | Include `name` on tool result messages |
466
466
  | `requiresAssistantAfterToolResult` | Insert an assistant message before a user message after tool results |
467
467
  | `requiresThinkingAsText` | Convert thinking blocks to plain text |
468
468
  | `requiresReasoningContentOnAssistantMessages` | Include empty `reasoning_content` on all replayed assistant messages when reasoning is enabled |
469
469
  | `thinkingFormat` | Use `reasoning_effort`, `openrouter`, `deepseek`, `together`, `baseten`, `zai`, `qwen`, `chat-template`, or `qwen-chat-template` thinking parameters |
470
- | `chatTemplateKwargs` | `chat_template_kwargs` values for `thinkingFormat: "chat-template"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for pi-controlled thinking values |
471
- | `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for pi-controlled thinking values |
470
+ | `chatTemplateKwargs` | `chat_template_kwargs` values for `thinkingFormat: "chat-template"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for Apex Code-controlled thinking values |
471
+ | `chatTemplateArgs` | `chat_template_args` values for `thinkingFormat: "baseten"`; use `{ "$var": "thinking.enabled" }` or `{ "$var": "thinking.effort" }` for Apex Code-controlled thinking values |
472
472
  | `cacheControlFormat` | Use Anthropic-style `cache_control` markers on the system prompt, last tool definition, and last user, assistant, or tool-result text content. Currently only `anthropic` is supported. |
473
473
  | `sendSessionAffinityHeaders` | For `openai-completions`, send session-affinity headers from the session id when caching is enabled. Default: `false`. |
474
474
  | `sessionAffinityFormat` | For `openai-completions` and `openai-responses`, the session-affinity header format: `openai` sends `session_id`/`x-client-request-id` (completions also `x-session-affinity`), `openai-nosession` omits the underscore-containing `session_id` header, `openrouter` sends `x-session-id`. Does not affect the `prompt_cache_key` body param. Default: auto-detected. |
package/docs/packages.md CHANGED
@@ -1,14 +1,14 @@
1
- > pi can help you create pi packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
1
+ > Apex Code can help you create Apex Code packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
2
2
 
3
- # Pi Packages
3
+ # Apex Code Packages
4
4
 
5
- Pi packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `pi` key, or use conventional directories.
5
+ Apex Code packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `pi` key (Apex Code's retained package-manifest key), or use conventional directories.
6
6
 
7
7
  ## Table of Contents
8
8
 
9
9
  - [Install and Manage](#install-and-manage)
10
10
  - [Package Sources](#package-sources)
11
- - [Creating a Pi Package](#creating-a-pi-package)
11
+ - [Creating an Apex Code Package](#creating-an-apex-code-package)
12
12
  - [Package Structure](#package-structure)
13
13
  - [Dependencies](#dependencies)
14
14
  - [Package Filtering](#package-filtering)
@@ -17,41 +17,41 @@ Pi packages bundle extensions, skills, prompt templates, and themes so you can s
17
17
 
18
18
  ## Install and Manage
19
19
 
20
- > **Security:** Pi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
20
+ > **Security:** Apex Code packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
21
21
 
22
22
  ```bash
23
- pi install npm:@foo/bar@1.0.0
24
- pi install git:github.com/user/repo@v1
25
- pi install https://github.com/user/repo # raw URLs work too
26
- pi install /absolute/path/to/package
27
- pi install ./relative/path/to/package
28
-
29
- pi remove npm:@foo/bar
30
- pi list # show installed packages from settings
31
- pi update # update pi only
32
- pi update --all # update pi, update packages, and reconcile pinned git refs
33
- pi update --extensions # update packages and reconcile pinned git refs only
34
- pi update --models # refresh model catalogs only
35
- pi update --self # update pi only
36
- pi update --self --force # reinstall pi even if current
37
- pi update npm:@foo/bar # update one package
38
- pi update --extension npm:@foo/bar
23
+ apex-code install npm:@foo/bar@1.0.0
24
+ apex-code install git:github.com/user/repo@v1
25
+ apex-code install https://github.com/user/repo # raw URLs work too
26
+ apex-code install /absolute/path/to/package
27
+ apex-code install ./relative/path/to/package
28
+
29
+ apex-code remove npm:@foo/bar
30
+ apex-code list # show installed packages from settings
31
+ apex-code update # update Apex Code only
32
+ apex-code update --all # update Apex Code, update packages, and reconcile pinned git refs
33
+ apex-code update --extensions # update packages and reconcile pinned git refs only
34
+ apex-code update --models # refresh model catalogs only
35
+ apex-code update --self # update Apex Code only
36
+ apex-code update --self --force # reinstall Apex Code even if current
37
+ apex-code update npm:@foo/bar # update one package
38
+ apex-code update --extension npm:@foo/bar
39
39
  ```
40
40
 
41
- These commands manage pi packages and `pi update` can update the pi CLI installation. To uninstall pi itself, see [Quickstart](quickstart.md#uninstall).
41
+ These commands manage Apex Code packages and `apex-code update` can update the Apex Code CLI installation. To uninstall Apex Code itself, see [Quickstart](quickstart.md#uninstall).
42
42
 
43
- By default, `install` and `remove` write to user settings (`~/.apex-code/agent/settings.json`). Use `-l` to write to project settings (`.apex-code/settings.json`) instead. Project settings can be shared with your team, and pi installs any missing packages automatically on startup after the project is trusted.
43
+ By default, `install` and `remove` write to user settings (`~/.apex-code/agent/settings.json`). Use `-l` to write to project settings (`.apex-code/settings.json`) instead. Project settings can be shared with your team, and apex-code installs any missing packages automatically on startup after the project is trusted.
44
44
 
45
45
  To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
46
46
 
47
47
  ```bash
48
- pi -e npm:@foo/bar
49
- pi -e git:github.com/user/repo
48
+ apex-code -e npm:@foo/bar
49
+ apex-code -e git:github.com/user/repo
50
50
  ```
51
51
 
52
52
  ## Package Sources
53
53
 
54
- Pi accepts three source types in settings and `pi install`.
54
+ Apex Code accepts three source types in settings and `apex-code install`.
55
55
 
56
56
  ### npm
57
57
 
@@ -60,7 +60,7 @@ npm:@scope/pkg@1.2.3
60
60
  npm:pkg
61
61
  ```
62
62
 
63
- - Versioned specs are pinned and skipped by package updates (`pi update --extensions`, `pi update --all`).
63
+ - Versioned specs are pinned and skipped by package updates (`apex-code update --extensions`, `apex-code update --all`).
64
64
  - User installs go under `~/.apex-code/agent/npm/`.
65
65
  - Project installs go under `.apex-code/npm/`.
66
66
  - Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
@@ -87,21 +87,21 @@ ssh://git@github.com/user/repo@v1
87
87
  - HTTPS and SSH URLs are both supported.
88
88
  - SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).
89
89
  - For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.
90
- - Refs are pinned tags or commits. `pi update --extensions` and `pi update --all` do not move them to newer refs, but they do reconcile an existing clone to the configured ref.
91
- - Use `pi install git:host/user/repo@new-ref` to update settings and move an existing package to a new pinned ref.
90
+ - Refs are pinned tags or commits. `apex-code update --extensions` and `apex-code update --all` do not move them to newer refs, but they do reconcile an existing clone to the configured ref.
91
+ - Use `apex-code install git:host/user/repo@new-ref` to update settings and move an existing package to a new pinned ref.
92
92
  - Cloned to `~/.apex-code/agent/git/<host>/<path>` (global) or `.apex-code/git/<host>/<path>` (project).
93
- - When reconciliation changes the checkout, pi resets and cleans the clone, then runs `npm install` if `package.json` exists.
93
+ - When reconciliation changes the checkout, Apex Code resets and cleans the clone, then runs `npm install` if `package.json` exists.
94
94
 
95
95
  **SSH examples:**
96
96
  ```bash
97
97
  # git@host:path shorthand (requires git: prefix)
98
- pi install git:git@github.com:user/repo
98
+ apex-code install git:git@github.com:user/repo
99
99
 
100
100
  # ssh:// protocol format
101
- pi install ssh://git@github.com/user/repo
101
+ apex-code install ssh://git@github.com/user/repo
102
102
 
103
103
  # With version ref
104
- pi install git:git@github.com:user/repo@v1.0.0
104
+ apex-code install git:git@github.com:user/repo@v1.0.0
105
105
  ```
106
106
 
107
107
  ### Local Paths
@@ -111,11 +111,11 @@ pi install git:git@github.com:user/repo@v1.0.0
111
111
  ./relative/path/to/package
112
112
  ```
113
113
 
114
- Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, pi loads resources using package rules.
114
+ Local paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, Apex Code loads resources using package rules.
115
115
 
116
- ## Creating a Pi Package
116
+ ## Creating an Apex Code Package
117
117
 
118
- Add a `pi` manifest to `package.json` or use conventional directories. Include the `pi-package` keyword for discoverability.
118
+ Add a `pi` manifest to `package.json` or use conventional directories. `pi` is Apex Code's retained package-manifest key (see [Environment compatibility](../README.md#environment-compatibility)). Include the `pi-package` keyword for discoverability.
119
119
 
120
120
  ```json
121
121
  {
@@ -134,7 +134,11 @@ Paths are relative to the package root. Arrays support glob patterns and `!exclu
134
134
 
135
135
  ### Gallery Metadata
136
136
 
137
- The [package gallery](https://pi.dev/packages) displays packages tagged with `pi-package`. Add `video` or `image` fields to show a preview:
137
+ Apex Code does not operate or depend on a hosted package gallery (see ADR 0013). The
138
+ `video`/`image` fields below are retained upstream vocabulary from Pi's own package
139
+ gallery, kept for cross-compatibility if you publish the same package to both
140
+ ecosystems — they have no effect within Apex Code itself. Add them to show a preview
141
+ there:
138
142
 
139
143
  ```json
140
144
  {
@@ -157,7 +161,7 @@ If both are set, video takes precedence.
157
161
 
158
162
  ### Convention Directories
159
163
 
160
- If no `pi` manifest is present, pi auto-discovers resources from these directories:
164
+ If no `pi` manifest is present, Apex Code auto-discovers resources from these directories:
161
165
 
162
166
  - `extensions/` loads `.ts` and `.js` files
163
167
  - `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
@@ -166,11 +170,11 @@ If no `pi` manifest is present, pi auto-discovers resources from these directori
166
170
 
167
171
  ## Dependencies
168
172
 
169
- Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When pi installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
173
+ Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When apex-code installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
170
174
 
171
- Pi bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@earendil-works/pi-ai`, `apex-code-agent-core`, `apex-code`, `@earendil-works/pi-tui`, `typebox`.
175
+ Apex Code bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@earendil-works/pi-ai`, `apex-code-agent-core`, `apex-code`, `@earendil-works/pi-tui`, `typebox`.
172
176
 
173
- Other pi packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Pi loads packages with separate module roots, so separate installs do not collide or share modules.
177
+ Other Apex Code packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Apex Code loads packages with separate module roots, so separate installs do not collide or share modules.
174
178
 
175
179
  Example:
176
180
 
@@ -217,7 +221,7 @@ Filter what a package loads using the object form in settings:
217
221
 
218
222
  ## Enable and Disable Resources
219
223
 
220
- Use `pi config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. `pi config` starts in global settings (`~/.apex-code/agent/settings.json`); press Tab to switch between global and project-local modes. Use `pi config -l` to start in project overrides (`.apex-code/settings.json`) with inherited global resources dimmed.
224
+ Use `apex-code config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. `apex-code config` starts in global settings (`~/.apex-code/agent/settings.json`); press Tab to switch between global and project-local modes. Use `apex-code config -l` to start in project overrides (`.apex-code/settings.json`) with inherited global resources dimmed.
221
225
 
222
226
  ## Scope and Deduplication
223
227
 
@@ -1,4 +1,4 @@
1
- > pi can create prompt templates. Ask it to build one for your workflow.
1
+ > Apex Code can create prompt templates. Ask it to build one for your workflow.
2
2
 
3
3
  # Prompt Templates
4
4
 
@@ -6,11 +6,11 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam
6
6
 
7
7
  ## Locations
8
8
 
9
- Pi loads prompt templates from:
9
+ Apex Code loads prompt templates from:
10
10
 
11
11
  - Global: `~/.apex-code/agent/prompts/*.md`
12
12
  - Project: `.apex-code/prompts/*.md` (only after the project is trusted)
13
- - Packages: `prompts/` directories or `pi.prompts` entries in `package.json`
13
+ - Packages: `prompts/` directories or `pi.prompts` entries in `package.json` (`pi` is Apex Code's retained package-manifest key)
14
14
  - Settings: `prompts` array with files or directories
15
15
  - CLI: `--prompt-template <path>` (repeatable)
16
16
 
package/docs/providers.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Providers
2
2
 
3
- Pi supports subscription-based providers via OAuth and API key providers via environment variables or auth file. Built-in catalogs ship with pi; configured providers may refresh newer catalogs and cache them in `~/.apex-code/agent/models-store.json` for offline use.
3
+ Apex Code supports subscription-based providers via OAuth and API key providers via environment variables or auth file. Built-in catalogs ship with Apex Code; configured providers may refresh newer catalogs and cache them in `~/.apex-code/agent/models-store.json` for offline use.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -63,7 +63,7 @@ Use `/login` in interactive mode and select a provider to store an API key in `a
63
63
 
64
64
  ```bash
65
65
  export ANTHROPIC_API_KEY=sk-ant-...
66
- pi
66
+ apex-code
67
67
  ```
68
68
 
69
69
  | Provider | Environment Variable | `auth.json` key |
@@ -154,7 +154,7 @@ API key credentials can also include provider-scoped environment values. These v
154
154
  }
155
155
  ```
156
156
 
157
- Use this when pi should use different provider settings than the project shell environment.
157
+ Use this when Apex Code should use different provider settings than the project shell environment.
158
158
 
159
159
  ### Key Resolution
160
160
 
@@ -224,14 +224,14 @@ export AWS_REGION=us-west-2
224
224
  Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`).
225
225
 
226
226
  ```bash
227
- pi --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
227
+ apex-code --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
228
228
  ```
229
229
 
230
230
  Prompt caching is enabled automatically for Claude models whose ID contains a recognizable model name (base models and system-defined inference profiles). For application inference profiles (whose ARNs don't contain the model name), set `AWS_BEDROCK_FORCE_CACHE=1` to enable cache points:
231
231
 
232
232
  ```bash
233
233
  export AWS_BEDROCK_FORCE_CACHE=1
234
- pi --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
234
+ apex-code --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
235
235
  ```
236
236
 
237
237
  If you are connecting to a Bedrock API proxy, the following environment variables can be used:
@@ -255,7 +255,7 @@ export AWS_BEDROCK_FORCE_HTTP1=1
255
255
  export CLOUDFLARE_API_KEY=... # or use /login
256
256
  export CLOUDFLARE_ACCOUNT_ID=...
257
257
  export CLOUDFLARE_GATEWAY_ID=... # create at dash.cloudflare.com → AI → AI Gateway
258
- pi --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
258
+ apex-code --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
259
259
  ```
260
260
 
261
261
  Routes to OpenAI, Anthropic, and Workers AI through Cloudflare AI Gateway. Workers AI uses the Unified API (`/compat`) and prefixed model IDs (`workers-ai/@cf/...`). OpenAI uses the OpenAI passthrough route (`/openai`) with native OpenAI model IDs such as `gpt-5.1`. Anthropic uses the Anthropic passthrough route (`/anthropic`) with native Anthropic model IDs such as `claude-sonnet-4-5`.
@@ -269,7 +269,7 @@ AI Gateway authentication uses `CLOUDFLARE_API_KEY` as `cf-aig-authorization`. U
269
269
  | Stored BYOK | Cloudflare token only | Cloudflare injects provider keys stored in the AI Gateway dashboard |
270
270
  | Inline BYOK | Cloudflare token plus upstream `Authorization` header | The request supplies the upstream provider key |
271
271
 
272
- For normal pi usage, prefer unified billing or stored BYOK. Inline BYOK requires configuring an additional upstream `Authorization` header for the Cloudflare AI Gateway provider, for example via a `models.json` provider/model override.
272
+ For normal Apex Code usage, prefer unified billing or stored BYOK. Inline BYOK requires configuring an additional upstream `Authorization` header for the Cloudflare AI Gateway provider, for example via a `models.json` provider/model override.
273
273
 
274
274
  ### Cloudflare Workers AI
275
275
 
@@ -278,10 +278,10 @@ For normal pi usage, prefer unified billing or stored BYOK. Inline BYOK requires
278
278
  ```bash
279
279
  export CLOUDFLARE_API_KEY=... # or use /login
280
280
  export CLOUDFLARE_ACCOUNT_ID=...
281
- pi --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
281
+ apex-code --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
282
282
  ```
283
283
 
284
- Pi automatically sets `x-session-affinity` for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/) discounts.
284
+ Apex Code automatically sets `x-session-affinity` for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/) discounts.
285
285
 
286
286
  ### Google Vertex AI
287
287
 
@@ -297,7 +297,7 @@ Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
297
297
 
298
298
  ## llama.cpp
299
299
 
300
- Pi supports the llama.cpp router server. Configure it with `/login llama.cpp`, manage loaded models with `/llama`, and select a loaded model with `/model`.
300
+ Apex Code supports the llama.cpp router server. Configure it with `/login llama.cpp`, manage loaded models with `/llama`, and select a loaded model with `/model`.
301
301
 
302
302
  See [llama.cpp](llama-cpp.md) for server setup, model directory layout, environment variables, and command usage.
303
303
 
@@ -1,23 +1,39 @@
1
1
  # Quickstart
2
2
 
3
- This page gets you from install to a useful first pi session.
3
+ This page gets you from install to a useful first Apex Code session.
4
4
 
5
5
  ## Install
6
6
 
7
- Pi is distributed as an npm package:
7
+ Apex Code is distributed as an npm package and installs the same way with npm, pnpm,
8
+ Yarn, or Bun — all four resolve it from the same npm registry:
8
9
 
9
10
  ```bash
11
+ # npm
10
12
  npm install -g --ignore-scripts apex-code
13
+
14
+ # pnpm
15
+ pnpm add -g apex-code
16
+
17
+ # Yarn
18
+ yarn global add apex-code
19
+
20
+ # Bun
21
+ bun add -g apex-code
11
22
  ```
12
23
 
13
- `--ignore-scripts` disables dependency lifecycle scripts during install. Pi does not require install scripts for normal npm installs.
24
+ `--ignore-scripts` disables dependency lifecycle scripts during install. Apex Code does
25
+ not require install scripts for normal npm installs; pnpm, Yarn, and Bun installs do not
26
+ run them by default.
27
+
28
+ Apex Code does not operate a separate shell/curl installer or a standalone binary release
29
+ channel — the package manager install above is the only distribution channel.
14
30
 
15
31
  ### Uninstall
16
32
 
17
- Use the package manager that installed pi. The curl installer uses npm globally, so curl and npm installs are removed with npm:
33
+ Use the package manager that installed Apex Code:
18
34
 
19
35
  ```bash
20
- # curl installer or npm install -g
36
+ # npm
21
37
  npm uninstall -g apex-code
22
38
 
23
39
  # pnpm
@@ -30,22 +46,23 @@ yarn global remove apex-code
30
46
  bun uninstall -g apex-code
31
47
  ```
32
48
 
33
- Uninstalling pi leaves settings, credentials, sessions, and installed pi packages in `~/.apex-code/agent/`.
49
+ Uninstalling Apex Code leaves settings, credentials, sessions, and installed Apex Code
50
+ packages in `~/.apex-code/agent/`.
34
51
 
35
- Then start pi in the project directory you want it to work on:
52
+ Then start Apex Code in the project directory you want it to work on:
36
53
 
37
54
  ```bash
38
55
  cd /path/to/project
39
- pi
56
+ apex-code
40
57
  ```
41
58
 
42
59
  ## Authenticate
43
60
 
44
- Pi can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
61
+ Apex Code can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
45
62
 
46
63
  ### Option 1: subscription login
47
64
 
48
- Start pi and run:
65
+ Start Apex Code and run:
49
66
 
50
67
  ```text
51
68
  /login
@@ -55,11 +72,11 @@ Then select a provider. Built-in subscription logins include Claude Pro/Max, Cha
55
72
 
56
73
  ### Option 2: API key
57
74
 
58
- Set an API key before launching pi:
75
+ Set an API key before launching Apex Code:
59
76
 
60
77
  ```bash
61
78
  export ANTHROPIC_API_KEY=sk-ant-...
62
- pi
79
+ apex-code
63
80
  ```
64
81
 
65
82
  You can also run `/login` and select an API-key provider to store the key in `~/.apex-code/agent/auth.json`.
@@ -68,24 +85,24 @@ See [Providers](providers.md) for all supported providers, environment variables
68
85
 
69
86
  ## First session
70
87
 
71
- Once pi starts, type a request and press Enter:
88
+ Once Apex Code starts, type a request and press Enter:
72
89
 
73
90
  ```text
74
91
  Summarize this repository and tell me how to run its checks.
75
92
  ```
76
93
 
77
- By default, pi gives the model four tools:
94
+ By default, Apex Code gives the model four tools:
78
95
 
79
96
  - `read` - read files
80
97
  - `write` - create or overwrite files
81
98
  - `edit` - patch files
82
99
  - `bash` - run shell commands
83
100
 
84
- Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options. Pi runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
101
+ Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options. Apex Code runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
85
102
 
86
- ## Give pi project instructions
103
+ ## Give Apex Code project instructions
87
104
 
88
- Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
105
+ Apex Code loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
89
106
 
90
107
  ```markdown
91
108
  # Project Instructions
@@ -95,14 +112,14 @@ Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to wor
95
112
  - Keep responses concise.
96
113
  ```
97
114
 
98
- Pi loads:
115
+ Apex Code loads:
99
116
 
100
117
  - `~/.apex-code/agent/AGENTS.md` for global instructions
101
118
  - `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
102
119
 
103
- If a directory contains `AGENTS.override.md`, Pi loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory.
120
+ If a directory contains `AGENTS.override.md`, Apex Code loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory.
104
121
 
105
- Restart pi, or run `/reload`, after changing context files.
122
+ Restart Apex Code, or run `/reload`, after changing context files.
106
123
 
107
124
  ## Common things to try
108
125
 
@@ -111,8 +128,8 @@ Restart pi, or run `/reload`, after changing context files.
111
128
  Type `@` in the editor to fuzzy-search files, or pass files on the command line:
112
129
 
113
130
  ```bash
114
- pi @README.md "Summarize this"
115
- pi @src/app.ts @src/app.test.ts "Review these together"
131
+ apex-code @README.md "Summarize this"
132
+ apex-code @src/app.ts @src/app.test.ts "Review these together"
116
133
  ```
117
134
 
118
135
  Images or text can be pasted with Ctrl+V (Alt+V on Windows); images can also be dragged into supported terminals.
@@ -136,32 +153,32 @@ Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle thinking level.
136
153
  Sessions are saved automatically:
137
154
 
138
155
  ```bash
139
- pi -c # Continue most recent session
140
- pi -r # Browse previous sessions
141
- pi --name "my task" # Set session display name at startup
142
- pi --session <path|id> # Open a specific session
156
+ apex-code -c # Continue most recent session
157
+ apex-code -r # Browse previous sessions
158
+ apex-code --name "my task" # Set session display name at startup
159
+ apex-code --session <path|id> # Open a specific session
143
160
  ```
144
161
 
145
- Inside pi, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
162
+ Inside Apex Code, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
146
163
 
147
164
  ### Non-interactive mode
148
165
 
149
166
  For one-shot prompts:
150
167
 
151
168
  ```bash
152
- pi -p "Summarize this codebase"
153
- cat README.md | pi -p "Summarize this text"
154
- pi -p @screenshot.png "What's in this image?"
169
+ apex-code -p "Summarize this codebase"
170
+ cat README.md | apex-code -p "Summarize this text"
171
+ apex-code -p @screenshot.png "What's in this image?"
155
172
  ```
156
173
 
157
174
  Use `--mode json` for JSON event output or `--mode rpc` for process integration.
158
175
 
159
176
  ## Next steps
160
177
 
161
- - [Using Pi](usage.md) - interactive mode, slash commands, sessions, context files, and CLI reference.
178
+ - [Using Apex Code](usage.md) - interactive mode, slash commands, sessions, context files, and CLI reference.
162
179
  - [Providers](providers.md) - authentication and model setup.
163
180
  - [Settings](settings.md) - global and project configuration.
164
181
  - [Keybindings](keybindings.md) - shortcuts and customization.
165
- - [Pi Packages](packages.md) - install shared extensions, skills, prompts, and themes.
182
+ - [Apex Code Packages](packages.md) - install shared extensions, skills, prompts, and themes.
166
183
 
167
184
  Platform notes: [Windows](windows.md), [Termux](termux.md), [tmux](tmux.md), [Terminal setup](terminal-setup.md), [Shell aliases](shell-aliases.md).
package/docs/rpc.md CHANGED
@@ -7,7 +7,7 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
7
7
  ## Starting RPC Mode
8
8
 
9
9
  ```bash
10
- pi --mode rpc [options]
10
+ apex-code --mode rpc [options]
11
11
  ```
12
12
 
13
13
  Common options:
@@ -490,7 +490,7 @@ If output was truncated, includes `fullOutputPath`:
490
490
  "exitCode": 0,
491
491
  "cancelled": false,
492
492
  "truncated": true,
493
- "fullOutputPath": "/tmp/pi-bash-abc123.log"
493
+ "fullOutputPath": "/tmp/apex-code-bash-abc123.log"
494
494
  }
495
495
  }
496
496
  ```
@@ -786,7 +786,7 @@ Response:
786
786
  }
787
787
  ```
788
788
 
789
- The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `pi --mode rpc` process.
789
+ The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `apex-code --mode rpc` process.
790
790
 
791
791
  ### Commands
792
792
 
@@ -806,9 +806,9 @@ Response:
806
806
  "success": true,
807
807
  "data": {
808
808
  "commands": [
809
- {"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.pi/agent/extensions/session.ts"},
810
- {"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.pi/agent/prompts/fix-tests.md"},
811
- {"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.pi/agent/skills/brave-search/SKILL.md"}
809
+ {"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.apex-code/agent/extensions/session.ts"},
810
+ {"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.apex-code/agent/prompts/fix-tests.md"},
811
+ {"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.apex-code/agent/skills/brave-search/SKILL.md"}
812
812
  ]
813
813
  }
814
814
  }
@@ -823,7 +823,7 @@ Each command has:
823
823
  - `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
824
824
  - `location`: Where it was loaded from (optional, not present for extensions):
825
825
  - `"user"`: User-level (`~/.apex-code/agent/`)
826
- - `"project"`: Project-level (`./.pi/agent/`)
826
+ - `"project"`: Project-level (`./.apex-code/agent/`)
827
827
  - `"path"`: Explicit path via CLI or settings
828
828
  - `path`: Absolute file path to the command source (optional)
829
829
 
@@ -881,7 +881,7 @@ Emitted when one low-level agent run completes. Contains all messages generated
881
881
 
882
882
  ### agent_settled
883
883
 
884
- Emitted after the full session-level run settles. At this point Pi will not continue automatically through retry, compaction retry, or queued follow-up messages.
884
+ Emitted after the full session-level run settles. At this point Apex Code will not continue automatically through retry, compaction retry, or queued follow-up messages.
885
885
 
886
886
  ```json
887
887
  {"type": "agent_settled"}
@@ -1292,7 +1292,7 @@ Set the terminal window/tab title. Fire-and-forget.
1292
1292
  "type": "extension_ui_request",
1293
1293
  "id": "uuid-8",
1294
1294
  "method": "setTitle",
1295
- "title": "pi - my project"
1295
+ "title": "apex-code - my project"
1296
1296
  }
1297
1297
  ```
1298
1298
 
@@ -1490,7 +1490,7 @@ import subprocess
1490
1490
  import json
1491
1491
 
1492
1492
  proc = subprocess.Popen(
1493
- ["pi", "--mode", "rpc", "--no-session"],
1493
+ ["apex-code", "--mode", "rpc", "--no-session"],
1494
1494
  stdin=subprocess.PIPE,
1495
1495
  stdout=subprocess.PIPE,
1496
1496
  text=True
@@ -1529,7 +1529,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
1529
1529
  const { spawn } = require("child_process");
1530
1530
  const { StringDecoder } = require("string_decoder");
1531
1531
 
1532
- const agent = spawn("pi", ["--mode", "rpc", "--no-session"]);
1532
+ const agent = spawn("apex-code", ["--mode", "rpc", "--no-session"]);
1533
1533
 
1534
1534
  function attachJsonlReader(stream, onLine) {
1535
1535
  const decoder = new StringDecoder("utf8");