@ponythewhite/base-context 1.0.0 → 1.0.1

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 (285) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/NOTICE +0 -5
  3. package/README.md +44 -27
  4. package/dist/NOTICE +0 -5
  5. package/dist/base-context-runtime/pyproject.toml +1 -1
  6. package/dist/base-context-runtime/src/rlm/__init__.py +7 -5
  7. package/dist/base-context-runtime/test/test_subagent_registry.py +28 -1
  8. package/dist/base-context-runtime/uv.lock +1 -1
  9. package/dist/build-info.json +1 -1
  10. package/dist/bundle/amazon-bedrock.js +21 -0
  11. package/dist/bundle/{anthropic-YY4S534V.js → anthropic-UV5GZDGU.js} +5 -5
  12. package/dist/bundle/{azure-openai-responses-JRP6MIM3.js → azure-openai-responses-WSNPXLYC.js} +6 -6
  13. package/dist/bundle/{bundled-modules-P5HARVZA.js → bundled-modules-TXUMJ2XQ.js} +71 -16
  14. package/dist/bundle/chunk-27QCJ2AZ.js +2578 -0
  15. package/dist/bundle/{chunk-MZHTNNVA.js → chunk-4GXPNXOJ.js} +8 -0
  16. package/dist/bundle/{chunk-SC5KG5R4.js → chunk-DGNX7HQ3.js} +1 -7
  17. package/dist/bundle/{chunk-A53O363M.js → chunk-GRJFXLBM.js} +0 -1
  18. package/dist/bundle/chunk-HKINIBP4.js +29 -0
  19. package/dist/bundle/{chunk-UDSW6FNG.js → chunk-KTNETTHI.js} +1 -1
  20. package/dist/bundle/{chunk-BYVP7LWV.js → chunk-S3INFPZZ.js} +1861 -4662
  21. package/dist/bundle/{chunk-73DCPU3D.js → chunk-V3L54UD6.js} +1019 -3427
  22. package/dist/bundle/{chunk-U7AUVG3B.js → chunk-VSIYFWYI.js} +24 -6
  23. package/dist/bundle/{chunk-IW77OXFS.js → chunk-W46VZFI6.js} +0 -2099
  24. package/dist/bundle/{cli-main-O4X7GFGY.js → cli-main-BYMSRPH6.js} +8 -6
  25. package/dist/bundle/cli.js +2 -2
  26. package/dist/bundle/{google-AUTVGDGZ.js → google-T32FMD4G.js} +6 -6
  27. package/dist/bundle/{google-vertex-Q75D7RKS.js → google-vertex-56KP6I3B.js} +3 -3
  28. package/dist/bundle/{main-XKOW2BV6.js → main-ODOYCEQC.js} +7 -5
  29. package/dist/bundle/{mistral-7ESB7QUD.js → mistral-WGBMYIVU.js} +5 -5
  30. package/dist/bundle/{openai-codex-responses-LV3QRPN4.js → openai-codex-responses-PIV2RQ3G.js} +6 -6
  31. package/dist/bundle/{openai-completions-OJECLPXJ.js → openai-completions-64C3JPR4.js} +11 -22
  32. package/dist/bundle/{openai-responses-FN6HZMBC.js → openai-responses-UI7RSTDV.js} +6 -6
  33. package/dist/cli/args.d.ts.map +1 -1
  34. package/dist/cli/args.js +108 -59
  35. package/dist/cli/args.js.map +1 -1
  36. package/dist/cli/daemon-ps.d.ts +4 -3
  37. package/dist/cli/daemon-ps.d.ts.map +1 -1
  38. package/dist/cli/daemon-ps.js +6 -1
  39. package/dist/cli/daemon-ps.js.map +1 -1
  40. package/dist/cli/product-doctor.d.ts +0 -1
  41. package/dist/cli/product-doctor.d.ts.map +1 -1
  42. package/dist/cli/product-doctor.js +6 -3
  43. package/dist/cli/product-doctor.js.map +1 -1
  44. package/dist/config.d.ts +0 -3
  45. package/dist/config.d.ts.map +1 -1
  46. package/dist/config.js +0 -8
  47. package/dist/config.js.map +1 -1
  48. package/dist/core/agent-session-config.d.ts +1 -2
  49. package/dist/core/agent-session-config.d.ts.map +1 -1
  50. package/dist/core/agent-session-config.js +0 -3
  51. package/dist/core/agent-session-config.js.map +1 -1
  52. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  53. package/dist/core/agent-session-runtime.js +5 -4
  54. package/dist/core/agent-session-runtime.js.map +1 -1
  55. package/dist/core/agent-session-services.d.ts +5 -3
  56. package/dist/core/agent-session-services.d.ts.map +1 -1
  57. package/dist/core/agent-session-services.js +2 -27
  58. package/dist/core/agent-session-services.js.map +1 -1
  59. package/dist/core/agent-session.d.ts +10 -6
  60. package/dist/core/agent-session.d.ts.map +1 -1
  61. package/dist/core/agent-session.js +107 -107
  62. package/dist/core/agent-session.js.map +1 -1
  63. package/dist/core/auth-storage.d.ts +8 -35
  64. package/dist/core/auth-storage.d.ts.map +1 -1
  65. package/dist/core/auth-storage.js +33 -243
  66. package/dist/core/auth-storage.js.map +1 -1
  67. package/dist/core/cron-jobs.d.ts.map +1 -1
  68. package/dist/core/cron-jobs.js +7 -1
  69. package/dist/core/cron-jobs.js.map +1 -1
  70. package/dist/core/inference-coordinator.d.ts +6 -1
  71. package/dist/core/inference-coordinator.d.ts.map +1 -1
  72. package/dist/core/inference-coordinator.js +18 -2
  73. package/dist/core/inference-coordinator.js.map +1 -1
  74. package/dist/core/kernel/bootstrap.d.ts.map +1 -1
  75. package/dist/core/kernel/bootstrap.js +2 -2
  76. package/dist/core/kernel/bootstrap.js.map +1 -1
  77. package/dist/core/kernel/repl-manager.d.ts +2 -0
  78. package/dist/core/kernel/repl-manager.d.ts.map +1 -1
  79. package/dist/core/kernel/repl-manager.js +44 -1
  80. package/dist/core/kernel/repl-manager.js.map +1 -1
  81. package/dist/core/logging.d.ts +4 -3
  82. package/dist/core/logging.d.ts.map +1 -1
  83. package/dist/core/logging.js +6 -6
  84. package/dist/core/logging.js.map +1 -1
  85. package/dist/core/mcp/mcp-manager.d.ts.map +1 -1
  86. package/dist/core/mcp/mcp-manager.js +3 -3
  87. package/dist/core/mcp/mcp-manager.js.map +1 -1
  88. package/dist/core/model-registry.d.ts +1 -16
  89. package/dist/core/model-registry.d.ts.map +1 -1
  90. package/dist/core/model-registry.js +88 -196
  91. package/dist/core/model-registry.js.map +1 -1
  92. package/dist/core/model-resolver.d.ts +2 -19
  93. package/dist/core/model-resolver.d.ts.map +1 -1
  94. package/dist/core/model-resolver.js +36 -266
  95. package/dist/core/model-resolver.js.map +1 -1
  96. package/dist/core/provider-contracts.d.ts +5 -6
  97. package/dist/core/provider-contracts.d.ts.map +1 -1
  98. package/dist/core/provider-contracts.js +25 -36
  99. package/dist/core/provider-contracts.js.map +1 -1
  100. package/dist/core/provider-display-names.d.ts.map +1 -1
  101. package/dist/core/provider-display-names.js +0 -2
  102. package/dist/core/provider-display-names.js.map +1 -1
  103. package/dist/core/rlm-max-subagents.d.ts +32 -0
  104. package/dist/core/rlm-max-subagents.d.ts.map +1 -0
  105. package/dist/core/rlm-max-subagents.js +50 -0
  106. package/dist/core/rlm-max-subagents.js.map +1 -0
  107. package/dist/core/rlm-runtime.d.ts +3 -3
  108. package/dist/core/rlm-runtime.d.ts.map +1 -1
  109. package/dist/core/rlm-runtime.js.map +1 -1
  110. package/dist/core/sdk.d.ts +4 -3
  111. package/dist/core/sdk.d.ts.map +1 -1
  112. package/dist/core/sdk.js +27 -14
  113. package/dist/core/sdk.js.map +1 -1
  114. package/dist/core/settings-manager.d.ts +3 -16
  115. package/dist/core/settings-manager.d.ts.map +1 -1
  116. package/dist/core/settings-manager.js +12 -44
  117. package/dist/core/settings-manager.js.map +1 -1
  118. package/dist/core/slash-commands.d.ts.map +1 -1
  119. package/dist/core/slash-commands.js +6 -6
  120. package/dist/core/slash-commands.js.map +1 -1
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js.map +1 -1
  124. package/dist/installer.mjs +2 -3
  125. package/dist/main.d.ts.map +1 -1
  126. package/dist/main.js +39 -34
  127. package/dist/main.js.map +1 -1
  128. package/dist/modes/acp/acp-mode.d.ts.map +1 -1
  129. package/dist/modes/acp/acp-mode.js +1 -1
  130. package/dist/modes/acp/acp-mode.js.map +1 -1
  131. package/dist/modes/agent-connection/daemon-agent-connection.d.ts +6 -2
  132. package/dist/modes/agent-connection/daemon-agent-connection.d.ts.map +1 -1
  133. package/dist/modes/agent-connection/daemon-agent-connection.js +13 -2
  134. package/dist/modes/agent-connection/daemon-agent-connection.js.map +1 -1
  135. package/dist/modes/agent-connection/in-process-agent-connection.d.ts +2 -0
  136. package/dist/modes/agent-connection/in-process-agent-connection.d.ts.map +1 -1
  137. package/dist/modes/agent-connection/in-process-agent-connection.js +6 -0
  138. package/dist/modes/agent-connection/in-process-agent-connection.js.map +1 -1
  139. package/dist/modes/agent-connection/types.d.ts +3 -0
  140. package/dist/modes/agent-connection/types.d.ts.map +1 -1
  141. package/dist/modes/agent-connection/types.js.map +1 -1
  142. package/dist/modes/agents-view/agents-view-mode.d.ts.map +1 -1
  143. package/dist/modes/agents-view/agents-view-mode.js +2 -19
  144. package/dist/modes/agents-view/agents-view-mode.js.map +1 -1
  145. package/dist/modes/daemon/daemon-mode.d.ts +5 -0
  146. package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
  147. package/dist/modes/daemon/daemon-mode.js +107 -12
  148. package/dist/modes/daemon/daemon-mode.js.map +1 -1
  149. package/dist/modes/daemon/daemon-protocol.d.ts +194 -165
  150. package/dist/modes/daemon/daemon-protocol.d.ts.map +1 -1
  151. package/dist/modes/daemon/daemon-protocol.js +16 -11
  152. package/dist/modes/daemon/daemon-protocol.js.map +1 -1
  153. package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts +19 -0
  154. package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts.map +1 -0
  155. package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js +74 -0
  156. package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js.map +1 -0
  157. package/dist/modes/daemon/daemon-rlm-capacity.d.ts +19 -0
  158. package/dist/modes/daemon/daemon-rlm-capacity.d.ts.map +1 -0
  159. package/dist/modes/daemon/daemon-rlm-capacity.js +85 -0
  160. package/dist/modes/daemon/daemon-rlm-capacity.js.map +1 -0
  161. package/dist/modes/daemon/daemon-session-summarizer.d.ts +2 -3
  162. package/dist/modes/daemon/daemon-session-summarizer.d.ts.map +1 -1
  163. package/dist/modes/daemon/daemon-session-summarizer.js +32 -23
  164. package/dist/modes/daemon/daemon-session-summarizer.js.map +1 -1
  165. package/dist/modes/daemon/daemon-state-root.d.ts +15 -0
  166. package/dist/modes/daemon/daemon-state-root.d.ts.map +1 -0
  167. package/dist/modes/daemon/daemon-state-root.js +40 -0
  168. package/dist/modes/daemon/daemon-state-root.js.map +1 -0
  169. package/dist/modes/daemon/daemon-supervisor-ownership.d.ts +2 -0
  170. package/dist/modes/daemon/daemon-supervisor-ownership.d.ts.map +1 -1
  171. package/dist/modes/daemon/daemon-supervisor-ownership.js +27 -0
  172. package/dist/modes/daemon/daemon-supervisor-ownership.js.map +1 -1
  173. package/dist/modes/daemon/daemon-supervisor.d.ts +10 -1
  174. package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
  175. package/dist/modes/daemon/daemon-supervisor.js +213 -20
  176. package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
  177. package/dist/modes/daemon/daemon-worker-protocol.d.ts +28 -1
  178. package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
  179. package/dist/modes/daemon/daemon-worker-protocol.js +16 -2
  180. package/dist/modes/daemon/daemon-worker-protocol.js.map +1 -1
  181. package/dist/modes/daemon/saved-session-catalog.d.ts.map +1 -1
  182. package/dist/modes/daemon/saved-session-catalog.js +2 -0
  183. package/dist/modes/daemon/saved-session-catalog.js.map +1 -1
  184. package/dist/modes/interactive/auth-flows.d.ts +0 -6
  185. package/dist/modes/interactive/auth-flows.d.ts.map +1 -1
  186. package/dist/modes/interactive/auth-flows.js +6 -126
  187. package/dist/modes/interactive/auth-flows.js.map +1 -1
  188. package/dist/modes/interactive/components/configuration-menu.d.ts +3 -0
  189. package/dist/modes/interactive/components/configuration-menu.d.ts.map +1 -1
  190. package/dist/modes/interactive/components/configuration-menu.js +13 -2
  191. package/dist/modes/interactive/components/configuration-menu.js.map +1 -1
  192. package/dist/modes/interactive/components/footer.d.ts +1 -1
  193. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  194. package/dist/modes/interactive/components/footer.js +2 -2
  195. package/dist/modes/interactive/components/footer.js.map +1 -1
  196. package/dist/modes/interactive/components/index.d.ts +0 -1
  197. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  198. package/dist/modes/interactive/components/index.js +0 -1
  199. package/dist/modes/interactive/components/index.js.map +1 -1
  200. package/dist/modes/interactive/components/login-dialog.d.ts +0 -1
  201. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  202. package/dist/modes/interactive/components/login-dialog.js +3 -40
  203. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  204. package/dist/modes/interactive/components/model-selector.d.ts +2 -0
  205. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  206. package/dist/modes/interactive/components/model-selector.js +13 -2
  207. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  208. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  209. package/dist/modes/interactive/components/oauth-selector.js +2 -11
  210. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  211. package/dist/modes/interactive/feature-hints.d.ts.map +1 -1
  212. package/dist/modes/interactive/feature-hints.js +0 -4
  213. package/dist/modes/interactive/feature-hints.js.map +1 -1
  214. package/dist/modes/interactive/interactive-mode.d.ts +3 -12
  215. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  216. package/dist/modes/interactive/interactive-mode.js +81 -507
  217. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  218. package/dist/modes/interactive/onboarding.d.ts +0 -3
  219. package/dist/modes/interactive/onboarding.d.ts.map +1 -1
  220. package/dist/modes/interactive/onboarding.js +0 -17
  221. package/dist/modes/interactive/onboarding.js.map +1 -1
  222. package/dist/modes/rpc/rpc-client.d.ts +2 -1
  223. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  224. package/dist/modes/rpc/rpc-client.js +24 -11
  225. package/dist/modes/rpc/rpc-client.js.map +1 -1
  226. package/dist/node/amazon-bedrock.d.ts +2 -0
  227. package/dist/node/amazon-bedrock.d.ts.map +1 -0
  228. package/dist/node/amazon-bedrock.js +6 -0
  229. package/dist/node/amazon-bedrock.js.map +1 -0
  230. package/dist/product-identity.d.ts +0 -1
  231. package/dist/product-identity.d.ts.map +1 -1
  232. package/dist/product-identity.js +0 -1
  233. package/dist/product-identity.js.map +1 -1
  234. package/docs/development.md +1 -1
  235. package/docs/fork-philosophy.md +4 -8
  236. package/docs/installation.md +83 -62
  237. package/docs/providers.md +23 -25
  238. package/docs/quickstart.md +19 -10
  239. package/docs/rlm-runtime.md +13 -5
  240. package/docs/rpc.md +4 -4
  241. package/docs/sdk.md +20 -11
  242. package/docs/sessions.md +0 -1
  243. package/docs/settings.md +9 -42
  244. package/docs/skills.md +0 -1
  245. package/docs/upstream-0.9.5.md +171 -0
  246. package/docs/usage.md +14 -10
  247. package/package.json +4 -4
  248. package/dist/core/agent-traces.d.ts +0 -149
  249. package/dist/core/agent-traces.d.ts.map +0 -1
  250. package/dist/core/agent-traces.js +0 -904
  251. package/dist/core/agent-traces.js.map +0 -1
  252. package/dist/core/prime-inference-auth.d.ts +0 -70
  253. package/dist/core/prime-inference-auth.d.ts.map +0 -1
  254. package/dist/core/prime-inference-auth.js +0 -352
  255. package/dist/core/prime-inference-auth.js.map +0 -1
  256. package/dist/core/prime-inference-model-selection.d.ts +0 -16
  257. package/dist/core/prime-inference-model-selection.d.ts.map +0 -1
  258. package/dist/core/prime-inference-model-selection.js +0 -16
  259. package/dist/core/prime-inference-model-selection.js.map +0 -1
  260. package/dist/core/prime-inference-models.d.ts +0 -6
  261. package/dist/core/prime-inference-models.d.ts.map +0 -1
  262. package/dist/core/prime-inference-models.js +0 -62
  263. package/dist/core/prime-inference-models.js.map +0 -1
  264. package/dist/core/telemetry.d.ts +0 -95
  265. package/dist/core/telemetry.d.ts.map +0 -1
  266. package/dist/core/telemetry.js +0 -637
  267. package/dist/core/telemetry.js.map +0 -1
  268. package/dist/modes/interactive/components/prime-onboarding-splash.d.ts +0 -39
  269. package/dist/modes/interactive/components/prime-onboarding-splash.d.ts.map +0 -1
  270. package/dist/modes/interactive/components/prime-onboarding-splash.js +0 -286
  271. package/dist/modes/interactive/components/prime-onboarding-splash.js.map +0 -1
  272. package/dist/modes/interactive/components/prime-team-selector.d.ts +0 -30
  273. package/dist/modes/interactive/components/prime-team-selector.d.ts.map +0 -1
  274. package/dist/modes/interactive/components/prime-team-selector.js +0 -166
  275. package/dist/modes/interactive/components/prime-team-selector.js.map +0 -1
  276. package/dist/skills/prime-intellect/SKILL.md +0 -87
  277. package/dist/skills/prime-intellect/references/compute.md +0 -45
  278. package/dist/skills/prime-intellect/references/environments.md +0 -73
  279. package/dist/skills/prime-intellect/references/inference.md +0 -47
  280. package/dist/skills/prime-intellect/references/sandboxes.md +0 -75
  281. package/skills/prime-intellect/SKILL.md +0 -87
  282. package/skills/prime-intellect/references/compute.md +0 -45
  283. package/skills/prime-intellect/references/environments.md +0 -73
  284. package/skills/prime-intellect/references/inference.md +0 -47
  285. package/skills/prime-intellect/references/sandboxes.md +0 -75
