@ponythewhite/base-context 1.0.12 → 1.0.14

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 (66) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/base-context-runtime/pyproject.toml +1 -1
  3. package/dist/base-context-runtime/uv.lock +1 -1
  4. package/dist/build-info.json +1 -1
  5. package/dist/bundle/amazon-bedrock.js +3 -3
  6. package/dist/bundle/{anthropic-BJVPUMPB.js → anthropic-AXUXEET7.js} +1 -1
  7. package/dist/bundle/{azure-openai-responses-ERRMAXK6.js → azure-openai-responses-J3NTJKEO.js} +2 -2
  8. package/dist/bundle/{bundled-modules-WCGPZI2H.js → bundled-modules-UODO7ZR7.js} +5 -5
  9. package/dist/bundle/{chunk-FOGKLC7V.js → chunk-72LSQYUV.js} +1 -1
  10. package/dist/bundle/{chunk-MUFZODP5.js → chunk-EGFIZABJ.js} +1 -1
  11. package/dist/bundle/{chunk-AEMRBMI2.js → chunk-IEM74GZ5.js} +9 -9
  12. package/dist/bundle/{chunk-25VYRAC6.js → chunk-JKKXN6JE.js} +72 -0
  13. package/dist/bundle/{chunk-IAKHCQA2.js → chunk-NLRWERWA.js} +37 -32
  14. package/dist/bundle/{chunk-YGV3Y4AD.js → chunk-SX7CAXWU.js} +23 -5
  15. package/dist/bundle/{chunk-Q6UAHLII.js → chunk-V6LOBH6X.js} +2 -2
  16. package/dist/bundle/{cli-main-CTYDQHFE.js → cli-main-6GXXIMQQ.js} +4 -4
  17. package/dist/bundle/cli.js +1 -1
  18. package/dist/bundle/{google-4GA4YMUX.js → google-QLKV2ZLC.js} +2 -2
  19. package/dist/bundle/{google-vertex-7AMALD7D.js → google-vertex-UGLUZV6B.js} +2 -2
  20. package/dist/bundle/{main-GVGK354K.js → main-HF64B4HM.js} +5 -5
  21. package/dist/bundle/{mistral-74BXMNRM.js → mistral-2ITSLHYF.js} +1 -1
  22. package/dist/bundle/{openai-codex-responses-COXNC4IH.js → openai-codex-responses-FRREQXS3.js} +5 -4
  23. package/dist/bundle/{openai-completions-BCSA5Q6S.js → openai-completions-HF6UPPLW.js} +1 -1
  24. package/dist/bundle/{openai-responses-ONCIZSJS.js → openai-responses-LRTMBDFW.js} +2 -2
  25. package/dist/core/agent-session.d.ts.map +1 -1
  26. package/dist/core/agent-session.js +6 -1
  27. package/dist/core/agent-session.js.map +1 -1
  28. package/dist/core/autonomous.d.ts +2 -0
  29. package/dist/core/autonomous.d.ts.map +1 -1
  30. package/dist/core/autonomous.js +4 -0
  31. package/dist/core/autonomous.js.map +1 -1
  32. package/dist/core/canonical-context.d.ts.map +1 -1
  33. package/dist/core/canonical-context.js +7 -0
  34. package/dist/core/canonical-context.js.map +1 -1
  35. package/dist/core/compaction/compaction.d.ts.map +1 -1
  36. package/dist/core/compaction/compaction.js +1 -1
  37. package/dist/core/compaction/compaction.js.map +1 -1
  38. package/dist/core/public-context.d.ts.map +1 -1
  39. package/dist/core/public-context.js +2 -0
  40. package/dist/core/public-context.js.map +1 -1
  41. package/dist/core/view-units.d.ts.map +1 -1
  42. package/dist/core/view-units.js +3 -0
  43. package/dist/core/view-units.js.map +1 -1
  44. package/dist/main.d.ts.map +1 -1
  45. package/dist/main.js +1 -1
  46. package/dist/main.js.map +1 -1
  47. package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
  48. package/dist/modes/daemon/daemon-mode.js +4 -3
  49. package/dist/modes/daemon/daemon-mode.js.map +1 -1
  50. package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
  51. package/dist/modes/daemon/daemon-supervisor.js +11 -5
  52. package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
  53. package/dist/modes/daemon/daemon-worker-protocol.d.ts +3 -0
  54. package/dist/modes/daemon/daemon-worker-protocol.d.ts.map +1 -1
  55. package/dist/modes/daemon/daemon-worker-protocol.js +2 -0
  56. package/dist/modes/daemon/daemon-worker-protocol.js.map +1 -1
  57. package/dist/modes/print-mode.d.ts.map +1 -1
  58. package/dist/modes/print-mode.js +24 -21
  59. package/dist/modes/print-mode.js.map +1 -1
  60. package/docs/compaction.md +36 -7
  61. package/docs/context-management.md +16 -10
  62. package/docs/json.md +14 -1
  63. package/docs/long-running-agents.md +23 -2
  64. package/docs/providers.md +17 -0
  65. package/docs/settings.md +20 -11
  66. package/package.json +4 -4
