@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.
- package/CHANGELOG.md +33 -0
- package/NOTICE +0 -5
- package/README.md +44 -27
- package/dist/NOTICE +0 -5
- package/dist/base-context-runtime/pyproject.toml +1 -1
- package/dist/base-context-runtime/src/rlm/__init__.py +7 -5
- package/dist/base-context-runtime/test/test_subagent_registry.py +28 -1
- package/dist/base-context-runtime/uv.lock +1 -1
- package/dist/build-info.json +1 -1
- package/dist/bundle/amazon-bedrock.js +21 -0
- package/dist/bundle/{anthropic-YY4S534V.js → anthropic-UV5GZDGU.js} +5 -5
- package/dist/bundle/{azure-openai-responses-JRP6MIM3.js → azure-openai-responses-WSNPXLYC.js} +6 -6
- package/dist/bundle/{bundled-modules-P5HARVZA.js → bundled-modules-TXUMJ2XQ.js} +71 -16
- package/dist/bundle/chunk-27QCJ2AZ.js +2578 -0
- package/dist/bundle/{chunk-MZHTNNVA.js → chunk-4GXPNXOJ.js} +8 -0
- package/dist/bundle/{chunk-SC5KG5R4.js → chunk-DGNX7HQ3.js} +1 -7
- package/dist/bundle/{chunk-A53O363M.js → chunk-GRJFXLBM.js} +0 -1
- package/dist/bundle/chunk-HKINIBP4.js +29 -0
- package/dist/bundle/{chunk-UDSW6FNG.js → chunk-KTNETTHI.js} +1 -1
- package/dist/bundle/{chunk-BYVP7LWV.js → chunk-S3INFPZZ.js} +1861 -4662
- package/dist/bundle/{chunk-73DCPU3D.js → chunk-V3L54UD6.js} +1019 -3427
- package/dist/bundle/{chunk-U7AUVG3B.js → chunk-VSIYFWYI.js} +24 -6
- package/dist/bundle/{chunk-IW77OXFS.js → chunk-W46VZFI6.js} +0 -2099
- package/dist/bundle/{cli-main-O4X7GFGY.js → cli-main-BYMSRPH6.js} +8 -6
- package/dist/bundle/cli.js +2 -2
- package/dist/bundle/{google-AUTVGDGZ.js → google-T32FMD4G.js} +6 -6
- package/dist/bundle/{google-vertex-Q75D7RKS.js → google-vertex-56KP6I3B.js} +3 -3
- package/dist/bundle/{main-XKOW2BV6.js → main-ODOYCEQC.js} +7 -5
- package/dist/bundle/{mistral-7ESB7QUD.js → mistral-WGBMYIVU.js} +5 -5
- package/dist/bundle/{openai-codex-responses-LV3QRPN4.js → openai-codex-responses-PIV2RQ3G.js} +6 -6
- package/dist/bundle/{openai-completions-OJECLPXJ.js → openai-completions-64C3JPR4.js} +11 -22
- package/dist/bundle/{openai-responses-FN6HZMBC.js → openai-responses-UI7RSTDV.js} +6 -6
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +108 -59
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/daemon-ps.d.ts +4 -3
- package/dist/cli/daemon-ps.d.ts.map +1 -1
- package/dist/cli/daemon-ps.js +6 -1
- package/dist/cli/daemon-ps.js.map +1 -1
- package/dist/cli/product-doctor.d.ts +0 -1
- package/dist/cli/product-doctor.d.ts.map +1 -1
- package/dist/cli/product-doctor.js +6 -3
- package/dist/cli/product-doctor.js.map +1 -1
- package/dist/config.d.ts +0 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -8
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-config.d.ts +1 -2
- package/dist/core/agent-session-config.d.ts.map +1 -1
- package/dist/core/agent-session-config.js +0 -3
- package/dist/core/agent-session-config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +5 -4
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +5 -3
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +2 -27
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +10 -6
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +107 -107
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +8 -35
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +33 -243
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/cron-jobs.d.ts.map +1 -1
- package/dist/core/cron-jobs.js +7 -1
- package/dist/core/cron-jobs.js.map +1 -1
- package/dist/core/inference-coordinator.d.ts +6 -1
- package/dist/core/inference-coordinator.d.ts.map +1 -1
- package/dist/core/inference-coordinator.js +18 -2
- package/dist/core/inference-coordinator.js.map +1 -1
- package/dist/core/kernel/bootstrap.d.ts.map +1 -1
- package/dist/core/kernel/bootstrap.js +2 -2
- package/dist/core/kernel/bootstrap.js.map +1 -1
- package/dist/core/kernel/repl-manager.d.ts +2 -0
- package/dist/core/kernel/repl-manager.d.ts.map +1 -1
- package/dist/core/kernel/repl-manager.js +44 -1
- package/dist/core/kernel/repl-manager.js.map +1 -1
- package/dist/core/logging.d.ts +4 -3
- package/dist/core/logging.d.ts.map +1 -1
- package/dist/core/logging.js +6 -6
- package/dist/core/logging.js.map +1 -1
- package/dist/core/mcp/mcp-manager.d.ts.map +1 -1
- package/dist/core/mcp/mcp-manager.js +3 -3
- package/dist/core/mcp/mcp-manager.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -16
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +88 -196
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +2 -19
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +36 -266
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-contracts.d.ts +5 -6
- package/dist/core/provider-contracts.d.ts.map +1 -1
- package/dist/core/provider-contracts.js +25 -36
- package/dist/core/provider-contracts.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +0 -2
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/rlm-max-subagents.d.ts +32 -0
- package/dist/core/rlm-max-subagents.d.ts.map +1 -0
- package/dist/core/rlm-max-subagents.js +50 -0
- package/dist/core/rlm-max-subagents.js.map +1 -0
- package/dist/core/rlm-runtime.d.ts +3 -3
- package/dist/core/rlm-runtime.d.ts.map +1 -1
- package/dist/core/rlm-runtime.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +27 -14
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -16
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +12 -44
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +6 -6
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/installer.mjs +2 -3
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +39 -34
- package/dist/main.js.map +1 -1
- package/dist/modes/acp/acp-mode.d.ts.map +1 -1
- package/dist/modes/acp/acp-mode.js +1 -1
- package/dist/modes/acp/acp-mode.js.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts +6 -2
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.js +13 -2
- package/dist/modes/agent-connection/daemon-agent-connection.js.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.d.ts +2 -0
- package/dist/modes/agent-connection/in-process-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.js +6 -0
- package/dist/modes/agent-connection/in-process-agent-connection.js.map +1 -1
- package/dist/modes/agent-connection/types.d.ts +3 -0
- package/dist/modes/agent-connection/types.d.ts.map +1 -1
- package/dist/modes/agent-connection/types.js.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.d.ts.map +1 -1
- package/dist/modes/agents-view/agents-view-mode.js +2 -19
- package/dist/modes/agents-view/agents-view-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts +5 -0
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +107 -12
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-protocol.d.ts +194 -165
- package/dist/modes/daemon/daemon-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-protocol.js +16 -11
- package/dist/modes/daemon/daemon-protocol.js.map +1 -1
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts +19 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js +74 -0
- package/dist/modes/daemon/daemon-rlm-capacity-coordinator.js.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity.d.ts +19 -0
- package/dist/modes/daemon/daemon-rlm-capacity.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-rlm-capacity.js +85 -0
- package/dist/modes/daemon/daemon-rlm-capacity.js.map +1 -0
- package/dist/modes/daemon/daemon-session-summarizer.d.ts +2 -3
- package/dist/modes/daemon/daemon-session-summarizer.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-session-summarizer.js +32 -23
- package/dist/modes/daemon/daemon-session-summarizer.js.map +1 -1
- package/dist/modes/daemon/daemon-state-root.d.ts +15 -0
- package/dist/modes/daemon/daemon-state-root.d.ts.map +1 -0
- package/dist/modes/daemon/daemon-state-root.js +40 -0
- package/dist/modes/daemon/daemon-state-root.js.map +1 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.d.ts +2 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor-ownership.js +27 -0
- package/dist/modes/daemon/daemon-supervisor-ownership.js.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts +10 -1
- package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-supervisor.js +213 -20
- package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.d.ts +28 -1
- package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-worker-protocol.js +16 -2
- package/dist/modes/daemon/daemon-worker-protocol.js.map +1 -1
- package/dist/modes/daemon/saved-session-catalog.d.ts.map +1 -1
- package/dist/modes/daemon/saved-session-catalog.js +2 -0
- package/dist/modes/daemon/saved-session-catalog.js.map +1 -1
- package/dist/modes/interactive/auth-flows.d.ts +0 -6
- package/dist/modes/interactive/auth-flows.d.ts.map +1 -1
- package/dist/modes/interactive/auth-flows.js +6 -126
- package/dist/modes/interactive/auth-flows.js.map +1 -1
- package/dist/modes/interactive/components/configuration-menu.d.ts +3 -0
- package/dist/modes/interactive/components/configuration-menu.d.ts.map +1 -1
- package/dist/modes/interactive/components/configuration-menu.js +13 -2
- package/dist/modes/interactive/components/configuration-menu.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -2
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -40
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +13 -2
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +2 -11
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/feature-hints.d.ts.map +1 -1
- package/dist/modes/interactive/feature-hints.js +0 -4
- package/dist/modes/interactive/feature-hints.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -12
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +81 -507
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/onboarding.d.ts +0 -3
- package/dist/modes/interactive/onboarding.d.ts.map +1 -1
- package/dist/modes/interactive/onboarding.js +0 -17
- package/dist/modes/interactive/onboarding.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +2 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +24 -11
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/node/amazon-bedrock.d.ts +2 -0
- package/dist/node/amazon-bedrock.d.ts.map +1 -0
- package/dist/node/amazon-bedrock.js +6 -0
- package/dist/node/amazon-bedrock.js.map +1 -0
- package/dist/product-identity.d.ts +0 -1
- package/dist/product-identity.d.ts.map +1 -1
- package/dist/product-identity.js +0 -1
- package/dist/product-identity.js.map +1 -1
- package/docs/development.md +1 -1
- package/docs/fork-philosophy.md +4 -8
- package/docs/installation.md +83 -62
- package/docs/providers.md +23 -25
- package/docs/quickstart.md +19 -10
- package/docs/rlm-runtime.md +13 -5
- package/docs/rpc.md +4 -4
- package/docs/sdk.md +20 -11
- package/docs/sessions.md +0 -1
- package/docs/settings.md +9 -42
- package/docs/skills.md +0 -1
- package/docs/upstream-0.9.5.md +171 -0
- package/docs/usage.md +14 -10
- package/package.json +4 -4
- package/dist/core/agent-traces.d.ts +0 -149
- package/dist/core/agent-traces.d.ts.map +0 -1
- package/dist/core/agent-traces.js +0 -904
- package/dist/core/agent-traces.js.map +0 -1
- package/dist/core/prime-inference-auth.d.ts +0 -70
- package/dist/core/prime-inference-auth.d.ts.map +0 -1
- package/dist/core/prime-inference-auth.js +0 -352
- package/dist/core/prime-inference-auth.js.map +0 -1
- package/dist/core/prime-inference-model-selection.d.ts +0 -16
- package/dist/core/prime-inference-model-selection.d.ts.map +0 -1
- package/dist/core/prime-inference-model-selection.js +0 -16
- package/dist/core/prime-inference-model-selection.js.map +0 -1
- package/dist/core/prime-inference-models.d.ts +0 -6
- package/dist/core/prime-inference-models.d.ts.map +0 -1
- package/dist/core/prime-inference-models.js +0 -62
- package/dist/core/prime-inference-models.js.map +0 -1
- package/dist/core/telemetry.d.ts +0 -95
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js +0 -637
- package/dist/core/telemetry.js.map +0 -1
- package/dist/modes/interactive/components/prime-onboarding-splash.d.ts +0 -39
- package/dist/modes/interactive/components/prime-onboarding-splash.d.ts.map +0 -1
- package/dist/modes/interactive/components/prime-onboarding-splash.js +0 -286
- package/dist/modes/interactive/components/prime-onboarding-splash.js.map +0 -1
- package/dist/modes/interactive/components/prime-team-selector.d.ts +0 -30
- package/dist/modes/interactive/components/prime-team-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/prime-team-selector.js +0 -166
- package/dist/modes/interactive/components/prime-team-selector.js.map +0 -1
- package/dist/skills/prime-intellect/SKILL.md +0 -87
- package/dist/skills/prime-intellect/references/compute.md +0 -45
- package/dist/skills/prime-intellect/references/environments.md +0 -73
- package/dist/skills/prime-intellect/references/inference.md +0 -47
- package/dist/skills/prime-intellect/references/sandboxes.md +0 -75
- package/skills/prime-intellect/SKILL.md +0 -87
- package/skills/prime-intellect/references/compute.md +0 -45
- package/skills/prime-intellect/references/environments.md +0 -73
- package/skills/prime-intellect/references/inference.md +0 -47
- package/skills/prime-intellect/references/sandboxes.md +0 -75
package/docs/fork-philosophy.md
CHANGED
|
@@ -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
|
-
##
|
|
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
|
-
|
|
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).
|
package/docs/installation.md
CHANGED
|
@@ -1,111 +1,132 @@
|
|
|
1
1
|
# Installation, updates, and rollback
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install **Synerise base-context** with the installer below. The application package is `@ponythewhite/base-context`; the command is `base-context`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Recommended: the installer
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
To start work later:
|
|
15
24
|
|
|
16
25
|
```bash
|
|
17
|
-
|
|
18
|
-
base-context --version
|
|
19
|
-
cd /path/to/project
|
|
26
|
+
cd /path/to/your/project
|
|
20
27
|
base-context
|
|
21
28
|
```
|
|
22
29
|
|
|
23
|
-
|
|
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
|
-
|
|
32
|
+
### Updates and rollback
|
|
26
33
|
|
|
27
|
-
|
|
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
|
-
|
|
37
|
+
base-context update --self
|
|
38
|
+
base-context-install rollback
|
|
31
39
|
```
|
|
32
40
|
|
|
33
|
-
|
|
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
|
-
|
|
43
|
+
To install a specific release, download that release's installer and pass its version:
|
|
36
44
|
|
|
37
45
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
62
|
+
BASE_CONTEXT_INSTALL_UV=1 base-context
|
|
50
63
|
```
|
|
51
64
|
|
|
52
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
82
|
+
```bash
|
|
83
|
+
npm install -g @ponythewhite/base-context@latest
|
|
84
|
+
```
|
|
65
85
|
|
|
66
|
-
|
|
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
|
-
|
|
88
|
+
## Source installation
|
|
69
89
|
|
|
70
90
|
```bash
|
|
71
|
-
|
|
72
|
-
|
|
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
|
|
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
|
-
|
|
100
|
+
## Custom Python environments
|
|
80
101
|
|
|
81
|
-
|
|
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
|
-
|
|
104
|
+
For an explicitly managed environment:
|
|
84
105
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
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
|
-
|
|
112
|
+
## Local release packages
|
|
93
113
|
|
|
94
|
-
For unpublished
|
|
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
|
|
101
|
-
--local-dependency "$PACKS/ponythewhite-base-context-ai
|
|
102
|
-
--local-dependency "$PACKS/ponythewhite-base-context-tui
|
|
103
|
-
--local-dependency "$PACKS/ponythewhite-base-context-agent
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
- **
|
|
127
|
-
- **Command not found:**
|
|
128
|
-
- **Python
|
|
129
|
-
- **Manual Python is rejected:** install the current bundled
|
|
130
|
-
- **No
|
|
131
|
-
- **Background service issue:** use `base-context status`, then `base-context doctor`; add `--fix`
|
|
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
|
-
|
|
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
|
-
##
|
|
5
|
+
## First-time setup
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
For command-line selection, list the supported models and name both parts:
|
|
15
12
|
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
22
|
+
## Authentication availability
|
|
21
23
|
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
28
|
+
### ChatGPT / Codex subscription
|
|
27
29
|
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/docs/quickstart.md
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 `
|
|
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
|
|
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
|
|
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
|
```
|
package/docs/rlm-runtime.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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.
|
|
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
|
|
12
|
+
base-context --mode rpc --rpc-protocol-version 13 [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`--rpc-protocol-version
|
|
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", "
|
|
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", "
|
|
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
|
-
|
|
426
|
-
|
|
427
|
-
|
|
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
|
|
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
|
|
450
|
-
`openai-codex` / `openai-codex-responses` route.
|
|
451
|
-
|
|
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,
|
|
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
|
|
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
|
|