@@ -28,6 +28,8 @@ Base Context retains that core approach, along with agent messaging, goals, sche
28
28
 
29
29
  `await rlm(...)` returns an admission handle. Children deliver results through messages or files. This distinction matters: a parent should continue independent work and read results when they arrive, not assume the spawn call contains the answer.
30
30
 
31
+ For 1.0.1, we reviewed the 113 commits in Prime Agent 0.9.5 and selected small runtime, provider and packaging fixes rather than merging the release. The [complete selection and exclusions](upstream-0.9.5.md) explain how that choice preserves the fork's architecture.
32
+
31
33
  ## What Base Context changes
32
34
 
33
35
  | Area | Base Context approach | Important limit |
@@ -62,14 +64,8 @@ Read the [report](../../../benchmarks/python-realworld-30/REPORT.md), [complete
62
64
  - **Keep comparisons honest.** Separate design goals from measured outcomes and benchmark revisions from release versions.
63
65
  - **Stay open.** Retain MIT licensing and upstream notices. Source and documentation should make the implementation understandable without a hosted service.
64
66
 
65
- ## Lineage and acknowledgements
67
+ ## Project and license
66
68
 
67
69
  Base Context is developed by [Synerise](https://synerise.com) and distributed through [BaseModelAI/base-context](https://github.com/BaseModelAI/base-context).
68
70
 
69
- We thank **[Prime Agent](https://github.com/PrimeIntellect-ai/prime-agent)** and **[Prime Intellect](https://www.primeintellect.ai/)** for the agent foundation, the [RLM programming model](https://www.primeintellect.ai/blog/rlm), and the work that made this fork possible.
70
-
71
- We thank **Mario Zechner** for **[Pi / pi-mono](https://github.com/badlogic/pi-mono)**, whose agent and terminal UI work is part of that lineage.
72
-
73
- We also acknowledge **[PrimeRL](https://github.com/PrimeIntellect-ai/prime-rl)**, Prime Intellect's separate open reinforcement-learning project. It is not a direct dependency of the Base Context CLI. This credit does not imply that Prime Intellect or the upstream authors endorse this fork or its benchmark conclusions.
74
-
75
- Base Context remains [MIT licensed](../../../LICENSE). The repository README retains the upstream research citation.
71
+ Base Context is [MIT licensed](../../../LICENSE). Required copyright notices are in [NOTICE](../../../NOTICE).
@@ -1,111 +1,132 @@
1
1
  # Installation, updates, and rollback
2
2
 
3
- The application package is **`@ponythewhite/base-context`**. The executable is **`base-context`**. The repository is [BaseModelAI/base-context](https://github.com/BaseModelAI/base-context). Prime Agent's installers and packages install a different product.
3
+ Install **Synerise base-context** with the installer below. The application package is `@ponythewhite/base-context`; the command is `base-context`.
4
4
 
5
- ## Requirements
5
+ ## Recommended: the installer
6
6
 
7
- - Node.js `^22.12.0 || >=23.3.0`: Node 22.12 or newer on the 22.x line, or Node 23.3 or newer. Node 22.8–22.11 and 23.0–23.2 are not supported.
8
- - npm compatible with that Node version.
9
- - [uv](https://docs.astral.sh/uv/getting-started/installation/) for the managed Python workspace. The default bootstrap installs Python 3.11, the bundled `base-context-runtime`, and its default Python packages.
10
- - A configured, authorized model provider. Provider inference and first-time dependency setup need network access unless you supply local alternatives.
7
+ On **macOS or Linux**, run this in a terminal:
11
8
 
12
- The Node floor comes from the native SQLite session catalog. It does not change the journal format. Normal session owners rebuild older derived indexes; read-only catalog discovery does not migrate them.
9
+ ```bash
10
+ curl -fsSL https://github.com/BaseModelAI/base-context/releases/latest/download/install.sh | bash
11
+ ```
12
+
13
+ **You do not install Node.js, npm, Python, or `uv` first.** The installer:
14
+
15
+ 1. Checks Node.js/npm and asks to install a supported version when needed. Some system package-manager methods need administrator approval.
16
+ 2. Installs `uv` if it is missing, downloads managed Python 3.13, and prepares the bundled runtime and Python packages.
17
+ 3. Activates the CLI only after that preparation succeeds.
18
+ 4. Offers to add the launcher and any standalone Node.js installation to your shell profile. It preserves existing settings.
19
+ 5. Prints one exact `export PATH=... && base-context` command. Run it to activate and launch in your **current terminal**. A child installer cannot change its parent shell's PATH. If you accept the profile update, future shells get the PATH automatically.
20
+
21
+ Use this route **instead of** the npm alternative. No Python virtual-environment activation is needed. Initial setup needs network access and ordinary shell download/archive tools. Missing Node/npm setup needs terminal approval; rerun in a terminal rather than preinstalling everything manually.
13
22
 
14
- ## npm installation
23
+ To start work later:
15
24
 
16
25
  ```bash
17
- npm install -g @ponythewhite/base-context
18
- base-context --version
19
- cd /path/to/project
26
+ cd /path/to/your/project
20
27
  base-context
21
28
  ```
22
29
 
23
- Make sure your npm global binary directory is on `PATH`. Use a user-owned Node installation rather than adding elevated permissions just for this agent.
30
+ Select a supported provider with `/login`, authenticate with that provider, then select a model with `/model`. You must choose the provider and model. Use that provider's account and authentication. See [provider setup](providers.md).
24
31
 
25
- In the UI, use `/login` and then `/model`. See [provider configuration](providers.md). The fork does not inherit permission to use upstream OAuth clients or subscriptions.
32
+ ### Updates and rollback
26
33
 
27
- Update an npm-managed installation with:
34
+ The installer manages a versioned CLI/Python pair beneath `${XDG_DATA_HOME:-$HOME/.local/share}/base-context`. `BASE_CONTEXT_INSTALL_ROOT` selects another root. The stable launcher is `<owned-root>/bin/base-context`. Existing global package-manager installations remain separate and are not overwritten.
28
35
 
29
36
  ```bash
30
- npm install -g @ponythewhite/base-context@latest
37
+ base-context update --self
38
+ base-context-install rollback
31
39
  ```
32
40
 
33
- The CLI also provides `base-context update`. npm/pnpm/yarn/bun global installations remain externally owned. They do not gain the owned installer's paired CLI/Python rollback.
41
+ Rollback selects the retained previous CLI/Python pair for future launches. It does not stop running processes, revert session data or Node.js, or undo changes made by Python skills. Old and failed version directories are retained.
34
42
 
35
- ## Source installation
43
+ To install a specific release, download that release's installer and pass its version:
36
44
 
37
45
  ```bash
38
- git clone https://github.com/BaseModelAI/base-context.git
39
- cd base-context
40
- npm ci
41
- npm run build:source
42
- node packages/coding-agent/dist/bundle/cli.js
46
+ VERSION=1.0.1
47
+ curl -fsSL "https://github.com/BaseModelAI/base-context/releases/download/v${VERSION}/install.sh" -o install-base-context.sh
48
+ sh install-base-context.sh "$VERSION"
43
49
  ```
44
50
 
45
- Do not substitute the upstream repository or an old fork-development branch. The source-built CLI starts in the current working directory. To use it in another project:
51
+ The shell resolves the stable npm tag by default; `beta` selects the npm `beta` tag. A positional version or `BASE_CONTEXT_VERSION` bypasses channel discovery. Matching GitHub release assets must exist. `BASE_CONTEXT_DOWNLOAD_BASE_URL` is an installer repository-base override, not the running application's update-manifest setting; leave it unset for normal use.
52
+
53
+ ## npm alternative
54
+
55
+ Use this only if you already manage Node.js and npm, or if you use Windows. Install supported **Node.js and npm before this route**: Node.js `^22.12.0 || >=23.3.0` (22.12+ on the 22.x line, or 23.3+).
56
+
57
+ Bash/Zsh:
46
58
 
47
59
  ```bash
60
+ npm install -g @ponythewhite/base-context
48
61
  cd /path/to/project
49
- node /absolute/path/to/base-context/packages/coding-agent/dist/bundle/cli.js
62
+ BASE_CONTEXT_INSTALL_UV=1 base-context
50
63
  ```
51
64
 
52
- Replace `base-context` in other examples with that Node invocation when using a source build. Keep source updates under git and rebuild with `npm ci` and `npm run build:source`; a global npm update does not update your checkout.
65
+ PowerShell:
66
+
67
+ ```powershell
68
+ npm install -g @ponythewhite/base-context
69
+ Set-Location C:\path\to\project
70
+ $env:BASE_CONTEXT_INSTALL_UV = "1"
71
+ base-context
72
+ ```
53
73
 
54
- ## Python setup
74
+ Make sure the npm global binary directory is on PATH. Use a user-owned Node installation rather than adding administrator permissions just for this agent.
55
75
 
56
- For npm and source installations, the default kernel environment is `~/.base-context/runtime`. It is prepared lazily when the agent first uses Python. Install `uv` first, or explicitly allow bootstrap to install it with `BASE_CONTEXT_INSTALL_UV=1`. Initial preparation can download Python and dependencies.
76
+ **What happens when:** normal `npm install` installs the CLI but skips Python setup. Starting a normal CLI session begins preparing Python in the background when the Python tool is enabled. `BASE_CONTEXT_INSTALL_UV=1` lets this setup install missing `uv`; it then downloads Python and installs the bundled runtime. You do not install Python manually. Later sessions reuse the environment. `base-context --version` does not start Python.
57
77
 
58
- For a manual environment:
78
+ Without that flag, missing `uv` can make the Python tool fail; normal session startup does not offer an installation prompt. The installer route avoids this separate step by finishing Python setup before activation. Advanced npm postinstall bootstrap flags are optional, not required for this route.
59
79
 
60
- - `BASE_CONTEXT_KERNEL_PYTHON` selects an absolute Python executable with a current **`base-context-runtime`** already installed.
61
- - `BASE_CONTEXT_KERNEL_VENV` selects an absolute manual environment directory.
62
- - The Python import remains `rlm`; an environment containing only `prime-agent-runtime` is not a substitute.
80
+ Update an npm-managed installation with:
63
81
 
64
- The owned installer below prepares its own release-local default environment before activation. Python skills can later change that environment; it is not immutable. See [Python-backed skills](skills.md#python-backed-skills).
82
+ ```bash
83
+ npm install -g @ponythewhite/base-context@latest
84
+ ```
65
85
 
66
- ## Owned installer and rollback
86
+ `base-context update` also supports package-manager updates. npm/pnpm/yarn/bun installations remain externally owned and do not gain the installer's paired CLI/Python rollback.
67
87
 
68
- Use the versioned, rendered installer from the GitHub release:
88
+ ## Source installation
69
89
 
70
90
  ```bash
71
- curl -fL https://github.com/BaseModelAI/base-context/releases/download/v1.0.0/install.sh -o install-base-context.sh
72
- sh install-base-context.sh 1.0.0
91
+ git clone https://github.com/BaseModelAI/base-context.git
92
+ cd base-context
93
+ npm ci
94
+ npm run build:source
95
+ BASE_CONTEXT_INSTALL_UV=1 node packages/coding-agent/dist/bundle/cli.js
73
96
  ```
74
97
 
75
- The separate POSIX installer manages versioned CLI/Python pairs. It defaults to `${XDG_DATA_HOME:-$HOME/.local/share}/base-context`; `BASE_CONTEXT_INSTALL_ROOT` chooses another root. Use the installer and assets from a matching Base Context release, not an upstream installer.
76
-
77
- The release layout uses the repository base `https://github.com/BaseModelAI/base-context`, with versioned assets under `/releases/download/v<V>/`. Assets include `base-context-<V>.tgz`, the three core tarballs, and `SHA256SUMS`. The shell installer resolves `@ponythewhite/base-context@latest`; its `beta` channel resolves the npm `beta` tag. A positional version such as `sh install.sh v1.0.0`, or `BASE_CONTEXT_VERSION`, bypasses channel discovery. The matching release assets must already exist.
98
+ The source-built CLI starts in the current working directory. To work in another project, change to that directory and run `node /absolute/path/to/base-context/packages/coding-agent/dist/bundle/cli.js`. Keep source updates under git, then rerun `npm ci` and `npm run build:source`. A global npm update does not update your checkout.
78
99
 
79
- When invoking a local copy of the shell installer, set `BASE_CONTEXT_DOWNLOAD_BASE_URL` for that invocation to the repository base. This installer setting is **not** the running application's custom update-manifest setting. Leave it unset for normal application launches to use owned npm updates.
100
+ ## Custom Python environments
80
101
 
81
- Preparation must finish before the new CLI/Python pair becomes selected. Follow the installer's PATH instructions, including the separate `base-context-node` directory if it installs standalone Node. The stable launcher is `<owned-root>/bin/base-context`.
102
+ Ordinary installer users can skip this section. npm and source installations normally use `~/.base-context/runtime`; the installer uses a release-local environment. SDK sessions and RLM children normally prepare Python lazily, unlike the normal CLI root session's background prewarm.
82
103
 
83
- After an owned installation:
104
+ For an explicitly managed environment:
84
105
 
85
- ```bash
86
- base-context update --self
87
- base-context-install rollback
88
- ```
106
+ - `BASE_CONTEXT_KERNEL_PYTHON` selects an absolute Python executable with the current bundled **`base-context-runtime`** installed.
107
+ - `BASE_CONTEXT_KERNEL_VENV` selects an absolute environment directory.
108
+ - The package exposes the Python import `rlm`. This is not a command users need to run to install the CLI.
89
109
 
90
- Rollback selects the retained previous CLI/Python pair for future launches. It does not stop running owners, roll back session data or Node, or undo changes made by running processes. Old and failed version directories are retained; there is no automatic cleanup. The owned installer does not convert or overwrite existing global package-manager installations.
110
+ Saved Python namespaces are not portable across minor versions; native startup rejects an incompatible snapshot. Start a new session when selecting a different Python minor version. Python skills can install additional packages. See [Python-backed skills](skills.md#python-backed-skills).
91
111
 
92
- ### Local release packages
112
+ ## Local release packages
93
113
 
94
- For unpublished local packages, use the dedicated installer from the matching, freshly built and extracted main package. Supply the three other first-party tarballs explicitly:
114
+ For unpublished packages, use the dedicated installer from the matching, freshly built and extracted main package. Supply all three other first-party archives explicitly:
95
115
 
96
116
  ```bash
117
+ VERSION=1.0.1
97
118
  PACKS=/absolute/path/to/pack
98
119
  node /absolute/path/to/extracted-main/package/dist/installer.mjs install \
99
120
  /absolute/path/to/new-install-root null \
100
- "$PACKS/ponythewhite-base-context-1.0.0.tgz" 1.0.0 \
101
- --local-dependency "$PACKS/ponythewhite-base-context-ai-1.0.0.tgz" \
102
- --local-dependency "$PACKS/ponythewhite-base-context-tui-1.0.0.tgz" \
103
- --local-dependency "$PACKS/ponythewhite-base-context-agent-1.0.0.tgz"
121
+ "$PACKS/ponythewhite-base-context-${VERSION}.tgz" "$VERSION" \
122
+ --local-dependency "$PACKS/ponythewhite-base-context-ai-${VERSION}.tgz" \
123
+ --local-dependency "$PACKS/ponythewhite-base-context-tui-${VERSION}.tgz" \
124
+ --local-dependency "$PACKS/ponythewhite-base-context-agent-${VERSION}.tgz"
104
125
  ```
105
126
 
106
- Substitute the matching release version and actual tarball names. Use `null` only for a new, unselected owned root. Each `--local-dependency` names a local archive containing `package/package.json`. Relative paths use the invocation's original working directory. `tar` must be available. The installer reads package names and configures candidate-local dependencies; it does not scan adjacent files or modify archive contents.
127
+ Use the actual archive names and a matching version. `null` means a new, unselected owned root. Relative paths use the invocation's original working directory. `tar` must be available. The installer reads package names and sets candidate-local dependencies; it does not scan adjacent files or alter archives.
107
128
 
108
- The dedicated entry skips agent/model/auth startup, but npm scripts and Python bootstrap can still download dependencies. This is not an offline install. Extraction alone does not install or activate the package. Old package sets do not acquire this installer option.
129
+ This entry skips agent/model/auth startup, but npm and Python setup can download dependencies. Extraction alone does not install or activate the package.
109
130
 
110
131
  ## State and configuration
111
132
 
@@ -117,17 +138,17 @@ The dedicated entry skips agent/model/auth startup, but npm scripts and Python b
117
138
  | `BASE_CONTEXT_SESSION_DIR` | Absolute independent session-storage override |
118
139
  | `--session-dir` | Session-directory override with higher precedence |
119
140
 
120
- Do not point writable Base Context state at `.prime`, `.pi`, or `.prime-context`. Do not copy upstream credential files. Use the explicit [offline history import](sessions.md#importing-an-offline-prime-root) if needed.
141
+ Keep writable Base Context state separate from other applications. Use [offline history import](sessions.md#importing-an-offline-prime-root) when needed.
121
142
 
122
143
  `--offline` or `BASE_CONTEXT_OFFLINE=1` disables startup network operations, including update and package checks. It is not a network sandbox and does not make a remote model available offline.
123
144
 
124
145
  ## Troubleshooting
125
146
 
126
- - **Unsupported Node:** upgrade Node before installing or rebuilding.
127
- - **Command not found:** check the npm global binary directory or the owned installer's PATH instructions.
128
- - **Python bootstrap cannot find uv:** install uv, or opt in with `BASE_CONTEXT_INSTALL_UV=1`.
129
- - **Manual Python is rejected:** install the current bundled `base-context-runtime` into the selected environment; do not reuse an upstream-only runtime.
130
- - **No usable model:** configure the actual provider route. A catalog entry is not authentication or subscription permission.
131
- - **Background service issue:** use `base-context status`, then `base-context doctor`; add `--fix` only when you want repairs.
147
+ - **Missing or unsupported Node:** rerun the installer in a terminal and approve prerequisite setup. npm/source users must install supported Node themselves.
148
+ - **Command not found:** run the installer's exact PATH command, or check your npm global binary directory if using npm.
149
+ - **Python cannot find uv with npm/source:** launch with `BASE_CONTEXT_INSTALL_UV=1` as shown above.
150
+ - **Manual Python is rejected:** install the current bundled runtime into that environment.
151
+ - **No model selected:** use `/login` for your provider and `/model` for an explicit model choice.
152
+ - **Background service issue:** use `base-context status`, then `base-context doctor`; add `--fix` when you want repairs.
132
153
 
133
154
  See [settings](settings.md), [usage](usage.md), and [development](development.md) for the full references.
package/docs/providers.md CHANGED
@@ -1,35 +1,39 @@
1
1
  # Providers
2
2
 
3
- Base Context resolves providers through their actual API and credential routes. API keys can come from environment variables or the owned auth file. A model catalog entry does not establish subscription entitlement, OAuth-client permission or native context capabilities.
3
+ Choose a supported **provider**, authenticate, then select a **model**. Base Context does not choose a provider or model automatically. Accounts, usage limits, and billing belong to the provider you select.
4
4
 
5
- ## Table of Contents
5
+ ## First-time setup
6
6
 
7
- - [Subscriptions](#subscriptions)
8
- - [API Keys](#api-keys)
9
- - [Auth File](#auth-file)
10
- - [Cloud Providers](#cloud-providers)
11
- - [Custom Providers](#custom-providers)
12
- - [Resolution Order](#resolution-order)
7
+ 1. Start `base-context`.
8
+ 2. Open `/login` and select a provider. For a supported subscription, follow its browser authorization link. For API-key authentication, enter that provider's key. Bearer and cloud credentials use the provider-specific setup below.
9
+ 3. Open `/model` and choose a supported model. The selected provider/model is saved for later sessions.
13
10
 
14
- ## Subscriptions
11
+ For command-line selection, list the supported models and name both parts:
15
12
 
16
- Use only the provider/auth routes authorized for your setup. `/login` exposes the available configured routes; a fork does not inherit permission to use upstream OAuth clients. Where writable credential storage is supported, it belongs under `~/.base-context/auth.json` (or `BASE_CONTEXT_HOME`), not Prime's root. Login, refresh and logout behavior follows the selected route's permissions.
13
+ ```bash
14
+ base-context model list
15
+ base-context --provider openai --model gpt-5.4
16
+ # Equivalent:
17
+ base-context --model openai/gpt-5.4
18
+ ```
17
19
 
18
- Do not copy a Prime credential store or enable an API-key billing fallback to bypass a subscription refusal. The offline migration command excludes credentials.
20
+ An API key alone does not select a model. A missing or unavailable saved model is not silently replaced with another provider. For models outside the built-in list, register the provider/model in [models.json](models.md) first.
19
21
 
20
- ### OpenAI Codex
22
+ ## Authentication availability
21
23
 
22
- An existing authorized OpenAI Codex subscription can be supplied to an individual SDK instance through an explicitly injected read-only backend. See [SDK authentication](sdk.md#api-keys-and-oauth).
24
+ Use `/login` for supported subscription OAuth or API-key authentication. The built-in subscription routes are **OpenAI Codex (ChatGPT)**, **Anthropic (Claude Pro/Max)**, and **GitHub Copilot**. Open the provider's browser link and complete its authorization steps. Access and usage limits depend on your provider account.
23
25
 
24
- That mode uses the official `openai-codex` / `openai-codex-responses` route. It refuses missing, stale or expired credentials and disables login, refresh, credential writes and API-key fallback. Keep the backend outside tools. This is an instance-scoped permission, not a global OAuth-client approval or an OpenAI endorsement of this fork.
26
+ Credentials are stored in `~/.base-context/auth.json` (`BASE_CONTEXT_HOME` can select another state root). Normal OAuth storage persists credentials and refreshes them when needed. Provider-specific bearer and cloud credentials are described below. Prime integrations are disabled; this does not disable other registered OAuth providers.
25
27
 
26
- ### Claude Pro/Max
28
+ ### ChatGPT / Codex subscription
27
29
 
28
- Use this route only where the exact client and account are authorized. This guide does not establish Claude subscription access, included usage or billing terms for the fork. An Anthropic API key is a separate credential route.
30
+ 1. Open `/login` and choose **OpenAI Codex**.
31
+ 2. Open the displayed browser link and sign in with the ChatGPT account that has Codex access. Complete the callback or paste the requested authorization response when prompted.
32
+ 3. Open `/model` and explicitly choose an `openai-codex` model available to your account.
29
33
 
30
- ### GitHub Copilot
34
+ An OpenAI API key belongs to the separate `openai` provider; it is not required for the Codex subscription route. Anthropic API-key authentication is likewise separate from Claude subscription login. Logging in does not automatically select or replace a model.
31
35
 
32
- If the authorized Copilot login route is available, use the correct github.com or GitHub Enterprise domain. Model availability also depends on the account and enabled models. This guide does not grant the fork access to a Copilot subscription.
36
+ The SDK also offers an optional, explicitly injected read-only Codex backend for existing credentials. Only that mode disables login, refresh, credential writes, and API-key fallback. It does not restrict normal interactive subscription login. See [SDK authentication](sdk.md#api-keys-and-oauth).
33
37
 
34
38
  ## API Keys
35
39
 
@@ -47,7 +51,6 @@ base-context
47
51
  | Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
48
52
  | Azure OpenAI Responses | `AZURE_OPENAI_API_KEY` | `azure-openai-responses` |
49
53
  | OpenAI | `OPENAI_API_KEY` | `openai` |
50
- | Prime Inference | `PRIME_API_KEY` | `prime-inference` |
51
54
  | DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
52
55
  | Google Gemini | `GEMINI_API_KEY` | `google` |
53
56
  | Mistral | `MISTRAL_API_KEY` | `mistral` |
@@ -81,7 +84,6 @@ Store credentials in the owned `~/.base-context/auth.json` (`BASE_CONTEXT_HOME`
81
84
  {
82
85
  "anthropic": { "type": "api_key", "key": "sk-ant-..." },
83
86
  "openai": { "type": "api_key", "key": "sk-..." },
84
- "prime-inference": { "type": "api_key", "key": "..." },
85
87
  "deepseek": { "type": "api_key", "key": "sk-..." },
86
88
  "google": { "type": "api_key", "key": "..." },
87
89
  "opencode": { "type": "api_key", "key": "..." },
@@ -115,10 +117,6 @@ The `key` field supports three formats:
115
117
 
116
118
  Writable OAuth storage is used only when the configured route permits it. The read-only existing-Codex subscription mode does not write this file or refresh credentials. Shell-backed API-key entries execute commands; use only trusted local configuration, never unreviewed imported instructions.
117
119
 
118
- ### Prime Inference
119
-
120
- Prime Inference uses the OpenAI-compatible endpoint at `https://api.pinference.ai/api/v1`. Set `PRIME_API_KEY` or store an API key for `prime-inference` via `/login`.
121
-
122
120
  ## Cloud Providers
123
121
 
124
122
  ### Azure OpenAI
@@ -159,7 +157,7 @@ Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_
159
157
  base-context --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
160
158
  ```
161
159
 
162
- 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:
160
+ Register custom application inference profile IDs in [models.json](models.md) before selecting them. 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:
163
161
 
164
162
  ```bash
165
163
  export AWS_BEDROCK_FORCE_CACHE=1
@@ -2,17 +2,24 @@
2
2
 
3
3
  This page gets you to a useful first Base Context session. Base Context is a fork of Prime Agent, which descends from pi-mono; it uses its own command, packages and state.
4
4
 
5
- ## Install
5
+ ## Install and launch
6
6
 
7
- Use Node.js `^22.12.0 || >=23.3.0` and a compatible npm version:
7
+ On macOS or Linux, use the interactive **Synerise base-context installer**:
8
+
9
+ ```bash
10
+ curl -fsSL https://github.com/BaseModelAI/base-context/releases/latest/download/install.sh | bash
11
+ ```
12
+
13
+ It checks Node.js/npm and offers to install them if needed, installs `uv` when needed, and prepares the agent's Python environment before activation. **Do not install Python or `uv` manually before this command. Do not also run `npm install -g` unless you intentionally want a separate installation.**
14
+
15
+ Follow the installer's final PATH/activation instruction, then launch:
8
16
 
9
17
  ```bash
10
- npm install -g @ponythewhite/base-context
11
18
  cd /path/to/project
12
19
  base-context
13
20
  ```
14
21
 
15
- Install [uv](https://docs.astral.sh/uv/getting-started/installation/) for the managed Python workspace. First use prepares Python 3.11 and the bundled `base-context-runtime`; initial setup can download dependencies.
22
+ The next step is provider login below. The installer prepares the application, not your model-provider account. If you prefer npm or need Windows instructions, use the clearly separate [npm installation route](installation.md#npm-alternative).
16
23
 
17
24
  ### Build from source
18
25
 
@@ -35,7 +42,9 @@ For a source build, replace `base-context` in the examples below with that Node
35
42
 
36
43
  ## Authenticate
37
44
 
38
- Base Context uses `~/.base-context/auth.json` under its own product root. Do not copy Prime credential stores or assume that upstream OAuth clients are authorized for the fork. Choose an explicitly supported route in the [provider guide](providers.md).
45
+ On first launch, choose a provider, authenticate if needed, then choose one of that provider's models. Existing credentials do not choose a provider or model for you. Cancelling leaves setup incomplete.
46
+
47
+ Base Context stores credentials entered through `/login` in `~/.base-context/auth.json` and saves your explicit provider/model selection in settings. Later launches reuse that choice. If its credentials need renewal, authenticate the same provider; Base Context does not substitute another model. Environment credentials stay in the environment. See the [provider guide](providers.md) for supported routes.
39
48
 
40
49
  ### Subscription or Stored API Credentials
41
50
 
@@ -45,7 +54,7 @@ Start Base Context and run:
45
54
  /login
46
55
  ```
47
56
 
48
- Use only the provider/auth routes supported for your setup. A model catalog entry does not establish subscription entitlement or authentication. See [SDK authentication](sdk.md) for explicit subscription configuration.
57
+ After login, choose a model in `/model`. Base Context does not pick a provider or model automatically. A saved selection is reused on later launches. See [SDK authentication](sdk.md) for programmatic setup.
49
58
 
50
59
  ### API Key
51
60
 
@@ -56,17 +65,17 @@ export ANTHROPIC_API_KEY=sk-ant-...
56
65
  base-context
57
66
  ```
58
67
 
59
- You can also select a supported API-key provider in `/login` to store its credential under `~/.base-context/auth.json`. `BASE_CONTEXT_HOME` changes that product root. Provider variables such as `ANTHROPIC_API_KEY` and `PRIME_API_KEY` keep their real provider names; they are not product-prefix aliases.
68
+ You can also select a supported API-key provider in `/login` to store its credential under `~/.base-context/auth.json`. `BASE_CONTEXT_HOME` changes that product root. Provider variables such as `ANTHROPIC_API_KEY` and `OPENAI_API_KEY` keep their real provider names; they are not product-prefix aliases.
60
69
 
61
70
  ## First Session
62
71
 
63
- Once Base Context starts, type a request and press Enter:
72
+ Once you have authenticated and selected a model, type a request and press Enter:
64
73
 
65
74
  ```text
66
75
  Summarize this repository and tell me how to run its checks.
67
76
  ```
68
77
 
69
- Base Context uses the persistent `ipython` kernel for file operations, project commands, data analysis and installed skills. The owned installer prepares a fresh release-local Python environment before activation. A non-owned source setup bootstraps its default environment under `~/.base-context/runtime` on first use. `BASE_CONTEXT_KERNEL_PYTHON` selects an explicit manual Python executable with a current `base-context-runtime`; the Python import remains `rlm`. An upstream `prime-agent-runtime` environment is not a substitute.
78
+ Base Context uses the persistent `ipython` kernel for file operations, project commands, data analysis and installed skills. The owned installer prepares a fresh release-local Python 3.13 environment before activation. A source launch starts preparing its default environment under `~/.base-context/runtime` in the background. Set `BASE_CONTEXT_INSTALL_UV=1` before launching if `uv` must be installed automatically. `BASE_CONTEXT_KERNEL_PYTHON` selects an explicit manual Python executable with a current `base-context-runtime`; the Python import remains `rlm`. An upstream `prime-agent-runtime` environment is not a substitute.
70
79
 
71
80
  Base Context runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
72
81
 
@@ -146,7 +155,7 @@ For legacy data, use the [offline migration steps](usage.md#import-an-offline-pr
146
155
  For one-shot prompts:
147
156
 
148
157
  ```bash
149
- base-context -p "Summarize this codebase"
158
+ base-context --provider anthropic --model claude-sonnet-4-6 -p "Summarize this codebase"
150
159
  cat README.md | base-context -p "Summarize this text"
151
160
  base-context -p @screenshot.png "What's in this image?"
152
161
  ```
@@ -73,16 +73,16 @@ The Python side does not call providers or implement an agent loop.
73
73
 
74
74
  ## Kernel Lifecycle
75
75
 
76
- The kernel is created lazily on first Python REPL use. Python resolution is:
76
+ SDK and child sessions normally start the kernel lazily on first Python REPL use. The CLI root starts preparing it in the background; saved snapshots can also trigger prewarming. Python resolution is:
77
77
 
78
- 1. `BASE_CONTEXT_KERNEL_PYTHON`, when it has a current `base-context-runtime`; otherwise
79
- 2. the managed environment selected by `BASE_CONTEXT_KERNEL_VENV`, an owned release-local environment, or `~/.base-context/runtime`.
78
+ 1. An explicit `BASE_CONTEXT_KERNEL_PYTHON` takes precedence and must provide a current `base-context-runtime`. An invalid override reports an error rather than selecting another interpreter.
79
+ 2. Without an interpreter override, use the managed environment selected by `BASE_CONTEXT_KERNEL_VENV`, an owned release-local environment, or `~/.base-context/runtime`.
80
80
 
81
- The default managed environment includes Python 3.11, `base-context-runtime`, `dill`, and the default Python packages. Bootstrap uses `uv`; install it first or opt in with `BASE_CONTEXT_INSTALL_UV=1`. The owned installer prepares its release-local default environment before activation. A bootstrap marker detects stale environments. There is no fallback into upstream Prime state. See [installation](installation.md#python-setup).
81
+ The default managed environment includes Python 3.13, `base-context-runtime`, `dill`, and the default Python packages. Bootstrap uses `uv`; install it first or opt in with `BASE_CONTEXT_INSTALL_UV=1`. The owned installer prepares its release-local default environment before activation. A bootstrap marker detects stale environments. There is no fallback into upstream Prime state. See [installation](installation.md#python-setup).
82
82
 
83
83
  Startup spawns `python -m rlm.repl` and exchanges newline-delimited JSON over stdio: the runtime announces itself with a single `ready` event, then requests and events flow one JSON object per line (see `prime-agent-runtime/src/rlm/repl.md`).
84
84
 
85
- The manager owns the child process and a bounded stderr tail. Shutdown sends a `shutdown` request, waits for the process to exit, and terminates it as a fallback. Persistent sessions may snapshot the kernel namespace into their session artifact directory for revival.
85
+ The manager owns the child process and a bounded stderr tail. Shutdown sends a `shutdown` request, waits for the process to exit, and terminates it as a fallback. Persistent sessions may snapshot the kernel namespace into their session artifact directory for revival. Startup refuses snapshots from a different Python major/minor before restoring them and leaves those files unchanged.
86
86
 
87
87
  ## Stdio Transport
88
88
 
@@ -155,6 +155,14 @@ Unknown options fail instead of being ignored. Model search is bounded to active
155
155
 
156
156
  Children receive incremented `RLM_DEPTH`, the inherited maximum depth, and their own `RLM_SESSION_DIR`. The default maximum depth is 2, so root sessions may create children and grandchildren; grandchildren may not create another generation unless the limit is configured higher.
157
157
 
158
+ ## Concurrent Subagent Limit
159
+
160
+ A root agent and its descendants share one live-subagent cap, independent of the recursion-depth limit. The default is **4**. Running and idle subagents at every depth count; the main/root agent and inactive saved sessions do not. Admission fails when there are no free slots.
161
+
162
+ [`/agents N`](usage.md#limit-concurrent-subagents) updates the current family cap and saves the global `rlmMaxSubagents` preference for later sessions and restarts. `N` must be a non-negative safe integer; `0` blocks new subagent spawns. `/agents` queries the effective current family value rather than displaying the default.
163
+
164
+ Lowering the cap never cancels, kills, or passivates existing subagents. It only prevents new admissions while the live count is at or above the cap. Existing running and idle agents retain their state.
165
+
158
166
  ## Independent Delegation
159
167
 
160
168
  Each direct call admits an independent child and returns its handle immediately:
package/docs/rpc.md CHANGED
@@ -9,10 +9,10 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
9
9
  ## Starting RPC Mode
10
10
 
11
11
  ```bash
12
- base-context --mode rpc --rpc-protocol-version 11 [options]
12
+ base-context --mode rpc --rpc-protocol-version 13 [options]
13
13
  ```
14
14
 
15
- `--rpc-protocol-version 11` is required. It declares that the client handles both successful `agent_end` events and refusal-only terminal events as described below. A missing or different marker is rejected before a session starts. The typed RpcClient also verifies protocol 11 and schema revision at least 45 through the existing `get_state` response before use. Hosts below the current canonical-session ownership minimum are refused; an incompatible startup uses the existing process cleanup path. Custom RPC server entry points `runRpcMode` and `runRpcModeWithConnection` require the caller's protocol version as their second argument.
15
+ `--rpc-protocol-version 13` is required. It declares that the client handles both successful `agent_end` events and refusal-only terminal events as described below. A missing or different marker is rejected before a session starts. The typed RpcClient also verifies protocol 13 and schema revision at least 49 through the existing `get_state` response before use. Hosts below the current canonical-session ownership minimum are refused; an incompatible startup uses the existing process cleanup path. Custom RPC server entry points `runRpcMode` and `runRpcModeWithConnection` require the caller's protocol version as their second argument.
16
16
 
17
17
  This uses the current Base Context daemon protocol marker, not the package version. Updating only the server cannot make an old client understand a new terminal event.
18
18
 
@@ -1392,7 +1392,7 @@ import subprocess
1392
1392
  import json
1393
1393
 
1394
1394
  proc = subprocess.Popen(
1395
- ["base-context", "--mode", "rpc", "--rpc-protocol-version", "11", "--no-session"],
1395
+ ["base-context", "--mode", "rpc", "--rpc-protocol-version", "13", "--no-session"],
1396
1396
  stdin=subprocess.PIPE,
1397
1397
  stdout=subprocess.PIPE,
1398
1398
  text=True
@@ -1433,7 +1433,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
1433
1433
  const { spawn } = require("child_process");
1434
1434
  const { StringDecoder } = require("string_decoder");
1435
1435
 
1436
- const agent = spawn("base-context", ["--mode", "rpc", "--rpc-protocol-version", "11", "--no-session"]);
1436
+ const agent = spawn("base-context", ["--mode", "rpc", "--rpc-protocol-version", "13", "--no-session"]);
1437
1437
 
1438
1438
  function attachJsonlReader(stream, onLine) {
1439
1439
  const decoder = new StringDecoder("utf8");
package/docs/sdk.md CHANGED
@@ -15,7 +15,10 @@ See [examples/sdk/](../examples/sdk/) for working examples from minimal to full
15
15
 
16
16
  ## Quick Start
17
17
 
18
+ Choose a supported provider and model explicitly. This example uses Anthropic; configure `ANTHROPIC_API_KEY` or its saved authentication before running it.
19
+
18
20
  ```typescript
21
+ import { getModel } from "@ponythewhite/base-context-ai";
19
22
  import { AuthStorage, createAgentSession, ModelRegistry, SessionManager } from "@ponythewhite/base-context";
20
23
 
21
24
  // Set up credential storage and model registry
@@ -26,6 +29,7 @@ const { session } = await createAgentSession({
26
29
  sessionManager: SessionManager.inMemory(),
27
30
  authStorage,
28
31
  modelRegistry,
32
+ model: getModel("anthropic", "claude-sonnet-4-5"),
29
33
  });
30
34
 
31
35
  session.subscribe((event) => {
@@ -422,33 +426,38 @@ const { session } = await createAgentSession({
422
426
  });
423
427
  ```
424
428
 
425
- If no model is provided:
426
- 1. Tries to restore from session (if continuing)
427
- 2. Uses default from settings
428
- 3. Falls back to first available model
429
+ Pass a supported `model` explicitly, or omit it to reuse an explicit selection saved in the session or settings. Pass `model: null` to leave the session unselected without restoring a saved choice. Base Context never chooses the first available model or switches providers because another credential exists.
430
+
431
+ A supported saved model remains selected when its authentication needs setup. Requests fail before transport until that provider is authenticated. An unavailable saved model produces a diagnostic and requires a new explicit selection.
429
432
 
430
433
  > See [examples/sdk/02-custom-model.ts](../examples/sdk/02-custom-model.ts)
431
434
 
432
435
  ### API Keys and OAuth
433
436
 
437
+ `AuthStorage.create()` uses normal writable credential storage. Supported subscription
438
+ providers can log in through `/login` in the CLI, or through `authStorage.login(providerId,
439
+ callbacks)` in an SDK application. Supply the browser/prompt callbacks for the provider
440
+ flow. Normal storage persists credentials and refreshes OAuth tokens when needed.
441
+ Authentication does not select a model; choose one explicitly or reuse a saved choice.
442
+ Prime integrations remain disabled.
434
443
 
435
- For an existing OpenAI Codex subscription, explicitly inject a read-only backend:
444
+ For **optional read-only** use of an existing OpenAI Codex subscription, explicitly inject a backend:
436
445
 
437
446
  ```typescript
438
447
  import { AuthStorage } from "@ponythewhite/base-context";
439
448
 
440
449
  const authStorage = AuthStorage.fromStorage(readOnlyBackend, {
441
450
  existingOpenAICodexSubscription: true,
442
- usePrimeCliConfig: false,
443
451
  });
444
452
  ```
445
453
 
446
454
  The backend implements `AuthStorageBackend` and supplies only the existing OAuth access
447
455
  credential and expiry. File-backed writable storage is rejected in this mode. Missing,
448
456
  stale or expired credentials refuse use; login, refresh, storage writes and API-key
449
- fallback are disabled. This authorizes only this instance's official
450
- `openai-codex` / `openai-codex-responses` route. It does not globally validate OAuth clients
451
- or protect against trusted in-process code. Keep the credential backend outside tools.
457
+ fallback are disabled. This mode is limited to this instance's
458
+ `openai-codex` / `openai-codex-responses` route. These restrictions do not apply to normal
459
+ writable OAuth storage, and do not protect against trusted in-process code. Keep the
460
+ credential backend outside tools.
452
461
 
453
462
  API key resolution priority (handled by AuthStorage):
454
463
  1. Runtime overrides (via `setRuntimeApiKey`, not persisted)
@@ -1321,7 +1330,7 @@ const runtime = await createAgentSessionRuntime(createRuntime, {
1321
1330
  sessionManager: await SessionManager.create(process.cwd()),
1322
1331
  });
1323
1332
 
1324
- await runRpcMode(runtime, 11);
1333
+ await runRpcMode(runtime, 13);
1325
1334
  ```
1326
1335
 
1327
1336
  See [RPC documentation](rpc.md) for the JSON protocol.
@@ -1331,7 +1340,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
1331
1340
  For subprocess-based integration without building with the SDK, use the CLI directly:
1332
1341
 
1333
1342
  ```bash
1334
- base-context --mode rpc --rpc-protocol-version 11 --no-session
1343
+ base-context --mode rpc --rpc-protocol-version 13 --no-session
1335
1344
  ```
1336
1345
 
1337
1346
  See [RPC documentation](rpc.md) for the JSON protocol.
package/docs/sessions.md CHANGED
@@ -41,7 +41,6 @@ For native journal storage and the SessionManager API, see [Session Format](sess
41
41
  | `/clone` | Duplicate the current active branch into a new session |
42
42
  | `/compact [prompt]` | Summarize older context; see [Compaction](compaction.md) |
43
43
  | `/export [file]` | Export session to HTML |
44
- | `/share` | Upload as private GitHub gist with shareable HTML link |
45
44
 
46
45
  ## Importing an External Session
47
46