@@ -46,7 +46,9 @@ The client can detach at any point. The resident worker continues to own the que
46
46
 
47
47
  Normal interactive sessions run in resident worker processes managed by a local supervisor. The worker owns the root session, its Python kernel, scheduled jobs, and RLM descendants.
48
48
 
49
- Closing the terminal UI detaches the client; it does not stop the worker. List and reconnect to active agents with:
49
+ Closing the terminal UI detaches the client; it does not stop the resident worker. Print/JSON and RPC sessions are client-owned instead: losing their client connection triggers worker cleanup. ACP sessions are resident unless `--no-session` is used. A separate launcher or monitoring process can fail while its CLI child remains connected; that is not a client disconnect.
50
+
51
+ List and reconnect to active agents with:
50
52
 
51
53
  ```bash
52
54
  base-context list
@@ -64,12 +66,16 @@ base-context doctor [--fix] # Diagnose or repair service state
64
66
  base-context shutdown [--force] # Stop all agents and services
65
67
  ```
66
68
 
69
+ Use the session ID from the JSON stream header or the IDs in `base-context list --json` to track a run. Several sessions can share one cwd. The process title `base-context` identifies the program, not an individual session. `stop` reports an error for an unknown or ambiguous target; do not suppress all stop failures or infer worker death from a separate launcher's exit.
70
+
67
71
  Workers persist native-framed journals and use derived indexes. The default flat paths are `~/.base-context/sessions/<session-id>.jsonl` and `~/.base-context/session-artifacts/<session-id>/`. `BASE_CONTEXT_HOME` selects the product root; `BASE_CONTEXT_SESSION_DIR` can select a different absolute sessions directory, with artifacts under its parent's `session-artifacts/` directory.
68
72
 
69
73
  The `.jsonl` extension does not make a native journal an editable transcript. Use the asynchronous, bounded SessionManager APIs described in [Sessions](sessions.md#session-format), not `jq`, manual appends or text edits. Recovery uses the native owners and supported artifacts. Copying a journal alone does not restore a worker, Python process, live children or pending dispatch authority.
70
74
 
71
75
  Daemon workers are process-isolated for lifecycle and failure containment, not security-sandboxed. They normally run with the same operating-system permissions as the client.
72
76
 
77
+ If a run must not create subagents, use the existing `/agents 0` control or the `rlmMaxSubagents: 0` setting. This blocks new admissions; it does not stop existing children. A prompt instruction alone is not a capability limit. Parent `message_end` usage describes parent responses, not all delegated work; inspect child usage separately. See [RLM](rlm.md) and [Settings](settings.md).
78
+
73
79
  ## Agent-to-Agent Communication
74
80
 
75
81
  The daemon routes direct messages between active sessions and retained daemon-backed subagents. From a shell:
@@ -228,6 +234,15 @@ await goal.complete()
228
234
 
229
235
  Goal state records token usage, elapsed time, continuation count, and an optional explicit token budget. The harness keeps prompting an active goal after ordinary assistant turns; only `goal.complete()` marks successful completion. Creating a persistent goal is an explicit user or host action, not something the agent should infer from every task. Imported historical goal entries remain retained data; importing them does not reactivate the goal.
230
236
 
237
+ Goal objectives are limited to 4,000 characters because they remain part of the ongoing task context. Keep the objective short and pass a longer brief as prompt input, for example:
238
+
239
+ ```bash
240
+ base-context -p --goal "Complete the change described in BRIEF.md" \
241
+ --goal-token-budget 200000 @BRIEF.md
242
+ ```
243
+
244
+ `--goal-token-budget` accompanies `--goal`; resuming a session alone restores the saved goal budget and usage. `/goal resume` does not reset an exhausted budget. To authorize more work after exhaustion, explicitly start a new goal with a new budget. Goal token usage counts `input + output`, not cached reads.
245
+
231
246
  ## Autonomous Mode
232
247
 
233
248
  Autonomous mode is a bounded host policy for runs where no human input is expected. Base Context adds follow-up continuations until configured quality gates pass or a continuation, turn, token, or wall-clock limit is reached.
@@ -250,7 +265,13 @@ base-context \
250
265
  "Implement and verify the requested change"
251
266
  ```
252
267
 
253
- Autonomous mode supports limits for continuations, assistant turns, tokens, and wall-clock duration. Gate commands run before the session may finish; a failed gate returns its bounded output to the agent for another attempt. Base Context avoids rerunning the same failed gate when the workspace has not changed.
268
+ Autonomous mode supports limits for continuations, assistant turns, tokens, and wall-clock duration. Defaults are 3 continuations, 12 turns, 80,000 tokens, and 30 minutes. Set explicit limits for longer jobs rather than relying on unbounded execution.
269
+
270
+ The autonomous token counter is `input + output + cacheWrite`. It excludes `cacheRead`; provider `totalTokens` includes cached reads and is not the same budget or a monetary cost. An external launcher that sums `totalTokens` therefore applies a different limit.
271
+
272
+ Turn, token, and time limits are checked at completed native tool-turn boundaries before another main-loop request. A running response or tool is allowed to finish, so usage or elapsed time can exceed the exact cap by that work. These limits are not process-kill timers and do not cancel every auxiliary lifecycle operation. `maxContinuations` counts host-injected prompts separately; the final permitted prompt can still execute its tool turns.
273
+
274
+ Gate commands run before successful autonomous completion; a failed gate returns its bounded output to the agent for another attempt. Base Context avoids rerunning the same failed gate when the workspace has not changed. A work limit can stop a run before its gates execute. Headless mode returns nonzero in that case, rather than treating an unrun gate as success.
254
275
 
255
276
  Goals and autonomous mode are complementary but different:
256
277
 
package/docs/providers.md CHANGED
@@ -35,6 +35,23 @@ An OpenAI API key belongs to the separate `openai` provider; it is not required
35
35
 
36
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).
37
37
 
38
+ ### GPT-6 Sol and Luna
39
+
40
+ Both `gpt-6-sol` and `gpt-6-luna` are listed under these separate providers:
41
+
42
+ | Provider | Authentication | Route | Catalog context capacity |
43
+ |----------|----------------|-------|--------------------------|
44
+ | `openai` | OpenAI API key | `openai-responses`, `https://api.openai.com/v1/responses` | 1,050,000 tokens |
45
+ | `openai-codex` | ChatGPT/Codex subscription OAuth | `openai-codex-responses`, `https://chatgpt.com/backend-api/codex/responses` | 872,000 tokens |
46
+
47
+ The official Codex catalog specifies a 272,000-token **client default** and an 872,000-token **maximum configuration override** for both models. Base Context uses that documented maximum as catalog capacity, without importing Codex's compaction percentages. The API model cards specify 1,050,000 context tokens, 922,000 maximum input tokens, and 128,000 maximum output tokens. All four catalog entries use the nominal 128,000 output ceiling; a separate Codex account/backend output limit has not been verified. Both accept text and images and produce text.
48
+
49
+ API reasoning levels are `off` (sent as `none`), `low`, `medium`, `high`, `xhigh`, and `max`. The Codex entries expose `low` through `max`, without `off` or `minimal`. Codex's Ultra option is client-side task delegation, not an additional Base Context reasoning level.
50
+
51
+ Catalog costs are flat Standard API-rate estimates. Long-context and service-tier premiums are not modeled by these entries. Codex costs are API-equivalent estimates, not subscription charges or invoices. Model availability depends on account, workspace, client, and rollout; live account access has not been verified.
52
+
53
+ Official sources: [Sol model card](https://developers.openai.com/api/docs/models/gpt-6-sol), [Luna model card](https://developers.openai.com/api/docs/models/gpt-6-luna), [API pricing](https://developers.openai.com/api/docs/pricing), [Codex models](https://developers.openai.com/codex/models), [Codex catalog](https://github.com/openai/codex/blob/main/codex-rs/models-manager/models.json), and [context-field definitions](https://github.com/openai/codex/blob/main/codex-rs/protocol/src/openai_models.rs).
54
+
38
55
  ## API Keys
39
56
 
40
57
  ### Environment Variables or Auth File
package/docs/settings.md CHANGED
@@ -94,7 +94,8 @@ Private download manifests require `version` and `package` (or `packageName`) se
94
94
  | `compaction.enabled` | boolean | `true` | Enable auto-compaction |
95
95
  | `compaction.reserveTokens` | number | `16384` | Tokens reserved for LLM response |
96
96
  | `compaction.keepRecentTokens` | number | `20000` | Recent tokens to keep (not summarized) |
97
- | `compaction.targetTokens` | positive integer or `"model-limit"` | Model-aware soft target | Override the soft compaction target, still capped by the model window minus reserve |
97
+ | `compaction.targetTokens` | positive integer or `"model-limit"` | 90% of the model context window | Override the soft compaction target, still capped by the model window minus reserve |
98
+ | `compaction.agentCallable` | boolean | `true` | Expose the `compact` skill so the agent can request compaction before the automatic threshold |
98
99
  | `compaction.model` | object | Current main model and effort | Explicit summary model: `provider`, `modelId`, and `thinkingLevel` are all required |
99
100
 
100
101
  ```json
@@ -108,16 +109,24 @@ Private download manifests require `version` and `package` (or `packageName`) se
108
109
  ```
109
110
 
110
111
 
111
- Without `targetTokens`, the soft target is
112
- `max(4 * keepRecentTokens, min(96000, contextWindow / 2))`. The trigger also leaves
113
- `4 * keepRecentTokens` above an estimate of current fixed instructions, tool
114
- schemas, TaskFrame and latest harness snapshot. It is capped at
115
- `contextWindow - reserveTokens`. With small fixed context, default settings use
116
- 96000 for a 272000-token model. A positive safe integer replaces the soft target,
117
- but required-context headroom can raise it; `"model-limit"` uses exactly the
118
- full-window threshold. This is a summary heuristic,
119
- not strict provider-request admission. See [compaction](compaction.md#when-it-triggers)
120
- and [model-aware budgets](context-management.md#model-aware-budgets).
112
+ Without `targetTokens`, the soft target is 90% of the model context window:
113
+ `floor(0.9 * contextWindow)`. The trigger also leaves `4 * keepRecentTokens` above
114
+ an estimate of current fixed instructions, tool schemas, TaskFrame and latest
115
+ harness snapshot. It is capped at `contextWindow - reserveTokens`. With small
116
+ fixed context, default thresholds are 244800 for a 272000-token model, 111616 for a
117
+ 128000-token model, and 47616 for a 64000-token model. The model-window reserve can
118
+ therefore trigger compaction before 90%. A positive safe integer replaces the
119
+ soft target, but required-context headroom can raise it; `"model-limit"` uses
120
+ exactly `contextWindow - reserveTokens`. This is a summary heuristic, not strict
121
+ provider-request admission. See [compaction](compaction.md#when-it-triggers) and
122
+ [model-aware budgets](context-management.md#model-aware-budgets).
123
+
124
+ With the default `compaction.agentCallable: true`, the agent can use
125
+ `await compact.status()` and `await compact.run(instructions=None)` in the Python
126
+ REPL. This model-independent path includes Astra and can request compaction before
127
+ the automatic threshold. It also works with `compaction.enabled: false`, but new
128
+ requests require `context.mode: "on"`. Requests run at a turn boundary, not
129
+ mid-cell. See [agent-requested compaction](compaction.md#agent-requested-compaction).
121
130
 
122
131
  Set `compaction.model` to choose the model and effort for manual, automatic and
123
132
  model-requested compaction summaries. For example, when this exact model/route is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ponythewhite/base-context",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "Synerise base-context: a coding and research agent with durable context and a persistent Python REPL",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,9 +42,9 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@agentclientprotocol/sdk": "^1.3.0",
45
- "@ponythewhite/base-context-agent": "1.0.12",
46
- "@ponythewhite/base-context-ai": "1.0.12",
47
- "@ponythewhite/base-context-tui": "1.0.12",
45
+ "@ponythewhite/base-context-agent": "1.0.14",
46
+ "@ponythewhite/base-context-ai": "1.0.14",
47
+ "@ponythewhite/base-context-tui": "1.0.14",
48
48
  "@silvia-odwyer/photon-node": "^0.3.4",
49
49
  "chalk": "^5.5.0",
50
50
  "cli-highlight": "^2.1.11",